@arcgis/core 4.29.0-next.20240222 → 4.29.1
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/arcade/treeAnalysis.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{b43fde3e25d0c3b020b5.js → 039a872509872ce67ba4.js} +1 -1
- package/assets/esri/core/workers/chunks/0bc21d2a0b65bd4e9d76.js +1 -0
- package/assets/esri/core/workers/chunks/{5243f9ff21e768c620c2.js → 23a5d750d93a7829174f.js} +1 -1
- package/assets/esri/core/workers/chunks/{47e6119be4a4a5ed640d.js → 2447a4d5886aeb0ff72a.js} +1 -1
- package/assets/esri/core/workers/chunks/{7f45a9e9bdbcffc2d6e0.js → 348bcc57b99a975902a8.js} +1 -1
- package/assets/esri/core/workers/chunks/{8c9fb2601488998013ba.js → 3523789a2948a4ab8cc8.js} +1 -1
- package/assets/esri/core/workers/chunks/{24649b410b757599a549.js → 48db6e0bbb1a9c043193.js} +1 -1
- package/assets/esri/core/workers/chunks/{752082be991f1cc8558f.js → 4984e2b79d862114d6a6.js} +1 -1
- package/assets/esri/core/workers/chunks/{8d9736fd15cdb54d9855.js → 5227f9eea6988aadad7f.js} +1 -1
- package/assets/esri/core/workers/chunks/58723274ef657fe212eb.js +1 -0
- package/assets/esri/core/workers/chunks/60ab18c6a04d4b2f1d4c.js +1 -0
- package/assets/esri/core/workers/chunks/647515801d94180b8402.js +1 -0
- package/assets/esri/core/workers/chunks/6c3ae96ec90e9ed7dd50.js +1 -0
- package/assets/esri/core/workers/chunks/7a8bba91769ee18cc39f.js +1 -0
- package/assets/esri/core/workers/chunks/7a98d2e026f63a581b1e.js +1 -0
- package/assets/esri/core/workers/chunks/8c360923cd1850767d3e.js +1 -0
- package/assets/esri/core/workers/chunks/{1a25ba411b89e050fbb7.js → a61f337802ae963d7f65.js} +1 -1
- package/assets/esri/core/workers/chunks/{d0c5318d7ef2e923aad0.js → a8ac511280f873960d46.js} +1 -1
- package/assets/esri/core/workers/chunks/b125ab84b7761e761734.js +1 -0
- package/assets/esri/core/workers/chunks/{b34d6e58b125fe111f91.js → b42a83db83851cb57d44.js} +1 -1
- package/assets/esri/core/workers/chunks/{1497dd943df7eede0704.js → b9c55ff1f21db198ce03.js} +1 -1
- package/assets/esri/core/workers/chunks/bb3322ddb89c0bd444f0.js +1 -0
- package/assets/esri/core/workers/chunks/becfdaeeb07f089d8be7.js +1 -0
- package/assets/esri/core/workers/chunks/{b26e39a399963c176d33.js → c527692694688a5b3b07.js} +2 -2
- package/assets/esri/core/workers/chunks/{210a93e0b96c5bff44a3.js → c556644bb0cf88770939.js} +1 -1
- package/assets/esri/core/workers/chunks/{e7b26c7e9e24dc6255be.js → cacf97b0a7a1057b9f79.js} +1 -1
- package/assets/esri/core/workers/chunks/{a5e7b4acae17f88e2208.js → ce93027b6b81428ce9b0.js} +1 -1
- package/assets/esri/core/workers/chunks/{b8ece275abac93f3dccf.js → d14f16bfa6c12909929c.js} +1 -1
- package/assets/esri/core/workers/chunks/{1594f06a2d7d9439c62e.js → e2147c99cc5839654be1.js} +1 -1
- package/assets/esri/core/workers/chunks/{d33ed3a2a0d4b640bd4a.js → e4c7d8c69e4957c9d27c.js} +1 -1
- package/assets/esri/core/workers/chunks/{7709248f59520aee6f51.js → eceaa46f622f6fa31128.js} +1 -1
- package/assets/esri/core/workers/chunks/{2286db4c83ff1b6fb088.js → ef3e6209e6ac6a56960b.js} +1 -1
- package/assets/esri/core/workers/chunks/f59b5ea05caca8a1a398.js +1 -0
- package/chunks/Laserlines.glsl.js +3 -3
- package/chunks/Precipitation.glsl.js +1 -1
- package/chunks/SSAOBlur.glsl.js +2 -2
- package/chunks/boundedPlane.js +1 -1
- package/chunks/cameraUtilsSpherical.js +1 -1
- package/chunks/sphere.js +1 -1
- package/chunks/terrainUtilsPlanar.js +1 -1
- package/chunks/vec32.js +1 -1
- package/config.js +1 -1
- package/copyright.txt +56 -28
- 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/axisAngleDegrees.js +1 -1
- package/geometry/support/coordinateSystem.js +1 -1
- package/geometry/support/lineSegment.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/geometry/support/meshUtils/merge.js +1 -1
- package/geometry/support/meshUtils/rotate.js +1 -1
- package/geometry/support/meshUtils/scale.js +1 -1
- package/geometry/support/meshUtils/vertexSpaceConversion.js +5 -0
- package/geometry/support/meshVertexSpaceUtils.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/geometry/support/ray.js +1 -1
- package/geometry/support/triangle.js +1 -1
- package/geometry/support/vector.js +1 -1
- package/interfaces.d.ts +12 -12
- package/kernel.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/mixins/FeatureReductionLayer.js +1 -1
- package/layers/orientedImagery/core/CameraOrientation.js +1 -1
- package/layers/orientedImagery/core/ElevationSourceDefinitions.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +5 -0
- package/layers/orientedImagery/transformations/updateElevation.js +5 -0
- package/layers/orientedImagery/transformations/updateElevationUtils.js +5 -0
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/orientedImagery/transformations/worldToImage.js +5 -0
- package/layers/support/EditingCapabilities.js +1 -1
- package/layers/support/editableLayers.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/video/VideoCameraSensorModel.js +1 -1
- package/layers/voxel/VoxelVolume.js +1 -1
- package/layers/voxel/voxelPlaneUtils.js +1 -1
- package/libs/linkchartlayout/LinkChartLayout.js +1 -1
- package/package.json +1 -1
- package/smartMapping/renderers/pieChart.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/views/2d/arcade/callExpressionWithCursor.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/createTestMeshData.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterInputEvaluator.js +1 -1
- package/views/2d/interactive/editingTools/TransformTool.js +1 -1
- package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/aggregation/GeohashSpatialIndex.js +1 -1
- package/views/2d/layers/features/aggregation/GridSpatialIndex.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
- package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/DrillDownTileSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/OverrideChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/PagedTileSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/StreamSourceChunk.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
- package/views/2d/layers/features/support/GraphicsReader.js +1 -1
- package/views/2d/layers/features/support/Tile.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/tiling/TileKey.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
- package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.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/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/support/measurementUtils.js +1 -1
- package/views/3d/animation/pointToPoint/Camera.js +1 -1
- package/views/3d/camera/constraintUtils/common.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/camera/intersectionUtils.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/MarsAtmosphere.js +1 -1
- package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/edgeOffsetUtils.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ExtentScale.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/extentUtils.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/support/Segment.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudWorker.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/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/LoDUtil.js +1 -1
- package/views/3d/layers/i3s/PointRenderer.js +1 -1
- package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/layers/support/uvUtils.js +1 -1
- package/views/3d/state/Frustum.js +1 -1
- package/views/3d/state/NearFarHeuristic.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/controllers/RotateController.js +1 -1
- package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/global/ZoomController.js +1 -1
- package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
- package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/local/ZoomController.js +1 -1
- package/views/3d/state/controllers/local/ZoomStepController.js +1 -1
- package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/state/utils/viewUtils.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/cameraUtilsInternal.js +1 -1
- package/views/3d/support/intersectionUtils.js +1 -1
- package/views/3d/support/mathUtils.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/support/sunUtils.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/core/util/TwoVectorPosition.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
- package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
- package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
- package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/pbrUtils.js +1 -1
- package/views/SelectionManager.js +1 -1
- package/views/draw/support/createUtils.js +1 -1
- package/views/draw/support/surfaceCoordinateSystems.js +1 -1
- package/views/interactive/GraphicManipulator.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/RightAngleSnapper.js +1 -1
- package/views/interactive/snapping/candidates/ParallelLineSnappingCandidate.js +1 -1
- package/views/interactive/snapping/candidates/RightAngleTriangleSnappingCandidate.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
- package/views/interactive/snapping/hints/IntersectionSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/ParallelSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/PointSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/RightAngleSnappingHint.js +1 -1
- package/views/layers/FeatureLayerView.js +1 -1
- package/views/layers/support/editableLayerViews.js +5 -0
- package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
- package/views/support/angularMeasurementUtils.js +1 -1
- package/views/support/euclideanAreaMeasurementUtils.js +1 -1
- package/views/support/euclideanLengthMeasurementUtils.js +1 -1
- package/views/support/geometry3dUtils.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/support/EditorEditingCapabilities.js +1 -1
- package/widgets/Editor/support/EditorItem.js +1 -1
- package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/support/ColumnTemplateBase.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/utils.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/support/Selector2D/SelectionOperation.js +1 -1
- package/widgets/support/Selector2D/selectorUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0e83f3718a0b45652b5e.js +0 -1
- package/assets/esri/core/workers/chunks/1fa5c8af69a09a3730b3.js +0 -1
- package/assets/esri/core/workers/chunks/25f73748df0ee82d06cb.js +0 -1
- package/assets/esri/core/workers/chunks/2d7a18f8c540269ecee9.js +0 -1
- package/assets/esri/core/workers/chunks/4736f79b5c94ce103d43.js +0 -1
- package/assets/esri/core/workers/chunks/65f7adaaf1f535310c11.js +0 -1
- package/assets/esri/core/workers/chunks/79c041b292648c5eaecc.js +0 -1
- package/assets/esri/core/workers/chunks/7c4c2c0beddabac672b6.js +0 -1
- package/assets/esri/core/workers/chunks/9a758de08dfa57735879.js +0 -1
- package/assets/esri/core/workers/chunks/a4c3da057ec2a07bbbe8.js +0 -1
- package/assets/esri/core/workers/chunks/b252270b100351779f1f.js +0 -1
- package/assets/esri/core/workers/chunks/dc57aa9f2fc69e654559.js +0 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import{watch as t,when as s}from"../core/reactiveUtils.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import l from"../layers/support/CodedValueDomain.js";import o from"./Widget.js";import{loadCalciteComponents as a}from"./support/componentsUtils.js";import{globalCss as n}from"./support/globalCss.js";import{legacyIcon as c}from"./support/legacyIcon.js";import{storeNode as d}from"./support/widgetUtils.js";import{messageBundle as h}from"./support/decorators/messageBundle.js";import{vmEvent as u}from"./support/decorators/vmEvent.js";import{tsx as p}from"./support/jsxFactory.js";import g from"./UtilityNetworkTrace/UtilityNetworkTraceViewModel.js";import{defaultSwatchColors as m}from"./UtilityNetworkTrace/support/GraphicHandler.js";const _="esri-utility-trace-network",w={base:_,widgetIcon:c.polyline,loaderContainer:`${_}__loader-container`,loader:`${_}__loader`,fadeIn:`${_}--fade-in`,addButtonContainer:`${_}__add-button-container`,noticeContainer:`${_}__notice-container`,listContainer:`${_}__list-container`,resultsContainer:`${_}__results-container`,flow:`${_}__flow`,numberInput:`${_}__number-input`,clearPrompt:`${_}__reset-prompt`,promptDivider:`${_}__divider`,paddingTop:`${_}__padTop`},v="esri.widgets.UtilityNetworkTrace";function b(e){return{height:e+"px"}}function y(e){return{width:e+"px"}}function f(){return{width:"75%"}}function T(){return{textAlign:"center",padding:"1rem"}}function S(e){return{width:"100%",height:window.getComputedStyle(e).getPropertyValue("max-height")}}function R(){return{height:"100%"}}function C(e){return{display:"flex",flexDirection:e}}function A(e){return e instanceof l}const F={noExtension:-2147208474};let k=class extends o{constructor(e,t){super(e,t),this._tracesExists=!0,this._selectToolActive=!1,this._activeTrace=null,this._activeSwatch="",this._traceHeaderForFlow="",this._assetGroupHeader="",this._assetTypeHeader="",this._traceResultsFunctions=[],this._traceResultsAssetGroup=[],this._traceResultsAssetType=[],this._traceResultsIndividual=[],this._showTraceResultFunctions=!1,this._showTraceResultAssetGroup=!1,this._showTraceResultAssetType=!1,this._showIndividualRecords=!1,this._activeTab="input",this._flagViewType="starting-point",this._alertRemoveModal=!1,this._warningNoFlag=!1,this._warningNoTraceSelected=!1,this._warningNoStartAssetFound=!1,this._warningNoBarrierAssetFound=!1,this._warningNoTerminal=!1,this._confirmReset=!1,this._showResultOptions=!1,this._resultObjectIdField="objectid",this._resultDisplayField="objectid",this._resultSortField="objectid",this._resultSortOrder="desc",this._swatchNode=null,this._individualResultNode=null,this._symbolStartFlag=null,this._symbolBarrier=null,this._watchHandler=null,this._loadUNError=!0,this._errorMessage="",this.disabled=!0,this.iconClass=w.widgetIcon,this.inputSettings=[],this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.viewModel=new g,this._afterComponentCreate=this._afterComponentCreate.bind(this)}initialize(){this._utilityNetworkTraceInitialized(),this.addHandles(t((()=>this.viewModel?.resultAreaProperties),(()=>this.scheduleRender())))}get defaultGraphicColor(){return this.viewModel.defaultGraphicColor}set defaultGraphicColor(e){this.viewModel.defaultGraphicColor=e}get flags(){return this.viewModel.flags}set flags(e){this.viewModel.flags=e}get gdbVersion(){return this.viewModel.gdbVersion}set gdbVersion(e){this.viewModel.gdbVersion=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get resultAreaProperties(){return this.viewModel.resultAreaProperties}set resultAreaProperties(e){this.viewModel.resultAreaProperties=e}get selectedTraces(){return this.viewModel.selectedTraces}set selectedTraces(e){this.viewModel.selectedTraces=e}get selectOnComplete(){return this.viewModel.selectOnComplete}set selectOnComplete(e){this.viewModel.selectOnComplete=e}get showGraphicsOnComplete(){return this.viewModel.showGraphicsOnComplete}set showGraphicsOnComplete(e){this.viewModel.showGraphicsOnComplete=e}get enableResultArea(){return this.viewModel.enableResultArea}set enableResultArea(e){this.viewModel.enableResultArea=e}get showSelectionAttributes(){return this.viewModel.showSelectionAttributes}set showSelectionAttributes(e){this.viewModel.showSelectionAttributes=e}get utilityNetwork(){return this.viewModel.utilityNetwork}set utilityNetwork(e){this.viewModel.utilityNetwork=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}async checkCanTrace(){this._confirmReset=!1;const e=this.viewModel.checkCanTrace();e.status?(this._warningNoFlag=!1,this._warningNoTraceSelected=!1,this._warningNoTraceSelected=!1,this._warningNoTerminal=!1,this._showTraceResultFunctions=!1,this._showTraceResultAssetGroup=!1,this._showTraceResultAssetType=!1,this._showIndividualRecords=!1,this.switchTab("result"),this.viewModel._activeProgress=!0,this.viewModel.removeAllResultAreaGraphics(),await this.viewModel.callTrace(),this.viewModel._activeProgress=!1):e.issues.forEach((e=>{switch(e){case"noStart":this._warningNoFlag=!0;break;case"noTerminalSelected":this._warningNoTerminal=!0;break;default:this._warningNoTraceSelected=!0}}))}confirmReset(){this._confirmReset=!0}render(){const{state:e}=this.viewModel;this._mixCustomStrings(),this._overrideFlagSymbol();const t="loading"===e?this._renderLoading():this._renderUtilityNetworkTrace();return p("div",{class:this.classes(w.base,n.widget,n.panel,{[n.widgetDisabled]:this.disabled}),styles:R()},t)}loadDependencies(){return a({action:()=>import("@esri/calcite-components/dist/components/calcite-action.js"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group.js"),"action-pad":()=>import("@esri/calcite-components/dist/components/calcite-action-pad.js"),block:()=>import("@esri/calcite-components/dist/components/calcite-block.js"),"block-section":()=>import("@esri/calcite-components/dist/components/calcite-block-section.js"),button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),checkbox:()=>import("@esri/calcite-components/dist/components/calcite-checkbox.js"),"color-picker-swatch":()=>import("@esri/calcite-components/dist/components/calcite-color-picker-swatch.js"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox.js"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item.js"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow.js"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number.js"),label:()=>import("@esri/calcite-components/dist/components/calcite-label.js"),list:()=>import("@esri/calcite-components/dist/components/calcite-list.js"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item.js"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader.js"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice.js"),option:()=>import("@esri/calcite-components/dist/components/calcite-option.js"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel.js"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover.js"),scrim:()=>import("@esri/calcite-components/dist/components/calcite-scrim.js"),select:()=>import("@esri/calcite-components/dist/components/calcite-select.js"),tab:()=>import("@esri/calcite-components/dist/components/calcite-tab.js"),"tab-nav":()=>import("@esri/calcite-components/dist/components/calcite-tab-nav.js"),"tab-title":()=>import("@esri/calcite-components/dist/components/calcite-tab-title.js"),tabs:()=>import("@esri/calcite-components/dist/components/calcite-tabs.js"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip.js")})}switchTab(e){this._activeTab=e}switchToFunctions(e,t){this._traceResultsFunctions=e,this._showTraceResultFunctions=t}switchToAssetGroup(e,t,s){this._traceHeaderForFlow=t,this._traceResultsAssetGroup=e,this._showTraceResultAssetGroup=s}switchToAssetType(e,t,s){this._assetGroupHeader=t,this._traceResultsAssetType=e,this._showTraceResultAssetType=s}switchToIndividualRecords(e,t,s){this._assetTypeHeader=t,this._traceResultsIndividual=e,this._showIndividualRecords=s}_renderLoading(){return p("div",{class:w.loaderContainer,key:"loader"},p("div",{class:w.loader}))}_renderUtilityNetworkTrace(){const{messages:e,messagesCommon:t}=this;let s=p("calcite-tabs",{layout:"center",position:"top",styles:S(this.container)},p("calcite-tab-nav",{slot:"title-group"},p("calcite-tab-title",{onclick:()=>{this.switchTab("input")},selected:"input"===this._activeTab},e.inputsStrings.headerTabInputs),p("calcite-tab-title",{onclick:()=>{this.switchTab("result")},selected:"result"===this._activeTab},e.resultsStrings.headerTabResults)),p("calcite-tab",{selected:"input"===this._activeTab},this._renderInputPanel()),p("calcite-tab",{selected:"result"===this._activeTab},this.viewModel._activeProgress?p("calcite-loader",{label:e.alertsStrings.traceExecuting,text:e.alertsStrings.traceExecuting,type:"indeterminate"}):this.viewModel.traceResults.length>0?this._renderResultPanel():this._renderWarningMessage("noTraceExecuted",!1),this._confirmReset?p("calcite-scrim",{key:"prompt"},p("div",{class:w.clearPrompt},p("h3",{slot:"header"},e.resultsStrings.startOverButton),p("div",{slot:"content"},e.resultsStrings.startOverValidation),p("div",{class:w.promptDivider}),p("div",{styles:C("row")},p("calcite-button",{appearance:"outline",onclick:()=>{this._confirmReset=!1},slot:"secondary",width:"full"},t.cancel),p("calcite-button",{onclick:()=>{this._confirmReset=!1,this.viewModel.reset(),this.switchTab("input")},slot:"primary",width:"full"},t.form.ok)))):null));return this._tracesExists||(s=p("calcite-panel",null,this._renderWarningMessage("noTraceConfig",!1))),this._loadUNError||(s=p("calcite-panel",null,this._renderWarningMessage("loadUNError",!1,this._errorMessage))),s}_renderInputPanel(){const{messages:e}=this;return p("calcite-flow",{class:w.flow},p("calcite-flow-item",null,this._warningNoFlag?this._renderWarningMessage("flag",!0):null,this._warningNoTerminal?this._renderWarningMessage("noTerminal",!0):null,this._warningNoTraceSelected?this._renderWarningMessage("trace",!0):null,this._renderTraceSelectorContainer(),this._renderStartFlagsContainer(),this._renderBarriersFlagsContainer(),this._warningNoFlag&&this._warningNoTraceSelected?p("div",{styles:b(10)}):null,p("calcite-button",{kind:"brand",onclick:()=>{this.checkCanTrace()},scale:"m",slot:"footer",width:"full"},e.tracingStrings.runTrace)),this._selectToolActive?this._renderActiveTool():null)}_renderResultPanel(){return p("calcite-flow",{styles:R()},this._renderTraceResults(),this._showTraceResultFunctions?this._renderTraceResultFunctions():null,this._showTraceResultAssetGroup?this._renderTraceResultByAssetGroup():null,this._showTraceResultAssetType?this._renderTraceResultByAssetType():null,this._showIndividualRecords?this._renderTraceResultIndividual():null,this._showIndividualRecords?this._renderTraceResultIndividualPopover():null)}_renderStartFlagsContainer(){const{messages:e}=this,t=[];let s=[];s=this.viewModel._flags.filter((e=>"starting-point"===e.type)),s.forEach((e=>{e.displayValue&&t.push(this._renderFlagRow(e,"start"))}));let i=null;return this._symbolStartFlag&&(i=this._getSymbolIcon(this._symbolStartFlag)),p("calcite-block",{collapsible:!0,heading:e.inputsStrings.headerStartingPoint+" ("+s.length+")",open:!0,overlayPositioning:"fixed"},p("div",{slot:"icon"},i||p("calcite-icon",{icon:"pin",scale:"s"})),p("div",null,e.inputsStrings.startingPointHint),p("div",{class:w.listContainer},t),this._warningNoStartAssetFound?this._renderWarningMessage("noStartAsset",!0):null,p("div",{class:w.addButtonContainer},p("calcite-button",{alignment:"center",appearance:"outline",href:"",iconStart:"plus",label:e.inputsStrings.addPointOption,onclick:()=>{this._changeCursor("crosshair"),this._flagViewType="starting-point",this._selectToolActive=!0,this._warningNoStartAssetFound=!1,this.viewModel.addFlagByHit("starting-point",this._symbolStartFlag).then((e=>{this._changeCursor("default"),e?this._warningNoFlag=!1:this._warningNoStartAssetFound=!0,this._selectToolActive=!1}))},round:!0,scale:"m"})))}_renderBarriersFlagsContainer(){const{messages:e}=this,t=[];let s=[];s=this.viewModel._flags.filter((e=>"barrier"===e.type)),s.forEach((e=>{e.displayValue&&t.push(this._renderFlagRow(e,"barrier"))}));let i=null;return this._symbolBarrier&&(i=this._getSymbolIcon(this._symbolBarrier)),p("calcite-block",{collapsible:!0,heading:e.inputsStrings.headerBarrier+" ("+s.length+")",open:!1,overlayPositioning:"fixed"},p("div",{slot:"icon"},i||p("calcite-icon",{icon:"x-circle-f",scale:"s"})),p("div",null,e.inputsStrings.barrierPointHint),p("div",{class:w.listContainer},t),this._warningNoBarrierAssetFound?this._renderWarningMessage("noBarrierAsset",!0):null,p("div",{class:w.addButtonContainer},p("calcite-button",{alignment:"center",appearance:"outline",href:"",iconStart:"plus",kind:"brand",label:e.inputsStrings.addPointOption,onclick:()=>{this._changeCursor("crosshair"),this._flagViewType="barrier",this._selectToolActive=!0,this._warningNoBarrierAssetFound=!1,this.viewModel.addFlagByHit("barrier",this._symbolBarrier).then((e=>{this._changeCursor("default"),e||(this._warningNoBarrierAssetFound=!0),this._selectToolActive=!1}))},round:!0,scale:"m"})))}_renderFlagRow(e,t){const{messages:s,messagesCommon:i}=this,r=[];let l=!1;return null!=e.allTerminals&&e.allTerminals.terminals.length>0&&(l=!0,e.allTerminals.terminals.forEach((t=>{let s=!1;e?.selectedTerminals?.includes(t.id)&&(s=!0),r.push(p("calcite-combobox-item",{key:t.name,selected:s,textLabel:t.name,value:t.id}))}))),p("calcite-block",{collapsible:null!==e.allTerminals||"barrier"===e.type,heading:e.displayValue?.value??"",key:"pop"+e.globalId+e.type+e.id+t,overlayPositioning:"fixed"},p("calcite-action",{icon:"trash",label:i.remove,onclick:()=>{this.viewModel.removeFlag(e)},scale:"s",slot:"header-menu-actions",text:i.remove,textEnabled:!0}),p("calcite-action",{icon:"zoom-to-object",label:s.globalStrings.zoomToFeature,onclick:()=>{this.viewModel.zoomToAsset(e.details.geometry)},scale:"s",slot:"header-menu-actions",text:s.globalStrings.zoomToFeature,textEnabled:!0}),"barrier"===e.type?p("calcite-label",{layout:"inline",scale:"s"},p("calcite-checkbox",{checked:e.isFilterBarrier,onclick:()=>{this.viewModel.manageFilterBarrier(!e.isFilterBarrier,e)},scale:"s"}),s.inputsStrings.barrierFilter):null,l?p("calcite-combobox",{label:s.globalStrings.selectTerminalPlaceholder,maxItems:0,placeholder:s.globalStrings.selectTerminalPlaceholder,scale:"s",selectionMode:"multiple",onCalciteComboboxChange:t=>{t.target.selectedItems.length>0?(e.selectedTerminals=[],t.target.selectedItems.forEach((t=>{this.viewModel.addTerminal(t.value,e)}))):e.selectedTerminals=[]},onCalciteComboboxChipClose:t=>{t.preventDefault(),this.viewModel.removeTerminal(t.target.value,e)}},r):null)}_renderActiveTool(){const{messages:e}=this;let t=null;return"starting-point"===this._flagViewType?this._symbolStartFlag&&(t=this._getSymbolIcon(this._symbolStartFlag)):this._symbolBarrier&&(t=this._getSymbolIcon(this._symbolBarrier)),p("calcite-flow-item",{heading:e.inputsStrings.addPointOption,onCalciteFlowItemBack:()=>{this.viewModel._clickHandler&&(this.viewModel._clickHandler.remove(),this.view?.popup&&(this.view.popupEnabled=!0)),this._selectToolActive=!1}},p("calcite-block",{collapsible:!1,heading:"",open:!0,overlayPositioning:"fixed"},p("div",{styles:T()},t||p("calcite-icon",{icon:"starting-point"===this._flagViewType?"pin-plus":"x-circle-f",scale:"m"})),p("div",{styles:T()},e.inputsStrings.addPointHint)))}_renderTraceSelectorContainer(){const{messages:e}=this,t=[];let s=e.tracingStrings.traceOperation,i=0;return this.viewModel._traces.length>0&&this.viewModel._traces.forEach((e=>{t.push(p("calcite-combobox-item",{key:e.globalId,selected:e.selected,textLabel:e.title,value:e.globalId,onCalciteComboboxItemChange:e=>{const t=e.target;this.viewModel.selectTraces(t.selected,t.value),this.viewModel._traces.length>0&&(this._warningNoTraceSelected=!1)}})),e.selected&&i++})),s+=` (${i})`,p("calcite-block",{collapsible:!0,heading:s,open:!0,overlayPositioning:"fixed"},p("calcite-icon",{icon:"utility-network-trace",scale:"s",slot:"icon"}),p("calcite-combobox",{label:e.inputsStrings.selectTraces,maxItems:0,placeholder:e.inputsStrings.selectTraces,scale:"s",selectionMode:"multiple"},t))}_renderStartOverContainer(){const{messages:e}=this;return p("calcite-button",{kind:"brand",onclick:()=>{this.confirmReset()},scale:"m",slot:"footer",width:"full"},e.resultsStrings.startOverButton)}_renderWarningMessage(e,t,s){const{messages:i}=this;let r=i.alertsStrings.NoRunAlertHeader,l=i.alertsStrings.noResultsInfo;switch(e){case"flag":r=i.alertsStrings.startingPointAlertHeader,l=i.alertsStrings.startingPointAlert;break;case"noTerminal":r=i.alertsStrings.noTerminalDefinedHeader,l=i.alertsStrings.noTerminalDefined;break;case"trace":r=i.alertsStrings.selectTraceAlertHeader,l=i.alertsStrings.selectTraceAlert;break;case"noTraceExecuted":r=i.alertsStrings.NoRunAlertHeader,l=i.alertsStrings.noResultsInfo;break;case"noBarrierAsset":case"noStartAsset":r=i.alertsStrings.noAssetsFoundHeader,l=i.alertsStrings.noAssetFound;break;case"noTraceConfig":r="",l=i.alertsStrings.noTraceSupported;break;default:r=i.alertsStrings.genericErrorHeader,l=s||""}return p("div",{class:w.noticeContainer,key:e},p("calcite-notice",{closable:t,icon:!0,key:e,kind:"danger",open:!0,scale:"s",width:"auto",onCalciteNoticeClose:()=>{switch(e){case"flag":this._warningNoFlag=!1;break;case"noTerminal":this._warningNoTerminal=!1;break;case"trace":this._warningNoTraceSelected=!1;break;case"noStartAsset":this._warningNoStartAssetFound=!1;break;case"noBarrierAsset":this._warningNoBarrierAssetFound=!1}}},p("div",{slot:"title"},r),p("div",{slot:"message"},l)))}_renderRemoveTraceContainer(e){const{messages:t}=this;return p("calcite-action",{icon:"trash",label:t.globalStrings.clearResults,onclick:()=>{this._alertRemoveModal=!0,this._activeTrace=e.trace},scale:"s",slot:"header-menu-actions",text:t.globalStrings.clearResults,textEnabled:!0})}_renderHighlightColorPicker(e,t,s){const{messages:i}=this,{graphicHandler:r}=this.viewModel,l=[],o=new RegExp(`^${e.hex}$`,"i"),a=r.highlightColor.length>m.length?5:4;for(const n of r.highlightColor)l.push(p("calcite-action",{active:o.test(n.hex),key:n.hex,label:i.resultsStrings.graphicColor,onclick:()=>{"aggregate"===s?this.viewModel.changeResultGraphicColor(n,t):this.viewModel.changeResultAreaColor(t,n)},scale:"s",text:i.resultsStrings.graphicColor},p("calcite-color-picker-swatch",{active:o.test(n.hex),color:n.hex,scale:"s"})));return p("calcite-action-pad",{expandDisabled:!0,layout:"grid",position:"start"},p("calcite-action-group",{columns:a,layout:"grid"},l))}_renderTraceResults(){const{messages:e,messagesCommon:t}=this,{selectFeatures:s}=e.resultsStrings,i=this.viewModel.traceResults,r=[];return i.forEach(((t,i)=>{let l=[],o=[],a=!1,n=!1,c=!1,d="";null!==t.results&&t.results.hasOwnProperty("elements")?(null!==t.results.aggregatedGeometry&&(n=!0),null!==t.results.globalFunctionResults&&t.results.globalFunctionResults.length>0&&(o=t.results.globalFunctionResults,o.length>0&&(c=!0)),t.results.elements&&t.results.elements.length>0&&(l=t.results.elements,l.length>0&&(a=!0)),(n||a)&&(d=this.messagesUnits.units[t.resultArea?.unit]?.abbr),r.push(p("calcite-block",{collapsible:!0,description:t.trace.description??"",heading:t.trace.title,key:`${t.trace.title}${i}`,open:!0,overlayPositioning:"fixed"},this._renderRemoveTraceContainer(t),p("calcite-list",null,c?p("calcite-list-item",{label:e.resultsStrings.functionHeader+" ("+o.length+")",onCalciteListItemSelect:()=>{this.switchToFunctions(o,!0)}},p("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"})):null,a&&this.viewModel.showSelectionAttributes?p("calcite-list-item",{key:this.id,label:e.resultsStrings.viewFeatures+" ("+l.length+")",onCalciteListItemSelect:()=>{this.switchToAssetGroup(this._groupResultsByAssetGroup(t),t.trace.title+" ("+l.length+")",!0)}},p("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"})):this.viewModel.showSelectionAttributes?p("calcite-label",{layout:"inline",scale:"s"},e.resultsStrings.noSelectionResults):null),a?p("div",{class:w.paddingTop},p("calcite-label",{layout:"inline",onclick:e=>{e.preventDefault(),e.stopPropagation(),this.viewModel.mergeSelection(!t.selectionEnabled,t.trace)},scale:"s"},p("calcite-checkbox",{checked:t.selectionEnabled,onclick:e=>{e.preventDefault(),e.stopPropagation(),this.viewModel.mergeSelection(!t.selectionEnabled,t.trace)},scale:"m"}),this.viewModel.showSelectionAttributes?s:`${s} (${l.length})`)):null,n?p("calcite-block-section",{key:`aggregate-${t.trace.title}-${i}`,open:t.graphicEnabled,text:e.resultsStrings.highlightTrace,toggleDisplay:"switch",onCalciteBlockSectionToggle:e=>{e.target.open?this.viewModel.changeResultGraphicColor(t.graphicColor,t):this.viewModel.removeResultGraphicFromView(t)}},p("calcite-list",{selectionMode:"none"},p("calcite-list-item",{label:e.resultsStrings.graphicColor,onclick:e=>{const t=e.target;this._swatchNode=t,this._activeSwatch="aggGeom_"+i}},p("calcite-color-picker-swatch",{color:t.graphicColor.hex,scale:"s",slot:"actions-end"})))):null,this.enableResultArea&&(n||a)?p("calcite-block-section",{key:`area-${t.trace.title}-${i}`,open:t.resultArea?.show,text:e.resultsStrings.resultAreaHeader,toggleDisplay:"switch",onCalciteBlockSectionToggle:e=>{e.target.open?t.resultAreaGraphic?this.viewModel.addResultAreaToMap(t,t.resultAreaGraphic):this.viewModel.addResultAreaToMap(t):this.viewModel.removeResultAreaFromMap(t)}},p("calcite-list",{selectionMode:"none"},p("calcite-list-item",{label:e.resultsStrings.graphicColor,onclick:e=>{const t=e.target;this._swatchNode=t,this._activeSwatch="resultArea_"+i}},p("calcite-color-picker-swatch",{color:t.resultArea?.color.hex,scale:"s",slot:"actions-end"}))),p("calcite-list",{selectionMode:"none"},p("calcite-list-item",{label:e.resultsStrings.resultAreaBuffer},p("calcite-input-number",{afterCreate:this._afterComponentCreate,class:w.numberInput,max:999999,maxLength:999999,min:0,scale:"s",slot:"actions-end",suffixText:d,value:t.resultArea?.distance.toString(),onCalciteInputNumberChange:e=>{if(!this.view?.popup)return;this.view.popup.visible&&this.view.closePopup();const s=e.target;t.resultArea.distance>=0?(t.resultArea.distance=parseInt(s.value,10),this.viewModel.removeResultAreaFromMap(t),this.viewModel.addResultAreaToMap(t)):(t.resultArea.distance=0,this.viewModel.removeResultAreaFromMap(t),this.viewModel.addResultAreaToMap(t))}})))):null,p("calcite-popover",{autoClose:!0,closable:!0,label:e.resultsStrings.graphicColor,offsetDistance:0,offsetSkidding:0,open:this._activeSwatch==="aggGeom_"+i||this._activeSwatch==="resultArea_"+i,placement:"auto-start",referenceElement:this._swatchNode,scale:"s",onCalcitePopoverClose:()=>{this._swatchNode=null,this._activeSwatch=null}},this._renderHighlightColorPicker(this._activeSwatch==="resultArea_"+i?t.resultArea?.color:t.graphicColor,t,this._activeSwatch==="resultArea_"+i?"resultArea":"aggregate"))))):r.push(p("calcite-block",{collapsible:!1,heading:t.trace.title,key:"error-"+i,open:!0,overlayPositioning:"fixed"},this._renderRemoveTraceContainer(t),this._renderWarningMessage("noController",!1,t.status)))})),p("calcite-flow-item",{key:"traceResults",styles:R()},r,this._renderStartOverContainer(),this._alertRemoveModal?p("calcite-scrim",{key:"prompt"},p("div",{class:w.clearPrompt},p("h3",{slot:"header"},e.globalStrings.clearResults),p("div",{slot:"content"},e.alertsStrings.clearResultsAlert),p("div",{class:w.promptDivider}),p("div",{styles:C("row")},p("calcite-button",{appearance:"outline",onclick:()=>{this._alertRemoveModal=!1},slot:"secondary",width:"full"},t.cancel),p("calcite-button",{onclick:()=>{this._activeTrace&&this.viewModel.clearResult(this._activeTrace),this._alertRemoveModal=!1,0===this.viewModel.traceResults.length?this.switchTab("input"):(this._activeTrace=this.viewModel.traceResults[0].trace,this._showTraceResultFunctions=!1,this._showTraceResultAssetGroup=!1,this._showTraceResultAssetType=!1,this._showIndividualRecords=!1)},slot:"primary",width:"full"},t.form.ok)))):null)}_renderTraceResultFunctions(){const{messages:e}=this,t=this._traceResultsFunctions,s=[];return t.forEach((e=>{s.push(this._renderResultRowFunctions(e))})),p("calcite-flow-item",{heading:e.resultsStrings.functionHeader,key:"functionResultMultiple",onCalciteFlowItemBack:()=>{this.switchToFunctions([],!1)}},s,this._renderStartOverContainer())}_renderTraceResultByAssetGroup(){const e=this._traceResultsAssetGroup,t=[];for(const s in e){const i=e[s];for(const e in i)t.push(this._renderResultRowAssetGroup(i[e]))}return p("calcite-flow-item",{heading:this._traceHeaderForFlow,key:"assetGroupResultMultiple",onCalciteFlowItemBack:()=>{this.switchToAssetGroup([],"",!1)}},p("calcite-list",null,t),this._renderStartOverContainer())}_renderTraceResultByAssetType(){const e=this._traceResultsAssetType,t=[];for(const s in e)e[s].length>0&&t.push(this._renderResultRowAssetType(e[s]));return p("calcite-flow-item",{heading:this._assetGroupHeader,key:"assetTypeResult",onCalciteFlowItemBack:()=>{this.switchToAssetType([],"",!1)}},p("calcite-list",{selectionMode:"none"},t),this._renderStartOverContainer())}_renderTraceResultIndividual(){const{messages:e}=this,t=this._traceResultsIndividual;t.sort(this._compare(this._resultSortField,this._resultSortOrder));const s=[];if(t.length>0){(t[0].details?.fields.some((({name:e})=>e.toLowerCase()===this._resultDisplayField.toLocaleLowerCase()))??!1)||(this._resultDisplayField=this._resultObjectIdField,this._resultSortField=this._resultObjectIdField),t.forEach((e=>{e?.details&&s.push(this._renderResultRowIndividual(e))})),0===s.length&&s.push(p("calcite-list-item",{label:e.resultsStrings.noFeaturesInMap}))}return p("calcite-flow-item",{heading:this._assetTypeHeader,key:"individualResult",onCalciteFlowItemBack:()=>{this._showResultOptions=!1,this.switchToIndividualRecords([],"",!1)}},p("calcite-action",{afterCreate:d,bind:this,"data-node-ref":"_individualResultNode",icon:"gear",id:"field_options"+this.id,label:e.resultsStrings.displayAttribute,onclick:()=>{this._showResultOptions=!0},scale:"m",slot:"header-actions-end",text:e.resultsStrings.displayAttribute}),p("calcite-list",{selectionMode:"none"},s),this._renderStartOverContainer())}_renderTraceResultIndividualPopover(){const{messages:e}=this,t=this._traceResultsIndividual,s=[],i=[];return t.length>0&&(t[0].details?t[0].details.fields.forEach((({name:e,alias:t})=>{s.push(p("calcite-option",{key:`display-${e}`,label:t??e,selected:e===this._resultDisplayField,value:e})),i.push(p("calcite-option",{key:`sort-${e}`,label:t??e,selected:e===this._resultSortField,value:e}))})):(s.push(p("calcite-option",{key:`display-${this._resultDisplayField}`,label:this._resultDisplayField,value:this._resultDisplayField})),i.push(p("calcite-option",{key:`sort-${this._resultDisplayField}`,label:this._resultDisplayField,value:this._resultDisplayField})))),p("calcite-popover",{autoClose:!0,label:e.resultsStrings.displayAttribute,offsetDistance:0,offsetSkidding:0,open:this._showResultOptions,overlayPositioning:"fixed",placement:"left-start",referenceElement:this._individualResultNode,styles:null!==this.domNode?y(.75*this.domNode.clientWidth):f()},p("calcite-block",{heading:"",open:!0,overlayPositioning:"fixed"},p("calcite-label",{scale:"s"},e.resultsStrings.displayAttribute,p("calcite-select",{label:e.resultsStrings.displayAttribute,scale:"s",onCalciteSelectChange:e=>{const t=e.target;this._resultDisplayField=t.selectedOption.value,this._showResultOptions=!1}},s)),p("calcite-label",{scale:"s"},e.resultsStrings.sortBy,p("calcite-select",{label:e.resultsStrings.sortBy,scale:"s",onCalciteSelectChange:e=>{const s=e.target;this._resultSortField=s.selectedOption.value,t.sort(this._compare(this._resultSortField,this._resultSortOrder)),this._traceResultsIndividual=t,this._showResultOptions=!1}},i))))}_renderResultRowFunctions(e){return p("calcite-block",{collapsible:!1,heading:e.networkAttributeName+" "+e.functionType+" = "+e.result,overlayPositioning:"fixed"})}_renderResultRowAssetGroup(e){const t=this._getAssetGroupName(e[0]);return p("calcite-list-item",{label:t+" ("+e.length+")",onCalciteListItemSelect:()=>{this.switchToAssetType(this._groupResultsByAssetType(e),t+" ("+e.length+")",!0)}},p("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderResultRowAssetType(e){const t=this._getAssetTypeName(e[0]);return p("calcite-list-item",{label:t+" ("+e.length+")",onCalciteListItemSelect:()=>{this.viewModel.queryFeaturesById(e).then((s=>{if(s?.length){this._resultObjectIdField=s[0].layer.objectIdField,"objectid"===this._resultDisplayField&&(this._resultDisplayField=s[0].layer.objectIdField),"objectid"===this._resultSortField&&(this._resultSortField=s[0].layer.objectIdField);const i=this._appendAttributes(e,s,"objectId");this.switchToIndividualRecords(i,t+" ("+e.length+")",!0)}else this.switchToIndividualRecords(e,t+" ("+e.length+")",!0)}))}},p("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderResultRowIndividual(e){const{messages:t}=this,s=`display-${e.objectId}-nso`,{nonSpatialObject:i,zoomToFeature:r}=t.globalStrings;let l="",o=null;if(o=e?.details?.fields.find((({name:e})=>e===this._resultDisplayField)),"date"===o?.type){l=new Date(e.details.attributes[this._resultDisplayField]).toDateString()}else if("assetgroup"===this._resultDisplayField.toLowerCase())l=this._getAssetGroupName(e);else if("assettype"===this._resultDisplayField.toLowerCase())l=this._getAssetTypeName(e);else if(o?.domain&&A(o.domain)){const t=o.domain.codedValues.find((({code:t})=>t===e.details.attributes[this._resultDisplayField]));l=t?.name}else l=e.details?.attributes[this._resultDisplayField]??e.objectId;return l&&""!==l&&null!==l?"string"==typeof l&&(l.trim()||(l=t.resultsStrings.noValue)):l=t.resultsStrings.noValue,null!==e?.details?.geometry?p("calcite-list-item",{label:l,onCalciteListItemSelect:()=>{this.viewModel.zoomToAsset(e.details.geometry)}},p("calcite-icon",{icon:"zoom-to-object",scale:"s",slot:"content-end",textLabel:r})):p("calcite-list-item",{label:l},p("calcite-icon",{icon:"table",id:s,scale:"s",slot:"content-end",textLabel:i}),p("calcite-tooltip",{label:i,referenceElement:s},p("span",null,i)))}_afterComponentCreate(e){"value"in e&&null!=e.value&&"setNumberValue"in e&&e.setNumberValue({committing:!1,value:e.value,origin:"direct"})}_mixCustomStrings(){const{messages:e}=this;this.inputSettings.length>0&&this.inputSettings.forEach((t=>{"starting-point"===t.type&&(e.inputsStrings.headerStartingPoint=t.label,e.inputsStrings.startingPointHint=t.description),"barrier"===t.type&&(e.inputsStrings.headerBarrier=t.label,e.inputsStrings.barrierPointHint=t.description)}))}_overrideFlagSymbol(){this.inputSettings.length>0&&this.inputSettings.forEach((e=>{"starting-point"===e.type?this._symbolStartFlag=e.symbol:this._symbolBarrier=e.symbol,this.viewModel.changeFlagSymbol(e.type,e.symbol)}))}_utilityNetworkTraceInitialized(){return this.viewModel.loadUtilityNetwork().then((e=>{if(e)return this.viewModel.selectTracesOnLoad(),this._registerWatchers(),this.viewModel._traces.length<=0&&(this._tracesExists=!1),this.viewModel.flags.length>0&&this._processFlagOnLoad(),this.view?.when().then((()=>{this._watchViewState()}));this._tracesExists=!1,this.disabled=!1})).catch((e=>{const{messages:t}=this;this._loadUNError=!1,"utility-network:no-user-type-extension"===e.name||e.details.raw.extendedCode===F.noExtension?this._errorMessage=t.alertsStrings.noUserExtension:this._errorMessage=e.message,this.disabled=!1}))}_processFlagOnLoad(){return this.view?.when().then((()=>{this._watchHandler=s((()=>!this.view?.updating),(async()=>{this._warningNoFlag=!1,this._warningNoBarrierAssetFound=!1,this._warningNoStartAssetFound=!1;const e=await this.viewModel.addFlagsOnLoad();this.viewModel.removeFlagsOnLoadWatcher(),e.includes("barrier")&&(this._warningNoBarrierAssetFound=!0),e.includes("starting-point")&&(this._warningNoStartAssetFound=!0),this.disabled=!1,null!==this._watchHandler&&this._watchHandler.remove()}))}))}_registerWatchers(){this.addHandles([t((()=>this.selectedTraces),(()=>{this.viewModel.selectTracesOnLoad(),this.scheduleRender()})),t((()=>this.defaultGraphicColor),(()=>{this.viewModel.traceResults.length>0&&this.viewModel.traceResults.forEach((e=>{this.viewModel.changeResultGraphicColor(this.viewModel.defaultGraphicColor,e)})),this.scheduleRender()}))])}_groupResultsByAssetGroup(e){const t=[],s=e.results?.elements,i=this._groupBy(s??[],"networkSourceId");for(const r in i)t.push(this._groupBy(i[r],"assetGroupCode"));return t}_groupResultsByAssetType(e){return this._groupBy(e,"assetTypeCode")}_appendAttributes(e,t,s){const i=[];return e.forEach((e=>{t.forEach((t=>{t.featureSet.features.forEach((r=>{e[s]===r.attributes[this._resultObjectIdField]&&(e.details=r,e.details.fields=t.featureSet.fields,i.push(e))}))}))})),i}_getAssetGroupName(e){let t=e.assetGroupCode.toString();const s=e.assetGroupCode,i=this.viewModel.getValidSources().find((t=>t.sourceId===e.networkSourceId));if(i){const e=i.assetGroups.find((e=>e.assetGroupCode===s));e&&(t=e.assetGroupName)}return t}_getAssetTypeName(e){let t=e.assetTypeCode.toString();const s=e.assetGroupCode,i=this.viewModel.getValidSources().find((t=>t.sourceId===e.networkSourceId));if(i){const r=i.assetGroups.find((e=>e.assetGroupCode===s));if(r){const s=r.assetTypes.find((t=>t.assetTypeCode===e.assetTypeCode));s&&(t=s.assetTypeName)}}return t}_compare(e,t){return(s,i)=>{let r=0,l=s.details?.attributes[e]??s.objectId,o=i.details?.attributes[e]??i.objectId;return isNaN(l)&&(l=l.toLowerCase()),isNaN(o)&&(o=o.toLowerCase()),"desc"===t?l>o?r=1:l<o&&(r=-1):l<o?r=1:l>o&&(r=-1),r}}_groupBy(e,t){return e.reduce(((e,s)=>((e[s[t]]=e[s[t]]||[]).push(s),e)),{})}_getSymbolIcon(e){return"picture-marker"===e.type?p("img",{height:e.height,src:e.url??void 0,width:e.width}):null}_watchViewState(){this._watchHandler=s((()=>!this.view?.updating),(()=>{this.disabled=!1,null!==this._watchHandler&&this._watchHandler.remove()}),{initial:!0})}_changeCursor(e="default"){const t=this.view?.container?.style;t&&(t.cursor=e)}};e([i()],k.prototype,"_tracesExists",void 0),e([i()],k.prototype,"_selectToolActive",void 0),e([i()],k.prototype,"_activeTrace",void 0),e([i()],k.prototype,"_activeSwatch",void 0),e([i()],k.prototype,"_traceHeaderForFlow",void 0),e([i()],k.prototype,"_assetGroupHeader",void 0),e([i()],k.prototype,"_assetTypeHeader",void 0),e([i()],k.prototype,"_traceResultsFunctions",void 0),e([i()],k.prototype,"_traceResultsAssetGroup",void 0),e([i()],k.prototype,"_traceResultsAssetType",void 0),e([i()],k.prototype,"_traceResultsIndividual",void 0),e([i()],k.prototype,"_showTraceResultFunctions",void 0),e([i()],k.prototype,"_showTraceResultAssetGroup",void 0),e([i()],k.prototype,"_showTraceResultAssetType",void 0),e([i()],k.prototype,"_showIndividualRecords",void 0),e([i()],k.prototype,"_activeTab",void 0),e([i()],k.prototype,"_alertRemoveModal",void 0),e([i()],k.prototype,"_warningNoFlag",void 0),e([i()],k.prototype,"_warningNoTraceSelected",void 0),e([i()],k.prototype,"_confirmReset",void 0),e([i()],k.prototype,"_swatchNode",void 0),e([i()],k.prototype,"_errorMessage",void 0),e([i()],k.prototype,"defaultGraphicColor",null),e([i()],k.prototype,"disabled",void 0),e([i()],k.prototype,"flags",null),e([i()],k.prototype,"gdbVersion",null),e([i()],k.prototype,"iconClass",void 0),e([i()],k.prototype,"inputSettings",void 0),e([i()],k.prototype,"label",null),e([i(),h("esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace")],k.prototype,"messages",void 0),e([i(),h("esri/t9n/common")],k.prototype,"messagesCommon",void 0),e([i(),h("esri/core/t9n/Units")],k.prototype,"messagesUnits",void 0),e([i()],k.prototype,"resultAreaProperties",null),e([i()],k.prototype,"selectedTraces",null),e([i()],k.prototype,"selectOnComplete",null),e([i()],k.prototype,"showGraphicsOnComplete",null),e([i()],k.prototype,"enableResultArea",null),e([i()],k.prototype,"showSelectionAttributes",null),e([i()],k.prototype,"utilityNetwork",null),e([i()],k.prototype,"view",null),e([u(["add-flag","add-flag-complete","add-flag-error","select-features","clear-selection","add-result-area","remove-result-area","create-result-area"]),i({type:g})],k.prototype,"viewModel",void 0),k=e([r(v)],k);const M=k;export{M as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import{watch as t,when as s}from"../core/reactiveUtils.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import l from"../layers/support/CodedValueDomain.js";import o from"./Widget.js";import{loadCalciteComponents as a}from"./support/componentsUtils.js";import{globalCss as n}from"./support/globalCss.js";import{legacyIcon as c}from"./support/legacyIcon.js";import{storeNode as d}from"./support/widgetUtils.js";import{messageBundle as h}from"./support/decorators/messageBundle.js";import{vmEvent as u}from"./support/decorators/vmEvent.js";import{tsx as p}from"./support/jsxFactory.js";import g from"./UtilityNetworkTrace/UtilityNetworkTraceViewModel.js";import{defaultSwatchColors as m}from"./UtilityNetworkTrace/support/GraphicHandler.js";const _="esri-utility-trace-network",w={base:_,widgetIcon:c.polyline,loaderContainer:`${_}__loader-container`,loader:`${_}__loader`,fadeIn:`${_}--fade-in`,addButtonContainer:`${_}__add-button-container`,noticeContainer:`${_}__notice-container`,listContainer:`${_}__list-container`,resultsContainer:`${_}__results-container`,flow:`${_}__flow`,numberInput:`${_}__number-input`,clearPrompt:`${_}__reset-prompt`,promptDivider:`${_}__divider`,paddingTop:`${_}__padTop`},v="esri.widgets.UtilityNetworkTrace";function b(e){return{height:e+"px"}}function y(e){return{width:e+"px"}}function f(){return{width:"75%"}}function T(){return{textAlign:"center",padding:"1rem"}}function S(e){return{width:"100%",height:window.getComputedStyle(e).getPropertyValue("max-height")}}function R(){return{height:"100%"}}function C(e){return{display:"flex",flexDirection:e}}function A(e){return e instanceof l}const F={noExtension:-2147208474};let k=class extends o{constructor(e,t){super(e,t),this._selectToolActive=!1,this._activeTrace=null,this._activeSwatch="",this._traceHeaderForFlow="",this._assetGroupHeader="",this._assetTypeHeader="",this._traceResultsFunctions=[],this._traceResultsAssetGroup=[],this._traceResultsAssetType=[],this._traceResultsIndividual=[],this._showTraceResultFunctions=!1,this._showTraceResultAssetGroup=!1,this._showTraceResultAssetType=!1,this._showIndividualRecords=!1,this._activeTab="input",this._flagViewType="starting-point",this._alertRemoveModal=!1,this._warningNoFlag=!1,this._warningNoTraceSelected=!1,this._warningNoStartAssetFound=!1,this._warningNoBarrierAssetFound=!1,this._warningNoTerminal=!1,this._confirmReset=!1,this._showResultOptions=!1,this._resultObjectIdField="objectid",this._resultDisplayField="objectid",this._resultSortField="objectid",this._resultSortOrder="desc",this._swatchNode=null,this._individualResultNode=null,this._symbolStartFlag=null,this._symbolBarrier=null,this._watchHandler=null,this._loadUNError=!0,this._errorMessage="",this.disabled=!0,this.iconClass=w.widgetIcon,this.inputSettings=[],this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.viewModel=new g,this._afterComponentCreate=this._afterComponentCreate.bind(this)}initialize(){this._utilityNetworkTraceInitialized(),this.addHandles(t((()=>this.viewModel?.resultAreaProperties),(()=>this.scheduleRender())))}get defaultGraphicColor(){return this.viewModel.defaultGraphicColor}set defaultGraphicColor(e){this.viewModel.defaultGraphicColor=e}get flags(){return this.viewModel.flags}set flags(e){this.viewModel.flags=e}get gdbVersion(){return this.viewModel.gdbVersion}set gdbVersion(e){this.viewModel.gdbVersion=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get resultAreaProperties(){return this.viewModel.resultAreaProperties}set resultAreaProperties(e){this.viewModel.resultAreaProperties=e}get selectedTraces(){return this.viewModel.selectedTraces}set selectedTraces(e){this.viewModel.selectedTraces=e}get selectOnComplete(){return this.viewModel.selectOnComplete}set selectOnComplete(e){this.viewModel.selectOnComplete=e}get showGraphicsOnComplete(){return this.viewModel.showGraphicsOnComplete}set showGraphicsOnComplete(e){this.viewModel.showGraphicsOnComplete=e}get enableResultArea(){return this.viewModel.enableResultArea}set enableResultArea(e){this.viewModel.enableResultArea=e}get showSelectionAttributes(){return this.viewModel.showSelectionAttributes}set showSelectionAttributes(e){this.viewModel.showSelectionAttributes=e}get utilityNetwork(){return this.viewModel.utilityNetwork}set utilityNetwork(e){this.viewModel.utilityNetwork=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}async checkCanTrace(){this._confirmReset=!1;const e=this.viewModel.checkCanTrace();e.status?(this._warningNoFlag=!1,this._warningNoTraceSelected=!1,this._warningNoTraceSelected=!1,this._warningNoTerminal=!1,this._showTraceResultFunctions=!1,this._showTraceResultAssetGroup=!1,this._showTraceResultAssetType=!1,this._showIndividualRecords=!1,this.switchTab("result"),this.viewModel._activeProgress=!0,this.viewModel.removeAllResultAreaGraphics(),await this.viewModel.callTrace(),this.viewModel._activeProgress=!1):e.issues.forEach((e=>{switch(e){case"noStart":this._warningNoFlag=!0;break;case"noTerminalSelected":this._warningNoTerminal=!0;break;default:this._warningNoTraceSelected=!0}}))}confirmReset(){this._confirmReset=!0}render(){const{state:e}=this.viewModel;this._mixCustomStrings(),this._overrideFlagSymbol();const t="loading"===e?this._renderWarningMessage("noTraceConfig",!1):this._renderUtilityNetworkTrace();return p("div",{class:this.classes(w.base,n.widget,n.panel,{[n.widgetDisabled]:this.disabled}),styles:R()},t)}loadDependencies(){return a({action:()=>import("@esri/calcite-components/dist/components/calcite-action.js"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group.js"),"action-pad":()=>import("@esri/calcite-components/dist/components/calcite-action-pad.js"),block:()=>import("@esri/calcite-components/dist/components/calcite-block.js"),"block-section":()=>import("@esri/calcite-components/dist/components/calcite-block-section.js"),button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),checkbox:()=>import("@esri/calcite-components/dist/components/calcite-checkbox.js"),"color-picker-swatch":()=>import("@esri/calcite-components/dist/components/calcite-color-picker-swatch.js"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox.js"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item.js"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow.js"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number.js"),label:()=>import("@esri/calcite-components/dist/components/calcite-label.js"),list:()=>import("@esri/calcite-components/dist/components/calcite-list.js"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item.js"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader.js"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice.js"),option:()=>import("@esri/calcite-components/dist/components/calcite-option.js"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel.js"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover.js"),scrim:()=>import("@esri/calcite-components/dist/components/calcite-scrim.js"),select:()=>import("@esri/calcite-components/dist/components/calcite-select.js"),tab:()=>import("@esri/calcite-components/dist/components/calcite-tab.js"),"tab-nav":()=>import("@esri/calcite-components/dist/components/calcite-tab-nav.js"),"tab-title":()=>import("@esri/calcite-components/dist/components/calcite-tab-title.js"),tabs:()=>import("@esri/calcite-components/dist/components/calcite-tabs.js"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip.js")})}switchTab(e){this._activeTab=e}switchToFunctions(e,t){this._traceResultsFunctions=e,this._showTraceResultFunctions=t}switchToAssetGroup(e,t,s){this._traceHeaderForFlow=t,this._traceResultsAssetGroup=e,this._showTraceResultAssetGroup=s}switchToAssetType(e,t,s){this._assetGroupHeader=t,this._traceResultsAssetType=e,this._showTraceResultAssetType=s}switchToIndividualRecords(e,t,s){this._assetTypeHeader=t,this._traceResultsIndividual=e,this._showIndividualRecords=s}_renderUtilityNetworkTrace(){const{messages:e,messagesCommon:t}=this;let s=p("calcite-tabs",{layout:"center",position:"top",styles:S(this.container)},p("calcite-tab-nav",{slot:"title-group"},p("calcite-tab-title",{onclick:()=>{this.switchTab("input")},selected:"input"===this._activeTab},e.inputsStrings.headerTabInputs),p("calcite-tab-title",{onclick:()=>{this.switchTab("result")},selected:"result"===this._activeTab},e.resultsStrings.headerTabResults)),p("calcite-tab",{selected:"input"===this._activeTab},this._renderInputPanel()),p("calcite-tab",{selected:"result"===this._activeTab},this.viewModel._activeProgress?p("calcite-loader",{label:e.alertsStrings.traceExecuting,text:e.alertsStrings.traceExecuting,type:"indeterminate"}):this.viewModel.traceResults.length>0?this._renderResultPanel():this._renderWarningMessage("noTraceExecuted",!1),this._confirmReset?p("calcite-scrim",{key:"prompt"},p("div",{class:w.clearPrompt},p("h3",{slot:"header"},e.resultsStrings.startOverButton),p("div",{slot:"content"},e.resultsStrings.startOverValidation),p("div",{class:w.promptDivider}),p("div",{styles:C("row")},p("calcite-button",{appearance:"outline",onclick:()=>{this._confirmReset=!1},slot:"secondary",width:"full"},t.cancel),p("calcite-button",{onclick:()=>{this._confirmReset=!1,this.viewModel.reset(),this.switchTab("input")},slot:"primary",width:"full"},t.form.ok)))):null));return 0===this.viewModel.traces.length&&(s=p("calcite-panel",null,this._renderWarningMessage("noTraceConfig",!1))),this._loadUNError||(s=p("calcite-panel",null,this._renderWarningMessage("loadUNError",!1,this._errorMessage))),s}_renderInputPanel(){const{messages:e}=this;return p("calcite-flow",{class:w.flow},p("calcite-flow-item",null,this._warningNoFlag?this._renderWarningMessage("flag",!0):null,this._warningNoTerminal?this._renderWarningMessage("noTerminal",!0):null,this._warningNoTraceSelected?this._renderWarningMessage("trace",!0):null,this._renderTraceSelectorContainer(),this._renderStartFlagsContainer(),this._renderBarriersFlagsContainer(),this._warningNoFlag&&this._warningNoTraceSelected?p("div",{styles:b(10)}):null,p("calcite-button",{kind:"brand",onclick:()=>{this.checkCanTrace()},scale:"m",slot:"footer",width:"full"},e.tracingStrings.runTrace)),this._selectToolActive?this._renderActiveTool():null)}_renderResultPanel(){return p("calcite-flow",{styles:R()},this._renderTraceResults(),this._showTraceResultFunctions?this._renderTraceResultFunctions():null,this._showTraceResultAssetGroup?this._renderTraceResultByAssetGroup():null,this._showTraceResultAssetType?this._renderTraceResultByAssetType():null,this._showIndividualRecords?this._renderTraceResultIndividual():null,this._showIndividualRecords?this._renderTraceResultIndividualPopover():null)}_renderStartFlagsContainer(){const{messages:e}=this,t=[];let s=[];s=this.viewModel._flags.filter((e=>"starting-point"===e.type)),s.forEach((e=>{e.displayValue&&t.push(this._renderFlagRow(e,"start"))}));let i=null;return this._symbolStartFlag&&(i=this._getSymbolIcon(this._symbolStartFlag)),p("calcite-block",{collapsible:!0,heading:e.inputsStrings.headerStartingPoint+" ("+s.length+")",open:!0,overlayPositioning:"fixed"},p("div",{slot:"icon"},i||p("calcite-icon",{icon:"pin",scale:"s"})),p("div",null,e.inputsStrings.startingPointHint),p("div",{class:w.listContainer},t),this._warningNoStartAssetFound?this._renderWarningMessage("noStartAsset",!0):null,p("div",{class:w.addButtonContainer},p("calcite-button",{alignment:"center",appearance:"outline",href:"",iconStart:"plus",label:e.inputsStrings.addPointOption,onclick:()=>{this._changeCursor("crosshair"),this._flagViewType="starting-point",this._selectToolActive=!0,this._warningNoStartAssetFound=!1,this.viewModel.addFlagByHit("starting-point",this._symbolStartFlag).then((e=>{this._changeCursor("default"),e?this._warningNoFlag=!1:this._warningNoStartAssetFound=!0,this._selectToolActive=!1}))},round:!0,scale:"m"})))}_renderBarriersFlagsContainer(){const{messages:e}=this,t=[];let s=[];s=this.viewModel._flags.filter((e=>"barrier"===e.type)),s.forEach((e=>{e.displayValue&&t.push(this._renderFlagRow(e,"barrier"))}));let i=null;return this._symbolBarrier&&(i=this._getSymbolIcon(this._symbolBarrier)),p("calcite-block",{collapsible:!0,heading:e.inputsStrings.headerBarrier+" ("+s.length+")",open:!1,overlayPositioning:"fixed"},p("div",{slot:"icon"},i||p("calcite-icon",{icon:"x-circle-f",scale:"s"})),p("div",null,e.inputsStrings.barrierPointHint),p("div",{class:w.listContainer},t),this._warningNoBarrierAssetFound?this._renderWarningMessage("noBarrierAsset",!0):null,p("div",{class:w.addButtonContainer},p("calcite-button",{alignment:"center",appearance:"outline",href:"",iconStart:"plus",kind:"brand",label:e.inputsStrings.addPointOption,onclick:()=>{this._changeCursor("crosshair"),this._flagViewType="barrier",this._selectToolActive=!0,this._warningNoBarrierAssetFound=!1,this.viewModel.addFlagByHit("barrier",this._symbolBarrier).then((e=>{this._changeCursor("default"),e||(this._warningNoBarrierAssetFound=!0),this._selectToolActive=!1}))},round:!0,scale:"m"})))}_renderFlagRow(e,t){const{messages:s,messagesCommon:i}=this,r=[];let l=!1;return null!=e.allTerminals&&e.allTerminals.terminals.length>0&&(l=!0,e.allTerminals.terminals.forEach((t=>{let s=!1;e?.selectedTerminals?.includes(t.id)&&(s=!0),r.push(p("calcite-combobox-item",{key:t.name,selected:s,textLabel:t.name,value:t.id}))}))),p("calcite-block",{collapsible:null!==e.allTerminals||"barrier"===e.type,heading:e.displayValue?.value??"",key:"pop"+e.globalId+e.type+e.id+t,overlayPositioning:"fixed"},p("calcite-action",{icon:"trash",label:i.remove,onclick:()=>{this.viewModel.removeFlag(e)},scale:"s",slot:"header-menu-actions",text:i.remove,textEnabled:!0}),p("calcite-action",{icon:"zoom-to-object",label:s.globalStrings.zoomToFeature,onclick:()=>{this.viewModel.zoomToAsset(e.details.geometry)},scale:"s",slot:"header-menu-actions",text:s.globalStrings.zoomToFeature,textEnabled:!0}),"barrier"===e.type?p("calcite-label",{layout:"inline",scale:"s"},p("calcite-checkbox",{checked:e.isFilterBarrier,onclick:()=>{this.viewModel.manageFilterBarrier(!e.isFilterBarrier,e)},scale:"s"}),s.inputsStrings.barrierFilter):null,l?p("calcite-combobox",{label:s.globalStrings.selectTerminalPlaceholder,maxItems:0,placeholder:s.globalStrings.selectTerminalPlaceholder,scale:"s",selectionMode:"multiple",onCalciteComboboxChange:t=>{t.target.selectedItems.length>0?(e.selectedTerminals=[],t.target.selectedItems.forEach((t=>{this.viewModel.addTerminal(t.value,e)}))):e.selectedTerminals=[]},onCalciteComboboxChipClose:t=>{t.preventDefault(),this.viewModel.removeTerminal(t.target.value,e)}},r):null)}_renderActiveTool(){const{messages:e}=this;let t=null;return"starting-point"===this._flagViewType?this._symbolStartFlag&&(t=this._getSymbolIcon(this._symbolStartFlag)):this._symbolBarrier&&(t=this._getSymbolIcon(this._symbolBarrier)),p("calcite-flow-item",{heading:e.inputsStrings.addPointOption,onCalciteFlowItemBack:()=>{this.viewModel._clickHandler&&(this.viewModel._clickHandler.remove(),this.view?.popup&&(this.view.popupEnabled=!0)),this._selectToolActive=!1}},p("calcite-block",{collapsible:!1,heading:"",open:!0,overlayPositioning:"fixed"},p("div",{styles:T()},t||p("calcite-icon",{icon:"starting-point"===this._flagViewType?"pin-plus":"x-circle-f",scale:"m"})),p("div",{styles:T()},e.inputsStrings.addPointHint)))}_renderTraceSelectorContainer(){const{messages:e}=this,t=[];let s=e.tracingStrings.traceOperation,i=0;return this.viewModel.traces.length>0&&this.viewModel.traces.forEach((e=>{t.push(p("calcite-combobox-item",{key:e.globalId,selected:e.selected,textLabel:e.title,value:e.globalId,onCalciteComboboxItemChange:e=>{const t=e.target;this.viewModel.selectTraces(t.selected,t.value),this.viewModel.traces.length>0&&(this._warningNoTraceSelected=!1)}})),e.selected&&i++})),s+=` (${i})`,p("calcite-block",{collapsible:!0,heading:s,open:!0,overlayPositioning:"fixed"},p("calcite-icon",{icon:"utility-network-trace",scale:"s",slot:"icon"}),p("calcite-combobox",{label:e.inputsStrings.selectTraces,maxItems:0,overlayPositioning:"fixed",placeholder:e.inputsStrings.selectTraces,scale:"s",selectionMode:"multiple"},t))}_renderStartOverContainer(){const{messages:e}=this;return p("calcite-button",{kind:"brand",onclick:()=>{this.confirmReset()},scale:"m",slot:"footer",width:"full"},e.resultsStrings.startOverButton)}_renderWarningMessage(e,t,s){const{messages:i}=this;let r=i.alertsStrings.NoRunAlertHeader,l=i.alertsStrings.noResultsInfo;switch(e){case"flag":r=i.alertsStrings.startingPointAlertHeader,l=i.alertsStrings.startingPointAlert;break;case"noTerminal":r=i.alertsStrings.noTerminalDefinedHeader,l=i.alertsStrings.noTerminalDefined;break;case"trace":r=i.alertsStrings.selectTraceAlertHeader,l=i.alertsStrings.selectTraceAlert;break;case"noTraceExecuted":r=i.alertsStrings.NoRunAlertHeader,l=i.alertsStrings.noResultsInfo;break;case"noBarrierAsset":case"noStartAsset":r=i.alertsStrings.noAssetsFoundHeader,l=i.alertsStrings.noAssetFound;break;case"noTraceConfig":r="",l=i.alertsStrings.noTraceSupported;break;default:r=i.alertsStrings.genericErrorHeader,l=s||""}return p("div",{class:w.noticeContainer,key:e},p("calcite-notice",{closable:t,icon:!0,key:e,kind:"danger",open:!0,scale:"s",width:"auto",onCalciteNoticeClose:()=>{switch(e){case"flag":this._warningNoFlag=!1;break;case"noTerminal":this._warningNoTerminal=!1;break;case"trace":this._warningNoTraceSelected=!1;break;case"noStartAsset":this._warningNoStartAssetFound=!1;break;case"noBarrierAsset":this._warningNoBarrierAssetFound=!1}}},p("div",{slot:"title"},r),p("div",{slot:"message"},l)))}_renderRemoveTraceContainer(e){const{messages:t}=this;return p("calcite-action",{icon:"trash",label:t.globalStrings.clearResults,onclick:()=>{this._alertRemoveModal=!0,this._activeTrace=e.trace},scale:"s",slot:"header-menu-actions",text:t.globalStrings.clearResults,textEnabled:!0})}_renderHighlightColorPicker(e,t,s){const{messages:i}=this,{graphicHandler:r}=this.viewModel,l=[],o=new RegExp(`^${e.hex}$`,"i"),a=r.highlightColor.length>m.length?5:4;for(const n of r.highlightColor)l.push(p("calcite-action",{active:o.test(n.hex),key:n.hex,label:i.resultsStrings.graphicColor,onclick:()=>{"aggregate"===s?this.viewModel.changeResultGraphicColor(n,t):this.viewModel.changeResultAreaColor(t,n)},scale:"s",text:i.resultsStrings.graphicColor},p("calcite-color-picker-swatch",{active:o.test(n.hex),color:n.hex,scale:"s"})));return p("calcite-action-pad",{expandDisabled:!0,layout:"grid",position:"start"},p("calcite-action-group",{columns:a,layout:"grid"},l))}_renderTraceResults(){const{messages:e,messagesCommon:t}=this,{selectFeatures:s}=e.resultsStrings,i=this.viewModel.traceResults,r=[];return i.forEach(((t,i)=>{let l=[],o=[],a=!1,n=!1,c=!1,d="";null!==t.results&&t.results.hasOwnProperty("elements")?(null!==t.results.aggregatedGeometry&&(n=!0),null!==t.results.globalFunctionResults&&t.results.globalFunctionResults.length>0&&(o=t.results.globalFunctionResults,o.length>0&&(c=!0)),t.results.elements&&t.results.elements.length>0&&(l=t.results.elements,l.length>0&&(a=!0)),(n||a)&&(d=this.messagesUnits.units[t.resultArea?.unit]?.abbr),r.push(p("calcite-block",{collapsible:!0,description:t.trace.description??"",heading:t.trace.title,key:`${t.trace.title}${i}`,open:!0,overlayPositioning:"fixed"},this._renderRemoveTraceContainer(t),p("calcite-list",null,c?p("calcite-list-item",{label:e.resultsStrings.functionHeader+" ("+o.length+")",onCalciteListItemSelect:()=>{this.switchToFunctions(o,!0)}},p("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"})):null,a&&this.viewModel.showSelectionAttributes?p("calcite-list-item",{key:this.id,label:e.resultsStrings.viewFeatures+" ("+l.length+")",onCalciteListItemSelect:()=>{this.switchToAssetGroup(this._groupResultsByAssetGroup(t),t.trace.title+" ("+l.length+")",!0)}},p("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"})):this.viewModel.showSelectionAttributes?p("calcite-label",{layout:"inline",scale:"s"},e.resultsStrings.noSelectionResults):null),a?p("div",{class:w.paddingTop},p("calcite-label",{layout:"inline",onclick:e=>{e.preventDefault(),e.stopPropagation(),this.viewModel.mergeSelection(!t.selectionEnabled,t.trace)},scale:"s"},p("calcite-checkbox",{checked:t.selectionEnabled,onclick:e=>{e.preventDefault(),e.stopPropagation(),this.viewModel.mergeSelection(!t.selectionEnabled,t.trace)},scale:"m"}),this.viewModel.showSelectionAttributes?s:`${s} (${l.length})`)):null,n?p("calcite-block-section",{key:`aggregate-${t.trace.title}-${i}`,open:t.graphicEnabled,text:e.resultsStrings.highlightTrace,toggleDisplay:"switch",onCalciteBlockSectionToggle:e=>{e.target.open?this.viewModel.changeResultGraphicColor(t.graphicColor,t):this.viewModel.removeResultGraphicFromView(t)}},p("calcite-list",{selectionMode:"none"},p("calcite-list-item",{label:e.resultsStrings.graphicColor,onclick:e=>{const t=e.target;this._swatchNode=t,this._activeSwatch="aggGeom_"+i}},p("calcite-color-picker-swatch",{color:t.graphicColor.hex,scale:"s",slot:"actions-end"})))):null,this.enableResultArea&&(n||a)?p("calcite-block-section",{key:`area-${t.trace.title}-${i}`,open:t.resultArea?.show,text:e.resultsStrings.resultAreaHeader,toggleDisplay:"switch",onCalciteBlockSectionToggle:e=>{e.target.open?t.resultAreaGraphic?this.viewModel.addResultAreaToMap(t,t.resultAreaGraphic):this.viewModel.addResultAreaToMap(t):this.viewModel.removeResultAreaFromMap(t)}},p("calcite-list",{selectionMode:"none"},p("calcite-list-item",{label:e.resultsStrings.graphicColor,onclick:e=>{const t=e.target;this._swatchNode=t,this._activeSwatch="resultArea_"+i}},p("calcite-color-picker-swatch",{color:t.resultArea?.color.hex,scale:"s",slot:"actions-end"}))),p("calcite-list",{selectionMode:"none"},p("calcite-list-item",{label:e.resultsStrings.resultAreaBuffer},p("calcite-input-number",{afterCreate:this._afterComponentCreate,class:w.numberInput,max:999999,maxLength:999999,min:0,scale:"s",slot:"actions-end",suffixText:d,value:t.resultArea?.distance.toString(),onCalciteInputNumberChange:e=>{if(!this.view?.popup)return;this.view.popup.visible&&this.view.closePopup();const s=e.target;t.resultArea.distance>=0?(t.resultArea.distance=parseInt(s.value,10),this.viewModel.removeResultAreaFromMap(t),this.viewModel.addResultAreaToMap(t)):(t.resultArea.distance=0,this.viewModel.removeResultAreaFromMap(t),this.viewModel.addResultAreaToMap(t))}})))):null,p("calcite-popover",{autoClose:!0,closable:!0,label:e.resultsStrings.graphicColor,offsetDistance:0,offsetSkidding:0,open:this._activeSwatch==="aggGeom_"+i||this._activeSwatch==="resultArea_"+i,placement:"auto-start",referenceElement:this._swatchNode,scale:"s",onCalcitePopoverClose:()=>{this._swatchNode=null,this._activeSwatch=null}},this._renderHighlightColorPicker(this._activeSwatch==="resultArea_"+i?t.resultArea?.color:t.graphicColor,t,this._activeSwatch==="resultArea_"+i?"resultArea":"aggregate"))))):r.push(p("calcite-block",{collapsible:!1,heading:t.trace.title,key:"error-"+i,open:!0,overlayPositioning:"fixed"},this._renderRemoveTraceContainer(t),this._renderWarningMessage("noController",!1,t.status)))})),p("calcite-flow-item",{key:"traceResults",styles:R()},r,this._renderStartOverContainer(),this._alertRemoveModal?p("calcite-scrim",{key:"prompt"},p("div",{class:w.clearPrompt},p("h3",{slot:"header"},e.globalStrings.clearResults),p("div",{slot:"content"},e.alertsStrings.clearResultsAlert),p("div",{class:w.promptDivider}),p("div",{styles:C("row")},p("calcite-button",{appearance:"outline",onclick:()=>{this._alertRemoveModal=!1},slot:"secondary",width:"full"},t.cancel),p("calcite-button",{onclick:()=>{this._activeTrace&&this.viewModel.clearResult(this._activeTrace),this._alertRemoveModal=!1,0===this.viewModel.traceResults.length?this.switchTab("input"):(this._activeTrace=this.viewModel.traceResults[0].trace,this._showTraceResultFunctions=!1,this._showTraceResultAssetGroup=!1,this._showTraceResultAssetType=!1,this._showIndividualRecords=!1)},slot:"primary",width:"full"},t.form.ok)))):null)}_renderTraceResultFunctions(){const{messages:e}=this,t=this._traceResultsFunctions,s=[];return t.forEach((e=>{s.push(this._renderResultRowFunctions(e))})),p("calcite-flow-item",{heading:e.resultsStrings.functionHeader,key:"functionResultMultiple",onCalciteFlowItemBack:()=>{this.switchToFunctions([],!1)}},s,this._renderStartOverContainer())}_renderTraceResultByAssetGroup(){const e=this._traceResultsAssetGroup,t=[];for(const s in e){const i=e[s];for(const e in i)t.push(this._renderResultRowAssetGroup(i[e]))}return p("calcite-flow-item",{heading:this._traceHeaderForFlow,key:"assetGroupResultMultiple",onCalciteFlowItemBack:()=>{this.switchToAssetGroup([],"",!1)}},p("calcite-list",null,t),this._renderStartOverContainer())}_renderTraceResultByAssetType(){const e=this._traceResultsAssetType,t=[];for(const s in e)e[s].length>0&&t.push(this._renderResultRowAssetType(e[s]));return p("calcite-flow-item",{heading:this._assetGroupHeader,key:"assetTypeResult",onCalciteFlowItemBack:()=>{this.switchToAssetType([],"",!1)}},p("calcite-list",{selectionMode:"none"},t),this._renderStartOverContainer())}_renderTraceResultIndividual(){const{messages:e}=this,t=this._traceResultsIndividual;t.sort(this._compare(this._resultSortField,this._resultSortOrder));const s=[];if(t.length>0){(t[0].details?.fields.some((({name:e})=>e.toLowerCase()===this._resultDisplayField.toLocaleLowerCase()))??!1)||(this._resultDisplayField=this._resultObjectIdField,this._resultSortField=this._resultObjectIdField),t.forEach((e=>{e?.details&&s.push(this._renderResultRowIndividual(e))})),0===s.length&&s.push(p("calcite-list-item",{label:e.resultsStrings.noFeaturesInMap}))}return p("calcite-flow-item",{heading:this._assetTypeHeader,key:"individualResult",onCalciteFlowItemBack:()=>{this._showResultOptions=!1,this.switchToIndividualRecords([],"",!1)}},p("calcite-action",{afterCreate:d,bind:this,"data-node-ref":"_individualResultNode",icon:"gear",id:"field_options"+this.id,label:e.resultsStrings.displayAttribute,onclick:()=>{this._showResultOptions=!0},scale:"m",slot:"header-actions-end",text:e.resultsStrings.displayAttribute}),p("calcite-list",{selectionMode:"none"},s),this._renderStartOverContainer())}_renderTraceResultIndividualPopover(){const{messages:e}=this,t=this._traceResultsIndividual,s=[],i=[];return t.length>0&&(t[0].details?t[0].details.fields.forEach((({name:e,alias:t})=>{s.push(p("calcite-option",{key:`display-${e}`,label:t??e,selected:e===this._resultDisplayField,value:e})),i.push(p("calcite-option",{key:`sort-${e}`,label:t??e,selected:e===this._resultSortField,value:e}))})):(s.push(p("calcite-option",{key:`display-${this._resultDisplayField}`,label:this._resultDisplayField,value:this._resultDisplayField})),i.push(p("calcite-option",{key:`sort-${this._resultDisplayField}`,label:this._resultDisplayField,value:this._resultDisplayField})))),p("calcite-popover",{autoClose:!0,label:e.resultsStrings.displayAttribute,offsetDistance:0,offsetSkidding:0,open:this._showResultOptions,overlayPositioning:"fixed",placement:"left-start",referenceElement:this._individualResultNode,styles:null!==this.domNode?y(.75*this.domNode.clientWidth):f()},p("calcite-block",{heading:"",open:!0,overlayPositioning:"fixed"},p("calcite-label",{scale:"s"},e.resultsStrings.displayAttribute,p("calcite-select",{label:e.resultsStrings.displayAttribute,scale:"s",onCalciteSelectChange:e=>{const t=e.target;this._resultDisplayField=t.selectedOption.value,this._showResultOptions=!1}},s)),p("calcite-label",{scale:"s"},e.resultsStrings.sortBy,p("calcite-select",{label:e.resultsStrings.sortBy,scale:"s",onCalciteSelectChange:e=>{const s=e.target;this._resultSortField=s.selectedOption.value,t.sort(this._compare(this._resultSortField,this._resultSortOrder)),this._traceResultsIndividual=t,this._showResultOptions=!1}},i))))}_renderResultRowFunctions(e){return p("calcite-block",{collapsible:!1,heading:e.networkAttributeName+" "+e.functionType+" = "+e.result,overlayPositioning:"fixed"})}_renderResultRowAssetGroup(e){const t=this._getAssetGroupName(e[0]);return p("calcite-list-item",{label:t+" ("+e.length+")",onCalciteListItemSelect:()=>{this.switchToAssetType(this._groupResultsByAssetType(e),t+" ("+e.length+")",!0)}},p("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderResultRowAssetType(e){const t=this._getAssetTypeName(e[0]);return p("calcite-list-item",{label:t+" ("+e.length+")",onCalciteListItemSelect:()=>{this.viewModel.queryFeaturesById(e).then((s=>{if(s?.length){this._resultObjectIdField=s[0].layer.objectIdField,"objectid"===this._resultDisplayField&&(this._resultDisplayField=s[0].layer.objectIdField),"objectid"===this._resultSortField&&(this._resultSortField=s[0].layer.objectIdField);const i=this._appendAttributes(e,s,"objectId");this.switchToIndividualRecords(i,t+" ("+e.length+")",!0)}else this.switchToIndividualRecords(e,t+" ("+e.length+")",!0)}))}},p("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderResultRowIndividual(e){const{messages:t}=this,s=`display-${e.objectId}-nso`,{nonSpatialObject:i,zoomToFeature:r}=t.globalStrings;let l="",o=null;if(o=e?.details?.fields.find((({name:e})=>e===this._resultDisplayField)),"date"===o?.type){l=new Date(e.details.attributes[this._resultDisplayField]).toDateString()}else if("assetgroup"===this._resultDisplayField.toLowerCase())l=this._getAssetGroupName(e);else if("assettype"===this._resultDisplayField.toLowerCase())l=this._getAssetTypeName(e);else if(o?.domain&&A(o.domain)){const t=o.domain.codedValues.find((({code:t})=>t===e.details.attributes[this._resultDisplayField]));l=t?.name}else l=e.details?.attributes[this._resultDisplayField]??e.objectId;return l&&""!==l&&null!==l?"string"==typeof l&&(l.trim()||(l=t.resultsStrings.noValue)):l=t.resultsStrings.noValue,null!==e?.details?.geometry?p("calcite-list-item",{label:l,onCalciteListItemSelect:()=>{this.viewModel.zoomToAsset(e.details.geometry)}},p("calcite-icon",{icon:"zoom-to-object",scale:"s",slot:"content-end",textLabel:r})):p("calcite-list-item",{label:l},p("calcite-icon",{icon:"table",id:s,scale:"s",slot:"content-end",textLabel:i}),p("calcite-tooltip",{label:i,referenceElement:s},p("span",null,i)))}_afterComponentCreate(e){"value"in e&&null!=e.value&&"setNumberValue"in e&&e.setNumberValue({committing:!1,value:e.value,origin:"direct"})}_mixCustomStrings(){const{messages:e}=this;this.inputSettings.length>0&&this.inputSettings.forEach((t=>{"starting-point"===t.type&&(e.inputsStrings.headerStartingPoint=t.label,e.inputsStrings.startingPointHint=t.description),"barrier"===t.type&&(e.inputsStrings.headerBarrier=t.label,e.inputsStrings.barrierPointHint=t.description)}))}_overrideFlagSymbol(){this.inputSettings.length>0&&this.inputSettings.forEach((e=>{"starting-point"===e.type?this._symbolStartFlag=e.symbol:this._symbolBarrier=e.symbol,this.viewModel.changeFlagSymbol(e.type,e.symbol)}))}_utilityNetworkTraceInitialized(){return this.viewModel.loadUtilityNetwork().then((e=>{if(e)return this.viewModel.selectTracesOnLoad(),this._registerWatchers(),this.viewModel.flags.length>0&&this._processFlagOnLoad(),this.view?.when().then((()=>{this._watchViewState()}));this.disabled=!1})).catch((e=>{const{messages:t}=this;this._loadUNError=!1,"utility-network:no-user-type-extension"===e.name||e.details.raw.extendedCode===F.noExtension?this._errorMessage=t.alertsStrings.noUserExtension:this._errorMessage=e.message,this.disabled=!1}))}_processFlagOnLoad(){return this.view?.when().then((()=>{this._watchHandler=s((()=>!this.view?.updating),(async()=>{this._warningNoFlag=!1,this._warningNoBarrierAssetFound=!1,this._warningNoStartAssetFound=!1;const e=await this.viewModel.addFlagsOnLoad();this.viewModel.removeFlagsOnLoadWatcher(),e.includes("barrier")&&(this._warningNoBarrierAssetFound=!0),e.includes("starting-point")&&(this._warningNoStartAssetFound=!0),this.disabled=!1,null!==this._watchHandler&&this._watchHandler.remove()}))}))}_registerWatchers(){this.addHandles([t((()=>this.selectedTraces),(()=>{this.viewModel.selectTracesOnLoad(),this.scheduleRender()})),t((()=>this.defaultGraphicColor),(()=>{this.viewModel.traceResults.length>0&&this.viewModel.traceResults.forEach((e=>{this.viewModel.changeResultGraphicColor(this.viewModel.defaultGraphicColor,e)})),this.scheduleRender()}))])}_groupResultsByAssetGroup(e){const t=[],s=e.results?.elements,i=this._groupBy(s??[],"networkSourceId");for(const r in i)t.push(this._groupBy(i[r],"assetGroupCode"));return t}_groupResultsByAssetType(e){return this._groupBy(e,"assetTypeCode")}_appendAttributes(e,t,s){const i=[];return e.forEach((e=>{t.forEach((t=>{t.featureSet.features.forEach((r=>{e[s]===r.attributes[this._resultObjectIdField]&&(e.details=r,e.details.fields=t.featureSet.fields,i.push(e))}))}))})),i}_getAssetGroupName(e){let t=e.assetGroupCode.toString();const s=e.assetGroupCode,i=this.viewModel.getValidSources().find((t=>t.sourceId===e.networkSourceId));if(i){const e=i.assetGroups.find((e=>e.assetGroupCode===s));e&&(t=e.assetGroupName)}return t}_getAssetTypeName(e){let t=e.assetTypeCode.toString();const s=e.assetGroupCode,i=this.viewModel.getValidSources().find((t=>t.sourceId===e.networkSourceId));if(i){const r=i.assetGroups.find((e=>e.assetGroupCode===s));if(r){const s=r.assetTypes.find((t=>t.assetTypeCode===e.assetTypeCode));s&&(t=s.assetTypeName)}}return t}_compare(e,t){return(s,i)=>{let r=0,l=s.details?.attributes[e]??s.objectId,o=i.details?.attributes[e]??i.objectId;return isNaN(l)&&(l=l.toLowerCase()),isNaN(o)&&(o=o.toLowerCase()),"desc"===t?l>o?r=1:l<o&&(r=-1):l<o?r=1:l>o&&(r=-1),r}}_groupBy(e,t){return e.reduce(((e,s)=>((e[s[t]]=e[s[t]]||[]).push(s),e)),{})}_getSymbolIcon(e){return"picture-marker"===e.type?p("img",{height:e.height,src:e.url??void 0,width:e.width}):null}_watchViewState(){this._watchHandler=s((()=>!this.view?.updating),(()=>{this.disabled=!1,null!==this._watchHandler&&this._watchHandler.remove()}),{initial:!0})}_changeCursor(e="default"){const t=this.view?.container?.style;t&&(t.cursor=e)}};e([i()],k.prototype,"_selectToolActive",void 0),e([i()],k.prototype,"_activeTrace",void 0),e([i()],k.prototype,"_activeSwatch",void 0),e([i()],k.prototype,"_traceHeaderForFlow",void 0),e([i()],k.prototype,"_assetGroupHeader",void 0),e([i()],k.prototype,"_assetTypeHeader",void 0),e([i()],k.prototype,"_traceResultsFunctions",void 0),e([i()],k.prototype,"_traceResultsAssetGroup",void 0),e([i()],k.prototype,"_traceResultsAssetType",void 0),e([i()],k.prototype,"_traceResultsIndividual",void 0),e([i()],k.prototype,"_showTraceResultFunctions",void 0),e([i()],k.prototype,"_showTraceResultAssetGroup",void 0),e([i()],k.prototype,"_showTraceResultAssetType",void 0),e([i()],k.prototype,"_showIndividualRecords",void 0),e([i()],k.prototype,"_activeTab",void 0),e([i()],k.prototype,"_alertRemoveModal",void 0),e([i()],k.prototype,"_warningNoFlag",void 0),e([i()],k.prototype,"_warningNoTraceSelected",void 0),e([i()],k.prototype,"_confirmReset",void 0),e([i()],k.prototype,"_swatchNode",void 0),e([i()],k.prototype,"_errorMessage",void 0),e([i()],k.prototype,"defaultGraphicColor",null),e([i()],k.prototype,"disabled",void 0),e([i()],k.prototype,"flags",null),e([i()],k.prototype,"gdbVersion",null),e([i()],k.prototype,"iconClass",void 0),e([i()],k.prototype,"inputSettings",void 0),e([i()],k.prototype,"label",null),e([i(),h("esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace")],k.prototype,"messages",void 0),e([i(),h("esri/t9n/common")],k.prototype,"messagesCommon",void 0),e([i(),h("esri/core/t9n/Units")],k.prototype,"messagesUnits",void 0),e([i()],k.prototype,"resultAreaProperties",null),e([i()],k.prototype,"selectedTraces",null),e([i()],k.prototype,"selectOnComplete",null),e([i()],k.prototype,"showGraphicsOnComplete",null),e([i()],k.prototype,"enableResultArea",null),e([i()],k.prototype,"showSelectionAttributes",null),e([i()],k.prototype,"utilityNetwork",null),e([i()],k.prototype,"view",null),e([u(["add-flag","add-flag-complete","add-flag-error","select-features","clear-selection","add-result-area","remove-result-area","create-result-area"]),i({type:g})],k.prototype,"viewModel",void 0),k=e([r(v)],k);const M=k;export{M as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../geometry.js";import{createTask as o}from"../../../core/asyncUtils.js";import t from"../../../core/Collection.js";import s from"../../../core/Evented.js";import{makeHandle as r}from"../../../core/handleUtils.js";import{debounce as i,ignoreAbortErrors as c,onAbort as n}from"../../../core/promiseUtils.js";import{createScreenPoint as l}from"../../../core/screenUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{isClockwise as m}from"../../../geometry/support/coordsUtils.js";import{DrawScreenTool as
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../geometry.js";import{createTask as o}from"../../../core/asyncUtils.js";import t from"../../../core/Collection.js";import s from"../../../core/Evented.js";import{makeHandle as r}from"../../../core/handleUtils.js";import{debounce as i,ignoreAbortErrors as c,onAbort as n}from"../../../core/promiseUtils.js";import{createScreenPoint as l}from"../../../core/screenUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{isClockwise as m}from"../../../geometry/support/coordsUtils.js";import{DrawScreenTool as d}from"../../../views/draw/DrawScreenTool.js";import{sketchKeys as h}from"../../../views/interactive/keybindings.js";import{getSelectionFromGeometry as u}from"./selectorUtils.js";import y from"../../../geometry/Point.js";import g from"../../../geometry/Polygon.js";const f=100;let v=class extends s.EventedAccessor{constructor(e){super(e),this._processTask=null,this.options=null,this.selection=new t,this.sources=null,this._process=i((async(e,t)=>{const{callback:s,selector:r,completed:i}=e,c=o((async e=>{const{sources:o,selection:t,view:c}=this;if(!(!o?.length&&!c?.selectionManager.sources.length)&&c){if(r&&null!=o){const s=await u({currentSelection:t,selector:r,signal:e,sources:o,view:c});i&&c.selectionManager?.updateSelection({current:t.toArray(),...s})}s&&s()}else t.removeAll()}));return n(t,(()=>c.abort())),this._processTask=c,c.promise}),f)}initialize(){this._setup()}cancel(){this.removeAllHandles(),this._processTask?.abort()}async _setup(){const{view:e}=this;if(await e.whenReady(),this.destroyed)return;const o=this.options,t=o?.createTool??"rectangle",s=o?.mode??("polygon"===t?"click":"hybrid"),i=Symbol();this._tool=new d({view:e,mode:s,geometryType:t}),o?.selectOnComplete||this.addHandles(this._tool.on(["cursor-update","vertex-add","vertex-remove"],(()=>c(this._process({selector:this._selectionArea})))),i),this.addHandles([e.on("key-down",(e=>{if(!e.repeat)switch(e.key){case h.constraint:this._tool.uniformSizeToggled=!0,e.stopPropagation();break;case h.center:this._tool.centeredToggled=!0,e.stopPropagation()}})),e.on("key-up",(e=>{switch(e.key){case h.constraint:this._tool.uniformSizeToggled=!1,e.stopPropagation();break;case h.center:this._tool.centeredToggled=!1,e.stopPropagation()}})),this._tool.on("complete",(async e=>{this.removeHandles(i);const o=()=>{this.removeAllHandles(),this.emit("complete",{aborted:e.aborted,selection:this.selection.toArray()})};e.aborted?(this.cancel(),this.selection.removeAll(),o()):await this._process({selector:this._selectionArea,callback:o,completed:!0})}))],i),this.addHandles(r((()=>e.tools.remove(this._tool)))),e.addAndActivateTool(this._tool)}get _selectionArea(){const e=l(),o=this._tool.coordinates,t=this.view.spatialReference,s=o=>{e.x=o[0],e.y=o[1];const{x:t,y:s}=this.view.toMap(e);return[t,s]};if(1===o.length){const[e,r]=s(o[0]);return new y({x:e,y:r,spatialReference:t})}const r=this._tool.coordinates.map(s);if(0===r.length)return;m(r)||r.reverse();return new g({spatialReference:t,rings:[r]})}};e([a()],v.prototype,"options",void 0),e([a({readOnly:!0})],v.prototype,"selection",void 0),e([a()],v.prototype,"sources",void 0),e([a({constructOnly:!0})],v.prototype,"view",void 0),v=e([p("esri.widgets.support.Selector2D.SelectionOperation2D")],v);const w=v;export{w as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{whenOrAbort as e,ignoreAbortErrors as r}from"../../../core/promiseUtils.js";import{getDisplayFieldName as t}from"../../../layers/support/fieldUtils.js";import{isFeatureLayer as s,isKnowledgeGraphLayer as n,isLinkChartLayer as
|
|
5
|
+
import{whenOrAbort as e,ignoreAbortErrors as r}from"../../../core/promiseUtils.js";import{getDisplayFieldName as t}from"../../../layers/support/fieldUtils.js";import{isFeatureLayer as s,isKnowledgeGraphLayer as n,isLinkChartLayer as i,isMapNotesLayer as a,isGraphicsLayer as l}from"../../../layers/support/layerUtils.js";import{calculateTolerance as o}from"../../../renderers/support/clickToleranceUtils.js";import{createQueryGeometry as c}from"../../../views/support/drapedUtils.js";import{isSelectableLayerView2D as u}from"../../../views/support/layerViewUtils.js";async function y(){return import("../../../geometry/geometryEngineJSON.js")}async function d(){return y().then((({contains:e,intersects:r,overlaps:t,simplify:s})=>({contains:e,intersects:r,overlaps:t,simplify:s})))}async function p(r){const{currentSelection:t,selector:s,signal:n,sources:i,view:a}=r;if(!i?.length)return{added:[],removed:[]};const{layers:l,layerViews:o,graphicsLayers:c}=w(i),u=(await e(Promise.all([m(s,l,a,n),g(s,o,a,n),f(s,c,a)]),n)).flat();if(!t)return{added:u,removed:[]};const y=t.toArray(),d=u.filter((e=>!v(y,e))),p=y.filter((e=>!v(u,e)));return t.removeMany(p),t.addMany(d),{added:d,removed:p}}const f=async(e,r,t)=>b({candidates:r.flatMap((e=>e.graphics.toArray()))??[],selector:e,view:t}),m=async(e,t,s,n)=>{const i=await r(F({selector:e,signal:n,layers:t,view:s}));return i?h(i):[]},g=async(e,t,s,n)=>{const i=await r(j({selector:e,signal:n,layerViews:t,view:s}));return i?h(i):[]};function h(e){const r=[];for(let t=0;t<e.length;t++){const s=e[t];"fulfilled"===s.status&&r.push(...s.value)}return r}function w(e){const r=[],t=[],o=[];return e.forEach((e=>{s(e)?r.push(e):(n(e)||i(e))&&e.layers?.length?r.push(...e.layers.toArray()):a(e)&&e.sublayers?.length?o.push(...e.sublayers.toArray()):l(e)?o.push(e):u(e)&&t.push(e)})),{layers:r,layerViews:t,graphicsLayers:o}}function v(e,r){if(e.includes(r))return!0;const t=r.getObjectId(),s=null!=t,{layer:n,uid:i}=r;return s?e.some((e=>{if(n===e.layer)return t===e.getObjectId()})):e.some((e=>{if(n===e.layer)return i===e.uid}))}async function j(r){const{layerViews:t,selector:s,signal:n,view:i}=r;return e(Promise.allSettled(t.map((async e=>{const r=e.createQuery(),{geometry:t}=S(s,e.layer,i);return r.outFields=["*"],r.geometry=t,r.returnGeometry=!0,r.outSpatialReference=i.spatialReference,e.queryFeatures(r,{signal:n}).then((({features:e})=>e))}))),n)}async function F(r){const{layers:t,selector:s,signal:n,view:i}=r;return e(Promise.allSettled(t.map((async e=>e.queryFeatures(U(e.createQuery(),s,e,i),{signal:n}).then((({features:e})=>e))))),n)}function S(e,r,s){const n="displayField"in r?r.displayField:null,i=t({displayField:n,fields:r.fields}),a=[r.objectIdField];null!=i&&r.fieldsIndex.has(i)&&a.push(i);const l="renderer"in r?o({renderer:r.renderer}):0;return{geometry:"point"===e.type?c(e,l,s):e,outFields:a}}function U(e,r,t,s){const{outFields:n,geometry:i}=S(r,t,s);return e.outFields=n,e.geometry=i,e.returnGeometry=!0,e.outSpatialReference=s.spatialReference,e}async function b(e){const{selector:r,candidates:t,view:s}=e;if(!t?.length||!r)return[];const{spatialReference:n}=s,i=r,a=await d();return t.filter((e=>a.intersects(n,i,e.geometry)))}export{d as getGeometryEngineOperations,S as getQueryOptionsFromLayer,j as getSelectionFromFeatureLayerViews,F as getSelectionFromFeatureLayers,p as getSelectionFromGeometry,b as getSelectionFromGeometryEngine,y as importGeometryEngine};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5980],{98472:(t,n,e)=>{e.d(n,{A:()=>s,B:()=>a,C:()=>w,D:()=>B,G:()=>R,a:()=>f,b:()=>L,c:()=>i,e:()=>D,f:()=>T,g:()=>A,h:()=>S,i:()=>G,j:()=>l,k:()=>h,l:()=>_,m:()=>H,n:()=>M,o:()=>C,p:()=>I,q:()=>O,r:()=>P,s:()=>o,t:()=>U,u:()=>N,v:()=>y,w:()=>b,x:()=>u,y:()=>g,z:()=>c});var r=e(62484),E=e(47364);function _(t){const n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function i(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function o(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function A(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function T(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function s(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function R(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function N(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function c(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function u(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function a(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function S(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function O(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t}function I(t,n){const e=n[0]-t[0],r=n[1]-t[1],E=n[2]-t[2];return Math.sqrt(e*e+r*r+E*E)}function f(t,n){const e=n[0]-t[0],r=n[1]-t[1],E=n[2]-t[2];return e*e+r*r+E*E}function C(t){const n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function M(t,n){const e=n[0],r=n[1],E=n[2];let _=e*e+r*r+E*E;return _>0&&(_=1/Math.sqrt(_),t[0]=n[0]*_,t[1]=n[1]*_,t[2]=n[2]*_),t}function l(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function L(t,n,e){const r=n[0],E=n[1],_=n[2],i=e[0],o=e[1],A=e[2];return t[0]=E*A-_*o,t[1]=_*i-r*A,t[2]=r*o-E*i,t}function h(t,n,e,r){const E=n[0],_=n[1],i=n[2];return t[0]=E+r*(e[0]-E),t[1]=_+r*(e[1]-_),t[2]=i+r*(e[2]-i),t}function D(t,n,e){const r=n[0],E=n[1],_=n[2];return t[0]=e[0]*r+e[4]*E+e[8]*_+e[12],t[1]=e[1]*r+e[5]*E+e[9]*_+e[13],t[2]=e[2]*r+e[6]*E+e[10]*_+e[14],t}function U(t,n,e){const r=n[0],E=n[1],_=n[2];return t[0]=r*e[0]+E*e[3]+_*e[6],t[1]=r*e[1]+E*e[4]+_*e[7],t[2]=r*e[2]+E*e[5]+_*e[8],t}function P(t,n,e){const r=e[0],E=e[1],_=e[2],i=e[3],o=n[0],A=n[1],T=n[2],s=E*T-_*A,R=_*o-r*T,N=r*A-E*o,c=E*N-_*R,u=_*s-r*N,a=r*R-E*s,S=2*i;return t[0]=o+s*S+2*c,t[1]=A+R*S+2*u,t[2]=T+N*S+2*a,t}const d=(0,r.Su)(),F=(0,r.Su)();function G(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function B(t,n,e){const r=e[0]-n[0],E=e[1]-n[1],_=e[2]-n[2];let i=r*r+E*E+_*_;return i>0?(i=1/Math.sqrt(i),t[0]=r*i,t[1]=E*i,t[2]=_*i,t):(t[0]=0,t[1]=0,t[2]=0,t)}const g=T,m=s,p=R,H=I,y=f,w=_,b=C;Object.freeze(Object.defineProperty({__proto__:null,abs:N,add:A,angle:function(t,n){M(d,t),M(F,n);const e=l(d,F);return e>1?0:e<-1?Math.PI:Math.acos(e)},bezier:function(t,n,e,r,E,_){const i=1-_,o=i*i,A=_*_,T=o*i,s=3*_*o,R=3*A*i,N=A*_;return t[0]=n[0]*T+e[0]*s+r[0]*R+E[0]*N,t[1]=n[1]*T+e[1]*s+r[1]*R+E[1]*N,t[2]=n[2]*T+e[2]*s+r[2]*R+E[2]*N,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},copy:i,cross:L,direction:B,dist:H,distance:I,div:p,divide:R,dot:l,equals:function(t,n){if(t===n)return!0;const e=t[0],r=t[1],_=t[2],i=n[0],o=n[1],A=n[2],T=(0,E.Au)();return Math.abs(e-i)<=T*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(r-o)<=T*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(_-A)<=T*Math.max(1,Math.abs(_),Math.abs(A))},exactEquals:G,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,e,r,E,_){const i=_*_,o=i*(2*_-3)+1,A=i*(_-2)+_,T=i*(_-1),s=i*(3-2*_);return t[0]=n[0]*o+e[0]*A+r[0]*T+E[0]*s,t[1]=n[1]*o+e[1]*A+r[1]*T+E[1]*s,t[2]=n[2]*o+e[2]*A+r[2]*T+E[2]*s,t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t},len:w,length:_,lerp:h,max:a,min:u,mul:m,multiply:s,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t},normalize:M,random:function(t,n){n=n||1;const e=E.QR,r=2*e()*Math.PI,_=2*e()-1,i=Math.sqrt(1-_*_)*n;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=_*n,t},rotateX:function(t,n,e,r){const E=[],_=[];return E[0]=n[0]-e[0],E[1]=n[1]-e[1],E[2]=n[2]-e[2],_[0]=E[0],_[1]=E[1]*Math.cos(r)-E[2]*Math.sin(r),_[2]=E[1]*Math.sin(r)+E[2]*Math.cos(r),t[0]=_[0]+e[0],t[1]=_[1]+e[1],t[2]=_[2]+e[2],t},rotateY:function(t,n,e,r){const E=[],_=[];return E[0]=n[0]-e[0],E[1]=n[1]-e[1],E[2]=n[2]-e[2],_[0]=E[2]*Math.sin(r)+E[0]*Math.cos(r),_[1]=E[1],_[2]=E[2]*Math.cos(r)-E[0]*Math.sin(r),t[0]=_[0]+e[0],t[1]=_[1]+e[1],t[2]=_[2]+e[2],t},rotateZ:function(t,n,e,r){const E=[],_=[];return E[0]=n[0]-e[0],E[1]=n[1]-e[1],E[2]=n[2]-e[2],_[0]=E[0]*Math.cos(r)-E[1]*Math.sin(r),_[1]=E[0]*Math.sin(r)+E[1]*Math.cos(r),_[2]=E[2],t[0]=_[0]+e[0],t[1]=_[1]+e[1],t[2]=_[2]+e[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:S,scaleAndAdd:O,set:o,sign:c,sqrDist:y,sqrLen:b,squaredDistance:f,squaredLength:C,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:g,subtract:T,transformMat3:U,transformMat4:D,transformQuat:P},Symbol.toStringTag,{value:"Module"}))},85256:(t,n,e)=>{function r(){return[0,0]}function E(t,n){return[t,n]}function _(){return E(1,1)}function i(){return E(1,0)}function o(){return E(0,1)}e.d(n,{Qw:()=>A,Su:()=>r,WK:()=>E});const A=_(),T=i(),s=o();Object.freeze(Object.defineProperty({__proto__:null,ONES:A,UNIT_X:T,UNIT_Y:s,ZEROS:[0,0],clone:function(t){return[t[0],t[1]]},create:r,createView:function(t,n){return new Float64Array(t,n,2)},fromArray:function(t,n=[0,0]){const e=Math.min(2,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:E,ones:_,unitX:i,unitY:o,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},62484:(t,n,e)=>{function r(){return[0,0,0]}function E(t){return[t[0],t[1],t[2]]}function _(t,n,e){return[t,n,e]}function i(t,n=[0,0,0]){const e=Math.min(3,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n}function o(){return _(1,1,1)}function A(){return _(1,0,0)}function T(){return _(0,1,0)}function s(){return _(0,0,1)}e.d(n,{IR:()=>u,Qw:()=>N,Su:()=>r,UV:()=>c,WK:()=>_,cX:()=>R,ct:()=>E,eu:()=>i,wx:()=>a});const R=[0,0,0],N=o(),c=A(),u=T(),a=s();Object.freeze(Object.defineProperty({__proto__:null,ONES:N,UNIT_X:c,UNIT_Y:u,UNIT_Z:a,ZEROS:R,clone:E,create:r,createView:function(t,n){return new Float64Array(t,n,3)},fromArray:i,fromValues:_,ones:o,unitX:A,unitY:T,unitZ:s,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},47364:(t,n,e)=>{e.d(n,{Af:()=>A,Au:()=>E,QR:()=>_,Yf:()=>T});let r=1e-6;function E(){return r}const _=Math.random,i=Math.PI/180,o=180/Math.PI;function A(t){return t*i}function T(t){return t*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:_,equals:function(t,n){return Math.abs(t-n)<=r*Math.max(1,Math.abs(t),Math.abs(n))},getEpsilon:E,setEpsilon:function(t){r=t},toDegree:T,toRadian:A},Symbol.toStringTag,{value:"Module"}))},53648:(t,n,e)=>{e.d(n,{Cq:()=>o,EF:()=>T,Iv:()=>I,SE:()=>C,UB:()=>s,Uj:()=>R,aU:()=>A,gJ:()=>S,gP:()=>c,ig:()=>f,qk:()=>i,sj:()=>N,w7:()=>_});var r=e(98472);const E=new Float32Array(1);function _(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function i(t,n,e){return Math.min(Math.max(t,n),e)}function o(t,n,e){return t+(n-t)*e}function A(t,n,e,r,E){return o(r,E,(t-n)/(e-n))}function T(t){return t*Math.PI/180}function s(t){return 180*t/Math.PI}function R(t){return Math.acos(i(t,-1,1))}function N(t){return Math.asin(i(t,-1,1))}function c(t,n,e=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=e}const u=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));const a=BigInt("1000000");function S(t){return O(Math.max(-C,Math.min(t,C)))}function O(t){return E[0]=t,E[0]}function I(t,n){const e=(0,r.l)(t),E=N(t[2]/e),_=Math.atan2(t[1]/e,t[0]/e);return(0,r.s)(n,e,E,_),n}function f(t){const n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],e=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(c(n,1)&&c(e,1)&&c(r,1))}!function(t){const n=function(t){return u.setFloat64(0,t),u.getBigInt64(0)}(t=Math.abs(t)),e=function(t){return u.setBigInt64(0,t),u.getFloat64(0)}(n<=a?a:n-a);Math.abs(t-e)}(1);const C=O(34028234663852886e22)},92896:(t,n,e)=>{e.d(n,{mc:()=>E});var r=e(72008);function E(t,n=!1){return t<=r._?n?new Array(t).fill(0):new Array(t):new Float32Array(t)}},97143:(t,n,e)=>{e.d(n,{Uv:()=>E,aw:()=>_,yh:()=>T});var r=e(72008);function E(t){if((0,r.c7)(t)){if(t.length<r._)return t}else if(t.length<r._)return Array.from(t);let n=!0,e=!0;return t.some(((t,r)=>(n=n&&0===t,e=e&&t===r,!n&&!e))),n?function(t){if(1===t)return o;if(t<r._)return new Array(t).fill(0);if(t>s.length){const n=Math.max(2*s.length,t);s=new Uint8Array(n)}return new Uint8Array(s.buffer,0,t)}(t.length):e?T(t.length):(0,r.c7)(t)||t.BYTES_PER_ELEMENT!==Uint16Array.BYTES_PER_ELEMENT?function(t){let n=!0;for(const e of t){if(e>=65536)return(0,r.c7)(t)?new Uint32Array(t):t;e>=256&&(n=!1)}return n?new Uint8Array(t):new Uint16Array(t)}(t):t}function _(t){return t<=r._?new Array(t):t<=65536?new Uint16Array(t):new Uint32Array(t)}let i=(()=>{const t=new Uint32Array(131072);for(let n=0;n<t.length;++n)t[n]=n;return t})();const o=[0],A=(()=>{const t=new Uint16Array(65536);for(let n=0;n<t.length;++n)t[n]=n;return t})();function T(t){if(1===t)return o;if(t<r._)return Array.from(new Uint16Array(A.buffer,0,t));if(t<A.length)return new Uint16Array(A.buffer,0,t);if(t>i.length){const n=Math.max(2*i.length,t);i=new Uint32Array(n);for(let t=0;t<i.length;t++)i[t]=t}return new Uint32Array(i.buffer,0,t)}let s=new Uint8Array(65536)},98132:(t,n,e)=>{function r(t){switch(t){case"u8":case"i8":return 1;case"u16":case"i16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}e.d(n,{Ad:()=>r})},77080:(t,n,e)=>{e.d(n,{g:()=>_});var r=e(53648),E=e(97143);function _(t,n,e){const _=Array.isArray(t),s=_?t.length/n:t.byteLength/(4*n),R=_?t:new Uint32Array(t,0,s*n),N=e?.minReduction??0,c=e?.originalIndices||null,u=c?c.length:0,a=e?.componentOffsets||null;let S=0;if(a)for(let t=0;t<a.length-1;t++){const n=a[t+1]-a[t];n>S&&(S=n)}else S=s;const O=Math.floor(1.1*S)+1;(null==T||T.length<2*O)&&(T=new Uint32Array((0,r.w7)(2*O)));for(let t=0;t<2*O;t++)T[t]=0;let I=0;const f=!!a&&!!c,C=f?u:s;let M=(0,E.aw)(s);const l=new Uint32Array(u),L=1.96;let h=0!==N?Math.ceil(4*L*L/(N*N)*N*(1-N)):C,D=1,U=a?a[1]:C;for(let t=0;t<C;t++){if(t===h){const n=1-I/t;if(n+L*Math.sqrt(n*(1-n)/t)<N)return null;h*=2}if(t===U){for(let t=0;t<2*O;t++)T[t]=0;if(c)for(let t=a[D-1];t<a[D];t++)l[t]=M[c[t]];U=a[++D]}const e=f?c[t]:t,r=e*n,E=A(R,r,n);let _=E%O,o=I;for(;0!==T[2*_+1];){if(T[2*_]===E){const t=T[2*_+1]-1;if(i(R,r,t*n,n)){o=M[t];break}}_++,_>=O&&(_-=O)}o===I&&(T[2*_]=E,T[2*_+1]=e+1,I++),M[e]=o}if(0!==N&&1-I/s<N)return null;if(f){for(let t=a[D-1];t<l.length;t++)l[t]=M[c[t]];M=(0,E.Uv)(l)}const P=_?new Array(I):new Uint32Array(I*n);I=0;for(let t=0;t<C;t++)M[t]===I&&(o(R,(f?c[t]:t)*n,P,I*n,n),I++);if(c&&!f){const t=new Uint32Array(u);for(let n=0;n<t.length;n++)t[n]=M[c[n]];M=(0,E.Uv)(t)}return{buffer:Array.isArray(P)?P:P.buffer,indices:M,uniqueCount:I}}function i(t,n,e,r){for(let E=0;E<r;E++)if(t[n+E]!==t[e+E])return!1;return!0}function o(t,n,e,r,E){for(let _=0;_<E;_++)e[r+_]=t[n+_]}function A(t,n,e){let r=0;for(let E=0;E<e;E++)r=t[n+E]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let T=null},72364:(t,n,e)=>{e.d(n,{U1:()=>T,iC:()=>A});var r=e(71004),E=e(98132),_=e(90736);class i{constructor(t,n){this.layout=t,this.buffer="number"==typeof n?new ArrayBuffer(n*t.stride):n;for(const n of t.fields.keys()){const e=t.fields.get(n);this[n]=new e.constructor(this.buffer,e.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(t,n){const e=this[t];return e&&e.elementCount===n.ElementCount&&e.elementType===n.ElementType?e:null}slice(t,n){return new i(this.layout,this.buffer.slice(t*this.stride,n*this.stride))}copyFrom(t,n=0,e=0,r=t.count){const E=this.stride;if(E%4==0){const _=new Uint32Array(t.buffer,n*E,r*E/4);new Uint32Array(this.buffer,e*E,r*E/4).set(_)}else{const _=new Uint8Array(t.buffer,n*E,r*E);new Uint8Array(this.buffer,e*E,r*E).set(_)}return this}get usedMemory(){return this.byteLength}dispose(){}}class o{constructor(t=null){this._stride=0,this._lastAligned=0,this._fields=new Map,t&&(this._stride=t.stride,t.fields.forEach((t=>this._fields.set(t[0],{...t[1],constructor:N(t[1].constructor)}))))}vec2f(t,n){return this._appendField(t,r.U7,n),this}vec2f64(t,n){return this._appendField(t,r.wT,n),this}vec3f(t,n){return this._appendField(t,r.Yj,n),this}vec3f64(t,n){return this._appendField(t,r.Ax,n),this}vec4f(t,n){return this._appendField(t,r._5,n),this}vec4f64(t,n){return this._appendField(t,r.Ip,n),this}mat3f(t,n){return this._appendField(t,r.Ko,n),this}mat3f64(t,n){return this._appendField(t,r.m_,n),this}mat4f(t,n){return this._appendField(t,r.IL,n),this}mat4f64(t,n){return this._appendField(t,r.mF,n),this}vec4u8(t,n){return this._appendField(t,r.sb,n),this}f32(t,n){return this._appendField(t,r.AZ,n),this}f64(t,n){return this._appendField(t,r.oN,n),this}u8(t,n){return this._appendField(t,r.Kg,n),this}u16(t,n){return this._appendField(t,r.E_,n),this}i8(t,n){return this._appendField(t,r.kV,n),this}vec2i8(t,n){return this._appendField(t,r.oR,n),this}vec2i16(t,n){return this._appendField(t,r.iN,n),this}vec2u8(t,n){return this._appendField(t,r.eS,n),this}vec4u16(t,n){return this._appendField(t,r.Ig,n),this}u32(t,n){return this._appendField(t,r.Ym,n),this}_appendField(t,n,e){if(this._fields.has(t))return void(0,_.Uc)(!1,`${t} already added to vertex buffer layout`);const r=n.ElementCount*(0,E.Ad)(n.ElementType),i=this._stride;this._stride+=r,this._fields.set(t,{size:r,constructor:n,offset:i,optional:e})}createBuffer(t){return new i(this,t)}createView(t){return new i(this,t)}clone(){const t=new o;return t._stride=this._stride,t._fields=new Map,this._fields.forEach(((n,e)=>t._fields.set(e,n))),t.BufferType=this.BufferType,t}get stride(){if(this._lastAligned!==this._fields.size){let t=1;this._fields.forEach((n=>t=Math.max(t,(0,E.Ad)(n.constructor.ElementType)))),this._stride=Math.floor((this._stride+t-1)/t)*t,this._lastAligned=this._fields.size}return this._stride}get fields(){return this._fields}}function A(){return new o}class T{constructor(t){this.fields=new Array,t.fields.forEach(((t,n)=>{const e={...t,constructor:R(t.constructor)};this.fields.push([n,e])})),this.stride=t.stride}}const s=[r.AZ,r.U7,r.Yj,r._5,r.Ko,r.IL,r.oN,r.wT,r.Ax,r.Ip,r.m_,r.mF,r.Kg,r.eS,r.IN,r.sb,r.E_,r.kg,r.k5,r.Ig,r.Ym,r.qZ,r.ER,r.q$,r.kV,r.oR,r.Oq,r.mq,r.Mt,r.iN,r.g7,r.OS,r.Ep,r.mI,r.Yv,r.i9];function R(t){return`${t.ElementType}_${t.ElementCount}`}function N(t){return c.get(t)}const c=new Map;s.forEach((t=>c.set(R(t),t)))},73440:(t,n,e)=>{e.d(n,{W:()=>_});var r=e(77800),E=e(91811);function _(t,n=0){const e=t.stride;return Array.from(t.fields.keys()).map((r=>{const _=t.fields.get(r),o=_.constructor.ElementCount,A=i(_.constructor.ElementType),T=_.offset,s=!(!_.optional||!_.optional.glNormalized);return new E.q(r,o,A,T,e,s,n)}))}function i(t){const n=o[t];if(n)return n;throw new Error("BufferType not supported in WebGL")}const o={u8:r.Ck.UNSIGNED_BYTE,u16:r.Ck.UNSIGNED_SHORT,u32:r.Ck.UNSIGNED_INT,i8:r.Ck.BYTE,i16:r.Ck.SHORT,i32:r.Ck.INT,f32:r.Ck.FLOAT}},90736:(t,n,e)=>{e.d(n,{If:()=>_,Uc:()=>E}),e(85256),e(74784),(0,e(37008).Su)();class r{constructor(t){this.message=t}toString(){return`AssertException: ${this.message}`}}function E(t,n){if(!t){n=n||"Assertion";const t=new Error(n).stack;throw new r(`${n} at ${t}`)}}function _(t,n,e,r){let E,_=(e[0]-t[0])/n[0],i=(r[0]-t[0])/n[0];_>i&&(E=_,_=i,i=E);let o=(e[1]-t[1])/n[1],A=(r[1]-t[1])/n[1];if(o>A&&(E=o,o=A,A=E),_>A||o>i)return!1;o>_&&(_=o),A<i&&(i=A);let T=(e[2]-t[2])/n[2],s=(r[2]-t[2])/n[2];return T>s&&(E=T,T=s,s=E),!(_>s||T>i||(s<i&&(i=s),i<0))}},4636:(t,n,e)=>{var r;e.d(n,{K:()=>r}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.PREVPOSITION="prevPosition",t.NEXTPOSITION="nextPosition",t.SUBDIVISIONFACTOR="subdivisionFactor",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.FEATUREVALUE="featureValue",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.EXTRUDE="extrude",t.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(r||(r={}))},80036:(t,n,e)=>{e.d(n,{If:()=>i,sn:()=>A,wj:()=>T});var r=e(73440),E=e(72364),_=e(4636);const i=(0,E.iC)().vec3f(_.K.POSITION).u16(_.K.COMPONENTINDEX),o=(0,E.iC)().vec2u8(_.K.SIDENESS),A=((0,r.W)(o),(0,E.iC)().vec3f(_.K.POSITION0).vec3f(_.K.POSITION1).vec2i16(_.K.NORMALCOMPRESSED).u16(_.K.COMPONENTINDEX).u8(_.K.VARIANTOFFSET,{glNormalized:!0}).u8(_.K.VARIANTSTROKE).u8(_.K.VARIANTEXTENSION,{glNormalized:!0})),T=(0,E.iC)().vec3f(_.K.POSITION0).vec3f(_.K.POSITION1).vec2i16(_.K.NORMALCOMPRESSED).vec2i16(_.K.NORMAL2COMPRESSED).u16(_.K.COMPONENTINDEX).u8(_.K.VARIANTOFFSET,{glNormalized:!0}).u8(_.K.VARIANTSTROKE).u8(_.K.VARIANTEXTENSION,{glNormalized:!0});new Map([[_.K.POSITION0,0],[_.K.POSITION1,1],[_.K.COMPONENTINDEX,2],[_.K.VARIANTOFFSET,3],[_.K.VARIANTSTROKE,4],[_.K.VARIANTEXTENSION,5],[_.K.NORMALCOMPRESSED,6],[_.K.NORMAL2COMPRESSED,7],[_.K.SIDENESS,8]])},79968:(t,n,e)=>{e.d(n,{k:()=>s});var r=e(92400),E=e(53648),_=e(98472),i=e(62484);const o=-1;var A,T;function s(t,n,e,i=O){const A=t.vertices.position,T=t.vertices.componentIndex,s=(0,E.EF)(i.anglePlanar),S=(0,E.EF)(i.angleSignificantEdge),I=Math.cos(S),f=Math.cos(s),C=a.edge,M=C.position0,l=C.position1,L=C.faceNormal0,h=C.faceNormal1,D=u(t),U=function(t){const n=t.faces.length/3,e=t.faces,r=t.neighbors;let E=0;for(let t=0;t<n;t++){const n=r[3*t],_=r[3*t+1],i=r[3*t+2],A=e[3*t],T=e[3*t+1],s=e[3*t+2];E+=n===o||A<T?1:0,E+=_===o||T<s?1:0,E+=i===o||s<A?1:0}const _=new Int32Array(4*E);let i=0;for(let t=0;t<n;t++){const n=r[3*t],E=r[3*t+1],A=r[3*t+2],T=e[3*t],s=e[3*t+1],R=e[3*t+2];(n===o||T<s)&&(_[i++]=T,_[i++]=s,_[i++]=t,_[i++]=n),(E===o||s<R)&&(_[i++]=s,_[i++]=R,_[i++]=t,_[i++]=E),(A===o||R<T)&&(_[i++]=R,_[i++]=T,_[i++]=t,_[i++]=A)}return _}(t),P=U.length/4,d=n.allocate(P);let F=0;const G=P,B=e.allocate(G);let g=0,m=0,p=0;const H=(0,r.ik)(0,P),y=new Float32Array(P);y.forEach(((t,n,e)=>{A.getVec(U[4*n],M),A.getVec(U[4*n+1],l),e[n]=(0,_.p)(M,l)})),H.sort(((t,n)=>y[n]-y[t]));const w=new Array,b=new Array;for(let t=0;t<P;t++){const r=H[t],E=y[r],i=U[4*r],u=U[4*r+1],a=U[4*r+2],S=U[4*r+3],O=S===o;if(A.getVec(i,M),A.getVec(u,l),O)(0,_.s)(L,D[3*a],D[3*a+1],D[3*a+2]),(0,_.c)(h,L),C.componentIndex=T.get(i),C.cosAngle=(0,_.j)(L,h);else{if((0,_.s)(L,D[3*a],D[3*a+1],D[3*a+2]),(0,_.s)(h,D[3*S],D[3*S+1],D[3*S+2]),C.componentIndex=T.get(i),C.cosAngle=(0,_.j)(L,h),N(C,f))continue;C.cosAngle<-.9999&&(0,_.c)(h,L)}m+=E,p++,O||R(C,I)?(n.write(d,F++,C),w.push(E)):c(C,s)&&(e.write(B,g++,C),b.push(E))}const V=new Float32Array(w.reverse()),v=new Float32Array(b.reverse());return{regular:{instancesData:n.trim(d,F),lodInfo:{lengths:V}},silhouette:{instancesData:e.trim(B,g),lodInfo:{lengths:v}},averageEdgeLength:m/p}}function R(t,n){return t.cosAngle<n}function N(t,n){return t.cosAngle>n}function c(t,n){const e=(0,E.Uj)(t.cosAngle),r=a.fwd,i=a.ortho;return(0,_.D)(r,t.position1,t.position0),e*((0,_.j)((0,_.b)(i,t.faceNormal0,t.faceNormal1),r)>0?-1:1)>n}function u(t){const n=t.faces.length/3,e=t.vertices.position,r=t.faces,E=S.v0,i=S.v1,o=S.v2,A=new Float32Array(3*n);for(let t=0;t<n;t++){const n=r[3*t],T=r[3*t+1],s=r[3*t+2];e.getVec(n,E),e.getVec(T,i),e.getVec(s,o),(0,_.f)(i,i,E),(0,_.f)(o,o,E),(0,_.b)(E,i,o),(0,_.n)(E,E),A[3*t]=E[0],A[3*t+1]=E[1],A[3*t+2]=E[2]}return A}(T=A||(A={}))[T.SOLID=0]="SOLID",T[T.SKETCH=1]="SKETCH";const a={edge:{position0:(0,i.Su)(),position1:(0,i.Su)(),faceNormal0:(0,i.Su)(),faceNormal1:(0,i.Su)(),componentIndex:0,cosAngle:0},ortho:(0,i.Su)(),fwd:(0,i.Su)()},S={v0:(0,i.Su)(),v1:(0,i.Su)(),v2:(0,i.Su)()},O={anglePlanar:4,angleSignificantEdge:35}},75980:(t,n,e)=>{e.d(n,{Aj:()=>d,or:()=>p,In:()=>F,qu:()=>m});var r=e(77080);function E(t,n,e){const r=n/3,E=new Uint32Array(e+1),_=new Uint32Array(e+1),i=(t,n)=>{t<n?E[t+1]++:_[n+1]++};for(let n=0;n<r;n++){const e=t[3*n],r=t[3*n+1],E=t[3*n+2];i(e,r),i(r,E),i(E,e)}let o=0,A=0;for(let t=0;t<e;t++){const n=E[t+1],e=_[t+1];E[t+1]=o,_[t+1]=A,o+=n,A+=e}const T=new Uint32Array(6*r),s=E[e],R=(t,n,e)=>{if(t<n){const r=E[t+1]++;T[2*r]=n,T[2*r+1]=e}else{const r=_[n+1]++;T[2*s+2*r]=t,T[2*s+2*r+1]=e}};for(let n=0;n<r;n++){const e=t[3*n],r=t[3*n+1],E=t[3*n+2];R(e,r,n),R(r,E,n),R(E,e,n)}const N=(t,n)=>{const e=2*t,r=n-t;for(let t=1;t<r;t++){const n=T[e+2*t],r=T[e+2*t+1];let E=t-1;for(;E>=0&&T[e+2*E]>n;E--)T[e+2*E+2]=T[e+2*E],T[e+2*E+3]=T[e+2*E+1];T[e+2*E+2]=n,T[e+2*E+3]=r}};for(let t=0;t<e;t++)N(E[t],E[t+1]),N(s+_[t],s+_[t+1]);const c=new Int32Array(3*r),u=(n,e)=>n===t[3*e]?0:n===t[3*e+1]?1:n===t[3*e+2]?2:-1,a=(t,n)=>{const e=u(t,n);c[3*n+e]=-1},S=(t,n,e,r)=>{const E=u(t,n);c[3*n+E]=r;const _=u(e,r);c[3*r+_]=n};for(let t=0;t<e;t++){let n=E[t];const e=E[t+1];let r=_[t];const i=_[t+1];for(;n<e&&r<i;){const e=T[2*n],E=T[2*s+2*r];e===E?(S(t,T[2*n+1],E,T[2*s+2*r+1]),n++,r++):e<E?(a(t,T[2*n+1]),n++):(a(E,T[2*s+2*r+1]),r++)}for(;n<e;)a(t,T[2*n+1]),n++;for(;r<i;)a(T[2*s+2*r],T[2*s+2*r+1]),r++}return c}var _=e(72364),i=e(4636),o=e(80036),A=e(72052),T=e(98472),s=e(62484),R=e(73440),N=e(53648);function c(t,n,e,r,E,_=2){const i=1/(Math.abs(e)+Math.abs(r)+Math.abs(E)),o=e*i,A=r*i,T=E<=0?(o>=0?1:-1)*(1-Math.abs(A)):o,s=E<=0?(A>=0?1:-1)*(1-Math.abs(o)):A,R=n*_;t[R]=u(T),t[R+1]=u(s)}function u(t){return(0,N.qk)(Math.round(32767*t),-32767,32767)}e(92896);class a{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?C:f}write(t,n,e){const r=this._edgeHashFunction(e);U.seed=r;const E=U.getIntRange(0,255),_=U.getIntRange(0,this.settings.variants-1),i=U.getFloat(),o=255*(.5*function(t,n){const e=t<0?-1:1;return Math.abs(t)**1.2*e}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(n,e.position0),t.position1.setVec(n,e.position1),t.componentIndex.set(n,e.componentIndex),t.variantOffset.set(n,E),t.variantStroke.set(n,_),t.variantExtension.set(n,o)}trim(t,n){return t.slice(0,n)}}const S=new Float32Array(6),O=new Uint32Array(S.buffer),I=new Uint32Array(1);function f(t){const n=S;n[0]=t.position0[0],n[1]=t.position0[1],n[2]=t.position0[2],n[3]=t.position1[0],n[4]=t.position1[1],n[5]=t.position1[2],I[0]=5381;for(let t=0;t<O.length;t++)I[0]=31*I[0]+O[t];return I[0]}function C(t){const n=S;n[0]=l(t.position0[0]),n[1]=l(t.position0[1]),n[2]=l(t.position0[2]),n[3]=l(t.position1[0]),n[4]=l(t.position1[1]),n[5]=l(t.position1[2]),I[0]=5381;for(let t=0;t<O.length;t++)I[0]=31*I[0]+O[t];return I[0]}const M=1e4;function l(t){return Math.round(t*M)/M}class L{constructor(){this._commonWriter=new a}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return o.sn.createBuffer(t)}write(t,n,e){this._commonWriter.write(t,n,e),(0,T.g)(D,e.faceNormal0,e.faceNormal1),(0,T.n)(D,D);const{typedBuffer:r,typedBufferStride:E}=t.normalCompressed;c(r,n,D[0],D[1],D[2],E)}trim(t,n){return this._commonWriter.trim(t,n)}}L.Layout=o.sn,L.glLayout=(0,R.W)(o.sn,1);class h{constructor(){this._commonWriter=new a}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return o.wj.createBuffer(t)}write(t,n,e){this._commonWriter.write(t,n,e);{const{typedBuffer:r,typedBufferStride:E}=t.normalCompressed;c(r,n,e.faceNormal0[0],e.faceNormal0[1],e.faceNormal0[2],E)}{const{typedBuffer:r,typedBufferStride:E}=t.normal2Compressed;c(r,n,e.faceNormal1[0],e.faceNormal1[1],e.faceNormal1[2],E)}}trim(t,n){return this._commonWriter.trim(t,n)}}h.Layout=o.wj,h.glLayout=(0,R.W)(o.wj,1);const D=(0,s.Su)(),U=new A.c;var P=e(79968);function d(t){const n=F(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return B.updateSettings(t.writerSettings),g.updateSettings(t.writerSettings),(0,P.k)(n,B,g)}function F(t,n,e,_){if(n){const n=E(e,_,t.count);return new G(e,_,n,t)}const i=(0,r.g)(t.buffer,t.stride/4,{originalIndices:e,originalIndicesLength:_}),A=E(i.indices,_,i.uniqueCount);return{faces:i.indices,facesLength:i.indices.length,neighbors:A,vertices:o.If.createView(i.buffer)}}class G{constructor(t,n,e,r){this.faces=t,this.facesLength=n,this.neighbors=e,this.vertices=r}}const B=new L,g=new h,m=(0,_.iC)().vec3f(i.K.POSITION0).vec3f(i.K.POSITION1),p=(0,_.iC)().vec3f(i.K.POSITION0).vec3f(i.K.POSITION1).u16(i.K.COMPONENTINDEX)},91811:(t,n,e)=>{e.d(n,{q:()=>r});class r{constructor(t,n,e,r,E,_=!1,i=0){this.name=t,this.count=n,this.type=e,this.offset=r,this.stride=E,this.normalized=_,this.divisor=i}}},77800:(t,n,e)=>{var r,E,_,i,o,A,T,s,R,N,c,u,a,S,O,I,f,C,M,l,L,h,D;e.d(n,{Ck:()=>s,GE:()=>U,Gs:()=>M,Id:()=>S,K:()=>o,OK:()=>I,QD:()=>N,Qb:()=>f,Qx:()=>h,Qz:()=>u,SC:()=>A,UV:()=>O,Ud:()=>c,Uf:()=>E,YT:()=>i,_m:()=>C,c5:()=>a,et:()=>R,kl:()=>l,sl:()=>r,sr:()=>P,vs:()=>T,w$:()=>_,y4:()=>L}),function(t){t[t.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",t[t.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",t[t.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT"}(r||(r={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(E||(E={})),function(t){t[t.ZERO=0]="ZERO",t[t.ONE=1]="ONE",t[t.SRC_COLOR=768]="SRC_COLOR",t[t.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",t[t.SRC_ALPHA=770]="SRC_ALPHA",t[t.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",t[t.DST_ALPHA=772]="DST_ALPHA",t[t.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",t[t.DST_COLOR=774]="DST_COLOR",t[t.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",t[t.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",t[t.CONSTANT_COLOR=32769]="CONSTANT_COLOR",t[t.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",t[t.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",t[t.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"}(_||(_={})),function(t){t[t.ADD=32774]="ADD",t[t.MIN=32775]="MIN",t[t.MAX=32776]="MAX",t[t.SUBTRACT=32778]="SUBTRACT",t[t.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(i||(i={})),function(t){t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",t[t.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",t[t.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",t[t.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",t[t.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER",t[t.TRANSFORM_FEEDBACK_BUFFER=35982]="TRANSFORM_FEEDBACK_BUFFER"}(o||(o={})),function(t){t[t.FRONT=1028]="FRONT",t[t.BACK=1029]="BACK",t[t.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(A||(A={})),function(t){t[t.CW=2304]="CW",t[t.CCW=2305]="CCW"}(T||(T={})),function(t){t[t.BYTE=5120]="BYTE",t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.SHORT=5122]="SHORT",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.INT=5124]="INT",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.FLOAT=5126]="FLOAT"}(s||(s={})),function(t){t[t.NEVER=512]="NEVER",t[t.LESS=513]="LESS",t[t.EQUAL=514]="EQUAL",t[t.LEQUAL=515]="LEQUAL",t[t.GREATER=516]="GREATER",t[t.NOTEQUAL=517]="NOTEQUAL",t[t.GEQUAL=518]="GEQUAL",t[t.ALWAYS=519]="ALWAYS"}(R||(R={})),function(t){t[t.ZERO=0]="ZERO",t[t.KEEP=7680]="KEEP",t[t.REPLACE=7681]="REPLACE",t[t.INCR=7682]="INCR",t[t.DECR=7683]="DECR",t[t.INVERT=5386]="INVERT",t[t.INCR_WRAP=34055]="INCR_WRAP",t[t.DECR_WRAP=34056]="DECR_WRAP"}(N||(N={})),function(t){t[t.NEAREST=9728]="NEAREST",t[t.LINEAR=9729]="LINEAR",t[t.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",t[t.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",t[t.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",t[t.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(c||(c={})),function(t){t[t.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(u||(u={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_3D=32879]="TEXTURE_3D",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"}(a||(a={})),function(t){t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL",t[t.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",t[t.ALPHA=6406]="ALPHA",t[t.RGB=6407]="RGB",t[t.RGBA=6408]="RGBA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.RED=6403]="RED",t[t.RG=33319]="RG",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER"}(S||(S={})),function(t){t[t.RGBA4=32854]="RGBA4",t[t.R16F=33325]="R16F",t[t.RG16F=33327]="RG16F",t[t.RGB32F=34837]="RGB32F",t[t.RGBA16F=34842]="RGBA16F",t[t.R32F=33326]="R32F",t[t.RG32F=33328]="RG32F",t[t.RGBA32F=34836]="RGBA32F",t[t.R11F_G11F_B10F=35898]="R11F_G11F_B10F",t[t.RGB8=32849]="RGB8",t[t.RGBA8=32856]="RGBA8",t[t.RGB5_A1=32855]="RGB5_A1",t[t.R8=33321]="R8",t[t.RG8=33323]="RG8",t[t.R8I=33329]="R8I",t[t.R8UI=33330]="R8UI",t[t.R16I=33331]="R16I",t[t.R16UI=33332]="R16UI",t[t.R32I=33333]="R32I",t[t.R32UI=33334]="R32UI",t[t.RG8I=33335]="RG8I",t[t.RG8UI=33336]="RG8UI",t[t.RG16I=33337]="RG16I",t[t.RG16UI=33338]="RG16UI",t[t.RG32I=33339]="RG32I",t[t.RG32UI=33340]="RG32UI",t[t.RGB16F=34843]="RGB16F",t[t.RGB9_E5=35901]="RGB9_E5",t[t.SRGB8=35905]="SRGB8",t[t.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",t[t.RGB565=36194]="RGB565",t[t.RGBA32UI=36208]="RGBA32UI",t[t.RGB32UI=36209]="RGB32UI",t[t.RGBA16UI=36214]="RGBA16UI",t[t.RGB16UI=36215]="RGB16UI",t[t.RGBA8UI=36220]="RGBA8UI",t[t.RGB8UI=36221]="RGB8UI",t[t.RGBA32I=36226]="RGBA32I",t[t.RGB32I=36227]="RGB32I",t[t.RGBA16I=36232]="RGBA16I",t[t.RGB16I=36233]="RGB16I",t[t.RGBA8I=36238]="RGBA8I",t[t.RGB8I=36239]="RGB8I",t[t.R8_SNORM=36756]="R8_SNORM",t[t.RG8_SNORM=36757]="RG8_SNORM",t[t.RGB8_SNORM=36758]="RGB8_SNORM",t[t.RGBA8_SNORM=36759]="RGBA8_SNORM",t[t.RGB10_A2=32857]="RGB10_A2",t[t.RGB10_A2UI=36975]="RGB10_A2UI"}(O||(O={})),function(t){t[t.FLOAT=5126]="FLOAT",t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.BYTE=5120]="BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.SHORT=5122]="SHORT",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.INT=5124]="INT",t[t.HALF_FLOAT=5131]="HALF_FLOAT",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"}(I||(I={})),function(t){t[t.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",t[t.STENCIL_INDEX8=36168]="STENCIL_INDEX8",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL",t[t.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",t[t.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",t[t.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",t[t.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8"}(f||(f={})),function(t){t[t.STATIC_DRAW=35044]="STATIC_DRAW",t[t.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",t[t.STREAM_DRAW=35040]="STREAM_DRAW",t[t.STATIC_READ=35045]="STATIC_READ",t[t.DYNAMIC_READ=35049]="DYNAMIC_READ",t[t.STREAM_READ=35041]="STREAM_READ",t[t.STATIC_COPY=35046]="STATIC_COPY",t[t.DYNAMIC_COPY=35050]="DYNAMIC_COPY",t[t.STREAM_COPY=35042]="STREAM_COPY"}(C||(C={})),function(t){t[t.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",t[t.VERTEX_SHADER=35633]="VERTEX_SHADER"}(M||(M={})),function(t){t[t.FRAMEBUFFER=36160]="FRAMEBUFFER",t[t.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",t[t.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(l||(l={})),function(t){t[t.Texture=0]="Texture",t[t.BufferObject=1]="BufferObject",t[t.VertexArrayObject=2]="VertexArrayObject",t[t.Shader=3]="Shader",t[t.Program=4]="Program",t[t.FramebufferObject=5]="FramebufferObject",t[t.Renderbuffer=6]="Renderbuffer",t[t.TransformFeedback=7]="TransformFeedback",t[t.Sync=8]="Sync",t[t.UNCOUNTED=9]="UNCOUNTED",t[t.LinesOfCode=9]="LinesOfCode",t[t.Uniform=10]="Uniform",t[t.COUNT=11]="COUNT"}(L||(L={})),function(t){t[t.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",t[t.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",t[t.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",t[t.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",t[t.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",t[t.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",t[t.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",t[t.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",t[t.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",t[t.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",t[t.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",t[t.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",t[t.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",t[t.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",t[t.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",t[t.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"}(h||(h={})),function(t){t[t.NONE=0]="NONE",t[t.BACK=1029]="BACK"}(D||(D={}));const U=33306;var P,d,F,G,B,g,m;!function(t){t[t.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",t[t.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",t[t.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",t[t.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",t[t.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",t[t.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",t[t.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",t[t.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",t[t.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",t[t.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",t[t.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"}(P||(P={})),function(t){t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_VEC2=35664]="FLOAT_VEC2",t[t.FLOAT_VEC3=35665]="FLOAT_VEC3",t[t.FLOAT_VEC4=35666]="FLOAT_VEC4",t[t.INT=5124]="INT",t[t.INT_VEC2=35667]="INT_VEC2",t[t.INT_VEC3=35668]="INT_VEC3",t[t.INT_VEC4=35669]="INT_VEC4",t[t.BOOL=35670]="BOOL",t[t.BOOL_VEC2=35671]="BOOL_VEC2",t[t.BOOL_VEC3=35672]="BOOL_VEC3",t[t.BOOL_VEC4=35673]="BOOL_VEC4",t[t.FLOAT_MAT2=35674]="FLOAT_MAT2",t[t.FLOAT_MAT3=35675]="FLOAT_MAT3",t[t.FLOAT_MAT4=35676]="FLOAT_MAT4",t[t.SAMPLER_2D=35678]="SAMPLER_2D",t[t.SAMPLER_CUBE=35680]="SAMPLER_CUBE",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",t[t.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",t[t.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",t[t.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",t[t.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",t[t.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",t[t.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",t[t.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",t[t.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",t[t.SAMPLER_3D=35679]="SAMPLER_3D",t[t.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",t[t.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",t[t.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",t[t.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",t[t.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",t[t.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",t[t.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",t[t.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",t[t.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",t[t.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",t[t.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",t[t.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"}(d||(d={})),function(t){t[t.OBJECT_TYPE=37138]="OBJECT_TYPE",t[t.SYNC_CONDITION=37139]="SYNC_CONDITION",t[t.SYNC_STATUS=37140]="SYNC_STATUS",t[t.SYNC_FLAGS=37141]="SYNC_FLAGS"}(F||(F={})),function(t){t[t.UNSIGNALED=37144]="UNSIGNALED",t[t.SIGNALED=37145]="SIGNALED"}(G||(G={})),function(t){t[t.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",t[t.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",t[t.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",t[t.WAIT_FAILED=37149]="WAIT_FAILED"}(B||(B={})),function(t){t[t.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(g||(g={})),function(t){t[t.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(m||(m={}))}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9944],{98472:(t,n,e)=>{e.d(n,{A:()=>c,B:()=>M,C:()=>O,D:()=>S,G:()=>f,a:()=>p,b:()=>v,c:()=>o,e:()=>V,f:()=>l,g:()=>u,h:()=>g,i:()=>A,j:()=>y,k:()=>B,l:()=>a,m:()=>q,n:()=>b,o:()=>w,p:()=>k,q:()=>x,r:()=>I,s:()=>s,t:()=>U,u:()=>h,v:()=>Y,w:()=>T,x:()=>d,y:()=>E,z:()=>m});var r=e(62484),i=e(47364);function a(t){const n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function s(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function u(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function l(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function c(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function f(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function h(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function m(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function d(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function M(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function g(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function x(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t}function k(t,n){const e=n[0]-t[0],r=n[1]-t[1],i=n[2]-t[2];return Math.sqrt(e*e+r*r+i*i)}function p(t,n){const e=n[0]-t[0],r=n[1]-t[1],i=n[2]-t[2];return e*e+r*r+i*i}function w(t){const n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function b(t,n){const e=n[0],r=n[1],i=n[2];let a=e*e+r*r+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a),t}function y(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function v(t,n,e){const r=n[0],i=n[1],a=n[2],o=e[0],s=e[1],u=e[2];return t[0]=i*u-a*s,t[1]=a*o-r*u,t[2]=r*s-i*o,t}function B(t,n,e,r){const i=n[0],a=n[1],o=n[2];return t[0]=i+r*(e[0]-i),t[1]=a+r*(e[1]-a),t[2]=o+r*(e[2]-o),t}function V(t,n,e){const r=n[0],i=n[1],a=n[2];return t[0]=e[0]*r+e[4]*i+e[8]*a+e[12],t[1]=e[1]*r+e[5]*i+e[9]*a+e[13],t[2]=e[2]*r+e[6]*i+e[10]*a+e[14],t}function U(t,n,e){const r=n[0],i=n[1],a=n[2];return t[0]=r*e[0]+i*e[3]+a*e[6],t[1]=r*e[1]+i*e[4]+a*e[7],t[2]=r*e[2]+i*e[5]+a*e[8],t}function I(t,n,e){const r=e[0],i=e[1],a=e[2],o=e[3],s=n[0],u=n[1],l=n[2],c=i*l-a*u,f=a*s-r*l,h=r*u-i*s,m=i*h-a*f,d=a*c-r*h,M=r*f-i*c,g=2*o;return t[0]=s+c*g+2*m,t[1]=u+f*g+2*d,t[2]=l+h*g+2*M,t}const D=(0,r.Su)(),P=(0,r.Su)();function A(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function S(t,n,e){const r=e[0]-n[0],i=e[1]-n[1],a=e[2]-n[2];let o=r*r+i*i+a*a;return o>0?(o=1/Math.sqrt(o),t[0]=r*o,t[1]=i*o,t[2]=a*o,t):(t[0]=0,t[1]=0,t[2]=0,t)}const E=l,_=c,F=f,q=k,Y=p,O=a,T=w;Object.freeze(Object.defineProperty({__proto__:null,abs:h,add:u,angle:function(t,n){b(D,t),b(P,n);const e=y(D,P);return e>1?0:e<-1?Math.PI:Math.acos(e)},bezier:function(t,n,e,r,i,a){const o=1-a,s=o*o,u=a*a,l=s*o,c=3*a*s,f=3*u*o,h=u*a;return t[0]=n[0]*l+e[0]*c+r[0]*f+i[0]*h,t[1]=n[1]*l+e[1]*c+r[1]*f+i[1]*h,t[2]=n[2]*l+e[2]*c+r[2]*f+i[2]*h,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},copy:o,cross:v,direction:S,dist:q,distance:k,div:F,divide:f,dot:y,equals:function(t,n){if(t===n)return!0;const e=t[0],r=t[1],a=t[2],o=n[0],s=n[1],u=n[2],l=(0,i.Au)();return Math.abs(e-o)<=l*Math.max(1,Math.abs(e),Math.abs(o))&&Math.abs(r-s)<=l*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-u)<=l*Math.max(1,Math.abs(a),Math.abs(u))},exactEquals:A,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,e,r,i,a){const o=a*a,s=o*(2*a-3)+1,u=o*(a-2)+a,l=o*(a-1),c=o*(3-2*a);return t[0]=n[0]*s+e[0]*u+r[0]*l+i[0]*c,t[1]=n[1]*s+e[1]*u+r[1]*l+i[1]*c,t[2]=n[2]*s+e[2]*u+r[2]*l+i[2]*c,t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t},len:O,length:a,lerp:B,max:M,min:d,mul:_,multiply:c,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t},normalize:b,random:function(t,n){n=n||1;const e=i.QR,r=2*e()*Math.PI,a=2*e()-1,o=Math.sqrt(1-a*a)*n;return t[0]=Math.cos(r)*o,t[1]=Math.sin(r)*o,t[2]=a*n,t},rotateX:function(t,n,e,r){const i=[],a=[];return i[0]=n[0]-e[0],i[1]=n[1]-e[1],i[2]=n[2]-e[2],a[0]=i[0],a[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),a[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},rotateY:function(t,n,e,r){const i=[],a=[];return i[0]=n[0]-e[0],i[1]=n[1]-e[1],i[2]=n[2]-e[2],a[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),a[1]=i[1],a[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},rotateZ:function(t,n,e,r){const i=[],a=[];return i[0]=n[0]-e[0],i[1]=n[1]-e[1],i[2]=n[2]-e[2],a[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),a[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),a[2]=i[2],t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:g,scaleAndAdd:x,set:s,sign:m,sqrDist:Y,sqrLen:T,squaredDistance:p,squaredLength:w,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:E,subtract:l,transformMat3:U,transformMat4:V,transformQuat:I},Symbol.toStringTag,{value:"Module"}))},62484:(t,n,e)=>{function r(){return[0,0,0]}function i(t){return[t[0],t[1],t[2]]}function a(t,n,e){return[t,n,e]}function o(t,n=[0,0,0]){const e=Math.min(3,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n}function s(){return a(1,1,1)}function u(){return a(1,0,0)}function l(){return a(0,1,0)}function c(){return a(0,0,1)}e.d(n,{IR:()=>d,Qw:()=>h,Su:()=>r,UV:()=>m,WK:()=>a,cX:()=>f,ct:()=>i,eu:()=>o,wx:()=>M});const f=[0,0,0],h=s(),m=u(),d=l(),M=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:m,UNIT_Y:d,UNIT_Z:M,ZEROS:f,clone:i,create:r,createView:function(t,n){return new Float64Array(t,n,3)},fromArray:o,fromValues:a,ones:s,unitX:u,unitY:l,unitZ:c,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},47364:(t,n,e)=>{e.d(n,{Af:()=>u,Au:()=>i,QR:()=>a,Yf:()=>l});let r=1e-6;function i(){return r}const a=Math.random,o=Math.PI/180,s=180/Math.PI;function u(t){return t*o}function l(t){return t*s}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:a,equals:function(t,n){return Math.abs(t-n)<=r*Math.max(1,Math.abs(t),Math.abs(n))},getEpsilon:i,setEpsilon:function(t){r=t},toDegree:l,toRadian:u},Symbol.toStringTag,{value:"Module"}))},53648:(t,n,e)=>{e.d(n,{Cq:()=>s,EF:()=>l,Iv:()=>k,SE:()=>w,UB:()=>c,Uj:()=>f,aU:()=>u,gJ:()=>g,gP:()=>m,ig:()=>p,qk:()=>o,sj:()=>h,w7:()=>a});var r=e(98472);const i=new Float32Array(1);function a(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function o(t,n,e){return Math.min(Math.max(t,n),e)}function s(t,n,e){return t+(n-t)*e}function u(t,n,e,r,i){return s(r,i,(t-n)/(e-n))}function l(t){return t*Math.PI/180}function c(t){return 180*t/Math.PI}function f(t){return Math.acos(o(t,-1,1))}function h(t){return Math.asin(o(t,-1,1))}function m(t,n,e=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=e}const d=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));const M=BigInt("1000000");function g(t){return x(Math.max(-w,Math.min(t,w)))}function x(t){return i[0]=t,i[0]}function k(t,n){const e=(0,r.l)(t),i=h(t[2]/e),a=Math.atan2(t[1]/e,t[0]/e);return(0,r.s)(n,e,i,a),n}function p(t){const n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],e=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(m(n,1)&&m(e,1)&&m(r,1))}!function(t){const n=function(t){return d.setFloat64(0,t),d.getBigInt64(0)}(t=Math.abs(t)),e=function(t){return d.setBigInt64(0,t),d.getFloat64(0)}(n<=M?M:n-M);Math.abs(t-e)}(1);const w=x(34028234663852886e22)},69944:(t,n,e)=>{e.r(n),e.d(n,{default:()=>h});var r=e(53648),i={};i.defaultNoDataValue=(0,r.gJ)(-1/0),i.decode=function(t,n){var e=(n=n||{}).encodedMaskData||null===n.encodedMaskData,l=u(t,n.inputOffset||0,e),c=null!=n.noDataValue?(0,r.gJ)(n.noDataValue):i.defaultNoDataValue,f=a(l,n.pixelType||Float32Array,n.encodedMaskData,c,n.returnMask),h={width:l.width,height:l.height,pixelData:f.resultPixels,minValue:l.pixels.minValue,maxValue:l.pixels.maxValue,noDataValue:c};return f.resultMask&&(h.maskData=f.resultMask),n.returnEncodedMask&&l.mask&&(h.encodedMaskData=l.mask.bitset?l.mask.bitset:null),n.returnFileInfo&&(h.fileInfo=o(l,c),n.computeUsedBitDepths&&(h.fileInfo.bitDepths=s(l))),h};var a=function(t,n,e,r,i){var a,o,s=0,u=t.pixels.numBlocksX,c=t.pixels.numBlocksY,f=Math.floor(t.width/u),h=Math.floor(t.height/c),m=2*t.maxZError;e=e||(t.mask?t.mask.bitset:null),a=new n(t.width*t.height),i&&e&&(o=new Uint8Array(t.width*t.height));for(var d,M,g=new Float32Array(f*h),x=0;x<=c;x++){var k=x!==c?h:t.height%c;if(0!==k)for(var p=0;p<=u;p++){var w=p!==u?f:t.width%u;if(0!==w){var b,y,v,B,V=x*t.width*h+p*f,U=t.width-w,I=t.pixels.blocks[s];if(I.encoding<2?(0===I.encoding?b=I.rawData:(l(I.stuffedData,I.bitsPerPixel,I.numValidPixels,I.offset,m,g,t.pixels.maxValue),b=g),y=0):v=2===I.encoding?0:I.offset,e)for(M=0;M<k;M++){for(7&V&&(B=e[V>>3],B<<=7&V),d=0;d<w;d++)7&V||(B=e[V>>3]),128&B?(o&&(o[V]=1),a[V++]=I.encoding<2?b[y++]:v):(o&&(o[V]=0),a[V++]=r),B<<=1;V+=U}else if(I.encoding<2)for(M=0;M<k;M++){for(d=0;d<w;d++)a[V++]=b[y++];V+=U}else for(M=0;M<k;M++)if(a.fill)a.fill(v,V,V+w),V+=w+U;else{for(d=0;d<w;d++)a[V++]=v;V+=U}if(1===I.encoding&&y!==I.numValidPixels)throw"Block and Mask do not match";s++}}}return{resultPixels:a,resultMask:o}},o=function(t,n){return{fileIdentifierString:t.fileIdentifierString,fileVersion:t.fileVersion,imageType:t.imageType,height:t.height,width:t.width,maxZError:t.maxZError,eofOffset:t.eofOffset,mask:t.mask?{numBlocksX:t.mask.numBlocksX,numBlocksY:t.mask.numBlocksY,numBytes:t.mask.numBytes,maxValue:t.mask.maxValue}:null,pixels:{numBlocksX:t.pixels.numBlocksX,numBlocksY:t.pixels.numBlocksY,numBytes:t.pixels.numBytes,maxValue:t.pixels.maxValue,minValue:t.pixels.minValue,noDataValue:n}}},s=function(t){for(var n=t.pixels.numBlocksX*t.pixels.numBlocksY,e={},r=0;r<n;r++){var i=t.pixels.blocks[r];0===i.encoding?e.float32=!0:1===i.encoding?e[i.bitsPerPixel]=!0:e[0]=!0}return Object.keys(e)},u=function(t,n,e){var r={},i=new Uint8Array(t,n,10);if(r.fileIdentifierString=String.fromCharCode.apply(null,i),"CntZImage"!=r.fileIdentifierString.trim())throw"Unexpected file identifier string: "+r.fileIdentifierString;n+=10;var a=new DataView(t,n,24);if(r.fileVersion=a.getInt32(0,!0),r.imageType=a.getInt32(4,!0),r.height=a.getUint32(8,!0),r.width=a.getUint32(12,!0),r.maxZError=a.getFloat64(16,!0),n+=24,!e)if(a=new DataView(t,n,16),r.mask={},r.mask.numBlocksY=a.getUint32(0,!0),r.mask.numBlocksX=a.getUint32(4,!0),r.mask.numBytes=a.getUint32(8,!0),r.mask.maxValue=a.getFloat32(12,!0),n+=16,r.mask.numBytes>0){var o=new Uint8Array(Math.ceil(r.width*r.height/8)),s=(a=new DataView(t,n,r.mask.numBytes)).getInt16(0,!0),u=2,l=0;do{if(s>0)for(;s--;)o[l++]=a.getUint8(u++);else{var c=a.getUint8(u++);for(s=-s;s--;)o[l++]=c}s=a.getInt16(u,!0),u+=2}while(u<r.mask.numBytes);if(-32768!==s||l<o.length)throw"Unexpected end of mask RLE encoding";r.mask.bitset=o,n+=r.mask.numBytes}else 0==(r.mask.numBytes|r.mask.numBlocksY|r.mask.maxValue)&&(o=new Uint8Array(Math.ceil(r.width*r.height/8)),r.mask.bitset=o);a=new DataView(t,n,16),r.pixels={},r.pixels.numBlocksY=a.getUint32(0,!0),r.pixels.numBlocksX=a.getUint32(4,!0),r.pixels.numBytes=a.getUint32(8,!0),r.pixels.maxValue=a.getFloat32(12,!0),n+=16;var f=r.pixels.numBlocksX,h=r.pixels.numBlocksY,m=f+(r.width%f>0?1:0),d=h+(r.height%h>0?1:0);r.pixels.blocks=new Array(m*d);for(var M=1e9,g=0,x=0;x<d;x++)for(var k=0;k<m;k++){var p=0,w=t.byteLength-n;a=new DataView(t,n,Math.min(10,w));var b={};r.pixels.blocks[g++]=b;var y=a.getUint8(0);if(p++,b.encoding=63&y,b.encoding>3)throw"Invalid block encoding ("+b.encoding+")";if(2!==b.encoding){if(0!==y&&2!==y){if(y>>=6,b.offsetType=y,2===y)b.offset=a.getInt8(1),p++;else if(1===y)b.offset=a.getInt16(1,!0),p+=2;else{if(0!==y)throw"Invalid block offset type";b.offset=a.getFloat32(1,!0),p+=4}if(M=Math.min(b.offset,M),1===b.encoding)if(y=a.getUint8(p),p++,b.bitsPerPixel=63&y,y>>=6,b.numValidPixelsType=y,2===y)b.numValidPixels=a.getUint8(p),p++;else if(1===y)b.numValidPixels=a.getUint16(p,!0),p+=2;else{if(0!==y)throw"Invalid valid pixel count type";b.numValidPixels=a.getUint32(p,!0),p+=4}}var v;if(n+=p,3!=b.encoding)if(0===b.encoding){var B=(r.pixels.numBytes-1)/4;if(B!==Math.floor(B))throw"uncompressed block has invalid length";v=new ArrayBuffer(4*B),new Uint8Array(v).set(new Uint8Array(t,n,4*B));for(var V=new Float32Array(v),U=0;U<V.length;U++)M=Math.min(M,V[U]);b.rawData=V,n+=4*B}else if(1===b.encoding){var I=Math.ceil(b.numValidPixels*b.bitsPerPixel/8),D=Math.ceil(I/4);v=new ArrayBuffer(4*D),new Uint8Array(v).set(new Uint8Array(t,n,I)),b.stuffedData=new Uint32Array(v),n+=I}}else n++,M=Math.min(M,0)}return r.pixels.minValue=M,r.eofOffset=n,r},l=function(t,n,e,r,i,a,o){var s,u,l,c=(1<<n)-1,f=0,h=0,m=Math.ceil((o-r)/i),d=4*t.length-Math.ceil(n*e/8);for(t[t.length-1]<<=8*d,s=0;s<e;s++){if(0===h&&(l=t[f++],h=32),h>=n)u=l>>>h-n&c,h-=n;else{var M=n-h;u=(l&c)<<M&c,u+=(l=t[f++])>>>(h=32-M)}a[s]=u<m?r+u*i:o}return a};const c=i.decode;class f{_decode(t){const n=c(t.buffer,t.options);return Promise.resolve({result:n,transferList:[n.pixelData.buffer]})}}function h(){return new f}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4716,4828],{17012:(e,t,r)=>{r.d(t,{e:()=>l});var n,o,i,a=r(8528),s={exports:{}};n=s,o=function(){function e(e,r,o){o=o||2;var i,a,s,c,u,p,f,h=r&&r.length,g=h?r[0]*o:e.length,m=t(e,0,g,o,!0),y=[];if(!m||m.next===m.prev)return y;if(h&&(m=l(e,r,m,o)),e.length>80*o){i=s=e[0],a=c=e[1];for(var d=o;d<g;d+=o)(u=e[d])<i&&(i=u),(p=e[d+1])<a&&(a=p),u>s&&(s=u),p>c&&(c=p);f=0!==(f=Math.max(s-i,c-a))?1/f:0}return n(m,y,o,i,a,f),y}function t(e,t,r,n,o){var i,a;if(o===F(e,t,r,n)>0)for(i=t;i<r;i+=n)a=S(i,e[i],e[i+1],a);else for(i=r-n;i>=t;i-=n)a=S(i,e[i],e[i+1],a);if(a&&v(a,a.next)){var s=a.next;q(a),a=s}return a}function r(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!v(n,n.next)&&0!==x(n.prev,n,n.next))n=n.next;else{var o=n.prev;if(q(n),(n=t=o)===n.next)break;r=!0}}while(r||n!==t);return t}function n(e,t,l,c,u,p,f){if(e){!f&&p&&h(e,c,u,p);for(var g,m,y=e;e.prev!==e.next;)if(g=e.prev,m=e.next,p?i(e,c,u,p):o(e))t.push(g.i/l),t.push(e.i/l),t.push(m.i/l),q(e),e=m.next,y=m.next;else if((e=m)===y){f?1===f?n(e=a(r(e),t,l),t,l,c,u,p,2):2===f&&s(e,t,l,c,u,p):n(r(e),t,l,c,u,p,1);break}}}function o(e){var t=e.prev,r=e,n=e.next;if(x(t,r,n)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(y(t.x,t.y,r.x,r.y,n.x,n.y,o.x,o.y)&&x(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function i(e,t,r,n){var o=e.prev,i=e,a=e.next;if(x(o,i,a)>=0)return!1;for(var s=o.x<i.x?o.x<a.x?o.x:a.x:i.x<a.x?i.x:a.x,l=o.y<i.y?o.y<a.y?o.y:a.y:i.y<a.y?i.y:a.y,c=o.x>i.x?o.x>a.x?o.x:a.x:i.x>a.x?i.x:a.x,u=o.y>i.y?o.y>a.y?o.y:a.y:i.y>a.y?i.y:a.y,p=g(s,l,t,r,n),f=g(c,u,t,r,n),h=e.prevZ,m=e.nextZ;h&&h.z>=p&&m&&m.z<=f;){if(h!==e.prev&&h!==e.next&&y(o.x,o.y,i.x,i.y,a.x,a.y,h.x,h.y)&&x(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,m!==e.prev&&m!==e.next&&y(o.x,o.y,i.x,i.y,a.x,a.y,m.x,m.y)&&x(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;h&&h.z>=p;){if(h!==e.prev&&h!==e.next&&y(o.x,o.y,i.x,i.y,a.x,a.y,h.x,h.y)&&x(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;m&&m.z<=f;){if(m!==e.prev&&m!==e.next&&y(o.x,o.y,i.x,i.y,a.x,a.y,m.x,m.y)&&x(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function a(e,t,n){var o=e;do{var i=o.prev,a=o.next.next;!v(i,a)&&w(i,o,o.next,a)&&_(i,a)&&_(a,i)&&(t.push(i.i/n),t.push(o.i/n),t.push(a.i/n),q(o),q(o.next),o=e=a),o=o.next}while(o!==e);return r(o)}function s(e,t,o,i,a,s){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&d(l,c)){var u=T(l,c);return l=r(l,l.next),u=r(u,u.next),n(l,t,o,i,a,s),void n(u,t,o,i,a,s)}c=c.next}l=l.next}while(l!==e)}function l(e,n,o,i){var a,s,l,u=[];for(a=0,s=n.length;a<s;a++)(l=t(e,n[a]*i,a<s-1?n[a+1]*i:e.length,i,!1))===l.next&&(l.steiner=!0),u.push(m(l));for(u.sort(c),a=0;a<u.length;a++)o=r(o=p(u[a],o),o.next);return o}function c(e,t){return e.x-t.x}function u(e){if(e.next.prev===e)return e;let t=e;for(;;){const r=t.next;if(r.prev===t||r===t||r===e)break;t=r}return t}function p(e,t){var n=function(e,t){var r,n=t,o=e.x,i=e.y,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=o&&s>a){if(a=s,s===o){if(i===n.y)return n;if(i===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!r)return null;if(o===a)return r;var l,c=r,u=r.x,p=r.y,h=1/0;n=r;do{o>=n.x&&n.x>=u&&o!==n.x&&y(i<p?o:a,i,u,p,i<p?a:o,i,n.x,n.y)&&(l=Math.abs(i-n.y)/(o-n.x),_(n,e)&&(l<h||l===h&&(n.x>r.x||n.x===r.x&&f(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(e,t);if(!n)return t;var o=T(n,e),i=r(n,n.next);let a=u(o);return r(a,a.next),i=u(i),u(t===n?i:t)}function f(e,t){return x(e.prev,e,t.prev)<0&&x(t.next,e,e.next)<0}function h(e,t,r,n){var o=e;do{null===o.z&&(o.z=g(o.x,o.y,t,r,n)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,r,n,o,i,a,s,l,c=1;do{for(r=e,e=null,i=null,a=0;r;){for(a++,n=r,s=0,t=0;t<c&&(s++,n=n.nextZ);t++);for(l=c;s>0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(o=r,r=r.nextZ,s--):(o=n,n=n.nextZ,l--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;r=n}i.nextZ=null,c*=2}while(a>1)}(o)}function g(e,t,r,n,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function m(e){var t=e,r=e;do{(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next}while(t!==e);return r}function y(e,t,r,n,o,i,a,s){return(o-a)*(t-s)-(e-a)*(i-s)>=0&&(e-a)*(n-s)-(r-a)*(t-s)>=0&&(r-a)*(i-s)-(o-a)*(n-s)>=0}function d(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&w(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(_(e,t)&&_(t,e)&&function(e,t){var r=e,n=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&o<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(x(e.prev,e,t.prev)||x(e,t.prev,t))||v(e,t)&&x(e.prev,e,e.next)>0&&x(t.prev,t,t.next)>0)}function x(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,r,n){var o=b(x(e,t,r)),i=b(x(e,t,n)),a=b(x(r,n,e)),s=b(x(r,n,t));return o!==i&&a!==s||!(0!==o||!A(e,r,t))||!(0!==i||!A(e,n,t))||!(0!==a||!A(r,e,n))||!(0!==s||!A(r,t,n))}function A(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function b(e){return e>0?1:e<0?-1:0}function _(e,t){return x(e.prev,e,e.next)<0?x(e,t,e.next)>=0&&x(e,e.prev,t)>=0:x(e,t,e.prev)<0||x(e,e.next,t)<0}function T(e,t){var r=new M(e.i,e.x,e.y),n=new M(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=o,o.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function S(e,t,r,n){var o=new M(e,t,r);return n?(o.next=n.next,o.prev=n,n.next.prev=o,n.next=o):(o.prev=o,o.next=o),o}function q(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function M(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function F(e,t,r,n){for(var o=0,i=t,a=r-n;i<r;i+=n)o+=(e[a]-e[i])*(e[i+1]+e[a+1]),a=i;return o}return e.deviation=function(e,t,r,n){var o=t&&t.length,i=o?t[0]*r:e.length,a=Math.abs(F(e,0,i,r));if(o)for(var s=0,l=t.length;s<l;s++){var c=t[s]*r,u=s<l-1?t[s+1]*r:e.length;a-=Math.abs(F(e,c,u,r))}var p=0;for(s=0;s<n.length;s+=3){var f=n[s]*r,h=n[s+1]*r,g=n[s+2]*r;p+=Math.abs((e[f]-e[g])*(e[h+1]-e[f+1])-(e[f]-e[h])*(e[g+1]-e[f+1]))}return 0===a&&0===p?0:Math.abs((p-a)/a)},e.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,o=0;o<e.length;o++){for(var i=0;i<e[o].length;i++)for(var a=0;a<t;a++)r.vertices.push(e[o][i][a]);o>0&&(n+=e[o-1].length,r.holes.push(n))}return r},e},void 0!==(i=o())&&(n.exports=i);const l=(0,a.g)(s.exports)},63316:(e,t,r)=>{r.d(t,{AD:()=>p,wV:()=>u});var n=r(2600),o=r(20744),i=r(10860),a=r(28176),s=r(49416);let l=null,c=!0;function u(e,t,r,n){if(!t||!r)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(e,t,r)}catch(e){c=!1}const o=function(e,t,r){return r||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),r=l),r.getContext("2d").createImageData(e,t)}(t,r,n);return o.data.set(e,0),o}async function p(e,t){const{arrayBuffer:l,mediaType:c}=await async function(e,t){const r=(0,a.nV)(e);if(r?.isBase64)return{arrayBuffer:(0,s.K)(r.data),mediaType:r.mediaType};const o=await(0,n.c)(e,{responseType:"array-buffer",...t});return{arrayBuffer:o.data,mediaType:o.getHeader?.("Content-Type")??""}}(e,t),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:e,parseGif:n}=await r.e(8560).then(r.bind(r,68560));if(e(l))return n(l,t)}if(u){const{isAnimatedPNG:e,parseApng:n}=await r.e(4464).then(r.bind(r,84464));if(e(l))return n(l,t)}return async function(e,t){const r=window.URL.createObjectURL(e);try{const{data:e}=await(0,n.c)(r,{...t,responseType:"image"});return e}catch(e){if(!(0,i.mA)(e))throw new o.c("invalid-image",`Could not fetch requested image at ${r}`);throw e}finally{window.URL.revokeObjectURL(r)}}(new Blob([l],{type:c}),t)}},94716:(e,t,r)=>{r.d(t,{c:()=>Ze});var n=r(41948),o=r(26832),i=r(20744),a=r(95800),s=r(66360),l=r(94804),c=r(10860),u=r(57896),p=r(1580),f=(r(9456),r(72052),r(12552)),h=r(62484),g=r(95247),m=r(50853),y=r(67776),d=r(7488),x=r(66952),v=r(43912);const w="Expected location to be a Point instance";class A extends i.c{constructor(){super("invalid-input:location",w)}}var b=r(51232),_=r(13708),T=r(41104),S=r(60003),q=r(21136),M=r(17012),F=r(82315),R=r(47452),C=r(15688),L=r(97143),j=r(77080),I=(r(60708),r(53648)),P=r(24296),k=r(98472),N=r(58632);r(89560),r(74376),r(71520),r(4636);const O=(0,N.Su)();function U(e,t,r,n,o,i,a){o*=3;for(let s=0;s<i;++s){const i=e[t];n[o++]=i[0],n[o++]=i[1],n[o++]=a?i[2]:0,t+=r}return o/3}function E(e,t,r){if(t){const t=function(e,t,r){const n=function(e,t,r,n){const o=(e=>!Array.isArray(e[0]))(t)?(e,r)=>t[3*e+r]:(e,r)=>t[e][r],i=n?(0,P.k8)(n)/(0,P.gl)(n):1;return(0,N.XX)(e,((e,t)=>(0,k.s)(e,o(t,0)*i,o(t,1)*i,o(t,2))),r)}(O,e,t,r)?(0,N.Oq)(O):[0,0,1];return Math.abs(n[2])>Math.cos((0,I.EF)(80))?F.k.Z:Math.abs(n[1])>Math.abs(n[0])?F.k.Y:F.k.X}(e,e.length-1,r);if(t===F.k.X)return!(0,R.K_)(e,F.k.Y,F.k.Z);if(t===F.k.Y)return!(0,R.K_)(e,F.k.X,F.k.Z)}return!(0,R.K_)(e,F.k.X,F.k.Y)}var W,D;(D=W||(W={}))[D.NONE=0]="NONE",D[D.CCW_IS_HOLE=1]="CCW_IS_HOLE";var z=r(77048),$=r(54828);let G=null;function Z(e){if(0===e.length)return z.UN;const t=(0,z.Su)([Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,-Number.POSITIVE_INFINITY,-Number.POSITIVE_INFINITY,-Number.POSITIVE_INFINITY]);return(0,z.qe)(t,e),t}function B(e,t){const[r,n,o,i,a,s]=Z(e);return new g.c({xmin:r,ymin:n,zmin:o,xmax:i,ymax:a,zmax:s,spatialReference:t})}var Y=r(93184),H=r(71488);const V="esri.geometry.support.meshUtils.centerAt";const K=(0,h.Su)(),X=(0,h.Su)(),Q=(0,h.Su)();var J=r(28176);function ee(e){const t=(0,J.iu)(e.url);return r=>{const n=(0,J.SU)(r,t,t),o=n?n.replace(/^ *\.\//,""):null;return(o?e.files.get(o):null)??r}}function te(e){return se.fromBlob(e,le(e.name,e.type))}const re=/^model\/gltf\+json$/,ne=/^model\/gltf-binary$/,oe=/\.gltf$/i,ie=/\.glb$/i;function ae(e){const t=new Map;let r,n=null;for(const{name:o,mimeType:i,source:a}of e)null===n&&(re.test(i)||oe.test(o)?(n=a.url,r="gltf"):(ne.test(i)||ie.test(o))&&(n=a.url,r="glb")),t.set(o,a.url),a.files.forEach(((e,r)=>t.set(r,e)));if(null==n)throw new i.c("mesh-load-external:missing-files","Missing files to load external mesh source");return new se(n,(()=>e.forEach((({source:e})=>e.dispose()))),t,r)}class se{constructor(e,t=(()=>{}),r=new Map,n){this.url=e,this.dispose=t,this.files=r,this.type=n}static fromBlob(e,t){const r=URL.createObjectURL(e);return new se(r,(()=>URL.revokeObjectURL(r)),void 0,t)}}function le(e,t){return re.test(t)||oe.test(e)?"gltf":ne.test(t)||oe.test(e)?"glb":void 0}var ce=r(3856),ue=r(2952),pe=r(54264);let fe=class extends ce.m{constructor(){super(),this.externalSources=new ue.c,this._explicitDisplaySource=null,this.addHandles((0,u.on)((()=>this.externalSources),"after-remove",(({item:e})=>{e===this._explicitDisplaySource&&(this._explicitDisplaySource=null)}),{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,pe.Ud)(e))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every((t=>!(0,pe._o)(t,e)))&&this.externalSources.add(e)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter((t=>(0,pe.v_)(t,e)))}get _implicitDisplaySource(){return this.externalSources.find(pe.Ud)}};(0,n._)([(0,p.qq)()],fe.prototype,"externalSources",void 0),(0,n._)([(0,p.qq)()],fe.prototype,"displaySource",null),(0,n._)([(0,p.qq)()],fe.prototype,"_implicitDisplaySource",null),(0,n._)([(0,p.qq)()],fe.prototype,"_explicitDisplaySource",void 0),fe=(0,n._)([(0,f.c)("esri.geometry.support.meshUtils.Metadata")],fe);var he=r(68612);const ge={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function me(e,t,r){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null!=t){ve[0]=t[0],ve[4]=t[1],ve[8]=t[2];for(let t=0;t<e.position.length;t+=3){for(let r=0;r<3;r++)xe[r]=e.position[t+r];(0,k.t)(xe,xe,ve);for(let r=0;r<3;r++)e.position[t+r]=xe[r]}if(t[0]!==t[1]||t[1]!==t[2]){ve[0]=1/t[0],ve[4]=1/t[1],ve[8]=1/t[2];for(let t=0;t<e.normal.length;t+=3){for(let r=0;r<3;r++)xe[r]=e.normal[t+r];(0,k.t)(xe,xe,ve),(0,k.n)(xe,xe);for(let r=0;r<3;r++)e.normal[t+r]=xe[r]}}}}(e,function(e,t,r){const n=(0,$._0)(t,r);if(null==e&&1===n)return null;if(null==e)return[n,n,n];if("number"==typeof e){const t=e*n;return[t,t,t]}return[null!=e.width?e.width*n:n,null!=e.depth?e.depth*n:n,null!=e.height?e.height*n:n]}(r?.size,r?.unit,t.spatialReference));const{vertexAttributes:n,vertexSpace:o,transform:i}=(0,$.EX)(e,t,{vertexSpace:r?.vertexSpace,geographic:r?.geographic});return{vertexAttributes:new S.s({...n,uv:e.uv}),vertexSpace:o,transform:i,components:[new v.c({faces:e.faces,material:r?.material||null})],spatialReference:t.spatialReference}}const ye={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},de={south:0,east:1,north:2,west:3,up:4,down:5},xe=(0,h.Su)(),ve=(0,he.Su)();var we=r(77556),Ae=r(15008),be=r(87104),_e=r(82448),Te=r(51120),Se=r(38496);const qe="esri.geometry.support.meshUtils.rotate";function Me(e,t,r,n=h.cX){if(null!=e){(0,Ae.IT)(Le,(0,x.kX)(t),(0,x.Yz)(t));for(let t=0;t<e.length;t+=r){for(let r=0;r<3;r++)Fe[r]=e[t+r]-n[r];(0,k.e)(Fe,Fe,Le);for(let r=0;r<3;r++)e[t+r]=Fe[r]+n[r]}}}const Fe=(0,h.Su)(),Re=(0,h.Su)(),Ce=(0,x.Su)(),Le=(0,be.Su)(),je=(0,he.Su)(),Ie=(0,h.Su)(),Pe="esri.geometry.support.meshUtils.scale";function ke(e,t,r=h.cX){if(e)for(let n=0;n<e.length;n+=3){for(let t=0;t<3;t++)Ne[t]=e[n+t]-r[t];(0,k.h)(Ne,Ne,t);for(let t=0;t<3;t++)e[n+t]=Ne[t]+r[t]}}const Ne=(0,h.Su)(),Oe=(0,h.Su)(),Ue=(0,h.Su)();var Ee;const We="esri.geometry.Mesh";function De(){return s.c.getLogger(We)}const ze={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:b.c,local:_.c}};let $e=Ee=class extends(a.c.LoadableMixin((0,l.g)(m.c))){constructor(e){super(e),this.components=null,this.vertexSpace=new b.c,this.transform=null,this.metadata=new fe,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new S.s,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.addHandles((0,u.aE)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:e,spatialReference:t,vertexAttributes:r,vertexSpace:n}=this,o=r.position;if(0===o.length||e&&0===e.length)return new g.c({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t});if((0,q.k$)(n)){const{_untransformedBounds:e,transform:r}=this;return function([e,t,r,n,o,i],a,s,l){G??=new Float64Array(24);const c=G;return c[0]=e,c[1]=t,c[2]=r,c[3]=e,c[4]=o,c[5]=r,c[6]=n,c[7]=o,c[8]=r,c[9]=n,c[10]=t,c[11]=r,c[12]=e,c[13]=t,c[14]=i,c[15]=e,c[16]=o,c[17]=i,c[18]=n,c[19]=o,c[20]=i,c[21]=n,c[22]=t,c[23]=i,(0,$.project)({positions:c,transform:a,vertexSpace:s,inSpatialReference:l,outSpatialReference:l,outPositions:c}),B(c,l)}(e,r,n,t)}return B(o,t)}get _untransformedBounds(){return Z(this.vertexAttributes.position)}get anchor(){const e=(0,q.mA)(this.vertexSpace,this.spatialReference);if(null!=e)return e;const{center:t,zmin:r}=this._transformedExtent;return new y.c({x:t.x,y:t.y,z:r,spatialReference:this.spatialReference})}get origin(){const e=(0,q.mA)(this.vertexSpace,this.spatialReference);return null!=e?e:this._transformedExtent.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||(this.components=[]),this.components.push(v.c.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}De().error("removeComponent()","Provided component is not part of the list of components")}}rotate(e,t,r,n){return(0,x.GA)(e,t,r,Ge),function(e,t,r){if(!e.vertexAttributes?.position||0===t[3])return;const{spatialReference:n,vertexSpace:o}=e,i=r?.origin??e.anchor,a=r?.geographic,l=(0,H.QL)(qe,o,n,a);(0,q.k$)(o)?(e.transform??=new T.c,function(e,t,r,n){const o=(0,k.s)(Fe,n.x,n.y,n.z??0),i=(0,k.f)(Fe,o,t);e.applyLocalInverse(i,Re),e.rotation=(0,x.Jn)(e.rotation,r,(0,x.Su)()),e.applyLocalInverse(i,i),(0,k.f)(i,i,Re),e.translation=(0,k.g)((0,h.Su)(),e.translation,i)}(e.transform,o.origin,t,i)):l?function(e,t,r){const n=e.spatialReference,o=(0,_e._s)(n),i=Ie;(0,Y.M)(r,i,o)||(0,Y.M)(e.origin,i,o);const a=e.vertexAttributes.position,s=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(a.length),u=null!=s?new Float32Array(s.length):null,p=null!=l?new Float32Array(l.length):null;(0,Te.y)(o,i,Le,o),(0,we.kr)(je,Le);const f=Ce;(0,k.t)((0,x.Yz)(Ce),(0,x.Yz)(t),je),f[3]=t[3],(0,Se.K_)(a,n,c),null!=s&&null!=u&&(0,Se.cH)(s,a,c,n,u),null!=l&&null!=p&&(0,Se.GW)(l,a,c,n,p),Me(c,f,3,i),(0,Se.o$)(c,a,n),null!=s&&null!=u&&(Me(u,f,3),(0,Se.QP)(u,a,c,n,s)),null!=l&&null!=p&&(Me(p,f,4),(0,Se.Cr)(p,a,c,n,l)),e.vertexAttributesChanged()}(e,t,i):function(e,t,r){const n=Ie;if(!(0,Y.M)(r,n,e.spatialReference)){const t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,s.c.getLogger(qe).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}Me(e.vertexAttributes.position,t,3,n),Me(e.vertexAttributes.normal,t,3),Me(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,i)}(this,Ge,n),this}offset(e,t,r){if(!this._checkIfLoaded("offset()"))return this;const{vertexSpace:n,vertexAttributes:o}=this,i=o?.position;if(!i)return this;if((0,q.k$)(n)){const[o,i,a]=n.origin;n.origin=(0,h.WK)(o+e,i+t,a+r)}else{for(let n=0;n<i.length;n+=3)i[n]+=e,i[n+1]+=t,i[n+2]+=r;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")?(function(e,t,r){if(!e.vertexAttributes?.position)return;const{vertexSpace:n,spatialReference:o}=e,i=r?.origin??e.anchor,a=r?.geographic,l=(0,H.QL)(Pe,n,o,a);(0,q.k$)(n)?(e.transform??=new T.c,function(e,t,r,n){const o=(0,k.s)(Ne,n.x,n.y,n.z),i=(0,k.f)(Ne,o,t);e.applyLocalInverse(i,Oe);const a=(0,k.h)((0,h.Su)(),e.scale,r);e.scale=a,e.applyLocalInverse(i,i),(0,k.f)(i,i,Oe),e.translation=(0,k.g)((0,h.Su)(),e.translation,i)}(e.transform,n.origin,t,i)):l?function(e,t,r){const n=e.spatialReference,o=(0,_e._s)(n),i=Ue;(0,Y.M)(r,i,o)||(0,Y.M)(e.origin,i,o);const a=e.vertexAttributes.position,s=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(a.length),u=null!=s?new Float32Array(s.length):null,p=null!=l?new Float32Array(l.length):null;(0,Se.K_)(a,n,c),null!=s&&null!=u&&(0,Se.cH)(s,a,c,n,u),null!=l&&null!=p&&(0,Se.GW)(l,a,c,n,p),ke(c,t,i),(0,Se.o$)(c,a,n),null!=s&&null!=u&&(0,Se.QP)(u,a,c,n,s),null!=l&&null!=p&&(0,Se.Cr)(p,a,c,n,l),e.vertexAttributesChanged()}(e,t,i):function(e,t,r){const n=Ue;if(!(0,Y.M)(r,n,e.spatialReference)){const t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,s.c.getLogger(Pe).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}ke(e.vertexAttributes.position,t,n),e.vertexAttributesChanged()}(e,t,i)}(this,e,t),this):this}centerAt(e,t){return this._checkIfLoaded("centerAt()")?(function(e,t,r){if(!e.vertexAttributes?.position)return;const{vertexSpace:n}=e,o=r?.origin??e.anchor,i=r?.geographic,a=(0,H.QL)(V,n,o.spatialReference,i);(0,q.k$)(n)?function(e,t,r){const{vertexSpace:n}=e;if(!(0,q.k$)(n))return;const o=X,i=K;if(!(0,Y.M)(t,i,e.spatialReference))return void s.c.getLogger(V).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`);if(!(0,Y.M)(r,o,e.spatialReference)){const t=e.origin;o[0]=t.x,o[1]=t.y,o[2]=t.z,s.c.getLogger(V).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}const a=(0,k.f)(Q,i,o);n.origin=(0,k.g)((0,h.Su)(),n.origin,a)}(e,t,o):a?function(e,t,r){const n=(0,$.qu)(e.vertexAttributes,r),{position:o,normal:i,tangent:a}=(0,$.mC)(n,t,!1);e.vertexAttributes.position=o,e.vertexAttributes.normal=i,e.vertexAttributes.tangent=a,e.vertexAttributesChanged()}(e,t,o):function(e,t,r){const n=X,o=K;if((0,Y.M)(t,o,e.spatialReference)){if(!(0,Y.M)(r,n,e.spatialReference)){const t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,s.c.getLogger(V).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(function(e,t,r){if(e)for(let n=0;n<e.length;n+=3)for(let o=0;o<3;o++)e[n+o]+=t[o]-r[o]})(e.vertexAttributes.position,o,n),e.vertexAttributesChanged()}else s.c.getLogger(V).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(e,t,o)}(this,e,t),this):this}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,n){const{source:o}=t,{loadGLTFMesh:a}=await(0,c.Yv)(Promise.all([r.e(8108),r.e(2818)]).then(r.bind(r,42818)),n),s=await async function(e,t){if(Array.isArray(e)){if(!e.length)throw new i.c("mesh-load-external:missing-assets","There must be at least one file to load");return e[0]instanceof File?function(e){return ae(e.map((e=>({name:e.name,mimeType:e.type,source:te(e)}))))}(e):async function(e,t){const r=await(0,c.Y3)(e.map((async e=>{const r=await async function(e,t){const{parts:r,assetMimeType:n,assetName:o}=e;if(1===r.length)return new se(r[0].partUrl);const i=await e.toBlob(t);return(0,c.wp)(t),se.fromBlob(i,le(o,n))}(e);return(0,c.wp)(t),{name:e.assetName,mimeType:e.assetMimeType,source:r}})));if((0,c.wv)(t))throw r.forEach((e=>e.source.dispose())),(0,c.Uh)();return ae(r)}(e,t)}return te(e)}(o,n);(0,c.wp)(n);const l=a(new y.c({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:ee(s),signal:n?.signal,expectedType:s.type});l.then((()=>s.dispose()),(()=>s.dispose()));const{vertexAttributes:u,components:p}=await l;e.vertexAttributes=u,e.components=p}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){return this.cloneWithVertexSpace(this.vertexSpace.clone())}cloneWithVertexSpace(e){let t=null;if(this.components){const e=new Map,r=new Map;t=this.components.map((t=>t.cloneWithDeduplication(e,r)))}const r={components:t,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:e,transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new Ee(r)}cloneShallow(){return new Ee({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=r.e(4232).then(r.bind(r,4232)),n=this.load(),o=await Promise.all([t,n]),{toBinaryGLTF:i}=o[0];return i(this,e)}get memoryUsage(){let e=0;if(e+=this.vertexAttributes.memoryUsage,null!=this.components)for(const t of this.components)e+=t.memoryUsage;return e}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(De().error(e,"Mesh must be loaded before applying operations"),!1)}static createBox(e,t){if(!(e instanceof y.c))return De().error(".createBox()",w),null;const r=new Ee(me(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:r}=ye,n=4*e.length,o=new Float64Array(3*n),i=new Float32Array(3*n),a=new Float32Array(2*n),s=new Uint32Array(2*e.length*3);let l=0,c=0,u=0,p=0;for(let n=0;n<e.length;n++){const f=e[n],h=l/3;for(const e of t)s[p++]=h+e;const g=f.corners;for(let e=0;e<4;e++){const t=g[e];let n=0;a[u++]=.25*r[e][0]+f.uvOrigin[0],a[u++]=f.uvOrigin[1]-.25*r[e][1];for(let e=0;e<3;e++)0!==f.axis[e]?(o[l++]=.5*f.axis[e],i[c++]=f.axis[e]):(o[l++]=.5*t[n++],i[c++]=0)}}return{position:o,normal:i,uv:a,faces:s}}(),e,t));return t?.imageFace&&"all"!==t.imageFace?function(e,t){const r=e.components[0],n=r.faces,o=de[t],i=6*o,a=new Array(6),s=new Array(n.length-6);let l=0,c=0;for(let e=0;e<n.length;e++)e>=i&&e<i+6?a[l++]=n[e]:s[c++]=n[e];if(null!=e.vertexAttributes.uv){const t=new Float32Array(e.vertexAttributes.uv),r=4*o*2,n=[0,1,1,1,1,0,0,0];for(let e=0;e<n.length;e++)t[r+e]=n[e];e.vertexAttributes.uv=t}return e.components=[new v.c({faces:a,material:r.material}),new v.c({faces:s})],e}(r,t.imageFace):r}static createSphere(e,t){return e instanceof y.c?new Ee(me(function(e=0){const t=Math.round(8*2**e),r=2*t,n=(t-1)*(r+1)+2*r,o=new Float64Array(3*n),i=new Float32Array(3*n),a=new Float32Array(2*n),s=new Uint32Array((t-1)*r*2*3);let l=0,c=0,u=0,p=0;for(let e=0;e<=t;e++){const n=e/t*Math.PI+.5*Math.PI,f=Math.cos(n),h=Math.sin(n);xe[2]=h;const g=0===e||e===t,m=g?r-1:r;for(let n=0;n<=m;n++){const h=n/m*2*Math.PI;xe[0]=-Math.sin(h)*f,xe[1]=Math.cos(h)*f;for(let e=0;e<3;e++)o[l]=.5*xe[e],i[l]=xe[e],++l;a[c++]=(n+(g?.5:0))/r,a[c++]=e/t,0!==e&&n!==r&&(e!==t&&(s[u++]=p,s[u++]=p+1,s[u++]=p-r),1!==e&&(s[u++]=p,s[u++]=p-r,s[u++]=p-r-1)),p++}}return{position:o,normal:i,uv:a,faces:s}}(t?.densificationFactor||0),e,t)):(De().error(".createSphere()",w),null)}static createCylinder(e,t){return e instanceof y.c?new Ee(me(function(e=0){const t=Math.round(16*2**e),r=4*(t+1)+2*t,n=new Float64Array(3*r),o=new Float32Array(3*r),i=new Float32Array(2*r),a=new Uint32Array(4*t*3);let s=0,l=0,c=0,u=0,p=0;for(let e=0;e<=5;e++){const r=0===e||5===e,f=e<=1||e>=4,h=2===e||4===e,g=r?t-1:t;for(let m=0;m<=g;m++){const y=m/g*2*Math.PI,d=r?0:.5;xe[0]=d*Math.sin(y),xe[1]=d*-Math.cos(y),xe[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)n[s++]=xe[t],o[l++]=f?2===t?e<=1?1:-1:0:2===t?0:xe[t]/d;i[c++]=(m+(r?.5:0))/t,i[c++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,h||0===e||m===t||(5!==e&&(a[u++]=p,a[u++]=p+1,a[u++]=p-t),1!==e&&(a[u++]=p,a[u++]=p-t,a[u++]=p-t-1)),p++}}return{position:n,normal:o,uv:i,faces:a}}(t?.densificationFactor||0),e,t)):(De().error(".createCylinder()",w),null)}static createPlane(e,t){if(!(e instanceof y.c))return De().error(".createPlane()",w),null;const r=t?.facing??"up",n=function(e,t){const r="number"==typeof t?t:null!=t?t.width:1,n="number"==typeof t?t:null!=t?t.height:1;switch(e){case"up":case"down":return{width:r,depth:n};case"north":case"south":return{width:r,height:n};case"east":case"west":return{depth:r,height:n}}}(r,t?.size);return new Ee(me(function(e){const t=ge.facingAxisOrderSwap[e],r=ge.position,n=ge.normal,o=new Float64Array(r.length),i=new Float32Array(n.length);let a=0;for(let e=0;e<4;e++){const e=a;for(let s=0;s<3;s++){const l=t[s],c=Math.abs(l)-1,u=l>=0?1:-1;o[a]=r[e+c]*u,i[a]=n[e+c]*u,a++}}return{position:o,normal:i,uv:new Float32Array(ge.uv),faces:new Uint32Array(ge.faces),isPlane:!0}}(r),e,{...t,size:n}))}static createFromPolygon(e,t){if(!(e instanceof d.c))return De().error(".createFromPolygon()","Expected polygon to be a Polygon instance"),null;const r=function(e){const t=function(e,t,r,n){const o=e.length,i=new Array(o),a=new Array(o),s=new Array(o);let l=0,c=0,u=0,p=0;for(let t=0;t<o;++t)p+=e[t].length;const f=(0,C.Gg)(3*p);let h=0;for(let p=o-1;p>=0;p--){const g=e[p],m=r===W.CCW_IS_HOLE&&E(g,t,n);if(m&&1!==o)i[l++]=g;else{let e=g.length;for(let t=0;t<l;++t)e+=i[t].length;const r={index:h,pathLengths:new Array(l+1),count:e,holeIndices:new Array(l)};r.pathLengths[0]=g.length,g.length>0&&(s[u++]={index:h,count:g.length}),h=m?U(g,g.length-1,-1,f,h,g.length,t):U(g,0,1,f,h,g.length,t);for(let e=0;e<l;++e){const n=i[e];r.holeIndices[e]=h,r.pathLengths[e+1]=n.length,n.length>0&&(s[u++]={index:h,count:n.length}),h=U(n,0,1,f,h,n.length,t)}l=0,r.count>0&&(a[c++]=r)}}for(let e=0;e<l;++e){const r=i[e];r.length>0&&(s[u++]={index:h,count:r.length}),h=U(r,0,1,f,h,r.length,t)}return a.length=c,s.length=u,{position:f,polygons:a,outlines:s}}(e.rings,e.hasZ,W.CCW_IS_HOLE,e.spatialReference),r=new Array;let n=0,o=0;for(const e of t.polygons){const i=e.count,a=e.index,s=(0,C.lL)(t.position,3*a,3*i),l=e.holeIndices.map((e=>e-a)),c=(0,L.Uv)((0,M.e)(s,l,3));r.push({position:s,faces:c}),n+=s.length,o+=c.length}const i=function(e,t,r){if(1===e.length)return e[0];const n=(0,C.Gg)(t),o=new Array(r);let i=0,a=0,s=0;for(const t of e){for(let e=0;e<t.position.length;e++)n[i++]=t.position[e];for(const e of t.faces)o[a++]=e+s;s=i/3}return{position:n,faces:(0,L.Uv)(o)}}(r,n,o),a=Array.isArray(i.position)?(0,j.g)(i.position,3,{originalIndices:i.faces}):(0,j.g)(i.position.buffer,6,{originalIndices:i.faces});return i.position=(0,C.cp)(new Float64Array(a.buffer)),i.faces=a.indices,i}(e);return new Ee({vertexAttributes:new S.s({position:r.position}),components:[new v.c({faces:r.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new b.c})}static async createFromGLTF(e,t,n){if(!(e instanceof y.c)){const e=new A;throw De().error(".createfromGLTF()",e.message),e}const{loadGLTFMesh:o}=await(0,c.Yv)(Promise.all([r.e(8108),r.e(2818)]).then(r.bind(r,42818)),n);return new Ee(await o(e,t,n))}static async createFromFiles(e,t,r){if((0,o.gx)(De(),"`Mesh.createFromFiles` is deprecated in favor of 'SceneLayer.convertMesh'",{replacement:"SceneLayer.convertMesh",version:"4.29"}),!(e instanceof y.c)){const e=new A;throw(e=>{De().error(".createFromFiles()",e.message)})(e),e}if(!r?.layer)throw new i.c("invalid:no-layer","SceneLayer required for file to mesh conversion.");return r.layer.convertMesh(t,{location:e,...r})}static createWithExternalSource(e,t,r){const n=r?.extent??null,{x:o,y:i,z:a,spatialReference:s}=e,l=r?.transform?.clone()??new T.c,c=(0,h.WK)(o,i,a??0),u=(0,q.mm)(r?.vertexSpace??(0,q.GF)(s),c),p={source:t,extent:n},f=new fe;return f.externalSources.push(p),new Ee({metadata:f,transform:l,vertexSpace:u,spatialReference:s})}static createIncomplete(e,t){const{x:r,y:n,z:o,spatialReference:a}=e,s=t?.transform?.clone()??new T.c,l=(0,h.WK)(r,n,o??0),c=(0,q.mm)(t?.vertexSpace??(0,q.GF)(a),l),u=new Ee({transform:s,vertexSpace:c,spatialReference:a});return u.addResolvingPromise(Promise.reject(new i.c("mesh-incomplete","Mesh resources are not complete"))),u}};(0,n._)([(0,p.qq)({type:[v.c],json:{write:!0}})],$e.prototype,"components",void 0),(0,n._)([(0,p.qq)({nonNullable:!0,types:ze,constructOnly:!0,json:{write:!0}})],$e.prototype,"vertexSpace",void 0),(0,n._)([(0,p.qq)({type:T.c,json:{write:!0}})],$e.prototype,"transform",void 0),(0,n._)([(0,p.qq)({constructOnly:!0})],$e.prototype,"metadata",void 0),(0,n._)([(0,p.qq)()],$e.prototype,"hasExtent",null),(0,n._)([(0,p.qq)()],$e.prototype,"_transformedExtent",null),(0,n._)([(0,p.qq)()],$e.prototype,"_untransformedBounds",null),(0,n._)([(0,p.qq)()],$e.prototype,"anchor",null),(0,n._)([(0,p.qq)()],$e.prototype,"origin",null),(0,n._)([(0,p.qq)({readOnly:!0,json:{read:!1}})],$e.prototype,"extent",null),(0,n._)([(0,p.qq)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],$e.prototype,"hasZ",void 0),(0,n._)([(0,p.qq)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],$e.prototype,"hasM",void 0),(0,n._)([(0,p.qq)({type:S.s,nonNullable:!0,json:{write:!0}})],$e.prototype,"vertexAttributes",void 0),$e=Ee=(0,n._)([(0,f.c)(We)],$e);const Ge=(0,x.Su)(),Ze=$e},15688:(e,t,r)=>{r.d(t,{Gg:()=>o,cp:()=>i,lL:()=>a,mw:()=>s,qW:()=>l});var n=r(72008);function o(e,t=!1){return e<=n._?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function i(e){return((0,n.c7)(e)?e.length:e.byteLength/8)<=n._?Array.from(e):new Float64Array(e)}function a(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}function s(e,t){for(let r=0;r<t.length;++r)e[r]=t[r];return e}function l(e){return Array.isArray(e)?new Float64Array(e):e}},43912:(e,t,r)=>{r.d(t,{c:()=>y});var n,o=r(41948),i=r(40504),a=r(62088),s=r(66360),l=r(1580),c=r(33392),u=r(12552),p=r(53368),f=r(96344),h=r(70492),g=r(60003);let m=n=class extends i.am{static from(e){return(0,p.uY)(n,e)}constructor(e){super(e),this.faces=null,this.material=null,this.name=void 0,this.shading="source",this.trustSourceNormals=!1}castFaces(e){return(0,g.c)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},s.c.getLogger(this))}castMaterial(e){return(0,p.uY)(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?h.c:f.c,e)}clone(){return new n({faces:(0,a.ct)(this.faces),shading:this.shading,material:(0,a.ct)(this.material),trustSourceNormals:this.trustSourceNormals,name:this.name})}cloneWithDeduplication(e,t){const r={faces:(0,a.ct)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(e,t):null,trustSourceNormals:this.trustSourceNormals,name:this.name};return new n(r)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,o._)([(0,l.qq)({json:{write:!0}})],m.prototype,"faces",void 0),(0,o._)([(0,c.W)("faces")],m.prototype,"castFaces",null),(0,o._)([(0,l.qq)({type:f.c,json:{write:!0}})],m.prototype,"material",void 0),(0,o._)([(0,c.W)("material")],m.prototype,"castMaterial",null),(0,o._)([(0,l.qq)()],m.prototype,"name",void 0),(0,o._)([(0,l.qq)({type:String,json:{write:!0}})],m.prototype,"shading",void 0),(0,o._)([(0,l.qq)({type:Boolean})],m.prototype,"trustSourceNormals",void 0),m=n=(0,o._)([(0,u.c)("esri.geometry.support.MeshComponent")],m);const y=m},51232:(e,t,r)=>{r.d(t,{c:()=>u});var n=r(41948),o=r(3856),i=r(40504),a=r(1580),s=(r(9456),r(66360),r(72052),r(9968)),l=r(12552);let c=class extends((0,o.q)(i.am)){constructor(e){super(e),this.type="georeferenced",this.origin=null}};(0,n._)([(0,s.G)({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),(0,n._)([(0,a.qq)({type:[Number],nonNullable:!1,json:{write:!0}})],c.prototype,"origin",void 0),c=(0,n._)([(0,l.c)("esri.geometry.support.MeshGeoreferencedVertexSpace")],c);const u=c},13708:(e,t,r)=>{r.d(t,{c:()=>p});var n=r(41948),o=r(3856),i=r(40504),a=r(1580),s=(r(9456),r(66360),r(72052),r(9968)),l=r(12552),c=r(62484);let u=class extends((0,o.q)(i.am)){constructor(e){super(e),this.type="local",this.origin=(0,c.Su)()}};(0,n._)([(0,s.G)({local:"local"},{readOnly:!0})],u.prototype,"type",void 0),(0,n._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,n._)([(0,l.c)("esri.geometry.support.MeshLocalVertexSpace")],u);const p=u},96344:(e,t,r)=>{r.d(t,{c:()=>f});var n,o=r(41948),i=r(44728),a=r(40504),s=r(1580),l=(r(9456),r(66360),r(72052),r(12552)),c=r(7192),u=r(56160);let p=n=class extends a.am{constructor(e){super(e),this.color=null,this.colorTexture=null,this.colorTextureTransform=null,this.normalTexture=void 0,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const r=null!=e?e.get(this):null;if(r)return r;const o=new n(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}clonePropertiesWithDeduplication(e){return{color:null!=this.color?this.color.clone():null,colorTexture:this.colorTexture?.cloneWithDeduplication(e),normalTexture:this.normalTexture?.cloneWithDeduplication(e),alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:this.colorTextureTransform?.clone(),normalTextureTransform:this.normalTextureTransform?.clone()}}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null!=this.color?16:0,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null!=this.colorTextureTransform?20:0,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null!=this.normalTextureTransform?20:0,e}};(0,o._)([(0,s.qq)({type:i.c,json:{write:!0}})],p.prototype,"color",void 0),(0,o._)([(0,s.qq)({type:c.c,json:{write:!0}})],p.prototype,"colorTexture",void 0),(0,o._)([(0,s.qq)({type:u.c,json:{write:!0}})],p.prototype,"colorTextureTransform",void 0),(0,o._)([(0,s.qq)({type:c.c,json:{write:!0}})],p.prototype,"normalTexture",void 0),(0,o._)([(0,s.qq)({type:u.c,json:{write:!0}})],p.prototype,"normalTextureTransform",void 0),(0,o._)([(0,s.qq)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaMode",void 0),(0,o._)([(0,s.qq)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaCutoff",void 0),(0,o._)([(0,s.qq)({nonNullable:!0,json:{write:!0}})],p.prototype,"doubleSided",void 0),p=n=(0,o._)([(0,l.c)("esri.geometry.support.MeshMaterial")],p);const f=p},70492:(e,t,r)=>{r.d(t,{c:()=>f});var n,o=r(41948),i=r(44728),a=r(1580),s=(r(9456),r(66360),r(72052),r(12552)),l=r(96344),c=r(7192),u=r(56160);let p=n=class extends l.c{constructor(e){super(e),this.emissiveColor=null,this.emissiveTexture=null,this.emissiveTextureTransform=void 0,this.occlusionTexture=null,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null,this.metallicRoughnessTextureTransform=void 0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const r=null!=e?e.get(this):null;if(r)return r;const o=new n(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null!=this.emissiveColor?16:0,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null!=this.emissiveTextureTransform?20:0,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null!=this.occlusionTextureTransform?20:0,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null!=this.metallicRoughnessTextureTransform?20:0,e}clonePropertiesWithDeduplication(e){return{...super.clonePropertiesWithDeduplication(e),emissiveColor:this.emissiveColor?.clone(),emissiveTexture:this.emissiveTexture?.cloneWithDeduplication(e),emissiveTextureTransform:this.emissiveTextureTransform?.clone(),occlusionTexture:this.occlusionTexture?.cloneWithDeduplication(e),occlusionTextureTransform:this.occlusionTextureTransform?.clone(),metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:this.metallicRoughnessTexture?.cloneWithDeduplication(e),metallicRoughnessTextureTransform:this.metallicRoughnessTextureTransform?.clone()}}};(0,o._)([(0,a.qq)({type:i.c,json:{write:!0}})],p.prototype,"emissiveColor",void 0),(0,o._)([(0,a.qq)({type:c.c,json:{write:!0}})],p.prototype,"emissiveTexture",void 0),(0,o._)([(0,a.qq)({type:u.c,json:{write:!0}})],p.prototype,"emissiveTextureTransform",void 0),(0,o._)([(0,a.qq)({type:c.c,json:{write:!0}})],p.prototype,"occlusionTexture",void 0),(0,o._)([(0,a.qq)({type:u.c,json:{write:!0}})],p.prototype,"occlusionTextureTransform",void 0),(0,o._)([(0,a.qq)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"metallic",void 0),(0,o._)([(0,a.qq)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"roughness",void 0),(0,o._)([(0,a.qq)({type:c.c,json:{write:!0}})],p.prototype,"metallicRoughnessTexture",void 0),(0,o._)([(0,a.qq)({type:u.c,json:{write:!0}})],p.prototype,"metallicRoughnessTextureTransform",void 0),p=n=(0,o._)([(0,s.c)("esri.geometry.support.MeshMaterialMetallicRoughness")],p);const f=p},7192:(e,t,r)=>{r.d(t,{c:()=>y});var n,o=r(41948),i=(r(9456),r(63316)),a=r(40504),s=r(1580),l=r(53368),c=(r(72052),r(33600)),u=r(12552),p=r(18996),f=r(91952);const h=new WeakMap;let g=0,m=n=class extends a.am{constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,r,n){if(e instanceof HTMLImageElement){const o={type:"image-element",src:(0,f.t)(e.src,n),crossOrigin:e.crossOrigin};t[r]=o}else if(e instanceof HTMLCanvasElement){const n=e.getContext("2d").getImageData(0,0,e.width,e.height),o={type:"canvas-element",imageData:this._encodeImageData(n)};t[r]=o}else if(e instanceof HTMLVideoElement){const o={type:"video-element",src:(0,f.t)(e.src,n),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[r]=o}else if(e instanceof ImageData){const n={type:"image-data",imageData:this._encodeImageData(e)};t[r]=n}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=this._decodeImageData(e.imageData),r=document.createElement("canvas");return r.width=t.width,r.height=t.height,r.getContext("2d").putImageData(t,0,0),r}case"image-data":return this._decodeImageData(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const e=this.data,t=this.url;if(e instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(e.getContext("2d").getImageData(0,0,e.width,e.height));if(e instanceof ImageData)return this._imageDataContainsTransparent(e);if(t){const e=t.substr(t.length-4,4).toLowerCase(),r=t.substr(0,15).toLocaleLowerCase();if(".png"===e||"data:image/png;"===r)return!0}return!1}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){const e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null!=this.url?t(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(h.has(this.data)||h.set(this.data,++g),t(h.get(this.data))):t()}get memoryUsage(){let e=0;if(e+=null!=this.url?this.url.length:0,null!=this.data){const t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(){const e={url:this.url,data:this.data,wrap:this._cloneWrap()};return new n(e)}cloneWithDeduplication(e){const t=e.get(this);if(t)return t;const r=this.clone();return e.set(this,r),r}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(e){let t="";for(let r=0;r<e.data.length;r++)t+=String.fromCharCode(e.data[r]);return{data:btoa(t),width:e.width,height:e.height}}_decodeImageData(e){const t=atob(e.data),r=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return(0,i.wV)(r,e.width,e.height)}_imageDataContainsTransparent(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}static from(e){return"string"==typeof e?new n({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new n({data:e}):(0,l.uY)(n,e)}};(0,o._)([(0,s.qq)({type:String,json:{write:f.w}})],m.prototype,"url",null),(0,o._)([(0,s.qq)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,s.qq)()],m.prototype,"data",null),(0,o._)([(0,p.G)("data")],m.prototype,"writeData",null),(0,o._)([(0,c.E)("data")],m.prototype,"readData",null),(0,o._)([(0,s.qq)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],m.prototype,"transparent",null),(0,o._)([(0,s.qq)({json:{write:!0}})],m.prototype,"wrap",void 0),(0,o._)([(0,s.qq)({readOnly:!0})],m.prototype,"contentHash",null),m=n=(0,o._)([(0,u.c)("esri.geometry.support.MeshTexture")],m);const y=m},56160:(e,t,r)=>{r.d(t,{c:()=>c});var n=r(41948),o=r(3856),i=r(40504),a=r(1580),s=(r(9456),r(66360),r(72052),r(12552));let l=class extends((0,o.q)(i.am)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,n._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,n._)([(0,a.qq)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,n._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,n._)([(0,s.c)("esri.geometry.support.MeshTextureTransform")],l);const c=l},41104:(e,t,r)=>{r.d(t,{c:()=>d});var n,o=r(41948),i=r(40504),a=r(1580),s=(r(9456),r(66360),r(72052),r(12552)),l=r(15008),c=r(87104),u=r(41512),p=r(2620),f=r(98472),h=r(62484),g=r(66952);let m=n=class extends i.am{constructor(e){super(e),this.translation=(0,h.Su)(),this.rotationAxis=(0,h.eu)(g.up),this.rotationAngle=0,this.scale=(0,h.WK)(1,1,1)}get rotation(){return(0,g.eE)(this.rotationAxis,this.rotationAngle)}set rotation(e){this.rotationAxis=(0,h.ct)((0,g.Yz)(e)),this.rotationAngle=(0,g.i4)(e)}get localMatrix(){const e=(0,c.Su)();return(0,u.yG)(y,(0,g.Yz)(this.rotation),(0,g.kX)(this.rotation)),(0,l.um)(e,y,this.translation,this.scale),e}get localMatrixInverse(){return(0,l.S_)((0,c.Su)(),this.localMatrix)}applyLocal(e,t){return(0,f.e)(t,e,this.localMatrix)}applyLocalInverse(e,t){return(0,f.e)(t,e,this.localMatrixInverse)}equals(e){return this===e||null!=e&&(0,l.sF)(this.localMatrix,e.localMatrix)}clone(){const e={translation:(0,h.ct)(this.translation),rotationAxis:(0,h.ct)(this.rotationAxis),rotationAngle:this.rotationAngle,scale:(0,h.ct)(this.scale)};return new n(e)}};(0,o._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],m.prototype,"translation",void 0),(0,o._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],m.prototype,"rotationAxis",void 0),(0,o._)([(0,a.qq)({type:Number,nonNullable:!0,json:{write:!0}})],m.prototype,"rotationAngle",void 0),(0,o._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],m.prototype,"scale",void 0),(0,o._)([(0,a.qq)()],m.prototype,"rotation",null),(0,o._)([(0,a.qq)()],m.prototype,"localMatrix",null),(0,o._)([(0,a.qq)()],m.prototype,"localMatrixInverse",null),m=n=(0,o._)([(0,s.c)("esri.geometry.support.MeshTransform")],m);const y=(0,p.Su)(),d=m},60003:(e,t,r)=>{r.d(t,{c:()=>h,s:()=>p});var n,o=r(41948),i=r(40504),a=r(62088),s=r(66360),l=r(1580),c=r(33392),u=r(12552);let p=n=class extends i.am{constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return h(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},s.c.getLogger(this))}castPosition(e){return e&&e instanceof Float32Array&&s.c.getLogger(this).warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),h(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},s.c.getLogger(this))}castUv(e){return h(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},s.c.getLogger(this))}castNormal(e){return h(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},s.c.getLogger(this))}castTangent(e){return h(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},s.c.getLogger(this))}clone(){const e={position:(0,a.ct)(this.position),uv:(0,a.ct)(this.uv),normal:(0,a.ct)(this.normal),tangent:(0,a.ct)(this.tangent),color:(0,a.ct)(this.color)};return new n(e)}clonePositional(){const e={position:(0,a.ct)(this.position),normal:(0,a.ct)(this.normal),tangent:(0,a.ct)(this.tangent),uv:this.uv,color:this.color};return new n(e)}get memoryUsage(){let e=0;return e+=this.position.byteLength,null!=this.uv&&(e+=this.uv.byteLength),null!=this.normal&&(e+=this.normal.byteLength),null!=this.tangent&&(e+=this.tangent.byteLength),null!=this.color&&(e+=this.color.byteLength),e}};function f(e,t,r,n){const{loggerTag:o,stride:i}=t;return e.length%i!=0?(n.error(o,`Invalid array length, expected a multiple of ${i}`),new r([])):e}function h(e,t,r,n,o){if(!e)return e;if(e instanceof t)return f(e,n,t,o);for(const i of r)if(e instanceof i)return f(new t(e),n,t,o);if(Array.isArray(e))return f(new t(e),n,t,o);{const n=r.map((e=>`'${e.name}'`));return o.error(`Failed to set property, expected one of ${n}, but got ${e.constructor.name}`),new t([])}}function g(e,t,r){t[r]=function(e){const t=new Array(e.length);for(let r=0;r<e.length;r++)t[r]=e[r];return t}(e)}(0,o._)([(0,l.qq)({json:{write:g}})],p.prototype,"color",void 0),(0,o._)([(0,c.W)("color")],p.prototype,"castColor",null),(0,o._)([(0,l.qq)({nonNullable:!0,json:{write:g}})],p.prototype,"position",void 0),(0,o._)([(0,c.W)("position")],p.prototype,"castPosition",null),(0,o._)([(0,l.qq)({json:{write:g}})],p.prototype,"uv",void 0),(0,o._)([(0,c.W)("uv")],p.prototype,"castUv",null),(0,o._)([(0,l.qq)({json:{write:g}})],p.prototype,"normal",void 0),(0,o._)([(0,c.W)("normal")],p.prototype,"castNormal",null),(0,o._)([(0,l.qq)({json:{write:g}})],p.prototype,"tangent",void 0),(0,o._)([(0,c.W)("tangent")],p.prototype,"castTangent",null),p=n=(0,o._)([(0,u.c)("esri.geometry.support.MeshVertexAttributes")],p)},66952:(e,t,r)=>{r.d(t,{GA:()=>p,Jn:()=>u,Su:()=>l,Yz:()=>f,eE:()=>c,i4:()=>h,kX:()=>g,up:()=>m});var n=r(53648),o=r(41512),i=r(2620),a=r(98472),s=r(62484);function l(e=m){return[e[0],e[1],e[2],e[3]]}function c(e,t,r=l()){return(0,a.c)(r,e),r[3]=t,r}function u(e,t,r=l()){return(0,o.yG)(y,e,g(e)),(0,o.yG)(d,t,g(t)),(0,o.iW)(y,d,y),function(e,t){return e[3]=t,e}(r,(0,n.UB)((0,o.C0)(r,y)))}function p(e,t,r,n=l()){return c(s.UV,e,x),c(s.IR,t,v),c(s.wx,r,w),u(x,v,x),u(x,w,n),n}function f(e){return e}function h(e){return e[3]}function g(e){return(0,n.EF)(e[3])}r(37008);const m=[0,0,1,0],y=(0,i.Su)(),d=(0,i.Su)(),x=(l(),l()),v=l(),w=l()},54264:(e,t,r)=>{r.d(t,{CT:()=>x,Ki:()=>d,Si:()=>s,Ud:()=>c,_o:()=>m,ai:()=>l,mK:()=>v,v_:()=>g});var n=r(2600),o=r(92400),i=r(10860),a=r(4048);class s{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,o.yK)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const r=await Promise.all(t.map((t=>t.toBlob(e))));return(0,i.wp)(e),new Blob(r)}}class l{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,n.c)(this.partUrl,{responseType:"blob"});return(0,i.wp)(e),t}}function c(e){return function(e){return!!e&&(Array.isArray(e)?e.some(h):h(e))}(e?.source)}function u(e){return!!Array.isArray(e)&&e.every((e=>e instanceof s))}const p=/^(model\/gltf\+json)|(model\/gltf-binary)$/,f=/\.(gltf|glb)/i;function h(e){if(e instanceof File){const{type:t,name:r}=e;return p.test(t)||f.test(r)}return p.test(e.assetMimeType)||f.test(e.assetName)}function g(e,t){if(!e)return!1;const{source:r}=e;return function(e,t){if(Array.isArray(e)){const r=e;return r.length>0&&r.every((e=>y(e,t)))}return y(e,t)}(r,t)}function m(e,t){if(e===t)return!0;const{source:r}=e,{source:n}=t;if(r===n)return!0;if(u(r)&&u(n)){if(r.length!==n.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...r].sort(e),o=[...n].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(o[e]))return!1;return!0}return!1}function y(e,t){return e instanceof s&&e.isOnService(t)}function d(e,t){return e instanceof File?(0,a.K0)(e,t):(0,a.me)(e.assetMimeType,t)??(0,a.If)(e.assetName,t)}function x(e){return Array.isArray(e)?e:[e]}function v(e){return!!e.original}},77080:(e,t,r)=>{r.d(t,{g:()=>i});var n=r(53648),o=r(97143);function i(e,t,r){const i=Array.isArray(e),u=i?e.length/t:e.byteLength/(4*t),p=i?e:new Uint32Array(e,0,u*t),f=r?.minReduction??0,h=r?.originalIndices||null,g=h?h.length:0,m=r?.componentOffsets||null;let y=0;if(m)for(let e=0;e<m.length-1;e++){const t=m[e+1]-m[e];t>y&&(y=t)}else y=u;const d=Math.floor(1.1*y)+1;(null==c||c.length<2*d)&&(c=new Uint32Array((0,n.w7)(2*d)));for(let e=0;e<2*d;e++)c[e]=0;let x=0;const v=!!m&&!!h,w=v?g:u;let A=(0,o.aw)(u);const b=new Uint32Array(g),_=1.96;let T=0!==f?Math.ceil(4*_*_/(f*f)*f*(1-f)):w,S=1,q=m?m[1]:w;for(let e=0;e<w;e++){if(e===T){const t=1-x/e;if(t+_*Math.sqrt(t*(1-t)/e)<f)return null;T*=2}if(e===q){for(let e=0;e<2*d;e++)c[e]=0;if(h)for(let e=m[S-1];e<m[S];e++)b[e]=A[h[e]];q=m[++S]}const r=v?h[e]:e,n=r*t,o=l(p,n,t);let i=o%d,s=x;for(;0!==c[2*i+1];){if(c[2*i]===o){const e=c[2*i+1]-1;if(a(p,n,e*t,t)){s=A[e];break}}i++,i>=d&&(i-=d)}s===x&&(c[2*i]=o,c[2*i+1]=r+1,x++),A[r]=s}if(0!==f&&1-x/u<f)return null;if(v){for(let e=m[S-1];e<b.length;e++)b[e]=A[h[e]];A=(0,o.Uv)(b)}const M=i?new Array(x):new Uint32Array(x*t);x=0;for(let e=0;e<w;e++)A[e]===x&&(s(p,(v?h[e]:e)*t,M,x*t,t),x++);if(h&&!v){const e=new Uint32Array(g);for(let t=0;t<e.length;t++)e[t]=A[h[t]];A=(0,o.Uv)(e)}return{buffer:Array.isArray(M)?M:M.buffer,indices:A,uniqueCount:x}}function a(e,t,r,n){for(let o=0;o<n;o++)if(e[t+o]!==e[r+o])return!1;return!0}function s(e,t,r,n,o){for(let i=0;i<o;i++)r[n+i]=e[t+i]}function l(e,t,r){let n=0;for(let o=0;o<r;o++)n=e[t+o]+n|0,n=n+(n<<11)+(n>>>2)|0;return n>>>0}let c=null},71488:(e,t,r)=>{r.d(t,{Kk:()=>s,QL:()=>l,yO:()=>a});var n=r(26832),o=r(66360),i=r(21136);function a(e,t){return e.isGeographic||e.isWebMercator&&(t??!0)}function s(e,t){switch(e.type){case"georeferenced":return t.isGeographic;case"local":return t.isGeographic||t.isWebMercator}}function l(e,t,r,a){if(void 0!==a){(0,n.O2)(o.c.getLogger(e),"option: geographic",{replacement:"use mesh vertexSpace and spatial reference to control how operations are performed",version:"4.29",warnOnce:!0});const s="local"===t.type;if(!(0,i.k$)(t)||a===s)return r.isGeographic||r.isWebMercator&&a;o.c.getLogger(e).warnOnce(`Specifying the 'geographic' parameter (${a}) for a Mesh vertex space of type "${t.type}" is not supported. This parameter will be ignored.`)}return s(t,r)}},54828:(e,t,r)=>{r.d(t,{CE:()=>A,EX:()=>_,_0:()=>I,_S:()=>b,iS:()=>S,mC:()=>M,project:()=>q,qu:()=>R});var n=r(24296),o=r(68612),i=r(15008),a=r(87104),s=r(98472),l=r(62484),c=r(77556),u=r(60074),p=r(82448),f=r(51120),h=r(62880),g=r(15688),m=r(41104),y=r(21136),d=r(48952),x=r(71488),v=r(38496);function w(e,t,r){return(0,x.yO)(t.spatialReference,r?.geographic)?M(e,t,!1,r):function(e,t,r){const n=new Float64Array(e.position.length),o=e.position,i=t.x,a=t.y,s=t.z??0,l=I(r?r.unit:null,t.spatialReference);for(let e=0;e<o.length;e+=3)n[e]=o[e]*l+i,n[e+1]=o[e+1]*l+a,n[e+2]=o[e+2]*l+s;return{position:n,normal:e.normal,tangent:e.tangent}}(e,t,r)}function A(e,t=a.IJ){const{position:r,normal:n,tangent:o}=e;return{position:(0,d.a)(new Float64Array(r.length),r,t),normal:null!=n?(0,v.W4)(n,new Float32Array(n.length),t):null,tangent:null!=o?(0,v.AT)(o,new Float32Array(o.length),t):null}}function b(e,t,r,n){const{position:o,normal:i,tangent:a}=e;if(!(0,y.k$)(t))return{position:o,normal:i,tangent:a};const s=(0,y.mA)(t,n);return w(A(e,r?.localMatrix),s,{geographic:"local"===t.type})}function _(e,t,r){const n=(0,y.Al)(t,r),o=t.spatialReference,i=(0,y.k$)(n);if(!i)return{vertexAttributes:w(e,t,r),vertexSpace:n,transform:null};const{position:a,normal:s,tangent:l}=e,c=(0,x.Kk)(n,o);switch(n.type){case"georeferenced":return c?{vertexAttributes:M(e,t,i,r),vertexSpace:n,transform:null}:{vertexAttributes:{position:a,normal:s,tangent:l},vertexSpace:n,transform:new m.c};case"local":return{vertexAttributes:{position:a,normal:s,tangent:l},vertexSpace:n,transform:new m.c}}}function T(e,t,r){return(0,x.yO)(t.spatialReference,r?.geographic)?R(e,t,r):F(e,t,r)}function S(e,t,r,n,o){if(!(0,y.k$)(t))return T(e,n,o);const{spatialReference:i}=n,a=b(e,t,r,i);return n.equals((0,y.mA)(t,i))?F(a,n,o):T(a,n,o)}function q({positions:e,transform:t,vertexSpace:r,inSpatialReference:n,outSpatialReference:o,outPositions:c,localMode:m}){const y=r.origin??l.cX,x=null!=r.origin?t?.localMatrix??a.IJ:a.IJ;if("georeferenced"===r.type){const t=c??(0,g.Gg)(e.length);if((0,i.yK)(x,a.IJ)?(0,g.mw)(t,e):(0,d.a)(t,e,x),!(0,s.i)(y,l.cX)){const[e,r,n]=y;for(let o=0;o<t.length;o+=3)t[o]+=e,t[o+1]+=r,t[o+2]+=n}return(0,h.projectBuffer)(t,n,0,t,o,0,t.length/3),t}let v=n;const w=(0,p._s)(n);v=o.isWebMercator&&m||!(0,u.canProjectWithoutEngine)(n,w)?v:w,(0,f.y)(n,y,P,v),(0,i.iW)(P,P,x);const A=c??(0,g.Gg)(e.length);return(0,d.a)(A,e,P),(0,h.projectBuffer)(A,v,0,A,o,0,A.length/3),A}function M(e,t,r,n){const o=t.spatialReference,i=C(t,n,P),a=new Float64Array(e.position.length),s=function(e,t,r,n){(0,d.a)(n,e,t);const o=new Float64Array(e.length);return(0,v.o$)(n,o,r)}(e.position,i,o,a),l=(0,c.yy)(N,i),u=function(e,t,r,n,o){if(null==r)return null;const i=new Float32Array(r.length);return(0,d.b)(i,r,n),(0,v.QP)(i,e,t,o,i),i}(s,a,e.normal,l,o),p=function(e,t,r,n,o){if(null==r)return null;const i=new Float32Array(r.length);(0,d.b)(i,r,n,4);for(let e=3;e<i.length;e+=4)i[e]=r[e];return(0,v.Cr)(i,e,t,o,i),i}(s,a,e.tangent,l,o);if(r){const{x:e,y:r,z:n}=t;(0,d.t)(s,s,[-e,-r,-(n??0)])}return{position:s,normal:u,tangent:p}}function F(e,t,r){const n=new Float64Array(e.position.length),o=e.position,i=t.x,a=t.y,s=t.z??0,l=I(r?r.unit:null,t.spatialReference);for(let e=0;e<o.length;e+=3)n[e]=(o[e]-i)/l,n[e+1]=(o[e+1]-a)/l,n[e+2]=(o[e+2]-s)/l;return{position:n,normal:e.normal,tangent:e.tangent}}function R(e,t,r){const n=t.spatialReference;C(t,r,P);const o=(0,i.S_)(k,P),a=new Float64Array(e.position.length),s=function(e,t,r,n){const o=(0,v.K_)(e,t,n),i=new Float64Array(o.length);return(0,d.a)(i,o,r),i}(e.position,n,o,a),l=(0,c.yy)(N,o);return{position:s,normal:L(e.normal,e.position,a,n,l),tangent:j(e.tangent,e.position,a,n,l)}}function C(e,t,r){(0,f.y)(e.spatialReference,[e.x,e.y,e.z??0],r,(0,p._s)(e.spatialReference));const n=I(t?t.unit:null,e.spatialReference);return(0,i.aU)(r,r,[n,n,n]),r}function L(e,t,r,n,o){if(null==e)return null;const i=(0,v.cH)(e,t,r,n,new Float32Array(e.length));return(0,d.b)(i,i,o),i}function j(e,t,r,n,o){if(null==e)return null;const i=(0,v.GW)(e,t,r,n,new Float32Array(e.length));return(0,d.b)(i,i,o,4),i}function I(e,t){if(null==e)return 1;const r=(0,n.eg)(t);return 1/(0,n.ck)(r,"meters",e)}const P=(0,a.Su)(),k=(0,a.Su)(),N=(0,o.Su)()},38496:(e,t,r)=>{r.d(t,{AT:()=>b,Cr:()=>T,GW:()=>_,K_:()=>v,QP:()=>x,W4:()=>A,cH:()=>d,o$:()=>w});var n=r(66360),o=r(77556),i=r(68612),a=r(87104),s=r(98472),l=r(62484),c=r(82448),u=r(51120),p=r(62880),f=r(60544),h=r(29120),g=r(71004),m=r(48952);const y=()=>n.c.getLogger("esri.geometry.support.meshUtils.normalProjection");function d(e,t,r,n,o){return q(n)?(S(F.TO_PCPF,g.Yj.fromTypedArray(e),g.Ax.fromTypedArray(t),g.Ax.fromTypedArray(r),n,g.Yj.fromTypedArray(o)),o):(y().error("Cannot convert spatial reference to PCPF"),o)}function x(e,t,r,n,o){return q(n)?(S(F.FROM_PCPF,g.Yj.fromTypedArray(e),g.Ax.fromTypedArray(t),g.Ax.fromTypedArray(r),n,g.Yj.fromTypedArray(o)),o):(y().error("Cannot convert to spatial reference from PCPF"),o)}function v(e,t,r){return(0,p.projectBuffer)(e,t,0,r,(0,c._s)(t),0,e.length/3),r}function w(e,t,r){return(0,p.projectBuffer)(e,(0,c._s)(r),0,t,r,0,e.length/3),t}function A(e,t,r){return(0,o.yy)(I,r),(0,m.b)(t,e,I),(0,o.QT)(I)||(0,m.n)(t,t),t}function b(e,t,r){if((0,o.yy)(I,r),(0,m.b)(t,e,I,4),(0,o.QT)(I)||(0,m.n)(t,t,4),e!==t)for(let r=3;r<e.length;r+=4)t[r]=e[r];return t}function _(e,t,r,n,o){if(!q(n))return y().error("Cannot convert spatial reference to PCPF"),o;S(F.TO_PCPF,g.Yj.fromTypedArray(e,4*Float32Array.BYTES_PER_ELEMENT),g.Ax.fromTypedArray(t),g.Ax.fromTypedArray(r),n,g.Yj.fromTypedArray(o,4*Float32Array.BYTES_PER_ELEMENT));for(let t=3;t<e.length;t+=4)o[t]=e[t];return o}function T(e,t,r,n,o){if(!q(n))return y().error("Cannot convert to spatial reference from PCPF"),o;S(F.FROM_PCPF,g.Yj.fromTypedArray(e,16),g.Ax.fromTypedArray(t),g.Ax.fromTypedArray(r),n,g.Yj.fromTypedArray(o,16));for(let t=3;t<e.length;t+=4)o[t]=e[t];return o}function S(e,t,r,n,i,a){if(!t)return;const l=r.count,p=(0,c._s)(i);if(M(i))for(let r=0;r<l;r++)n.getVec(r,C),t.getVec(r,L),(0,u.y)(p,C,j,p),(0,o.kr)(I,j),e===F.FROM_PCPF&&(0,o.oL)(I,I),(0,s.t)(L,L,I),a.setVec(r,L);else for(let i=0;i<l;i++){n.getVec(i,C),t.getVec(i,L),(0,u.y)(p,C,j,p),(0,o.kr)(I,j);const l=(0,h.MB)(r.get(i,1));let c=Math.cos(l);e===F.TO_PCPF&&(c=1/c),I[0]*=c,I[1]*=c,I[2]*=c,I[3]*=c,I[4]*=c,I[5]*=c,e===F.FROM_PCPF&&(0,o.oL)(I,I),(0,s.t)(L,L,I),(0,s.n)(L,L),a.setVec(i,L)}return a}function q(e){return M(e)||function(e){return e.isWebMercator}(e)}function M(e){return e.isWGS84||(0,f.Ub)(e)||(0,f.qg)(e)||(0,f.UB)(e)}var F,R;(R=F||(F={}))[R.TO_PCPF=0]="TO_PCPF",R[R.FROM_PCPF=1]="FROM_PCPF";const C=(0,l.Su)(),L=(0,l.Su)(),j=(0,a.Su)(),I=(0,i.Su)()},21136:(e,t,r)=>{r.d(t,{Al:()=>h,GF:()=>g,k$:()=>p,mA:()=>f,mm:()=>m,wX:()=>u});var n=r(26832),o=r(66360),i=r(67776),a=r(51232),s=r(13708),l=r(48952);function c(){return o.c.getLogger("esri.geometry.Mesh")}function u(e){const{vertexSpace:t}=e;if(null!=t.origin)return e.clone();const{anchor:r}=e,n=r.clone(),o=new a.c({origin:[n.x,n.y,n.z]}),i=e.cloneWithVertexSpace(o),{position:s}=i.vertexAttributes;return i.vertexAttributes.position=(0,l.t)(new Float64Array(s.length),s,[-n.x,-n.y,-(n.z??0)]),i.vertexAttributesChanged(),i}function p(e){return null!=e.origin}function f(e,t){if(!p(e))return null;const[r,n,o]=e.origin;return new i.c({x:r,y:n,z:o,spatialReference:t})}function h(e,t){const{x:r,y:o,z:i,spatialReference:l}=e,u=[r,o,i??0];if(void 0!==t?.geographic){if((0,n.O2)(c(),"option: geographic",{replacement:"use vertexSpace option instead",version:"4.29",warnOnce:!0}),!t?.vertexSpace)return t?.geographic?new s.c({origin:u}):new a.c({origin:u});c().warn("Deprecated geographic flag ignored since vertexSpace option is provided.")}if(!t?.vertexSpace)return l.isGeographic||l.isWebMercator?new s.c({origin:u}):new a.c({origin:u});switch(t.vertexSpace){case"local":return new s.c({origin:u});case"georeferenced":return new a.c({origin:u});case"georeferenced-absolute":return new a.c}}function g(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}function m(e,t){return"local"===e?new s.c({origin:t}):new a.c({origin:t})}}}]);
|