@arcgis/core 4.33.0-next.20250407 → 4.33.0-next.20250408
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/Color.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{69b5d0ef14fb521b0fd7.js → 04008648c59031bca8ea.js} +1 -1
- package/assets/esri/core/workers/chunks/07236fe57d76b1134cd4.js +1 -0
- package/assets/esri/core/workers/chunks/{6a8cf1f51cc4adc268d3.js → 0747c9542172241b52ab.js} +1 -1
- package/assets/esri/core/workers/chunks/083548c5eea5aca6404c.js +1 -0
- package/assets/esri/core/workers/chunks/0d37c6aa261c8d5e5b23.js +1 -0
- package/assets/esri/core/workers/chunks/0d7c1de47ae006277b76.js +1 -0
- package/assets/esri/core/workers/chunks/{9574896c90b39fa7ecb4.js → 10fd52bc5124fced5bcc.js} +1 -1
- package/assets/esri/core/workers/chunks/11b725421a823f6183a2.js +1 -0
- package/assets/esri/core/workers/chunks/{d9b2263e0a9f9068ab62.js → 14d1a970e927ebfed9c8.js} +1 -1
- package/assets/esri/core/workers/chunks/{0eed612e82a279ac8d1e.js → 1595f3def0ba0c4f0fe7.js} +1 -1
- package/assets/esri/core/workers/chunks/{1263391920fbb8926ced.js → 19eb465f91d07862926a.js} +1 -1
- package/assets/esri/core/workers/chunks/1c8cdae7736b6c907d95.js +1 -0
- package/assets/esri/core/workers/chunks/1cc4fc3353d217632a1b.js +1 -0
- package/assets/esri/core/workers/chunks/{91439b59260b0fb04be9.js → 238df0aee97315623638.js} +1 -1
- package/assets/esri/core/workers/chunks/{7ea5bbb52e84be9a608e.js → 23cc33576da66b3c4366.js} +1 -1
- package/assets/esri/core/workers/chunks/{358a3a9326615d5e6d3b.js → 2679da0c93f05ae956c6.js} +1 -1
- package/assets/esri/core/workers/chunks/26e0a0a13060cd3e4291.js +1 -0
- package/assets/esri/core/workers/chunks/{c2d0fc13f4b746318a38.js → 290f63304a2a81303c06.js} +1 -1
- package/assets/esri/core/workers/chunks/{e6544e966f14fb410157.js → 2d5cb817e6e905103068.js} +1 -1
- package/assets/esri/core/workers/chunks/345f428dfcaa594ee617.js +1 -0
- package/assets/esri/core/workers/chunks/35dccd3883d2e466c42e.js +1 -0
- package/assets/esri/core/workers/chunks/{fc5ca7b08915177c5e33.js → 364860a42edc0c3b8d5b.js} +1 -1
- package/assets/esri/core/workers/chunks/393fbd296817e813936c.js +1 -0
- package/assets/esri/core/workers/chunks/{82a58a405332d43a328f.js → 39fbac918ebd1b0e3a18.js} +1 -1
- package/assets/esri/core/workers/chunks/3a649aa78e25e3c8aa8c.js +1 -0
- package/assets/esri/core/workers/chunks/{4cc77769009901a112ec.js → 3b2bda2e8c08f486de27.js} +1 -1
- package/assets/esri/core/workers/chunks/3e1bb914aceb3a9af898.js +1 -0
- package/assets/esri/core/workers/chunks/3ee77b601fb0f3567e87.js +1 -0
- package/assets/esri/core/workers/chunks/40945669f5be487b340c.js +1 -0
- package/assets/esri/core/workers/chunks/43a3b1b78d214aadaaad.js +1 -0
- package/assets/esri/core/workers/chunks/49d03bdaa9c4476b69d6.js +1 -0
- package/assets/esri/core/workers/chunks/{1b87fa15470cce26feea.js → 49d6b56e21b1bc0d1948.js} +1 -1
- package/assets/esri/core/workers/chunks/4cbd5303f5a5a5fff391.js +1 -0
- package/assets/esri/core/workers/chunks/{40b33c9bd271cddbd837.js → 50ffb2620cdbcfd75723.js} +1 -1
- package/assets/esri/core/workers/chunks/544771f64a86b541d5bb.js +1 -0
- package/assets/esri/core/workers/chunks/55cc40d1b1853f779d82.js +1 -0
- package/assets/esri/core/workers/chunks/56e9dfd62102c32b9770.js +1 -0
- package/assets/esri/core/workers/chunks/576bed289aa7be03f319.js +1 -0
- package/assets/esri/core/workers/chunks/{b7a1185ac49480fc1410.js → 5c80452df87024fdaa75.js} +1 -1
- package/assets/esri/core/workers/chunks/5ef6acd36629eae225da.js +1 -0
- package/assets/esri/core/workers/chunks/{e592731ac12b9bc646ff.js → 60d3b329e69f3cddb7f4.js} +1 -1
- package/assets/esri/core/workers/chunks/{43b19c58b2d16ae8e7cc.js → 6275114e8ed9dd31465d.js} +1 -1
- package/assets/esri/core/workers/chunks/63ce66da1a52d6d07ccb.js +1 -0
- package/assets/esri/core/workers/chunks/6447d373a43ef6cd46cd.js +1 -0
- package/assets/esri/core/workers/chunks/64824ee75c643cee2aa9.js +1 -0
- package/assets/esri/core/workers/chunks/{48fbf887da6d19838bf0.js → 6a067a6ce0968d893142.js} +1 -1
- package/assets/esri/core/workers/chunks/6a70b858e24d98845041.js +1 -0
- package/assets/esri/core/workers/chunks/{c589d32f8efcca6bf712.js → 6c65b966f4c952508fc1.js} +1 -1
- package/assets/esri/core/workers/chunks/{cda6ae4c5cb67e22b454.js → 6d15d953baabccbbee01.js} +1 -1
- package/assets/esri/core/workers/chunks/6ecf2924f9f6aac61101.js +1 -0
- package/assets/esri/core/workers/chunks/{25a686f00479ac12a1ca.js → 6f9a17f62786af04b74e.js} +1 -1
- package/assets/esri/core/workers/chunks/77334c3fed1e3a06d307.js +1 -0
- package/assets/esri/core/workers/chunks/{7ef9bcd58af499a14a08.js → 79036c5d7569c4e94abe.js} +1 -1
- package/assets/esri/core/workers/chunks/{2ab7d36409e9af3ac3da.js → 7b47b08f4a58898273b9.js} +1 -1
- package/assets/esri/core/workers/chunks/{90442f47c9f31f26b453.js → 7f961954e59a232bfa88.js} +1 -1
- package/assets/esri/core/workers/chunks/{ccb289911e7445b17763.js → 86b4920f5a99576399fb.js} +2 -2
- package/assets/esri/core/workers/chunks/877f665c7edb26c147ea.js +1 -0
- package/assets/esri/core/workers/chunks/{8aae03e347ab18ae6ee2.js → 89e7cc489156ff0ebdb6.js} +1 -1
- package/assets/esri/core/workers/chunks/8c5619fdf125a459281d.js +1 -0
- package/assets/esri/core/workers/chunks/8e64687ee76e70deeb29.js +1 -0
- package/assets/esri/core/workers/chunks/{400f95295bbfced31076.js → 8ef755e6a7b2b71f46e6.js} +1 -1
- package/assets/esri/core/workers/chunks/8fe36b06a7eceeb874e9.js +1 -0
- package/assets/esri/core/workers/chunks/{269531e770376ed9e4fd.js → 90874dfe23035d16660c.js} +1 -1
- package/assets/esri/core/workers/chunks/91bb715f5ee87e97f162.js +1 -0
- package/assets/esri/core/workers/chunks/{5c757e20c0543e6a49b3.js → 948a3c1419ae323cca10.js} +1 -1
- package/assets/esri/core/workers/chunks/{7f31dbe0ca8974a10be8.js → 96cddbbeef61a4f33f29.js} +1 -1
- package/assets/esri/core/workers/chunks/{27b7ef3442700f6d6123.js → 9a84ff99756c7247dd39.js} +97 -96
- package/assets/esri/core/workers/chunks/9fddd759c308d3d5801a.js +1 -0
- package/assets/esri/core/workers/chunks/a29e99328d75b6ceb74d.js +1 -0
- package/assets/esri/core/workers/chunks/{af9fda47d02c51a2c7da.js → a32e697547f8ac345dd7.js} +1 -1
- package/assets/esri/core/workers/chunks/a426152e7eb550b8f15f.js +1 -0
- package/assets/esri/core/workers/chunks/a6de903f22f76d875005.js +1 -0
- package/assets/esri/core/workers/chunks/{90c893959145827961ac.js → aaf67ec3d580e1fee6c7.js} +1 -1
- package/assets/esri/core/workers/chunks/{d2c7067bb6654c0e2793.js → ac91bd1fee9ddadc270b.js} +1 -1
- package/assets/esri/core/workers/chunks/ae7c1e34ed1288773ec2.js +1 -0
- package/assets/esri/core/workers/chunks/ae9ebc0c0553e57e85ba.js +1 -0
- package/assets/esri/core/workers/chunks/{49ed3ab9bd6d7c52e864.js → af41dcc8006cd0f451c2.js} +1 -1
- package/assets/esri/core/workers/chunks/b199508eef1eeee72854.js +1 -0
- package/assets/esri/core/workers/chunks/b715fa857391931c04b9.js +1 -0
- package/assets/esri/core/workers/chunks/c144e00dfe6d63eaa2b1.js +1 -0
- package/assets/esri/core/workers/chunks/c150cd2a82260495e9de.js +1 -0
- package/assets/esri/core/workers/chunks/{2cbab0c078d0b844934c.js → c3c70dad8c8a93953237.js} +1 -1
- package/assets/esri/core/workers/chunks/c4425d5227f7e2379b0f.js +1 -0
- package/assets/esri/core/workers/chunks/c837379b36cf716d6215.js +1 -0
- package/assets/esri/core/workers/chunks/c849e3e151d78a061bf0.js +1 -0
- package/assets/esri/core/workers/chunks/{d2eb3802fa003c2d497e.js → caa5676636b06d743623.js} +1 -1
- package/assets/esri/core/workers/chunks/cb83fcfff8731c88c108.js +1 -0
- package/assets/esri/core/workers/chunks/cc366e4df91cf516d1b9.js +1 -0
- package/assets/esri/core/workers/chunks/ccd3f9b52006cd7dd11e.js +1 -0
- package/assets/esri/core/workers/chunks/d59aeb46bf2fb0931a9b.js +1 -0
- package/assets/esri/core/workers/chunks/{4ba34124054752b363c0.js → d65c30cd787b287833fb.js} +1 -1
- package/assets/esri/core/workers/chunks/d72d44df7e117e26e717.js +1 -0
- package/assets/esri/core/workers/chunks/e22cdfce2a0583f3cc50.js +1 -0
- package/assets/esri/core/workers/chunks/ee277dd58aa69281163f.js +1 -0
- package/assets/esri/core/workers/chunks/f086993f8744209d761f.js +1 -0
- package/assets/esri/core/workers/chunks/{8d49c79e549e90371303.js → fa2d836d4a844b26b84e.js} +1 -1
- package/assets/esri/core/workers/chunks/fb5b852d0f72df014377.js +1 -0
- package/assets/esri/core/workers/chunks/fb65796296b0422cf266.js +1 -0
- package/assets/esri/core/workers/chunks/fde544c090cc04581536.js +1 -0
- package/assets/esri/core/workers/chunks/fe2c48de24b25c45b3e7.js +1 -0
- package/chunks/CheckerBoard.glsl.js +3 -3
- package/chunks/ColorMaterial.glsl.js +3 -3
- package/chunks/ComponentShader.glsl.js +2 -2
- package/chunks/DefaultMaterial.glsl.js +5 -5
- package/chunks/ImageMaterial.glsl.js +1 -1
- package/chunks/LineMarker.glsl.js +4 -4
- package/chunks/Path.glsl.js +2 -2
- package/chunks/Pattern.glsl.js +3 -3
- package/chunks/Precipitation.glsl.js +1 -1
- package/chunks/RealisticTree.glsl.js +6 -6
- package/chunks/RibbonLine.glsl.js +1 -1
- package/chunks/ShadedColorMaterial.glsl.js +7 -7
- package/chunks/WaterSurface.glsl.js +3 -3
- package/chunks/vec32.js +1 -1
- package/colorUtils.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/libs/gl-matrix-2/vec3.js +1 -1
- package/geometry/support/float16.js +1 -1
- package/geometry/support/meshUtils/merge.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/interfaces.d.ts +13 -6
- package/layers/effects/parser.js +1 -1
- package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +1 -1
- package/package.json +2 -2
- package/support/revision.js +1 -1
- package/symbols/support/Symbol3DEmissive.js +5 -0
- package/symbols/support/Symbol3DFillMaterial.js +1 -1
- package/symbols/support/Symbol3DMaterial.js +1 -1
- package/symbols/support/materialUtils.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleProperty.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientStrokeShader.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
- package/views/3d/analysis/Viewshed/ScaleOrientManipulation.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +6 -5
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
- package/views/3d/webgl-engine/lib/triangleIntersectionUtils.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +8 -8
- package/views/SceneView.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/interactive/SegmentLabels.js +1 -1
- package/views/interactive/coordinateHelper.js +1 -1
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/GridSnappingEngine.js +1 -1
- package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
- package/views/support/geometry3dUtils.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/RenderbufferDescriptor.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/TextureDescriptor.js +1 -1
- package/assets/esri/core/workers/chunks/066844a51cd22cbef0e6.js +0 -1
- package/assets/esri/core/workers/chunks/067dda58592fbf4fb812.js +0 -1
- package/assets/esri/core/workers/chunks/0a0e5d699ddb7052c5c0.js +0 -1
- package/assets/esri/core/workers/chunks/1014513c0ec85f9414a4.js +0 -1
- package/assets/esri/core/workers/chunks/1072b4f37eacbbfda2c8.js +0 -1
- package/assets/esri/core/workers/chunks/114599ed0752d9a70eef.js +0 -1
- package/assets/esri/core/workers/chunks/19e83b184d8b4d0b3007.js +0 -1
- package/assets/esri/core/workers/chunks/23de8aeed5b82c682cbe.js +0 -1
- package/assets/esri/core/workers/chunks/25ef080163f3f795911a.js +0 -1
- package/assets/esri/core/workers/chunks/277b61af8982092a4c81.js +0 -1
- package/assets/esri/core/workers/chunks/37e4f588a6896f98bce3.js +0 -1
- package/assets/esri/core/workers/chunks/3b7284516a0e34a9e85e.js +0 -1
- package/assets/esri/core/workers/chunks/3f6dc811b5d515c2725c.js +0 -1
- package/assets/esri/core/workers/chunks/4275dcec730a11173661.js +0 -1
- package/assets/esri/core/workers/chunks/4403b3f08907e88d0d91.js +0 -1
- package/assets/esri/core/workers/chunks/4523ba4a3c8987abca56.js +0 -1
- package/assets/esri/core/workers/chunks/47bbfc10c2a3b9e4bdd6.js +0 -1
- package/assets/esri/core/workers/chunks/4baef5262ce401bf81bb.js +0 -1
- package/assets/esri/core/workers/chunks/4e3b60156bee3b8b3367.js +0 -1
- package/assets/esri/core/workers/chunks/519028f42b817d3e9933.js +0 -1
- package/assets/esri/core/workers/chunks/61737e442b1f8e86164e.js +0 -1
- package/assets/esri/core/workers/chunks/705c1ebb327f680f8519.js +0 -1
- package/assets/esri/core/workers/chunks/7099564a8853b81ba181.js +0 -1
- package/assets/esri/core/workers/chunks/72d7e45e7eb28f2cc0b0.js +0 -1
- package/assets/esri/core/workers/chunks/72f4cea853ce9fcf2cb6.js +0 -1
- package/assets/esri/core/workers/chunks/759c12b0715279e3c0f6.js +0 -1
- package/assets/esri/core/workers/chunks/7655be1470ce39f0e494.js +0 -1
- package/assets/esri/core/workers/chunks/796cf1c2ca9955595836.js +0 -1
- package/assets/esri/core/workers/chunks/7ccc02a4ec6d3552ecca.js +0 -1
- package/assets/esri/core/workers/chunks/80427cd9f0c2e07f21c3.js +0 -1
- package/assets/esri/core/workers/chunks/8221f2e540abe1e0f048.js +0 -1
- package/assets/esri/core/workers/chunks/82353e59ac6d909dcf41.js +0 -1
- package/assets/esri/core/workers/chunks/86931186095c23e47c0c.js +0 -1
- package/assets/esri/core/workers/chunks/8f35416a5036897d6289.js +0 -1
- package/assets/esri/core/workers/chunks/8fecd1337d84c26c692b.js +0 -1
- package/assets/esri/core/workers/chunks/9050dad7e4f093568026.js +0 -1
- package/assets/esri/core/workers/chunks/9643a9516783e8c32180.js +0 -1
- package/assets/esri/core/workers/chunks/9e156e135f34f9b06032.js +0 -1
- package/assets/esri/core/workers/chunks/a3421383e48379012c9c.js +0 -1
- package/assets/esri/core/workers/chunks/a91f2d1deb950f46ad09.js +0 -1
- package/assets/esri/core/workers/chunks/b4a1f3f3a036226d6810.js +0 -1
- package/assets/esri/core/workers/chunks/bd0dbad694ce5531deab.js +0 -1
- package/assets/esri/core/workers/chunks/c6580fdcdc33153008b0.js +0 -1
- package/assets/esri/core/workers/chunks/c68c68e918c72932b247.js +0 -1
- package/assets/esri/core/workers/chunks/cc307d34a68e44e3cbc5.js +0 -1
- package/assets/esri/core/workers/chunks/d3b0117ad9232e36f785.js +0 -1
- package/assets/esri/core/workers/chunks/d46c82a55219b27c301b.js +0 -1
- package/assets/esri/core/workers/chunks/d89f105b8a0b13dd8e5f.js +0 -1
- package/assets/esri/core/workers/chunks/daa54c8a317c27881763.js +0 -1
- package/assets/esri/core/workers/chunks/e08bff9f8247909776a4.js +0 -1
- package/assets/esri/core/workers/chunks/e15c612caadf7bac4ab9.js +0 -1
- package/assets/esri/core/workers/chunks/e5aff9b10877fb04d6de.js +0 -1
- package/assets/esri/core/workers/chunks/e792603b7cc3ddd133f3.js +0 -1
- package/assets/esri/core/workers/chunks/eaead9e927ebadcf2cc3.js +0 -1
- package/assets/esri/core/workers/chunks/ed517687b3728fd2eb64.js +0 -1
- package/assets/esri/core/workers/chunks/f41a9ceb8e49baafe9fa.js +0 -1
- package/assets/esri/core/workers/chunks/f5fcba6ca6f43bf1d65d.js +0 -1
- package/assets/esri/core/workers/chunks/f7d33d18bf1bd4db9df8.js +0 -1
- package/assets/esri/core/workers/chunks/f9396af9cbfd165e72e2.js +0 -1
|
@@ -299,7 +299,7 @@ vec2 pixelSz = vec2(1.0) / widthHeight;
|
|
|
299
299
|
vec2 ij = floor((xy + 0.5 * pixelSz) * widthHeight) * pixelSz;
|
|
300
300
|
vec2 result = (ij * 2.0 - vec2(1.0)) * clipCoord.w;
|
|
301
301
|
return vec4(result, clipCoord.zw);
|
|
302
|
-
}`)}},51624:(e,t,r)=>{r.d(t,{A:()=>u});var n,i,s=r(44208),a=r(69397),o=r(93687);(i=n||(n={}))[i.varint=0]="varint",i[i.fixed64=1]="fixed64",i[i.delimited=2]="delimited",i[i.fixed32=5]="fixed32",i[i.unknown=99]="unknown";const l=4294967296,c=new TextDecoder("utf-8"),d=(0,s.A)("safari")||(0,s.A)("ios")?6:(0,s.A)("ff")?12:32;class u{constructor(e,t,r=0,i=(e?e.byteLength:0)){this._tag=0,this._dataType=n.unknown,this._init(e,t,r,i)}_init(e,t,r,n){this._data=e,this._dataView=t,this._pos=r,this._end=n}get usedMemory(){return 64+(0,a.Qf)(this._data)}asUnsafe(){return this}clone(){return new u(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getUint32(t+4,!0)*l;return this._skip(8),r}getSFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getInt32(t+4,!0)*l;return this._skip(8),r}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,r=this._toString(this._data,t,t+e);return this._skip(e),r}getBytes(){const e=this._getLength(),t=this._pos,r=this._toBytes(this._data,t,t+e);return this._skip(e),r}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,r,n){const i=this.getMessage(),s=e(i,t,r,n);return i.release(),s}processMessage(e){const t=this.getMessage(),r=e(t);return t.release(),r}getMessage(){const e=this._getLength(),t=u.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){u.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case n.varint:this._decodeVarint();break;case n.fixed64:this._skip(8);break;case n.delimited:this._skip(this._getLength());break;case n.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,r=0,n=0;if(this._end-t>=10)do{if(n=e[t++],r|=127&n,!(128&n))break;if(n=e[t++],r|=(127&n)<<7,!(128&n))break;if(n=e[t++],r|=(127&n)<<14,!(128&n))break;if(n=e[t++],r|=(127&n)<<21,!(128&n))break;if(n=e[t++],r+=268435456*(127&n),!(128&n))break;if(n=e[t++],r+=34359738368*(127&n),!(128&n))break;if(n=e[t++],r+=4398046511104*(127&n),!(128&n))break;if(n=e[t++],r+=562949953421312*(127&n),!(128&n))break;if(n=e[t++],r+=72057594037927940*(127&n),!(128&n))break;if(n=e[t++],r+=0x8000000000000000*(127&n),!(128&n))break;throw new Error("Varint too long!")}while(0);else{let i=1;for(;t!==this._end&&(n=e[t],128&n);)++t,r+=(127&n)*i,i*=128;if(t===this._end)throw new Error("Varint overrun!");++t,r+=n*i}return this._pos=t,r}_decodeSVarint(){const e=this._data;let t,r=0,n=0;const i=1&e[this._pos];if(n=e[this._pos++],r|=127&n,!(128&n))return i?-(r+1)/2:r/2;if(n=e[this._pos++],r|=(127&n)<<7,!(128&n))return i?-(r+1)/2:r/2;if(n=e[this._pos++],r|=(127&n)<<14,!(128&n))return i?-(r+1)/2:r/2;if(n=e[this._pos++],r|=(127&n)<<21,!(128&n))return i?-(r+1)/2:r/2;if(n=e[this._pos++],r+=268435456*(127&n),!(128&n))return i?-(r+1)/2:r/2;if(n=e[this._pos++],r+=34359738368*(127&n),!(128&n))return i?-(r+1)/2:r/2;if(n=e[this._pos++],r+=4398046511104*(127&n),!(128&n))return i?-(r+1)/2:r/2;if(t=BigInt(r),n=e[this._pos++],t+=0x2000000000000n*BigInt(127&n),!(128&n))return Number(i?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x100000000000000n*BigInt(127&n),!(128&n))return Number(i?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x8000000000000000n*BigInt(127&n),!(128&n))return Number(i?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(this._dataType!==n.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,r){if((r=Math.min(this._end,r))-t>d){const n=e.subarray(t,r);return c.decode(n)}let n="",i="";for(let s=t;s<r;++s){const t=e[s];128&t?i+="%"+t.toString(16):(n+=decodeURIComponent(i)+String.fromCharCode(t),i="")}return i.length&&(n+=decodeURIComponent(i)),n}_toBytes(e,t,r){return r=Math.min(this._end,r),new Uint8Array(e.buffer,t,r-t)}static{this.pool=new o.A(u,void 0,(e=>{e._data=null,e._dataView=null}))}}},53177:(e,t,r)=>{r.d(t,{A:()=>h});var n,i=r(90237),s=r(4718),a=r(10107),o=(r(44208),r(53966),r(93223)),l=r(40608),c=r(39357),d=r(76357);let u=class extends d.A{static{n=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new n({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,i._)([(0,a.MZ)({type:[c.H],json:{write:{isRequired:!0}}})],u.prototype,"codedValues",void 0),(0,i._)([(0,o.e)({codedValue:"coded-value"})],u.prototype,"type",void 0),u=n=(0,i._)([(0,l.$)("esri.layers.support.CodedValueDomain")],u);const h=u},53655:(e,t,r)=>{r.d(t,{SH:()=>O,ae:()=>S,cn:()=>_});var n=r(49186),i=r(51624),s=r(92722),a=r(69418);const o=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],l=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],c=["upperLeft","lowerLeft"];function d(e){return e>=o.length?null:o[e]}function u(e){return e>=l.length?null:l[e]}function h(e){return e>=c.length?null:c[e]}function f(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function p(e,t,r){const n=e.asUnsafe(),i=t.createPointGeometry(r);for(;n.next();)switch(n.tag()){case 3:{const e=n.getUInt32(),r=n.pos()+e;let s=0;for(;n.pos()<r;)t.addCoordinatePoint(i,n.getSInt64(),s++);break}default:n.skip()}return i}function m(e,t,r){const n=e.asUnsafe(),i=t.createGeometry(r),s=2+(r.hasZ?1:0)+(r.hasM?1:0);for(;n.next();)switch(n.tag()){case 2:{const e=n.getUInt32(),r=n.pos()+e;let s=0;for(;n.pos()<r;)t.addLength(i,n.getUInt32(),s++);break}case 3:{const e=n.getUInt32(),r=n.pos()+e;let a=0;for(t.allocateCoordinates(i);n.pos()<r;)t.addCoordinate(i,n.getSInt64(),a),a++,a===s&&(a=0);break}default:n.skip()}return i}function g(e){const t=e.asUnsafe(),r=new s.A;let n="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)r.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)r.coords.push(t.getSInt64());break}case 1:n=a.z[t.getEnum()];break;default:t.skip()}return{queryGeometry:r,queryGeometryType:n}}function y(e){const t=e.asUnsafe();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.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function _(e){const t=e.asUnsafe(),r={type:d(0)};for(;t.next();)switch(t.tag()){case 1:r.name=t.getString();break;case 2:r.type=d(t.getEnum());break;case 3:r.alias=t.getString();break;case 4:r.sqlType=u(t.getEnum());break;case 5:default:t.skip();break;case 6:r.defaultValue=t.getString()}return r}function b(e){const t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.name=r.getString();break;case 2:t.isSystemMaintained=r.getBool();break;default:r.skip()}return t}function v(e,t,r,n){const i=t.createFeature(r);let s=0;for(;e.next();)switch(e.tag()){case 1:{const t=n[s++].name;i.attributes[t]=e.processMessage(y);break}case 2:i.geometry=e.processMessageWithArgs(m,t,r);break;case 4:i.centroid=e.processMessageWithArgs(p,t,r);break;default:e.skip()}return i}function x(e){const t=[1,1,1,1],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function w(e){const t=[0,0,0,0],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function S(e){const t={originPosition:h(0)},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.originPosition=h(r.getEnum());break;case 2:t.scale=r.processMessage(x);break;case 3:t.translate=r.processMessage(w);break;default:r.skip()}return t}function A(e){const t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.shapeAreaFieldName=r.getString();break;case 2:t.shapeLengthFieldName=r.getString();break;case 3:t.units=r.getString();break;default:r.skip()}return t}function C(e,t){const r=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:r.wkid=e.getUInt32();break;case 5:r.wkt=e.getString();break;case 2:r.latestWkid=e.getUInt32();break;case 3:r.vcsWkid=e.getUInt32();break;case 4:r.latestVcsWkid=e.getUInt32();break;default:e.skip()}return r}function I(e,t){const r=t.createFeatureResult(),n=e.asUnsafe();r.geometryType=f(t,0);let i=!1;for(;n.next();)switch(n.tag()){case 1:r.objectIdFieldName=n.getString();break;case 3:r.globalIdFieldName=n.getString();break;case 4:r.geohashFieldName=n.getString();break;case 5:r.geometryProperties=n.processMessage(A);break;case 7:r.geometryType=f(t,n.getEnum());break;case 8:r.spatialReference=n.processMessageWithArgs(C,t);break;case 10:r.hasZ=n.getBool();break;case 11:r.hasM=n.getBool();break;case 12:r.transform=n.processMessage(S);break;case 9:r.exceededTransferLimit=n.getBool();break;case 13:t.addField(r,n.processMessage(_));break;case 15:i||(t.prepareFeatures(r),i=!0),t.addFeature(r,n.processMessageWithArgs(v,t,r,r.fields));break;case 2:r.uniqueIdField=n.processMessage(b);break;default:n.skip()}return t.finishFeatureResult(r),r}function T(e,t){const r={};let n=null;for(;e.next();)switch(e.tag()){case 4:n=e.processMessageWithArgs(g);break;case 1:r.featureResult=e.processMessageWithArgs(I,t);break;default:e.skip()}return null!=n&&r.featureResult&&t.addQueryGeometry(r,n),r}function O(e,t){try{const r=2,n=new i.A(new Uint8Array(e),new DataView(e)),s={};for(;n.next();)n.tag()===r?s.queryResult=n.processMessageWithArgs(T,t):n.skip();return s}catch(e){throw new n.A("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},58501:(e,t,r)=>{r.d(t,{q:()=>i});var n=r(62815);function i(e,t,r){if(!r?.features||!r.hasZ)return;const i=(0,n.N)(r.geometryType,t,e.outSpatialReference);if(null!=i)for(const e of r.features)i(e.geometry)}},63578:(e,t,r)=>{r.d(t,{I:()=>a});var n=r(47522),i=r(96598),s=r(31821);function a(e,t){const{vertex:r,fragment:a}=e;e.include(i.Z,t),r.include(n.K),r.main.add(s.H`vec4 posProjCenter;
|
|
302
|
+
}`)}},51624:(e,t,r)=>{r.d(t,{A:()=>u});var n,i,s=r(44208),a=r(69397),o=r(93687);(i=n||(n={}))[i.varint=0]="varint",i[i.fixed64=1]="fixed64",i[i.delimited=2]="delimited",i[i.fixed32=5]="fixed32",i[i.unknown=99]="unknown";const l=4294967296,c=new TextDecoder("utf-8"),d=(0,s.A)("safari")||(0,s.A)("ios")?6:(0,s.A)("ff")?12:32;class u{constructor(e,t,r=0,i=(e?e.byteLength:0)){this._tag=0,this._dataType=n.unknown,this._init(e,t,r,i)}_init(e,t,r,n){this._data=e,this._dataView=t,this._pos=r,this._end=n}get usedMemory(){return 64+(0,a.Qf)(this._data)}asUnsafe(){return this}clone(){return new u(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getUint32(t+4,!0)*l;return this._skip(8),r}getSFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getInt32(t+4,!0)*l;return this._skip(8),r}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,r=this._toString(this._data,t,t+e);return this._skip(e),r}getBytes(){const e=this._getLength(),t=this._pos,r=this._toBytes(this._data,t,t+e);return this._skip(e),r}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,r,n){const i=this.getMessage(),s=e(i,t,r,n);return i.release(),s}processMessage(e){const t=this.getMessage(),r=e(t);return t.release(),r}getMessage(){const e=this._getLength(),t=u.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){u.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case n.varint:this._decodeVarint();break;case n.fixed64:this._skip(8);break;case n.delimited:this._skip(this._getLength());break;case n.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,r=0,n=0;if(this._end-t>=10)do{if(n=e[t++],r|=127&n,!(128&n))break;if(n=e[t++],r|=(127&n)<<7,!(128&n))break;if(n=e[t++],r|=(127&n)<<14,!(128&n))break;if(n=e[t++],r|=(127&n)<<21,!(128&n))break;if(n=e[t++],r+=268435456*(127&n),!(128&n))break;if(n=e[t++],r+=34359738368*(127&n),!(128&n))break;if(n=e[t++],r+=4398046511104*(127&n),!(128&n))break;if(n=e[t++],r+=562949953421312*(127&n),!(128&n))break;if(n=e[t++],r+=72057594037927940*(127&n),!(128&n))break;if(n=e[t++],r+=0x8000000000000000*(127&n),!(128&n))break;throw new Error("Varint too long!")}while(0);else{let i=1;for(;t!==this._end&&(n=e[t],128&n);)++t,r+=(127&n)*i,i*=128;if(t===this._end)throw new Error("Varint overrun!");++t,r+=n*i}return this._pos=t,r}_decodeSVarint(){const e=this._data;let t,r=0,n=0;const i=1&e[this._pos];if(n=e[this._pos++],r|=127&n,!(128&n))return i?-(r+1)/2:r/2;if(n=e[this._pos++],r|=(127&n)<<7,!(128&n))return i?-(r+1)/2:r/2;if(n=e[this._pos++],r|=(127&n)<<14,!(128&n))return i?-(r+1)/2:r/2;if(n=e[this._pos++],r|=(127&n)<<21,!(128&n))return i?-(r+1)/2:r/2;if(n=e[this._pos++],r+=268435456*(127&n),!(128&n))return i?-(r+1)/2:r/2;if(n=e[this._pos++],r+=34359738368*(127&n),!(128&n))return i?-(r+1)/2:r/2;if(n=e[this._pos++],r+=4398046511104*(127&n),!(128&n))return i?-(r+1)/2:r/2;if(t=BigInt(r),n=e[this._pos++],t+=0x2000000000000n*BigInt(127&n),!(128&n))return Number(i?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x100000000000000n*BigInt(127&n),!(128&n))return Number(i?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x8000000000000000n*BigInt(127&n),!(128&n))return Number(i?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(this._dataType!==n.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,r){if((r=Math.min(this._end,r))-t>d){const n=e.subarray(t,r);return c.decode(n)}let n="",i="";for(let s=t;s<r;++s){const t=e[s];128&t?i+="%"+t.toString(16):(n+=decodeURIComponent(i)+String.fromCharCode(t),i="")}return i.length&&(n+=decodeURIComponent(i)),n}_toBytes(e,t,r){return r=Math.min(this._end,r),new Uint8Array(e.buffer,t,r-t)}static{this.pool=new o.A(u,void 0,(e=>{e._data=null,e._dataView=null}))}}},53177:(e,t,r)=>{r.d(t,{A:()=>h});var n,i=r(90237),s=r(4718),a=r(10107),o=(r(44208),r(53966),r(93223)),l=r(40608),c=r(39357),d=r(76357);let u=class extends d.A{static{n=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new n({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,i._)([(0,a.MZ)({type:[c.H],json:{write:{isRequired:!0}}})],u.prototype,"codedValues",void 0),(0,i._)([(0,o.e)({codedValue:"coded-value"})],u.prototype,"type",void 0),u=n=(0,i._)([(0,l.$)("esri.layers.support.CodedValueDomain")],u);const h=u},53655:(t,r,n)=>{n.d(r,{SH:()=>O,ae:()=>S,cn:()=>_}),n(49186);var i=n(51624),s=n(92722),a=n(69418);const o=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],l=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],c=["upperLeft","lowerLeft"];function d(e){return e>=o.length?null:o[e]}function u(e){return e>=l.length?null:l[e]}function h(e){return e>=c.length?null:c[e]}function f(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function p(e,t,r){const n=e.asUnsafe(),i=t.createPointGeometry(r);for(;n.next();)switch(n.tag()){case 3:{const e=n.getUInt32(),r=n.pos()+e;let s=0;for(;n.pos()<r;)t.addCoordinatePoint(i,n.getSInt64(),s++);break}default:n.skip()}return i}function m(e,t,r){const n=e.asUnsafe(),i=t.createGeometry(r),s=2+(r.hasZ?1:0)+(r.hasM?1:0);for(;n.next();)switch(n.tag()){case 2:{const e=n.getUInt32(),r=n.pos()+e;let s=0;for(;n.pos()<r;)t.addLength(i,n.getUInt32(),s++);break}case 3:{const e=n.getUInt32(),r=n.pos()+e;let a=0;for(t.allocateCoordinates(i);n.pos()<r;)t.addCoordinate(i,n.getSInt64(),a),a++,a===s&&(a=0);break}default:n.skip()}return i}function g(e){const t=e.asUnsafe(),r=new s.A;let n="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)r.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)r.coords.push(t.getSInt64());break}case 1:n=a.z[t.getEnum()];break;default:t.skip()}return{queryGeometry:r,queryGeometryType:n}}function y(e){const t=e.asUnsafe();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.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function _(e){const t=e.asUnsafe(),r={type:d(0)};for(;t.next();)switch(t.tag()){case 1:r.name=t.getString();break;case 2:r.type=d(t.getEnum());break;case 3:r.alias=t.getString();break;case 4:r.sqlType=u(t.getEnum());break;case 5:default:t.skip();break;case 6:r.defaultValue=t.getString()}return r}function b(e){const t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.name=r.getString();break;case 2:t.isSystemMaintained=r.getBool();break;default:r.skip()}return t}function v(e,t,r,n){const i=t.createFeature(r);let s=0;for(;e.next();)switch(e.tag()){case 1:{const t=n[s++].name;i.attributes[t]=e.processMessage(y);break}case 2:i.geometry=e.processMessageWithArgs(m,t,r);break;case 4:i.centroid=e.processMessageWithArgs(p,t,r);break;default:e.skip()}return i}function x(e){const t=[1,1,1,1],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function w(e){const t=[0,0,0,0],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function S(e){const t={originPosition:h(0)},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.originPosition=h(r.getEnum());break;case 2:t.scale=r.processMessage(x);break;case 3:t.translate=r.processMessage(w);break;default:r.skip()}return t}function A(e){const t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.shapeAreaFieldName=r.getString();break;case 2:t.shapeLengthFieldName=r.getString();break;case 3:t.units=r.getString();break;default:r.skip()}return t}function C(e,t){const r=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:r.wkid=e.getUInt32();break;case 5:r.wkt=e.getString();break;case 2:r.latestWkid=e.getUInt32();break;case 3:r.vcsWkid=e.getUInt32();break;case 4:r.latestVcsWkid=e.getUInt32();break;default:e.skip()}return r}function I(e,t){const r=t.createFeatureResult(),n=e.asUnsafe();r.geometryType=f(t,0);let i=!1;for(;n.next();)switch(n.tag()){case 1:r.objectIdFieldName=n.getString();break;case 3:r.globalIdFieldName=n.getString();break;case 4:r.geohashFieldName=n.getString();break;case 5:r.geometryProperties=n.processMessage(A);break;case 7:r.geometryType=f(t,n.getEnum());break;case 8:r.spatialReference=n.processMessageWithArgs(C,t);break;case 10:r.hasZ=n.getBool();break;case 11:r.hasM=n.getBool();break;case 12:r.transform=n.processMessage(S);break;case 9:r.exceededTransferLimit=n.getBool();break;case 13:t.addField(r,n.processMessage(_));break;case 15:i||(t.prepareFeatures(r),i=!0),t.addFeature(r,n.processMessageWithArgs(v,t,r,r.fields));break;case 2:r.uniqueIdField=n.processMessage(b);break;default:n.skip()}return t.finishFeatureResult(r),r}function T(e,t){const r={};let n=null;for(;e.next();)switch(e.tag()){case 4:n=e.processMessageWithArgs(g);break;case 1:r.featureResult=e.processMessageWithArgs(I,t);break;default:e.skip()}return null!=n&&r.featureResult&&t.addQueryGeometry(r,n),r}function O(t,r){try{const e=2,n=new i.A(new Uint8Array(t),new DataView(t)),s={};for(;n.next();)n.tag()===e?s.queryResult=n.processMessageWithArgs(T,r):n.skip();return s}catch(t){throw new e("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:t})}}},58501:(e,t,r)=>{r.d(t,{q:()=>i});var n=r(62815);function i(e,t,r){if(!r?.features||!r.hasZ)return;const i=(0,n.N)(r.geometryType,t,e.outSpatialReference);if(null!=i)for(const e of r.features)i(e.geometry)}},63578:(e,t,r)=>{r.d(t,{I:()=>a});var n=r(47522),i=r(96598),s=r(31821);function a(e,t){const{vertex:r,fragment:a}=e;e.include(i.Z,t),r.include(n.K),r.main.add(s.H`vec4 posProjCenter;
|
|
303
303
|
if (dot(position, position) > 0.0) {
|
|
304
304
|
ProjectHUDAux projectAux;
|
|
305
305
|
vec4 posProj = projectPositionHUD(projectAux);
|
|
@@ -316,4 +316,4 @@ gl_Position = posProjCenter;
|
|
|
316
316
|
gl_PointSize = 1.0;`),a.main.add(s.H`fragColor = vec4(1);
|
|
317
317
|
if(discardByTerrainDepth()) {
|
|
318
318
|
fragColor.g = 0.5;
|
|
319
|
-
}`)}},66208:(e,t,r)=>{r.d(t,{m:()=>i});var n=r(53655);function i(e,t){const r=(0,n.SH)(e,t),i=r.queryResult.featureResult,s=r.queryResult.queryGeometry,a=r.queryResult.queryGeometryType;if(i&&i.features&&i.features.length&&i.objectIdFieldName){const e=i.objectIdFieldName;for(const t of i.features)t.attributes&&(t.objectId=t.attributes[e])}return i&&(i.queryGeometry=s,i.queryGeometryType=a),i}},66344:(e,t,r)=>{var n,i;r.d(t,{q:()=>l}),(i=n||(n={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME";class s{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear()}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const r=this._db.get(e.id+t);return r?.size??0}put(e,t,r,i,s){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==r&&this._notifyRemove(t,o.entry,o.size,n.ALL)),i>this._maxSize)return void this._notifyRemove(t,r,i,n.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return console.warn(`Refusing to cache entry with size ${i} for key ${t}`),void this._notifyRemove(t,r,0,n.ALL);const l=1+Math.max(s,-4)- -3;this._db.set(t,new a(r,i,l)),this._size+=i,e.size+=i,this._checkSize()}updateSize(e,t,r,i){t=e.id+t;const s=this._db.get(t);if(s&&s.entry===r){for(this._size-=s.size,e.size-=s.size;i>this._maxSize;){const e=this._notifyRemove(t,r,i,n.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}s.size=i,this._size+=i,e.size+=i,this._checkSize()}}pop(e,t){t=e.id+t;const r=this._db.get(t);if(r)return this._size-=r.size,e.size-=r.size,this._db.delete(t),++this._hit,r.entry;++this._miss}get(e,t){t=e.id+t;const r=this._db.get(t);if(void 0!==r)return this._db.delete(t),r.lives=r.lifetime,this._db.set(t,r),++this._hit,r.entry;++this._miss}peek(e,t){const r=this._db.get(e.id+t);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},r=new Array;this._db.forEach(((e,n)=>{const i=e.lifetime;r[i]=(r[i]||0)+e.size,this._users.forEach((r=>{const{id:i,name:s}=r;if(n.startsWith(i)){const r=t[s]||0;t[s]=r+e.size}}))}));const n={};this._users.forEach((e=>{const r=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const i=t[r]||0;t[r]=i,n[r]=Math.round(100*e.hitRate)+"%"}else n[r]="0%"}));const i=Object.keys(t);i.sort(((e,r)=>t[r]-t[e])),i.forEach((r=>e[r]=Math.round(t[r]/2**20)+"MB / "+n[r]));for(let t=r.length-1;t>=0;--t){const n=r[t];n&&(e["Priority "+(t+-3-1)]=Math.round(n/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,r)=>{r.startsWith(t)&&(this._size-=e.size,this._db.delete(r),this._notifyRemove(r,e.entry,e.size,n.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,n.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,r,n){const i=this._users.get(e.split(o)[0])?.removeFunc,s=i?.(t,n,r);return"number"==typeof s?s:null}_checkSize(){this._sizeLimits.forEach(((e,t)=>this._checkSizeLimits(e,t))),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const r=t??this;if(r.size<=e)return;const n=t?.id;let i=!0;for(;i;){i=!1;for(const[s,a]of this._db)if(0===a.lifetime&&(!n||s.startsWith(n))){const n=t??this._users.get(s.split(o)[0]);if(this._purgeItem(s,a,n),r.size<=.9*e)return;i||=this._db.has(s)}}for(const[i,s]of this._db)if(!n||i.startsWith(n)){const n=t??this._users.get(i.split(o)[0]);if(this._purgeItem(i,s,n),r.size<=.9*e)return}}_purgeItem(e,t,r){if(this._db.delete(e),t.lives<=1){this._size-=t.size,r&&(r.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,n.SOME);null!=i&&i>0&&(this._size+=i,r&&(r.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class a{constructor(e,t,r){this.entry=e,this.size=t,this.lifetime=r,this.lives=r}}const o=":";class l{constructor(e,t){this.removeFunc=t,this._storage=new s,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,r=1){this._storage.put(this,e,t,r,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},67063:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Lr});var n=r(90237),i=r(65529),s=r(74887),a=r(36708),o=r(10107),l=r(44208),c=(r(53966),r(87811),r(40608)),d=r(5443),u=r(80586),h=r(16930),f=r(68298),p=r(61956),m=r(69622),g=r(4576),y=r(32587),_=r(44794),b=r(19419),v=r(69397),x=r(24326);function w(e=""){return`${e}${(0,x.c)()}`}r(37539),new Float64Array(3);class S{constructor(e,t){this._parent=e,this._subsetIndices=t,this.id=w(`featureDataSubset-${e.id}-`)}get extent(){return this._parent.extent}get featureCount(){return this._subsetIndices.length}get usedMemory(){return this._parent.usedMemory+v.qK+this._subsetIndices.byteLength}get isFullyEnabled(){for(const e of this._subsetIndices)if(!this._parent.getEnabled(e))return!1;return!0}getObjectId(e){return this._parent.getObjectId(this._subsetIndices[e])}getAttribute(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributeAsTimestamp(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributes(e){return this._parent.getAttributes(this._subsetIndices[e])}getCoordinates(e,t,r){return this._parent.getCoordinates(this._subsetIndices[e],t,r)}getOptimizedGeometry(e){return this._parent.getOptimizedGeometry(this._subsetIndices[e])}getCentroid(e,t){return this._parent.getCentroid(this._subsetIndices[e],t)}getBounds(e){return this._parent.getBounds(this._subsetIndices[e])}getBoundingBox(e){return this._parent.getBoundingBox(this._subsetIndices[e])}getObjectIdsArray(e,t,r){return this._parent.getObjectIdsArray(e,this._translatedIndices(t),r)}getCoordinatesArray(e,t,r){return this._parent.getCoordinatesArray(e,this._translatedIndices(t),r)}objectIds(e){return this._parent.objectIds(this._translatedIndices(e))}subset(e){const{_subsetIndices:t}=this,r=new Uint32Array(e.length);for(let n=0;n<r.length;++n)r[n]=t[e[n]];return new S(this._parent,r)}disableObjectIds(e){if(0===e.size)return;const{featureCount:t}=this,r=new Array;for(let n=0;n<t;++n)this.getEnabled(n)&&e.has(this.getObjectId(n))&&r.push(n);if(0!==r.length)for(const e of r)this.setEnabled(e,!1)}setEnabled(e,t){this._parent.setEnabled(this._subsetIndices[e],t)}getEnabled(e){return this._parent.getEnabled(this._subsetIndices[e])}enableAll(){const{_subsetIndices:e,_parent:t}=this;for(const r of e)t.setEnabled(r,!0)}getVisibilityArray(e,t,r){return this._parent.getVisibilityArray(e,this._translatedIndices(t),r)}enabledObjectIds(e){return this._parent.enabledObjectIds(this._translatedIndices(e))}*_translatedIndices(e){const{_subsetIndices:t}=this;if(null!=e)for(const r of e)yield t[r];else yield*t}}class A{constructor(e){this._tile=e,this.id=w(`featureData-${e.id}-`),this._enabled=new Array(e.featureCount).fill(!0)}get featureCount(){return this._tile.featureCount}get usedMemory(){return v.qK+(0,v.$B)(this.id)}get extent(){return this._tile.descriptor.extent}get isFullyEnabled(){return this._enabled.every((e=>e))}getObjectId(e){return this._tile.getObjectId(e)}getAttribute(e,t){return this._tile.getAttribute(e,t)}getAttributeAsTimestamp(e,t){return this._tile.getAttribute(e,t)}getAttributes(e){return this._tile.getAttributes(e)}getCoordinates(e,t,r){return this._tile.getCoordinates(e,t,r)}getOptimizedGeometry(e){return this._tile.getOptimizedGeometry(e)}getCentroid(e,t){return this._tile.getCentroid(e,t)}getBounds(e){return this._tile.getBounds(e)}getBoundingBox(e){return this._tile.getBoundingBox(e)}getObjectIdsArray(e,t,r){return this._tile.getObjectIdsArray(e,t,r)}getCoordinatesArray(e,t,r){return this._tile.getCoordinatesArray(e,t,r)}objectIds(e){return this._tile.objectIds(e)}subset(e){return new S(this,e)}disableObjectIds(e){if(0===e.size)return;const{_enabled:t}=this,r=new Array;for(const n of this._allFeatureIndices())t[n]&&e.has(this.getObjectId(n))&&r.push(n);if(0!==r.length)for(const e of r)t[e]=!1}setEnabled(e,t){this._enabled[e]=t}getEnabled(e){return this._enabled[e]}enableAll(){this._enabled.fill(!0)}getVisibilityArray(e,t=this._allFeatureIndices(),r=0){const{_enabled:n}=this;for(const i of t)e[r++]=Number(n[i]);return r}*enabledObjectIds(e=this._allFeatureIndices()){const{_enabled:t}=this;for(const r of e)t[r]&&(yield this.getObjectId(r))}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}}let C=class extends m.A{constructor(e){super(e),this._updatingCount=0,this.extent=null,this._tileHandles=new y.A,this._wanted=new y.A}destroy(){for(const e of this._tileHandles.values())e.abort();this._tileHandles.clear(),this._wanted.clear()}get updating(){return this._updatingCount>0}get _boundingRect(){const{extent:e}=this;return null==e?null:(0,b.VY)(e)}get _missingTiles(){const e=new Array,t=this._wanted;for(const r of this._tileHandles.values())t.has(r.id)&&!O(r)&&e.push(r);return e}async onTileTreeChange(e){++this._updatingCount;try{const{added:t,removed:r}=e,n=this._tileHandles,{_boundingRect:i}=this,s=null!=i?t.filter((e=>(0,b.HY)(i,e.extent))):t,a=this._wanted,o=new Array;for(const e of r){const{id:r}=e;if(a.delete(r),t.some((t=>I(t,e)||I(e,t))))continue;const i=n.get(r);null!=i&&o.push(this._removeTile(i))}for(const e of s)a.set(e.id,e),o.push(this._addTile(e));await Promise.allSettled(o)}finally{--this._updatingCount}}async _removeTile(e){this._tileHandles.delete(e.id),this._validate(),e.abort();const{featureData:t}=e,r=new R(e.untilSettled(),null!=t?this.createRemoveFeatureDataCommand(t.id):null);e.nextEvent=null;const{command:n}=await r.getCommand();n?.execute()}async _addTile(e){const{_tileHandles:t}=this,r=t.get(e.id);if(null!=r)return!O(r)||r.featureData.isFullyEnabled||(r.featureData.enableAll(),r.nextEvent=this._onTileLoad(r)),void await r.untilSettled();const n=new T(e);this._tileHandles.set(n.id,n);const i=this.loadTile(e,n.signal);n.nextEvent=i;const a=await i;if(n.aborted)throw(0,s.NK)();n.featureData=new A(a),function(e){if(!O(e))throw new Error}(n),n.nextEvent=this._onTileLoad(n),await n.untilSettled()}async _onTileLoad(e){const{_wanted:t,_tileHandles:r,_missingTiles:n}=this,i=e.descriptor,s=new Array,a=new Array,o=new Set;for(const l of r.values()){if(l===e)continue;const{descriptor:c,id:d}=l;if(t.has(d)||n.some((({descriptor:e})=>I(e,c)||I(c,e)))){if(O(l)){if(I(i,c)){const e=l.featureData;for(const t of e.objectIds())o.add(t)}if(I(c,i)){const t=e.featureData,r=new Set(t.objectIds()),{featureData:n}=l;n.disableObjectIds(r);const i=AbortSignal.any([l.signal,e.signal]),o=l.untilSettled();s.push(new R(o,this.createUpdateFeatureDataVisibilityCommand(n),i)),a.push(l),this._validateRemoval(n,r)}}}else{l.abort(),r.delete(d);const{featureData:e}=l;null!=e&&s.push(new R(l.untilSettled(),this.createRemoveFeatureDataCommand(e.id))),l.nextEvent=null}}o.size>0&&(e.featureData.disableObjectIds(o),this._validateRemoval(e.featureData,o)),this._validate(),s.push(new R(e.untilSettled(),this.createAddFeatureDataCommand(e.featureData,e.signal),e.signal)),a.push(e);const l=this._joinCommands(s);for(const e of a)e.nextEvent=l;await l}async _joinCommands(e){const t=(await Promise.allSettled(e.map((async e=>e.getCommand())))).map((e=>"fulfilled"!==e.status||e.value.signal?.aborted?null:e.value.command)).filter(g.Ru);0!==t.length&&t.reduce(((e,t)=>(e.append(t),e))).execute()}_validate(){if(!(0,l.A)("feature-pipeline-3d-test-validation"))return;const e=new Array;for(const t of this._tileHandles.values()){if(!O(t))continue;const{featureData:r}=t;e.push({featureData:r,objectIds:new Set(r.enabledObjectIds())})}for(let t=0;t<e.length;++t){const{featureData:r,objectIds:n}=e[t];for(let i=t+1;i<e.length;++i){const{featureData:t,objectIds:s}=e[i];for(const e of s)if(n.has(e))throw new Error(`${r.id} and ${t.id} both contain ${e}.`)}}}_validateRemoval(e,t){if((0,l.A)("feature-pipeline-3d-test-validation"))for(const r of e.enabledObjectIds())if(t.has(r))throw new Error(`Failed to remove ${r} from ${e.id}!`)}};function I({lij:[e,t,r]},{lij:[n,i,s]}){const a=n-e;return a>=0&&t===i>>a&&r===s>>a}(0,n._)([(0,o.MZ)()],C.prototype,"updating",null),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"loadTile",void 0),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"createAddFeatureDataCommand",void 0),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"createRemoveFeatureDataCommand",void 0),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"createUpdateFeatureDataVisibilityCommand",void 0),(0,n._)([(0,o.MZ)()],C.prototype,"_updatingCount",void 0),(0,n._)([(0,o.MZ)()],C.prototype,"extent",void 0),(0,n._)([(0,o.MZ)()],C.prototype,"_boundingRect",null),(0,n._)([(0,o.MZ)()],C.prototype,"_missingTiles",null),C=(0,n._)([(0,c.$)("esri.views.3d.layers.graphics.pipeline.Tile3DManager")],C);class T{constructor(e){this.descriptor=e,this._controller=new AbortController,this._featureData=(0,_.v)(null),this.nextEvent=null}get id(){return this.descriptor.id}get featureData(){return this._featureData.value}set featureData(e){this._featureData.value=e}get signal(){return this._controller.signal}abort(){this._controller.abort()}get aborted(){return this._controller.signal.aborted}async untilSettled(){try{await this.nextEvent}catch(e){(0,s.zf)(e)||console.error(e)}}}function O(e){return null!=e.featureData}class R{constructor(e,t,r){this.previousEventSettled=e,this.commandPromise=t,this.signal=r}async getCommand(){const{previousEventSettled:e,commandPromise:t,signal:r}=this,[n]=await Promise.all([t,e]);if(r?.aborted)throw(0,s.NK)();return{command:n,signal:r}}}var M=r(75503),E=r(27647),P=r(92722);class z{constructor(e,t){this._index=e,this._view=t}get usedMemory(){return v.qK+v.RS}getObjectId(){return this._view.getObjectId(this._index)}getAttribute(e){return this._view.getAttribute(this._index,e)}getAttributeAsTimestamp(e){return this._view.getAttributeAsTimestamp(this._index,e)}getAttributes(){return this._view.getAttributes(this._index)}getOptimizedGeometry(){return this._view.getOptimizedGeometry(this._index)}getCentroid(e){return this._view.getCentroid(this._index,e)}getBounds(){return this._view.getBounds(this._index)}getBoundingBox(){return this._view.getBoundingBox(this._index)}cloneWithGeometry(e){return new F(this._index,this._view,e)}}class F extends z{constructor(e,t,r){super(e,t),this._geometryOverride=r}getOptimizedGeometry(){return this._geometryOverride}getCentroid(e){return(0,E.Q)(new P.A,this._geometryOverride,e.hasZ,e.hasM)}}class D{constructor(e,t){this.featureData=e,this.bounds=t}}class B{constructor(){this._tileBounds=new Map,this.events=new i.A,this.featureAdapter=j.shared}get usedMemory(){return v.qK+v.qK*this._tileBounds.size}addTile(e){const{featureCount:t}=e;if(0===t)return;const r=new M.w(9,(t=>e.getBounds(t))),n=new Array;for(let e=0;e<t;++e)n[e]=e;r.load(n),this._tileBounds.set(e.id,new D(e,r)),this.events.emit("changed")}removeTile(e){this._tileBounds.delete(e),this.events.emit("changed")}clear(){this._tileBounds.clear(),this.events.emit("changed")}forEach(e){for(const{featureData:t,bounds:r}of this._tileBounds.values())r.all((r=>{t.getEnabled(r)&&e(new z(r,t))}))}forEachInBounds(e,t){V.minX=e[0],V.minY=e[1],V.maxX=e[2],V.maxY=e[3];for(const{featureData:e,bounds:r}of this._tileBounds.values())r.search(V,(r=>{e.getEnabled(r)&&t(new z(r,e))}))}forEachBounds(e,t){for(const r of e)t(r.getBoundingBox())}getFullExtent(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;for(const{bounds:e}of this._tileBounds.values()){const{minX:s,minY:a,maxX:o,maxY:l}=e.toJSON();t=Math.min(t,s),r=Math.min(r,a),n=Math.min(n,o),i=Math.min(i,l)}return{xmin:t,ymin:r,xmax:n,ymax:i,spatialReference:e}}}class j{static{this.shared=new j}getObjectId(e){return e.getObjectId()}getAttribute(e,t){return e.getAttribute(t)}getAttributeAsTimestamp(e,t){return e.getAttributeAsTimestamp(t)}getAttributes(e){return e.getAttributes()}getGeometry(e){return e.getOptimizedGeometry()}getCentroid(e,t){return e.getCentroid(t)}cloneWithGeometry(e,t){return e.cloneWithGeometry(t)}}const V=new M.E;var k=r(80893);class U{constructor(e,t,r){this.descriptor=e,this._pages=t,this._pageSize=r;const n=v.ez+t.reduce(((e,{usedMemory:t})=>e+t),0),i=3*v.RS;this.usedMemory=v.qK+n+i,this.featureCount=t.reduce(((e,t)=>e+t.featureCount),0)}get id(){return this.descriptor.id}getObjectId(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getObjectId(r)}getAttribute(e,t){const{pageIndex:r,featurePageIndex:n}=this._translateIndex(e);return this._pages[r].getAttribute(n,t)}getAttributeAsTimestamp(e,t){const{pageIndex:r,featurePageIndex:n}=this._translateIndex(e);return this._pages[r].getAttributeAsTimestamp(n,t)}getAttributes(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getAttributes(r)}getCoordinates(e,t,r){const{pageIndex:n,featurePageIndex:i}=this._translateIndex(e);this._pages[n].getCoordinates(i,t,r)}getOptimizedGeometry(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getOptimizedGeometry(r)}getCentroid(e,t){const{pageIndex:r,featurePageIndex:n}=this._translateIndex(e);return this._pages[r].getCentroid(n,t)}getBounds(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBounds(r)}getBoundingBox(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBoundingBox(r)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){let n=r;for(const{page:r,indices:i}of this._batchPageIndices(t))n=r.getObjectIdsArray(e,i,n);return n}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){let n=r;for(const{page:r,indices:i}of this._batchPageIndices(t))n=r.getCoordinatesArray(e,i,n);return n}*objectIds(e=this._allFeatureIndices()){for(const{page:t,indices:r}of this._batchPageIndices(e))for(const e of t.objectIds(r))yield e}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_translateIndex(e){const{_pageSize:t}=this;return{pageIndex:Math.floor(e/t),featurePageIndex:e%t}}*_batchPageIndices(e){const t=new Array;{let r=0,n=new Array;for(const i of e){const{pageIndex:e,featurePageIndex:s}=this._translateIndex(i);r!==e&&(0!==n.length&&t.push({pageIndex:r,indices:n}),r=e,n=[]),n.push(s)}0!==n.length&&t.push({pageIndex:r,indices:n})}const{_pages:r}=this;for(const{pageIndex:e,indices:n}of t)yield{page:r[e],indices:n}}}var N=r(49186),L=r(51624),q=r(51850),H=r(70328),G=r(62577),$=r(95466),Y=r(53655);class W{constructor(e){this._reader=new L.A(new Uint8Array(e),new DataView(e)),this._index=function(e){for(;e.next();){if(2===e.tag())return X(e.getMessage());e.skip()}Q()}(this._reader)}get featureCount(){return this._index.featureIndices.length}get exceededTransferLimit(){return this._index.exceededTransferLimit}get usedMemory(){return this._reader.usedMemory}getObjectId(e){return this.getAttribute(e,this._index.objectIdFieldName)}getAttribute(e,t){const{_index:{fieldsIndex:r,attributeIndices:n}}=this,i=r.get(t)?.index;if(null==i)return;const s=n[e*r.fields.length+i],a=this._reader;return a.move(s),J(a)}getAttributeAsTimestamp(e,t){const r=this.getAttribute(e,t);return"string"==typeof r?new Date(r).getTime():"number"==typeof r||null==r?r:null}getAttributes(e){const{_index:{fieldsIndex:t,attributeIndices:r}}=this,n=e*t.fields.length,i=this._reader,s={};for(const e of t.fields){const t=r[n+e.index];i.move(t),s[e.name]=J(i)}return s}getCoordinates(e,t,r=0){const n=this._reader,{transform:i,featureIndices:s}=this._index,{scale:a,translate:o}=i;n.move(s[e]),this._readCoordinates(a,o,t,r)}getOptimizedGeometry(e){const t=(0,q.vt)();return this.getCoordinates(e,t),new P.A([],t)}getCentroid(e,{hasZ:t,hasM:r}){this.getCoordinates(e,K);const[n,i,s]=K,a=[n,i];return t&&(a[3]=s),r&&(a[t?4:3]=0),new P.A([],a)}getBounds(e){this.getCoordinates(e,K);const[t,r]=K,n=new M.E;return n.minX=t,n.minY=r,n.maxX=t,n.maxY=r,n}getBoundingBox(e){this.getCoordinates(e,K);const[t,r,n]=K;return(0,H.fA)(t,r,n,t,r,n)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){const n=this._reader,{objectIdFieldName:i,attributeIndices:s,fieldsIndex:a}=this._index,o=a.get(i).index,l=a.fields.length;for(const i of t){const t=s[i*l+o];n.move(t),e[r++]=J(n)}return r}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){const n=this._reader,{transform:i,featureIndices:s}=this._index,{scale:a,translate:o}=i;for(const i of t){const t=s[i];n.move(t),r=this._readCoordinates(a,o,e,r)}return r}*objectIds(e=this._allFeatureIndices()){const t=this._reader,{objectIdFieldName:r,attributeIndices:n,fieldsIndex:i}=this._index,s=i.get(r).index,a=i.fields.length;for(const r of e){const e=n[r*a+s];t.move(e),yield J(t)}}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_readCoordinates([e,t,r],[n,i,s],a,o){const l=this._reader,c=l.getLength(),d=l.pos()+c;for(;l.pos()<d&&l.next();)switch(l.tag()){case 2:{const c=l.getLength(),d=l.pos()+c;for(;l.pos()<d&&l.next();)3===l.tag()?(l.getUInt32(),a[o++]=n+e*l.getSInt64(),a[o++]=i+t*l.getSInt64(),a[o++]=s+r*l.getSInt64()):l.skip();break}default:l.skip()}return o}}function X(e){for(;e.next();){if(1===e.tag())return Z(e.getMessage());e.skip()}Q()}function Z(e){let t,r,n=!1,i=!1,s=0;const a=new Array,o=new Array,l=new Array;for(;e.next();)switch(e.tag()){case 1:r=e.getString();break;case 7:0!==e.getEnum()&&Q();break;case 9:n=e.getBool()??!1;break;case 12:t=(0,G.Q1)(e.processMessage(Y.ae));break;case 13:{const t=e.processMessage(Y.cn);t.index=s++,a.push(t);break}case 15:{o.push(e.pos());const t=e.getUInt32(),r=e.pos()+t;for(;e.pos()<r&&e.next();)1===e.tag()?(l.push(e.pos()),e.skip()):e.skip();break}case 10:i=e.getBool()??!1;break;default:e.skip()}const c=new $.A(a);return null!=t&&i&&null!=r&&c.has(r)||Q(),{transform:t,exceededTransferLimit:n,fieldsIndex:c,objectIdFieldName:r,featureIndices:o,attributeIndices:l}}function Q(){const e=new N.A("pbf-parsing-failed","Error while parsing PBF",new Error);throw console.error(e),e}function J(e){const t=e.getLength(),r=e.pos()+t;for(;e.pos()<r&&e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}const K=(0,q.vt)();class ee{constructor(e,t,r,n,i){this.spatialReference=e,this.url=r,this.objectIdField=n,this.capabilities=i;const{supportsMaxRecordCountFactor:s,maxRecordCount:a}=this.capabilities.query,o=s?4:1,l=(a??8e3)*o;this._pageSize=Math.min(8e3,l);const c=t.clone();c.cacheHint=!0,c.resultType="tile",c.outSpatialReference=e,c.returnGeometry=!0,c.returnZ=!0,c.maxRecordCountFactor=o,c.num=this._pageSize,c.outFields=[n],this._baseQuery=c}async fetch(e,t){const{spatialReference:r,_pageSize:n}=this,i=(0,b.w1)(e.extent,r),a=this._baseQuery.clone();a.geometry=i;const o=new Array;let l=0,c=!1,d=1;for(;!c;){const e=[];for(let r=0;r<d;++r)e.push(this._fetchPage(a,l++,t));const r=await Promise.all(e);(0,s.Te)(t);for(const e of r){const t=0!==e.featureCount;c||=!e.exceededTransferLimit||!t,t&&o.push(e)}d=Math.min(d+1,4)}return new U(e,o,n)}async _fetchPage(e,t,r){const n=e.clone();n.start=t*this._pageSize;const i=(await(0,k.kS)(this.url,n,{signal:r})).data;return(0,s.Te)(r),new W(i)}}var te=r(58083),re=r(9093),ne=r(97146),ie=r(24151),se=r(29920),ae=r(46540),oe=r(51768),le=r(34727),ce=r(77690),de=r(29242),ue=r(37585),he=r(48163),fe=r(38954),pe=r(91829);var me=r(13030),ge=r(78662),ye=r(26857),_e=r(1843),be=r(49255),ve=r(40268),xe=r(16943),we=r(25634),Se=r(11725),Ae=r(13464),Ce=r(77194),Ie=r(620);class Te{constructor(){this.scale=0,this.factor=0,this.minScaleFactor=0}}var Oe=r(59907),Re=r(43616),Me=r(13259),Ee=r(97220),Pe=r(98958),ze=r(59643),Fe=r(33524),De=r(63907),Be=r(90644);class je extends Pe.w{constructor(e,t){super(e,t,new Ee.$(Me.H,(()=>r.e(8241).then(r.bind(r,48241))))),this.primitiveType=t.occlusionPass?De.WR.POINTS:De.WR.TRIANGLES}initializePipeline(e){const{oitPass:t,hasPolygonOffset:r,draped:n,output:i,depthTestEnabled:s,occlusionPass:a}=e,o=t===ze.Y.NONE,l=t===ze.Y.ColorAlpha,c=i===be.V.Highlight,d=s&&!n&&!l&&!a&&!c;return(0,Be.Ey)({blending:(0,be.RN)(i)?o?Be.RC:(0,Fe.ez)(t):null,depthTest:s&&!n?{func:De.MT.LEQUAL}:null,depthWrite:d?Be.Uy:null,drawBuffers:(0,Fe.m6)(t,i),colorWrite:Be.kn,polygonOffset:r?Ve:null})}}const Ve={factor:0,units:-4};var ke=r(53466),Ue=r(22911),Ne=r(51976),Le=r(35256);class qe extends Le.E{constructor(e){super(),this.spherical=e,this.screenCenterOffsetUnitsEnabled=!1,this.occlusionTestEnabled=!0,this.signedDistanceFieldEnabled=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.vvSize=!1,this.vvColor=!1,this.hasVerticalOffset=!1,this.hasScreenSizePerspective=!1,this.hasRotation=!1,this.debugDrawLabelBorder=!1,this.hasPolygonOffset=!1,this.depthTestEnabled=!0,this.pixelSnappingEnabled=!0,this.draped=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.occlusionPass=!1,this.occludedFragmentFade=!1,this.objectAndLayerIdColorInstanced=!1,this.horizonCullingEnabled=!0,this.isFocused=!0,this.textureCoordinateType=ke.I.None,this.emissionSource=Ue.ZX.None,this.discardInvisibleFragments=!0,this.hasVvInstancing=!1}}(0,n._)([(0,Ne.W)()],qe.prototype,"screenCenterOffsetUnitsEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"occlusionTestEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"signedDistanceFieldEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"sampleSignedDistanceFieldTexelCenter",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"vvSize",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"vvColor",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasVerticalOffset",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasScreenSizePerspective",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasRotation",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"debugDrawLabelBorder",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasPolygonOffset",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"depthTestEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"pixelSnappingEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"draped",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"terrainDepthTest",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"cullAboveTerrain",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"occlusionPass",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"occludedFragmentFade",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"objectAndLayerIdColorInstanced",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"horizonCullingEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"isFocused",void 0);var He=r(49788);class Ge extends Se.im{constructor(e,t){super(e,mt),this.produces=new Map([[Ae.N.HUD_MATERIAL,e=>(0,be.Mb)(e)&&!this.parameters.drawAsLabel],[Ae.N.LABEL_MATERIAL,e=>(0,be.Mb)(e)&&this.parameters.drawAsLabel],[Ae.N.OCCLUSION_PIXELS,()=>this.parameters.occlusionTest],[Ae.N.DRAPED_MATERIAL,e=>this.parameters.draped&&(0,be.Mb)(e)]]),this._visible=!0,this._configuration=new qe(t)}getConfiguration(e,t){const r=this.parameters.draped;return super.getConfiguration(e,t,this._configuration),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVerticalOffset=!!this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasPolygonOffset=this.parameters.polygonOffset,this._configuration.draped=r,this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this._configuration.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,this._configuration.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,this._configuration.hasRotation=this.parameters.hasRotation,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.occlusionPass=t.slot===Ae.N.OCCLUSION_PIXELS,this._configuration.occludedFragmentFade=!r&&this.parameters.occludedFragmentFade,this._configuration.horizonCullingEnabled=this.parameters.horizonCullingEnabled,this._configuration.isFocused=this.parameters.isFocused,this._configuration.depthTestEnabled=this.parameters.depthEnabled||t.slot===Ae.N.OCCLUSION_PIXELS,(0,be.RN)(e)&&(this._configuration.debugDrawLabelBorder=!!ye.b.LABELS_SHOW_BORDER),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}intersect(e,t,r,n,i,s){const{options:{selectionMode:a,hud:o,excludeLabels:l},point:c,camera:d}=r,{parameters:u}=this;if(!a||!o||l&&u.isLabel||!e.visible||!c)return;const h=e.attributes.get(ae.r.FEATUREATTRIBUTE),f=null==h?null:(0,pe.ci)(h.data,ct),{scaleX:p,scaleY:m}=bt(f,u,d.pixelRatio);(0,ce.z0)(nt,t),e.attributes.has(ae.r.FEATUREATTRIBUTE)&&function(e){const t=e[0],r=e[1],n=e[2],i=e[3],s=e[4],a=e[5],o=e[6],l=e[7],c=e[8],d=1/Math.sqrt(t*t+r*r+n*n),u=1/Math.sqrt(i*i+s*s+a*a),h=1/Math.sqrt(o*o+l*l+c*c);e[0]=t*d,e[1]=r*d,e[2]=n*d,e[3]=i*u,e[4]=s*u,e[5]=a*u,e[6]=o*h,e[7]=l*h,e[8]=c*h}(nt);const g=e.attributes.get(ae.r.POSITION),y=e.attributes.get(ae.r.SIZE),_=e.attributes.get(ae.r.NORMAL),b=e.attributes.get(ae.r.ROTATION),v=e.attributes.get(ae.r.CENTEROFFSETANDDISTANCE);(0,Ie.vA)(g.size>=3);const x=(0,Me.c)(u),w="screen"===this.parameters.centerOffsetUnits;for(let e=0;e<g.data.length/g.size;e++){const n=e*g.size;(0,fe.i)(Ze,g.data[n],g.data[n+1],g.data[n+2]),(0,fe.t)(Ze,Ze,t),(0,fe.t)(Ze,Ze,d.viewMatrix);const i=e*v.size;if((0,fe.i)(ot,v.data[i],v.data[i+1],v.data[i+2]),!w&&(Ze[0]+=ot[0],Ze[1]+=ot[1],0!==ot[2])){const e=ot[2];(0,fe.n)(ot,Ze),(0,fe.d)(Ze,Ze,(0,fe.h)(ot,ot,e))}const a=e*_.size;if((0,fe.i)(Qe,_.data[a],_.data[a+1],_.data[a+2]),Ye(Qe,nt,d,dt),vt(this.parameters,Ze,dt,d,Xe),d.applyProjection(Ze,Je),Je[0]>-1){w&&(ot[0]||ot[1])&&(Je[0]+=ot[0]*d.pixelRatio,0!==ot[1]&&(Je[1]+=(0,Ce.m0)(ot[1],Xe.factorAlignment)*d.pixelRatio),d.unapplyProjection(Je,Ze)),Je[0]+=this.parameters.screenOffset[0]*d.pixelRatio,Je[1]+=this.parameters.screenOffset[1]*d.pixelRatio,Je[0]=Math.floor(Je[0]),Je[1]=Math.floor(Je[1]);const t=e*y.size;ft[0]=y.data[t],ft[1]=y.data[t+1],(0,Ce.MD)(ft,Xe.factor,ft);const n=ut*d.pixelRatio;let i=0;u.textureIsSignedDistanceField&&(i=Math.min(u.outlineSize,.5*ft[0])*d.pixelRatio/2),ft[0]*=p,ft[1]*=m;const a=e*b.size,o=u.rotation+b.data[a];if(We(c,Je[0],Je[1],ft,n,i,o,u,x)){const e=r.ray;if((0,fe.t)(et,Ze,(0,te.B8)(st,d.viewMatrix)),Je[0]=c[0],Je[1]=c[1],d.unprojectFromRenderScreen(Je,Ze)){const t=(0,q.vt)();(0,fe.c)(t,e.direction);const r=1/(0,fe.l)(t);(0,fe.h)(t,t,r),s((0,fe.j)(e.origin,Ze)*r,t,-1,!0,1,et)}}}}}intersectDraped(e,t,r,n,i,s){const a=e.attributes.get(ae.r.POSITION),o=e.attributes.get(ae.r.SIZE),l=e.attributes.get(ae.r.ROTATION),c=this.parameters,d=(0,Me.c)(c),u=e.attributes.get(ae.r.FEATUREATTRIBUTE),h=null==u?null:(0,pe.ci)(u.data,ct),{scaleX:f,scaleY:p}=bt(h,c,e.screenToWorldRatio),m=ht*e.screenToWorldRatio;for(let t=0;t<a.data.length/a.size;t++){const r=t*a.size,u=a.data[r],h=a.data[r+1],g=t*o.size;ft[0]=o.data[g],ft[1]=o.data[g+1];let y=0;c.textureIsSignedDistanceField&&(y=Math.min(c.outlineSize,.5*ft[0])*e.screenToWorldRatio/2),ft[0]*=f,ft[1]*=p;const _=t*l.size,b=c.rotation+l.data[_];We(n,u,h,ft,m,y,b,c,d)&&i(s.dist,s.normal,-1,!1)}}createBufferWriter(){return new _t}applyShaderOffsetsView(e,t,r,n,i,s,a){const o=Ye(t,r,i,dt);return this._applyVerticalGroundOffsetView(e,o,i,a),vt(this.parameters,a,o,i,s),this._applyPolygonOffsetView(a,o,n[3],i,a),this._applyCenterOffsetView(a,n,a),a}applyShaderOffsetsNDC(e,t,r,n,i){return this._applyCenterOffsetNDC(e,t,r,n),null!=i&&(0,fe.c)(i,n),this._applyPolygonOffsetNDC(n,t,r,n),n}_applyPolygonOffsetView(e,t,r,n,i){const s=n.aboveGround?1:-1;let a=Math.sign(r);0===a&&(a=s);const o=s*a;if(this.parameters.shaderPolygonOffset<=0)return(0,fe.c)(i,e);const l=(0,le.qE)(Math.abs(t.cosAngle),.01,1),c=1-Math.sqrt(1-l*l)/l/n.viewport[2];return(0,fe.h)(i,e,o>0?c:1/c),i}_applyVerticalGroundOffsetView(e,t,r,n){const i=(0,fe.l)(e),s=r.aboveGround?1:-1,a=r.computeRenderPixelSizeAtDist(i)*ve.R,o=(0,fe.h)(Ze,t.normal,s*a);return(0,fe.g)(n,e,o),n}_applyCenterOffsetView(e,t,r){const n="screen"!==this.parameters.centerOffsetUnits;return r!==e&&(0,fe.c)(r,e),n&&(r[0]+=t[0],r[1]+=t[1],t[2]&&((0,fe.n)(Qe,r),(0,fe.g)(r,r,(0,fe.h)(Qe,Qe,t[2])))),r}_applyCenterOffsetNDC(e,t,r,n){const i="screen"!==this.parameters.centerOffsetUnits;return n!==e&&(0,fe.c)(n,e),i||(n[0]+=t[0]/r.fullWidth*2,n[1]+=t[1]/r.fullHeight*2),n}_applyPolygonOffsetNDC(e,t,r,n){const i=this.parameters.shaderPolygonOffset;if(e!==n&&(0,fe.c)(n,e),i){const e=r.aboveGround?1:-1,s=e*Math.sign(t[3]);n[2]-=(s||e)*i}return n}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:r}=this.parameters,n=e[3]>=He.Q||t>=He.Q&&r[3]>=He.Q;return this._visible&&n}createGLMaterial(e){return new $e(e)}calculateRelativeScreenBounds(e,t,r=(0,b.vt)()){return function(e,t,r,n){n[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*r,n[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*r}(this.parameters,e,t,r),r[2]=r[0]+e[0],r[3]=r[1]+e[1],r}}class $e extends we.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique(je,e)}}function Ye(e,t,r,n){return function(e){return(t=e)instanceof Float32Array&&t.length>=16||function(e){return Array.isArray(e)&&e.length>=16}(e);var t}(t)&&(t=(0,ce.z0)(it,t)),(0,fe.q)(n.normal,e,t),(0,fe.t)(n.normal,n.normal,r.viewInverseTransposeMatrix),n.cosAngle=(0,fe.f)(Ke,pt),n}function We(e,t,r,n,i,s,a,o,l){let c=t-i-n[0]*l[0],d=c+n[0]+2*i,u=r-i-n[1]*l[1],h=u+n[1]+2*i;const f=o.distanceFieldBoundingBox;return o.textureIsSignedDistanceField&&null!=f&&(c+=n[0]*f[0],u+=n[1]*f[1],d-=n[0]*(1-f[2]),h-=n[1]*(1-f[3]),c-=s,d+=s,u-=s,h+=s),(0,ue.hZ)(rt,t,r),(0,ue.e$)(tt,e,rt,(0,le.kU)(a)),tt[0]>c&&tt[0]<d&&tt[1]>u&&tt[1]<h}const Xe=new class{constructor(){this.factor=new Te,this.factorAlignment=new Te}},Ze=(0,q.vt)(),Qe=(0,q.vt)(),Je=(0,pe.vt)(),Ke=(0,q.vt)(),et=(0,q.vt)(),tt=(0,he.vt)(),rt=(0,he.vt)(),nt=(0,de.vt)(),it=(0,de.vt)(),st=(0,re.vt)(),at=(0,pe.vt)(),ot=(0,q.vt)(),lt=(0,q.vt)(),ct=(0,pe.vt)(),dt={normal:Ke,cosAngle:0},ut=1,ht=2,ft=(0,he.fA)(0,0),pt=(0,q.fA)(0,0,1);class mt extends we.NV{constructor(){super(...arguments),this.renderOccluded=Se.m$.Occlude,this.isDecoration=!1,this.color=(0,pe.CN)(1,1,1,1),this.polygonOffset=!1,this.anchorPosition=(0,he.fA)(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=(0,pe.CN)(1,1,1,1),this.outlineSize=0,this.distanceFieldBoundingBox=(0,pe.vt)(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.occlusionTest=!0,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!1,this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.isFocused=!0,this.focusEffect="none",this.draped=!1,this.isLabel=!1}}const gt=(0,_e.BP)().vec3f(ae.r.POSITION).vec3f(ae.r.NORMAL).vec2i16(ae.r.UVI).vec4u8(ae.r.COLOR).vec2f(ae.r.SIZE).f32(ae.r.ROTATION).vec4f(ae.r.CENTEROFFSETANDDISTANCE).vec4f(ae.r.FEATUREATTRIBUTE),yt=gt.clone().vec4u8(ae.r.OLIDCOLOR);class _t{constructor(){this.vertexBufferLayout=(0,xe.E)()?yt:gt}elementCount(e){return 6*e.get(ae.r.POSITION).indices.length}write(e,t,r,n,i,s){const{position:a,normal:o,uvi:l,color:c,size:d,rotation:u,centerOffsetAndDistance:h,featureAttribute:f}=i;(0,Oe.Hk)(r.get(ae.r.POSITION),e,a,s,6),(0,Oe.p1)(r.get(ae.r.NORMAL),t,o,s,6);const p=r.get(ae.r.UVI)?.data;let m=0,g=0,y=-1-Me.f,_=-1-Me.f;p&&p.length>=4&&(m=p[0],g=p[1],y=-1-p[2],_=-1-p[3]);let b=r.get(ae.r.POSITION).indices.length,v=s;for(let e=0;e<b;++e)l.set(v,0,m),l.set(v,1,g),v++,l.set(v,0,y),l.set(v,1,g),v++,l.set(v,0,y),l.set(v,1,_),v++,l.set(v,0,y),l.set(v,1,_),v++,l.set(v,0,m),l.set(v,1,_),v++,l.set(v,0,m),l.set(v,1,g),v++;(0,Oe.tb)(r.get(ae.r.COLOR),4,c,s,6);const{data:x,indices:w}=r.get(ae.r.SIZE);b=w.length,v=s;for(let e=0;e<b;++e){const t=x[2*w[e]],r=x[2*w[e]+1];for(let e=0;e<6;++e)d.set(v,0,t),d.set(v,1,r),v++}if((0,Oe.uO)(r.get(ae.r.ROTATION),u,s,6),r.get(ae.r.CENTEROFFSETANDDISTANCE)?(0,Oe.Ut)(r.get(ae.r.CENTEROFFSETANDDISTANCE),h,s,6):(0,Oe.Pq)(h,s,6*b),r.get(ae.r.FEATUREATTRIBUTE)?(0,Oe.Ut)(r.get(ae.r.FEATUREATTRIBUTE),f,s,6):(0,Oe.Pq)(f,s,6*b),null!=n){const e=r.get(ae.r.POSITION)?.indices;if(e){const t=e.length,r=i.getField(ae.r.OLIDCOLOR,me.XP);(0,Oe.vx)(n,r,t,s,6)}}return{numVerticesPerItem:6,numItems:b}}intersect(e,t,r,n,i,s,a){const{options:{selectionMode:o,hud:l,excludeLabels:c},point:d,camera:u}=n;if(!o||!l||c&&t.isLabel||!d)return;const h=this.vertexBufferLayout.createView(e),f=h.getField(ae.r.POSITION,me.xs),p=h.getField(ae.r.NORMAL,me.xs),m=h.getField(ae.r.ROTATION,me.Y$),g=h.getField(ae.r.SIZE,me.gH),y=h.getField(ae.r.FEATUREATTRIBUTE,me.Eq),_=h.getField(ae.r.CENTEROFFSETANDDISTANCE,me.Eq),b="screen"===t.centerOffsetUnits,v=(0,Me.c)(t);if(null==f||null==p||null==m||null==g||null==_)return;const x=null==y?null:y.getVec(0,ct),{scaleX:w,scaleY:S}=bt(x,t,u.pixelRatio),A=f.count/6;for(let e=0;e<A;e++){const i=6*e;if(f.getVec(i,Ze),null!=r&&(0,fe.g)(Ze,Ze,r),(0,fe.t)(Ze,Ze,u.viewMatrix),_.getVec(i,at),(0,fe.i)(ot,at[0],at[1],at[2]),!b&&(Ze[0]+=ot[0],Ze[1]+=ot[1],0!==ot[2])){const e=ot[2];(0,fe.n)(ot,Ze),(0,fe.d)(Ze,Ze,(0,fe.h)(ot,ot,e))}if(p.getVec(i,Qe),Ye(Qe,nt,u,dt),vt(t,Ze,dt,u,Xe),u.applyProjection(Ze,Je),Je[0]>-1){b&&(ot[0]||ot[1])&&(Je[0]+=ot[0]*u.pixelRatio,0!==ot[1]&&(Je[1]+=(0,Ce.m0)(ot[1],Xe.factorAlignment)*u.pixelRatio),u.unapplyProjection(Je,Ze)),Je[0]+=t.screenOffset[0]*u.pixelRatio,Je[1]+=t.screenOffset[1]*u.pixelRatio,Je[0]=Math.floor(Je[0]),Je[1]=Math.floor(Je[1]),g.getVec(i,ft),(0,Ce.MD)(ft,Xe.factor,ft);const r=ut*u.pixelRatio;let s=0;t.textureIsSignedDistanceField&&(s=Math.min(t.outlineSize,.5*ft[0])*u.pixelRatio/2),ft[0]*=w,ft[1]*=S;const o=m.get(i),l=t.rotation+o;if(We(d,Je[0],Je[1],ft,r,s,l,t,v)){const t=n.ray;if((0,fe.t)(et,Ze,(0,te.B8)(st,u.viewMatrix)),Je[0]=d[0],Je[1]=d[1],u.unprojectFromRenderScreen(Je,Ze)){const r=(0,q.vt)();(0,fe.c)(r,t.direction);const n=1/(0,fe.l)(r);(0,fe.h)(r,r,n),a((0,fe.j)(t.origin,Ze)*n,r,e,!0,1,et)}}}}}}function bt(e,t,r){return null==e||null==t.vvSize?{scaleX:r,scaleY:r}:((0,ge.VC)(lt,t,e),{scaleX:lt[0]*r,scaleY:lt[1]*r})}function vt(e,t,r,n,i){if(!e.verticalOffset?.screenLength)return e.screenSizePerspective||e.screenSizePerspectiveAlignment?xt(e,i,(0,fe.l)(t),r.cosAngle):(i.factor.scale=1,i.factorAlignment.scale=1),t;const s=(0,fe.l)(t),a=e.screenSizePerspectiveAlignment??e.screenSizePerspective,o=(0,Re.kE)(n,s,e.verticalOffset,r.cosAngle,a);return xt(e,i,s,r.cosAngle),(0,fe.h)(r.normal,r.normal,o),(0,fe.g)(t,t,r.normal)}function xt(e,t,r,n){null!=e.screenSizePerspective?(0,Ce.cJ)(n,r,e.screenSizePerspective,t.factor):(t.factor.scale=1,t.factor.factor=0,t.factor.minScaleFactor=0),null!=e.screenSizePerspectiveAlignment?(0,Ce.cJ)(n,r,e.screenSizePerspectiveAlignment,t.factorAlignment):(t.factorAlignment.factor=t.factor.factor,t.factorAlignment.scale=t.factor.scale,t.factorAlignment.minScaleFactor=t.factor.minScaleFactor)}class wt{constructor(e,t){this._mainThreadDelegate=t,this._bufferWriters=new Map,this._sharedTextures=new Map,this.globalViewingMode=e===ie.RT.Global}createRenderCommandBuffer(){return{commands:[],transferList:[]}}mergeRenderCommandBuffers(e){const t=this.createRenderCommandBuffer();for(const r of e)null!=r&&(t.commands.push(...r.commands),t.transferList.push(...r.transferList));return t}async getOrCreateSharedTexture(e,t){const{data:r,parameters:n}=t(),i=await this._mainThreadDelegate.createTexture(r,n);return this._sharedTextures.set(e,i),i}async releaseSharedTexture(e){const t=this._sharedTextures,r=t.get(e);null!=r&&(t.delete(e),await this._mainThreadDelegate.releaseTexture(r))}async createMaterial(e){const{type:t,parameters:r}=e,n=w("material");let i,s;switch(t){case"default":i=new oe.$U(e.parameters,{spherical:this.globalViewingMode}),s={type:t,id:n,parameters:e.parameters};break;case"hud":i=new Ge(r,this.globalViewingMode),s={type:t,id:n,parameters:e.parameters}}return this._bufferWriters.set(n,i.createBufferWriter()),await this._mainThreadDelegate.createMaterial(s),n}async createDirectRenderer(e){return await this._mainThreadDelegate.createDirectRenderer(e),e}addDirectRendererGeometry(e,t,r){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:i,renderGeometryBufferItems:s}=this.createRenderGeometryBuffer(t,r);return this.addDirectRendererGeometryBuffer(n,e,i,s,r)}updateDirectRendererGeometry(e,t,r){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:i,renderGeometryBufferItems:s}=this.createRenderGeometryBuffer(t,r);return this.updateDirectRendererGeometryBuffer(n,e,i,s,r)}addDirectRendererGeometryBuffer(e,t,r,n,i){const{objectIds:s,visibilities:a}=n;return{commands:[{id:"add-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:n,localOrigin:i}],transferList:[r.data,s.buffer,a.buffer]}}updateDirectRendererGeometryBuffer(e,t,r,n,i){const{objectIds:s,visibilities:a}=n;return{commands:[{id:"update-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:n,localOrigin:i}],transferList:[r.data,s.buffer,a.buffer]}}removeDirectRendererGeometryBuffer(e,t){return{commands:[{id:"remove-direct-renderer-geometry-buffer",rendererId:e,groupId:t}],transferList:[]}}async createLodRenderer(e){const t=w("lod-renderer"),r=new Set,n={levels:e.levels.map((e=>({components:e.components.map((e=>{const t=e.attributes.get(ae.r.POSITION);if(!t||0===t.indices.length)throw new Error("positions attribute expected");const n=(0,ne.tM)(t.indices.length/3),i=new se.j(n,3,t);if(null==this._bufferWriters.get(e.materialId))throw new Error("writer not found");const{renderGeometryBuffer:s}=this.createRenderGeometryBuffer(e,null);return r.add(s.data),{materialId:e.materialId,renderGeometryBuffer:s,boundingInfo:{bbMax:i.bbMax,bbMin:i.bbMin}}})),minScreenSpaceRadius:e.minScreenSpaceRadius})))};return await this._mainThreadDelegate.createLodRenderer(t,n,Array.from(r)),t}addLodInstances(e,t,r){return{commands:[{id:"add-lod-instances",rendererId:e,groupId:t,data:r}],transferList:[r.featureIds.buffer,r.globalTransforms.buffer,r.localTransforms.buffer,r.visibility.buffer]}}removeLodInstances(e,t){return{commands:[{id:"remove-lod-instances",rendererId:e,groupId:t}],transferList:[]}}updateLodInstancesData(e,t,r){return{commands:[{id:"update-lod-instance-data",rendererId:e,groupId:t,globalTransforms:r}],transferList:[r.buffer]}}updateVisibility(e,t,r){return{commands:[{id:"update-visibility",rendererId:e,groupId:t,visibility:r}],transferList:[r.buffer]}}async dispatchRenderCommands(e){0!==e.commands.length&&await this._mainThreadDelegate.executeRenderCommands(e)}createRenderGeometryBuffer(e,t){const{materialId:r,visibilities:n,objectIds:i}=e,s=this._bufferWriters.get(r);if(null==s)throw new Error("no registered bufferWriter for material found");let a=null;if(e.transformation&&t)(0,te.C)(St,e.transformation),St[12]-=t[0],St[13]-=t[1],St[14]-=t[2],a=St;else{if(t)throw new Error("not implemented");e.transformation&&(a=e.transformation)}let o=null;a&&((0,te.B8)(At,St),(0,te.mg)(At,At),o=At);const l=e.attributes,c=s.elementCount(l),d=s.vertexBufferLayout.stride/4;c>Math.floor(Ct/d)&&console.warn("geometry with very large number of elements encountered");const u=s.vertexBufferLayout.createBuffer(c),h=s.write(a,o,l,e.objectAndLayerIdColor,u,0);if(null==h)throw new Error("Bufferwriter.write does not provide item information.");if(n.length!==h.numItems||i.length!==h.numItems)throw new Error("Unexpected mismatch between number of RenderGeometryBufferItems and provided objectIds/visibility flags.");return{renderGeometryBuffer:{data:u.buffer,elementCount:c},renderGeometryBufferItems:{objectIds:i,visibilities:n,ranges:{numVertices:h.numVerticesPerItem,numItems:h.numItems}}}}}const St=(0,re.vt)(),At=(0,re.vt)(),Ct=4194304;class It{constructor(e,t,r){this.renderCommandContext=e,this.renderCommandBuffer=t,this.pipelineStateCommands=r}append(e){this.appendRenderCommands(e.renderCommandBuffer),this.appendPipelineStateCommands(e.pipelineStateCommands)}appendRenderCommands(e){this.renderCommandBuffer.commands.push(...e.commands),this.renderCommandBuffer.transferList.push(...e.transferList)}appendPipelineStateCommand(e){this.pipelineStateCommands.push(e)}appendPipelineStateCommands(e){for(const t of e)this.appendPipelineStateCommand(t)}async execute(){for(const e of this.pipelineStateCommands)e();await this.renderCommandContext.dispatchRenderCommands(this.renderCommandBuffer)}}var Tt=r(9762),Ot=r(27993);function Rt(e){const{featureCount:t}=e;if(0===t)return new Uint32Array;const r=new Uint32Array(t);return e.getObjectIdsArray(r),r}function Mt(e){const{featureCount:t}=e;if(0===t)return new Float64Array;const r=new Float64Array(3*t);return e.getCoordinatesArray(r),r}function Et(e,t){const r=t.viewSpatialReference,n=t.renderSpatialReference,{extent:i}=e,s=(0,b.gX)(i),a=(0,q.vt)();return(0,Ot.F)([s[0],s[1],0],r,a,n),a}var Pt=r(48353),zt=r(8887),Ft=r(83047);function Dt(e){const t=new Map;for(const[r,n]of e)t.set(r,{...n,indices:(0,ne.Dg)(n.indices)});return t}r(87317),r(12359),r(95108),r(27615),r(52106),r(4718),r(34275),r(65864);var Bt,jt,Vt=r(57917),kt=r(72385),Ut=(r(4197),r(11868)),Nt=r(240),Lt=(r(71351),r(46610));(jt=Bt||(Bt={})).length=function(e,t){const r=e[t],n=e[t+1],i=e[t+2];return Math.sqrt(r*r+n*n+i*i)},jt.normalize=function(e,t){const r=e[t],n=e[t+1],i=e[t+2],s=1/Math.sqrt(r*r+n*n+i*i);e[t]*=s,e[t+1]*=s,e[t+2]*=s},jt.scale=function(e,t,r){e[t]*=r,e[t+1]*=r,e[t+2]*=r},jt.add=function(e,t,r,n,i,s=t){(i=i||e)[s]=e[t]+r[n],i[s+1]=e[t+1]+r[n+1],i[s+2]=e[t+2]+r[n+2]},jt.subtract=function(e,t,r,n,i,s=t){(i=i||e)[s]=e[t]-r[n],i[s+1]=e[t+1]-r[n+1],i[s+2]=e[t+2]-r[n+2]},r(96672),r(87170);const qt=new Array(36);for(let e=0;e<6;e++)for(let t=0;t<6;t++)qt[6*e+t]=e;const Ht=new Array(36);for(let e=0;e<6;e++)Ht[6*e]=0,Ht[6*e+1]=1,Ht[6*e+2]=2,Ht[6*e+3]=2,Ht[6*e+4]=3,Ht[6*e+5]=0;const Gt=(0,kt.fA)(-.5,0,-.5),$t=(0,kt.fA)(.5,0,-.5),Yt=(0,kt.fA)(0,0,.5),Wt=(0,kt.fA)(0,.5,0),Xt=(0,kt.vt)(),Zt=(0,kt.vt)(),Qt=(0,kt.vt)(),Jt=(0,kt.vt)(),Kt=(0,kt.vt)();function er(e,t){switch(e){case"cone":return((e,r,n=!1)=>({levels:e.map((e=>{const i=Dt(r(e.tesselation));return n&&function(e){const t=e,r=t.get(ae.r.POSITION).data,n=t.get(ae.r.NORMAL).data;if(n){const t=tr(e,ae.r.NORMAL).data;for(let e=0;e<n.length;e+=3){const r=n[e+1];t[e+1]=-n[e+2],t[e+2]=r}}if(r){const t=tr(e,ae.r.POSITION).data;for(let e=0;e<r.length;e+=3){const n=r[e+1];t[e+1]=-r[e+2],t[e+2]=n}}}(i),{components:[{attributes:i,objectAndLayerIdColor:void 0,transformation:null,materialId:t,visibilities:new Uint8Array([1]),objectIds:new Uint32Array([-1])}],minScreenSpaceRadius:e.minScreenSpaceRadius}}))}))(rr,(e=>function(e,t,r,n,i=!0,s=!0){let a=0;const o=t,l=e;let c=(0,kt.fA)(0,a,0),d=(0,kt.fA)(0,a+l,0),u=(0,kt.fA)(0,-1,0),h=(0,kt.fA)(0,1,0);n&&(a=l,d=(0,kt.fA)(0,0,0),c=(0,kt.fA)(0,a,0),u=(0,kt.fA)(0,1,0),h=(0,kt.fA)(0,-1,0));const f=[d,c],p=[u,h],m=r+2,g=Math.sqrt(l*l+o*o);if(n)for(let e=r-1;e>=0;e--){const t=e*(2*Math.PI/r),n=(0,kt.fA)(Math.cos(t)*o,a,Math.sin(t)*o);f.push(n);const i=(0,kt.fA)(l*Math.cos(t)/g,-o/g,l*Math.sin(t)/g);p.push(i)}else for(let e=0;e<r;e++){const t=e*(2*Math.PI/r),n=(0,kt.fA)(Math.cos(t)*o,a,Math.sin(t)*o);f.push(n);const i=(0,kt.fA)(l*Math.cos(t)/g,o/g,l*Math.sin(t)/g);p.push(i)}const y=new Array,_=new Array;if(i){for(let e=3;e<f.length;e++)y.push(1),y.push(e-1),y.push(e),_.push(0),_.push(0),_.push(0);y.push(f.length-1),y.push(2),y.push(1),_.push(0),_.push(0),_.push(0)}if(s){for(let e=3;e<f.length;e++)y.push(e),y.push(e-1),y.push(0),_.push(e),_.push(e-1),_.push(1);y.push(0),y.push(2),y.push(f.length-1),_.push(1),_.push(2),_.push(p.length-1)}const b=(0,Ut.oe)(3*m);for(let e=0;e<m;e++)b[3*e]=f[e][0],b[3*e+1]=f[e][1],b[3*e+2]=f[e][2];const v=(0,Ut.oe)(3*m);for(let e=0;e<m;e++)v[3*e]=p[e][0],v[3*e+1]=p[e][1],v[3*e+2]=p[e][2];return[[ae.r.POSITION,new Lt.n(b,y,3,!0)],[ae.r.NORMAL,new Lt.n(v,_,3,!0)]]}(1,.5,e,!1)),!0);case"sphere":case"cube":case"inverted-cone":case"cylinder":case"tetrahedron":case"diamond":throw new Error("not implemented");default:return}}function tr(e,t){let r=e.get(t);return r&&!r.exclusive&&(r={...r,exclusive:!0,data:(0,Vt.S)(r.data)},e.set(t,r)),r}(0,fe.d)(Xt,Gt,Wt),(0,fe.d)(Zt,Gt,$t),(0,fe.e)(Qt,Xt,Zt),(0,fe.n)(Qt,Qt),(0,fe.d)(Xt,$t,Wt),(0,fe.d)(Zt,$t,Yt),(0,fe.e)(Jt,Xt,Zt),(0,fe.n)(Jt,Jt),(0,fe.d)(Xt,Yt,Wt),(0,fe.d)(Zt,Yt,Gt),(0,fe.e)(Kt,Xt,Zt),(0,fe.n)(Kt,Kt),Qt[0],Qt[1],Qt[2],Jt[0],Jt[1],Jt[2],Kt[0],Kt[1],Kt[2],(0,q.vt)();const rr=[{tesselation:6,minScreenSpaceRadius:0},{tesselation:18,minScreenSpaceRadius:7},{tesselation:64,minScreenSpaceRadius:65}];var nr=r(74810);class ir{constructor(e){this._context=e,this.lodRendererId=null,this._loaded=!1,this._loadingPromise=null,this._primitive="cone"}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const e=this._context.renderCommandContext,t={usePBR:!0,isSchematic:!0,mrrFactors:nr.Bt,ambient:q.Un,diffuse:q.Un,hasSlicePlane:!1,castShadows:!0,offsetTransparentBackfaces:!1,screenSizePerspective:{}};t.externalColor=pe.Un,t.isInstanced=!0;const r=await e.createMaterial({type:"default",parameters:t}),n=er(this._primitive,r);this.lodRendererId=await e.createLodRenderer(n),this._loaded=!0}async createAddCommand(e){const t=this._context,{renderCommandContext:r,mainThreadDelegate:n}=t;if(null==this.lodRendererId)throw new Error("expected lod renderer id to not be null");const{featureCount:i}=e;if(0===i)return r.createRenderCommandBuffer();const s=(0,H.vt)((0,zt.Fq)(this._primitive)),a=(0,q.ci)((0,H.Ej)(s)),o=(0,q.ci)((0,zt.Bb)(a,{isPrimitive:!0,width:100,depth:null,height:null})),l=new Float64Array(16*i),c=new Float64Array(16*i),d=Mt(e),u=await n.applyElevationAlignmentTo(d);for(let e=0;e<i;++e){const t=e,r=u[3*e+0],n=u[3*e+1],i=u[3*e+2],s=this._computeGlobalTransform(r,n,i,this._context.viewSpatialReference,or),d=this._computeLocalTransform(o,a,ar);this._writeMatrixToTypedBuffer(l,t,d),this._writeMatrixToTypedBuffer(c,t,s)}const h=Rt(e),f=new Uint8Array(i);e.getVisibilityArray(f);const p={featureIds:new Uint32Array(h),visibility:f,localTransforms:l,globalTransforms:c};return r.addLodInstances(this.lodRendererId,e.id,p)}async createRemoveCommand(e){const{_context:t,lodRendererId:r}=this,n=t.renderCommandContext;return null==r?n.createRenderCommandBuffer():n.removeLodInstances(r,e)}async createUpdateVisibilityCommand(e){const{lodRendererId:t,_context:r}=this,n=r.renderCommandContext;if(null==t)return n.createRenderCommandBuffer();const i=new Uint8Array(e.featureCount);return e.getVisibilityArray(i),n.updateVisibility(t,e.id,i)}async createUpdateElevationCommand(e){const{_context:t,lodRendererId:r}=this,{renderCommandContext:n,mainThreadDelegate:i}=t,{featureCount:s,id:a}=e;if(null==r||0===s)return n.createRenderCommandBuffer();const o=new Float64Array(16*s),l=Mt(e),c=await i.applyElevationAlignmentTo(l);for(let e=0;e<s;++e){const t=e,r=c[3*e+0],n=c[3*e+1],i=c[3*e+2],s=this._computeGlobalTransform(r,n,i,this._context.viewSpatialReference,or);this._writeMatrixToTypedBuffer(o,t,s)}return n.updateLodInstancesData(r,a,o)}_writeMatrixToTypedBuffer(e,t,r){let n=16*t;for(let t=0;t<16;t++)e[n++]=r[t]}_computeGlobalTransform(e,t,r,n,i){return sr[0]=e,sr[1]=t,sr[2]=r,(0,Pt.l)(n,sr,i,this._context.renderSpatialReference),i}_computeLocalTransform(e,t,r){return(0,te.D_)(r),this._applyObjectScale(e,t,r),r}_applyObjectScale(e,t,r){const n=function(e=q.Un,t,r,n=1){const i=new Array(3);if(null==t||null==r)i[0]=1,i[1]=1,i[2]=1;else{let n,s=0;for(let a=2;a>=0;a--){const o=e[a],l=null!=o,c=0===a&&!n&&!l,d=r[a];let u;"symbol-value"===o||c?u=0!==d?t[a]/d:1:l&&"proportional"!==o&&isFinite(o)&&(u=0!==d?o/d:1),null!=u&&(i[a]=u,n=u,s=Math.max(s,Math.abs(u)))}for(let e=2;e>=0;e--)null==i[e]?i[e]=n:0===i[e]&&(i[e]=.001*s)}for(let e=2;e>=0;e--)i[e]/=n;return(0,q.ci)(i)}(e,e,t,this._context.renderCoordsHelper.unitInMeters);1===n[0]&&1===n[1]&&1===n[2]||(0,te.hs)(r,r,n)}}const sr=(0,q.vt)(),ar=(0,re.vt)(),or=(0,re.vt)();var lr=r(97768);new Map,(()=>{let e="";for(let t=32;t<127;t++)e+=String.fromCharCode(t)})();const cr=[];{const e=16;for(let t=0;t<360;t+=360/e)cr.push([Math.cos(Math.PI*t/180),Math.sin(Math.PI*t/180)])}var dr,ur;(ur=dr||(dr={}))[ur.Left=0]="Left",ur[ur.Center=1]="Center",ur[ur.Right=2]="Right",Object.freeze({left:0,center:.5,right:1});const hr=Object.freeze({"bottom-left":(0,he.fA)(0,0),bottom:(0,he.fA)(.5,0),"bottom-right":(0,he.fA)(1,0),left:(0,he.fA)(0,.5),center:(0,he.fA)(.5,.5),right:(0,he.fA)(1,.5),"top-left":(0,he.fA)(0,1),top:(0,he.fA)(.5,1),"top-right":(0,he.fA)(1,1)});var fr=r(40804);r(48833);const pr=(0,pe.CN)(.25,.25,.75,.75);function mr(e){return"cross"===e||"x"===e}function gr(e,t=128,r=.5*t,n=0){switch(e){case"circle":default:return function(e,t){const r=e/2-.5;return xr(e,br(r,r,t/2))}(t,r);case"square":return function(e,t){return yr(e,t,!1)}(t,r);case"cross":return function(e,t,r=0){return _r(e,t,!1,r)}(t,r,n);case"x":return function(e,t,r=0){return _r(e,t,!0,r)}(t,r,n);case"kite":return function(e,t){return yr(e,t,!0)}(t,r);case"triangle":return function(e,t){return xr(e,vr(e/2,t,t/2))}(t,r);case"arrow":return function(e,t){const r=t,n=t/2,i=e/2,s=.8*r,a=br(i,(e-t)/2-s,Math.sqrt(s*s+n*n)),o=vr(i,r,n);return xr(e,((e,t)=>Math.max(o(e,t),-a(e,t))))}(t,r)}}function yr(e,t,r){return r&&(t/=Math.SQRT2),xr(e,((n,i)=>{let s=n-.5*e+.25,a=.5*e-i-.75;if(r){const e=(s+a)/Math.SQRT2;a=(a-s)/Math.SQRT2,s=e}return Math.max(Math.abs(s),Math.abs(a))-.5*t}))}function _r(e,t,r,n=0){t-=n,r&&(t*=Math.SQRT2);const i=.5*t;return xr(e,((t,s)=>{let a,o=t-.5*e,l=.5*e-s-1;if(r){const e=(o+l)/Math.SQRT2;l=(l-o)/Math.SQRT2,o=e}return o=Math.abs(o),l=Math.abs(l),a=o>l?o>i?Math.sqrt((o-i)*(o-i)+l*l):l:l>i?Math.sqrt(o*o+(l-i)*(l-i)):o,a-=n/2,a}))}function br(e,t,r){return(n,i)=>{const s=n-e,a=i-t;return Math.sqrt(s*s+a*a)-r}}function vr(e,t,r){const n=Math.sqrt(t*t+r*r);return(i,s)=>{const a=Math.abs(i-e)-r,o=s-e+t/2+.75,l=(t*a+r*o)/n,c=-o;return Math.max(l,c)}}function xr(e,t){const r=new Uint8Array(4*e*e);for(let n=0;n<e;n++)for(let i=0;i<e;i++){const s=i+e*n;let a=t(i,n);a=a/e+.5,(0,fr.U)(a,r,4*s)}return r}class wr{constructor(e){this._context=e,this.materialId=null,this._loaded=!1,this._loadingPromise=null,this._iconTexture=null}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}destroy(){this._iconTexture=(0,lr.xt)(this._iconTexture)}async _load(){const e=this._context.renderCommandContext,t=await e.getOrCreateSharedTexture("circle-icon",(()=>function(e,t=128,r=.5*t,n=0){return{data:gr(e,t,r,n),parameters:{mipmap:!1,wrap:{s:De.pF.CLAMP_TO_EDGE,t:De.pF.CLAMP_TO_EDGE},width:t,height:t,components:4,noUnpackFlip:!0,reloadable:!0}}}("circle")));this._iconTexture={remove:()=>e.releaseSharedTexture("circle-icon")};const r={anchorPosition:hr.center,occlusionTest:!0,hasSlicePlane:!1,color:[1,0,0,1],outlineColor:[0,0,0,1],outlineSize:1,distanceFieldBoundingBox:pr,textureId:t,textureIsSignedDistanceField:!0,sampleSignedDistanceFieldTexelCenter:mr("circle")};this.materialId=await e.createMaterial({type:"hud",parameters:r}),await e.createDirectRenderer(this.materialId),this._loaded=!0}async createAddCommand(e){const{materialId:t,_context:r}=this,{renderCommandContext:n}=r;if(null==t)throw new Error("expected material not to be null");const i=await this._createGeometry(e);if(null==i)return n.createRenderCommandBuffer();const s=Et(e,r);return n.addDirectRendererGeometry(e.id,i,s)}async _createGeometry(e){const{materialId:t,_context:r}=this,{mainThreadDelegate:n}=r,{featureCount:i}=e;if(0===i||null==t)return null;const s=Rt(e),a=Mt(e),o=function(e,t){const r=e.length/3,n=t.viewSpatialReference,i=t.renderSpatialReference,s=new Float64Array(3*r);if(!(0,Tt.projectBuffer)(e,n,0,s,i,0,r))throw new Error("Failed to project coordinates");return s}(await n.applyElevationAlignmentTo(a),r),l=new Float64Array([0,0,1]),c=new Float64Array([255,255,255,255]),d=new Float64Array([24,24]),u=new Float64Array([0,0,0,1]),h=new Float64Array([0,0]),f=new Float64Array([0]),p=new Uint32Array(i);for(let e=0;e<i;++e)p[e]=e;const m=new Uint32Array(i);for(let e=0;e<i;++e)m[e]=0;const g=new Lt.n(o,p,3,!0),y=new Lt.n(l,m,3,!0),_=new Lt.n(h,m,2,!0),b=new Lt.n(c,m,4,!0),v=new Lt.n(f,m,1,!0),x=new Lt.n(d,m,2,!0),w=new Lt.n(u,m,4,!0),S=[[ae.r.POSITION,g],[ae.r.NORMAL,y],[ae.r.UV0,_],[ae.r.COLOR,b],[ae.r.ROTATION,v],[ae.r.SIZE,x],[ae.r.CENTEROFFSETANDDISTANCE,w]],A=new Uint8Array(i);return e.getVisibilityArray(A),{attributes:Dt(S),objectAndLayerIdColor:void 0,transformation:(0,re.vt)(),materialId:t,objectIds:s,visibilities:A}}async createRemoveCommand(e){const{materialId:t,_context:r}=this,n=r.renderCommandContext;return null==t?n.createRenderCommandBuffer():n.removeDirectRendererGeometryBuffer(t,e)}async createUpdateVisibilityCommand(e){const{materialId:t,_context:r}=this,n=r.renderCommandContext;if(null==t)return n.createRenderCommandBuffer();const i=new Uint8Array(e.featureCount);return e.getVisibilityArray(i),n.updateVisibility(t,e.id,i)}async createUpdateElevationCommand(e){const{materialId:t,_context:r}=this,{renderCommandContext:n}=r,{featureCount:i,id:s}=e;if(null==t||0===i)return n.createRenderCommandBuffer();const a=await this._createGeometry(e);if(null==a)return n.createRenderCommandBuffer();const o=Et(e,r);return n.updateDirectRendererGeometry(s,a,o)}}class Sr{constructor(e){this._symbols=new Array,this._featureDataPartitioning=new Map,this._context=e}async load(){this._symbols[0]=new wr(this._context),this._symbols[1]=new ir(this._context)}async createAddCommand(e){const t=this._partition(e),r=await Promise.all(t.map((async({index:e,features:t})=>{const r=await this._provisionSymbol(e);return await(r?.createAddCommand(t))}))),n=this._context.renderCommandContext;return new It(n,n.mergeRenderCommandBuffers(r),[()=>{this._featureDataPartitioning.set(e.id,t)}])}async createRemoveCommand(e){const{_featureDataPartitioning:t,_context:r}=this,n=r.renderCommandContext,i=t.get(e);if(null==i)return new It(n,n.createRenderCommandBuffer(),[]);const s=await Promise.all(i.map((async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createRemoveCommand(t.id))})));return new It(n,n.mergeRenderCommandBuffers(s),[()=>{t.delete(e)}])}async createUpdateVisibilityCommand(e){const{_featureDataPartitioning:t,_context:r}=this,n=r.renderCommandContext,i=t.get(e.id);if(null==i)return new It(n,n.createRenderCommandBuffer(),[]);const s=await Promise.all(i.map((async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateVisibilityCommand(t))})));return new It(n,n.mergeRenderCommandBuffers(s),[])}async createUpdateElevationCommand(){const{_featureDataPartitioning:e,_context:t}=this,r=t.renderCommandContext,n=[];for(const t of e.values()){const e=t.map((async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateElevationCommand(t))}));n.push(...e)}const i=await Promise.all(n);return new It(r,r.mergeRenderCommandBuffers(i),[])}async _provisionSymbol(e){if(null==e)return null;const t=this._symbols[e];return t?(t.loaded||await t.load(),t):null}_getLoadedSymbol(e){if(null==e)return null;const t=this._symbols[e];return null!=t&&t.loaded?t:null}_partition(e){const t=Rt(e);if(null==t)throw new Error("unable to fetch objectIds");const{featureCount:r}=e,n=[[],[]];for(let e=0;e<r;++e)n[t[e]%2].push(e);return n.map(((t,r)=>new Ar(r,e.subset(new Uint32Array(t))))).filter((e=>e.features.featureCount>0))}}class Ar{constructor(e,t){this.index=e,this.features=t}}var Cr=r(73941),Ir=r(98764),Tr=r(65806);const Or=(0,q.vt)();var Rr=r(88582),Mr=r(17352),Er=r(97937);function Pr(e,t,r=function(e){return{operations:e,value:e.create()}}(e)){return r.operations=e,e.copy(t,r.value),r}const zr=2**50;function Fr(e,t,r,n){return e.operations.setAltitudeAt(e.value,t,r,n)}function Dr(e,t,r){return e.operations.elevate(e.value,t,r.value)}const Br=(0,q.vt)();(0,q.vt)();var jr=r(44280),Vr=r(32114);function kr(e){return"point"===e.type}class Ur{constructor(e,t,r,n){this.viewingMode=e,this.spatialReference=t,this.unitInMeters=r,this._coordinateSystem=n,this._tmpCoordinateSystem=function(e){const{value:t,operations:r}=e;return{operations:r,value:r.create(t)}}(n),this.referenceEllipsoid=(0,Cr.tO)(t),this.sphericalPCPF=(0,Ir.lO)(t)}set extent(e){e&&function(e,t,r){e.operations.setExtent(e.value,t,r.value)}(this._coordinateSystem,e,this._coordinateSystem)}get extent(){return function(e,t){return e.operations.getExtent(e.value,t),t}(this._coordinateSystem,(0,b.vt)())}getAltitude(e){return function(e,t){return e.operations.altitudeAt(e.value,t)}(this._coordinateSystem,e)}setAltitude(e,t,r=e){return Fr(this._coordinateSystem,r,t,e)}setAltitudeOfTransformation(e,t){!function(e,t,r,n){t!==n&&(0,te.C)(n,t),(0,fe.i)(Br,n[12],n[13],n[14]),Fr(e,Br,r,Br),n[12]=Br[0],n[13]=Br[1],n[14]=Br[2]}(this._coordinateSystem,t,e,t)}worldUpAtPosition(e,t){return function(e,t,r){return e.operations.axisAt(e.value,t,Rr._.Z,r)}(this._coordinateSystem,e,t)}worldBasisAtPosition(e,t,r){return function(e,t,r,n){return e.operations.axisAt(e.value,t,r,n)}(this._coordinateSystem,e,t,r)}basisMatrixAtPosition(e,t){const r=this.worldBasisAtPosition(e,Rr._.X,Vr.rq.get()),n=this.worldBasisAtPosition(e,Rr._.Y,Vr.rq.get()),i=this.worldBasisAtPosition(e,Rr._.Z,Vr.rq.get());return(0,te.hZ)(t,r[0],r[1],r[2],0,n[0],n[1],n[2],0,i[0],i[1],i[2],0,0,0,0,1),t}headingAtPosition(e,t){const r=this.worldUpAtPosition(e,Vr.rq.get()),n=this.worldBasisAtPosition(e,Rr._.Y,Vr.rq.get()),i=(0,jr.EJ)(t,n,r);return(0,le.KJ)(i)}intersectManifoldClosestSilhouette(e,t,r){return Dr(this._coordinateSystem,t,this._tmpCoordinateSystem),function(e,t,r){e.operations.intersectRayClosestSilhouette(e.value,t,r)}(this._tmpCoordinateSystem,e,r),r}intersectManifold(e,t,r){Dr(this._coordinateSystem,t,this._tmpCoordinateSystem);const n=Vr.rq.get();return function(e,t,r){return e.operations.intersectRay(e.value,t,r)}(this._tmpCoordinateSystem,e,n)?(0,fe.c)(r,n):null}intersectInfiniteManifold(e,t,r){if(this.viewingMode===ie.RT.Global)return this.intersectManifold(e,t,r);Dr(this._coordinateSystem,t,this._tmpCoordinateSystem);const n=this._tmpCoordinateSystem.value,i=Vr.rq.get();return(0,Nt.Ui)(n.plane,e,i)?(0,fe.c)(r,i):null}toRenderCoords(e,t,r){return kr(e)?(0,Tr.g)(e,t,this.spatialReference):(0,Ot.F)(e,t,r,this.spatialReference)}fromRenderCoords(e,t,r=null){return kr(t)?(null!=r&&(t.spatialReference=r),function(e,t,r){return!!(0,Ot.F)(e,t,Or,r.spatialReference)&&(r.x=Or[0],r.y=Or[1],r.z=Or[2],!0)}(e,this.spatialReference,t)?t:null):(0,Ot.F)(e,this.spatialReference,t,r)?t:null}static create(e,t){switch(e){case ie.RT.Local:return new Ur(ie.RT.Local,t,(0,Ft.GA)(t),Pr(Mr.b,(0,Mr.f)([0,0,0],[zr,0,0],[0,zr,0])));case ie.RT.Global:return new Ur(ie.RT.Global,t,1,function(e){return Pr(Er.s,(0,Er.f)(0,0,0,(0,Cr.tO)(e).radius))}(t))}}static renderUnitScaleFactor(e,t){return(0,Ft.KX)(e)/(0,Ft.KX)(t)}}let Nr=class extends i.A.EventedAccessor{constructor(){super(...arguments),this.remoteClient=null,this._featureStore=new B,this._tileManager=null,this._renderer=null,this._fetcher=null,this._queryEngine=null,this._defaultQueryJSON=null}get updating(){return this._tileManager.updating}destroy(){this._featureStore.clear(),this._tileManager?.destroy()}async setup({viewSpatialReference:e,renderSpatialReference:t,viewingMode:r,baseQuery:n,url:i,objectIdField:s,capabilities:o,fieldsIndex:l,timeInfo:c,elevationInfo:m,fullExtent:g}){const y=h.A.fromJSON(e),_=h.A.fromJSON(t);this._fetcher=new ee(y,p.A.fromJSON(n),i,s,o),this._queryEngine=new f.do({hasZ:!0,hasM:!1,geometryType:"esriGeometryPoint",objectIdField:s,fieldsIndex:l,availableFields:[s],spatialReference:e,featureStore:this._featureStore,timeInfo:c});const b={createTexture:async(e,t)=>{const r={data:e,parameters:t};return await this.remoteClient.invoke("createTexture",r,{transferList:[e.buffer]})},releaseTexture:async e=>{const t={uid:e};await this.remoteClient.invoke("releaseTexture",t)},createMaterial:async e=>{const t={materialJSON:e};await this.remoteClient.invoke("createMaterial",t)},createDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("createDirectRenderer",t)},createLodRenderer:async(e,t,r)=>{const n={rendererId:e,lodRenderGeometry:t};await this.remoteClient.invoke("createLoDRenderer",n,{transferList:r})},executeRenderCommands:async e=>{const t={commands:e.commands};await this.remoteClient.invoke("dispatchRenderCommands",t,{transferList:e.transferList})},applyElevationAlignmentTo:async e=>{const t={mapPoints:e};return await this.remoteClient.invoke("applyElevationAlignment",t,{transferList:[e.buffer]})}};this._renderer=new Sr({viewSpatialReference:y,renderSpatialReference:_,renderCoordsHelper:Ur.create(r,_),renderCommandContext:new wt(r,b),elevationInfo:m??{},mainThreadDelegate:b}),this._defaultQueryJSON=new p.A({outSpatialReference:y}).toJSON();let v=null;if(null!=g){const e=d.A.fromJSON(g);await(0,u.initializeProjection)(e.spatialReference,y),v=(0,u.project)(e,y)}return this._tileManager=new C({loadTile:(e,t)=>this._fetcher.fetch(e,t),createAddFeatureDataCommand:(e,t)=>this._createAddFeatureDataCommand(e,t),createRemoveFeatureDataCommand:e=>this._createRemoveFeatureDataCommand(e),createUpdateFeatureDataVisibilityCommand:(e,t)=>this._createUpdateFeatureDataVisibilityCommand(e,t),extent:v}),this.addHandles((0,a.wB)((()=>this.updating),(e=>{this.emit("notify-updating",{updating:e})})),a.Vh),await this._renderer.load(),qr}async executeQuery(e,t){return{result:await this._queryEngine.executeQuery(this._ensureQuery(e),t)}}async executeQueryForIds(e,t){const r=await this._queryEngine.executeQueryForIdSet(this._ensureQuery(e),t);return{result:Array.from(r)}}async executeQueryForCount(e,t){return{result:await this._queryEngine.executeQueryForCount(this._ensureQuery(e),t)}}async executeQueryForExtent(e,t){return{result:await this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t)}}async executeQueryForLatestObservations(e,t){return{result:await this._queryEngine.executeQueryForLatestObservations(this._ensureQuery(e),t)}}async onTileTreeChange(e){return await this._tileManager.onTileTreeChange(e),qr}async onElevationChange(e){return qr}async _createAddFeatureDataCommand(e,t){const r=this._featureStore,n=await this._renderer.createAddCommand(e);return(0,s.Te)(t),n.appendPipelineStateCommand((()=>{r.addTile(e)})),n}async _createRemoveFeatureDataCommand(e){const t=this._featureStore,r=this._renderer,n=await r.createRemoveCommand(e);return n.appendPipelineStateCommand((()=>{t.removeTile(e)})),n}async _createUpdateFeatureDataVisibilityCommand(e,t){const r=this._renderer,n=await r.createUpdateVisibilityCommand(e);return(0,s.Te)(t),n}_ensureQuery(e){return e??this._defaultQueryJSON}};(0,n._)([(0,o.MZ)()],Nr.prototype,"updating",null),Nr=(0,n._)([(0,c.$)("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorker")],Nr);const Lr=Nr,qr={result:void 0}},69418:(e,t,r)=>{r.d(t,{S:()=>c,z:()=>l});var n=r(83047),i=r(21325),s=r(43334),a=r(58512),o=r(92722);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class c{constructor(e){this._options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new a.A}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,i.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,n.G9)(this._options.sourceSpatialReference)/(0,n.G9)(e.spatialReference);if(1!==t)for(const r of e.features){if(!(0,s.N3)(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new s.Om(null,{},null,0)}createSpatialReference(){return{wkid:0}}createGeometry(){return new o.A}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new o.A}}},72385:(e,t,r)=>{function n(){return new Float32Array(3)}function i(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function s(e,t,r){const n=new Float32Array(3);return n[0]=e,n[1]=t,n[2]=r,n}function a(){return n()}function o(){return s(1,1,1)}function l(){return s(1,0,0)}function c(){return s(0,1,0)}function d(){return s(0,0,1)}r.d(t,{fA:()=>s,o8:()=>i,vt:()=>n});const u=a(),h=o(),f=l(),p=c(),m=d();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:f,UNIT_Y:p,UNIT_Z:m,ZEROS:u,clone:i,create:n,fromValues:s,ones:o,unitX:l,unitY:c,unitZ:d,zeros:a},Symbol.toStringTag,{value:"Module"}))},75503:(e,t,r)=>{r.d(t,{E:()=>C,w:()=>o});var n=r(4576),i=r(21818),s=(r(44208),r(3694)),a=r(11006);class o{constructor(e=9,t){this._compareMinX=h,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),x.prune(),w.prune(),S.prune(),A.prune()}all(e){l(this._data,e)}search(e,t){let r=this._data;const n=this._toBBox;if(b(e,r))for(x.clear();r;){for(let i=0,s=r.children.length;i<s;i++){const s=r.children[i],a=r.leaf?n(s):s;b(e,a)&&(r.leaf?t(s):_(e,a)?l(s,t):x.push(s))}r=x.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!b(e,t))return!1;for(x.clear();t;){for(let n=0,i=t.children.length;n<i;n++){const i=t.children[n],s=t.leaf?r(i):i;if(b(e,s)){if(t.leaf||_(e,s))return!0;x.push(i)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new T([]),this}remove(e){if(!e)return this;let t,r=this._data,s=null,a=0,o=!1;const l=this._toBBox(e);for(S.clear(),A.clear();r||S.length>0;){if(r||(r=S.pop(),s=S.data[S.length-1],a=A.pop()??0,o=!0),r.leaf&&(t=(0,n.qh)(r.children,(0,i.zI)(e),r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),S.push(r),this._condense(S),this;o||r.leaf||!_(r,l)?s?(a++,r=s.children[a],o=!1):r=null:(S.push(r),A.push(a),a=0,s=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,n){const i=r-t+1;let s=this._maxEntries;if(i<=s){const n=new T(e.slice(t,r+1));return c(n,this._toBBox),n}n||(n=Math.ceil(Math.log(i)/Math.log(s)),s=Math.ceil(i/s**(n-1)));const a=new O([]);a.height=n;const o=Math.ceil(i/s),l=o*Math.ceil(Math.sqrt(s));v(e,t,r,l,this._compareMinX);for(let i=t;i<=r;i+=l){const t=Math.min(i+l-1,r);v(e,i,t,o,this._compareMinY);for(let r=i;r<=t;r+=o){const i=Math.min(r+o-1,t);a.children.push(this._build(e,r,i,n-1))}}return c(a,this._toBBox),a}_insert(e,t,r){const n=this._toBBox,i=r?e:n(e);S.clear();const s=function(e,t,r,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==r;){let r,n=1/0,i=1/0;for(let s=0,a=t.children.length;s<a;s++){const a=t.children[s],o=p(a),l=g(e,a)-o;l<i?(i=l,n=o<n?o:n,r=a):l===i&&o<n&&(n=o,r=a)}t=r||t.children[0]}return t}(i,this._data,t,S);for(s.children.push(e),u(s,i);t>=0&&S.data[t].children.length>this._maxEntries;)this._split(S,t),t--;!function(e,t,r){for(let n=r;n>=0;n--)u(t.data[n],e)}(i,S,t)}_split(e,t){const r=e.data[t],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);const s=this._chooseSplitIndex(r,i,n);if(!s)return;const a=r.children.splice(s,r.children.length-s),o=r.leaf?new T(a):new O(a);o.height=r.height,c(r,this._toBBox),c(o,this._toBBox),t?e.data[t-1].children.push(o):this._splitRoot(r,o)}_splitRoot(e,t){this._data=new O([e,t]),this._data.height=e.height+1,c(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let n,i,s;n=i=1/0;for(let a=t;a<=r-t;a++){const t=d(e,0,a,this._toBBox),o=d(e,a,r,this._toBBox),l=y(t,o),c=p(t)+p(o);l<n?(n=l,s=a,i=c<i?c:i):l===n&&c<i&&(i=c,s=a)}return s}_chooseSplitAxis(e,t,r){const n=e.leaf?this._compareMinX:h,i=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,r,n)<this._allDistMargin(e,t,r,i)&&e.children.sort(n)}_allDistMargin(e,t,r,n){e.children.sort(n);const i=this._toBBox,s=d(e,0,t,i),a=d(e,r-t,r,i);let o=m(s)+m(a);for(let n=t;n<r-t;n++){const t=e.children[n];u(s,e.leaf?i(t):t),o+=m(s)}for(let n=r-t-1;n>=t;n--){const t=e.children[n];u(a,e.leaf?i(t):t),o+=m(a)}return o}_condense(e){for(let t=e.length-1;t>=0;t--){const r=e.data[t];if(0===r.children.length)if(t>0){const i=e.data[t-1],s=i.children;s.splice((0,n.qh)(s,r,s.length,i.indexHint),1)}else this.clear();else c(r,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let r=e;for(w.clear();r;){if(!0===r.leaf)for(const e of r.children)t((0,i.zI)(e));else w.pushArray(r.children);r=w.pop()??null}}function c(e,t){d(e,0,e.children.length,t,e)}function d(e,t,r,n,i){i||(i=new T([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let s,a=t;a<r;a++)s=e.children[a],u(i,e.leaf?n(s):s);return i}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const r=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,i-r)*Math.max(0,s-n)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function b(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,r,n,i){const s=[t,r];for(;s.length;){const t=s.pop(),r=s.pop();if(t-r<=n)continue;const o=r+Math.ceil((t-r)/n/2)*n;(0,a.q)(e,o,r,t,i),s.push(r,o,o,t)}}const x=new s.A,w=new s.A,S=new s.A,A=new s.A({deallocator:void 0});class C{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class I extends C{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class T extends I{constructor(e){super(),this.children=e,this.leaf=!0}}class O extends I{constructor(e){super(),this.children=e,this.leaf=!1}}},76357:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(90237),i=r(66552),s=r(25482),a=r(10107),o=(r(44208),r(53966),r(87811),r(93223)),l=r(40608);const c=new i.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends s.A{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,o.e)(c),(0,a.MZ)({json:{write:{isRequired:!0}}})],d.prototype,"type",void 0),d=(0,n._)([(0,l.$)("esri.layers.support.Domain")],d);const u=d},79677:(e,t,r)=>{r.d(t,{A:()=>f});var n,i=r(90237),s=r(25482),a=r(88930),o=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),c=r(40608),d=r(43937),u=r(98623);let h=class extends s.A{static{n=this}static get allTime(){return p}static get empty(){return m}static fromArray(e){return new n({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===n&&r===i}expandTo(e,t=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,a.lL)(r,e,t));let i=this.end;if(i){const r=(0,a.lL)(i,e,t);i=i.getTime()===r.getTime()?r:(0,a.S1)(r,1,e,t)}return new n({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let a,o;return i>=t&&i<=r?a=i:t>=i&&t<=s&&(a=t),r>=i&&r<=s?o=r:s>=t&&s<=r&&(o=s),null==a||null==o||isNaN(a)||isNaN(o)?n.empty:new n({start:a===-1/0?null:new Date(a),end:o===1/0?null:new Date(o)})}offset(e,t,r=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new n,{start:s,end:o}=this;return null!=s&&(i.start=(0,a.S1)(s,e,t,r)),null!=o&&(i.end=(0,a.S1)(o,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:r})}};(0,i._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,i._)([(0,l.w)("end")],h.prototype,"readEnd",null),(0,i._)([(0,d.K)("end")],h.prototype,"writeEnd",null),(0,i._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,i._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,i._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,i._)([(0,l.w)("start")],h.prototype,"readStart",null),(0,i._)([(0,d.K)("start")],h.prototype,"writeStart",null),h=n=(0,i._)([(0,c.$)("esri.time.TimeExtent")],h);const f=h,p=new h,m=new h({start:void 0,end:void 0})},80451:(e,t,r)=>{r.d(t,{rS:()=>g,gK:()=>m}),r(44208);var n,i=r(53177),s=r(76357),a=r(90237),o=(r(53966),r(87811),r(49186),r(93223)),l=r(40608);let c=class extends s.A{static{n=this}constructor(e){super(e),this.type="inherited"}clone(){return new n}};(0,a._)([(0,o.e)({inherited:"inherited"})],c.prototype,"type",void 0),c=n=(0,a._)([(0,l.$)("esri.layers.support.InheritedDomain")],c);const d=c;var u,h=r(10107);let f=class extends s.A{static{u=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new u({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,a._)([(0,h.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]},isRequired:!0}}})],f.prototype,"maxValue",void 0),(0,a._)([(0,h.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]},isRequired:!0}}})],f.prototype,"minValue",void 0),(0,a._)([(0,o.e)({range:"range"})],f.prototype,"type",void 0),f=u=(0,a._)([(0,l.$)("esri.layers.support.RangeDomain")],f);const p=f,m={key:"type",base:s.A,typeMap:{range:p,"coded-value":i.A,inherited:d}};function g(e){if(!e?.type)return null;switch(e.type){case"range":return p.fromJSON(e);case"codedValue":return i.A.fromJSON(e);case"inherited":return d.fromJSON(e)}return null}},80893:(e,t,r)=>{r.d(t,{IJ:()=>p,Jf:()=>_,Pk:()=>g,eW:()=>f,gW:()=>y,kS:()=>m});var n=r(78888),i=r(84952),s=r(65864),a=r(17136),o=r(21325),l=r(10536),c=r(66208),d=r(58501);const u="Layer does not support extent calculation.";function h(e,t){const r=e.geometry,n=e.toJSON();delete n.compactGeometryEnabled,delete n.defaultSpatialReferenceEnabled;const i=n;let a,l,c;if(null!=r&&(l=r.spatialReference,c=(0,o.YX)(l),i.geometryType=(0,s.$B)(r),i.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const r=e.toJSON();return delete r.spatialReference,JSON.stringify(r)}(r,e.compactGeometryEnabled),i.inSR=c),n.groupByFieldsForStatistics&&(i.groupByFieldsForStatistics=n.groupByFieldsForStatistics.join(",")),n.objectIds&&(i.objectIds=n.objectIds.join(",")),n.orderByFields&&(i.orderByFields=n.orderByFields.join(",")),!n.outFields||!n.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete i.outFields:n.outFields.includes("*")?i.outFields="*":i.outFields=n.outFields.join(","),n.outSR?(i.outSR=(0,o.YX)(n.outSR),a=e.outSpatialReference):r&&(n.returnGeometry||n.returnCentroid)&&(i.outSR=i.inSR,a=l),n.returnGeometry&&delete n.returnGeometry,n.outStatistics&&(i.outStatistics=JSON.stringify(n.outStatistics)),n.fullText&&(i.fullText=JSON.stringify(n.fullText)),n.pixelSize&&(i.pixelSize=JSON.stringify(n.pixelSize)),n.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=l&&null!=e.quantizationParameters?.extent&&l.equals(e.quantizationParameters.extent.spatialReference)&&delete n.quantizationParameters.extent.spatialReference,i.quantizationParameters=JSON.stringify(n.quantizationParameters)),n.parameterValues&&(i.parameterValues=JSON.stringify(n.parameterValues)),n.rangeValues&&(i.rangeValues=JSON.stringify(n.rangeValues)),n.dynamicDataSource&&(i.layer=JSON.stringify({source:n.dynamicDataSource}),delete n.dynamicDataSource),n.timeExtent){const e=n.timeExtent,{start:t,end:r}=e;null==t&&null==r||(i.time=t===r?t:`${t??"null"},${r??"null"}`),delete n.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=l&&null!=a&&l.equals(a)&&(i.defaultSR=i.inSR,delete i.inSR,delete i.outSR),i}async function f(e,t,r,n){const i=null!=t.timeExtent&&t.timeExtent.isEmpty?{data:{features:[]}}:await b(e,t,"json",n);return(0,d.q)(t,r,i.data),i}async function p(e,t,r,n){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:r.createFeatureResult()};const i=await m(e,t,n),s=i;return s.data=(0,c.m)(i.data,r),s}function m(e,t,r){return b(e,t,"pbf",r)}function g(e,t,r){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):b(e,t,"json",r,{returnIdsOnly:!0})}function y(e,t,r){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):b(e,t,"json",r,{returnIdsOnly:!0,returnCountOnly:!0})}async function _(e,t,r){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:{count:0,extent:null}};const n=await b(e,t,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}),i=n.data;if(i.hasOwnProperty("extent"))return n;if(i.features)throw new Error(u);if(i.hasOwnProperty("count"))throw new Error(u);return n}async function b(e,t,r,s={},o={}){const c="string"==typeof e?(0,i.An)(e):e,d=t.geometry?[t.geometry]:[],u=await(0,a.el)(d,null,{signal:s.signal}),f=u?.[0];null!=f&&((t=t.clone()).geometry=f);const p=(0,l.z)({...c.query,f:r,...o,...h(t,o)});return(0,n.A)((0,i.fj)(c.path,(m=o,null==t.formatOf3DObjects||m.returnCountOnly||m.returnExtentOnly||m.returnIdsOnly?"query":"query3d")),{...s,responseType:"pbf"===r?"array-buffer":"json",query:{...p,...s.query}});var m}},95696:(e,t,r)=>{r.d(t,{A:()=>u});var n,i=r(90237),s=r(69540),a=r(25482),o=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),c=r(40608);let d=class extends(s.A.ClonableMixin(a.A)){static{n=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new n}};(0,i._)([(0,l.e)({georeferenced:"georeferenced"},{readOnly:!0})],d.prototype,"type",void 0),(0,i._)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],d.prototype,"origin",void 0),d=n=(0,i._)([(0,c.$)("esri.geometry.support.MeshGeoreferencedVertexSpace")],d);const u=d}}]);
|
|
319
|
+
}`)}},66208:(e,t,r)=>{r.d(t,{m:()=>i});var n=r(53655);function i(e,t){const r=(0,n.SH)(e,t),i=r.queryResult.featureResult,s=r.queryResult.queryGeometry,a=r.queryResult.queryGeometryType;if(i&&i.features&&i.features.length&&i.objectIdFieldName){const e=i.objectIdFieldName;for(const t of i.features)t.attributes&&(t.objectId=t.attributes[e])}return i&&(i.queryGeometry=s,i.queryGeometryType=a),i}},66344:(e,t,r)=>{var n,i;r.d(t,{q:()=>l}),(i=n||(n={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME";class s{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear()}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const r=this._db.get(e.id+t);return r?.size??0}put(e,t,r,i,s){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==r&&this._notifyRemove(t,o.entry,o.size,n.ALL)),i>this._maxSize)return void this._notifyRemove(t,r,i,n.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return console.warn(`Refusing to cache entry with size ${i} for key ${t}`),void this._notifyRemove(t,r,0,n.ALL);const l=1+Math.max(s,-4)- -3;this._db.set(t,new a(r,i,l)),this._size+=i,e.size+=i,this._checkSize()}updateSize(e,t,r,i){t=e.id+t;const s=this._db.get(t);if(s&&s.entry===r){for(this._size-=s.size,e.size-=s.size;i>this._maxSize;){const e=this._notifyRemove(t,r,i,n.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}s.size=i,this._size+=i,e.size+=i,this._checkSize()}}pop(e,t){t=e.id+t;const r=this._db.get(t);if(r)return this._size-=r.size,e.size-=r.size,this._db.delete(t),++this._hit,r.entry;++this._miss}get(e,t){t=e.id+t;const r=this._db.get(t);if(void 0!==r)return this._db.delete(t),r.lives=r.lifetime,this._db.set(t,r),++this._hit,r.entry;++this._miss}peek(e,t){const r=this._db.get(e.id+t);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},r=new Array;this._db.forEach(((e,n)=>{const i=e.lifetime;r[i]=(r[i]||0)+e.size,this._users.forEach((r=>{const{id:i,name:s}=r;if(n.startsWith(i)){const r=t[s]||0;t[s]=r+e.size}}))}));const n={};this._users.forEach((e=>{const r=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const i=t[r]||0;t[r]=i,n[r]=Math.round(100*e.hitRate)+"%"}else n[r]="0%"}));const i=Object.keys(t);i.sort(((e,r)=>t[r]-t[e])),i.forEach((r=>e[r]=Math.round(t[r]/2**20)+"MB / "+n[r]));for(let t=r.length-1;t>=0;--t){const n=r[t];n&&(e["Priority "+(t+-3-1)]=Math.round(n/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,r)=>{r.startsWith(t)&&(this._size-=e.size,this._db.delete(r),this._notifyRemove(r,e.entry,e.size,n.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,n.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,r,n){const i=this._users.get(e.split(o)[0])?.removeFunc,s=i?.(t,n,r);return"number"==typeof s?s:null}_checkSize(){this._sizeLimits.forEach(((e,t)=>this._checkSizeLimits(e,t))),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const r=t??this;if(r.size<=e)return;const n=t?.id;let i=!0;for(;i;){i=!1;for(const[s,a]of this._db)if(0===a.lifetime&&(!n||s.startsWith(n))){const n=t??this._users.get(s.split(o)[0]);if(this._purgeItem(s,a,n),r.size<=.9*e)return;i||=this._db.has(s)}}for(const[i,s]of this._db)if(!n||i.startsWith(n)){const n=t??this._users.get(i.split(o)[0]);if(this._purgeItem(i,s,n),r.size<=.9*e)return}}_purgeItem(e,t,r){if(this._db.delete(e),t.lives<=1){this._size-=t.size,r&&(r.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,n.SOME);null!=i&&i>0&&(this._size+=i,r&&(r.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class a{constructor(e,t,r){this.entry=e,this.size=t,this.lifetime=r,this.lives=r}}const o=":";class l{constructor(e,t){this.removeFunc=t,this._storage=new s,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,r=1){this._storage.put(this,e,t,r,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},67063:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Lr});var n=r(90237),i=r(65529),s=r(74887),a=r(36708),o=r(10107),l=r(44208),c=(r(53966),r(87811),r(40608)),d=r(5443),u=r(80586),h=r(16930),f=r(68298),p=r(61956),m=r(69622),g=r(4576),y=r(32587),_=r(44794),b=r(19419),v=r(69397),x=r(24326);function w(e=""){return`${e}${(0,x.c)()}`}r(37539),new Float64Array(3);class S{constructor(e,t){this._parent=e,this._subsetIndices=t,this.id=w(`featureDataSubset-${e.id}-`)}get extent(){return this._parent.extent}get featureCount(){return this._subsetIndices.length}get usedMemory(){return this._parent.usedMemory+v.qK+this._subsetIndices.byteLength}get isFullyEnabled(){for(const e of this._subsetIndices)if(!this._parent.getEnabled(e))return!1;return!0}getObjectId(e){return this._parent.getObjectId(this._subsetIndices[e])}getAttribute(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributeAsTimestamp(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributes(e){return this._parent.getAttributes(this._subsetIndices[e])}getCoordinates(e,t,r){return this._parent.getCoordinates(this._subsetIndices[e],t,r)}getOptimizedGeometry(e){return this._parent.getOptimizedGeometry(this._subsetIndices[e])}getCentroid(e,t){return this._parent.getCentroid(this._subsetIndices[e],t)}getBounds(e){return this._parent.getBounds(this._subsetIndices[e])}getBoundingBox(e){return this._parent.getBoundingBox(this._subsetIndices[e])}getObjectIdsArray(e,t,r){return this._parent.getObjectIdsArray(e,this._translatedIndices(t),r)}getCoordinatesArray(e,t,r){return this._parent.getCoordinatesArray(e,this._translatedIndices(t),r)}objectIds(e){return this._parent.objectIds(this._translatedIndices(e))}subset(e){const{_subsetIndices:t}=this,r=new Uint32Array(e.length);for(let n=0;n<r.length;++n)r[n]=t[e[n]];return new S(this._parent,r)}disableObjectIds(e){if(0===e.size)return;const{featureCount:t}=this,r=new Array;for(let n=0;n<t;++n)this.getEnabled(n)&&e.has(this.getObjectId(n))&&r.push(n);if(0!==r.length)for(const e of r)this.setEnabled(e,!1)}setEnabled(e,t){this._parent.setEnabled(this._subsetIndices[e],t)}getEnabled(e){return this._parent.getEnabled(this._subsetIndices[e])}enableAll(){const{_subsetIndices:e,_parent:t}=this;for(const r of e)t.setEnabled(r,!0)}getVisibilityArray(e,t,r){return this._parent.getVisibilityArray(e,this._translatedIndices(t),r)}enabledObjectIds(e){return this._parent.enabledObjectIds(this._translatedIndices(e))}*_translatedIndices(e){const{_subsetIndices:t}=this;if(null!=e)for(const r of e)yield t[r];else yield*t}}class A{constructor(e){this._tile=e,this.id=w(`featureData-${e.id}-`),this._enabled=new Array(e.featureCount).fill(!0)}get featureCount(){return this._tile.featureCount}get usedMemory(){return v.qK+(0,v.$B)(this.id)}get extent(){return this._tile.descriptor.extent}get isFullyEnabled(){return this._enabled.every((e=>e))}getObjectId(e){return this._tile.getObjectId(e)}getAttribute(e,t){return this._tile.getAttribute(e,t)}getAttributeAsTimestamp(e,t){return this._tile.getAttribute(e,t)}getAttributes(e){return this._tile.getAttributes(e)}getCoordinates(e,t,r){return this._tile.getCoordinates(e,t,r)}getOptimizedGeometry(e){return this._tile.getOptimizedGeometry(e)}getCentroid(e,t){return this._tile.getCentroid(e,t)}getBounds(e){return this._tile.getBounds(e)}getBoundingBox(e){return this._tile.getBoundingBox(e)}getObjectIdsArray(e,t,r){return this._tile.getObjectIdsArray(e,t,r)}getCoordinatesArray(e,t,r){return this._tile.getCoordinatesArray(e,t,r)}objectIds(e){return this._tile.objectIds(e)}subset(e){return new S(this,e)}disableObjectIds(e){if(0===e.size)return;const{_enabled:t}=this,r=new Array;for(const n of this._allFeatureIndices())t[n]&&e.has(this.getObjectId(n))&&r.push(n);if(0!==r.length)for(const e of r)t[e]=!1}setEnabled(e,t){this._enabled[e]=t}getEnabled(e){return this._enabled[e]}enableAll(){this._enabled.fill(!0)}getVisibilityArray(e,t=this._allFeatureIndices(),r=0){const{_enabled:n}=this;for(const i of t)e[r++]=Number(n[i]);return r}*enabledObjectIds(e=this._allFeatureIndices()){const{_enabled:t}=this;for(const r of e)t[r]&&(yield this.getObjectId(r))}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}}let C=class extends m.A{constructor(e){super(e),this._updatingCount=0,this.extent=null,this._tileHandles=new y.A,this._wanted=new y.A}destroy(){for(const e of this._tileHandles.values())e.abort();this._tileHandles.clear(),this._wanted.clear()}get updating(){return this._updatingCount>0}get _boundingRect(){const{extent:e}=this;return null==e?null:(0,b.VY)(e)}get _missingTiles(){const e=new Array,t=this._wanted;for(const r of this._tileHandles.values())t.has(r.id)&&!O(r)&&e.push(r);return e}async onTileTreeChange(e){++this._updatingCount;try{const{added:t,removed:r}=e,n=this._tileHandles,{_boundingRect:i}=this,s=null!=i?t.filter((e=>(0,b.HY)(i,e.extent))):t,a=this._wanted,o=new Array;for(const e of r){const{id:r}=e;if(a.delete(r),t.some((t=>I(t,e)||I(e,t))))continue;const i=n.get(r);null!=i&&o.push(this._removeTile(i))}for(const e of s)a.set(e.id,e),o.push(this._addTile(e));await Promise.allSettled(o)}finally{--this._updatingCount}}async _removeTile(e){this._tileHandles.delete(e.id),this._validate(),e.abort();const{featureData:t}=e,r=new R(e.untilSettled(),null!=t?this.createRemoveFeatureDataCommand(t.id):null);e.nextEvent=null;const{command:n}=await r.getCommand();n?.execute()}async _addTile(e){const{_tileHandles:t}=this,r=t.get(e.id);if(null!=r)return!O(r)||r.featureData.isFullyEnabled||(r.featureData.enableAll(),r.nextEvent=this._onTileLoad(r)),void await r.untilSettled();const n=new T(e);this._tileHandles.set(n.id,n);const i=this.loadTile(e,n.signal);n.nextEvent=i;const a=await i;if(n.aborted)throw(0,s.NK)();n.featureData=new A(a),function(e){if(!O(e))throw new Error}(n),n.nextEvent=this._onTileLoad(n),await n.untilSettled()}async _onTileLoad(e){const{_wanted:t,_tileHandles:r,_missingTiles:n}=this,i=e.descriptor,s=new Array,a=new Array,o=new Set;for(const l of r.values()){if(l===e)continue;const{descriptor:c,id:d}=l;if(t.has(d)||n.some((({descriptor:e})=>I(e,c)||I(c,e)))){if(O(l)){if(I(i,c)){const e=l.featureData;for(const t of e.objectIds())o.add(t)}if(I(c,i)){const t=e.featureData,r=new Set(t.objectIds()),{featureData:n}=l;n.disableObjectIds(r);const i=AbortSignal.any([l.signal,e.signal]),o=l.untilSettled();s.push(new R(o,this.createUpdateFeatureDataVisibilityCommand(n),i)),a.push(l),this._validateRemoval(n,r)}}}else{l.abort(),r.delete(d);const{featureData:e}=l;null!=e&&s.push(new R(l.untilSettled(),this.createRemoveFeatureDataCommand(e.id))),l.nextEvent=null}}o.size>0&&(e.featureData.disableObjectIds(o),this._validateRemoval(e.featureData,o)),this._validate(),s.push(new R(e.untilSettled(),this.createAddFeatureDataCommand(e.featureData,e.signal),e.signal)),a.push(e);const l=this._joinCommands(s);for(const e of a)e.nextEvent=l;await l}async _joinCommands(e){const t=(await Promise.allSettled(e.map((async e=>e.getCommand())))).map((e=>"fulfilled"!==e.status||e.value.signal?.aborted?null:e.value.command)).filter(g.Ru);0!==t.length&&t.reduce(((e,t)=>(e.append(t),e))).execute()}_validate(){if(!(0,l.A)("feature-pipeline-3d-test-validation"))return;const e=new Array;for(const t of this._tileHandles.values()){if(!O(t))continue;const{featureData:r}=t;e.push({featureData:r,objectIds:new Set(r.enabledObjectIds())})}for(let t=0;t<e.length;++t){const{featureData:r,objectIds:n}=e[t];for(let i=t+1;i<e.length;++i){const{featureData:t,objectIds:s}=e[i];for(const e of s)if(n.has(e))throw new Error(`${r.id} and ${t.id} both contain ${e}.`)}}}_validateRemoval(e,t){if((0,l.A)("feature-pipeline-3d-test-validation"))for(const r of e.enabledObjectIds())if(t.has(r))throw new Error(`Failed to remove ${r} from ${e.id}!`)}};function I({lij:[e,t,r]},{lij:[n,i,s]}){const a=n-e;return a>=0&&t===i>>a&&r===s>>a}(0,n._)([(0,o.MZ)()],C.prototype,"updating",null),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"loadTile",void 0),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"createAddFeatureDataCommand",void 0),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"createRemoveFeatureDataCommand",void 0),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"createUpdateFeatureDataVisibilityCommand",void 0),(0,n._)([(0,o.MZ)()],C.prototype,"_updatingCount",void 0),(0,n._)([(0,o.MZ)()],C.prototype,"extent",void 0),(0,n._)([(0,o.MZ)()],C.prototype,"_boundingRect",null),(0,n._)([(0,o.MZ)()],C.prototype,"_missingTiles",null),C=(0,n._)([(0,c.$)("esri.views.3d.layers.graphics.pipeline.Tile3DManager")],C);class T{constructor(e){this.descriptor=e,this._controller=new AbortController,this._featureData=(0,_.v)(null),this.nextEvent=null}get id(){return this.descriptor.id}get featureData(){return this._featureData.value}set featureData(e){this._featureData.value=e}get signal(){return this._controller.signal}abort(){this._controller.abort()}get aborted(){return this._controller.signal.aborted}async untilSettled(){try{await this.nextEvent}catch(e){(0,s.zf)(e)||console.error(e)}}}function O(e){return null!=e.featureData}class R{constructor(e,t,r){this.previousEventSettled=e,this.commandPromise=t,this.signal=r}async getCommand(){const{previousEventSettled:e,commandPromise:t,signal:r}=this,[n]=await Promise.all([t,e]);if(r?.aborted)throw(0,s.NK)();return{command:n,signal:r}}}var M=r(75503),E=r(27647),P=r(92722);class z{constructor(e,t){this._index=e,this._view=t}get usedMemory(){return v.qK+v.RS}getObjectId(){return this._view.getObjectId(this._index)}getAttribute(e){return this._view.getAttribute(this._index,e)}getAttributeAsTimestamp(e){return this._view.getAttributeAsTimestamp(this._index,e)}getAttributes(){return this._view.getAttributes(this._index)}getOptimizedGeometry(){return this._view.getOptimizedGeometry(this._index)}getCentroid(e){return this._view.getCentroid(this._index,e)}getBounds(){return this._view.getBounds(this._index)}getBoundingBox(){return this._view.getBoundingBox(this._index)}cloneWithGeometry(e){return new F(this._index,this._view,e)}}class F extends z{constructor(e,t,r){super(e,t),this._geometryOverride=r}getOptimizedGeometry(){return this._geometryOverride}getCentroid(e){return(0,E.Q)(new P.A,this._geometryOverride,e.hasZ,e.hasM)}}class D{constructor(e,t){this.featureData=e,this.bounds=t}}class B{constructor(){this._tileBounds=new Map,this.events=new i.A,this.featureAdapter=j.shared}get usedMemory(){return v.qK+v.qK*this._tileBounds.size}addTile(e){const{featureCount:t}=e;if(0===t)return;const r=new M.w(9,(t=>e.getBounds(t))),n=new Array;for(let e=0;e<t;++e)n[e]=e;r.load(n),this._tileBounds.set(e.id,new D(e,r)),this.events.emit("changed")}removeTile(e){this._tileBounds.delete(e),this.events.emit("changed")}clear(){this._tileBounds.clear(),this.events.emit("changed")}forEach(e){for(const{featureData:t,bounds:r}of this._tileBounds.values())r.all((r=>{t.getEnabled(r)&&e(new z(r,t))}))}forEachInBounds(e,t){V.minX=e[0],V.minY=e[1],V.maxX=e[2],V.maxY=e[3];for(const{featureData:e,bounds:r}of this._tileBounds.values())r.search(V,(r=>{e.getEnabled(r)&&t(new z(r,e))}))}forEachBounds(e,t){for(const r of e)t(r.getBoundingBox())}getFullExtent(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;for(const{bounds:e}of this._tileBounds.values()){const{minX:s,minY:a,maxX:o,maxY:l}=e.toJSON();t=Math.min(t,s),r=Math.min(r,a),n=Math.min(n,o),i=Math.min(i,l)}return{xmin:t,ymin:r,xmax:n,ymax:i,spatialReference:e}}}class j{static{this.shared=new j}getObjectId(e){return e.getObjectId()}getAttribute(e,t){return e.getAttribute(t)}getAttributeAsTimestamp(e,t){return e.getAttributeAsTimestamp(t)}getAttributes(e){return e.getAttributes()}getGeometry(e){return e.getOptimizedGeometry()}getCentroid(e,t){return e.getCentroid(t)}cloneWithGeometry(e,t){return e.cloneWithGeometry(t)}}const V=new M.E;var k=r(80893);class U{constructor(e,t,r){this.descriptor=e,this._pages=t,this._pageSize=r;const n=v.ez+t.reduce(((e,{usedMemory:t})=>e+t),0),i=3*v.RS;this.usedMemory=v.qK+n+i,this.featureCount=t.reduce(((e,t)=>e+t.featureCount),0)}get id(){return this.descriptor.id}getObjectId(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getObjectId(r)}getAttribute(e,t){const{pageIndex:r,featurePageIndex:n}=this._translateIndex(e);return this._pages[r].getAttribute(n,t)}getAttributeAsTimestamp(e,t){const{pageIndex:r,featurePageIndex:n}=this._translateIndex(e);return this._pages[r].getAttributeAsTimestamp(n,t)}getAttributes(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getAttributes(r)}getCoordinates(e,t,r){const{pageIndex:n,featurePageIndex:i}=this._translateIndex(e);this._pages[n].getCoordinates(i,t,r)}getOptimizedGeometry(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getOptimizedGeometry(r)}getCentroid(e,t){const{pageIndex:r,featurePageIndex:n}=this._translateIndex(e);return this._pages[r].getCentroid(n,t)}getBounds(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBounds(r)}getBoundingBox(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBoundingBox(r)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){let n=r;for(const{page:r,indices:i}of this._batchPageIndices(t))n=r.getObjectIdsArray(e,i,n);return n}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){let n=r;for(const{page:r,indices:i}of this._batchPageIndices(t))n=r.getCoordinatesArray(e,i,n);return n}*objectIds(e=this._allFeatureIndices()){for(const{page:t,indices:r}of this._batchPageIndices(e))for(const e of t.objectIds(r))yield e}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_translateIndex(e){const{_pageSize:t}=this;return{pageIndex:Math.floor(e/t),featurePageIndex:e%t}}*_batchPageIndices(e){const t=new Array;{let r=0,n=new Array;for(const i of e){const{pageIndex:e,featurePageIndex:s}=this._translateIndex(i);r!==e&&(0!==n.length&&t.push({pageIndex:r,indices:n}),r=e,n=[]),n.push(s)}0!==n.length&&t.push({pageIndex:r,indices:n})}const{_pages:r}=this;for(const{pageIndex:e,indices:n}of t)yield{page:r[e],indices:n}}}var N=r(49186),L=r(51624),q=r(51850),H=r(70328),G=r(62577),$=r(95466),Y=r(53655);class W{constructor(e){this._reader=new L.A(new Uint8Array(e),new DataView(e)),this._index=function(e){for(;e.next();){if(2===e.tag())return X(e.getMessage());e.skip()}Q()}(this._reader)}get featureCount(){return this._index.featureIndices.length}get exceededTransferLimit(){return this._index.exceededTransferLimit}get usedMemory(){return this._reader.usedMemory}getObjectId(e){return this.getAttribute(e,this._index.objectIdFieldName)}getAttribute(e,t){const{_index:{fieldsIndex:r,attributeIndices:n}}=this,i=r.get(t)?.index;if(null==i)return;const s=n[e*r.fields.length+i],a=this._reader;return a.move(s),J(a)}getAttributeAsTimestamp(e,t){const r=this.getAttribute(e,t);return"string"==typeof r?new Date(r).getTime():"number"==typeof r||null==r?r:null}getAttributes(e){const{_index:{fieldsIndex:t,attributeIndices:r}}=this,n=e*t.fields.length,i=this._reader,s={};for(const e of t.fields){const t=r[n+e.index];i.move(t),s[e.name]=J(i)}return s}getCoordinates(e,t,r=0){const n=this._reader,{transform:i,featureIndices:s}=this._index,{scale:a,translate:o}=i;n.move(s[e]),this._readCoordinates(a,o,t,r)}getOptimizedGeometry(e){const t=(0,q.vt)();return this.getCoordinates(e,t),new P.A([],t)}getCentroid(e,{hasZ:t,hasM:r}){this.getCoordinates(e,K);const[n,i,s]=K,a=[n,i];return t&&(a[3]=s),r&&(a[t?4:3]=0),new P.A([],a)}getBounds(e){this.getCoordinates(e,K);const[t,r]=K,n=new M.E;return n.minX=t,n.minY=r,n.maxX=t,n.maxY=r,n}getBoundingBox(e){this.getCoordinates(e,K);const[t,r,n]=K;return(0,H.fA)(t,r,n,t,r,n)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){const n=this._reader,{objectIdFieldName:i,attributeIndices:s,fieldsIndex:a}=this._index,o=a.get(i).index,l=a.fields.length;for(const i of t){const t=s[i*l+o];n.move(t),e[r++]=J(n)}return r}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){const n=this._reader,{transform:i,featureIndices:s}=this._index,{scale:a,translate:o}=i;for(const i of t){const t=s[i];n.move(t),r=this._readCoordinates(a,o,e,r)}return r}*objectIds(e=this._allFeatureIndices()){const t=this._reader,{objectIdFieldName:r,attributeIndices:n,fieldsIndex:i}=this._index,s=i.get(r).index,a=i.fields.length;for(const r of e){const e=n[r*a+s];t.move(e),yield J(t)}}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_readCoordinates([e,t,r],[n,i,s],a,o){const l=this._reader,c=l.getLength(),d=l.pos()+c;for(;l.pos()<d&&l.next();)switch(l.tag()){case 2:{const c=l.getLength(),d=l.pos()+c;for(;l.pos()<d&&l.next();)3===l.tag()?(l.getUInt32(),a[o++]=n+e*l.getSInt64(),a[o++]=i+t*l.getSInt64(),a[o++]=s+r*l.getSInt64()):l.skip();break}default:l.skip()}return o}}function X(e){for(;e.next();){if(1===e.tag())return Z(e.getMessage());e.skip()}Q()}function Z(e){let t,r,n=!1,i=!1,s=0;const a=new Array,o=new Array,l=new Array;for(;e.next();)switch(e.tag()){case 1:r=e.getString();break;case 7:0!==e.getEnum()&&Q();break;case 9:n=e.getBool()??!1;break;case 12:t=(0,G.Q1)(e.processMessage(Y.ae));break;case 13:{const t=e.processMessage(Y.cn);t.index=s++,a.push(t);break}case 15:{o.push(e.pos());const t=e.getUInt32(),r=e.pos()+t;for(;e.pos()<r&&e.next();)1===e.tag()?(l.push(e.pos()),e.skip()):e.skip();break}case 10:i=e.getBool()??!1;break;default:e.skip()}const c=new $.A(a);return null!=t&&i&&null!=r&&c.has(r)||Q(),{transform:t,exceededTransferLimit:n,fieldsIndex:c,objectIdFieldName:r,featureIndices:o,attributeIndices:l}}function Q(){const e=new N.A("pbf-parsing-failed","Error while parsing PBF",new Error);throw console.error(e),e}function J(e){const t=e.getLength(),r=e.pos()+t;for(;e.pos()<r&&e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}const K=(0,q.vt)();class ee{constructor(e,t,r,n,i){this.spatialReference=e,this.url=r,this.objectIdField=n,this.capabilities=i;const{supportsMaxRecordCountFactor:s,maxRecordCount:a}=this.capabilities.query,o=s?4:1,l=(a??8e3)*o;this._pageSize=Math.min(8e3,l);const c=t.clone();c.cacheHint=!0,c.resultType="tile",c.outSpatialReference=e,c.returnGeometry=!0,c.returnZ=!0,c.maxRecordCountFactor=o,c.num=this._pageSize,c.outFields=[n],this._baseQuery=c}async fetch(e,t){const{spatialReference:r,_pageSize:n}=this,i=(0,b.w1)(e.extent,r),a=this._baseQuery.clone();a.geometry=i;const o=new Array;let l=0,c=!1,d=1;for(;!c;){const e=[];for(let r=0;r<d;++r)e.push(this._fetchPage(a,l++,t));const r=await Promise.all(e);(0,s.Te)(t);for(const e of r){const t=0!==e.featureCount;c||=!e.exceededTransferLimit||!t,t&&o.push(e)}d=Math.min(d+1,4)}return new U(e,o,n)}async _fetchPage(e,t,r){const n=e.clone();n.start=t*this._pageSize;const i=(await(0,k.kS)(this.url,n,{signal:r})).data;return(0,s.Te)(r),new W(i)}}var te=r(58083),re=r(9093),ne=r(97146),ie=r(24151),se=r(29920),ae=r(46540),oe=r(51768),le=r(34727),ce=r(77690),de=r(29242),ue=r(37585),he=r(48163),fe=r(38954),pe=r(91829);var me=r(13030),ge=r(78662),ye=r(26857),_e=r(1843),be=r(49255),ve=r(40268),xe=r(16943),we=r(25634),Se=r(11725),Ae=r(13464),Ce=r(77194),Ie=r(620);class Te{constructor(){this.scale=0,this.factor=0,this.minScaleFactor=0}}var Oe=r(59907),Re=r(43616),Me=r(13259),Ee=r(97220),Pe=r(98958),ze=r(59643),Fe=r(33524),De=r(63907),Be=r(90644);class je extends Pe.w{constructor(e,t){super(e,t,new Ee.$(Me.H,(()=>r.e(8241).then(r.bind(r,48241))))),this.primitiveType=t.occlusionPass?De.WR.POINTS:De.WR.TRIANGLES}initializePipeline(e){const{oitPass:t,hasPolygonOffset:r,draped:n,output:i,depthTestEnabled:s,occlusionPass:a}=e,o=t===ze.Y.NONE,l=t===ze.Y.ColorAlpha,c=i===be.V.Highlight,d=s&&!n&&!l&&!a&&!c;return(0,Be.Ey)({blending:(0,be.RN)(i)?o?Be.RC:(0,Fe.ez)(t):null,depthTest:s&&!n?{func:De.MT.LEQUAL}:null,depthWrite:d?Be.Uy:null,drawBuffers:(0,Fe.m6)(t,i),colorWrite:Be.kn,polygonOffset:r?Ve:null})}}const Ve={factor:0,units:-4};var ke=r(53466),Ue=r(22911),Ne=r(51976),Le=r(35256);class qe extends Le.E{constructor(e){super(),this.spherical=e,this.screenCenterOffsetUnitsEnabled=!1,this.occlusionTestEnabled=!0,this.signedDistanceFieldEnabled=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.vvSize=!1,this.vvColor=!1,this.hasVerticalOffset=!1,this.hasScreenSizePerspective=!1,this.hasRotation=!1,this.debugDrawLabelBorder=!1,this.hasPolygonOffset=!1,this.depthTestEnabled=!0,this.pixelSnappingEnabled=!0,this.draped=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.occlusionPass=!1,this.occludedFragmentFade=!1,this.objectAndLayerIdColorInstanced=!1,this.horizonCullingEnabled=!0,this.isFocused=!0,this.textureCoordinateType=ke.I.None,this.emissionSource=Ue.ZX.None,this.discardInvisibleFragments=!0,this.hasVvInstancing=!1}}(0,n._)([(0,Ne.W)()],qe.prototype,"screenCenterOffsetUnitsEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"occlusionTestEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"signedDistanceFieldEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"sampleSignedDistanceFieldTexelCenter",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"vvSize",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"vvColor",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasVerticalOffset",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasScreenSizePerspective",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasRotation",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"debugDrawLabelBorder",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasPolygonOffset",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"depthTestEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"pixelSnappingEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"draped",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"terrainDepthTest",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"cullAboveTerrain",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"occlusionPass",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"occludedFragmentFade",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"objectAndLayerIdColorInstanced",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"horizonCullingEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"isFocused",void 0);var He=r(49788);class Ge extends Se.im{constructor(e,t){super(e,mt),this.produces=new Map([[Ae.N.HUD_MATERIAL,e=>(0,be.Mb)(e)&&!this.parameters.drawAsLabel],[Ae.N.LABEL_MATERIAL,e=>(0,be.Mb)(e)&&this.parameters.drawAsLabel],[Ae.N.OCCLUSION_PIXELS,()=>this.parameters.occlusionTest],[Ae.N.DRAPED_MATERIAL,e=>this.parameters.draped&&(0,be.Mb)(e)]]),this._visible=!0,this._configuration=new qe(t)}getConfiguration(e,t){const r=this.parameters.draped;return super.getConfiguration(e,t,this._configuration),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVerticalOffset=!!this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasPolygonOffset=this.parameters.polygonOffset,this._configuration.draped=r,this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this._configuration.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,this._configuration.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,this._configuration.hasRotation=this.parameters.hasRotation,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.occlusionPass=t.slot===Ae.N.OCCLUSION_PIXELS,this._configuration.occludedFragmentFade=!r&&this.parameters.occludedFragmentFade,this._configuration.horizonCullingEnabled=this.parameters.horizonCullingEnabled,this._configuration.isFocused=this.parameters.isFocused,this._configuration.depthTestEnabled=this.parameters.depthEnabled||t.slot===Ae.N.OCCLUSION_PIXELS,(0,be.RN)(e)&&(this._configuration.debugDrawLabelBorder=!!ye.b.LABELS_SHOW_BORDER),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}intersect(e,t,r,n,i,s){const{options:{selectionMode:a,hud:o,excludeLabels:l},point:c,camera:d}=r,{parameters:u}=this;if(!a||!o||l&&u.isLabel||!e.visible||!c)return;const h=e.attributes.get(ae.r.FEATUREATTRIBUTE),f=null==h?null:(0,pe.ci)(h.data,ct),{scaleX:p,scaleY:m}=bt(f,u,d.pixelRatio);(0,ce.z0)(nt,t),e.attributes.has(ae.r.FEATUREATTRIBUTE)&&function(e){const t=e[0],r=e[1],n=e[2],i=e[3],s=e[4],a=e[5],o=e[6],l=e[7],c=e[8],d=1/Math.sqrt(t*t+r*r+n*n),u=1/Math.sqrt(i*i+s*s+a*a),h=1/Math.sqrt(o*o+l*l+c*c);e[0]=t*d,e[1]=r*d,e[2]=n*d,e[3]=i*u,e[4]=s*u,e[5]=a*u,e[6]=o*h,e[7]=l*h,e[8]=c*h}(nt);const g=e.attributes.get(ae.r.POSITION),y=e.attributes.get(ae.r.SIZE),_=e.attributes.get(ae.r.NORMAL),b=e.attributes.get(ae.r.ROTATION),v=e.attributes.get(ae.r.CENTEROFFSETANDDISTANCE);(0,Ie.vA)(g.size>=3);const x=(0,Me.c)(u),w="screen"===this.parameters.centerOffsetUnits;for(let e=0;e<g.data.length/g.size;e++){const n=e*g.size;(0,fe.i)(Ze,g.data[n],g.data[n+1],g.data[n+2]),(0,fe.t)(Ze,Ze,t),(0,fe.t)(Ze,Ze,d.viewMatrix);const i=e*v.size;if((0,fe.i)(ot,v.data[i],v.data[i+1],v.data[i+2]),!w&&(Ze[0]+=ot[0],Ze[1]+=ot[1],0!==ot[2])){const e=ot[2];(0,fe.n)(ot,Ze),(0,fe.d)(Ze,Ze,(0,fe.h)(ot,ot,e))}const a=e*_.size;if((0,fe.i)(Qe,_.data[a],_.data[a+1],_.data[a+2]),Ye(Qe,nt,d,dt),vt(this.parameters,Ze,dt,d,Xe),d.applyProjection(Ze,Je),Je[0]>-1){w&&(ot[0]||ot[1])&&(Je[0]+=ot[0]*d.pixelRatio,0!==ot[1]&&(Je[1]+=(0,Ce.m0)(ot[1],Xe.factorAlignment)*d.pixelRatio),d.unapplyProjection(Je,Ze)),Je[0]+=this.parameters.screenOffset[0]*d.pixelRatio,Je[1]+=this.parameters.screenOffset[1]*d.pixelRatio,Je[0]=Math.floor(Je[0]),Je[1]=Math.floor(Je[1]);const t=e*y.size;ft[0]=y.data[t],ft[1]=y.data[t+1],(0,Ce.MD)(ft,Xe.factor,ft);const n=ut*d.pixelRatio;let i=0;u.textureIsSignedDistanceField&&(i=Math.min(u.outlineSize,.5*ft[0])*d.pixelRatio/2),ft[0]*=p,ft[1]*=m;const a=e*b.size,o=u.rotation+b.data[a];if(We(c,Je[0],Je[1],ft,n,i,o,u,x)){const e=r.ray;if((0,fe.t)(et,Ze,(0,te.B8)(st,d.viewMatrix)),Je[0]=c[0],Je[1]=c[1],d.unprojectFromRenderScreen(Je,Ze)){const t=(0,q.vt)();(0,fe.c)(t,e.direction);const r=1/(0,fe.l)(t);(0,fe.h)(t,t,r),s((0,fe.j)(e.origin,Ze)*r,t,-1,!0,1,et)}}}}}intersectDraped(e,t,r,n,i,s){const a=e.attributes.get(ae.r.POSITION),o=e.attributes.get(ae.r.SIZE),l=e.attributes.get(ae.r.ROTATION),c=this.parameters,d=(0,Me.c)(c),u=e.attributes.get(ae.r.FEATUREATTRIBUTE),h=null==u?null:(0,pe.ci)(u.data,ct),{scaleX:f,scaleY:p}=bt(h,c,e.screenToWorldRatio),m=ht*e.screenToWorldRatio;for(let t=0;t<a.data.length/a.size;t++){const r=t*a.size,u=a.data[r],h=a.data[r+1],g=t*o.size;ft[0]=o.data[g],ft[1]=o.data[g+1];let y=0;c.textureIsSignedDistanceField&&(y=Math.min(c.outlineSize,.5*ft[0])*e.screenToWorldRatio/2),ft[0]*=f,ft[1]*=p;const _=t*l.size,b=c.rotation+l.data[_];We(n,u,h,ft,m,y,b,c,d)&&i(s.dist,s.normal,-1,!1)}}createBufferWriter(){return new _t}applyShaderOffsetsView(e,t,r,n,i,s,a){const o=Ye(t,r,i,dt);return this._applyVerticalGroundOffsetView(e,o,i,a),vt(this.parameters,a,o,i,s),this._applyPolygonOffsetView(a,o,n[3],i,a),this._applyCenterOffsetView(a,n,a),a}applyShaderOffsetsNDC(e,t,r,n,i){return this._applyCenterOffsetNDC(e,t,r,n),null!=i&&(0,fe.c)(i,n),this._applyPolygonOffsetNDC(n,t,r,n),n}_applyPolygonOffsetView(e,t,r,n,i){const s=n.aboveGround?1:-1;let a=Math.sign(r);0===a&&(a=s);const o=s*a;if(this.parameters.shaderPolygonOffset<=0)return(0,fe.c)(i,e);const l=(0,le.qE)(Math.abs(t.cosAngle),.01,1),c=1-Math.sqrt(1-l*l)/l/n.viewport[2];return(0,fe.h)(i,e,o>0?c:1/c),i}_applyVerticalGroundOffsetView(e,t,r,n){const i=(0,fe.l)(e),s=r.aboveGround?1:-1,a=r.computeRenderPixelSizeAtDist(i)*ve.R,o=(0,fe.h)(Ze,t.normal,s*a);return(0,fe.g)(n,e,o),n}_applyCenterOffsetView(e,t,r){const n="screen"!==this.parameters.centerOffsetUnits;return r!==e&&(0,fe.c)(r,e),n&&(r[0]+=t[0],r[1]+=t[1],t[2]&&((0,fe.n)(Qe,r),(0,fe.g)(r,r,(0,fe.h)(Qe,Qe,t[2])))),r}_applyCenterOffsetNDC(e,t,r,n){const i="screen"!==this.parameters.centerOffsetUnits;return n!==e&&(0,fe.c)(n,e),i||(n[0]+=t[0]/r.fullWidth*2,n[1]+=t[1]/r.fullHeight*2),n}_applyPolygonOffsetNDC(e,t,r,n){const i=this.parameters.shaderPolygonOffset;if(e!==n&&(0,fe.c)(n,e),i){const e=r.aboveGround?1:-1,s=e*Math.sign(t[3]);n[2]-=(s||e)*i}return n}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:r}=this.parameters,n=e[3]>=He.Q||t>=He.Q&&r[3]>=He.Q;return this._visible&&n}createGLMaterial(e){return new $e(e)}calculateRelativeScreenBounds(e,t,r=(0,b.vt)()){return function(e,t,r,n){n[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*r,n[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*r}(this.parameters,e,t,r),r[2]=r[0]+e[0],r[3]=r[1]+e[1],r}}class $e extends we.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique(je,e)}}function Ye(e,t,r,n){return function(e){return(t=e)instanceof Float32Array&&t.length>=16||function(e){return Array.isArray(e)&&e.length>=16}(e);var t}(t)&&(t=(0,ce.z0)(it,t)),(0,fe.q)(n.normal,e,t),(0,fe.t)(n.normal,n.normal,r.viewInverseTransposeMatrix),n.cosAngle=(0,fe.f)(Ke,pt),n}function We(e,t,r,n,i,s,a,o,l){let c=t-i-n[0]*l[0],d=c+n[0]+2*i,u=r-i-n[1]*l[1],h=u+n[1]+2*i;const f=o.distanceFieldBoundingBox;return o.textureIsSignedDistanceField&&null!=f&&(c+=n[0]*f[0],u+=n[1]*f[1],d-=n[0]*(1-f[2]),h-=n[1]*(1-f[3]),c-=s,d+=s,u-=s,h+=s),(0,ue.hZ)(rt,t,r),(0,ue.e$)(tt,e,rt,(0,le.kU)(a)),tt[0]>c&&tt[0]<d&&tt[1]>u&&tt[1]<h}const Xe=new class{constructor(){this.factor=new Te,this.factorAlignment=new Te}},Ze=(0,q.vt)(),Qe=(0,q.vt)(),Je=(0,pe.vt)(),Ke=(0,q.vt)(),et=(0,q.vt)(),tt=(0,he.vt)(),rt=(0,he.vt)(),nt=(0,de.vt)(),it=(0,de.vt)(),st=(0,re.vt)(),at=(0,pe.vt)(),ot=(0,q.vt)(),lt=(0,q.vt)(),ct=(0,pe.vt)(),dt={normal:Ke,cosAngle:0},ut=1,ht=2,ft=(0,he.fA)(0,0),pt=(0,q.fA)(0,0,1);class mt extends we.NV{constructor(){super(...arguments),this.renderOccluded=Se.m$.Occlude,this.isDecoration=!1,this.color=(0,pe.CN)(1,1,1,1),this.polygonOffset=!1,this.anchorPosition=(0,he.fA)(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=(0,pe.CN)(1,1,1,1),this.outlineSize=0,this.distanceFieldBoundingBox=(0,pe.vt)(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.occlusionTest=!0,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!1,this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.isFocused=!0,this.focusEffect="none",this.draped=!1,this.isLabel=!1}}const gt=(0,_e.BP)().vec3f(ae.r.POSITION).vec3f(ae.r.NORMAL).vec2i16(ae.r.UVI).vec4u8(ae.r.COLOR).vec2f(ae.r.SIZE).f32(ae.r.ROTATION).vec4f(ae.r.CENTEROFFSETANDDISTANCE).vec4f(ae.r.FEATUREATTRIBUTE),yt=gt.clone().vec4u8(ae.r.OLIDCOLOR);class _t{constructor(){this.vertexBufferLayout=(0,xe.E)()?yt:gt}elementCount(e){return 6*e.get(ae.r.POSITION).indices.length}write(e,t,r,n,i,s){const{position:a,normal:o,uvi:l,color:c,size:d,rotation:u,centerOffsetAndDistance:h,featureAttribute:f}=i;(0,Oe.Hk)(r.get(ae.r.POSITION),e,a,s,6),(0,Oe.p1)(r.get(ae.r.NORMAL),t,o,s,6);const p=r.get(ae.r.UVI)?.data;let m=0,g=0,y=-1-Me.f,_=-1-Me.f;p&&p.length>=4&&(m=p[0],g=p[1],y=-1-p[2],_=-1-p[3]);let b=r.get(ae.r.POSITION).indices.length,v=s;for(let e=0;e<b;++e)l.set(v,0,m),l.set(v,1,g),v++,l.set(v,0,y),l.set(v,1,g),v++,l.set(v,0,y),l.set(v,1,_),v++,l.set(v,0,y),l.set(v,1,_),v++,l.set(v,0,m),l.set(v,1,_),v++,l.set(v,0,m),l.set(v,1,g),v++;(0,Oe.tb)(r.get(ae.r.COLOR),4,c,s,6);const{data:x,indices:w}=r.get(ae.r.SIZE);b=w.length,v=s;for(let e=0;e<b;++e){const t=x[2*w[e]],r=x[2*w[e]+1];for(let e=0;e<6;++e)d.set(v,0,t),d.set(v,1,r),v++}if((0,Oe.uO)(r.get(ae.r.ROTATION),u,s,6),r.get(ae.r.CENTEROFFSETANDDISTANCE)?(0,Oe.Ut)(r.get(ae.r.CENTEROFFSETANDDISTANCE),h,s,6):(0,Oe.Pq)(h,s,6*b),r.get(ae.r.FEATUREATTRIBUTE)?(0,Oe.Ut)(r.get(ae.r.FEATUREATTRIBUTE),f,s,6):(0,Oe.Pq)(f,s,6*b),null!=n){const e=r.get(ae.r.POSITION)?.indices;if(e){const t=e.length,r=i.getField(ae.r.OLIDCOLOR,me.XP);(0,Oe.vx)(n,r,t,s,6)}}return{numVerticesPerItem:6,numItems:b}}intersect(e,t,r,n,i,s,a){const{options:{selectionMode:o,hud:l,excludeLabels:c},point:d,camera:u}=n;if(!o||!l||c&&t.isLabel||!d)return;const h=this.vertexBufferLayout.createView(e),f=h.getField(ae.r.POSITION,me.xs),p=h.getField(ae.r.NORMAL,me.xs),m=h.getField(ae.r.ROTATION,me.Y$),g=h.getField(ae.r.SIZE,me.gH),y=h.getField(ae.r.FEATUREATTRIBUTE,me.Eq),_=h.getField(ae.r.CENTEROFFSETANDDISTANCE,me.Eq),b="screen"===t.centerOffsetUnits,v=(0,Me.c)(t);if(null==f||null==p||null==m||null==g||null==_)return;const x=null==y?null:y.getVec(0,ct),{scaleX:w,scaleY:S}=bt(x,t,u.pixelRatio),A=f.count/6;for(let e=0;e<A;e++){const i=6*e;if(f.getVec(i,Ze),null!=r&&(0,fe.g)(Ze,Ze,r),(0,fe.t)(Ze,Ze,u.viewMatrix),_.getVec(i,at),(0,fe.i)(ot,at[0],at[1],at[2]),!b&&(Ze[0]+=ot[0],Ze[1]+=ot[1],0!==ot[2])){const e=ot[2];(0,fe.n)(ot,Ze),(0,fe.d)(Ze,Ze,(0,fe.h)(ot,ot,e))}if(p.getVec(i,Qe),Ye(Qe,nt,u,dt),vt(t,Ze,dt,u,Xe),u.applyProjection(Ze,Je),Je[0]>-1){b&&(ot[0]||ot[1])&&(Je[0]+=ot[0]*u.pixelRatio,0!==ot[1]&&(Je[1]+=(0,Ce.m0)(ot[1],Xe.factorAlignment)*u.pixelRatio),u.unapplyProjection(Je,Ze)),Je[0]+=t.screenOffset[0]*u.pixelRatio,Je[1]+=t.screenOffset[1]*u.pixelRatio,Je[0]=Math.floor(Je[0]),Je[1]=Math.floor(Je[1]),g.getVec(i,ft),(0,Ce.MD)(ft,Xe.factor,ft);const r=ut*u.pixelRatio;let s=0;t.textureIsSignedDistanceField&&(s=Math.min(t.outlineSize,.5*ft[0])*u.pixelRatio/2),ft[0]*=w,ft[1]*=S;const o=m.get(i),l=t.rotation+o;if(We(d,Je[0],Je[1],ft,r,s,l,t,v)){const t=n.ray;if((0,fe.t)(et,Ze,(0,te.B8)(st,u.viewMatrix)),Je[0]=d[0],Je[1]=d[1],u.unprojectFromRenderScreen(Je,Ze)){const r=(0,q.vt)();(0,fe.c)(r,t.direction);const n=1/(0,fe.l)(r);(0,fe.h)(r,r,n),a((0,fe.j)(t.origin,Ze)*n,r,e,!0,1,et)}}}}}}function bt(e,t,r){return null==e||null==t.vvSize?{scaleX:r,scaleY:r}:((0,ge.VC)(lt,t,e),{scaleX:lt[0]*r,scaleY:lt[1]*r})}function vt(e,t,r,n,i){if(!e.verticalOffset?.screenLength)return e.screenSizePerspective||e.screenSizePerspectiveAlignment?xt(e,i,(0,fe.l)(t),r.cosAngle):(i.factor.scale=1,i.factorAlignment.scale=1),t;const s=(0,fe.l)(t),a=e.screenSizePerspectiveAlignment??e.screenSizePerspective,o=(0,Re.kE)(n,s,e.verticalOffset,r.cosAngle,a);return xt(e,i,s,r.cosAngle),(0,fe.h)(r.normal,r.normal,o),(0,fe.g)(t,t,r.normal)}function xt(e,t,r,n){null!=e.screenSizePerspective?(0,Ce.cJ)(n,r,e.screenSizePerspective,t.factor):(t.factor.scale=1,t.factor.factor=0,t.factor.minScaleFactor=0),null!=e.screenSizePerspectiveAlignment?(0,Ce.cJ)(n,r,e.screenSizePerspectiveAlignment,t.factorAlignment):(t.factorAlignment.factor=t.factor.factor,t.factorAlignment.scale=t.factor.scale,t.factorAlignment.minScaleFactor=t.factor.minScaleFactor)}class wt{constructor(e,t){this._mainThreadDelegate=t,this._bufferWriters=new Map,this._sharedTextures=new Map,this.globalViewingMode=e===ie.RT.Global}createRenderCommandBuffer(){return{commands:[],transferList:[]}}mergeRenderCommandBuffers(e){const t=this.createRenderCommandBuffer();for(const r of e)null!=r&&(t.commands.push(...r.commands),t.transferList.push(...r.transferList));return t}async getOrCreateSharedTexture(e,t){const{data:r,parameters:n}=t(),i=await this._mainThreadDelegate.createTexture(r,n);return this._sharedTextures.set(e,i),i}async releaseSharedTexture(e){const t=this._sharedTextures,r=t.get(e);null!=r&&(t.delete(e),await this._mainThreadDelegate.releaseTexture(r))}async createMaterial(e){const{type:t,parameters:r}=e,n=w("material");let i,s;switch(t){case"default":i=new oe.$U(e.parameters,{spherical:this.globalViewingMode}),s={type:t,id:n,parameters:e.parameters};break;case"hud":i=new Ge(r,this.globalViewingMode),s={type:t,id:n,parameters:e.parameters}}return this._bufferWriters.set(n,i.createBufferWriter()),await this._mainThreadDelegate.createMaterial(s),n}async createDirectRenderer(e){return await this._mainThreadDelegate.createDirectRenderer(e),e}addDirectRendererGeometry(e,t,r){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:i,renderGeometryBufferItems:s}=this.createRenderGeometryBuffer(t,r);return this.addDirectRendererGeometryBuffer(n,e,i,s,r)}updateDirectRendererGeometry(e,t,r){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:i,renderGeometryBufferItems:s}=this.createRenderGeometryBuffer(t,r);return this.updateDirectRendererGeometryBuffer(n,e,i,s,r)}addDirectRendererGeometryBuffer(e,t,r,n,i){const{objectIds:s,visibilities:a}=n;return{commands:[{id:"add-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:n,localOrigin:i}],transferList:[r.data,s.buffer,a.buffer]}}updateDirectRendererGeometryBuffer(e,t,r,n,i){const{objectIds:s,visibilities:a}=n;return{commands:[{id:"update-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:n,localOrigin:i}],transferList:[r.data,s.buffer,a.buffer]}}removeDirectRendererGeometryBuffer(e,t){return{commands:[{id:"remove-direct-renderer-geometry-buffer",rendererId:e,groupId:t}],transferList:[]}}async createLodRenderer(e){const t=w("lod-renderer"),r=new Set,n={levels:e.levels.map((e=>({components:e.components.map((e=>{const t=e.attributes.get(ae.r.POSITION);if(!t||0===t.indices.length)throw new Error("positions attribute expected");const n=(0,ne.tM)(t.indices.length/3),i=new se.j(n,3,t);if(null==this._bufferWriters.get(e.materialId))throw new Error("writer not found");const{renderGeometryBuffer:s}=this.createRenderGeometryBuffer(e,null);return r.add(s.data),{materialId:e.materialId,renderGeometryBuffer:s,boundingInfo:{bbMax:i.bbMax,bbMin:i.bbMin}}})),minScreenSpaceRadius:e.minScreenSpaceRadius})))};return await this._mainThreadDelegate.createLodRenderer(t,n,Array.from(r)),t}addLodInstances(e,t,r){return{commands:[{id:"add-lod-instances",rendererId:e,groupId:t,data:r}],transferList:[r.featureIds.buffer,r.globalTransforms.buffer,r.localTransforms.buffer,r.visibility.buffer]}}removeLodInstances(e,t){return{commands:[{id:"remove-lod-instances",rendererId:e,groupId:t}],transferList:[]}}updateLodInstancesData(e,t,r){return{commands:[{id:"update-lod-instance-data",rendererId:e,groupId:t,globalTransforms:r}],transferList:[r.buffer]}}updateVisibility(e,t,r){return{commands:[{id:"update-visibility",rendererId:e,groupId:t,visibility:r}],transferList:[r.buffer]}}async dispatchRenderCommands(e){0!==e.commands.length&&await this._mainThreadDelegate.executeRenderCommands(e)}createRenderGeometryBuffer(e,t){const{materialId:r,visibilities:n,objectIds:i}=e,s=this._bufferWriters.get(r);if(null==s)throw new Error("no registered bufferWriter for material found");let a=null;if(e.transformation&&t)(0,te.C)(St,e.transformation),St[12]-=t[0],St[13]-=t[1],St[14]-=t[2],a=St;else{if(t)throw new Error("not implemented");e.transformation&&(a=e.transformation)}let o=null;a&&((0,te.B8)(At,St),(0,te.mg)(At,At),o=At);const l=e.attributes,c=s.elementCount(l),d=s.vertexBufferLayout.stride/4;c>Math.floor(Ct/d)&&console.warn("geometry with very large number of elements encountered");const u=s.vertexBufferLayout.createBuffer(c),h=s.write(a,o,l,e.objectAndLayerIdColor,u,0);if(null==h)throw new Error("Bufferwriter.write does not provide item information.");if(n.length!==h.numItems||i.length!==h.numItems)throw new Error("Unexpected mismatch between number of RenderGeometryBufferItems and provided objectIds/visibility flags.");return{renderGeometryBuffer:{data:u.buffer,elementCount:c},renderGeometryBufferItems:{objectIds:i,visibilities:n,ranges:{numVertices:h.numVerticesPerItem,numItems:h.numItems}}}}}const St=(0,re.vt)(),At=(0,re.vt)(),Ct=4194304;class It{constructor(e,t,r){this.renderCommandContext=e,this.renderCommandBuffer=t,this.pipelineStateCommands=r}append(e){this.appendRenderCommands(e.renderCommandBuffer),this.appendPipelineStateCommands(e.pipelineStateCommands)}appendRenderCommands(e){this.renderCommandBuffer.commands.push(...e.commands),this.renderCommandBuffer.transferList.push(...e.transferList)}appendPipelineStateCommand(e){this.pipelineStateCommands.push(e)}appendPipelineStateCommands(e){for(const t of e)this.appendPipelineStateCommand(t)}async execute(){for(const e of this.pipelineStateCommands)e();await this.renderCommandContext.dispatchRenderCommands(this.renderCommandBuffer)}}var Tt=r(9762),Ot=r(27993);function Rt(e){const{featureCount:t}=e;if(0===t)return new Uint32Array;const r=new Uint32Array(t);return e.getObjectIdsArray(r),r}function Mt(e){const{featureCount:t}=e;if(0===t)return new Float64Array;const r=new Float64Array(3*t);return e.getCoordinatesArray(r),r}function Et(e,t){const r=t.viewSpatialReference,n=t.renderSpatialReference,{extent:i}=e,s=(0,b.gX)(i),a=(0,q.vt)();return(0,Ot.F)([s[0],s[1],0],r,a,n),a}var Pt=r(48353),zt=r(8887),Ft=r(83047);function Dt(e){const t=new Map;for(const[r,n]of e)t.set(r,{...n,indices:(0,ne.Dg)(n.indices)});return t}r(87317),r(12359),r(95108),r(27615),r(52106),r(4718),r(34275),r(65864);var Bt,jt,Vt=r(57917),kt=r(72385),Ut=(r(4197),r(11868)),Nt=r(240),Lt=(r(71351),r(46610));(jt=Bt||(Bt={})).length=function(e,t){const r=e[t],n=e[t+1],i=e[t+2];return Math.sqrt(r*r+n*n+i*i)},jt.normalize=function(e,t){const r=e[t],n=e[t+1],i=e[t+2],s=1/Math.sqrt(r*r+n*n+i*i);e[t]*=s,e[t+1]*=s,e[t+2]*=s},jt.scale=function(e,t,r){e[t]*=r,e[t+1]*=r,e[t+2]*=r},jt.add=function(e,t,r,n,i,s=t){(i=i||e)[s]=e[t]+r[n],i[s+1]=e[t+1]+r[n+1],i[s+2]=e[t+2]+r[n+2]},jt.subtract=function(e,t,r,n,i,s=t){(i=i||e)[s]=e[t]-r[n],i[s+1]=e[t+1]-r[n+1],i[s+2]=e[t+2]-r[n+2]},r(96672),r(87170);const qt=new Array(36);for(let e=0;e<6;e++)for(let t=0;t<6;t++)qt[6*e+t]=e;const Ht=new Array(36);for(let e=0;e<6;e++)Ht[6*e]=0,Ht[6*e+1]=1,Ht[6*e+2]=2,Ht[6*e+3]=2,Ht[6*e+4]=3,Ht[6*e+5]=0;const Gt=(0,kt.fA)(-.5,0,-.5),$t=(0,kt.fA)(.5,0,-.5),Yt=(0,kt.fA)(0,0,.5),Wt=(0,kt.fA)(0,.5,0),Xt=(0,kt.vt)(),Zt=(0,kt.vt)(),Qt=(0,kt.vt)(),Jt=(0,kt.vt)(),Kt=(0,kt.vt)();function er(e,t){switch(e){case"cone":return((e,r,n=!1)=>({levels:e.map((e=>{const i=Dt(r(e.tesselation));return n&&function(e){const t=e,r=t.get(ae.r.POSITION).data,n=t.get(ae.r.NORMAL).data;if(n){const t=tr(e,ae.r.NORMAL).data;for(let e=0;e<n.length;e+=3){const r=n[e+1];t[e+1]=-n[e+2],t[e+2]=r}}if(r){const t=tr(e,ae.r.POSITION).data;for(let e=0;e<r.length;e+=3){const n=r[e+1];t[e+1]=-r[e+2],t[e+2]=n}}}(i),{components:[{attributes:i,objectAndLayerIdColor:void 0,transformation:null,materialId:t,visibilities:new Uint8Array([1]),objectIds:new Uint32Array([-1])}],minScreenSpaceRadius:e.minScreenSpaceRadius}}))}))(rr,(e=>function(e,t,r,n,i=!0,s=!0){let a=0;const o=t,l=e;let c=(0,kt.fA)(0,a,0),d=(0,kt.fA)(0,a+l,0),u=(0,kt.fA)(0,-1,0),h=(0,kt.fA)(0,1,0);n&&(a=l,d=(0,kt.fA)(0,0,0),c=(0,kt.fA)(0,a,0),u=(0,kt.fA)(0,1,0),h=(0,kt.fA)(0,-1,0));const f=[d,c],p=[u,h],m=r+2,g=Math.sqrt(l*l+o*o);if(n)for(let e=r-1;e>=0;e--){const t=e*(2*Math.PI/r),n=(0,kt.fA)(Math.cos(t)*o,a,Math.sin(t)*o);f.push(n);const i=(0,kt.fA)(l*Math.cos(t)/g,-o/g,l*Math.sin(t)/g);p.push(i)}else for(let e=0;e<r;e++){const t=e*(2*Math.PI/r),n=(0,kt.fA)(Math.cos(t)*o,a,Math.sin(t)*o);f.push(n);const i=(0,kt.fA)(l*Math.cos(t)/g,o/g,l*Math.sin(t)/g);p.push(i)}const y=new Array,_=new Array;if(i){for(let e=3;e<f.length;e++)y.push(1),y.push(e-1),y.push(e),_.push(0),_.push(0),_.push(0);y.push(f.length-1),y.push(2),y.push(1),_.push(0),_.push(0),_.push(0)}if(s){for(let e=3;e<f.length;e++)y.push(e),y.push(e-1),y.push(0),_.push(e),_.push(e-1),_.push(1);y.push(0),y.push(2),y.push(f.length-1),_.push(1),_.push(2),_.push(p.length-1)}const b=(0,Ut.oe)(3*m);for(let e=0;e<m;e++)b[3*e]=f[e][0],b[3*e+1]=f[e][1],b[3*e+2]=f[e][2];const v=(0,Ut.oe)(3*m);for(let e=0;e<m;e++)v[3*e]=p[e][0],v[3*e+1]=p[e][1],v[3*e+2]=p[e][2];return[[ae.r.POSITION,new Lt.n(b,y,3,!0)],[ae.r.NORMAL,new Lt.n(v,_,3,!0)]]}(1,.5,e,!1)),!0);case"sphere":case"cube":case"inverted-cone":case"cylinder":case"tetrahedron":case"diamond":throw new Error("not implemented");default:return}}function tr(e,t){let r=e.get(t);return r&&!r.exclusive&&(r={...r,exclusive:!0,data:(0,Vt.S)(r.data)},e.set(t,r)),r}(0,fe.d)(Xt,Gt,Wt),(0,fe.d)(Zt,Gt,$t),(0,fe.e)(Qt,Xt,Zt),(0,fe.n)(Qt,Qt),(0,fe.d)(Xt,$t,Wt),(0,fe.d)(Zt,$t,Yt),(0,fe.e)(Jt,Xt,Zt),(0,fe.n)(Jt,Jt),(0,fe.d)(Xt,Yt,Wt),(0,fe.d)(Zt,Yt,Gt),(0,fe.e)(Kt,Xt,Zt),(0,fe.n)(Kt,Kt),Qt[0],Qt[1],Qt[2],Jt[0],Jt[1],Jt[2],Kt[0],Kt[1],Kt[2],(0,q.vt)();const rr=[{tesselation:6,minScreenSpaceRadius:0},{tesselation:18,minScreenSpaceRadius:7},{tesselation:64,minScreenSpaceRadius:65}];var nr=r(74810);class ir{constructor(e){this._context=e,this.lodRendererId=null,this._loaded=!1,this._loadingPromise=null,this._primitive="cone"}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const e=this._context.renderCommandContext,t={usePBR:!0,isSchematic:!0,mrrFactors:nr.Bt,ambient:q.Un,diffuse:q.Un,hasSlicePlane:!1,castShadows:!0,offsetTransparentBackfaces:!1,screenSizePerspective:{}};t.externalColor=pe.Un,t.isInstanced=!0;const r=await e.createMaterial({type:"default",parameters:t}),n=er(this._primitive,r);this.lodRendererId=await e.createLodRenderer(n),this._loaded=!0}async createAddCommand(e){const t=this._context,{renderCommandContext:r,mainThreadDelegate:n}=t;if(null==this.lodRendererId)throw new Error("expected lod renderer id to not be null");const{featureCount:i}=e;if(0===i)return r.createRenderCommandBuffer();const s=(0,H.vt)((0,zt.Fq)(this._primitive)),a=(0,q.ci)((0,H.Ej)(s)),o=(0,q.ci)((0,zt.Bb)(a,{isPrimitive:!0,width:100,depth:null,height:null})),l=new Float64Array(16*i),c=new Float64Array(16*i),d=Mt(e),u=await n.applyElevationAlignmentTo(d);for(let e=0;e<i;++e){const t=e,r=u[3*e+0],n=u[3*e+1],i=u[3*e+2],s=this._computeGlobalTransform(r,n,i,this._context.viewSpatialReference,or),d=this._computeLocalTransform(o,a,ar);this._writeMatrixToTypedBuffer(l,t,d),this._writeMatrixToTypedBuffer(c,t,s)}const h=Rt(e),f=new Uint8Array(i);e.getVisibilityArray(f);const p={featureIds:new Uint32Array(h),visibility:f,localTransforms:l,globalTransforms:c};return r.addLodInstances(this.lodRendererId,e.id,p)}async createRemoveCommand(e){const{_context:t,lodRendererId:r}=this,n=t.renderCommandContext;return null==r?n.createRenderCommandBuffer():n.removeLodInstances(r,e)}async createUpdateVisibilityCommand(e){const{lodRendererId:t,_context:r}=this,n=r.renderCommandContext;if(null==t)return n.createRenderCommandBuffer();const i=new Uint8Array(e.featureCount);return e.getVisibilityArray(i),n.updateVisibility(t,e.id,i)}async createUpdateElevationCommand(e){const{_context:t,lodRendererId:r}=this,{renderCommandContext:n,mainThreadDelegate:i}=t,{featureCount:s,id:a}=e;if(null==r||0===s)return n.createRenderCommandBuffer();const o=new Float64Array(16*s),l=Mt(e),c=await i.applyElevationAlignmentTo(l);for(let e=0;e<s;++e){const t=e,r=c[3*e+0],n=c[3*e+1],i=c[3*e+2],s=this._computeGlobalTransform(r,n,i,this._context.viewSpatialReference,or);this._writeMatrixToTypedBuffer(o,t,s)}return n.updateLodInstancesData(r,a,o)}_writeMatrixToTypedBuffer(e,t,r){let n=16*t;for(let t=0;t<16;t++)e[n++]=r[t]}_computeGlobalTransform(e,t,r,n,i){return sr[0]=e,sr[1]=t,sr[2]=r,(0,Pt.l)(n,sr,i,this._context.renderSpatialReference),i}_computeLocalTransform(e,t,r){return(0,te.D_)(r),this._applyObjectScale(e,t,r),r}_applyObjectScale(e,t,r){const n=function(e=q.Un,t,r,n=1){const i=new Array(3);if(null==t||null==r)i[0]=1,i[1]=1,i[2]=1;else{let n,s=0;for(let a=2;a>=0;a--){const o=e[a],l=null!=o,c=0===a&&!n&&!l,d=r[a];let u;"symbol-value"===o||c?u=0!==d?t[a]/d:1:l&&"proportional"!==o&&isFinite(o)&&(u=0!==d?o/d:1),null!=u&&(i[a]=u,n=u,s=Math.max(s,Math.abs(u)))}for(let e=2;e>=0;e--)null==i[e]?i[e]=n:0===i[e]&&(i[e]=.001*s)}for(let e=2;e>=0;e--)i[e]/=n;return(0,q.ci)(i)}(e,e,t,this._context.renderCoordsHelper.unitInMeters);1===n[0]&&1===n[1]&&1===n[2]||(0,te.hs)(r,r,n)}}const sr=(0,q.vt)(),ar=(0,re.vt)(),or=(0,re.vt)();var lr=r(97768);new Map,(()=>{let e="";for(let t=32;t<127;t++)e+=String.fromCharCode(t)})();const cr=[];{const e=16;for(let t=0;t<360;t+=360/e)cr.push([Math.cos(Math.PI*t/180),Math.sin(Math.PI*t/180)])}var dr,ur;(ur=dr||(dr={}))[ur.Left=0]="Left",ur[ur.Center=1]="Center",ur[ur.Right=2]="Right",Object.freeze({left:0,center:.5,right:1});const hr=Object.freeze({"bottom-left":(0,he.fA)(0,0),bottom:(0,he.fA)(.5,0),"bottom-right":(0,he.fA)(1,0),left:(0,he.fA)(0,.5),center:(0,he.fA)(.5,.5),right:(0,he.fA)(1,.5),"top-left":(0,he.fA)(0,1),top:(0,he.fA)(.5,1),"top-right":(0,he.fA)(1,1)});var fr=r(40804);r(48833);const pr=(0,pe.CN)(.25,.25,.75,.75);function mr(e){return"cross"===e||"x"===e}function gr(e,t=128,r=.5*t,n=0){switch(e){case"circle":default:return function(e,t){const r=e/2-.5;return xr(e,br(r,r,t/2))}(t,r);case"square":return function(e,t){return yr(e,t,!1)}(t,r);case"cross":return function(e,t,r=0){return _r(e,t,!1,r)}(t,r,n);case"x":return function(e,t,r=0){return _r(e,t,!0,r)}(t,r,n);case"kite":return function(e,t){return yr(e,t,!0)}(t,r);case"triangle":return function(e,t){return xr(e,vr(e/2,t,t/2))}(t,r);case"arrow":return function(e,t){const r=t,n=t/2,i=e/2,s=.8*r,a=br(i,(e-t)/2-s,Math.sqrt(s*s+n*n)),o=vr(i,r,n);return xr(e,((e,t)=>Math.max(o(e,t),-a(e,t))))}(t,r)}}function yr(e,t,r){return r&&(t/=Math.SQRT2),xr(e,((n,i)=>{let s=n-.5*e+.25,a=.5*e-i-.75;if(r){const e=(s+a)/Math.SQRT2;a=(a-s)/Math.SQRT2,s=e}return Math.max(Math.abs(s),Math.abs(a))-.5*t}))}function _r(e,t,r,n=0){t-=n,r&&(t*=Math.SQRT2);const i=.5*t;return xr(e,((t,s)=>{let a,o=t-.5*e,l=.5*e-s-1;if(r){const e=(o+l)/Math.SQRT2;l=(l-o)/Math.SQRT2,o=e}return o=Math.abs(o),l=Math.abs(l),a=o>l?o>i?Math.sqrt((o-i)*(o-i)+l*l):l:l>i?Math.sqrt(o*o+(l-i)*(l-i)):o,a-=n/2,a}))}function br(e,t,r){return(n,i)=>{const s=n-e,a=i-t;return Math.sqrt(s*s+a*a)-r}}function vr(e,t,r){const n=Math.sqrt(t*t+r*r);return(i,s)=>{const a=Math.abs(i-e)-r,o=s-e+t/2+.75,l=(t*a+r*o)/n,c=-o;return Math.max(l,c)}}function xr(e,t){const r=new Uint8Array(4*e*e);for(let n=0;n<e;n++)for(let i=0;i<e;i++){const s=i+e*n;let a=t(i,n);a=a/e+.5,(0,fr.U)(a,r,4*s)}return r}class wr{constructor(e){this._context=e,this.materialId=null,this._loaded=!1,this._loadingPromise=null,this._iconTexture=null}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}destroy(){this._iconTexture=(0,lr.xt)(this._iconTexture)}async _load(){const e=this._context.renderCommandContext,t=await e.getOrCreateSharedTexture("circle-icon",(()=>function(e,t=128,r=.5*t,n=0){return{data:gr(e,t,r,n),parameters:{mipmap:!1,wrap:{s:De.pF.CLAMP_TO_EDGE,t:De.pF.CLAMP_TO_EDGE},width:t,height:t,components:4,noUnpackFlip:!0,reloadable:!0}}}("circle")));this._iconTexture={remove:()=>e.releaseSharedTexture("circle-icon")};const r={anchorPosition:hr.center,occlusionTest:!0,hasSlicePlane:!1,color:[1,0,0,1],outlineColor:[0,0,0,1],outlineSize:1,distanceFieldBoundingBox:pr,textureId:t,textureIsSignedDistanceField:!0,sampleSignedDistanceFieldTexelCenter:mr("circle")};this.materialId=await e.createMaterial({type:"hud",parameters:r}),await e.createDirectRenderer(this.materialId),this._loaded=!0}async createAddCommand(e){const{materialId:t,_context:r}=this,{renderCommandContext:n}=r;if(null==t)throw new Error("expected material not to be null");const i=await this._createGeometry(e);if(null==i)return n.createRenderCommandBuffer();const s=Et(e,r);return n.addDirectRendererGeometry(e.id,i,s)}async _createGeometry(e){const{materialId:t,_context:r}=this,{mainThreadDelegate:n}=r,{featureCount:i}=e;if(0===i||null==t)return null;const s=Rt(e),a=Mt(e),o=function(e,t){const r=e.length/3,n=t.viewSpatialReference,i=t.renderSpatialReference,s=new Float64Array(3*r);if(!(0,Tt.projectBuffer)(e,n,0,s,i,0,r))throw new Error("Failed to project coordinates");return s}(await n.applyElevationAlignmentTo(a),r),l=new Float64Array([0,0,1]),c=new Float64Array([255,255,255,255]),d=new Float64Array([24,24]),u=new Float64Array([0,0,0,1]),h=new Float64Array([0,0]),f=new Float64Array([0]),p=new Uint32Array(i);for(let e=0;e<i;++e)p[e]=e;const m=new Uint32Array(i);for(let e=0;e<i;++e)m[e]=0;const g=new Lt.n(o,p,3,!0),y=new Lt.n(l,m,3,!0),_=new Lt.n(h,m,2,!0),b=new Lt.n(c,m,4,!0),v=new Lt.n(f,m,1,!0),x=new Lt.n(d,m,2,!0),w=new Lt.n(u,m,4,!0),S=[[ae.r.POSITION,g],[ae.r.NORMAL,y],[ae.r.UV0,_],[ae.r.COLOR,b],[ae.r.ROTATION,v],[ae.r.SIZE,x],[ae.r.CENTEROFFSETANDDISTANCE,w]],A=new Uint8Array(i);return e.getVisibilityArray(A),{attributes:Dt(S),objectAndLayerIdColor:void 0,transformation:(0,re.vt)(),materialId:t,objectIds:s,visibilities:A}}async createRemoveCommand(e){const{materialId:t,_context:r}=this,n=r.renderCommandContext;return null==t?n.createRenderCommandBuffer():n.removeDirectRendererGeometryBuffer(t,e)}async createUpdateVisibilityCommand(e){const{materialId:t,_context:r}=this,n=r.renderCommandContext;if(null==t)return n.createRenderCommandBuffer();const i=new Uint8Array(e.featureCount);return e.getVisibilityArray(i),n.updateVisibility(t,e.id,i)}async createUpdateElevationCommand(e){const{materialId:t,_context:r}=this,{renderCommandContext:n}=r,{featureCount:i,id:s}=e;if(null==t||0===i)return n.createRenderCommandBuffer();const a=await this._createGeometry(e);if(null==a)return n.createRenderCommandBuffer();const o=Et(e,r);return n.updateDirectRendererGeometry(s,a,o)}}class Sr{constructor(e){this._symbols=new Array,this._featureDataPartitioning=new Map,this._context=e}async load(){this._symbols[0]=new wr(this._context),this._symbols[1]=new ir(this._context)}async createAddCommand(e){const t=this._partition(e),r=await Promise.all(t.map((async({index:e,features:t})=>{const r=await this._provisionSymbol(e);return await(r?.createAddCommand(t))}))),n=this._context.renderCommandContext;return new It(n,n.mergeRenderCommandBuffers(r),[()=>{this._featureDataPartitioning.set(e.id,t)}])}async createRemoveCommand(e){const{_featureDataPartitioning:t,_context:r}=this,n=r.renderCommandContext,i=t.get(e);if(null==i)return new It(n,n.createRenderCommandBuffer(),[]);const s=await Promise.all(i.map((async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createRemoveCommand(t.id))})));return new It(n,n.mergeRenderCommandBuffers(s),[()=>{t.delete(e)}])}async createUpdateVisibilityCommand(e){const{_featureDataPartitioning:t,_context:r}=this,n=r.renderCommandContext,i=t.get(e.id);if(null==i)return new It(n,n.createRenderCommandBuffer(),[]);const s=await Promise.all(i.map((async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateVisibilityCommand(t))})));return new It(n,n.mergeRenderCommandBuffers(s),[])}async createUpdateElevationCommand(){const{_featureDataPartitioning:e,_context:t}=this,r=t.renderCommandContext,n=[];for(const t of e.values()){const e=t.map((async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateElevationCommand(t))}));n.push(...e)}const i=await Promise.all(n);return new It(r,r.mergeRenderCommandBuffers(i),[])}async _provisionSymbol(e){if(null==e)return null;const t=this._symbols[e];return t?(t.loaded||await t.load(),t):null}_getLoadedSymbol(e){if(null==e)return null;const t=this._symbols[e];return null!=t&&t.loaded?t:null}_partition(e){const t=Rt(e);if(null==t)throw new Error("unable to fetch objectIds");const{featureCount:r}=e,n=[[],[]];for(let e=0;e<r;++e)n[t[e]%2].push(e);return n.map(((t,r)=>new Ar(r,e.subset(new Uint32Array(t))))).filter((e=>e.features.featureCount>0))}}class Ar{constructor(e,t){this.index=e,this.features=t}}var Cr=r(73941),Ir=r(98764),Tr=r(65806);const Or=(0,q.vt)();var Rr=r(88582),Mr=r(17352),Er=r(97937);function Pr(e,t,r=function(e){return{operations:e,value:e.create()}}(e)){return r.operations=e,e.copy(t,r.value),r}const zr=2**50;function Fr(e,t,r,n){return e.operations.setAltitudeAt(e.value,t,r,n)}function Dr(e,t,r){return e.operations.elevate(e.value,t,r.value)}const Br=(0,q.vt)();(0,q.vt)();var jr=r(44280),Vr=r(32114);function kr(e){return"point"===e.type}class Ur{constructor(e,t,r,n){this.viewingMode=e,this.spatialReference=t,this.unitInMeters=r,this._coordinateSystem=n,this._tmpCoordinateSystem=function(e){const{value:t,operations:r}=e;return{operations:r,value:r.create(t)}}(n),this.referenceEllipsoid=(0,Cr.tO)(t),this.sphericalPCPF=(0,Ir.lO)(t)}set extent(e){e&&function(e,t,r){e.operations.setExtent(e.value,t,r.value)}(this._coordinateSystem,e,this._coordinateSystem)}get extent(){return function(e,t){return e.operations.getExtent(e.value,t),t}(this._coordinateSystem,(0,b.vt)())}getAltitude(e){return function(e,t){return e.operations.altitudeAt(e.value,t)}(this._coordinateSystem,e)}setAltitude(e,t,r=e){return Fr(this._coordinateSystem,r,t,e)}setAltitudeOfTransformation(e,t){!function(e,t,r,n){t!==n&&(0,te.C)(n,t),(0,fe.i)(Br,n[12],n[13],n[14]),Fr(e,Br,r,Br),n[12]=Br[0],n[13]=Br[1],n[14]=Br[2]}(this._coordinateSystem,t,e,t)}worldUpAtPosition(e,t){return function(e,t,r){return e.operations.axisAt(e.value,t,Rr._.Z,r)}(this._coordinateSystem,e,t)}worldBasisAtPosition(e,t,r){return function(e,t,r,n){return e.operations.axisAt(e.value,t,r,n)}(this._coordinateSystem,e,t,r)}basisMatrixAtPosition(e,t){const r=this.worldBasisAtPosition(e,Rr._.X,Vr.rq.get()),n=this.worldBasisAtPosition(e,Rr._.Y,Vr.rq.get()),i=this.worldBasisAtPosition(e,Rr._.Z,Vr.rq.get());return(0,te.hZ)(t,r[0],r[1],r[2],0,n[0],n[1],n[2],0,i[0],i[1],i[2],0,0,0,0,1),t}headingAtPosition(e,t){const r=this.worldUpAtPosition(e,Vr.rq.get()),n=this.worldBasisAtPosition(e,Rr._.Y,Vr.rq.get()),i=(0,jr.EJ)(t,n,r);return(0,le.KJ)(i)}intersectManifoldClosestSilhouette(e,t,r){return Dr(this._coordinateSystem,t,this._tmpCoordinateSystem),function(e,t,r){e.operations.intersectRayClosestSilhouette(e.value,t,r)}(this._tmpCoordinateSystem,e,r),r}intersectManifold(e,t,r){Dr(this._coordinateSystem,t,this._tmpCoordinateSystem);const n=Vr.rq.get();return function(e,t,r){return e.operations.intersectRay(e.value,t,r)}(this._tmpCoordinateSystem,e,n)?(0,fe.c)(r,n):null}intersectInfiniteManifold(e,t,r){if(this.viewingMode===ie.RT.Global)return this.intersectManifold(e,t,r);Dr(this._coordinateSystem,t,this._tmpCoordinateSystem);const n=this._tmpCoordinateSystem.value,i=Vr.rq.get();return(0,Nt.Ui)(n.plane,e,i)?(0,fe.c)(r,i):null}toRenderCoords(e,t,r){return kr(e)?(0,Tr.g)(e,t,this.spatialReference):(0,Ot.F)(e,t,r,this.spatialReference)}fromRenderCoords(e,t,r=null){return kr(t)?(null!=r&&(t.spatialReference=r),function(e,t,r){return!!(0,Ot.F)(e,t,Or,r.spatialReference)&&(r.x=Or[0],r.y=Or[1],r.z=Or[2],!0)}(e,this.spatialReference,t)?t:null):(0,Ot.F)(e,this.spatialReference,t,r)?t:null}static create(e,t){switch(e){case ie.RT.Local:return new Ur(ie.RT.Local,t,(0,Ft.GA)(t),Pr(Mr.b,(0,Mr.f)([0,0,0],[zr,0,0],[0,zr,0])));case ie.RT.Global:return new Ur(ie.RT.Global,t,1,function(e){return Pr(Er.s,(0,Er.f)(0,0,0,(0,Cr.tO)(e).radius))}(t))}}static renderUnitScaleFactor(e,t){return(0,Ft.KX)(e)/(0,Ft.KX)(t)}}let Nr=class extends i.A.EventedAccessor{constructor(){super(...arguments),this.remoteClient=null,this._featureStore=new B,this._tileManager=null,this._renderer=null,this._fetcher=null,this._queryEngine=null,this._defaultQueryJSON=null}get updating(){return this._tileManager.updating}destroy(){this._featureStore.clear(),this._tileManager?.destroy()}async setup({viewSpatialReference:e,renderSpatialReference:t,viewingMode:r,baseQuery:n,url:i,objectIdField:s,capabilities:o,fieldsIndex:l,timeInfo:c,elevationInfo:m,fullExtent:g}){const y=h.A.fromJSON(e),_=h.A.fromJSON(t);this._fetcher=new ee(y,p.A.fromJSON(n),i,s,o),this._queryEngine=new f.do({hasZ:!0,hasM:!1,geometryType:"esriGeometryPoint",objectIdField:s,fieldsIndex:l,availableFields:[s],spatialReference:e,featureStore:this._featureStore,timeInfo:c});const b={createTexture:async(e,t)=>{const r={data:e,parameters:t};return await this.remoteClient.invoke("createTexture",r,{transferList:[e.buffer]})},releaseTexture:async e=>{const t={uid:e};await this.remoteClient.invoke("releaseTexture",t)},createMaterial:async e=>{const t={materialJSON:e};await this.remoteClient.invoke("createMaterial",t)},createDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("createDirectRenderer",t)},createLodRenderer:async(e,t,r)=>{const n={rendererId:e,lodRenderGeometry:t};await this.remoteClient.invoke("createLoDRenderer",n,{transferList:r})},executeRenderCommands:async e=>{const t={commands:e.commands};await this.remoteClient.invoke("dispatchRenderCommands",t,{transferList:e.transferList})},applyElevationAlignmentTo:async e=>{const t={mapPoints:e};return await this.remoteClient.invoke("applyElevationAlignment",t,{transferList:[e.buffer]})}};this._renderer=new Sr({viewSpatialReference:y,renderSpatialReference:_,renderCoordsHelper:Ur.create(r,_),renderCommandContext:new wt(r,b),elevationInfo:m??{},mainThreadDelegate:b}),this._defaultQueryJSON=new p.A({outSpatialReference:y}).toJSON();let v=null;if(null!=g){const e=d.A.fromJSON(g);await(0,u.initializeProjection)(e.spatialReference,y),v=(0,u.project)(e,y)}return this._tileManager=new C({loadTile:(e,t)=>this._fetcher.fetch(e,t),createAddFeatureDataCommand:(e,t)=>this._createAddFeatureDataCommand(e,t),createRemoveFeatureDataCommand:e=>this._createRemoveFeatureDataCommand(e),createUpdateFeatureDataVisibilityCommand:(e,t)=>this._createUpdateFeatureDataVisibilityCommand(e,t),extent:v}),this.addHandles((0,a.wB)((()=>this.updating),(e=>{this.emit("notify-updating",{updating:e})})),a.Vh),await this._renderer.load(),qr}async executeQuery(e,t){return{result:await this._queryEngine.executeQuery(this._ensureQuery(e),t)}}async executeQueryForIds(e,t){const r=await this._queryEngine.executeQueryForIdSet(this._ensureQuery(e),t);return{result:Array.from(r)}}async executeQueryForCount(e,t){return{result:await this._queryEngine.executeQueryForCount(this._ensureQuery(e),t)}}async executeQueryForExtent(e,t){return{result:await this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t)}}async executeQueryForLatestObservations(e,t){return{result:await this._queryEngine.executeQueryForLatestObservations(this._ensureQuery(e),t)}}async onTileTreeChange(e){return await this._tileManager.onTileTreeChange(e),qr}async onElevationChange(e){return qr}async _createAddFeatureDataCommand(e,t){const r=this._featureStore,n=await this._renderer.createAddCommand(e);return(0,s.Te)(t),n.appendPipelineStateCommand((()=>{r.addTile(e)})),n}async _createRemoveFeatureDataCommand(e){const t=this._featureStore,r=this._renderer,n=await r.createRemoveCommand(e);return n.appendPipelineStateCommand((()=>{t.removeTile(e)})),n}async _createUpdateFeatureDataVisibilityCommand(e,t){const r=this._renderer,n=await r.createUpdateVisibilityCommand(e);return(0,s.Te)(t),n}_ensureQuery(e){return e??this._defaultQueryJSON}};(0,n._)([(0,o.MZ)()],Nr.prototype,"updating",null),Nr=(0,n._)([(0,c.$)("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorker")],Nr);const Lr=Nr,qr={result:void 0}},69418:(e,t,r)=>{r.d(t,{S:()=>c,z:()=>l});var n=r(83047),i=r(21325),s=r(43334),a=r(58512),o=r(92722);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class c{constructor(e){this._options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new a.A}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,i.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,n.G9)(this._options.sourceSpatialReference)/(0,n.G9)(e.spatialReference);if(1!==t)for(const r of e.features){if(!(0,s.N3)(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new s.Om(null,{},null,0)}createSpatialReference(){return{wkid:0}}createGeometry(){return new o.A}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new o.A}}},72385:(e,t,r)=>{function n(){return new Float32Array(3)}function i(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function s(e,t,r){const n=new Float32Array(3);return n[0]=e,n[1]=t,n[2]=r,n}function a(){return n()}function o(){return s(1,1,1)}function l(){return s(1,0,0)}function c(){return s(0,1,0)}function d(){return s(0,0,1)}r.d(t,{fA:()=>s,o8:()=>i,vt:()=>n});const u=a(),h=o(),f=l(),p=c(),m=d();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:f,UNIT_Y:p,UNIT_Z:m,ZEROS:u,clone:i,create:n,fromValues:s,ones:o,unitX:l,unitY:c,unitZ:d,zeros:a},Symbol.toStringTag,{value:"Module"}))},75503:(e,t,r)=>{r.d(t,{E:()=>C,w:()=>o});var n=r(4576),i=r(21818),s=(r(44208),r(3694)),a=r(11006);class o{constructor(e=9,t){this._compareMinX=h,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),x.prune(),w.prune(),S.prune(),A.prune()}all(e){l(this._data,e)}search(e,t){let r=this._data;const n=this._toBBox;if(b(e,r))for(x.clear();r;){for(let i=0,s=r.children.length;i<s;i++){const s=r.children[i],a=r.leaf?n(s):s;b(e,a)&&(r.leaf?t(s):_(e,a)?l(s,t):x.push(s))}r=x.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!b(e,t))return!1;for(x.clear();t;){for(let n=0,i=t.children.length;n<i;n++){const i=t.children[n],s=t.leaf?r(i):i;if(b(e,s)){if(t.leaf||_(e,s))return!0;x.push(i)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new T([]),this}remove(e){if(!e)return this;let t,r=this._data,s=null,a=0,o=!1;const l=this._toBBox(e);for(S.clear(),A.clear();r||S.length>0;){if(r||(r=S.pop(),s=S.data[S.length-1],a=A.pop()??0,o=!0),r.leaf&&(t=(0,n.qh)(r.children,(0,i.zI)(e),r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),S.push(r),this._condense(S),this;o||r.leaf||!_(r,l)?s?(a++,r=s.children[a],o=!1):r=null:(S.push(r),A.push(a),a=0,s=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,n){const i=r-t+1;let s=this._maxEntries;if(i<=s){const n=new T(e.slice(t,r+1));return c(n,this._toBBox),n}n||(n=Math.ceil(Math.log(i)/Math.log(s)),s=Math.ceil(i/s**(n-1)));const a=new O([]);a.height=n;const o=Math.ceil(i/s),l=o*Math.ceil(Math.sqrt(s));v(e,t,r,l,this._compareMinX);for(let i=t;i<=r;i+=l){const t=Math.min(i+l-1,r);v(e,i,t,o,this._compareMinY);for(let r=i;r<=t;r+=o){const i=Math.min(r+o-1,t);a.children.push(this._build(e,r,i,n-1))}}return c(a,this._toBBox),a}_insert(e,t,r){const n=this._toBBox,i=r?e:n(e);S.clear();const s=function(e,t,r,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==r;){let r,n=1/0,i=1/0;for(let s=0,a=t.children.length;s<a;s++){const a=t.children[s],o=p(a),l=g(e,a)-o;l<i?(i=l,n=o<n?o:n,r=a):l===i&&o<n&&(n=o,r=a)}t=r||t.children[0]}return t}(i,this._data,t,S);for(s.children.push(e),u(s,i);t>=0&&S.data[t].children.length>this._maxEntries;)this._split(S,t),t--;!function(e,t,r){for(let n=r;n>=0;n--)u(t.data[n],e)}(i,S,t)}_split(e,t){const r=e.data[t],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);const s=this._chooseSplitIndex(r,i,n);if(!s)return;const a=r.children.splice(s,r.children.length-s),o=r.leaf?new T(a):new O(a);o.height=r.height,c(r,this._toBBox),c(o,this._toBBox),t?e.data[t-1].children.push(o):this._splitRoot(r,o)}_splitRoot(e,t){this._data=new O([e,t]),this._data.height=e.height+1,c(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let n,i,s;n=i=1/0;for(let a=t;a<=r-t;a++){const t=d(e,0,a,this._toBBox),o=d(e,a,r,this._toBBox),l=y(t,o),c=p(t)+p(o);l<n?(n=l,s=a,i=c<i?c:i):l===n&&c<i&&(i=c,s=a)}return s}_chooseSplitAxis(e,t,r){const n=e.leaf?this._compareMinX:h,i=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,r,n)<this._allDistMargin(e,t,r,i)&&e.children.sort(n)}_allDistMargin(e,t,r,n){e.children.sort(n);const i=this._toBBox,s=d(e,0,t,i),a=d(e,r-t,r,i);let o=m(s)+m(a);for(let n=t;n<r-t;n++){const t=e.children[n];u(s,e.leaf?i(t):t),o+=m(s)}for(let n=r-t-1;n>=t;n--){const t=e.children[n];u(a,e.leaf?i(t):t),o+=m(a)}return o}_condense(e){for(let t=e.length-1;t>=0;t--){const r=e.data[t];if(0===r.children.length)if(t>0){const i=e.data[t-1],s=i.children;s.splice((0,n.qh)(s,r,s.length,i.indexHint),1)}else this.clear();else c(r,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let r=e;for(w.clear();r;){if(!0===r.leaf)for(const e of r.children)t((0,i.zI)(e));else w.pushArray(r.children);r=w.pop()??null}}function c(e,t){d(e,0,e.children.length,t,e)}function d(e,t,r,n,i){i||(i=new T([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let s,a=t;a<r;a++)s=e.children[a],u(i,e.leaf?n(s):s);return i}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const r=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,i-r)*Math.max(0,s-n)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function b(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,r,n,i){const s=[t,r];for(;s.length;){const t=s.pop(),r=s.pop();if(t-r<=n)continue;const o=r+Math.ceil((t-r)/n/2)*n;(0,a.q)(e,o,r,t,i),s.push(r,o,o,t)}}const x=new s.A,w=new s.A,S=new s.A,A=new s.A({deallocator:void 0});class C{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class I extends C{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class T extends I{constructor(e){super(),this.children=e,this.leaf=!0}}class O extends I{constructor(e){super(),this.children=e,this.leaf=!1}}},76357:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(90237),i=r(66552),s=r(25482),a=r(10107),o=(r(44208),r(53966),r(87811),r(93223)),l=r(40608);const c=new i.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends s.A{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,o.e)(c),(0,a.MZ)({json:{write:{isRequired:!0}}})],d.prototype,"type",void 0),d=(0,n._)([(0,l.$)("esri.layers.support.Domain")],d);const u=d},79677:(e,t,r)=>{r.d(t,{A:()=>f});var n,i=r(90237),s=r(25482),a=r(88930),o=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),c=r(40608),d=r(43937),u=r(98623);let h=class extends s.A{static{n=this}static get allTime(){return p}static get empty(){return m}static fromArray(e){return new n({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===n&&r===i}expandTo(e,t=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,a.lL)(r,e,t));let i=this.end;if(i){const r=(0,a.lL)(i,e,t);i=i.getTime()===r.getTime()?r:(0,a.S1)(r,1,e,t)}return new n({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let a,o;return i>=t&&i<=r?a=i:t>=i&&t<=s&&(a=t),r>=i&&r<=s?o=r:s>=t&&s<=r&&(o=s),null==a||null==o||isNaN(a)||isNaN(o)?n.empty:new n({start:a===-1/0?null:new Date(a),end:o===1/0?null:new Date(o)})}offset(e,t,r=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new n,{start:s,end:o}=this;return null!=s&&(i.start=(0,a.S1)(s,e,t,r)),null!=o&&(i.end=(0,a.S1)(o,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:r})}};(0,i._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,i._)([(0,l.w)("end")],h.prototype,"readEnd",null),(0,i._)([(0,d.K)("end")],h.prototype,"writeEnd",null),(0,i._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,i._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,i._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,i._)([(0,l.w)("start")],h.prototype,"readStart",null),(0,i._)([(0,d.K)("start")],h.prototype,"writeStart",null),h=n=(0,i._)([(0,c.$)("esri.time.TimeExtent")],h);const f=h,p=new h,m=new h({start:void 0,end:void 0})},80451:(e,t,r)=>{r.d(t,{rS:()=>g,gK:()=>m}),r(44208);var n,i=r(53177),s=r(76357),a=r(90237),o=(r(53966),r(87811),r(49186),r(93223)),l=r(40608);let c=class extends s.A{static{n=this}constructor(e){super(e),this.type="inherited"}clone(){return new n}};(0,a._)([(0,o.e)({inherited:"inherited"})],c.prototype,"type",void 0),c=n=(0,a._)([(0,l.$)("esri.layers.support.InheritedDomain")],c);const d=c;var u,h=r(10107);let f=class extends s.A{static{u=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new u({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,a._)([(0,h.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]},isRequired:!0}}})],f.prototype,"maxValue",void 0),(0,a._)([(0,h.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]},isRequired:!0}}})],f.prototype,"minValue",void 0),(0,a._)([(0,o.e)({range:"range"})],f.prototype,"type",void 0),f=u=(0,a._)([(0,l.$)("esri.layers.support.RangeDomain")],f);const p=f,m={key:"type",base:s.A,typeMap:{range:p,"coded-value":i.A,inherited:d}};function g(e){if(!e?.type)return null;switch(e.type){case"range":return p.fromJSON(e);case"codedValue":return i.A.fromJSON(e);case"inherited":return d.fromJSON(e)}return null}},80893:(e,t,r)=>{r.d(t,{IJ:()=>p,Jf:()=>_,Pk:()=>g,eW:()=>f,gW:()=>y,kS:()=>m});var n=r(78888),i=r(84952),s=r(65864),a=r(17136),o=r(21325),l=r(10536),c=r(66208),d=r(58501);const u="Layer does not support extent calculation.";function h(e,t){const r=e.geometry,n=e.toJSON();delete n.compactGeometryEnabled,delete n.defaultSpatialReferenceEnabled;const i=n;let a,l,c;if(null!=r&&(l=r.spatialReference,c=(0,o.YX)(l),i.geometryType=(0,s.$B)(r),i.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const r=e.toJSON();return delete r.spatialReference,JSON.stringify(r)}(r,e.compactGeometryEnabled),i.inSR=c),n.groupByFieldsForStatistics&&(i.groupByFieldsForStatistics=n.groupByFieldsForStatistics.join(",")),n.objectIds&&(i.objectIds=n.objectIds.join(",")),n.orderByFields&&(i.orderByFields=n.orderByFields.join(",")),!n.outFields||!n.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete i.outFields:n.outFields.includes("*")?i.outFields="*":i.outFields=n.outFields.join(","),n.outSR?(i.outSR=(0,o.YX)(n.outSR),a=e.outSpatialReference):r&&(n.returnGeometry||n.returnCentroid)&&(i.outSR=i.inSR,a=l),n.returnGeometry&&delete n.returnGeometry,n.outStatistics&&(i.outStatistics=JSON.stringify(n.outStatistics)),n.fullText&&(i.fullText=JSON.stringify(n.fullText)),n.pixelSize&&(i.pixelSize=JSON.stringify(n.pixelSize)),n.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=l&&null!=e.quantizationParameters?.extent&&l.equals(e.quantizationParameters.extent.spatialReference)&&delete n.quantizationParameters.extent.spatialReference,i.quantizationParameters=JSON.stringify(n.quantizationParameters)),n.parameterValues&&(i.parameterValues=JSON.stringify(n.parameterValues)),n.rangeValues&&(i.rangeValues=JSON.stringify(n.rangeValues)),n.dynamicDataSource&&(i.layer=JSON.stringify({source:n.dynamicDataSource}),delete n.dynamicDataSource),n.timeExtent){const e=n.timeExtent,{start:t,end:r}=e;null==t&&null==r||(i.time=t===r?t:`${t??"null"},${r??"null"}`),delete n.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=l&&null!=a&&l.equals(a)&&(i.defaultSR=i.inSR,delete i.inSR,delete i.outSR),i}async function f(e,t,r,n){const i=null!=t.timeExtent&&t.timeExtent.isEmpty?{data:{features:[]}}:await b(e,t,"json",n);return(0,d.q)(t,r,i.data),i}async function p(e,t,r,n){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:r.createFeatureResult()};const i=await m(e,t,n),s=i;return s.data=(0,c.m)(i.data,r),s}function m(e,t,r){return b(e,t,"pbf",r)}function g(e,t,r){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):b(e,t,"json",r,{returnIdsOnly:!0})}function y(e,t,r){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):b(e,t,"json",r,{returnIdsOnly:!0,returnCountOnly:!0})}async function _(e,t,r){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:{count:0,extent:null}};const n=await b(e,t,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}),i=n.data;if(i.hasOwnProperty("extent"))return n;if(i.features)throw new Error(u);if(i.hasOwnProperty("count"))throw new Error(u);return n}async function b(e,t,r,s={},o={}){const c="string"==typeof e?(0,i.An)(e):e,d=t.geometry?[t.geometry]:[],u=await(0,a.el)(d,null,{signal:s.signal}),f=u?.[0];null!=f&&((t=t.clone()).geometry=f);const p=(0,l.z)({...c.query,f:r,...o,...h(t,o)});return(0,n.A)((0,i.fj)(c.path,function(e,t){return null!=e.formatOf3DObjects&&!(t.returnCountOnly||t.returnExtentOnly||t.returnIdsOnly)}(t,o)?"query3d":"query"),{...s,responseType:"pbf"===r?"array-buffer":"json",query:{...p,...s.query}})}},95696:(e,t,r)=>{r.d(t,{A:()=>u});var n,i=r(90237),s=r(69540),a=r(25482),o=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),c=r(40608);let d=class extends(s.A.ClonableMixin(a.A)){static{n=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new n}};(0,i._)([(0,l.e)({georeferenced:"georeferenced"},{readOnly:!0})],d.prototype,"type",void 0),(0,i._)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],d.prototype,"origin",void 0),d=n=(0,i._)([(0,c.$)("esri.geometry.support.MeshGeoreferencedVertexSpace")],d);const u=d}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4342,5952],{22671:(e,t,i)=>{i.d(t,{A:()=>_});var r,o=i(90237),n=i(52106),s=i(66552),a=i(25482),l=i(4718),p=i(10107),c=(i(44208),i(53966),i(36005)),u=i(40608),d=i(43937),y=i(16930),h=i(65864),f=i(50498),m=i(20437);const g=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=r=class extends a.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,i,r){if(e)return void g.write(e,t,i,r);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void g.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,h.rS)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=y.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e?.[i];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,o]}=e,n=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((o-e)/i)));for(let e=0,t=n.length;e<t;e++)s?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,o],scale:[n,s]}=i;let a=null,l=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;a=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;l=i=>null==i?i:i*t+e}const p=this._getHydrationFunction(e,(e=>e*n+r),(e=>o-e*s),a,l);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}readFeaturesWithClass(e,t,i){const r=y.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const n=e[t],s=i.fromJSON(n),a=n.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=r);const l=n.aggregateGeometries,p=s.aggregateGeometries;if(l&&null!=p)for(const e in p){const t=p[e],i=l[e],o=i?.spatialReference;null==t||o||(t.spatialReference=r)}o.push(s)}return o}_quantizePoints(e,t,i){let r,o;const n=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=i(a[1]);e===r&&s===o||(n.push([e-r,s-o]),r=e,o=s)}else r=t(a[0]),o=i(a[1]),n.push([r,o])}return n.length>0?n:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,h.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,n=r.length;e<n;e++){const n=r[e],s=this._quantizePoints(n,t,i);s&&o.push(s)}return o.length>0?((0,h.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,o){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,h.Bi)(e)?e.rings:e.paths;let s,a;for(let e=0,r=n.length;e<r;e++){const r=n[e];for(let e=0,o=r.length;e<o;e++){const o=r[e];e>0?(s+=o[0],a+=o[1]):(s=o[0],a=o[1]),o[0]=t(s),o[1]=i(a)}}if(r&&o)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=o(i[3])}}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(o)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=o(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let s,a;for(let e=0,r=n.length;e<r;e++){const r=n[e];e>0?(s+=r[0],a+=r[1]):(s=r[0],a=r[1]),r[0]=t(s),r[1]=i(a)}if(r&&o)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2]),t[3]=o(t[3])}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2])}else if(o)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,p.MZ)({type:[n.A],json:{write:!0}})],v.prototype,"features",void 0),(0,o._)([(0,c.w)("features")],v.prototype,"readFeatures",null),(0,o._)([(0,p.MZ)({type:[m.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,o._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,o._)([(0,d.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o._)([(0,p.MZ)({types:f.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o._)([(0,c.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o._)([(0,p.MZ)({type:y.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o._)([(0,d.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o._)([(0,p.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=r=(0,o._)([(0,u.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const _=v},32756:(e,t,i)=>{i.d(t,{Rr:()=>l,fY:()=>c,ne:()=>p});var r=i(90237),o=i(93637),n=i(10107),s=(i(44208),i(53966),i(87811),i(40608)),a=i(91880);function l(e,t,i){if(!e)return null;const r=e.find((e=>!!e.field));if(!r)return null;const o=new a.A;return o.read(r,i),[o]}const p={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,i,r){const n=e.find((e=>!!e.field));n&&(0,o.sM)(i,[n.toJSON()],t)}}}},c=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,r._)([(0,n.MZ)(p)],t.prototype,"orderBy",void 0),t=(0,r._)([(0,s.$)("esri.layers.mixins.OrderedLayer")],t),t}},33143:(e,t,i)=>{i.d(t,{A:()=>y});var r=i(90237),o=i(69540),n=i(25482),s=i(10107),a=(i(44208),i(53966),i(87811),i(36005)),l=i(40608),p=i(43937),c=i(80451),u=i(29005);let d=class extends(o.A.ClonableMixin(n.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const i of Object.keys(e))t[i]=(0,c.rS)(e[i]);return t}writeDomains(e,t){const i={};for(const t of Object.keys(e))e[t]&&(i[t]=e[t]?.toJSON());t.domains=i}};(0,r._)([(0,s.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,r._)([(0,s.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,r._)([(0,s.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,r._)([(0,a.w)("domains")],d.prototype,"readDomains",null),(0,r._)([(0,p.K)("domains")],d.prototype,"writeDomains",null),(0,r._)([(0,s.MZ)({type:[u.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,r._)([(0,l.$)("esri.layers.support.FeatureType")],d);const y=d},46140:(e,t,i)=>{i.d(t,{R:()=>o});var r=i(49186);let o=class e{constructor(e,t,i=""){this.major=e,this.minor=t,this._context=i}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",i=this._context&&this._context+" ";throw new r.A(t+"unsupported-version",`Required major ${i}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,i=""){const[o,n]=t.split("."),s=/^\s*\d+\s*$/;if(!o?.match||!s.test(o))throw new r.A((i&&i+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!n?.match||!s.test(n))throw new r.A((i&&i+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(o,10),l=parseInt(n,10);return new e(a,l,i)}}},55674:(e,t,i)=>{i.d(t,{Ad:()=>y,Gj:()=>m,QY:()=>d,lL:()=>g,xR:()=>h});var r=i(66131),o=i(49186),n=(i(44208),i(44729)),s=i(15032),a=i(65864),l=i(95466),p=i(43668),c=i(98623);const u=["geometry","scale","timeProperties"];function d(e,t){if(null!=t)for(const i of u)t.hasArcadeDependency(i)&&e.add(i);return e}function y(e,t){return f.create(e,t,null,["$feature","$view"])}function h(e,t,i){return f.create(e,t,i,["$feature","$view","$config"])}class f{static async create(e,t,i,r){const{arcade:n,Dictionary:s}=await(0,p.l)();let a;try{a=n.parseScript(e)}catch(t){throw new o.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=n.scriptUsesGeometryEngine(a);l&&await n.enableGeometrySupport(),await n.loadDependentModules(new Set,a,null,!1,l);const c={vars:r.reduce(((e,t)=>({...e,[t]:null})),{}),spatialReference:t,useAsync:!1},u=n.compileScript(a,c);let d=null;null!=i&&(d=new s(i),d.immutable=!0);const y=new s;return y.immutable=!1,y.setField("scale",0),new f(e,n,a,u,t,y,d,s)}constructor(e,t,i,r,o,n,s,a){this.script=e,this._arcade=t,this._syntaxTree=i,this._compiled=r,this._spatialReference=o,this._viewDict=n,this._configDict=s,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const i=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:o,currentEnd:n}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=o?null!=i?r.lY.epochToArcadeDate(o,i):r.lY.unknownEpochToArcadeDate(o):void 0,currentEnd:null!=n?null!=i?r.lY.epochToArcadeDate(n,i):r.lY.unknownEpochToArcadeDate(n):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:i})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,i){const r=t??new l.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=r.fields,this._boundSchema.fieldsIndex=r,this._boundSchema.spatialReference=i}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const i=this._getField(e);if(i)switch(i.type){case"date-only":case"esriFieldTypeDateOnly":return n.n.fromReader(this._boundTarget.attributes[i.name]);case"time-only":case"esriFieldTypeTimeOnly":return s.k.fromReader(this._boundTarget.attributes[i.name]);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return r.lY.fromReaderAsTimeStampOffset(this._boundTarget.attributes[i.name]);case"date":case"esriFieldTypeDate":{const t=this._boundTarget.attributes[i.name];return this.isUnknownDateTimeField(e)?r.lY.unknownEpochToArcadeDate(t):r.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU)}default:return this._boundTarget.attributes[i.name]}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map((e=>e.name))}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const i in e)t.push({name:i,alias:i,type:"string"==typeof e[i]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,i)=>{i.d(t,{q:()=>o});var r=i(62815);function o(e,t,i){if(!i?.features||!i.hasZ)return;const o=(0,r.N)(i.geometryType,t,e.outSpatialReference);if(null!=o)for(const e of i.features)o(e.geometry)}},73681:(e,t,i)=>{i.d(t,{n:()=>p});var o=i(49186),n=i(53966),s=i(46140),a=i(95466),l=i(55674);class p{static async from(e,t,i){const r=e.dictionary_version?s.R.parse(e.dictionary_version):null,a=new Set(e.itemsNames),u={};if(t)for(const e in t)u[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)u.hasOwnProperty(t.name)||(u[t.name]=t.value);const d=new Set(e.authoringInfo.symbol);for(const e of Object.keys(i))d.delete(e);d.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:d});const y=await(0,l.xR)(e.expression,null,u);if(!y)throw new o.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const h=!r||!r.greaterEqual(4,0);h&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:r});const f=new c(i,h);return new p(h,a,y,f)}constructor(e,t,i,r){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=i,this._reader=r}get itemNames(){return this._itemNames}evaluate(e,t,i,o){try{return this._reader.bind(e,i,o),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){r.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new a.A(e);const t=e.map((e=>({...e,type:"esriFieldTypeString"})));return new a.A(t)}}class c extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t?"":""+this._boundTarget.attributes[t.name]}}},91880:(e,t,i)=>{i.d(t,{A:()=>u});var r,o=i(90237),n=i(66552),s=i(25482),a=i(10107),l=(i(44208),i(53966),i(87811),i(40608));const p=new n.J({asc:"ascending",desc:"descending"});let c=class extends s.A{static{r=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new r({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,o._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,o._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,o._)([(0,a.MZ)({type:p.apiValues,json:{type:p.jsonValues,read:p.read,write:p.write}})],c.prototype,"order",void 0),c=r=(0,o._)([(0,l.$)("esri.layers.support.OrderByInfo")],c);const u=c},97927:(e,t,i)=>{i.r(t),i.d(t,{default:()=>W});var r=i(90237),o=i(49186),n=i(4718),s=i(93637),a=i(10107),l=(i(44208),i(53966),i(40608)),p=i(13600),c=i(82935),u=i(66552),d=i(69540),y=i(25482),h=(i(87811),i(69622)),f=i(21325);let m=class extends h.A{set horizontalWKID(e){e?(0,f.fn)({wkid:+e})?this._set("horizontalWKID",+e):this._set("horizontalWKID",e):this._set("horizontalWKID",null)}set verticalWKID(e){e?this._set("verticalWKID",isFinite(e)&&(0,f.fn)({wkid:+e})?+e:null):this._set("verticalWKID",null)}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:i,radialDistortionCoefficients:r,tangentialDistortionCoefficients:o}=this;return e?.length>1&&!Number.isNaN(t)&&i?.length>1&&r?.length>1&&o?.length>1}};(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"affineTransformations",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"focalLength",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"principalOffsetPoint",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"radialDistortionCoefficients",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"tangentialDistortionCoefficients",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"horizontalWKID",null),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"verticalWKID",null),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"x",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"y",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"z",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"type",void 0),m=(0,r._)([(0,l.$)("esri.layers.orientedImagery.core.CameraOrientation")],m);const g=m;let v=class extends(d.A.ClonableMixin(y.A.JSONSupportMixin(g))){constructor(){super(...arguments),this.type=1}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:r,y:o,z:n,heading:s,pitch:a,roll:l,affineTransformations:p,focalLength:c,principalOffsetPoint:u,radialDistortionCoefficients:d,tangentialDistortionCoefficients:y}=this,h=[e,t,i,r,o,n,s,a,l];return this.isAdvanced&&(p?.forEach((e=>h.push(e))),h.push(c),u?.forEach((e=>h.push(e))),d?.forEach((e=>h.push(e))),y?.forEach((e=>h.push(e)))),h.map((e=>Number.isNaN(e)?"":e)).join("|")}};(0,r._)([(0,a.MZ)({json:{write:!0}})],v.prototype,"type",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"affineTransformations",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"focalLength",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"principalOffsetPoint",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"radialDistortionCoefficients",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"tangentialDistortionCoefficients",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"heading",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"pitch",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"roll",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"x",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"y",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"z",void 0),v=(0,r._)([(0,l.$)("esri.layers.orientedImagery.core.CameraOrientationHPR")],v);const _=v;let w=class extends(d.A.ClonableMixin(y.A.JSONSupportMixin(g))){constructor(){super(...arguments),this.type=4}toString(){const{type:e,latitude:t,longitude:i,ellipsoidRadius:r,squaredEccentricity:o,properties:n}=this,s=`${n}`.split("|");return s.splice(1,1),`${e}|${t}|${i}|${r}|${o}|${s.join("|")}`}};(0,r._)([(0,a.MZ)({json:{write:!0}})],w.prototype,"type",void 0),(0,r._)([(0,a.MZ)({json:{write:!0},type:Number})],w.prototype,"latitude",void 0),(0,r._)([(0,a.MZ)({json:{write:!0},type:Number})],w.prototype,"longitude",void 0),(0,r._)([(0,a.MZ)({json:{write:!0},type:Number})],w.prototype,"ellipsoidRadius",void 0),(0,r._)([(0,a.MZ)({json:{write:!0},type:Number})],w.prototype,"squaredEccentricity",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],w.prototype,"properties",void 0),w=(0,r._)([(0,l.$)("esri.layers.orientedImagery.core.CameraOrientationLTP")],w);const b=w;let M=class extends(d.A.ClonableMixin(y.A.JSONSupportMixin(g))){constructor(){super(...arguments),this.type=2}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:r,y:o,z:n,omega:s,phi:a,kappa:l,affineTransformations:p,focalLength:c,principalOffsetPoint:u,radialDistortionCoefficients:d,tangentialDistortionCoefficients:y}=this,h=[e,t,i,r,o,n,s,a,l];return this.isAdvanced&&(p?.forEach((e=>h.push(e))),h.push(c),u?.forEach((e=>h.push(e))),d?.forEach((e=>h.push(e))),y?.forEach((e=>h.push(e)))),h.map((e=>isNaN(e)?"":e)).join("|")}};(0,r._)([(0,a.MZ)({json:{write:!0}})],M.prototype,"type",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],M.prototype,"affineTransformations",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],M.prototype,"focalLength",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],M.prototype,"principalOffsetPoint",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],M.prototype,"radialDistortionCoefficients",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],M.prototype,"tangentialDistortionCoefficients",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],M.prototype,"omega",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],M.prototype,"phi",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],M.prototype,"kappa",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],M.prototype,"x",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],M.prototype,"y",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],M.prototype,"z",void 0),M=(0,r._)([(0,l.$)("esri.layers.orientedImagery.core.CameraOrientationOPK")],M);const j=M;let x=class extends(d.A.ClonableMixin(y.A.JSONSupportMixin(g))){constructor(){super(...arguments),this.type=3}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:i,radialDistortionCoefficients:r,tangentialDistortionCoefficients:o}=this;return e?.length>1||!Number.isNaN(t)||i?.length>1||r?.length>1||o?.length>1}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:r,y:o,z:n,yaw:s,pitch:a,roll:l,affineTransformations:p,focalLength:c,principalOffsetPoint:u,radialDistortionCoefficients:d,tangentialDistortionCoefficients:y}=this,h=[e,t,i,r,o,n,s,a,l];return this.isAdvanced&&(p?.forEach((e=>h.push(e))),h.push(c),u?.forEach((e=>h.push(e))),u?.forEach((e=>h.push(e))),d?.forEach((e=>h.push(e))),y?.forEach((e=>h.push(e)))),h.map((e=>Number.isNaN(e)?"":e)).join("|")}};(0,r._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"type",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],x.prototype,"affineTransformations",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],x.prototype,"focalLength",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],x.prototype,"principalOffsetPoint",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],x.prototype,"radialDistortionCoefficients",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],x.prototype,"tangentialDistortionCoefficients",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],x.prototype,"yaw",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],x.prototype,"pitch",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],x.prototype,"roll",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],x.prototype,"x",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],x.prototype,"y",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],x.prototype,"z",void 0),x=(0,r._)([(0,l.$)("esri.layers.orientedImagery.core.CameraOrientationYPR")],x);const Z=x;var S;!function(e){e[e.HPR=1]="HPR",e[e.OPK=2]="OPK",e[e.YPR=3]="YPR",e[e.LTP=4]="LTP"}(S||(S={}));const P=new Map;P.set(`${S.OPK}`,{desc:"Using Omega Phi Kappa",constructor:j}),P.set(`${S.HPR}`,{desc:"Using Heading, Pitch and Roll",constructor:_}),P.set(`${S.YPR}`,{desc:"Using Yaw, Pitch and Roll",constructor:Z}),P.set(`${S.LTP}`,{desc:"Using Local Tangent Plane",constructor:b});let T=class extends(d.A.ClonableMixin(y.A)){constructor(){super(...arguments),this.url=null}};(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],T.prototype,"lod",void 0),(0,r._)([(0,a.MZ)({type:String,json:{write:!0}})],T.prototype,"rasterFunction",void 0),(0,r._)([(0,a.MZ)({type:String,json:{write:!0}})],T.prototype,"url",void 0),T=(0,r._)([(0,l.$)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ElevationSource")],T);let N=class extends(d.A.ClonableMixin(y.A)){constructor(){super(...arguments),this.constantElevation=null}};function D(e,t,i){return e?null!=(r=e)&&"number"==typeof r.constantElevation?new N(e):function(e,t,i){let{url:r}=e;return r?(r=function(e,t,i){return t&&(e=`${t}${e}`),i&&(e+=`${i}`),e}(r,t,i),new T({...e,url:r})):null}(e,t,i):e;var r}(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],N.prototype,"constantElevation",void 0),N=(0,r._)([(0,l.$)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ConstantElevation")],N);const O=new u.J({Minutes:"minutes",Hours:"hours",Days:"days",Weeks:"weeks",Months:"months",Years:"years"}),I=new u.J({Feet:"feet",Meter:"meter"}),A=new u.J({360:"360",Horizontal:"horizontal",Inspection:"inspection",Nadir:"nadir",Oblique:"oblique","":null}),R=new Map;R.set(`${S.HPR}`,(function(e){const[t,i,r,o,n,s,a,l,p,c,u,d,y,h,f,m,g,v,_,w,b,M]=e.slice(1);return{horizontalWKID:t,verticalWKID:i,x:r,y:o,z:n,heading:s,pitch:a,roll:l,...$([p,c,u,d,y,h],[m,g],[v,_,w],[b,M],f)}})),R.set(`${S.YPR}`,(function(e){const[t,i,r,o,n,s,a,l,p,c,u,d,y,h,f,m,g,v,_,w,b,M]=e.slice(1);return{horizontalWKID:t,verticalWKID:i,x:r,y:o,z:n,yaw:s,pitch:a,roll:l,...$([p,c,u,d,y,h],[m,g],[v,_,w],[b,M],f)}})),R.set(`${S.OPK}`,(function(e){const[t,i,r,o,n,s,a,l,p,c,u,d,y,h,f,m,g,v,_,w,b,M]=e.slice(1);return{horizontalWKID:t,verticalWKID:i,x:r,y:o,z:n,omega:s,phi:a,kappa:l,...$([p,c,u,d,y,h],[m,g],[v,_,w],[b,M],f)}})),R.set(`${S.LTP}`,(function(e){const[t,i,r,o,n,...s]=e.slice(1),a=R.get(n),l=P.get(n)?.constructor;return a&&l?{latitude:t,longitude:i,ellipsoidRadius:r,squaredEccentricity:o,properties:new l(a([n,"",...s]))}:null}));const F=e=>{const t=e.map((e=>parseFloat(e))).filter((e=>!isNaN(e)));if(t.length===e.length)return t};function $(e,t,i,r,o){const n=F(e),s=F(t),a=F(i),l=F(r);return{affineTransformations:6===n?.length?n:void 0,focalLength:6===n?.length?parseFloat(o):void 0,principalOffsetPoint:2!==s?.length?[0,0]:s,radialDistortionCoefficients:3!==a?.length?[0,0,0]:a,tangentialDistortionCoefficients:2!==l?.length?[0,0]:l}}var E=i(43440),z=i(79677),C=i(92935);const L=new Set(["demPathPrefix","demPathSuffix","depthImagePathPrefix","depthImagePathSuffix","elevationSource","horizontalMeasurementUnit","imageGeometryField","imageReferenceField","verticalMeasurementUnit","videoPathPrefix","videoPathSuffix","timeAnimation","visibilityTimeExtent"]),K=(e,t)=>!L.has(t)&&e;function G(e,t,i,r){const{name:o,write:n,read:s}=((e,t,i)=>{const r=`orientedImageryProperties.${e}`;return{name:r,write:t?{ignoreOrigin:!0,target:r,writer:t}:{ignoreOrigin:!0},read:i?{ignoreOrigin:!0,source:r,reader:i}:{ignoreOrigin:!0}}})(e,t,i),a={name:o,write:n,read:s,origins:{service:{name:`orientedImageryInfo.${o}`,write:t,read:i},"web-scene":{name:o,write:K(n,e),read:K(s,e)},"web-map":{name:o,write:n,read:s}}};return r&&a.origins?(a.type=r,a.origins["web-map"].type=r,a.origins["web-scene"].type=r,a):a}let J=class extends p.default{constructor(){super(...arguments),this.attributeTableTemplate=null,this.cameraHeading=null,this.cameraHeight=null,this.cameraPitch=null,this.cameraRoll=null,this.coveragePercent=null,this.demPathPrefix=null,this.demPathSuffix=null,this.depthImagePathPrefix=null,this.depthImagePathSuffix=null,this.elevationSource=null,this.farDistance=null,this.geometryType="point",this.horizontalFieldOfView=null,this.horizontalMeasurementUnit=null,this.imageGeometryField="ImageGeometry",this.imagePathPrefix=null,this.imagePathSuffix=null,this.imageReferenceField="OIObjectID",this.imageRotation=null,this.maximumDistance=null,this.nearDistance=null,this.operationalLayerType="OrientedImageryLayer",this.orientationAccuracy=null,this.orientedImageryType=null,this.supportedSourceTypes=new Set(["Oriented Imagery Layer"]),this.type="oriented-imagery",this.timeIntervalUnit="days",this.useViewTime=!0,this.verticalFieldOfView=null,this.verticalMeasurementUnit=null,this.videoPathPrefix=null,this.videoPathSuffix=null,this.visibilityTimeExtent=null}get effectiveElevationSource(){const{elevationSource:e,demPathPrefix:t,demPathSuffix:i}=this;return D(e,t,i)}async save(e){return this._debouncedSaveOperations(C.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(C.X.SAVE_AS,t,e)}findFirstValidLayerId(e){return e.layers?.find((e=>this.supportedSourceTypes.has(e.type)))?.id}_verifySource(){if(super._verifySource(),"point"!==this.geometryType)throw new o.A("oriented-imagery-layer:invalid-geometry-type","OrientedImageryLayer only supports point geometry type")}};var q;(0,r._)([(0,a.MZ)({type:E.A,json:{write:!1,read:!1}})],J.prototype,"attributeTableTemplate",void 0),(0,r._)([(0,a.MZ)({type:Number,json:G("cameraHeading")})],J.prototype,"cameraHeading",void 0),(0,r._)([(0,a.MZ)({type:Number,json:G("cameraHeight")})],J.prototype,"cameraHeight",void 0),(0,r._)([(0,a.MZ)({type:Number,json:G("cameraPitch")})],J.prototype,"cameraPitch",void 0),(0,r._)([(0,a.MZ)({type:Number,json:G("cameraRoll")})],J.prototype,"cameraRoll",void 0),(0,r._)([(0,a.MZ)({type:Number,json:G("coveragePercent")})],J.prototype,"coveragePercent",void 0),(0,r._)([(0,a.MZ)({type:String,json:G("demPathPrefix")})],J.prototype,"demPathPrefix",void 0),(0,r._)([(0,a.MZ)({type:String,json:G("demPathSuffix")})],J.prototype,"demPathSuffix",void 0),(0,r._)([(0,a.MZ)({type:String,json:G("depthImagePathPrefix")})],J.prototype,"depthImagePathPrefix",void 0),(0,r._)([(0,a.MZ)({type:String,json:G("depthImagePathSuffix")})],J.prototype,"depthImagePathSuffix",void 0),(0,r._)([(0,a.MZ)({type:Object,json:G("elevationSource")})],J.prototype,"elevationSource",void 0),(0,r._)([(0,a.MZ)({readOnly:!0})],J.prototype,"effectiveElevationSource",null),(0,r._)([(0,a.MZ)({type:Number,json:G("farDistance")})],J.prototype,"farDistance",void 0),(0,r._)([(0,a.MZ)()],J.prototype,"geometryType",void 0),(0,r._)([(0,a.MZ)({type:Number,json:G("horizontalFieldOfView")})],J.prototype,"horizontalFieldOfView",void 0),(0,r._)([(0,a.MZ)({type:String,json:G("horizontalMeasurementUnit")})],J.prototype,"horizontalMeasurementUnit",void 0),(0,r._)([(0,a.MZ)({type:String,json:{...G("imageGeometryField"),default:"ImageGeometry"}})],J.prototype,"imageGeometryField",void 0),(0,r._)([(0,a.MZ)({type:String,json:G("imagePathPrefix")})],J.prototype,"imagePathPrefix",void 0),(0,r._)([(0,a.MZ)({type:String,json:G("imagePathSuffix")})],J.prototype,"imagePathSuffix",void 0),(0,r._)([(0,a.MZ)({type:String,json:{...G("imageReferenceField"),default:"OIObjectID"}})],J.prototype,"imageReferenceField",void 0),(0,r._)([(0,a.MZ)({type:Number,json:G("imageRotation")})],J.prototype,"imageRotation",void 0),(0,r._)([(0,a.MZ)({type:Number,json:G("maximumDistance")})],J.prototype,"maximumDistance",void 0),(0,r._)([(0,a.MZ)({type:Number,json:G("nearDistance")})],J.prototype,"nearDistance",void 0),(0,r._)([(0,a.MZ)({type:["OrientedImageryLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],J.prototype,"operationalLayerType",void 0),(0,r._)([(0,a.MZ)({json:{...G("orientationAccuracy",((e,t,i)=>{(0,s.sM)(i,e.join(";"),t)}),(e=>{const t=e?.split(";")?.map(Number);return function(e){return Array.isArray(e)&&9===e?.length&&!e.some(isNaN)}(t)?t:[0,0,0,0,0,0,0,0,0]}),String)}})],J.prototype,"orientationAccuracy",void 0),(0,r._)([(0,a.MZ)({json:{...G("orientedImageryType",A.write,A.read,A.jsonValues.slice(1))}})],J.prototype,"orientedImageryType",void 0),(0,r._)([(0,a.MZ)({json:{read:!1},value:"oriented-imagery",readOnly:!0})],J.prototype,"type",void 0),(0,r._)([(0,a.MZ)({type:O.apiValues,json:{...G("timeIntervalUnit",O.write,O.read,O.jsonValues)}})],J.prototype,"timeIntervalUnit",void 0),(0,r._)([(0,a.MZ)((q=(0,n.o8)(c.B),q.json?(q.json.origins=q.json.origins??{},q.json.origins["web-scene"]={write:!1,read:!1},q):q))],J.prototype,"useViewTime",void 0),(0,r._)([(0,a.MZ)({type:Number,json:G("verticalFieldOfView")})],J.prototype,"verticalFieldOfView",void 0),(0,r._)([(0,a.MZ)({type:I.apiValues,json:{...G("verticalMeasurementUnit",I.write,I.read,I.jsonValues)}})],J.prototype,"verticalMeasurementUnit",void 0),(0,r._)([(0,a.MZ)({type:String,json:G("videoPathPrefix")})],J.prototype,"videoPathPrefix",void 0),(0,r._)([(0,a.MZ)({type:String,json:G("videoPathSuffix")})],J.prototype,"videoPathSuffix",void 0),(0,r._)([(0,a.MZ)({type:z.A,json:{origins:{"web-scene":{write:!1,read:!1}}}})],J.prototype,"visibilityTimeExtent",void 0),J=(0,r._)([(0,l.$)("esri.layers.OrientedImageryLayer")],J);const W=J}}]);
|