visualizer-components 0.1.0
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/LICENSE +21 -0
- package/README.md +90 -0
- package/dist/assets/RudderIcon.d.ts +23 -0
- package/dist/assets/RudderIcon.d.ts.map +1 -0
- package/dist/assets/RudderIcon.js +23 -0
- package/dist/assets/RudderIcon.js.map +1 -0
- package/dist/assets/svgSources.d.ts +18 -0
- package/dist/assets/svgSources.d.ts.map +1 -0
- package/dist/assets/svgSources.js +18 -0
- package/dist/assets/svgSources.js.map +1 -0
- package/dist/components/Joystick.d.ts +23 -0
- package/dist/components/Joystick.d.ts.map +1 -0
- package/dist/components/Joystick.js +114 -0
- package/dist/components/Joystick.js.map +1 -0
- package/dist/components/TelemetryDashboard.d.ts +31 -0
- package/dist/components/TelemetryDashboard.d.ts.map +1 -0
- package/dist/components/TelemetryDashboard.js +127 -0
- package/dist/components/TelemetryDashboard.js.map +1 -0
- package/dist/components/controls/ControlOverlay.d.ts +64 -0
- package/dist/components/controls/ControlOverlay.d.ts.map +1 -0
- package/dist/components/controls/ControlOverlay.js +88 -0
- package/dist/components/controls/ControlOverlay.js.map +1 -0
- package/dist/components/controls/ControlsDrawer.d.ts +37 -0
- package/dist/components/controls/ControlsDrawer.d.ts.map +1 -0
- package/dist/components/controls/ControlsDrawer.js +93 -0
- package/dist/components/controls/ControlsDrawer.js.map +1 -0
- package/dist/components/controls/ForceVectorsPanel.d.ts +37 -0
- package/dist/components/controls/ForceVectorsPanel.d.ts.map +1 -0
- package/dist/components/controls/ForceVectorsPanel.js +76 -0
- package/dist/components/controls/ForceVectorsPanel.js.map +1 -0
- package/dist/components/controls/InfoPopover.d.ts +34 -0
- package/dist/components/controls/InfoPopover.d.ts.map +1 -0
- package/dist/components/controls/InfoPopover.js +41 -0
- package/dist/components/controls/InfoPopover.js.map +1 -0
- package/dist/components/controls/Legend.d.ts +29 -0
- package/dist/components/controls/Legend.d.ts.map +1 -0
- package/dist/components/controls/Legend.js +74 -0
- package/dist/components/controls/Legend.js.map +1 -0
- package/dist/components/controls/MobileBottomNav.d.ts +17 -0
- package/dist/components/controls/MobileBottomNav.d.ts.map +1 -0
- package/dist/components/controls/MobileBottomNav.js +46 -0
- package/dist/components/controls/MobileBottomNav.js.map +1 -0
- package/dist/components/hud/SceneHUD.d.ts +100 -0
- package/dist/components/hud/SceneHUD.d.ts.map +1 -0
- package/dist/components/hud/SceneHUD.js +216 -0
- package/dist/components/hud/SceneHUD.js.map +1 -0
- package/dist/components/hud/telemetry/Batteries.d.ts +40 -0
- package/dist/components/hud/telemetry/Batteries.d.ts.map +1 -0
- package/dist/components/hud/telemetry/Batteries.js +137 -0
- package/dist/components/hud/telemetry/Batteries.js.map +1 -0
- package/dist/components/hud/telemetry/Compass.d.ts +2 -0
- package/dist/components/hud/telemetry/Compass.d.ts.map +1 -0
- package/dist/components/hud/telemetry/Compass.js +147 -0
- package/dist/components/hud/telemetry/Compass.js.map +1 -0
- package/dist/components/hud/telemetry/Log.d.ts +2 -0
- package/dist/components/hud/telemetry/Log.d.ts.map +1 -0
- package/dist/components/hud/telemetry/Log.js +65 -0
- package/dist/components/hud/telemetry/Log.js.map +1 -0
- package/dist/components/hud/telemetry/Map.d.ts +4 -0
- package/dist/components/hud/telemetry/Map.d.ts.map +1 -0
- package/dist/components/hud/telemetry/Map.js +293 -0
- package/dist/components/hud/telemetry/Map.js.map +1 -0
- package/dist/components/hud/telemetry/PowerRudderPanel.d.ts +2 -0
- package/dist/components/hud/telemetry/PowerRudderPanel.d.ts.map +1 -0
- package/dist/components/hud/telemetry/PowerRudderPanel.js +115 -0
- package/dist/components/hud/telemetry/PowerRudderPanel.js.map +1 -0
- package/dist/components/hud/telemetry/RadiusVisualizer.d.ts +63 -0
- package/dist/components/hud/telemetry/RadiusVisualizer.d.ts.map +1 -0
- package/dist/components/hud/telemetry/RadiusVisualizer.js +139 -0
- package/dist/components/hud/telemetry/RadiusVisualizer.js.map +1 -0
- package/dist/components/hud/telemetry/RadiusVisualizerPanel.d.ts +31 -0
- package/dist/components/hud/telemetry/RadiusVisualizerPanel.d.ts.map +1 -0
- package/dist/components/hud/telemetry/RadiusVisualizerPanel.js +37 -0
- package/dist/components/hud/telemetry/RadiusVisualizerPanel.js.map +1 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizer.d.ts +43 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizer.d.ts.map +1 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizer.js +121 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizer.js.map +1 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.d.ts +26 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.d.ts.map +1 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.js +29 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.js.map +1 -0
- package/dist/components/hud/telemetry/SignalLog.d.ts +7 -0
- package/dist/components/hud/telemetry/SignalLog.d.ts.map +1 -0
- package/dist/components/hud/telemetry/SignalLog.js +28 -0
- package/dist/components/hud/telemetry/SignalLog.js.map +1 -0
- package/dist/components/hud/telemetry/SignalStrength.d.ts +9 -0
- package/dist/components/hud/telemetry/SignalStrength.d.ts.map +1 -0
- package/dist/components/hud/telemetry/SignalStrength.js +53 -0
- package/dist/components/hud/telemetry/SignalStrength.js.map +1 -0
- package/dist/components/hud/telemetry/Speedometer.d.ts +2 -0
- package/dist/components/hud/telemetry/Speedometer.d.ts.map +1 -0
- package/dist/components/hud/telemetry/Speedometer.js +70 -0
- package/dist/components/hud/telemetry/Speedometer.js.map +1 -0
- package/dist/components/hud/telemetry/Task.d.ts +2 -0
- package/dist/components/hud/telemetry/Task.d.ts.map +1 -0
- package/dist/components/hud/telemetry/Task.js +61 -0
- package/dist/components/hud/telemetry/Task.js.map +1 -0
- package/dist/components/hud/telemetry/TaskData.d.ts +2 -0
- package/dist/components/hud/telemetry/TaskData.d.ts.map +1 -0
- package/dist/components/hud/telemetry/TaskData.js +62 -0
- package/dist/components/hud/telemetry/TaskData.js.map +1 -0
- package/dist/components/hud/telemetry/index.d.ts +40 -0
- package/dist/components/hud/telemetry/index.d.ts.map +1 -0
- package/dist/components/hud/telemetry/index.js +40 -0
- package/dist/components/hud/telemetry/index.js.map +1 -0
- package/dist/components/hud/telemetry/powerColor.d.ts +16 -0
- package/dist/components/hud/telemetry/powerColor.d.ts.map +1 -0
- package/dist/components/hud/telemetry/powerColor.js +15 -0
- package/dist/components/hud/telemetry/powerColor.js.map +1 -0
- package/dist/components/scenes/MappingScene.d.ts +19 -0
- package/dist/components/scenes/MappingScene.d.ts.map +1 -0
- package/dist/components/scenes/MappingScene.js +353 -0
- package/dist/components/scenes/MappingScene.js.map +1 -0
- package/dist/components/scenes/SceneCanvas.d.ts +96 -0
- package/dist/components/scenes/SceneCanvas.d.ts.map +1 -0
- package/dist/components/scenes/SceneCanvas.js +151 -0
- package/dist/components/scenes/SceneCanvas.js.map +1 -0
- package/dist/components/scenes/SceneRenderer.d.ts +16 -0
- package/dist/components/scenes/SceneRenderer.d.ts.map +1 -0
- package/dist/components/scenes/SceneRenderer.js +60 -0
- package/dist/components/scenes/SceneRenderer.js.map +1 -0
- package/dist/components/scenes/TelemetryScene.d.ts +6 -0
- package/dist/components/scenes/TelemetryScene.d.ts.map +1 -0
- package/dist/components/scenes/TelemetryScene.js +6 -0
- package/dist/components/scenes/TelemetryScene.js.map +1 -0
- package/dist/components/svg/CompassRose.d.ts +129 -0
- package/dist/components/svg/CompassRose.d.ts.map +1 -0
- package/dist/components/svg/CompassRose.js +221 -0
- package/dist/components/svg/CompassRose.js.map +1 -0
- package/dist/connection/config.d.ts +41 -0
- package/dist/connection/config.d.ts.map +1 -0
- package/dist/connection/config.js +44 -0
- package/dist/connection/config.js.map +1 -0
- package/dist/contexts/SceneContext.d.ts +35 -0
- package/dist/contexts/SceneContext.d.ts.map +1 -0
- package/dist/contexts/SceneContext.js +24 -0
- package/dist/contexts/SceneContext.js.map +1 -0
- package/dist/hooks/useAutoPathAnimation.d.ts +22 -0
- package/dist/hooks/useAutoPathAnimation.d.ts.map +1 -0
- package/dist/hooks/useAutoPathAnimation.js +102 -0
- package/dist/hooks/useAutoPathAnimation.js.map +1 -0
- package/dist/hooks/useLayoutConfig.d.ts +29 -0
- package/dist/hooks/useLayoutConfig.d.ts.map +1 -0
- package/dist/hooks/useLayoutConfig.js +30 -0
- package/dist/hooks/useLayoutConfig.js.map +1 -0
- package/dist/hooks/useSceneContext.d.ts +64 -0
- package/dist/hooks/useSceneContext.d.ts.map +1 -0
- package/dist/hooks/useSceneContext.js +37 -0
- package/dist/hooks/useSceneContext.js.map +1 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +57 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/TelemetryProvider.d.ts +27 -0
- package/dist/providers/TelemetryProvider.d.ts.map +1 -0
- package/dist/providers/TelemetryProvider.js +50 -0
- package/dist/providers/TelemetryProvider.js.map +1 -0
- package/dist/providers/TelemetryThemeProvider.d.ts +25 -0
- package/dist/providers/TelemetryThemeProvider.d.ts.map +1 -0
- package/dist/providers/TelemetryThemeProvider.js +54 -0
- package/dist/providers/TelemetryThemeProvider.js.map +1 -0
- package/dist/store/actions/connectionActions.d.ts +39 -0
- package/dist/store/actions/connectionActions.d.ts.map +1 -0
- package/dist/store/actions/connectionActions.js +162 -0
- package/dist/store/actions/connectionActions.js.map +1 -0
- package/dist/store/actions/fetchTelemetry.d.ts +51 -0
- package/dist/store/actions/fetchTelemetry.d.ts.map +1 -0
- package/dist/store/actions/fetchTelemetry.js +135 -0
- package/dist/store/actions/fetchTelemetry.js.map +1 -0
- package/dist/store/index.d.ts +23 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +22 -0
- package/dist/store/index.js.map +1 -0
- package/dist/store/slices/connectionSlice.d.ts +15 -0
- package/dist/store/slices/connectionSlice.d.ts.map +1 -0
- package/dist/store/slices/connectionSlice.js +39 -0
- package/dist/store/slices/connectionSlice.js.map +1 -0
- package/dist/store/slices/discoveredGridSlice.d.ts +168 -0
- package/dist/store/slices/discoveredGridSlice.d.ts.map +1 -0
- package/dist/store/slices/discoveredGridSlice.js +146 -0
- package/dist/store/slices/discoveredGridSlice.js.map +1 -0
- package/dist/store/slices/sceneSlice.d.ts +185 -0
- package/dist/store/slices/sceneSlice.d.ts.map +1 -0
- package/dist/store/slices/sceneSlice.js +95 -0
- package/dist/store/slices/sceneSlice.js.map +1 -0
- package/dist/store/slices/simulationSlice.d.ts +87 -0
- package/dist/store/slices/simulationSlice.d.ts.map +1 -0
- package/dist/store/slices/simulationSlice.js +55 -0
- package/dist/store/slices/simulationSlice.js.map +1 -0
- package/dist/store/slices/telemetrySlice.d.ts +10 -0
- package/dist/store/slices/telemetrySlice.d.ts.map +1 -0
- package/dist/store/slices/telemetrySlice.js +88 -0
- package/dist/store/slices/telemetrySlice.js.map +1 -0
- package/dist/store/slices/videoSlice.d.ts +12 -0
- package/dist/store/slices/videoSlice.d.ts.map +1 -0
- package/dist/store/slices/videoSlice.js +27 -0
- package/dist/store/slices/videoSlice.js.map +1 -0
- package/dist/store/slices/visualizationSlice.d.ts +152 -0
- package/dist/store/slices/visualizationSlice.d.ts.map +1 -0
- package/dist/store/slices/visualizationSlice.js +58 -0
- package/dist/store/slices/visualizationSlice.js.map +1 -0
- package/dist/store/store.d.ts +61 -0
- package/dist/store/store.d.ts.map +1 -0
- package/dist/store/store.js +78 -0
- package/dist/store/store.js.map +1 -0
- package/dist/theme/index.d.ts +14 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +14 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/lightTheme.d.ts +151 -0
- package/dist/theme/lightTheme.d.ts.map +1 -0
- package/dist/theme/lightTheme.js +194 -0
- package/dist/theme/lightTheme.js.map +1 -0
- package/dist/theme/telemetryTheme.d.ts +90 -0
- package/dist/theme/telemetryTheme.d.ts.map +1 -0
- package/dist/theme/telemetryTheme.js +157 -0
- package/dist/theme/telemetryTheme.js.map +1 -0
- package/dist/types/detectedObjectsTypes.d.ts +18 -0
- package/dist/types/detectedObjectsTypes.d.ts.map +1 -0
- package/dist/types/detectedObjectsTypes.js +8 -0
- package/dist/types/detectedObjectsTypes.js.map +1 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +16 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/ros.d.ts +87 -0
- package/dist/types/ros.d.ts.map +1 -0
- package/dist/types/ros.js +17 -0
- package/dist/types/ros.js.map +1 -0
- package/dist/types/statusTypes.d.ts +81 -0
- package/dist/types/statusTypes.d.ts.map +1 -0
- package/dist/types/statusTypes.js +52 -0
- package/dist/types/statusTypes.js.map +1 -0
- package/dist/types/taskTypes.d.ts +65 -0
- package/dist/types/taskTypes.d.ts.map +1 -0
- package/dist/types/taskTypes.js +18 -0
- package/dist/types/taskTypes.js.map +1 -0
- package/dist/types/telemetryInterfaces.d.ts +81 -0
- package/dist/types/telemetryInterfaces.d.ts.map +1 -0
- package/dist/types/telemetryInterfaces.js +30 -0
- package/dist/types/telemetryInterfaces.js.map +1 -0
- package/dist/utils/basestation.d.ts +7 -0
- package/dist/utils/basestation.d.ts.map +1 -0
- package/dist/utils/basestation.js +49 -0
- package/dist/utils/basestation.js.map +1 -0
- package/dist/utils/batteryUtil.d.ts +8 -0
- package/dist/utils/batteryUtil.d.ts.map +1 -0
- package/dist/utils/batteryUtil.js +32 -0
- package/dist/utils/batteryUtil.js.map +1 -0
- package/dist/utils/telemetry/index.d.ts +13 -0
- package/dist/utils/telemetry/index.d.ts.map +1 -0
- package/dist/utils/telemetry/index.js +13 -0
- package/dist/utils/telemetry/index.js.map +1 -0
- package/dist/utils/telemetry/telemetryFactory.d.ts +48 -0
- package/dist/utils/telemetry/telemetryFactory.d.ts.map +1 -0
- package/dist/utils/telemetry/telemetryFactory.js +390 -0
- package/dist/utils/telemetry/telemetryFactory.js.map +1 -0
- package/package.json +91 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @file Joystick.tsx
|
|
4
|
+
* @description On-screen virtual joystick with left/right wheel speed bar indicators.
|
|
5
|
+
*/
|
|
6
|
+
import { useRef } from 'react';
|
|
7
|
+
import { Box, Typography } from '@mui/material';
|
|
8
|
+
import { useSpring, animated } from '@react-spring/web';
|
|
9
|
+
import { useDrag } from '@use-gesture/react';
|
|
10
|
+
// Define the hybrid component safely
|
|
11
|
+
const AnimatedBox = animated(Box);
|
|
12
|
+
/**
|
|
13
|
+
* Virtual on-screen joystick with drag-constrained knob and left/right wheel speed bars.
|
|
14
|
+
* Calls `onJoyChange` with normalised x/y values in [−1, 1] on every drag frame.
|
|
15
|
+
*/
|
|
16
|
+
function Joystick({ joy, lw, rw, onJoyChange, size = 156 }) {
|
|
17
|
+
const BAR_W = 6;
|
|
18
|
+
const BAR_H = Math.round(size * 0.705);
|
|
19
|
+
const JR = Math.round(size * 0.372);
|
|
20
|
+
const KR = Math.round(size * 0.128);
|
|
21
|
+
const [{ x: knobX, y: knobY }, knobApi] = useSpring(() => ({ x: joy.x * JR, y: -joy.y * JR }));
|
|
22
|
+
// 1. Create a ref specifically for attaching gestures to the DOM node
|
|
23
|
+
const knobRef = useRef(null);
|
|
24
|
+
// 2. Bind useDrag via target ref instead of spreading the properties directly onto the JSX
|
|
25
|
+
useDrag(({ active, movement: [mx, my], first, memo, event }) => {
|
|
26
|
+
if (first) {
|
|
27
|
+
if (event)
|
|
28
|
+
event.stopPropagation();
|
|
29
|
+
memo = [knobX.get(), knobY.get()];
|
|
30
|
+
}
|
|
31
|
+
let targetX = memo[0] + mx;
|
|
32
|
+
let targetY = memo[1] + my;
|
|
33
|
+
const distance = Math.sqrt(targetX * targetX + targetY * targetY);
|
|
34
|
+
if (distance > JR) {
|
|
35
|
+
targetX = (targetX / distance) * JR;
|
|
36
|
+
targetY = (targetY / distance) * JR;
|
|
37
|
+
}
|
|
38
|
+
if (active) {
|
|
39
|
+
// Immediate set — the knob tracks the finger 1:1 with no spring lag.
|
|
40
|
+
knobApi.set({ x: targetX, y: targetY });
|
|
41
|
+
onJoyChange({ x: targetX / JR, y: -targetY / JR });
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
// Sprung snap-back to center on release.
|
|
45
|
+
knobApi.start({ x: 0, y: 0, config: { tension: 400, friction: 28 } });
|
|
46
|
+
onJoyChange({ x: 0, y: 0 });
|
|
47
|
+
}
|
|
48
|
+
return memo;
|
|
49
|
+
}, {
|
|
50
|
+
target: knobRef, // Binds events natively directly to the element under the hood
|
|
51
|
+
eventOptions: { passive: false }
|
|
52
|
+
});
|
|
53
|
+
/** Renders the colored fill segment for a wheel-speed bar at the given normalised value. */
|
|
54
|
+
const renderBarFill = (val) => {
|
|
55
|
+
const fillH = Math.abs(val) * (BAR_H / 2);
|
|
56
|
+
const isPositive = val >= 0;
|
|
57
|
+
return (_jsx(Box, { sx: {
|
|
58
|
+
position: 'absolute',
|
|
59
|
+
left: 0,
|
|
60
|
+
width: '100%',
|
|
61
|
+
height: `${fillH}px`,
|
|
62
|
+
backgroundColor: isPositive ? '#4aaeff' : '#ff8844',
|
|
63
|
+
bottom: isPositive ? '50%' : 'auto',
|
|
64
|
+
top: isPositive ? 'auto' : '50%',
|
|
65
|
+
borderRadius: isPositive ? '3px 3px 0 0' : '0 0 3px 3px',
|
|
66
|
+
} }));
|
|
67
|
+
};
|
|
68
|
+
return (_jsxs(Box, { sx: { display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 0.5, userSelect: 'none' }, children: [_jsxs(Box, { style: { width: size, height: size, position: 'relative', overflow: 'hidden' }, children: [_jsxs(Box, { sx: { position: 'absolute', left: 3, top: (size - BAR_H) / 2, width: BAR_W, height: BAR_H, bgcolor: 'rgba(40,60,100,0.5)', border: '0.5px solid rgba(100,160,220,0.25)', borderRadius: '3px', overflow: 'hidden' }, children: [_jsx(Box, { sx: { position: 'absolute', top: '50%', left: 0, width: '100%', height: '0.5px', bgcolor: 'rgba(100,160,220,0.3)' } }), renderBarFill(lw)] }), _jsxs(Box, { sx: { position: 'absolute', right: 9, top: (size - BAR_H) / 2, width: BAR_W, height: BAR_H, bgcolor: 'rgba(40,60,100,0.5)', border: '0.5px solid rgba(100,160,220,0.25)', borderRadius: '3px', overflow: 'hidden' }, children: [_jsx(Box, { sx: { position: 'absolute', top: '50%', left: 0, width: '100%', height: '0.5px', bgcolor: 'rgba(100,160,220,0.3)' } }), renderBarFill(rw)] }), _jsx(Box, { sx: {
|
|
69
|
+
position: 'absolute',
|
|
70
|
+
left: '50%',
|
|
71
|
+
top: '50%',
|
|
72
|
+
transform: 'translate(-50%, -50%)',
|
|
73
|
+
width: JR * 2,
|
|
74
|
+
height: JR * 2,
|
|
75
|
+
borderRadius: '50%',
|
|
76
|
+
bgcolor: 'rgba(20,35,70,0.7)',
|
|
77
|
+
border: '1.5px solid rgba(100,160,220,0.4)',
|
|
78
|
+
'&::before, &::after': {
|
|
79
|
+
content: '""',
|
|
80
|
+
position: 'absolute',
|
|
81
|
+
bgcolor: 'rgba(100,160,220,0.2)',
|
|
82
|
+
},
|
|
83
|
+
'&::before': { top: '50%', left: 0, right: 0, height: '0.5px' },
|
|
84
|
+
'&::after': { left: '50%', top: 0, bottom: 0, width: '0.5px' },
|
|
85
|
+
}, children: _jsx(AnimatedBox, { ref: knobRef, style: {
|
|
86
|
+
x: knobX,
|
|
87
|
+
y: knobY,
|
|
88
|
+
touchAction: 'none',
|
|
89
|
+
}, sx: {
|
|
90
|
+
position: 'absolute',
|
|
91
|
+
left: `calc(50% - ${KR}px)`,
|
|
92
|
+
top: `calc(50% - ${KR}px)`,
|
|
93
|
+
width: KR * 2,
|
|
94
|
+
height: KR * 2,
|
|
95
|
+
borderRadius: '50%',
|
|
96
|
+
bgcolor: '#1a4fcc',
|
|
97
|
+
border: '1.5px solid #4aaeff',
|
|
98
|
+
boxShadow: '1px 2px 0px rgba(0,0,0,0.2)',
|
|
99
|
+
cursor: 'grab',
|
|
100
|
+
display: 'flex',
|
|
101
|
+
alignItems: 'center',
|
|
102
|
+
justifyContent: 'center',
|
|
103
|
+
'&:active': { cursor: 'grabbing', bgcolor: '#2a6fff' },
|
|
104
|
+
}, children: _jsx(Box, { sx: {
|
|
105
|
+
width: 0,
|
|
106
|
+
height: 0,
|
|
107
|
+
borderLeft: `${KR * 0.38}px solid transparent`,
|
|
108
|
+
borderRight: `${KR * 0.38}px solid transparent`,
|
|
109
|
+
borderBottom: `${KR * 0.8}px solid rgba(120,210,255,0.9)`,
|
|
110
|
+
transform: 'translateY(-10%)',
|
|
111
|
+
} }) }) })] }), _jsxs(Box, { sx: { display: 'flex', justifyContent: 'space-between', width: size, px: 1 }, children: [_jsx(Typography, { variant: "caption", sx: { color: 'text.secondary', fontFamily: 'inherit' }, children: "L" }), _jsx(Typography, { variant: "caption", sx: { color: 'text.secondary', fontFamily: 'inherit' }, children: "R" })] })] }));
|
|
112
|
+
}
|
|
113
|
+
export default Joystick;
|
|
114
|
+
//# sourceMappingURL=Joystick.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Joystick.js","sourceRoot":"","sources":["../../src/components/Joystick.tsx"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,qCAAqC;AACrC,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;AAgBlC;;;GAGG;AACH,SAAS,QAAQ,CAAC,EAAE,GAA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EAAE,SAAS,EAAE,kBAAgB,IAChG,IACF,CACP,CAAC;AACJ,CAAC;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file TelemetryDashboard.tsx
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* This component serves as the main telemetry dashboard for the ASV.
|
|
6
|
+
* It aggregates various telemetry components such as the map, speedometer, compass, task information, battery levels, signal strength, and a live log of telemetry events.
|
|
7
|
+
* The dashboard is designed to provide a comprehensive overview of the ASV's status and performance in real-time.
|
|
8
|
+
*
|
|
9
|
+
* @author Carson Fujita
|
|
10
|
+
* @license MIT
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* - The component uses React and Material-UI for the user interface, and Redux for state management.
|
|
14
|
+
* - It includes a background image stream from the ASV, overlaid with telemetry data and a collapsible log drawer at the bottom.
|
|
15
|
+
* - When there is no stream and no `placeholderSrc` prop, a themed empty background is shown instead.
|
|
16
|
+
* - The dashboard is responsive, with adjustments for mobile and desktop views.
|
|
17
|
+
* - The border color of the dashboard changes based on the ASV's status to provide a quick visual indicator of its condition.
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <TelemetryDashboard placeholderSrc={fallbackJpg} title="Live Log" />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export interface TelemetryDashboardProps {
|
|
24
|
+
/** Image shown behind the dashboard when no video stream is available. */
|
|
25
|
+
placeholderSrc?: string;
|
|
26
|
+
/** Label of the collapsible log drawer header. */
|
|
27
|
+
title?: string;
|
|
28
|
+
}
|
|
29
|
+
declare const TelemetryDashboard: React.FC<TelemetryDashboardProps>;
|
|
30
|
+
export default TelemetryDashboard;
|
|
31
|
+
//# sourceMappingURL=TelemetryDashboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TelemetryDashboard.d.ts","sourceRoot":"","sources":["../../src/components/TelemetryDashboard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAsCH,MAAM,WAAW,uBAAuB;IACvC,0EAA0E;IAC1E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA8KzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @file TelemetryDashboard.tsx
|
|
4
|
+
*
|
|
5
|
+
* @description
|
|
6
|
+
* This component serves as the main telemetry dashboard for the ASV.
|
|
7
|
+
* It aggregates various telemetry components such as the map, speedometer, compass, task information, battery levels, signal strength, and a live log of telemetry events.
|
|
8
|
+
* The dashboard is designed to provide a comprehensive overview of the ASV's status and performance in real-time.
|
|
9
|
+
*
|
|
10
|
+
* @author Carson Fujita
|
|
11
|
+
* @license MIT
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* - The component uses React and Material-UI for the user interface, and Redux for state management.
|
|
15
|
+
* - It includes a background image stream from the ASV, overlaid with telemetry data and a collapsible log drawer at the bottom.
|
|
16
|
+
* - When there is no stream and no `placeholderSrc` prop, a themed empty background is shown instead.
|
|
17
|
+
* - The dashboard is responsive, with adjustments for mobile and desktop views.
|
|
18
|
+
* - The border color of the dashboard changes based on the ASV's status to provide a quick visual indicator of its condition.
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <TelemetryDashboard placeholderSrc={fallbackJpg} title="Live Log" />
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
/*
|
|
25
|
+
MIT License
|
|
26
|
+
|
|
27
|
+
Copyright (c) 2026 HumberASV
|
|
28
|
+
Copyright (c) 2026 Carson Fujita
|
|
29
|
+
|
|
30
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
31
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
32
|
+
in the Software without restriction, including without limitation the rights
|
|
33
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
34
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
35
|
+
furnished to do so, subject to the following conditions:
|
|
36
|
+
|
|
37
|
+
The above copyright notice and this permission notice shall be included in all
|
|
38
|
+
copies or substantial portions of the Software.
|
|
39
|
+
|
|
40
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
41
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
42
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
43
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
44
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
45
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
46
|
+
SOFTWARE.
|
|
47
|
+
*/
|
|
48
|
+
import { Map, Speedometer, Compass, Task, Batteries, TaskData, PowerRudderPanel, SignalStrength } from "./hud/telemetry";
|
|
49
|
+
import SignalLog from "./hud/telemetry/SignalLog";
|
|
50
|
+
import { useSelector, useDispatch } from "react-redux";
|
|
51
|
+
import { useEffect, useState } from "react";
|
|
52
|
+
import { Box, useTheme, Typography } from "@mui/material";
|
|
53
|
+
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
|
|
54
|
+
import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp";
|
|
55
|
+
import { retryConnection } from "../store/actions/connectionActions";
|
|
56
|
+
const TelemetryDashboard = ({ placeholderSrc, title = "Live Log Laugh" }) => {
|
|
57
|
+
const theme = useTheme();
|
|
58
|
+
const connectionStatus = useSelector((state) => state.connection.status);
|
|
59
|
+
const dispatch = useDispatch();
|
|
60
|
+
const [drawerCollapsed, setDrawerCollapsed] = useState(false);
|
|
61
|
+
// Retry the real connection whenever it falls back to mock mode.
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
if (connectionStatus !== "mock")
|
|
64
|
+
return;
|
|
65
|
+
const timer = setTimeout(() => {
|
|
66
|
+
dispatch(retryConnection());
|
|
67
|
+
}, 5000);
|
|
68
|
+
return () => clearTimeout(timer);
|
|
69
|
+
}, [connectionStatus, dispatch]);
|
|
70
|
+
const renderMap = () => {
|
|
71
|
+
if (hasGridData) {
|
|
72
|
+
return _jsx(Map, {});
|
|
73
|
+
}
|
|
74
|
+
return _jsx("div", { children: "Loading telemetry..." });
|
|
75
|
+
};
|
|
76
|
+
const imageStream = useSelector((state) => state.video.streamUrl || "");
|
|
77
|
+
const occupancyGrid = useSelector((state) => state.telemetry.map.occupancyGrid);
|
|
78
|
+
const navigationGrid = useSelector((state) => state.telemetry.map.navigationGrid);
|
|
79
|
+
const status = useSelector((state) => state.telemetry.planning.status || "idle");
|
|
80
|
+
const hasGridData = occupancyGrid && navigationGrid;
|
|
81
|
+
const borderColor = theme.palette.status.primary[status];
|
|
82
|
+
return (_jsxs(Box, { sx: { position: "relative", width: "100%", height: "100vh", overflow: "auto", backgroundColor: theme.palette.background.default }, children: [_jsx(Box, { sx: {
|
|
83
|
+
position: "absolute",
|
|
84
|
+
top: 0,
|
|
85
|
+
left: 0,
|
|
86
|
+
width: "100%",
|
|
87
|
+
height: "100%",
|
|
88
|
+
overflow: "hidden",
|
|
89
|
+
zIndex: 0,
|
|
90
|
+
}, children: imageStream || placeholderSrc ? (_jsx(Box, { component: "img", src: imageStream || placeholderSrc, alt: "", sx: { width: "100%", height: "100%", objectFit: "cover", display: "block" } })) : (_jsx(Box, { sx: { width: "100%", height: "100%", backgroundColor: theme.palette.telemetry?.background.empty } })) }), _jsxs(Box, { sx: {
|
|
91
|
+
position: "relative",
|
|
92
|
+
zIndex: 1,
|
|
93
|
+
width: "100%",
|
|
94
|
+
height: "100%",
|
|
95
|
+
display: "flex",
|
|
96
|
+
flexDirection: "column",
|
|
97
|
+
border: `4px solid ${borderColor}`,
|
|
98
|
+
boxSizing: "border-box",
|
|
99
|
+
backgroundColor: theme.palette.telemetry?.background.overlay,
|
|
100
|
+
transition: "border-color 0.3s ease-out",
|
|
101
|
+
}, children: [_jsxs(Box, { sx: { display: { xs: "none", md: "flex" }, gap: 1, p: 0.75, alignItems: "stretch" }, children: [_jsx(Box, { sx: { order: { xs: 1, md: 1 } }, children: _jsx(Speedometer, {}) }), _jsx(Box, { sx: { flex: 0, order: { xs: 1, md: 2 }, minWidth: "10%" }, children: _jsx(Task, {}) }), _jsx(Box, { sx: { flex: 1, minWidth: 0, order: { xs: 1, md: 2 }, flexGrow: 1 }, children: _jsx(Compass, {}) }), _jsxs(Box, { sx: {
|
|
102
|
+
order: { xs: 1, md: 3 },
|
|
103
|
+
backgroundColor: theme.palette.telemetry?.background.primary,
|
|
104
|
+
border: `1px solid ${theme.palette.telemetry?.border.light}`,
|
|
105
|
+
borderRadius: 2,
|
|
106
|
+
padding: 1,
|
|
107
|
+
display: "flex",
|
|
108
|
+
flexDirection: "row",
|
|
109
|
+
justifyContent: "center",
|
|
110
|
+
alignItems: "center",
|
|
111
|
+
gap: 10,
|
|
112
|
+
}, children: [_jsx(SignalStrength, { size: 15 }), _jsx(Batteries, {})] })] }), _jsx(Box, { sx: { display: { xs: "flex", md: "none" }, gap: 0.5, px: 0.5, pt: 0.5, pb: 0.25, alignItems: "stretch" }, children: _jsx(Box, { sx: { flex: 1, minWidth: 0 }, children: _jsx(Compass, {}) }) }), _jsxs(Box, { sx: { display: { xs: "flex", md: "none" }, gap: 0.5, px: 0.5, pb: 0.25, alignItems: "stretch" }, children: [_jsx(Box, { sx: { flex: 1, minWidth: 0 }, children: _jsx(Speedometer, {}) }), _jsx(Box, { sx: { flex: 1, minWidth: 0 }, children: _jsx(Batteries, {}) })] }), _jsx(Box, { sx: { flex: 1, minWidth: 0, px: { xs: 0.5, md: 1.5 }, pt: 0.25, pb: 0.25, overflow: "hidden" }, children: _jsx(Box, { sx: { height: { xs: "1vh", md: "6vh" } } }) }), _jsxs(Box, { sx: { display: "flex", flexDirection: "row", flexAlign: "stretch" }, children: [_jsx(Box, { sx: { width: 260, flexShrink: 0, }, children: _jsx(PowerRudderPanel, {}) }), _jsx(Box, { sx: { flex: 1, minWidth: 0 }, children: _jsx(TaskData, {}) }), _jsx(Box, { sx: { width: 250, flexShrink: 0 }, children: renderMap() })] }), _jsx(Box, { sx: { flex: "0 0 auto", backgroundColor: theme.palette.telemetry?.background.primary, textAlign: "center", fontSize: "12px", color: borderColor }, children: _jsxs(Box, { sx: { display: "flex", flexDirection: "column", overflow: "hidden", alignItems: "stretch" }, children: [_jsxs(Box, { sx: {
|
|
113
|
+
width: "100%",
|
|
114
|
+
display: "flex",
|
|
115
|
+
alignItems: "center",
|
|
116
|
+
justifyContent: "space-between",
|
|
117
|
+
px: 1,
|
|
118
|
+
py: 0.5,
|
|
119
|
+
cursor: "pointer",
|
|
120
|
+
userSelect: "none",
|
|
121
|
+
backgroundColor: theme.palette.telemetry?.background.header,
|
|
122
|
+
borderBottom: drawerCollapsed ? "none" : `1px solid ${theme.palette.telemetry?.border.lighter}`,
|
|
123
|
+
flexShrink: 0,
|
|
124
|
+
}, onClick: () => setDrawerCollapsed((value) => !value), children: [_jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [_jsx(Box, { sx: { width: 10, height: 10, borderRadius: "999px", backgroundColor: borderColor } }), _jsx(Typography, { sx: { fontSize: 12, fontWeight: 700, color: theme.palette.text.primary }, children: title })] }), _jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 0.5, color: theme.palette.telemetry?.text.secondary }, children: [_jsx(Box, { sx: { fontSize: 11, fontWeight: 700 }, children: drawerCollapsed ? "Expand" : "Collapse" }), drawerCollapsed ? _jsx(KeyboardArrowUpIcon, { fontSize: "small" }) : _jsx(KeyboardArrowDownIcon, { fontSize: "small" })] })] }), !drawerCollapsed && _jsx(SignalLog, { width: "100%", height: "100%" })] }) })] })] }));
|
|
125
|
+
};
|
|
126
|
+
export default TelemetryDashboard;
|
|
127
|
+
//# sourceMappingURL=TelemetryDashboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TelemetryDashboard.js","sourceRoot":"","sources":["../../src/components/TelemetryDashboard.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AAEF,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACzH,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE1D,OAAO,qBAAqB,MAAM,uCAAuC,CAAC;AAC1E,OAAO,mBAAmB,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAUrE,MAAM,kBAAkB,GAAsC,CAAC,EAAE,cAAc,EAAE,KAAK,GAAG,gBAAgB,EAAE,EAAE,EAAE;IAC9G,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,gBAAgB,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IACpF,MAAM,QAA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AG,IACxD,GACD,IACD,IACD,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file ControlOverlay.tsx
|
|
3
|
+
* @description UI overlay containing sliders and buttons to control the mapping visualizer state.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* This component provides a user interface overlay for controlling various aspects of the mapping visualizer, including heading and velocity sliders, as well as toggle buttons for visual elements like grids, axes, legends, course trails, and fog of war.
|
|
7
|
+
* It uses Material-UI components for styling and layout, and interacts with the Redux store to read and update the application state.
|
|
8
|
+
* The overlay can be configured to show or hide specific controls based on the provided props.
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
/**
|
|
12
|
+
* @interface ControlOverlayProps
|
|
13
|
+
* @description Properties for the {@link ControlOverlay} component.
|
|
14
|
+
* @see {@link ControlOverlay}
|
|
15
|
+
* @property {boolean} [showLocalRotation] - If true, shows the local rotation (heading) slider.
|
|
16
|
+
* @property {boolean} [showVelocity] - If true, shows the velocity slider.
|
|
17
|
+
* @property {boolean} [showGlobalX] - If true, shows the global X-axis toggle button.
|
|
18
|
+
* @property {boolean} [showGlobalY] - If true, shows the global Y-axis toggle button.
|
|
19
|
+
* @property {boolean} [showGlobalGrid] - If true, shows the global grid toggle button.
|
|
20
|
+
* @property {boolean} [showGlobalAxes] - If true, shows the global axes toggle button.
|
|
21
|
+
* @property {boolean} [showLocalAxes] - If true, shows the local axes toggle button.
|
|
22
|
+
* @property {boolean} [showLocalGrid] - If true, shows the local grid toggle button.
|
|
23
|
+
* @property {boolean} [showLegend] - If true, shows the legend toggle button.
|
|
24
|
+
* @property {boolean} [showCourseTrail] - If true, shows the course trail toggle button.
|
|
25
|
+
* @property {boolean} [showFogOfWar] - If true, shows the fog of war toggle button.
|
|
26
|
+
* @property {boolean} [showObjectHeading] - If true, shows the object heading slider.
|
|
27
|
+
* @property {boolean} [showCurrentHeading] - If true, shows the current heading slider.
|
|
28
|
+
* @property {boolean} [showCurrentSpeed] - If true, shows the current speed slider.
|
|
29
|
+
* @property {number} [velocityMax] - The maximum value for the velocity slider. Defaults to 2 m/s.
|
|
30
|
+
* @property {string} [title] - The title displayed at the top of the overlay. Defaults to "Simulation Controls".
|
|
31
|
+
* @property {boolean} [isLocked] - When true, disables sliders (live data is driving values). Defaults to false.
|
|
32
|
+
*/
|
|
33
|
+
interface ControlOverlayProps {
|
|
34
|
+
showLocalRotation?: boolean;
|
|
35
|
+
showVelocity?: boolean;
|
|
36
|
+
showGlobalX?: boolean;
|
|
37
|
+
showGlobalY?: boolean;
|
|
38
|
+
showGlobalGrid?: boolean;
|
|
39
|
+
showGlobalAxes?: boolean;
|
|
40
|
+
showLocalAxes?: boolean;
|
|
41
|
+
showLocalGrid?: boolean;
|
|
42
|
+
showLegend?: boolean;
|
|
43
|
+
showCourseTrail?: boolean;
|
|
44
|
+
showFogOfWar?: boolean;
|
|
45
|
+
showObjectHeading?: boolean;
|
|
46
|
+
showCurrentHeading?: boolean;
|
|
47
|
+
showCurrentSpeed?: boolean;
|
|
48
|
+
velocityMax?: number;
|
|
49
|
+
title?: string;
|
|
50
|
+
/** When true, simulation sliders are disabled (live data is driving values). */
|
|
51
|
+
isLocked?: boolean;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* @component ControlOverlay
|
|
55
|
+
* @description UI overlay containing sliders and buttons to control the mapping visualizer state.
|
|
56
|
+
* @param {ControlOverlayProps} props - Properties for the component.
|
|
57
|
+
* @remarks
|
|
58
|
+
* The ControlOverlay component provides a user interface overlay for controlling various aspects of the mapping visualizer,
|
|
59
|
+
* including heading and velocity sliders, as well as toggle buttons for visual elements like grids, axes, legends,
|
|
60
|
+
* course trails, and fog of war.
|
|
61
|
+
*/
|
|
62
|
+
export declare const ControlOverlay: React.FC<ControlOverlayProps>;
|
|
63
|
+
export {};
|
|
64
|
+
//# sourceMappingURL=ControlOverlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ControlOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/controls/ControlOverlay.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAyC,MAAM,OAAO,CAAC;AAW9D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,UAAU,mBAAmB;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gFAAgF;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AACD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwQxD,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @file ControlOverlay.tsx
|
|
4
|
+
* @description UI overlay containing sliders and buttons to control the mapping visualizer state.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* This component provides a user interface overlay for controlling various aspects of the mapping visualizer, including heading and velocity sliders, as well as toggle buttons for visual elements like grids, axes, legends, course trails, and fog of war.
|
|
8
|
+
* It uses Material-UI components for styling and layout, and interacts with the Redux store to read and update the application state.
|
|
9
|
+
* The overlay can be configured to show or hide specific controls based on the provided props.
|
|
10
|
+
*/
|
|
11
|
+
import React, { useTransition, startTransition } from 'react';
|
|
12
|
+
import { Paper, Typography, Box, Slider, Button, Stack, Tooltip, alpha, useTheme } from '@mui/material';
|
|
13
|
+
import { darken } from '@mui/material/styles';
|
|
14
|
+
import { useAppSelector, useAppDispatch } from '../../store/store';
|
|
15
|
+
import { setCurrentHeading, setCurrentSpeed } from '../../store/slices/simulationSlice';
|
|
16
|
+
import { setShowGlobalGrid, setShowGlobalAxes, setShowLocalAxes, setShowLocalGrid, setShowLegend, setShowCourseTrail, setShowFogOfWar, } from '../../store/slices/visualizationSlice';
|
|
17
|
+
import { setASVSpeed, setASVHeading } from '../../store/slices/telemetrySlice';
|
|
18
|
+
/**
|
|
19
|
+
* @component ControlOverlay
|
|
20
|
+
* @description UI overlay containing sliders and buttons to control the mapping visualizer state.
|
|
21
|
+
* @param {ControlOverlayProps} props - Properties for the component.
|
|
22
|
+
* @remarks
|
|
23
|
+
* The ControlOverlay component provides a user interface overlay for controlling various aspects of the mapping visualizer,
|
|
24
|
+
* including heading and velocity sliders, as well as toggle buttons for visual elements like grids, axes, legends,
|
|
25
|
+
* course trails, and fog of war.
|
|
26
|
+
*/
|
|
27
|
+
export const ControlOverlay = ({ showLocalRotation = false, showVelocity = false, showGlobalGrid = false, showGlobalAxes = false, showLocalAxes = false, showLocalGrid = false, showLegend = false, showCourseTrail = false, showFogOfWar = false, showObjectHeading = false, showCurrentHeading = false, showCurrentSpeed = false, velocityMax = 2, title = "Simulation Controls", isLocked = false, }) => {
|
|
28
|
+
const theme = useTheme();
|
|
29
|
+
const dispatch = useAppDispatch();
|
|
30
|
+
const [isPending, startSliderTransition] = useTransition();
|
|
31
|
+
// Read values from the Redux store
|
|
32
|
+
const heading = useAppSelector(state => state.telemetry.asv.heading);
|
|
33
|
+
const speed = useAppSelector(state => state.telemetry.asv.speed);
|
|
34
|
+
const currentHeading = useAppSelector(state => state.simulation.currentHeading);
|
|
35
|
+
const currentSpeed = useAppSelector(state => state.simulation.currentSpeed);
|
|
36
|
+
const gridEnabled = useAppSelector(state => state.visualization.showGlobalGrid);
|
|
37
|
+
const globalAxesEnabled = useAppSelector(state => state.visualization.showGlobalAxes);
|
|
38
|
+
const axesEnabled = useAppSelector(state => state.visualization.showLocalAxes);
|
|
39
|
+
const localGridEnabled = useAppSelector(state => state.visualization.showLocalGrid);
|
|
40
|
+
const legendEnabled = useAppSelector(state => state.visualization.showLegend);
|
|
41
|
+
const courseTrailEnabled = useAppSelector(state => state.visualization.showCourseTrail);
|
|
42
|
+
const fogOfWarEnabled = useAppSelector(state => state.visualization.showFogOfWar);
|
|
43
|
+
const hasMainControls = showLocalRotation || showVelocity || showObjectHeading || showCurrentHeading || showCurrentSpeed;
|
|
44
|
+
const hasToggleControls = showGlobalGrid || showGlobalAxes || showLocalAxes || showLocalGrid || showLegend || showCourseTrail || showFogOfWar;
|
|
45
|
+
return (_jsxs(Stack, { spacing: 2, children: [hasMainControls && (_jsxs(Paper, { sx: {
|
|
46
|
+
p: 2, bgcolor: theme.palette.gui.primary, backdropFilter: 'blur(10px)', borderRadius: 3, color: theme.palette.common.white,
|
|
47
|
+
border: `1px solid ${alpha(theme.palette.common.white, 0.1)}`
|
|
48
|
+
}, children: [_jsxs(Box, { sx: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 2 }, children: [_jsxs(Typography, { variant: "subtitle2", sx: { fontWeight: 800, fontSize: '0.75rem', textTransform: 'uppercase', color: theme.palette.primary.light }, children: [title, isPending ? ' …' : ''] }), isLocked && (_jsx(Typography, { sx: { fontSize: '0.65rem', fontWeight: 700, color: theme.palette.status.primary.autonomous, textTransform: 'uppercase', letterSpacing: '0.08em' }, children: "\u25CF LIVE" }))] }), _jsxs(Stack, { spacing: 2.5, children: [showLocalRotation && (_jsxs(Box, { children: [_jsxs(Box, { sx: { display: 'flex', justifyContent: 'space-between', mb: 0.5 }, children: [_jsx(Typography, { sx: { color: theme.palette.map.grid, fontSize: '0.75rem' }, children: "Heading (\u00B0)" }), _jsxs(Typography, { sx: { color: theme.palette.sim.manual, fontFamily: 'monospace', fontSize: '0.75rem' }, children: [heading, "\u00B0"] })] }), _jsx(Slider, { size: "small", min: 0, max: 359, step: 1, value: heading, onChange: (_, val) => startSliderTransition(() => { dispatch(setASVHeading(val)); }), disabled: isLocked, valueLabelDisplay: "auto", valueLabelFormat: (v) => `${v}°`, sx: { color: theme.palette.map.drag } })] })), showVelocity && (_jsxs(Box, { children: [_jsxs(Box, { sx: { display: 'flex', justifyContent: 'space-between', mb: 0.5 }, children: [_jsx(Typography, { sx: { color: theme.palette.map.grid, fontSize: '0.75rem' }, children: "Velocity" }), _jsx(Typography, { sx: { color: theme.palette.map.yAxis, fontFamily: 'monospace', fontSize: '0.75rem' }, children: speed.toFixed(2) })] }), _jsx(Slider, { size: "small", min: 0, max: velocityMax, step: 0.01, value: speed, onChange: (_, val) => startSliderTransition(() => { dispatch(setASVSpeed(val)); }), disabled: isLocked, valueLabelDisplay: "auto", valueLabelFormat: (v) => v.toFixed(2), sx: { color: theme.palette.map.yAxis } })] })), showObjectHeading && (_jsxs(Box, { children: [_jsxs(Box, { sx: { display: 'flex', justifyContent: 'space-between', mb: 0.5 }, children: [_jsx(Typography, { sx: { color: theme.palette.map.grid, fontSize: '0.75rem' }, children: "Object Heading (\u00B0)" }), _jsxs(Typography, { sx: { color: theme.palette.map.drag, fontFamily: 'monospace', fontSize: '0.75rem' }, children: [heading, "\u00B0"] })] }), _jsx(Slider, { size: "small", min: 0, max: 359, step: 1, value: heading, onChange: (_, val) => startSliderTransition(() => { dispatch(setASVHeading(val)); }), disabled: isLocked, valueLabelDisplay: "auto", valueLabelFormat: (v) => `${v}°`, sx: { color: theme.palette.map.drag } })] })), showCurrentHeading && (_jsxs(Box, { children: [_jsxs(Box, { sx: { display: 'flex', justifyContent: 'space-between', mb: 0.5 }, children: [_jsx(Typography, { sx: { color: theme.palette.map.grid, fontSize: '0.75rem' }, children: "Current Heading (\u00B0)" }), _jsxs(Typography, { sx: { color: theme.palette.sim.connecting, fontFamily: 'monospace', fontSize: '0.75rem' }, children: [currentHeading, "\u00B0"] })] }), _jsx(Slider, { size: "small", min: 0, max: 360, step: 1, value: currentHeading, onChange: (_, val) => startSliderTransition(() => { dispatch(setCurrentHeading(val)); }), disabled: isLocked, valueLabelDisplay: "auto", valueLabelFormat: (v) => `${v}°`, sx: { color: theme.palette.map.current } })] })), showCurrentSpeed && (_jsxs(Box, { children: [_jsxs(Box, { sx: { display: 'flex', justifyContent: 'space-between', mb: 0.5 }, children: [_jsx(Typography, { sx: { color: theme.palette.map.grid, fontSize: '0.75rem' }, children: "Current Speed (m/s)" }), _jsx(Typography, { sx: { color: theme.palette.map.current, fontFamily: 'monospace', fontSize: '0.75rem' }, children: currentSpeed.toFixed(1) })] }), _jsx(Slider, { size: "small", min: 0, max: 5, step: 0.1, value: currentSpeed, onChange: (_, val) => startSliderTransition(() => { dispatch(setCurrentSpeed(val)); }), disabled: isLocked, valueLabelDisplay: "auto", valueLabelFormat: (v) => `${v.toFixed(1)} m/s`, sx: { color: theme.palette.map.current } })] }))] })] })), hasToggleControls && (_jsxs(Paper, { sx: {
|
|
49
|
+
p: 2, bgcolor: theme.palette.gui.primary, backdropFilter: 'blur(10px)', borderRadius: 3, color: theme.palette.common.white,
|
|
50
|
+
border: `1px solid ${alpha(theme.palette.common.white, 0.1)}`
|
|
51
|
+
}, children: [_jsx(Typography, { variant: "subtitle2", sx: { fontWeight: 800, mb: 1.5, fontSize: '0.75rem', textTransform: 'uppercase', color: theme.palette.primary.light }, children: "Visual Toggles" }), _jsxs(Box, { sx: { display: 'flex', flexWrap: 'wrap', gap: 1 }, children: [showGlobalGrid && (_jsx(Tooltip, { title: "Toggle the global coordinate grid overlay", placement: "top", children: _jsx(Button, { variant: "contained", size: "small", onClick: () => startTransition(() => { dispatch(setShowGlobalGrid(!gridEnabled)); }), sx: {
|
|
52
|
+
bgcolor: gridEnabled ? 'primary.main' : theme.palette.gui.secondary,
|
|
53
|
+
color: gridEnabled ? theme.palette.common.white : theme.palette.gui.muted,
|
|
54
|
+
fontSize: '0.75rem', textTransform: 'none',
|
|
55
|
+
'&:hover': { bgcolor: gridEnabled ? 'primary.dark' : theme.palette.gui.faint }
|
|
56
|
+
}, children: "Global Grid" }) })), showGlobalAxes && (_jsx(Tooltip, { title: "Toggle the global X/Y origin axes", placement: "top", children: _jsx(Button, { variant: "contained", size: "small", onClick: () => startTransition(() => { dispatch(setShowGlobalAxes(!globalAxesEnabled)); }), sx: {
|
|
57
|
+
bgcolor: globalAxesEnabled ? 'primary.main' : theme.palette.gui.secondary,
|
|
58
|
+
color: globalAxesEnabled ? theme.palette.common.white : theme.palette.gui.muted,
|
|
59
|
+
fontSize: '0.75rem', textTransform: 'none',
|
|
60
|
+
'&:hover': { bgcolor: globalAxesEnabled ? 'primary.dark' : theme.palette.gui.faint }
|
|
61
|
+
}, children: "Global Axes" }) })), showLocalAxes && (_jsx(Tooltip, { title: "Toggle the vessel's local coordinate axes", placement: "top", children: _jsx(Button, { variant: "contained", size: "small", onClick: () => startTransition(() => { dispatch(setShowLocalAxes(!axesEnabled)); }), sx: {
|
|
62
|
+
bgcolor: axesEnabled ? 'primary.main' : theme.palette.gui.secondary,
|
|
63
|
+
color: axesEnabled ? theme.palette.common.white : theme.palette.gui.muted,
|
|
64
|
+
fontSize: '0.75rem', textTransform: 'none',
|
|
65
|
+
'&:hover': { bgcolor: axesEnabled ? 'primary.dark' : theme.palette.gui.faint }
|
|
66
|
+
}, children: "Local Axes" }) })), showLocalGrid && (_jsx(Tooltip, { title: "Toggle the fine-resolution local grid around the vessel", placement: "top", children: _jsx(Button, { variant: "contained", size: "small", onClick: () => startTransition(() => { dispatch(setShowLocalGrid(!localGridEnabled)); }), sx: {
|
|
67
|
+
bgcolor: localGridEnabled ? 'primary.main' : theme.palette.gui.secondary,
|
|
68
|
+
color: localGridEnabled ? theme.palette.common.white : theme.palette.gui.muted,
|
|
69
|
+
fontSize: '0.75rem', textTransform: 'none',
|
|
70
|
+
'&:hover': { bgcolor: localGridEnabled ? 'primary.dark' : theme.palette.gui.faint }
|
|
71
|
+
}, children: "Local Grid" }) })), showLegend && (_jsx(Tooltip, { title: "Toggle the map legend panel", placement: "top", children: _jsx(Button, { variant: "contained", size: "small", onClick: () => startTransition(() => { dispatch(setShowLegend(!legendEnabled)); }), sx: {
|
|
72
|
+
bgcolor: legendEnabled ? 'primary.main' : theme.palette.gui.secondary,
|
|
73
|
+
color: legendEnabled ? theme.palette.common.white : theme.palette.gui.muted,
|
|
74
|
+
fontSize: '0.75rem', textTransform: 'none',
|
|
75
|
+
'&:hover': { bgcolor: legendEnabled ? 'primary.dark' : theme.palette.gui.faint }
|
|
76
|
+
}, children: "Legend" }) })), showCourseTrail && (_jsx(Tooltip, { title: "Toggle the vessel's historical course trail", placement: "top", children: _jsx(Button, { variant: "contained", size: "small", onClick: () => startTransition(() => { dispatch(setShowCourseTrail(!courseTrailEnabled)); }), sx: {
|
|
77
|
+
bgcolor: courseTrailEnabled ? theme.palette.map.courseTrail : theme.palette.gui.secondary,
|
|
78
|
+
color: courseTrailEnabled ? theme.palette.common.white : theme.palette.gui.muted,
|
|
79
|
+
fontSize: '0.75rem', textTransform: 'none',
|
|
80
|
+
'&:hover': { bgcolor: courseTrailEnabled ? darken(theme.palette.map.courseTrail, 0.2) : theme.palette.gui.faint }
|
|
81
|
+
}, children: "Course Trail" }) })), showFogOfWar && (_jsx(Tooltip, { title: "Toggle fog of war (hides unvisited cells)", placement: "top", children: _jsx(Button, { variant: "contained", size: "small", onClick: () => startTransition(() => { dispatch(setShowFogOfWar(!fogOfWarEnabled)); }), sx: {
|
|
82
|
+
bgcolor: fogOfWarEnabled ? theme.palette.scene.skyDark : theme.palette.gui.secondary,
|
|
83
|
+
color: fogOfWarEnabled ? theme.palette.common.white : theme.palette.gui.muted,
|
|
84
|
+
fontSize: '0.75rem', textTransform: 'none',
|
|
85
|
+
'&:hover': { bgcolor: fogOfWarEnabled ? darken(theme.palette.scene.skyDark, 0.2) : theme.palette.gui.faint }
|
|
86
|
+
}, children: "Fog of War" }) }))] })] }))] }));
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=ControlOverlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ControlOverlay.js","sourceRoot":"","sources":["../../../src/components/controls/ControlOverlay.tsx"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACxG,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACxF,OAAO,EACL,iBAAiB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,EACxE,aAAa,EAAE,kBAAkB,EAAE,eAAe,GACnD,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AA4C/E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAC5D,iBAAiB,GAAG,KAAK,EACzB,YAAY,GAAG,KAAK,EACpB,cAAc,GAAG,KAAK,EACtB,cAAc,GAAG,KAAK,EACtB,aAAa,GAAG,KAAK,EACrB,aA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AC,WAAW,EAAC,IAAI,EAAC,OAAO,EAChC,OAAO,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACtF,EAAE,EAAE;wCACF,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS;wCACpF,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK;wCAC7E,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM;wCAC1C,SAAS,EAAE,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE;qCAC7G,2BAGM,GACD,CACX,IACG,IACA,CACT,IACK,CACT,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file ControlsDrawer.tsx
|
|
3
|
+
* @description Drawer panel for controlling the ASV visualizer. Contains simulation mode toggles, connection status, and other control options.
|
|
4
|
+
* @author Carson Fujita
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* @interface ControlsDrawerProps
|
|
10
|
+
* @description Properties for the {@link ControlsDrawer} component.
|
|
11
|
+
* @see {@link ControlsDrawer}
|
|
12
|
+
* @property {boolean} open - Whether the drawer is open or closed.
|
|
13
|
+
* @property {() => void} onClose - Callback function to close the drawer.
|
|
14
|
+
* @property {() => void} onRegenerateMap - Callback function to regenerate the map and BFS path.
|
|
15
|
+
*/
|
|
16
|
+
export interface ControlsDrawerProps {
|
|
17
|
+
open: boolean;
|
|
18
|
+
onClose: () => void;
|
|
19
|
+
onRegenerateMap: () => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @component ControlsDrawer
|
|
23
|
+
* @description Drawer panel for controlling the ASV visualizer. Contains simulation mode toggles, connection status, and other control options.
|
|
24
|
+
* @param {ControlsDrawerProps} props - Properties for the component.
|
|
25
|
+
* @remarks
|
|
26
|
+
* The ControlsDrawer component provides a side panel for controlling various aspects of the ASV visualizer, including simulation mode toggles, connection status, and other control options.
|
|
27
|
+
* It uses Material-UI components for styling and layout, and interacts with the Redux store to read and update the application state.
|
|
28
|
+
* The drawer can be opened or closed based on the `open` prop, and provides callback functions for closing the drawer and regenerating the map.
|
|
29
|
+
* @example
|
|
30
|
+
* <ControlsDrawer
|
|
31
|
+
* open={isDrawerOpen}
|
|
32
|
+
* onClose={() => setIsDrawerOpen(false)}
|
|
33
|
+
* onRegenerateMap={handleRegenerateMap}
|
|
34
|
+
* />
|
|
35
|
+
*/
|
|
36
|
+
export declare const ControlsDrawer: React.FC<ControlsDrawerProps>;
|
|
37
|
+
//# sourceMappingURL=ControlsDrawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ControlsDrawer.d.ts","sourceRoot":"","sources":["../../../src/components/controls/ControlsDrawer.tsx"],"names":[],"mappings":"AACA;;;;;GAKG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAkB1B;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,eAAe,EAAE,MAAM,IAAI,CAAC;CAC/B;AACD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAsNxD,CAAC"}
|