mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-11-23 22:07:07 +03:00
Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16784d055c | ||
|
|
3bca9b8676 | ||
|
|
8c88754664 | ||
|
|
890bb6cf9c | ||
|
|
65e34317eb | ||
|
|
e17005c6b4 | ||
|
|
fabb8b0119 | ||
|
|
8c3a2610bb | ||
|
|
39d1053d0c | ||
|
|
ce5b26dc11 | ||
|
|
d85527ffd2 | ||
|
|
4b1ae76baa |
@@ -1,4 +1,4 @@
|
||||
ruff == 0.17.4
|
||||
ruff == 0.17.5
|
||||
|
||||
# types
|
||||
types-peewee == 4.0.*
|
||||
|
||||
@@ -4,14 +4,14 @@ click == 8.5.*
|
||||
aiohttp == 3.14.*
|
||||
starlette == 1.10.*
|
||||
starlette-context == 0.5.*
|
||||
fastapi[standard-no-fastapi-cloud-cli] == 0.162.*
|
||||
fastapi[standard-no-fastapi-cloud-cli] == 0.165.*
|
||||
uvicorn == 0.54.*
|
||||
slowapi == 0.1.*
|
||||
joserfc == 1.8.*
|
||||
cryptography == 50.0.*
|
||||
pathvalidate == 3.3.*
|
||||
markupsafe == 3.0.*
|
||||
python-multipart == 0.0.33
|
||||
python-multipart == 0.0.34
|
||||
# Classification Model Training
|
||||
tensorflow == 2.19.* ; platform_machine == 'aarch64'
|
||||
tensorflow-cpu == 2.21.* ; platform_machine == 'x86_64'
|
||||
@@ -43,13 +43,13 @@ opencv-contrib-python == 4.11.0.*
|
||||
scipy == 1.17.*
|
||||
# OpenVino & ONNX
|
||||
openvino == 2026.4.*
|
||||
onnxruntime == 1.31.*
|
||||
onnxruntime == 1.32.*
|
||||
# Embeddings
|
||||
transformers == 5.22.*
|
||||
# Generative AI
|
||||
google-genai == 3.2.*
|
||||
google-genai == 3.6.*
|
||||
ollama == 0.6.*
|
||||
openai == 3.49.*
|
||||
openai == 3.55.*
|
||||
# push notifications
|
||||
py-vapid == 1.9.6
|
||||
pywebpush == 2.5.*
|
||||
|
||||
@@ -22,3 +22,6 @@ add_header Set-Cookie $auth_cookie;
|
||||
## Pass the location header back up if it exists
|
||||
auth_request_set $redirection_url $upstream_http_location;
|
||||
add_header Location $redirection_url;
|
||||
|
||||
## The add_header lines above stop this location inheriting server-level headers
|
||||
include security_headers.conf;
|
||||
|
||||
@@ -152,7 +152,6 @@ http {
|
||||
sub_filter '.m4s' '.m4s$is_args$args';
|
||||
sub_filter '.mp4"' '.mp4$is_args$args"';
|
||||
|
||||
include security_headers.conf;
|
||||
add_header Cache-Control "no-store";
|
||||
expires off;
|
||||
|
||||
@@ -161,7 +160,6 @@ http {
|
||||
|
||||
location /stream/ {
|
||||
include auth_request.conf;
|
||||
include security_headers.conf;
|
||||
add_header Cache-Control "no-store";
|
||||
expires off;
|
||||
|
||||
@@ -185,7 +183,6 @@ http {
|
||||
}
|
||||
|
||||
expires 7d;
|
||||
include security_headers.conf;
|
||||
add_header Cache-Control "public";
|
||||
autoindex on;
|
||||
root /media/frigate;
|
||||
@@ -226,7 +223,7 @@ http {
|
||||
|
||||
location /ws {
|
||||
include auth_request.conf;
|
||||
proxy_pass http://mqtt_ws/;
|
||||
proxy_pass http://mqtt_ws;
|
||||
include proxy.conf;
|
||||
}
|
||||
|
||||
@@ -290,7 +287,6 @@ http {
|
||||
|
||||
location /api/ {
|
||||
include auth_request.conf;
|
||||
include security_headers.conf;
|
||||
add_header Cache-Control "no-store";
|
||||
expires off;
|
||||
proxy_pass http://frigate_api/;
|
||||
|
||||
@@ -17,10 +17,10 @@ import re
|
||||
from enum import Enum
|
||||
from urllib.parse import unquote
|
||||
|
||||
from peewee import DoesNotExist
|
||||
from peewee import DoesNotExist, Field
|
||||
|
||||
from frigate.config import FrigateConfig
|
||||
from frigate.const import EXPORT_DIR
|
||||
from frigate.const import CLIPS_DIR, EXPORT_DIR
|
||||
from frigate.models import Export, User
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -151,6 +151,7 @@ def _resolve_clip(
|
||||
# /clips/thumbs/{cam}/... → camera
|
||||
# /clips/previews/{cam}/... → camera
|
||||
# /clips/review/thumb-{cam}-{review_id}.webp → camera (parsed)
|
||||
# /clips/export/{export_id}.{ext} → camera (DB lookup)
|
||||
# /clips/faces/... → admin-only
|
||||
# /clips/genai-requests/... → admin-only
|
||||
# /clips/preview_restart_cache/... → admin-only
|
||||
@@ -175,6 +176,11 @@ def _resolve_clip(
|
||||
return MediaAuthResolution.CAMERA, camera
|
||||
return MediaAuthResolution.UNRESOLVED_MEDIA, None
|
||||
|
||||
if second == "export" and len(parts) == 3:
|
||||
return _export_camera(
|
||||
Export.thumb_path, os.path.join(CLIPS_DIR, "export", parts[2])
|
||||
)
|
||||
|
||||
if second in ("faces", "genai-requests", "preview_restart_cache"):
|
||||
return MediaAuthResolution.ADMIN_ONLY, None
|
||||
|
||||
@@ -234,15 +240,19 @@ def _resolve_export(
|
||||
if len(parts) != 2:
|
||||
return MediaAuthResolution.UNRESOLVED_MEDIA, None
|
||||
|
||||
filename = parts[1]
|
||||
full_path = os.path.join(EXPORT_DIR, filename)
|
||||
return _export_camera(Export.video_path, os.path.join(EXPORT_DIR, parts[1]))
|
||||
|
||||
|
||||
def _export_camera(
|
||||
field: Field, full_path: str
|
||||
) -> tuple[MediaAuthResolution, str | None]:
|
||||
try:
|
||||
export = Export.get(Export.video_path == full_path)
|
||||
export = Export.get(field == full_path)
|
||||
return MediaAuthResolution.CAMERA, export.camera
|
||||
except DoesNotExist:
|
||||
return MediaAuthResolution.UNRESOLVED_MEDIA, None
|
||||
except Exception as e:
|
||||
logger.warning("Export DB lookup failed for %s: %s", filename, e)
|
||||
logger.warning("Export DB lookup failed for %s: %s", full_path, e)
|
||||
return MediaAuthResolution.UNRESOLVED_MEDIA, None
|
||||
|
||||
|
||||
|
||||
@@ -581,6 +581,7 @@ class WebPushClient(Communicator):
|
||||
sorted_objects.add(obj)
|
||||
|
||||
sorted_objects.update(payload["after"]["data"]["sub_labels"])
|
||||
sorted_objects.update(payload["after"]["data"]["audio"])
|
||||
|
||||
image = f"{payload['after']['thumb_path'].replace(BASE_DIR, '')}"
|
||||
ended = state == "end" or state == "genai"
|
||||
@@ -617,7 +618,14 @@ class WebPushClient(Communicator):
|
||||
else:
|
||||
formatted_zone_names.append(titlecase(zone_name.replace("_", " ")))
|
||||
|
||||
title = f"{titlecase(', '.join(sorted_objects).replace('_', ' '))}{' was' if state == 'end' else ''} detected in {', '.join(formatted_zone_names)}"
|
||||
object_names = titlecase(
|
||||
", ".join(sorted(sorted_objects)).replace("_", " ")
|
||||
)
|
||||
title = f"{object_names}{' was' if state == 'end' else ''} detected"
|
||||
|
||||
if formatted_zone_names:
|
||||
title += f" in {', '.join(formatted_zone_names)}"
|
||||
|
||||
message = f"Detected on {camera_name}"
|
||||
|
||||
if ended:
|
||||
|
||||
@@ -42,6 +42,7 @@ def should_update_db(prev_event: dict[str, Any], current_event: dict[str, Any])
|
||||
or prev_event["recognized_license_plate"]
|
||||
!= current_event["recognized_license_plate"]
|
||||
or prev_event["path_data"] != current_event["path_data"]
|
||||
or prev_event["max_severity"] != current_event["max_severity"]
|
||||
):
|
||||
return True
|
||||
return False
|
||||
|
||||
@@ -187,16 +187,35 @@ def build_review_description_response_format(concerns: list[str]) -> dict[str, A
|
||||
|
||||
Strips the `time` field (populated server-side) and drops
|
||||
`other_concerns` when no concerns are configured.
|
||||
|
||||
Every remaining property must be listed in `required` because strict
|
||||
providers (OpenAI) reject a schema with any optional property.
|
||||
"""
|
||||
schema = ReviewMetadata.model_json_schema()
|
||||
schema.get("properties", {}).pop("time", None)
|
||||
properties = schema.setdefault("properties", {})
|
||||
required = schema.setdefault("required", [])
|
||||
properties.pop("time", None)
|
||||
|
||||
if "time" in schema.get("required", []):
|
||||
schema["required"].remove("time")
|
||||
if not concerns:
|
||||
schema.get("properties", {}).pop("other_concerns", None)
|
||||
if "other_concerns" in schema.get("required", []):
|
||||
schema["required"].remove("other_concerns")
|
||||
if "time" in required:
|
||||
required.remove("time")
|
||||
|
||||
if concerns:
|
||||
# The model field is nullable with a default so stored metadata
|
||||
# without concerns still parses. For generation, require a plain list
|
||||
# instead; the model returns an empty list when no concern applies.
|
||||
properties["other_concerns"] = {
|
||||
"type": "array",
|
||||
"items": {"type": "string"},
|
||||
"description": properties["other_concerns"]["description"],
|
||||
}
|
||||
|
||||
if "other_concerns" not in required:
|
||||
required.append("other_concerns")
|
||||
else:
|
||||
properties.pop("other_concerns", None)
|
||||
|
||||
if "other_concerns" in required:
|
||||
required.remove("other_concerns")
|
||||
|
||||
return {
|
||||
"type": "json_schema",
|
||||
|
||||
@@ -379,7 +379,7 @@ def move_preview_frames(loc: str) -> None:
|
||||
src,
|
||||
dst,
|
||||
)
|
||||
except shutil.Error:
|
||||
except OSError:
|
||||
logger.error(
|
||||
"Failed to move preview restart cache from %s to %s",
|
||||
src,
|
||||
|
||||
@@ -261,6 +261,18 @@ def validate_ffmpeg_args(args: str) -> tuple[bool, str]:
|
||||
return True, ""
|
||||
|
||||
|
||||
def normalize_ffmpeg_args(args: str | None) -> str | None:
|
||||
"""Rejoin args with single spaces.
|
||||
|
||||
validate_ffmpeg_args tokenizes on any whitespace, while export commands are
|
||||
built with split(" "). Normalizing keeps the two token lists identical.
|
||||
"""
|
||||
if args is None:
|
||||
return None
|
||||
|
||||
return " ".join(args.split())
|
||||
|
||||
|
||||
class PlaybackSourceEnum(str, Enum):
|
||||
recordings = "recordings"
|
||||
preview = "preview"
|
||||
@@ -327,8 +339,8 @@ class RecordingExporter(threading.Thread):
|
||||
self.end_time = end_time
|
||||
self.playback_source = playback_source
|
||||
self.export_case_id = export_case_id
|
||||
self.ffmpeg_input_args = ffmpeg_input_args
|
||||
self.ffmpeg_output_args = ffmpeg_output_args
|
||||
self.ffmpeg_input_args = normalize_ffmpeg_args(ffmpeg_input_args)
|
||||
self.ffmpeg_output_args = normalize_ffmpeg_args(ffmpeg_output_args)
|
||||
self.cpu_fallback = cpu_fallback
|
||||
self.chapters = chapters
|
||||
self.stream = stream
|
||||
|
||||
@@ -30,6 +30,7 @@ from frigate.const import (
|
||||
UPSERT_REVIEW_SEGMENT,
|
||||
)
|
||||
from frigate.models import ReviewSegment
|
||||
from frigate.review.severity import get_review_severity
|
||||
from frigate.review.types import SeverityEnum
|
||||
from frigate.track.object_processing import ManualEventState
|
||||
from frigate.util.image import SharedMemoryFrameManager, calculate_16_9_crop
|
||||
@@ -217,57 +218,21 @@ class ActiveObjects:
|
||||
}
|
||||
|
||||
for o in all_objects:
|
||||
if (
|
||||
o["motionless_count"] >= camera_config.detect.stationary.threshold
|
||||
and not o["pending_loitering"]
|
||||
):
|
||||
# no stationary objects unless loitering
|
||||
continue
|
||||
severity = get_review_severity(
|
||||
camera_config,
|
||||
label=o["label"],
|
||||
current_zones=o["current_zones"],
|
||||
false_positive=o["false_positive"],
|
||||
detected=o["frame_time"] == frame_time,
|
||||
position_changes=o["position_changes"],
|
||||
motionless_count=o["motionless_count"],
|
||||
pending_loitering=o["pending_loitering"],
|
||||
)
|
||||
|
||||
if o["position_changes"] == 0:
|
||||
# object must have moved at least once
|
||||
continue
|
||||
|
||||
if o["frame_time"] != frame_time:
|
||||
# object must be detected in this frame
|
||||
continue
|
||||
|
||||
if o["false_positive"]:
|
||||
# object must not be a false positive
|
||||
continue
|
||||
|
||||
if (
|
||||
o["label"] in camera_config.review.alerts.labels
|
||||
and (
|
||||
not camera_config.review.alerts.required_zones
|
||||
or (
|
||||
len(o["current_zones"]) > 0
|
||||
and set(o["current_zones"])
|
||||
& set(camera_config.review.alerts.required_zones)
|
||||
)
|
||||
)
|
||||
and camera_config.review.alerts.enabled
|
||||
):
|
||||
if severity == SeverityEnum.alert:
|
||||
self.categorized_objects["alerts"].append(o)
|
||||
continue
|
||||
|
||||
if (
|
||||
(
|
||||
camera_config.review.detections.labels is None
|
||||
or o["label"] in camera_config.review.detections.labels
|
||||
)
|
||||
and (
|
||||
not camera_config.review.detections.required_zones
|
||||
or (
|
||||
len(o["current_zones"]) > 0
|
||||
and set(o["current_zones"])
|
||||
& set(camera_config.review.detections.required_zones)
|
||||
)
|
||||
)
|
||||
and camera_config.review.detections.enabled
|
||||
):
|
||||
elif severity == SeverityEnum.detection:
|
||||
self.categorized_objects["detections"].append(o)
|
||||
continue
|
||||
|
||||
def has_active_objects(self) -> bool:
|
||||
return (
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
"""Rules for which review severity a tracked object qualifies for."""
|
||||
|
||||
from typing import cast
|
||||
|
||||
from frigate.config import CameraConfig
|
||||
from frigate.review.types import SeverityEnum
|
||||
|
||||
|
||||
def get_review_severity(
|
||||
camera_config: CameraConfig,
|
||||
*,
|
||||
label: str,
|
||||
current_zones: list[str],
|
||||
false_positive: bool,
|
||||
detected: bool,
|
||||
position_changes: int,
|
||||
motionless_count: int,
|
||||
pending_loitering: bool,
|
||||
) -> SeverityEnum | None:
|
||||
"""Get the review severity a tracked object qualifies for on the current frame.
|
||||
|
||||
Review segments and a tracked object's max_severity both use this, so an
|
||||
object is only reported as an alert or detection when it could actually
|
||||
create or extend a review segment of that severity.
|
||||
|
||||
Args:
|
||||
camera_config: Config for the camera the object is on
|
||||
label: The object's label
|
||||
current_zones: Zones the object is in on the current frame
|
||||
false_positive: Whether the object is still considered a false positive
|
||||
detected: Whether the object was detected on the current frame
|
||||
position_changes: Number of times the object has changed position
|
||||
motionless_count: Number of frames the object has not moved
|
||||
pending_loitering: Whether the object is in a loitering zone but has
|
||||
not met the loitering time yet
|
||||
|
||||
Returns:
|
||||
The severity the object qualifies for, or None if it does not qualify
|
||||
"""
|
||||
# always populated from detect fps when the config is loaded
|
||||
stationary_threshold = cast(int, camera_config.detect.stationary.threshold)
|
||||
|
||||
# stationary objects don't count unless they are loitering
|
||||
if motionless_count >= stationary_threshold and not pending_loitering:
|
||||
return None
|
||||
|
||||
# object must have moved at least once
|
||||
if position_changes == 0:
|
||||
return None
|
||||
|
||||
if not detected or false_positive:
|
||||
return None
|
||||
|
||||
review_config = camera_config.review
|
||||
zones = set(current_zones)
|
||||
|
||||
if (
|
||||
review_config.alerts.enabled
|
||||
and label in review_config.alerts.labels
|
||||
and (
|
||||
not review_config.alerts.required_zones
|
||||
or zones & set(review_config.alerts.required_zones)
|
||||
)
|
||||
):
|
||||
return SeverityEnum.alert
|
||||
|
||||
if (
|
||||
review_config.detections.enabled
|
||||
and (
|
||||
review_config.detections.labels is None
|
||||
or label in review_config.detections.labels
|
||||
)
|
||||
and (
|
||||
not review_config.detections.required_zones
|
||||
or zones & set(review_config.detections.required_zones)
|
||||
)
|
||||
):
|
||||
return SeverityEnum.detection
|
||||
|
||||
return None
|
||||
@@ -4,6 +4,7 @@ from unittest.mock import Mock, patch
|
||||
|
||||
import frigate.genai
|
||||
from frigate.config import GenAIProviderEnum
|
||||
from frigate.config.config import RuntimeFilterConfig
|
||||
from frigate.const import MODEL_CACHE_DIR, REDACTED_CREDENTIAL_SENTINEL
|
||||
from frigate.genai import GenAIClient
|
||||
from frigate.models import Event, Recordings, ReviewSegment
|
||||
@@ -98,6 +99,32 @@ class TestHttpApp(BaseTestHttp):
|
||||
assert response.status_code == 200
|
||||
assert app.frigate_config.cameras["front_door"].objects.track == ["person"]
|
||||
|
||||
def test_config_set_in_memory_adds_filters_for_new_tracked_labels(self):
|
||||
self.minimal_config["cameras"]["front_door"]["objects"] = {
|
||||
"track": ["person"],
|
||||
}
|
||||
app = super().create_app()
|
||||
app.config_publisher = Mock()
|
||||
|
||||
with AuthTestClient(app) as client:
|
||||
response = client.put(
|
||||
"/config/set",
|
||||
json={
|
||||
"requires_restart": 0,
|
||||
"skip_save": True,
|
||||
"update_topic": "config/cameras/front_door/objects",
|
||||
"config_data": {
|
||||
"cameras": {
|
||||
"front_door": {"objects": {"track": ["person", "cat"]}}
|
||||
}
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
filters = app.frigate_config.cameras["front_door"].objects.filters
|
||||
assert isinstance(filters["cat"], RuntimeFilterConfig)
|
||||
|
||||
@patch("frigate.detectors.detector_config.load_labels")
|
||||
def test_config_set_in_memory_rebinds_replay_model_on_scene_change(
|
||||
self, mock_labels
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
"""When tracked object updates are written to the database."""
|
||||
|
||||
import unittest
|
||||
from typing import Any
|
||||
|
||||
from frigate.events.maintainer import should_update_db
|
||||
|
||||
|
||||
def _event(**overrides: Any) -> dict[str, Any]:
|
||||
return {
|
||||
"end_time": None,
|
||||
"has_clip": False,
|
||||
"has_snapshot": True,
|
||||
"top_score": 0.8,
|
||||
"entered_zones": ["porch"],
|
||||
"average_estimated_speed": 0,
|
||||
"velocity_angle": 0,
|
||||
"recognized_license_plate": None,
|
||||
"path_data": [],
|
||||
"max_severity": None,
|
||||
**overrides,
|
||||
}
|
||||
|
||||
|
||||
class TestShouldUpdateDb(unittest.TestCase):
|
||||
def test_unchanged_saved_event_is_not_updated(self):
|
||||
self.assertFalse(should_update_db(_event(), _event()))
|
||||
|
||||
def test_max_severity_change_updates_saved_event(self):
|
||||
self.assertTrue(should_update_db(_event(), _event(max_severity="alert")))
|
||||
|
||||
def test_max_severity_change_ignored_when_not_saved(self):
|
||||
self.assertFalse(
|
||||
should_update_db(
|
||||
_event(has_snapshot=False),
|
||||
_event(has_snapshot=False, max_severity="alert"),
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -143,6 +143,37 @@ class TestValidateFfmpegArgs(unittest.TestCase):
|
||||
self.assertRejected("-metadata comment=x")
|
||||
|
||||
|
||||
class TestCustomArgsTokenization(unittest.TestCase):
|
||||
"""The built command must contain exactly the tokens the validator checked."""
|
||||
|
||||
def test_irregular_whitespace_does_not_shift_tokens(self) -> None:
|
||||
output_args = "-c:v libx264\t-crf 23\n -r 25 "
|
||||
self.assertTrue(validate_ffmpeg_args(output_args)[0])
|
||||
|
||||
with patch("frigate.record.export.Path.mkdir"):
|
||||
exporter = RecordingExporter(
|
||||
MagicMock(),
|
||||
"front_abc123",
|
||||
"front",
|
||||
None,
|
||||
None,
|
||||
1_000,
|
||||
2_000,
|
||||
PlaybackSourceEnum.recordings,
|
||||
ffmpeg_input_args=" -an ",
|
||||
ffmpeg_output_args=output_args,
|
||||
)
|
||||
exporter.config.ffmpeg.ffmpeg_path = "ffmpeg"
|
||||
exporter.staged_runs = ["/cache/stage_0.mp4"]
|
||||
|
||||
cmd, _ = exporter.get_record_export_command("/exports/out.mp4")
|
||||
|
||||
for token in cmd[: cmd.index("-metadata")]:
|
||||
self.assertNotEqual(token, "")
|
||||
self.assertEqual(token.split(), [token])
|
||||
self.assertIn("-c:v libx264 -crf 23 -r 25", " ".join(cmd))
|
||||
|
||||
|
||||
class TestExportVideoPath(unittest.TestCase):
|
||||
"""Tests for the file path an export takes once the user names it."""
|
||||
|
||||
|
||||
@@ -7,11 +7,47 @@ from frigate.genai.prompts import (
|
||||
REVIEW_DESCRIPTION_FIELD_GUIDELINES,
|
||||
REVIEW_RESPONSE_STYLES,
|
||||
build_review_description_prompt,
|
||||
build_review_description_response_format,
|
||||
build_review_summary_prompt,
|
||||
get_review_field_guidelines,
|
||||
)
|
||||
|
||||
|
||||
class TestReviewDescriptionResponseFormat(unittest.TestCase):
|
||||
def _schema(self, concerns: list[str]) -> dict:
|
||||
response_format = build_review_description_response_format(concerns)
|
||||
self.assertTrue(response_format["json_schema"]["strict"])
|
||||
return response_format["json_schema"]["schema"]
|
||||
|
||||
def test_every_property_is_required_for_strict_mode(self):
|
||||
for concerns in ([], ["a person loitering near the gate"]):
|
||||
with self.subTest(concerns=concerns):
|
||||
schema = self._schema(concerns)
|
||||
self.assertEqual(set(schema["properties"]), set(schema["required"]))
|
||||
|
||||
def test_time_is_never_requested(self):
|
||||
schema = self._schema(["a person loitering near the gate"])
|
||||
self.assertNotIn("time", schema["properties"])
|
||||
self.assertNotIn("time", schema["required"])
|
||||
|
||||
def test_concerns_omitted_when_not_configured(self):
|
||||
schema = self._schema([])
|
||||
self.assertNotIn("other_concerns", schema["properties"])
|
||||
self.assertNotIn("other_concerns", schema["required"])
|
||||
|
||||
def test_concerns_requested_as_plain_list_when_configured(self):
|
||||
schema = self._schema(["a person loitering near the gate"])
|
||||
concerns = schema["properties"]["other_concerns"]
|
||||
self.assertEqual(concerns["type"], "array")
|
||||
self.assertEqual(concerns["items"], {"type": "string"})
|
||||
self.assertNotIn("anyOf", concerns)
|
||||
self.assertNotIn("default", concerns)
|
||||
|
||||
def test_schema_is_not_shared_between_calls(self):
|
||||
self._schema(["a person loitering near the gate"])
|
||||
self.assertNotIn("other_concerns", self._schema([])["properties"])
|
||||
|
||||
|
||||
class TestReviewResponseStyle(unittest.TestCase):
|
||||
def _build_prompt(self, response_style: str = "default") -> str:
|
||||
review_data = {
|
||||
|
||||
@@ -20,7 +20,7 @@ from frigate.api.media_auth import (
|
||||
resolve_media_uri,
|
||||
)
|
||||
from frigate.config import FrigateConfig
|
||||
from frigate.const import EXPORT_DIR
|
||||
from frigate.const import CLIPS_DIR, EXPORT_DIR
|
||||
from frigate.models import Event, Export, Recordings, ReviewSegment
|
||||
from frigate.test.const import TEST_DB, TEST_DB_CLEANUPS, TEST_DB_PRAGMAS
|
||||
|
||||
@@ -247,7 +247,7 @@ class TestExportResolution(unittest.TestCase):
|
||||
name=f"export-{export_id}",
|
||||
date=int(datetime.datetime.now().timestamp()),
|
||||
video_path=os.path.join(EXPORT_DIR, filename),
|
||||
thumb_path=os.path.join(EXPORT_DIR, f"{filename}.jpg"),
|
||||
thumb_path=os.path.join(CLIPS_DIR, "export", f"{export_id}.webp"),
|
||||
in_progress=False,
|
||||
).execute()
|
||||
|
||||
@@ -280,6 +280,34 @@ class TestExportResolution(unittest.TestCase):
|
||||
resolution, _ = resolve_media_uri("/exports/clip.mp4", self.config)
|
||||
self.assertEqual(resolution, MediaAuthResolution.UNRESOLVED_MEDIA)
|
||||
|
||||
def test_export_thumbnail_resolves_camera(self):
|
||||
self._insert_export("back_door_abc123", "back_door", "back_door_clip.mp4")
|
||||
resolution, camera = resolve_media_uri(
|
||||
"/clips/export/back_door_abc123.webp", self.config
|
||||
)
|
||||
self.assertEqual(resolution, MediaAuthResolution.CAMERA)
|
||||
self.assertEqual(camera, "back_door")
|
||||
|
||||
def test_unknown_export_thumbnail_is_unresolved(self):
|
||||
resolution, _ = resolve_media_uri("/clips/export/missing.webp", self.config)
|
||||
self.assertEqual(resolution, MediaAuthResolution.UNRESOLVED_MEDIA)
|
||||
|
||||
def test_export_thumbnail_gated_by_camera_access(self):
|
||||
self._insert_export("back_door_abc123", "back_door", "back_door_clip.mp4")
|
||||
self._insert_export("front_door_def456", "front_door", "front_door_clip.mp4")
|
||||
url = "/clips/export/{}.webp"
|
||||
self.assertIsNone(
|
||||
deny_response_for_media_uri(
|
||||
url.format("front_door_def456"), "limited_user", self.config
|
||||
)
|
||||
)
|
||||
self.assertEqual(
|
||||
deny_response_for_media_uri(
|
||||
url.format("back_door_abc123"), "limited_user", self.config
|
||||
),
|
||||
403,
|
||||
)
|
||||
|
||||
|
||||
class TestDenyResponseForMediaUri(unittest.TestCase):
|
||||
"""End-to-end decision check used by /auth."""
|
||||
|
||||
@@ -8,6 +8,7 @@ from unittest.mock import MagicMock, patch
|
||||
|
||||
from frigate.config import BirdseyeModeEnum, FrigateConfig
|
||||
from frigate.config.camera.profile import CameraProfileConfig
|
||||
from frigate.config.config import RuntimeFilterConfig
|
||||
from frigate.config.profile import ProfileDefinitionConfig
|
||||
from frigate.config.profile_manager import PERSISTENCE_FILE, ProfileManager
|
||||
from frigate.const import MODEL_CACHE_DIR
|
||||
@@ -502,6 +503,16 @@ class TestProfileManager(unittest.TestCase):
|
||||
back = self.config.cameras["back"]
|
||||
assert back.notifications.enabled is True
|
||||
|
||||
@patch.object(ProfileManager, "_persist_active_profile")
|
||||
def test_activate_profile_adds_filters_for_new_tracked_labels(self, mock_persist):
|
||||
"""Labels a profile adds to objects.track get default filters."""
|
||||
err = self.manager.activate_profile("armed")
|
||||
assert err is None
|
||||
|
||||
filters = self.config.cameras["front"].objects.filters
|
||||
for label in ["person", "car", "package"]:
|
||||
assert isinstance(filters[label], RuntimeFilterConfig)
|
||||
|
||||
@patch.object(ProfileManager, "_persist_active_profile")
|
||||
def test_deactivate_profile(self, mock_persist):
|
||||
"""Deactivating a profile restores base config."""
|
||||
|
||||
@@ -0,0 +1,253 @@
|
||||
"""Review severity rules shared by review segments and tracked objects."""
|
||||
|
||||
import unittest
|
||||
from typing import Any
|
||||
|
||||
from frigate.config import FrigateConfig
|
||||
from frigate.review.maintainer import ActiveObjects
|
||||
from frigate.review.severity import get_review_severity
|
||||
from frigate.review.types import SeverityEnum
|
||||
from frigate.track.tracked_object import TrackedObject
|
||||
|
||||
CAMERA = "cam"
|
||||
FPS = 5
|
||||
ZONE = "porch"
|
||||
INSIDE_X = 480
|
||||
OUTSIDE_X = 160
|
||||
|
||||
|
||||
def _config(alerts_enabled: bool = True) -> FrigateConfig:
|
||||
return FrigateConfig(
|
||||
**{
|
||||
"mqtt": {"enabled": False},
|
||||
"cameras": {
|
||||
CAMERA: {
|
||||
"ffmpeg": {
|
||||
"inputs": [
|
||||
{"path": "rtsp://10.0.0.1:554/video", "roles": ["detect"]}
|
||||
]
|
||||
},
|
||||
"detect": {"width": 640, "height": 480, "fps": FPS},
|
||||
"objects": {"track": ["person"]},
|
||||
"zones": {ZONE: {"coordinates": "0.5,0,1,0,1,1,0.5,1"}},
|
||||
"review": {
|
||||
"alerts": {
|
||||
"enabled": alerts_enabled,
|
||||
"required_zones": [ZONE],
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
class TestGetReviewSeverity(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.camera_config = _config().cameras[CAMERA]
|
||||
self.stationary_threshold = self.camera_config.detect.stationary.threshold
|
||||
|
||||
def _severity(self, camera_config=None, **overrides: Any) -> SeverityEnum | None:
|
||||
kwargs = {
|
||||
"label": "person",
|
||||
"current_zones": [ZONE],
|
||||
"false_positive": False,
|
||||
"detected": True,
|
||||
"position_changes": 1,
|
||||
"motionless_count": 0,
|
||||
"pending_loitering": False,
|
||||
**overrides,
|
||||
}
|
||||
return get_review_severity(camera_config or self.camera_config, **kwargs)
|
||||
|
||||
def test_alert_in_required_zone(self):
|
||||
self.assertEqual(self._severity(), SeverityEnum.alert)
|
||||
|
||||
def test_detection_outside_alert_required_zone(self):
|
||||
self.assertEqual(self._severity(current_zones=[]), SeverityEnum.detection)
|
||||
|
||||
def test_detection_when_alerts_disabled(self):
|
||||
camera_config = _config(alerts_enabled=False).cameras[CAMERA]
|
||||
self.assertEqual(
|
||||
self._severity(camera_config=camera_config), SeverityEnum.detection
|
||||
)
|
||||
|
||||
def test_stationary_object_does_not_qualify(self):
|
||||
self.assertIsNone(self._severity(motionless_count=self.stationary_threshold))
|
||||
|
||||
def test_stationary_loitering_object_qualifies(self):
|
||||
self.assertEqual(
|
||||
self._severity(
|
||||
motionless_count=self.stationary_threshold, pending_loitering=True
|
||||
),
|
||||
SeverityEnum.alert,
|
||||
)
|
||||
|
||||
def test_object_that_never_moved_does_not_qualify(self):
|
||||
self.assertIsNone(self._severity(position_changes=0))
|
||||
|
||||
def test_undetected_object_does_not_qualify(self):
|
||||
self.assertIsNone(self._severity(detected=False))
|
||||
|
||||
def test_false_positive_does_not_qualify(self):
|
||||
self.assertIsNone(self._severity(false_positive=True))
|
||||
|
||||
|
||||
class TestTrackedObjectMaxSeverity(unittest.TestCase):
|
||||
"""max_severity must match what review segments would have been created."""
|
||||
|
||||
def setUp(self):
|
||||
config = _config()
|
||||
self.camera_config = config.cameras[CAMERA]
|
||||
self.stationary_threshold = self.camera_config.detect.stationary.threshold
|
||||
self.frame = 0
|
||||
self.position_changes = 0
|
||||
self.motionless_count = 0
|
||||
self.last_detection = self._obj_data(OUTSIDE_X, 0.6, 1000.0)
|
||||
self.obj = TrackedObject(
|
||||
config.model_for_camera(CAMERA),
|
||||
self.camera_config,
|
||||
config.ui,
|
||||
{},
|
||||
{**self.last_detection, "score_history": [0.6]},
|
||||
)
|
||||
|
||||
def _obj_data(self, x: int, score: float, frame_time: float) -> dict[str, Any]:
|
||||
return {
|
||||
"id": "1000.0-abcdef",
|
||||
"label": "person",
|
||||
"frame_time": frame_time,
|
||||
"start_time": 1000.0,
|
||||
"score": score,
|
||||
"box": (x - 40, 200, x + 40, 360),
|
||||
"area": 12800,
|
||||
"ratio": 0.5,
|
||||
"region": (0, 0, 640, 480),
|
||||
"centroid": (x, 280),
|
||||
"position_changes": self.position_changes,
|
||||
"motionless_count": self.motionless_count,
|
||||
"attributes": [],
|
||||
"sub_label": None,
|
||||
}
|
||||
|
||||
def _step(
|
||||
self, x: int, score: float, moved: bool, detected: bool = True
|
||||
) -> SeverityEnum | None:
|
||||
"""Advance one frame and return the severity review segments would see."""
|
||||
self.frame += 1
|
||||
frame_time = 1000.0 + self.frame / FPS
|
||||
|
||||
if detected:
|
||||
# mirror the tracker, which counts the first move and any move
|
||||
# after the object was stationary as a position change
|
||||
if moved:
|
||||
if (
|
||||
self.position_changes == 0
|
||||
or self.motionless_count >= self.stationary_threshold
|
||||
):
|
||||
self.position_changes += 1
|
||||
self.motionless_count = 0
|
||||
else:
|
||||
self.motionless_count += 1
|
||||
|
||||
self.last_detection = self._obj_data(x, score, frame_time)
|
||||
|
||||
_, self.last_significant, _, _ = self.obj.update(
|
||||
frame_time, dict(self.last_detection), False
|
||||
)
|
||||
activity = ActiveObjects(frame_time, self.camera_config, [self.obj.to_dict()])
|
||||
|
||||
if activity.has_activity_category(SeverityEnum.alert):
|
||||
return SeverityEnum.alert
|
||||
|
||||
if activity.has_activity_category(SeverityEnum.detection):
|
||||
return SeverityEnum.detection
|
||||
|
||||
return None
|
||||
|
||||
def test_object_confirmed_while_stationary_in_zone_has_no_severity(self):
|
||||
"""An object that only becomes a true positive after it stopped moving
|
||||
never creates a review, so it must not be reported as an alert even
|
||||
though it entered a required zone."""
|
||||
review_severities = []
|
||||
|
||||
# walks into the zone with a low score, so it is a false positive
|
||||
for i in range(10):
|
||||
review_severities.append(self._step(OUTSIDE_X + i * 40, 0.6, moved=True))
|
||||
|
||||
# sits still until it is stationary
|
||||
for _ in range(self.stationary_threshold):
|
||||
review_severities.append(self._step(INSIDE_X, 0.6, moved=False))
|
||||
|
||||
# a re-detection while still stationary confirms it as a true positive
|
||||
for _ in range(10):
|
||||
review_severities.append(self._step(INSIDE_X, 0.9, moved=False))
|
||||
|
||||
# leaves and is no longer detected
|
||||
for _ in range(10):
|
||||
review_severities.append(self._step(INSIDE_X, 0.9, False, detected=False))
|
||||
|
||||
self.assertFalse(self.obj.false_positive)
|
||||
self.assertEqual(self.obj.obj_data["position_changes"], 1)
|
||||
self.assertEqual(self.obj.entered_zones, [ZONE])
|
||||
self.assertEqual(set(review_severities), {None})
|
||||
self.assertIsNone(self.obj.max_severity)
|
||||
self.assertIsNone(self.obj.to_dict()["max_severity"])
|
||||
|
||||
def test_severity_change_is_significant(self):
|
||||
"""Confirming an object already moving in the zone changes nothing else
|
||||
that is watched, but the new severity still has to be published."""
|
||||
for i in range(10):
|
||||
self._step(OUTSIDE_X + i * 40, 0.6, moved=True)
|
||||
|
||||
self.assertEqual(self.obj.current_zones, [ZONE])
|
||||
self.assertIsNone(self.obj.max_severity)
|
||||
|
||||
for i in range(10):
|
||||
self._step(INSIDE_X + (i % 2) * 10, 0.9, moved=True)
|
||||
|
||||
if self.obj.max_severity is not None:
|
||||
break
|
||||
|
||||
self.assertEqual(self.obj.max_severity, SeverityEnum.alert)
|
||||
self.assertTrue(self.last_significant)
|
||||
|
||||
self._step(INSIDE_X, 0.9, moved=True)
|
||||
self.assertFalse(self.last_significant)
|
||||
|
||||
def test_alert_is_kept_after_object_stops_qualifying(self):
|
||||
for i in range(10):
|
||||
self._step(OUTSIDE_X + i * 40, 0.9, moved=True)
|
||||
|
||||
self.assertEqual(self.obj.current_zones, [ZONE])
|
||||
self.assertEqual(self.obj.max_severity, SeverityEnum.alert)
|
||||
|
||||
for _ in range(self.stationary_threshold + 5):
|
||||
self._step(INSIDE_X, 0.9, moved=False)
|
||||
|
||||
self.assertTrue(self.obj.is_stationary())
|
||||
self.assertEqual(self.obj.max_severity, SeverityEnum.alert)
|
||||
|
||||
def test_detection_upgrades_to_alert_and_is_not_downgraded(self):
|
||||
review_severities = []
|
||||
|
||||
for _ in range(8):
|
||||
review_severities.append(self._step(OUTSIDE_X, 0.9, moved=True))
|
||||
|
||||
self.assertEqual(self.obj.max_severity, SeverityEnum.detection)
|
||||
|
||||
for _ in range(5):
|
||||
review_severities.append(self._step(INSIDE_X, 0.9, moved=True))
|
||||
|
||||
self.assertEqual(self.obj.max_severity, SeverityEnum.alert)
|
||||
|
||||
for _ in range(5):
|
||||
review_severities.append(self._step(OUTSIDE_X, 0.9, moved=True))
|
||||
|
||||
self.assertEqual(review_severities[-1], SeverityEnum.detection)
|
||||
self.assertEqual(self.obj.max_severity, SeverityEnum.alert)
|
||||
self.assertIn(SeverityEnum.alert, review_severities)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -511,55 +511,33 @@ class TestHttp(unittest.TestCase):
|
||||
Recordings.get(Recordings.id == rec_d3_id)
|
||||
|
||||
def test_storage_cleanup_keeps_retained(self):
|
||||
"""Ensure that all recordings are cleaned up when necessary."""
|
||||
"""Ensure cleanup steps over retained segments to reach newer ones."""
|
||||
config = FrigateConfig(**self.minimal_config)
|
||||
storage = StorageMaintainer(config, MagicMock())
|
||||
|
||||
id = "123456.keep"
|
||||
time_keep = datetime.datetime.now().timestamp()
|
||||
_insert_mock_event(
|
||||
id,
|
||||
time_keep,
|
||||
time_keep + 30,
|
||||
True,
|
||||
)
|
||||
rec_k_id = "1234567.keep"
|
||||
rec_k2_id = "1234568.keep"
|
||||
rec_k3_id = "1234569.keep"
|
||||
_insert_mock_recording(
|
||||
rec_k_id,
|
||||
os.path.join(self.test_dir, f"{rec_k_id}.tmp"),
|
||||
time_keep,
|
||||
time_keep + 10,
|
||||
)
|
||||
_insert_mock_recording(
|
||||
rec_k2_id,
|
||||
os.path.join(self.test_dir, f"{rec_k2_id}.tmp"),
|
||||
time_keep + 10,
|
||||
time_keep + 20,
|
||||
)
|
||||
_insert_mock_recording(
|
||||
rec_k3_id,
|
||||
os.path.join(self.test_dir, f"{rec_k3_id}.tmp"),
|
||||
time_keep + 20,
|
||||
time_keep + 30,
|
||||
)
|
||||
seg_len = 600
|
||||
base = datetime.datetime.now().timestamp() - 7200
|
||||
_insert_mock_event("123456.keep", base, base + 2.5 * seg_len, True)
|
||||
|
||||
time_delete = datetime.datetime.now().timestamp() - 7200
|
||||
for i in range(0, 59):
|
||||
id = f"{123456 + i}.delete"
|
||||
paths = {}
|
||||
for i in range(10):
|
||||
rec_id = f"segment-{i}"
|
||||
paths[rec_id] = os.path.join(self.test_dir, f"{rec_id}.tmp")
|
||||
_insert_mock_recording(
|
||||
id,
|
||||
os.path.join(self.test_dir, f"{id}.tmp"),
|
||||
time_delete,
|
||||
time_delete + 600,
|
||||
rec_id, paths[rec_id], base + i * seg_len, base + (i + 1) * seg_len
|
||||
)
|
||||
|
||||
# Hourly bandwidth is 48 MB, so cleanup needs all 56 MB of unretained
|
||||
# segments and must pass the older retained ones to get there.
|
||||
storage.calculate_camera_bandwidth()
|
||||
storage.reduce_storage_consumption()
|
||||
assert Recordings.get(Recordings.id == rec_k_id)
|
||||
assert Recordings.get(Recordings.id == rec_k2_id)
|
||||
assert Recordings.get(Recordings.id == rec_k3_id)
|
||||
|
||||
retained = {"segment-0", "segment-1", "segment-2"}
|
||||
remaining = {r.id for r in Recordings.select(Recordings.id)}
|
||||
on_disk = {rec_id for rec_id, path in paths.items() if os.path.exists(path)}
|
||||
self.assertEqual(remaining, retained)
|
||||
self.assertEqual(on_disk, retained)
|
||||
self.assertFalse(storage.retention_unmet)
|
||||
|
||||
def test_unmet_retention_sets_the_live_flag(self):
|
||||
config = FrigateConfig(**self.minimal_config)
|
||||
|
||||
@@ -17,6 +17,7 @@ from frigate.config import (
|
||||
)
|
||||
from frigate.const import CLIPS_DIR, REPLAY_CAMERA_PREFIX, THUMB_DIR
|
||||
from frigate.detectors.detector_config import ModelConfig
|
||||
from frigate.review.severity import get_review_severity
|
||||
from frigate.review.types import SeverityEnum
|
||||
from frigate.util.builtin import sanitize_float
|
||||
from frigate.util.image import (
|
||||
@@ -69,6 +70,8 @@ class TrackedObject:
|
||||
self.new_zone_entered: bool = False
|
||||
self.attributes: dict[str, float] = defaultdict(float)
|
||||
self.false_positive = True
|
||||
# highest review severity the object qualified for on any frame
|
||||
self.max_severity: SeverityEnum | None = None
|
||||
self.has_clip = False
|
||||
self.has_snapshot = False
|
||||
self.top_score = self.computed_score = 0.0
|
||||
@@ -85,36 +88,6 @@ class TrackedObject:
|
||||
self.path_data: list[tuple[Any, float]] = []
|
||||
self.previous = self.to_dict()
|
||||
|
||||
@property
|
||||
def max_severity(self) -> str | None:
|
||||
review_config = self.camera_config.review
|
||||
|
||||
if (
|
||||
self.camera_config.review.alerts.enabled
|
||||
and self.obj_data["label"] in review_config.alerts.labels
|
||||
and (
|
||||
not review_config.alerts.required_zones
|
||||
or set(self.entered_zones) & set(review_config.alerts.required_zones)
|
||||
)
|
||||
):
|
||||
return SeverityEnum.alert
|
||||
|
||||
if (
|
||||
self.camera_config.review.detections.enabled
|
||||
and (
|
||||
not review_config.detections.labels
|
||||
or self.obj_data["label"] in review_config.detections.labels
|
||||
)
|
||||
and (
|
||||
not review_config.detections.required_zones
|
||||
or set(self.entered_zones)
|
||||
& set(review_config.detections.required_zones)
|
||||
)
|
||||
):
|
||||
return SeverityEnum.detection
|
||||
|
||||
return None
|
||||
|
||||
def _is_false_positive(self) -> bool:
|
||||
# once a true positive, always a true positive
|
||||
if not self.false_positive:
|
||||
@@ -386,6 +359,28 @@ class TrackedObject:
|
||||
|
||||
self.obj_data.update(obj_data)
|
||||
self.current_zones = current_zones
|
||||
|
||||
# use the same per-frame rules as review segments, so max_severity is
|
||||
# never alert or detection unless the object could create that review
|
||||
severity = get_review_severity(
|
||||
self.camera_config,
|
||||
label=self.obj_data["label"],
|
||||
current_zones=current_zones,
|
||||
false_positive=self.false_positive,
|
||||
detected=detected,
|
||||
position_changes=self.obj_data["position_changes"],
|
||||
motionless_count=self.obj_data["motionless_count"],
|
||||
pending_loitering=self.pending_loitering,
|
||||
)
|
||||
|
||||
if severity != self.max_severity and (
|
||||
severity == SeverityEnum.alert
|
||||
or (severity == SeverityEnum.detection and self.max_severity is None)
|
||||
):
|
||||
self.max_severity = severity
|
||||
# max_severity is saved with the event, so publish the change
|
||||
significant_change = True
|
||||
|
||||
logger.debug(
|
||||
f"{self.camera_config.name}: Updating {obj_data['id']}: thumb update? {thumb_update}, significant change? {significant_change}, path update? {path_update}, autotracker update? {autotracker_update} "
|
||||
)
|
||||
|
||||
@@ -1191,7 +1191,11 @@ def apply_section_update(camera_config, section: str, update: dict) -> str | Non
|
||||
Returns:
|
||||
None on success, or an error message string on failure.
|
||||
"""
|
||||
from frigate.config.config import RuntimeFilterConfig, RuntimeMotionConfig
|
||||
from frigate.config.config import (
|
||||
FilterConfig,
|
||||
RuntimeFilterConfig,
|
||||
RuntimeMotionConfig,
|
||||
)
|
||||
|
||||
current = getattr(camera_config, section, None)
|
||||
if current is None:
|
||||
@@ -1224,6 +1228,9 @@ def apply_section_update(camera_config, section: str, update: dict) -> str | Non
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
for label in new_objects.track:
|
||||
new_objects.filters.setdefault(label, FilterConfig())
|
||||
|
||||
# Rebuild RuntimeFilterConfig with merged global + per-object masks
|
||||
for obj_name, filt in new_objects.filters.items():
|
||||
merged_mask = dict(filt.mask)
|
||||
|
||||
Generated
+240
-171
@@ -10,7 +10,7 @@
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@cycjimmy/jsmpeg-player": "^7.0.0",
|
||||
"@hookform/resolvers": "^7.0.6",
|
||||
"@hookform/resolvers": "^7.0.7",
|
||||
"@radix-ui/react-alert-dialog": "^1.2.1",
|
||||
"@radix-ui/react-aspect-ratio": "^1.2.0",
|
||||
"@radix-ui/react-checkbox": "^1.4.1",
|
||||
@@ -37,7 +37,7 @@
|
||||
"@rjsf/shadcn": "^6.11.1",
|
||||
"@rjsf/utils": "^6.10.1",
|
||||
"@rjsf/validator-ajv8": "^6.11.1",
|
||||
"apexcharts": "^8.8.1",
|
||||
"apexcharts": "^8.9.1",
|
||||
"axios": "^1.21.1",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
@@ -45,49 +45,50 @@
|
||||
"copy-to-clipboard": "^4.0.2",
|
||||
"date-fns": "^4.4.0",
|
||||
"date-fns-tz": "^3.2.0",
|
||||
"framer-motion": "^14.12.0",
|
||||
"framer-motion": "^14.14.0",
|
||||
"heic-to": "^1.6.7",
|
||||
"hls.js": "^1.7.4",
|
||||
"i18next": "^27.1.1",
|
||||
"i18next-http-backend": "^4.0.10",
|
||||
"i18next": "^27.2.2",
|
||||
"i18next-http-backend": "^4.1.0",
|
||||
"idb-keyval": "^6.3.0",
|
||||
"js-yaml": "^5.5.0",
|
||||
"konva": "^10.9.1",
|
||||
"lodash": "^4.18.1",
|
||||
"lucide-react": "^1.72.0",
|
||||
"lucide-react": "^1.76.0",
|
||||
"monaco-yaml": "^5.5.1",
|
||||
"next-themes": "^0.4.6",
|
||||
"nosleep.js": "^0.12.0",
|
||||
"react": "^19.3.1",
|
||||
"react-apexcharts": "^2.2.0",
|
||||
"react-apexcharts": "^2.2.1",
|
||||
"react-day-picker": "^10.0.2",
|
||||
"react-device-detect": "^2.2.3",
|
||||
"react-dom": "^19.3.1",
|
||||
"react-dropzone": "^20.2.0",
|
||||
"react-dropzone": "^20.2.1",
|
||||
"react-grid-layout": "^2.3.0",
|
||||
"react-hook-form": "^7.92.0",
|
||||
"react-i18next": "^18.0.1",
|
||||
"react-i18next": "^18.0.3",
|
||||
"react-icons": "^5.7.0",
|
||||
"react-konva": "^19.3.2",
|
||||
"react-markdown": "^10.1.0",
|
||||
"react-router-dom": "^7.18.5",
|
||||
"react-router-dom": "^7.18.6",
|
||||
"react-swipeable": "^7.0.2",
|
||||
"react-zoom-pan-pinch": "3.4.4",
|
||||
"remark-gfm": "^4.0.0",
|
||||
"scroll-into-view-if-needed": "^3.2.0",
|
||||
"scroll-into-view-if-needed": "^3.2.1",
|
||||
"sonner": "^2.0.8",
|
||||
"swr": "^2.5.1",
|
||||
"tailwind-merge": "^2.6.1",
|
||||
"tailwind-merge": "^2.6.2",
|
||||
"tailwind-scrollbar": "^3.1.0",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"use-long-press": "^3.3.0",
|
||||
"vaul": "^1.1.2",
|
||||
"virtua": "^0.54.2",
|
||||
"virtua": "^0.55.0",
|
||||
"vite-plugin-monaco-editor": "^1.1.0",
|
||||
"zod": "^4.6.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@playwright/test": "^1.65.0",
|
||||
"@playwright/test": "^1.65.1",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/lodash": "^4.17.27",
|
||||
"@types/node": "^26.6.6",
|
||||
@@ -96,21 +97,21 @@
|
||||
"@vitejs/plugin-react": "^6.3.0",
|
||||
"autoprefixer": "^10.6.2",
|
||||
"esbuild": "^0.28.2",
|
||||
"eslint": "^10.14.0",
|
||||
"eslint": "^10.15.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-prettier": "^5.5.7",
|
||||
"eslint-plugin-react-hooks": "^7.1.1",
|
||||
"eslint-plugin-react-refresh": "^0.5.7",
|
||||
"eslint-plugin-react-refresh": "^0.5.8",
|
||||
"globals": "^17.14.0",
|
||||
"i18next-cli": "^1.5.11",
|
||||
"monaco-editor": "^0.53.0",
|
||||
"patch-package": "^8.0.1",
|
||||
"postcss": "^8.5.32",
|
||||
"postcss": "^8.5.33",
|
||||
"prettier": "^3.10.1",
|
||||
"prettier-plugin-tailwindcss": "^0.8.1",
|
||||
"tailwindcss": "^3.4.19",
|
||||
"typescript": "^6.0.3",
|
||||
"typescript-eslint": "^8.72.2",
|
||||
"typescript-eslint": "^8.73.0",
|
||||
"vite": "^8.3.8"
|
||||
}
|
||||
},
|
||||
@@ -970,20 +971,37 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/config-array": {
|
||||
"version": "0.23.5",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz",
|
||||
"integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==",
|
||||
"version": "0.23.6",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.6.tgz",
|
||||
"integrity": "sha512-WrTH7nioI9QPY4NZGnsywmecswJdgeq4BCM76qok9VgjTO29ZgUzUvcuJLVPYVQM4uDbaPBU0M33R9DIxI8X3w==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@eslint/object-schema": "^3.0.5",
|
||||
"debug": "^4.3.1",
|
||||
"minimatch": "^10.2.4"
|
||||
"minimatch": "^11.0.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/config-array/node_modules/minimatch": {
|
||||
"version": "11.0.9",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.9.tgz",
|
||||
"integrity": "sha512-KCFkfyjqerNlSstjlhIGNXIKZGA/6O4V4RlhZ+Dsr621SPPw0mzlypE9D9ZOoPiVefHID+j7/XuMMlqfD/F60Q==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"@isaacs/nonrecursive-glob-match": "^1.1.0",
|
||||
"brace-expansion": "^5.0.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/config-helpers": {
|
||||
"version": "0.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz",
|
||||
@@ -1094,9 +1112,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@hookform/resolvers": {
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-7.0.6.tgz",
|
||||
"integrity": "sha512-LSTMwW4tmRWtM7pS5HkSqahi71USbhrmjc9pNHNa7UyYTbKIK/e0G1EAw6xsEnp9GahTjXhunxRJp0Bd8E6NZA==",
|
||||
"version": "7.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-7.0.7.tgz",
|
||||
"integrity": "sha512-sxiEGu5dhg6gMEsGznEQ/++634YiRLmxclw+/B1+yNN9uuhKIfNCRTE4xwqkRcKNqBPwtmDXg5oDhLw3i/wklw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@standard-schema/utils": "^0.3.0"
|
||||
@@ -1624,6 +1642,13 @@
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/@isaacs/nonrecursive-glob-match": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@isaacs/nonrecursive-glob-match/-/nonrecursive-glob-match-1.1.0.tgz",
|
||||
"integrity": "sha512-GPm/Dbvk5RLmhRnxXIa7nTpK0xtl4E0wj0MslsuNiJ1FIROU+2+9lgUC/dgF7Ey4QCWhfEsgxilMRMCdHPfDfw==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0"
|
||||
},
|
||||
"node_modules/@jridgewell/gen-mapping": {
|
||||
"version": "0.3.13",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
|
||||
@@ -1771,13 +1796,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@playwright/test": {
|
||||
"version": "1.65.0",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.65.0.tgz",
|
||||
"integrity": "sha512-iGURLGuKDLakSEl7Pgfv8h7f+XLT+V861Wfhz0zlEl5nyFuKUopdkFBPKqTllTUp06aOwPuH8iuUEb3yp3MpbQ==",
|
||||
"version": "1.65.1",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.65.1.tgz",
|
||||
"integrity": "sha512-y+NCIRm2LvY4slUVWvGh1nujJ8RF/hEisIsq2mtUPgdQC4L701bq5hZGMhrpeXjACvwvO9tj5dJqhvM6TP9lbw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright": "1.65.0"
|
||||
"playwright": "1.65.1"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
@@ -3744,17 +3769,17 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "8.72.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.72.2.tgz",
|
||||
"integrity": "sha512-222PKFXKihmFpi/pS5njoBgdAqsPhj2/GBmFbrNw8Tq8gEG9Sv+kSlKFy4u2q+mJv9ZzJgM2Gkv/bUzRZwZw5g==",
|
||||
"version": "8.73.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.73.0.tgz",
|
||||
"integrity": "sha512-UkygMFer53Yzn29MCYFTHf34hGXf5KJhiDWfIm1tXtXRrym1CS6l5H9Y3yCtPWChpC0/f93H88gdj8tN0dd4kw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.12.2",
|
||||
"@typescript-eslint/scope-manager": "8.72.2",
|
||||
"@typescript-eslint/type-utils": "8.72.2",
|
||||
"@typescript-eslint/utils": "8.72.2",
|
||||
"@typescript-eslint/visitor-keys": "8.72.2",
|
||||
"@typescript-eslint/scope-manager": "8.73.0",
|
||||
"@typescript-eslint/type-utils": "8.73.0",
|
||||
"@typescript-eslint/utils": "8.73.0",
|
||||
"@typescript-eslint/visitor-keys": "8.73.0",
|
||||
"ignore": "^7.0.5",
|
||||
"natural-compare": "^1.4.0",
|
||||
"ts-api-utils": "^2.5.0"
|
||||
@@ -3767,15 +3792,15 @@
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/parser": "^8.72.2",
|
||||
"@typescript-eslint/parser": "^8.73.0",
|
||||
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
|
||||
"typescript": ">=4.8.4 <6.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": {
|
||||
"version": "7.0.14",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.14.tgz",
|
||||
"integrity": "sha512-wCBiZ77u1tuWde6G/nfOtLaCTYcFDU5yCzARzK10y+rLhzYoL7a7yEemcopcc2Mzow7gZOIjnV2ym1NYmdiJOQ==",
|
||||
"version": "7.0.16",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.16.tgz",
|
||||
"integrity": "sha512-52N+Y4HRMOJmbLmr+DqO4iSRyyB7N52gm7PWCT6h0p978+oKbqHCB7gIJIwZvBUsjlSdWbrBFqUSmIFNZMpn0A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -3783,16 +3808,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "8.72.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.72.2.tgz",
|
||||
"integrity": "sha512-llP+T1YuJOLlxEciP6OyQGtz5SMxyn+9LA2BvZw5RmToGVa1y4beEDVQL6Gje7T5WFYh19WREjDCN9Ev4gm5AA==",
|
||||
"version": "8.73.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.73.0.tgz",
|
||||
"integrity": "sha512-AuL45bVcmssHfZ3Di3cs9Q0l4gBm4ZFVrJOQEE7VpqW+PVgQaEwSwazz4TVIiFabXkk6U51EprYDwqw+HR8ePw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "8.72.2",
|
||||
"@typescript-eslint/types": "8.72.2",
|
||||
"@typescript-eslint/typescript-estree": "8.72.2",
|
||||
"@typescript-eslint/visitor-keys": "8.72.2",
|
||||
"@typescript-eslint/scope-manager": "8.73.0",
|
||||
"@typescript-eslint/types": "8.73.0",
|
||||
"@typescript-eslint/typescript-estree": "8.73.0",
|
||||
"@typescript-eslint/visitor-keys": "8.73.0",
|
||||
"debug": "^4.4.3"
|
||||
},
|
||||
"engines": {
|
||||
@@ -3808,14 +3833,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/project-service": {
|
||||
"version": "8.72.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.72.2.tgz",
|
||||
"integrity": "sha512-6y5dLTZdHhI8Eh3yIQ/bfQhRKwn5e+TpJj64o18Cngc0iW/BCrVvrr6zGYqXPnYH31u6YXAYiFh0+qxX5mybJw==",
|
||||
"version": "8.73.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.73.0.tgz",
|
||||
"integrity": "sha512-/pEf8Rc4Mjk+qJnY0uO1+Gadeal8uv50xpuic+srG2vIVatA0XxvWMUeMtFvs6OCHqftiQ7/+qH4aehG5stzIA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/tsconfig-utils": "^8.72.2",
|
||||
"@typescript-eslint/types": "^8.72.2",
|
||||
"@typescript-eslint/tsconfig-utils": "^8.73.0",
|
||||
"@typescript-eslint/types": "^8.73.0",
|
||||
"debug": "^4.4.3"
|
||||
},
|
||||
"engines": {
|
||||
@@ -3830,14 +3855,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "8.72.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.72.2.tgz",
|
||||
"integrity": "sha512-iIoMJ6/8c1/QpFNyFjU0d1YzPco4MsZjQw0k3V+vfzNWAFmUmvhlyMoYEoYYDQZXc+J6Gi1X5XcxlzW2taIIGQ==",
|
||||
"version": "8.73.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.73.0.tgz",
|
||||
"integrity": "sha512-/TjD738Iq2rzj5z0ixVOi+TsvgjAzZPLPaH1yWdDBytR/HTR5gMpyYWZeCe5WTQZLwk3ho8AV7U3muoQCRtXBQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.72.2",
|
||||
"@typescript-eslint/visitor-keys": "8.72.2"
|
||||
"@typescript-eslint/types": "8.73.0",
|
||||
"@typescript-eslint/visitor-keys": "8.73.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -3848,9 +3873,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/tsconfig-utils": {
|
||||
"version": "8.72.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.72.2.tgz",
|
||||
"integrity": "sha512-+h3iCgZXuTNtoLXcnnjP12ZUHLMqoUcIHPfQrFEXTUqvb9dF8QK9b5nv5VtSo5fLkdHuks8ehbTzZj3rImAm9w==",
|
||||
"version": "8.73.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.73.0.tgz",
|
||||
"integrity": "sha512-lmtCFOfYaJfpqZywGuXi4FpNtE+NQ+YLe3T0K9rtEDcW8ZuGWvfI++pj8r05sYMI8vWT2CYK4rWyedmD6Rp4og==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -3865,15 +3890,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "8.72.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.72.2.tgz",
|
||||
"integrity": "sha512-STfkR38qIdhfkLpgtXnUjAzsNy4xouqiBO0lrVc/Wpk9Kem5/aHXUx1J8dGC16zpdYN1+yc2ILQ28er1kXX7ag==",
|
||||
"version": "8.73.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.73.0.tgz",
|
||||
"integrity": "sha512-MOC9i4xy1F7KcDde7Ip8jf1SrRiALb2Km4UWxGNjUE2YlhjIEo1ayE27GHIwIQyfWuHTmEonQT14uyurlyC6aA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.72.2",
|
||||
"@typescript-eslint/typescript-estree": "8.72.2",
|
||||
"@typescript-eslint/utils": "8.72.2",
|
||||
"@typescript-eslint/types": "8.73.0",
|
||||
"@typescript-eslint/typescript-estree": "8.73.0",
|
||||
"@typescript-eslint/utils": "8.73.0",
|
||||
"debug": "^4.4.3",
|
||||
"ts-api-utils": "^2.5.0"
|
||||
},
|
||||
@@ -3890,9 +3915,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "8.72.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.72.2.tgz",
|
||||
"integrity": "sha512-Xfn37OLZx03+PCU7qWx9DTv2FCRh1E6fk2+wONeNY15HXIwtcwuveaSwVpGAUptkNmPQegRxW5JyRel9T7wrog==",
|
||||
"version": "8.73.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.73.0.tgz",
|
||||
"integrity": "sha512-O/1ytYzflF16QDKXx4/qOXg1IuZp+n7hr9t+S0nv7N/2Tl8rJiNCshztV1gcSUvHbPtoX3+zmNbtSAyVbzxVfw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -3904,18 +3929,18 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "8.72.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.72.2.tgz",
|
||||
"integrity": "sha512-pQEGqIK/cqEvKivVWaFLYpe7XYejFxfuAOi4mu1oAWFvIo36aRHI9esRFTUxcIy/z8N482RJyH+LpZB0ZIU7Ow==",
|
||||
"version": "8.73.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.73.0.tgz",
|
||||
"integrity": "sha512-InjlBkSdWceIwIBWSwS3ENUp+i0O02PGX3Zv2wnihWJC1WDVGvG7mTHuf8b57uAaITj94d6tRPDH+sUEtXdRQQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/project-service": "8.72.2",
|
||||
"@typescript-eslint/tsconfig-utils": "8.72.2",
|
||||
"@typescript-eslint/types": "8.72.2",
|
||||
"@typescript-eslint/visitor-keys": "8.72.2",
|
||||
"@typescript-eslint/project-service": "8.73.0",
|
||||
"@typescript-eslint/tsconfig-utils": "8.73.0",
|
||||
"@typescript-eslint/types": "8.73.0",
|
||||
"@typescript-eslint/visitor-keys": "8.73.0",
|
||||
"debug": "^4.4.3",
|
||||
"minimatch": "^10.2.2",
|
||||
"minimatch": "^11.0.1",
|
||||
"semver": "^7.7.3",
|
||||
"tinyglobby": "^0.2.15",
|
||||
"ts-api-utils": "^2.5.0"
|
||||
@@ -3928,20 +3953,43 @@
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript/native": "npm:typescript@>=7.1.0-dev.20261009.1 || >=7.1.0-beta <7.1.0-dev",
|
||||
"typescript": ">=4.8.4 <6.1.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@typescript/native": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
|
||||
"version": "11.0.9",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.9.tgz",
|
||||
"integrity": "sha512-KCFkfyjqerNlSstjlhIGNXIKZGA/6O4V4RlhZ+Dsr621SPPw0mzlypE9D9ZOoPiVefHID+j7/XuMMlqfD/F60Q==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"@isaacs/nonrecursive-glob-match": "^1.1.0",
|
||||
"brace-expansion": "^5.0.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "8.72.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.72.2.tgz",
|
||||
"integrity": "sha512-hv3eRYbpPbbpezuax1EfGrzpa3C4ySgNZkPUkLOWOAjU8HsOKowEDAr8C7nsNl1C+SBSKDpvno6VKHnlhvp9iA==",
|
||||
"version": "8.73.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.73.0.tgz",
|
||||
"integrity": "sha512-j2SVJJvVkXdUL0WcEzo4vEH1mO1vIi8KlVukcYA2MgMZvYN2LlZR4PmsW+GTSxSW24j6Q/EP7+MOifLtg5hmsA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.9.1",
|
||||
"@typescript-eslint/scope-manager": "8.72.2",
|
||||
"@typescript-eslint/types": "8.72.2",
|
||||
"@typescript-eslint/typescript-estree": "8.72.2"
|
||||
"@typescript-eslint/scope-manager": "8.73.0",
|
||||
"@typescript-eslint/types": "8.73.0",
|
||||
"@typescript-eslint/typescript-estree": "8.73.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -3956,13 +4004,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "8.72.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.72.2.tgz",
|
||||
"integrity": "sha512-NAGrjn0Pitjqzq/GkgMC4kBYm233PQ8GffyQ9+kTA3AlNQYEzOf25EIM02BAHZv5FRJSpHpJk+OGUxVkOB93GQ==",
|
||||
"version": "8.73.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.73.0.tgz",
|
||||
"integrity": "sha512-k4lsFVpRZICbltkIEEH4hZRkwXkqDF1GHBpClKQOHQY+RkoZAAuyc1ci3I6p+CB6v3U4jaHIUshc4RzzQXZWLg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.72.2",
|
||||
"@typescript-eslint/types": "8.73.0",
|
||||
"eslint-visitor-keys": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
@@ -4144,18 +4192,18 @@
|
||||
}
|
||||
},
|
||||
"node_modules/apex-commons": {
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/apex-commons/-/apex-commons-0.10.0.tgz",
|
||||
"integrity": "sha512-mBXqK6wykMnWV4TzT9636k4aaeEvE8PmBIfa2bHx91eQoit8RjJrOlBpGxNGz1Bmt6gq2U3CoqPAUZftBbYdLQ==",
|
||||
"version": "0.11.0",
|
||||
"resolved": "https://registry.npmjs.org/apex-commons/-/apex-commons-0.11.0.tgz",
|
||||
"integrity": "sha512-r0t1hq4eNzjqRHlf0qG9jiwhd3g/68A9QvgVyjres4oif72NWA1pcvFizpx7gjc/SPECALq0KkL5f12ODIDBPA==",
|
||||
"license": "SEE LICENSE IN LICENSE.md"
|
||||
},
|
||||
"node_modules/apexcharts": {
|
||||
"version": "8.8.1",
|
||||
"resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-8.8.1.tgz",
|
||||
"integrity": "sha512-Aeha39Wdrg4pTdJTpM+QsQemLoCRpwC5tEgwHYzbvtRxo4E9EmQ6zdTZbhcYia24HyPhqx3IATd1evgS0lRtzw==",
|
||||
"version": "8.9.1",
|
||||
"resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-8.9.1.tgz",
|
||||
"integrity": "sha512-0SsOUfiEsJblL9tB8IoHfpSMq1cxBnA3v8TNDPA9zfe7gDUVXEfNQte1kdVztsWVQuNPIoZZ3/591LkEwgxuLA==",
|
||||
"license": "SEE LICENSE IN LICENSE.md",
|
||||
"dependencies": {
|
||||
"apex-commons": "^0.10.0"
|
||||
"apex-commons": "^0.11.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.12.0 || >=24.0.0"
|
||||
@@ -4727,9 +4775,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/compute-scroll-into-view": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.0.tgz",
|
||||
"integrity": "sha512-rj8l8pD4bJ1nx+dAkMhV1xB5RuZEyVysfxJqB1pRchh1KVvwOv9b7CGB8ZfjTImVv2oF+sYMUkMZq6Na5Ftmbg=="
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.2.2.tgz",
|
||||
"integrity": "sha512-X+jf3y2j3TbtxA3fq3/kBNiSnD1QlIChiIQdAc2Yo1LtOc0yjO1TzgxWJf8PwtKPGgSvSfWUlVvrb7vGx1eYWA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/convert-source-map": {
|
||||
"version": "2.0.0",
|
||||
@@ -5055,9 +5104,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint": {
|
||||
"version": "10.14.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-10.14.0.tgz",
|
||||
"integrity": "sha512-T0pNsxkb9IKmtQjhpK3d7nWOpFv+YHuMbTJnSVMoQblF0onvXfErrtp4V1jHtsQPan7dKaGVD0q1WCXnzMF31A==",
|
||||
"version": "10.15.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-10.15.0.tgz",
|
||||
"integrity": "sha512-+5Wg4p+ze3sG1WErYgUO/3H1IQIfFBymVUA0Fo/XTeBOLS6UQIUekpSJ8sdRkn7O7wjh84b55w/roqavH2aScg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"workspaces": [
|
||||
@@ -5066,7 +5115,7 @@
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.8.0",
|
||||
"@eslint-community/regexpp": "^4.12.2",
|
||||
"@eslint/config-array": "^0.23.5",
|
||||
"@eslint/config-array": "^0.23.6",
|
||||
"@eslint/config-helpers": "^0.7.0",
|
||||
"@eslint/core": "^1.2.1",
|
||||
"@eslint/plugin-kit": "^0.7.3",
|
||||
@@ -5091,7 +5140,7 @@
|
||||
"imurmurhash": "^0.1.4",
|
||||
"is-glob": "^4.0.0",
|
||||
"json-stable-stringify-without-jsonify": "^1.0.1",
|
||||
"minimatch": "^10.2.6",
|
||||
"minimatch": "^11.0.5",
|
||||
"natural-compare": "^1.4.0",
|
||||
"optionator": "^0.9.3"
|
||||
},
|
||||
@@ -5194,9 +5243,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-react-refresh": {
|
||||
"version": "0.5.7",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.5.7.tgz",
|
||||
"integrity": "sha512-XhJSzLljuYD4UjNuFGJu2v7aD3sqNVK12w5/DCUfrNfHWegZo2+TsavNx8MuxMwEquuFAzNbNfXKU0WoZ+YUIg==",
|
||||
"version": "0.5.8",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.5.8.tgz",
|
||||
"integrity": "sha512-VYgz1iCC5LxeAd6YRz5ATfg8WKrNb1ulHMpCe4pQpn3CS9DiYpZi5wcag73O8iChLhrl/CmlGMmzA6eXZ2cX4Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
@@ -5259,6 +5308,23 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/eslint/node_modules/minimatch": {
|
||||
"version": "11.0.9",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.9.tgz",
|
||||
"integrity": "sha512-KCFkfyjqerNlSstjlhIGNXIKZGA/6O4V4RlhZ+Dsr621SPPw0mzlypE9D9ZOoPiVefHID+j7/XuMMlqfD/F60Q==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"@isaacs/nonrecursive-glob-match": "^1.1.0",
|
||||
"brace-expansion": "^5.0.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/espree": {
|
||||
"version": "11.2.0",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz",
|
||||
@@ -5532,9 +5598,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/file-selector": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/file-selector/-/file-selector-5.0.1.tgz",
|
||||
"integrity": "sha512-v0g/PTeuQgvKCBrVRsfVudvwXlRHSWHEQkVgKawgCGHkEpKA1clp3Om5jvEVhz8G9W/mOYjJH9FhkH4C888PgQ==",
|
||||
"version": "5.0.3",
|
||||
"resolved": "https://registry.npmjs.org/file-selector/-/file-selector-5.0.3.tgz",
|
||||
"integrity": "sha512-d15nlW+KKq82TlItRvCHtJ8NXCX0nwz2SEUR1MOT8W50c5q2se551ZFdhITFrWohl/5wbRPfMMF9jq4Oj1xRGQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 22"
|
||||
@@ -5665,12 +5731,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/framer-motion": {
|
||||
"version": "14.12.0",
|
||||
"resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-14.12.0.tgz",
|
||||
"integrity": "sha512-4m+10xYan0ic8nFI8zyB5hJkW5F8F4Rer617UecOs8esw0he9unDgXaEZ0rUX7oztz1w4iuvyPWhk4jltMX5iw==",
|
||||
"version": "14.14.0",
|
||||
"resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-14.14.0.tgz",
|
||||
"integrity": "sha512-fidRX0VzkZdA9OovFiBSzJtt9/jLcJpna78Z+KCqQQZIWoIpN3tOhEXAhhAw/FObUUh+o3Y18yx1F4BP0mVJ8Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"motion-dom": "14.12.0",
|
||||
"motion-dom": "14.14.0",
|
||||
"motion-utils": "14.7.0",
|
||||
"tslib": "^2.4.0"
|
||||
},
|
||||
@@ -6018,6 +6084,12 @@
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/heic-to": {
|
||||
"version": "1.6.7",
|
||||
"resolved": "https://registry.npmjs.org/heic-to/-/heic-to-1.6.7.tgz",
|
||||
"integrity": "sha512-GCPYNl86u6eZ7mr2aa+uQB+PrQOVKSBYfH8esovr8kh2c6EYQSDYIJ6uhXSmM2hPC8PdBVJ/Trn0jnfM9H9gvg==",
|
||||
"license": "LGPL-3.0"
|
||||
},
|
||||
"node_modules/hermes-estree": {
|
||||
"version": "0.25.1",
|
||||
"resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.25.1.tgz",
|
||||
@@ -6078,9 +6150,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/i18next": {
|
||||
"version": "27.1.1",
|
||||
"resolved": "https://registry.npmjs.org/i18next/-/i18next-27.1.1.tgz",
|
||||
"integrity": "sha512-Qq3aJizS3RXQ30crhx9BKQLrHoa6GKpgrOJjVZ9vgj3EBxAddrmVfDNUrAMxSUimw5Jc+ld4SSZUAzf1q4nGyQ==",
|
||||
"version": "27.2.2",
|
||||
"resolved": "https://registry.npmjs.org/i18next/-/i18next-27.2.2.tgz",
|
||||
"integrity": "sha512-1/AJgz/bpE/YL6tqekQlZAzDhkmrUBbgU8+Xon/Lwv6c5WdYuyFZ9mb86OVfR2C2XujUDT7Rz23Ydaq4l981lA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
@@ -6196,9 +6268,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/i18next-http-backend": {
|
||||
"version": "4.0.10",
|
||||
"resolved": "https://registry.npmjs.org/i18next-http-backend/-/i18next-http-backend-4.0.10.tgz",
|
||||
"integrity": "sha512-CfdQuwIVijbrS/fmiTAQYcYyje4nMbH9aIjKYhhm5bgVmWKWLOM1F7qrA1o63Jl1JxQcRjdtWhKlvDzyqV9aPg==",
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/i18next-http-backend/-/i18next-http-backend-4.1.0.tgz",
|
||||
"integrity": "sha512-OY3KA8s6WUfUCviw+6VA79148bYaws+FEOZD6MNeZ8Tw1ocfu1j1Qp3ROYNMikzNv1gyTBgzHbWMP/rfZDSp1g==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
@@ -7068,9 +7140,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/lucide-react": {
|
||||
"version": "1.72.0",
|
||||
"resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-1.72.0.tgz",
|
||||
"integrity": "sha512-fbF5i1GU8GODETa3Q7rXqrJrcx3iPYrQtxthom103zGx+Z0BGwKYAW9s+9435ohYJ7hQm0av0PoZcqI1CRwNrg==",
|
||||
"version": "1.76.0",
|
||||
"resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-1.76.0.tgz",
|
||||
"integrity": "sha512-wRVHt2Xf64GXndB4rQOY9+3Wy9oJ59HDMYv6vwhT0hpSwUxQhG/RM9YijnOmvmIQ+VI/n+1V/FKd6gP4XL2aBQ==",
|
||||
"license": "ISC",
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
@@ -8145,9 +8217,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/motion-dom": {
|
||||
"version": "14.12.0",
|
||||
"resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-14.12.0.tgz",
|
||||
"integrity": "sha512-YnAY17g8mXRVoXGZbH+v/O2SkNBJqz2TMuqL9yek9Omfhsdjw7gJwNgI5nsGZFpbbm3vINyOo+VtGPryIslatw==",
|
||||
"version": "14.14.0",
|
||||
"resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-14.14.0.tgz",
|
||||
"integrity": "sha512-IAxcKhYkuQA2W0Tlx1AvVgImfqEoF3/t3IovbPQJlYkefmGsmrXjn967lMII5VmFmLpQEab4+ZkHo/ijJ4Esig==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"motion-utils": "14.7.0"
|
||||
@@ -8609,13 +8681,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/playwright": {
|
||||
"version": "1.65.0",
|
||||
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.65.0.tgz",
|
||||
"integrity": "sha512-F3AMWcR44qMBt4kq+6Kb6mX7bjGXshktKFOPULd7reED6ZJWevjbNRqysP7q+AATE9kdPEZBibex1BYsvpVoeA==",
|
||||
"version": "1.65.1",
|
||||
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.65.1.tgz",
|
||||
"integrity": "sha512-vJ1FuoOrNwOKHUIVEvSt3jT1L+wjjDpwhwIstKtfvTh8XIG4FG4bIFuvNdMxi81LGfAhUgUZleVFaOLY4RIUUw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright-core": "1.65.0"
|
||||
"playwright-core": "1.65.1"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
@@ -8625,9 +8697,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/playwright-core": {
|
||||
"version": "1.65.0",
|
||||
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.65.0.tgz",
|
||||
"integrity": "sha512-vNSKgH6YqtN7cdT/L334zo0a+YwkrpicyrHJlWWPIm/Q+Nn2SWInil01oT0mbu96U4GgoRtCYQD9CzJQgju+lA==",
|
||||
"version": "1.65.1",
|
||||
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.65.1.tgz",
|
||||
"integrity": "sha512-hqPpz7blSMPxWVdoeE1yiBSzXsKiVOd2k+kjCvmUywD2GPO2Dd9HfcWnq9NN0GHbNZDFgZ9JfBFr+X5/BLo0qw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
@@ -8638,9 +8710,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.5.32",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.32.tgz",
|
||||
"integrity": "sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==",
|
||||
"version": "8.5.33",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.33.tgz",
|
||||
"integrity": "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
@@ -9010,9 +9082,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-apexcharts": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-apexcharts/-/react-apexcharts-2.2.0.tgz",
|
||||
"integrity": "sha512-MEiH/T65ooUNf8V7Cq7fCu1femP3+lN9Svzsv+jNNS6AcRSciyA1LLvc1VETWqAiqMxQyX8NYEhZxOYnMf262g==",
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/react-apexcharts/-/react-apexcharts-2.2.1.tgz",
|
||||
"integrity": "sha512-cRx+RpRk6WG0SZelOvqDOqbJOWoUSHWAreAkgpNJwsG9axV+uEtTh8zOATW2uK0IjfmFZA8KenSIipslbras4g==",
|
||||
"license": "SEE LICENSE IN LICENSE.md",
|
||||
"dependencies": {
|
||||
"prop-types": "^15.8.1"
|
||||
@@ -9087,13 +9159,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-dropzone": {
|
||||
"version": "20.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-20.2.0.tgz",
|
||||
"integrity": "sha512-FRlcSp6UFT9Etg57U4+g6O6qF/jH7sUh2Hz67lQlrZJa/3FjfAFvw7DwDSItiG2vBUXTdh2wroEwXPPg7o/jkg==",
|
||||
"version": "20.2.1",
|
||||
"resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-20.2.1.tgz",
|
||||
"integrity": "sha512-8ldzI42a+iz6jlC5t0HoOO5ce65dU8ZGo8ZpesL2E57JByC8LBUieMrkGj97YYfgMaYKwkhpkfYxKOCKAekywA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"attr-accept": "^4.0.1",
|
||||
"file-selector": "^5.0.1"
|
||||
"file-selector": "^5.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 22"
|
||||
@@ -9149,9 +9221,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-i18next": {
|
||||
"version": "18.0.1",
|
||||
"resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-18.0.1.tgz",
|
||||
"integrity": "sha512-kPWXI0E/lrPj3+/umcKNzYZVnWmEedLiamMzDIHfbs+5ANf6yzvlZsjKou8f7kaGkfMMDLIZBejV+4aSN1CyBw==",
|
||||
"version": "18.0.3",
|
||||
"resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-18.0.3.tgz",
|
||||
"integrity": "sha512-S84rtVuaKuiRtoCOspbGEaDlFjka+KvK/A5YCOr4LQ41XF3iJOrJ5rqQTD/jJHFVUf6X1i4ZMN5PGGgpz8NN6g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"html-parse-stringify": "^4.0.1"
|
||||
@@ -9324,9 +9396,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-router": {
|
||||
"version": "7.18.5",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.18.5.tgz",
|
||||
"integrity": "sha512-dTgvcXDOrLPrlLHrcZAqWveiK1hMSqN+rGAJzegP8HtmNkfRxOoshGWBNX3ZJ0cZjOHkRdlUJtaIhZMLLyGyPw==",
|
||||
"version": "7.18.6",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.18.6.tgz",
|
||||
"integrity": "sha512-SP8KqKfRLlJzqzPseC+r6yYFsqPEavtQCC4BKV810tBGijjESLtwVPam+gPOO+wYeXrYN/TNy2CAykQVcNg4iQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cookie": "^1.0.1",
|
||||
@@ -9346,12 +9418,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-router-dom": {
|
||||
"version": "7.18.5",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.18.5.tgz",
|
||||
"integrity": "sha512-9HcfDMU6JJ/fp6gJZYGwNE6RknVGS4kBjH1HkNw959mCJi70TVwdipQWv2FEol9uGpi+SZTFtVpJPtEQfayeOw==",
|
||||
"version": "7.18.6",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.18.6.tgz",
|
||||
"integrity": "sha512-a8JzFsKEY3EY9QL7t4T1b1OhuY0ngEfwMzXQNgBO/2cuIW9028JbVq3uk2rKnjLredzcIoDKLzUkguIq6fnkFA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"react-router": "7.18.5"
|
||||
"react-router": "7.18.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0.0"
|
||||
@@ -9655,15 +9727,12 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/scroll-into-view-if-needed": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-3.2.0.tgz",
|
||||
"integrity": "sha512-mnlrulRcw9gQR/HI0SlT56kmyCS/Z1tH/By43m8v8kHBjD8XecscweRcjKAk3kt4WLeyJQaSSQ8efy5f+r/dqA==",
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-3.2.1.tgz",
|
||||
"integrity": "sha512-dgeJvJhSV9MY6hyhtsivbSxHoZVm+lumsWTObtUdAchJflwOGmKKHNkEpU8pVYMomZ8h/yrfzVQkcPlObQNDWQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"compute-scroll-into-view": "^3.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=26"
|
||||
"compute-scroll-into-view": "^3.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
@@ -9931,9 +10000,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/tailwind-merge": {
|
||||
"version": "2.6.1",
|
||||
"resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.6.1.tgz",
|
||||
"integrity": "sha512-Oo6tHdpZsGpkKG88HJ8RR1rg/RdnEkQEfMoEk2x1XRI3F1AxeU+ijRXpiVUF4UbLfcxxRGw6TbUINKYdWVsQTQ==",
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.6.2.tgz",
|
||||
"integrity": "sha512-o2TX9QB8K2cfaJYgMwv96uAUQK5SqpRJHD2vGDK5nyF/tk9PQTZFpwgsDsySQjlIbYdZ6ZDkk5W+bSuWSe92AA==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
@@ -10156,16 +10225,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript-eslint": {
|
||||
"version": "8.72.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.72.2.tgz",
|
||||
"integrity": "sha512-c/+AKMW1KB81r28Sp0AAdcyXj5dzNmAsZFcsrxKbZTKmcBK2xIwBR31dcSYSDu3bKmzXe8GKrSxO+eDQ401Uzg==",
|
||||
"version": "8.73.0",
|
||||
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.73.0.tgz",
|
||||
"integrity": "sha512-+EnKy9rkYPun4l+kG2bDuYWQ6y1tGVgdR/tY1U9AC6h21CjEwOoc7gsjwe0FXB8uWFzk4QiCFbuRWgX758PiAg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "8.72.2",
|
||||
"@typescript-eslint/parser": "8.72.2",
|
||||
"@typescript-eslint/typescript-estree": "8.72.2",
|
||||
"@typescript-eslint/utils": "8.72.2"
|
||||
"@typescript-eslint/eslint-plugin": "8.73.0",
|
||||
"@typescript-eslint/parser": "8.73.0",
|
||||
"@typescript-eslint/typescript-estree": "8.73.0",
|
||||
"@typescript-eslint/utils": "8.73.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -10458,9 +10527,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/virtua": {
|
||||
"version": "0.54.2",
|
||||
"resolved": "https://registry.npmjs.org/virtua/-/virtua-0.54.2.tgz",
|
||||
"integrity": "sha512-lYCAxyXCGkhXVvuKv8a+LklZquy0E9dIObYcOUyo6nP4VSvLeiIsiz94mA3ZKYuM5egkke5RIi2nXi5OIATc7A==",
|
||||
"version": "0.55.0",
|
||||
"resolved": "https://registry.npmjs.org/virtua/-/virtua-0.55.0.tgz",
|
||||
"integrity": "sha512-w79kvcw7PwXFmo+MSENbgy3XL61OfStJm7FPtJwZey1EsK0F0gDXmgGHvblS/iebDcg+K5J1ddlUGJ5dXGo4lA==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@angular/common": ">=20.0.0",
|
||||
|
||||
+19
-18
@@ -22,7 +22,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@cycjimmy/jsmpeg-player": "^7.0.0",
|
||||
"@hookform/resolvers": "^7.0.6",
|
||||
"@hookform/resolvers": "^7.0.7",
|
||||
"@radix-ui/react-alert-dialog": "^1.2.1",
|
||||
"@radix-ui/react-aspect-ratio": "^1.2.0",
|
||||
"@radix-ui/react-checkbox": "^1.4.1",
|
||||
@@ -49,7 +49,7 @@
|
||||
"@rjsf/shadcn": "^6.11.1",
|
||||
"@rjsf/utils": "^6.10.1",
|
||||
"@rjsf/validator-ajv8": "^6.11.1",
|
||||
"apexcharts": "^8.8.1",
|
||||
"apexcharts": "^8.9.1",
|
||||
"axios": "^1.21.1",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
@@ -57,49 +57,50 @@
|
||||
"copy-to-clipboard": "^4.0.2",
|
||||
"date-fns": "^4.4.0",
|
||||
"date-fns-tz": "^3.2.0",
|
||||
"framer-motion": "^14.12.0",
|
||||
"framer-motion": "^14.14.0",
|
||||
"heic-to": "^1.6.7",
|
||||
"hls.js": "^1.7.4",
|
||||
"i18next": "^27.1.1",
|
||||
"i18next-http-backend": "^4.0.10",
|
||||
"i18next": "^27.2.2",
|
||||
"i18next-http-backend": "^4.1.0",
|
||||
"idb-keyval": "^6.3.0",
|
||||
"js-yaml": "^5.5.0",
|
||||
"konva": "^10.9.1",
|
||||
"lodash": "^4.18.1",
|
||||
"lucide-react": "^1.72.0",
|
||||
"lucide-react": "^1.76.0",
|
||||
"monaco-yaml": "^5.5.1",
|
||||
"next-themes": "^0.4.6",
|
||||
"nosleep.js": "^0.12.0",
|
||||
"react": "^19.3.1",
|
||||
"react-apexcharts": "^2.2.0",
|
||||
"react-apexcharts": "^2.2.1",
|
||||
"react-day-picker": "^10.0.2",
|
||||
"react-device-detect": "^2.2.3",
|
||||
"react-dom": "^19.3.1",
|
||||
"react-dropzone": "^20.2.0",
|
||||
"react-dropzone": "^20.2.1",
|
||||
"react-grid-layout": "^2.3.0",
|
||||
"react-hook-form": "^7.92.0",
|
||||
"react-i18next": "^18.0.1",
|
||||
"react-i18next": "^18.0.3",
|
||||
"react-icons": "^5.7.0",
|
||||
"react-konva": "^19.3.2",
|
||||
"react-markdown": "^10.1.0",
|
||||
"react-router-dom": "^7.18.5",
|
||||
"react-router-dom": "^7.18.6",
|
||||
"react-swipeable": "^7.0.2",
|
||||
"react-zoom-pan-pinch": "3.4.4",
|
||||
"remark-gfm": "^4.0.0",
|
||||
"scroll-into-view-if-needed": "^3.2.0",
|
||||
"scroll-into-view-if-needed": "^3.2.1",
|
||||
"sonner": "^2.0.8",
|
||||
"swr": "^2.5.1",
|
||||
"tailwind-merge": "^2.6.1",
|
||||
"tailwind-merge": "^2.6.2",
|
||||
"tailwind-scrollbar": "^3.1.0",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"use-long-press": "^3.3.0",
|
||||
"vaul": "^1.1.2",
|
||||
"virtua": "^0.54.2",
|
||||
"virtua": "^0.55.0",
|
||||
"vite-plugin-monaco-editor": "^1.1.0",
|
||||
"zod": "^4.6.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@playwright/test": "^1.65.0",
|
||||
"@playwright/test": "^1.65.1",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/lodash": "^4.17.27",
|
||||
"@types/node": "^26.6.6",
|
||||
@@ -108,21 +109,21 @@
|
||||
"@vitejs/plugin-react": "^6.3.0",
|
||||
"autoprefixer": "^10.6.2",
|
||||
"esbuild": "^0.28.2",
|
||||
"eslint": "^10.14.0",
|
||||
"eslint": "^10.15.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-prettier": "^5.5.7",
|
||||
"eslint-plugin-react-hooks": "^7.1.1",
|
||||
"eslint-plugin-react-refresh": "^0.5.7",
|
||||
"eslint-plugin-react-refresh": "^0.5.8",
|
||||
"globals": "^17.14.0",
|
||||
"i18next-cli": "^1.5.11",
|
||||
"monaco-editor": "^0.53.0",
|
||||
"patch-package": "^8.0.1",
|
||||
"postcss": "^8.5.32",
|
||||
"postcss": "^8.5.33",
|
||||
"prettier": "^3.10.1",
|
||||
"prettier-plugin-tailwindcss": "^0.8.1",
|
||||
"tailwindcss": "^3.4.19",
|
||||
"typescript": "^6.0.3",
|
||||
"typescript-eslint": "^8.72.2",
|
||||
"typescript-eslint": "^8.73.0",
|
||||
"vite": "^8.3.8"
|
||||
},
|
||||
"overrides": {
|
||||
|
||||
@@ -61,8 +61,10 @@
|
||||
},
|
||||
"imageEntry": {
|
||||
"validation": {
|
||||
"selectImage": "Please select an image file."
|
||||
"selectImage": "Please select an image file.",
|
||||
"heicConversionFailed": "Unable to convert this HEIC image. Try exporting it as a JPEG instead."
|
||||
},
|
||||
"converting": "Converting image…",
|
||||
"dropActive": "Drop the image here…",
|
||||
"dropInstructions": "Drag and drop or paste an image here, or click to select",
|
||||
"maxSize": "Max size: {{size}}MB"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import ActivityIndicator from "@/components/indicators/activity-indicator";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
Form,
|
||||
@@ -7,6 +8,11 @@ import {
|
||||
FormMessage,
|
||||
} from "@/components/ui/form";
|
||||
import { cn } from "@/lib/utils";
|
||||
import {
|
||||
convertHeicToJpeg,
|
||||
HEIC_EXTENSIONS,
|
||||
isHeicFile,
|
||||
} from "@/utils/heicUtil";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { useDropzone } from "react-dropzone";
|
||||
@@ -26,11 +32,25 @@ export default function ImageEntry({
|
||||
onSave,
|
||||
children,
|
||||
maxSize = 20 * 1024 * 1024, // 20MB default
|
||||
accept = { "image/*": [".jpeg", ".jpg", ".png", ".gif", ".webp"] },
|
||||
accept = {
|
||||
"image/*": [".jpeg", ".jpg", ".png", ".gif", ".webp", ...HEIC_EXTENSIONS],
|
||||
},
|
||||
}: ImageEntryProps) {
|
||||
const { t } = useTranslation(["views/faceLibrary"]);
|
||||
const [preview, setPreview] = useState<string | null>(null);
|
||||
const [converting, setConverting] = useState(false);
|
||||
const dropzoneRef = useRef<HTMLDivElement>(null);
|
||||
// Bumped on every selection and clear, so a HEIC conversion that finishes
|
||||
// after the selection changed is discarded instead of applied
|
||||
const selectionId = useRef(0);
|
||||
|
||||
// Discard conversions that finish after the component unmounts
|
||||
useEffect(() => {
|
||||
const id = selectionId;
|
||||
return () => {
|
||||
id.current += 1;
|
||||
};
|
||||
}, []);
|
||||
|
||||
// Auto focus the dropzone
|
||||
useEffect(() => {
|
||||
@@ -60,18 +80,48 @@ export default function ImageEntry({
|
||||
resolver: zodResolver(formSchema),
|
||||
});
|
||||
|
||||
const selectFile = useCallback(
|
||||
async (file: File) => {
|
||||
const id = ++selectionId.current;
|
||||
let selected = file;
|
||||
|
||||
if (isHeicFile(file)) {
|
||||
setConverting(true);
|
||||
const converted = await convertHeicToJpeg(file).catch(() => null);
|
||||
|
||||
// the selection was cleared or replaced while converting
|
||||
if (id !== selectionId.current) {
|
||||
return;
|
||||
}
|
||||
|
||||
setConverting(false);
|
||||
|
||||
if (!converted) {
|
||||
form.setError("file", {
|
||||
message: t("imageEntry.validation.heicConversionFailed"),
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
selected = converted;
|
||||
}
|
||||
|
||||
form.setValue("file", selected, { shouldValidate: true });
|
||||
|
||||
// Create preview
|
||||
const objectUrl = URL.createObjectURL(selected);
|
||||
setPreview(objectUrl);
|
||||
},
|
||||
[form, t],
|
||||
);
|
||||
|
||||
const onDrop = useCallback(
|
||||
(acceptedFiles: File[]) => {
|
||||
if (acceptedFiles.length > 0) {
|
||||
const file = acceptedFiles[0];
|
||||
form.setValue("file", file, { shouldValidate: true });
|
||||
|
||||
// Create preview
|
||||
const objectUrl = URL.createObjectURL(file);
|
||||
setPreview(objectUrl);
|
||||
selectFile(acceptedFiles[0]);
|
||||
}
|
||||
},
|
||||
[form],
|
||||
[selectFile],
|
||||
);
|
||||
|
||||
const { getRootProps, getInputProps, isDragActive, isDragReject } =
|
||||
@@ -80,11 +130,17 @@ export default function ImageEntry({
|
||||
maxSize,
|
||||
accept,
|
||||
multiple: false,
|
||||
disabled: converting,
|
||||
});
|
||||
|
||||
const handlePaste = useCallback(
|
||||
(event: React.ClipboardEvent<HTMLDivElement>) => {
|
||||
event.preventDefault();
|
||||
|
||||
if (converting) {
|
||||
return;
|
||||
}
|
||||
|
||||
const clipboardItems = Array.from(event.clipboardData.items);
|
||||
for (const item of clipboardItems) {
|
||||
if (item.type.startsWith("image/")) {
|
||||
@@ -95,27 +151,30 @@ export default function ImageEntry({
|
||||
if (accept["image/*"].includes(extension)) {
|
||||
const fileName = blob.name || `pasted-image.${mimeType}`;
|
||||
const file = new File([blob], fileName, { type: blob.type });
|
||||
form.setValue("file", file, { shouldValidate: true });
|
||||
const objectUrl = URL.createObjectURL(file);
|
||||
setPreview(objectUrl);
|
||||
selectFile(file);
|
||||
return; // Take the first valid image
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
[form, maxSize, accept],
|
||||
[converting, maxSize, accept, selectFile],
|
||||
);
|
||||
|
||||
const onSubmit = useCallback(
|
||||
(data: z.infer<typeof formSchema>) => {
|
||||
if (!data.file) return;
|
||||
// the form still holds the previous image until a replacement
|
||||
// finishes converting, so saving now would upload the wrong one
|
||||
if (!data.file || converting) return;
|
||||
onSave(data.file);
|
||||
},
|
||||
[onSave],
|
||||
[converting, onSave],
|
||||
);
|
||||
|
||||
const clearSelection = () => {
|
||||
// drop any running conversion so it can't restore the selection
|
||||
selectionId.current += 1;
|
||||
setConverting(false);
|
||||
form.reset();
|
||||
setPreview(null);
|
||||
};
|
||||
@@ -142,21 +201,34 @@ export default function ImageEntry({
|
||||
"flex h-40 flex-col items-center justify-center rounded-lg border-2 border-dashed p-6 transition-colors",
|
||||
isDragActive && "border-primary bg-primary/5",
|
||||
isDragReject && "border-destructive bg-destructive/5",
|
||||
"cursor-pointer hover:border-primary hover:bg-primary/5",
|
||||
converting
|
||||
? "cursor-wait"
|
||||
: "cursor-pointer hover:border-primary hover:bg-primary/5",
|
||||
)}
|
||||
>
|
||||
<input {...getInputProps()} />
|
||||
<LuUpload className="mb-2 h-10 w-10 text-muted-foreground" />
|
||||
<p className="text-center text-sm text-muted-foreground">
|
||||
{isDragActive
|
||||
? t("imageEntry.dropActive")
|
||||
: t("imageEntry.dropInstructions")}
|
||||
</p>
|
||||
<p className="mt-1 text-xs text-muted-foreground">
|
||||
{t("imageEntry.maxSize", {
|
||||
size: Math.round(maxSize / (1024 * 1024)),
|
||||
})}
|
||||
</p>
|
||||
{converting ? (
|
||||
<>
|
||||
<ActivityIndicator className="mb-2" />
|
||||
<p className="text-center text-sm text-muted-foreground">
|
||||
{t("imageEntry.converting")}
|
||||
</p>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<LuUpload className="mb-2 h-10 w-10 text-muted-foreground" />
|
||||
<p className="text-center text-sm text-muted-foreground">
|
||||
{isDragActive
|
||||
? t("imageEntry.dropActive")
|
||||
: t("imageEntry.dropInstructions")}
|
||||
</p>
|
||||
<p className="mt-1 text-xs text-muted-foreground">
|
||||
{t("imageEntry.maxSize", {
|
||||
size: Math.round(maxSize / (1024 * 1024)),
|
||||
})}
|
||||
</p>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
) : (
|
||||
<div className="relative h-40 w-full">
|
||||
@@ -165,6 +237,14 @@ export default function ImageEntry({
|
||||
alt="Preview"
|
||||
className="h-full w-full rounded-lg border object-contain"
|
||||
/>
|
||||
{converting && (
|
||||
<div className="absolute inset-0 flex cursor-wait flex-col items-center justify-center rounded-lg bg-background/80">
|
||||
<ActivityIndicator className="mb-2" />
|
||||
<p className="text-center text-sm text-muted-foreground">
|
||||
{t("imageEntry.converting")}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
<Button
|
||||
type="button"
|
||||
variant="destructive"
|
||||
|
||||
@@ -28,7 +28,7 @@ export function SummarySegment({
|
||||
<div className="absolute inset-0 flex h-full cursor-pointer justify-end">
|
||||
<div
|
||||
className={cn(
|
||||
"w-[10px]",
|
||||
"w-full",
|
||||
severityColors[severity],
|
||||
height < 0.5 && "min-h-[0.5px]",
|
||||
)}
|
||||
|
||||
@@ -8,18 +8,26 @@ import React, {
|
||||
import { SummarySegment } from "./SummarySegment";
|
||||
import {
|
||||
ConsolidatedSegmentData,
|
||||
MotionData,
|
||||
ReviewSegment,
|
||||
ReviewSeverity,
|
||||
} from "@/types/review";
|
||||
import { useTimelineUtils } from "@/hooks/use-timeline-utils";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { isMobile } from "react-device-detect";
|
||||
|
||||
const MIN_BOX_HEIGHT = isMobile ? 20 : 12;
|
||||
const DRAG_THRESHOLD = 4;
|
||||
|
||||
export type SummaryTimelineProps = {
|
||||
reviewTimelineRef: React.RefObject<HTMLDivElement | null>;
|
||||
timelineStart: number;
|
||||
timelineEnd: number;
|
||||
segmentDuration: number;
|
||||
events: ReviewSegment[];
|
||||
severityType: ReviewSeverity;
|
||||
events?: ReviewSegment[];
|
||||
severityType?: ReviewSeverity;
|
||||
motionData?: MotionData[];
|
||||
motionScale?: number;
|
||||
};
|
||||
|
||||
export function SummaryTimeline({
|
||||
@@ -27,16 +35,22 @@ export function SummaryTimeline({
|
||||
timelineStart,
|
||||
timelineEnd,
|
||||
segmentDuration,
|
||||
events,
|
||||
events = [],
|
||||
severityType,
|
||||
motionData,
|
||||
motionScale,
|
||||
}: SummaryTimelineProps) {
|
||||
const summaryTimelineRef = useRef<HTMLDivElement>(null);
|
||||
const visibleSectionRef = useRef<HTMLDivElement>(null);
|
||||
const motionCanvasRef = useRef<HTMLCanvasElement>(null);
|
||||
|
||||
const [isDragging, setIsDragging] = useState(false);
|
||||
const [scrollStartPosition, setScrollStartPosition] = useState<number>(0);
|
||||
const [initialReviewTimelineScrollTop, setInitialReviewTimelineScrollTop] =
|
||||
useState<number>(0);
|
||||
const dragRef = useRef<{
|
||||
startY: number;
|
||||
startScrollTop: number;
|
||||
insideBox: boolean;
|
||||
moved: boolean;
|
||||
} | null>(null);
|
||||
|
||||
const observer = useRef<ResizeObserver | null>(null);
|
||||
|
||||
@@ -129,6 +143,79 @@ export function SummaryTimeline({
|
||||
segmentDuration,
|
||||
]);
|
||||
|
||||
// Each motion sample covers motionScale seconds with a 0-100 value, and
|
||||
// bins without motion are absent. Opacity is the bucket's mean value.
|
||||
|
||||
const drawMotion = useCallback(() => {
|
||||
const canvas = motionCanvasRef.current;
|
||||
const ctx = canvas?.getContext("2d");
|
||||
|
||||
if (!canvas || !ctx || !motionData || !motionScale) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { clientWidth: width, clientHeight: height } = canvas;
|
||||
const dpr = window.devicePixelRatio || 1;
|
||||
canvas.width = width * dpr;
|
||||
canvas.height = height * dpr;
|
||||
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
||||
ctx.clearRect(0, 0, width, height);
|
||||
|
||||
const duration = timelineStart - timelineEnd;
|
||||
|
||||
if (duration <= 0 || height <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const rows = Math.max(
|
||||
1,
|
||||
Math.min(Math.floor(height), Math.ceil(duration / motionScale)),
|
||||
);
|
||||
const rowHeight = height / rows;
|
||||
const rowSeconds = duration / rows;
|
||||
const sums = new Array<number>(rows).fill(0);
|
||||
|
||||
motionData.forEach((item) => {
|
||||
const row = Math.floor(
|
||||
((timelineStart - item.start_time) / duration) * rows,
|
||||
);
|
||||
|
||||
if (row >= 0 && row < rows) {
|
||||
sums[row] += item.motion ?? 0;
|
||||
}
|
||||
});
|
||||
|
||||
const color = getComputedStyle(document.documentElement)
|
||||
.getPropertyValue("--severity_significant_motion")
|
||||
.trim();
|
||||
|
||||
const samplesPerRow = rowSeconds / motionScale;
|
||||
|
||||
sums.forEach((sum, row) => {
|
||||
if (sum == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const intensity = Math.min(1, sum / (100 * samplesPerRow));
|
||||
ctx.fillStyle = `hsl(${color} / ${intensity})`;
|
||||
ctx.fillRect(0, row * rowHeight, width, Math.ceil(rowHeight));
|
||||
});
|
||||
}, [motionData, motionScale, timelineStart, timelineEnd]);
|
||||
|
||||
useEffect(() => {
|
||||
const canvas = motionCanvasRef.current;
|
||||
|
||||
if (!canvas) {
|
||||
return;
|
||||
}
|
||||
|
||||
drawMotion();
|
||||
const resizeObserver = new ResizeObserver(drawMotion);
|
||||
resizeObserver.observe(canvas);
|
||||
|
||||
return () => resizeObserver.disconnect();
|
||||
}, [drawMotion]);
|
||||
|
||||
const setVisibleSectionStyles = useCallback(() => {
|
||||
if (
|
||||
reviewTimelineRef.current &&
|
||||
@@ -144,13 +231,22 @@ export function SummaryTimeline({
|
||||
} = content;
|
||||
const { clientHeight: summaryTimelineVisibleHeight } = summary;
|
||||
|
||||
visibleSectionRef.current.style.top = `${
|
||||
summaryTimelineVisibleHeight * (scrolled / reviewTimelineFullHeight)
|
||||
}px`;
|
||||
visibleSectionRef.current.style.height = `${
|
||||
reviewTimelineVisibleHeight *
|
||||
(reviewTimelineVisibleHeight / reviewTimelineFullHeight)
|
||||
}px`;
|
||||
// The box keeps a minimum height so it stays visible when zoomed in,
|
||||
// centered on the true visible range.
|
||||
|
||||
const trueHeight =
|
||||
summaryTimelineVisibleHeight *
|
||||
(reviewTimelineVisibleHeight / reviewTimelineFullHeight);
|
||||
const trueTop =
|
||||
summaryTimelineVisibleHeight * (scrolled / reviewTimelineFullHeight);
|
||||
const height = Math.max(trueHeight, MIN_BOX_HEIGHT);
|
||||
const top = Math.min(
|
||||
Math.max(trueTop - (height - trueHeight) / 2, 0),
|
||||
summaryTimelineVisibleHeight - height,
|
||||
);
|
||||
|
||||
visibleSectionRef.current.style.top = `${top}px`;
|
||||
visibleSectionRef.current.style.height = `${height}px`;
|
||||
}
|
||||
}, [reviewTimelineRef, summaryTimelineRef, visibleSectionRef]);
|
||||
|
||||
@@ -184,178 +280,137 @@ export function SummaryTimeline({
|
||||
segmentDuration,
|
||||
]);
|
||||
|
||||
const timelineClick = useCallback(
|
||||
(
|
||||
e: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>,
|
||||
) => {
|
||||
// prevent default only for mouse events
|
||||
// to avoid chrome/android issues
|
||||
if (e.nativeEvent instanceof MouseEvent) {
|
||||
e.preventDefault();
|
||||
const scrollTopForPosition = useCallback(
|
||||
(clientY: number) => {
|
||||
const timeline = reviewTimelineRef.current;
|
||||
const summary = summaryTimelineRef.current;
|
||||
|
||||
if (!timeline || !summary) {
|
||||
return 0;
|
||||
}
|
||||
e.stopPropagation();
|
||||
|
||||
let clientY;
|
||||
if ("TouchEvent" in window && e.nativeEvent instanceof TouchEvent) {
|
||||
clientY = e.nativeEvent.touches[0].clientY;
|
||||
} else if (e.nativeEvent instanceof MouseEvent) {
|
||||
clientY = e.nativeEvent.clientY;
|
||||
}
|
||||
if (
|
||||
clientY &&
|
||||
reviewTimelineRef.current &&
|
||||
summaryTimelineRef.current &&
|
||||
visibleSectionRef.current
|
||||
) {
|
||||
const { clientHeight: summaryTimelineVisibleHeight } =
|
||||
summaryTimelineRef.current;
|
||||
const rect = summary.getBoundingClientRect();
|
||||
const ratio = (clientY - rect.top) / rect.height;
|
||||
return ratio * timeline.scrollHeight - timeline.clientHeight / 2;
|
||||
},
|
||||
[reviewTimelineRef],
|
||||
);
|
||||
|
||||
const rect = summaryTimelineRef.current.getBoundingClientRect();
|
||||
const summaryTimelineTop = rect.top;
|
||||
const scrollTimelineTo = useCallback(
|
||||
(top: number, behavior: ScrollBehavior = "auto") => {
|
||||
const timeline = reviewTimelineRef.current;
|
||||
|
||||
const { scrollHeight: reviewTimelineHeight } =
|
||||
reviewTimelineRef.current;
|
||||
|
||||
const { clientHeight: visibleSectionHeight } =
|
||||
visibleSectionRef.current;
|
||||
|
||||
const visibleSectionOffset = -(visibleSectionHeight / 2);
|
||||
|
||||
const clickPercentage =
|
||||
(clientY - summaryTimelineTop + visibleSectionOffset) /
|
||||
summaryTimelineVisibleHeight;
|
||||
|
||||
reviewTimelineRef.current.scrollTo({
|
||||
top: Math.floor(reviewTimelineHeight * clickPercentage),
|
||||
behavior: "smooth",
|
||||
if (timeline) {
|
||||
const maxScrollTop = timeline.scrollHeight - timeline.clientHeight;
|
||||
timeline.scrollTo({
|
||||
top: Math.min(Math.max(top, 0), maxScrollTop),
|
||||
behavior,
|
||||
});
|
||||
}
|
||||
},
|
||||
[reviewTimelineRef, summaryTimelineRef, visibleSectionRef],
|
||||
[reviewTimelineRef],
|
||||
);
|
||||
|
||||
const handleMouseDown = useCallback(
|
||||
(
|
||||
e: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>,
|
||||
) => {
|
||||
// prevent default only for mouse events
|
||||
// to avoid chrome/android issues
|
||||
if (e.nativeEvent instanceof MouseEvent) {
|
||||
e.preventDefault();
|
||||
}
|
||||
e.stopPropagation();
|
||||
setIsDragging(true);
|
||||
// A press outside the box jumps there on release, or snaps the box under
|
||||
// the pointer once it moves and then drags it.
|
||||
|
||||
let clientY;
|
||||
if ("TouchEvent" in window && e.nativeEvent instanceof TouchEvent) {
|
||||
clientY = e.nativeEvent.touches[0].clientY;
|
||||
} else if (e.nativeEvent instanceof MouseEvent) {
|
||||
clientY = e.nativeEvent.clientY;
|
||||
const handlePointerDown = useCallback(
|
||||
(e: React.PointerEvent<HTMLDivElement>) => {
|
||||
if (
|
||||
e.button != 0 ||
|
||||
!reviewTimelineRef.current ||
|
||||
!visibleSectionRef.current
|
||||
) {
|
||||
return;
|
||||
}
|
||||
if (clientY && summaryTimelineRef.current && reviewTimelineRef.current) {
|
||||
setScrollStartPosition(clientY);
|
||||
setInitialReviewTimelineScrollTop(reviewTimelineRef.current.scrollTop);
|
||||
}
|
||||
},
|
||||
[setIsDragging, summaryTimelineRef, reviewTimelineRef],
|
||||
);
|
||||
|
||||
const handleMouseUp = useCallback(
|
||||
(e: MouseEvent | TouchEvent) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (isDragging) {
|
||||
setIsDragging(false);
|
||||
}
|
||||
e.currentTarget.setPointerCapture(e.pointerId);
|
||||
|
||||
const box = visibleSectionRef.current.getBoundingClientRect();
|
||||
dragRef.current = {
|
||||
startY: e.clientY,
|
||||
startScrollTop: reviewTimelineRef.current.scrollTop,
|
||||
insideBox: e.clientY >= box.top && e.clientY <= box.bottom,
|
||||
moved: false,
|
||||
};
|
||||
},
|
||||
[isDragging, setIsDragging],
|
||||
[reviewTimelineRef],
|
||||
);
|
||||
|
||||
const handleMouseMove = useCallback(
|
||||
(e: MouseEvent | TouchEvent) => {
|
||||
if (
|
||||
summaryTimelineRef.current &&
|
||||
reviewTimelineRef.current &&
|
||||
visibleSectionRef.current
|
||||
) {
|
||||
// prevent default only for mouse events
|
||||
// to avoid chrome/android issues
|
||||
if (e instanceof MouseEvent) {
|
||||
e.preventDefault();
|
||||
const handlePointerMove = useCallback(
|
||||
(e: React.PointerEvent<HTMLDivElement>) => {
|
||||
const drag = dragRef.current;
|
||||
const timeline = reviewTimelineRef.current;
|
||||
const summary = summaryTimelineRef.current;
|
||||
|
||||
if (!drag || !timeline || !summary) {
|
||||
return;
|
||||
}
|
||||
|
||||
const deltaY = e.clientY - drag.startY;
|
||||
|
||||
if (!drag.moved) {
|
||||
if (Math.abs(deltaY) < DRAG_THRESHOLD) {
|
||||
return;
|
||||
}
|
||||
e.stopPropagation();
|
||||
let clientY;
|
||||
if ("TouchEvent" in window && e instanceof TouchEvent) {
|
||||
clientY = e.touches[0].clientY;
|
||||
} else if (e instanceof MouseEvent) {
|
||||
clientY = e.clientY;
|
||||
}
|
||||
if (isDragging && clientY) {
|
||||
const { clientHeight: summaryTimelineVisibleHeight } =
|
||||
summaryTimelineRef.current;
|
||||
|
||||
const {
|
||||
scrollHeight: reviewTimelineHeight,
|
||||
clientHeight: reviewTimelineVisibleHeight,
|
||||
} = reviewTimelineRef.current;
|
||||
drag.moved = true;
|
||||
setIsDragging(true);
|
||||
|
||||
const { clientHeight: visibleSectionHeight } =
|
||||
visibleSectionRef.current;
|
||||
|
||||
const deltaY =
|
||||
(clientY - scrollStartPosition) *
|
||||
(summaryTimelineVisibleHeight / visibleSectionHeight);
|
||||
|
||||
const newScrollTop = Math.min(
|
||||
initialReviewTimelineScrollTop + deltaY,
|
||||
reviewTimelineHeight - reviewTimelineVisibleHeight,
|
||||
);
|
||||
|
||||
reviewTimelineRef.current.scrollTop = newScrollTop;
|
||||
if (!drag.insideBox) {
|
||||
drag.startScrollTop = scrollTopForPosition(drag.startY);
|
||||
}
|
||||
}
|
||||
|
||||
scrollTimelineTo(
|
||||
drag.startScrollTop +
|
||||
deltaY * (timeline.scrollHeight / summary.clientHeight),
|
||||
);
|
||||
},
|
||||
[
|
||||
initialReviewTimelineScrollTop,
|
||||
isDragging,
|
||||
reviewTimelineRef,
|
||||
scrollStartPosition,
|
||||
],
|
||||
[reviewTimelineRef, scrollTopForPosition, scrollTimelineTo],
|
||||
);
|
||||
|
||||
const documentRef = useRef<Document | null>(document);
|
||||
useEffect(() => {
|
||||
const documentInstance = documentRef.current;
|
||||
const handlePointerUp = useCallback(
|
||||
(e: React.PointerEvent<HTMLDivElement>) => {
|
||||
const drag = dragRef.current;
|
||||
dragRef.current = null;
|
||||
setIsDragging(false);
|
||||
|
||||
if (isDragging) {
|
||||
documentInstance?.addEventListener("mousemove", handleMouseMove);
|
||||
documentInstance?.addEventListener("touchmove", handleMouseMove);
|
||||
documentInstance?.addEventListener("mouseup", handleMouseUp);
|
||||
documentInstance?.addEventListener("touchend", handleMouseUp);
|
||||
} else {
|
||||
documentInstance?.removeEventListener("mousemove", handleMouseMove);
|
||||
documentInstance?.removeEventListener("touchmove", handleMouseMove);
|
||||
documentInstance?.removeEventListener("mouseup", handleMouseUp);
|
||||
documentInstance?.removeEventListener("touchend", handleMouseUp);
|
||||
}
|
||||
return () => {
|
||||
documentInstance?.removeEventListener("mousemove", handleMouseMove);
|
||||
documentInstance?.removeEventListener("touchmove", handleMouseMove);
|
||||
documentInstance?.removeEventListener("mouseup", handleMouseUp);
|
||||
documentInstance?.removeEventListener("touchend", handleMouseUp);
|
||||
};
|
||||
}, [handleMouseMove, handleMouseUp, isDragging]);
|
||||
if (drag && !drag.moved && !drag.insideBox) {
|
||||
scrollTimelineTo(scrollTopForPosition(e.clientY), "smooth");
|
||||
}
|
||||
},
|
||||
[scrollTopForPosition, scrollTimelineTo],
|
||||
);
|
||||
|
||||
const handlePointerCancel = useCallback(() => {
|
||||
dragRef.current = null;
|
||||
setIsDragging(false);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`no-scrollbar relative h-full select-none overflow-hidden border-l-[1px] border-neutral-700 bg-secondary`}
|
||||
className={cn(
|
||||
"no-scrollbar relative h-full touch-none select-none overflow-hidden border-l-[1px] border-neutral-700 bg-secondary",
|
||||
isDragging ? "cursor-grabbing" : "cursor-pointer",
|
||||
)}
|
||||
role="scrollbar"
|
||||
onPointerDown={handlePointerDown}
|
||||
onPointerMove={handlePointerMove}
|
||||
onPointerUp={handlePointerUp}
|
||||
onPointerCancel={handlePointerCancel}
|
||||
>
|
||||
{motionData && (
|
||||
<canvas
|
||||
ref={motionCanvasRef}
|
||||
className="pointer-events-none absolute inset-0 size-full"
|
||||
/>
|
||||
)}
|
||||
<div
|
||||
ref={summaryTimelineRef}
|
||||
className="relative z-10 flex h-full flex-col-reverse"
|
||||
onClick={timelineClick}
|
||||
onTouchEnd={timelineClick}
|
||||
>
|
||||
{consolidatedSegments.map((segment, index) => (
|
||||
<SummarySegment
|
||||
@@ -367,11 +422,10 @@ export function SummaryTimeline({
|
||||
</div>
|
||||
<div
|
||||
ref={visibleSectionRef}
|
||||
onMouseDown={handleMouseDown}
|
||||
onTouchStart={handleMouseDown}
|
||||
className={`absolute z-20 w-full touch-none bg-primary/30 ${
|
||||
isDragging ? "cursor-grabbing" : "cursor-grab"
|
||||
}`}
|
||||
className={cn(
|
||||
"absolute z-20 w-full border-y border-primary/60 bg-primary/30 shadow-[0_0_0_1px_hsl(var(--background))]",
|
||||
!isDragging && "cursor-grab",
|
||||
)}
|
||||
></div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
// HEIC/HEIF is the default photo format on iPhones. The backend decodes
|
||||
// uploads with OpenCV, which has no HEIC support, and only Safari can preview
|
||||
// it, so HEIC images are converted to JPEG in the browser before upload.
|
||||
|
||||
export const HEIC_EXTENSIONS = [".heic", ".heif"];
|
||||
|
||||
const HEIC_MIME_TYPES = [
|
||||
"image/heic",
|
||||
"image/heif",
|
||||
"image/heic-sequence",
|
||||
"image/heif-sequence",
|
||||
];
|
||||
|
||||
/**
|
||||
* Check whether a file is HEIC/HEIF. The extension is checked as well as the
|
||||
* MIME type because browsers on systems without a HEIF codec installed (such
|
||||
* as Windows) report an empty type for these files.
|
||||
*/
|
||||
export function isHeicFile(file: File): boolean {
|
||||
if (HEIC_MIME_TYPES.includes(file.type.toLowerCase())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const name = file.name.toLowerCase();
|
||||
return HEIC_EXTENSIONS.some((extension) => name.endsWith(extension));
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a HEIC/HEIF file to a JPEG file. Orientation is applied during
|
||||
* decoding, so the output pixels are already upright.
|
||||
*/
|
||||
export async function convertHeicToJpeg(file: File): Promise<File> {
|
||||
// the decoder is a large WASM bundle, so it is only fetched when needed
|
||||
const { heicTo } = await import("heic-to");
|
||||
const jpeg = await heicTo({
|
||||
blob: file,
|
||||
type: "image/jpeg",
|
||||
// faces are cropped and re-encoded by the backend, keep detail here
|
||||
quality: 0.95,
|
||||
});
|
||||
const baseName = file.name.replace(/\.hei[cf]$/i, "") || "image";
|
||||
|
||||
return new File([jpeg], `${baseName}.jpg`, { type: "image/jpeg" });
|
||||
}
|
||||
@@ -2,6 +2,7 @@ import i18n, { t } from "i18next";
|
||||
import { initReactI18next } from "react-i18next";
|
||||
import HttpBackend from "i18next-http-backend";
|
||||
import { EventType } from "@/types/search";
|
||||
import { baseUrl } from "@/api/baseUrl";
|
||||
|
||||
export const getTranslatedLabel = (
|
||||
label: string,
|
||||
@@ -33,7 +34,7 @@ i18n
|
||||
fallbackLng: "en", // use en if detected lng is not available
|
||||
|
||||
backend: {
|
||||
loadPath: `locales/{{lng}}/{{ns}}.json?v=${import.meta.env.VITE_GIT_COMMIT_HASH || "unknown"}`,
|
||||
loadPath: `${baseUrl}locales/{{lng}}/{{ns}}.json?v=${import.meta.env.VITE_GIT_COMMIT_HASH || "unknown"}`,
|
||||
},
|
||||
|
||||
ns: [
|
||||
|
||||
@@ -923,7 +923,7 @@ function DetectionReview({
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex w-[65px] flex-row md:w-[110px]">
|
||||
<div className="flex w-[73px] flex-row md:w-[110px]">
|
||||
<div className="no-scrollbar relative w-[55px] md:w-[100px]">
|
||||
{loading ? (
|
||||
<Skeleton className="size-full" />
|
||||
@@ -951,7 +951,7 @@ function DetectionReview({
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<div className="w-[10px]">
|
||||
<div className="w-[18px] md:w-[10px]">
|
||||
{loading ? (
|
||||
<Skeleton className="w-full" />
|
||||
) : (
|
||||
@@ -1013,6 +1013,7 @@ function MotionReview({
|
||||
const segmentDuration = 30;
|
||||
const { data: config } = useSWR<FrigateConfig>("config");
|
||||
const allowedCameras = useAllowedCameras();
|
||||
const motionTimelineRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
const reviewCameras = useMemo(() => {
|
||||
if (!config) {
|
||||
@@ -1700,34 +1701,58 @@ function MotionReview({
|
||||
</div>
|
||||
</div>
|
||||
{!selectedMotionPreviewCamera && (
|
||||
<div className="no-scrollbar w-[55px] overflow-y-auto md:w-[100px]">
|
||||
{motionData ? (
|
||||
<MotionReviewTimeline
|
||||
segmentDuration={segmentDuration}
|
||||
timestampSpread={15}
|
||||
timelineStart={timeRangeSegments.end}
|
||||
timelineEnd={timeRangeSegments.start}
|
||||
motionOnly={motionOnly}
|
||||
showHandlebar
|
||||
handlebarTime={currentTime}
|
||||
setHandlebarTime={setCurrentTime}
|
||||
events={reviewItems?.all ?? []}
|
||||
motion_events={motionData ?? []}
|
||||
contentRef={contentRef}
|
||||
onHandlebarDraggingChange={(scrubbing) => {
|
||||
if (playing && scrubbing) {
|
||||
setPlaying(false);
|
||||
}
|
||||
<div
|
||||
className={cn(
|
||||
"flex flex-row",
|
||||
motionOnly ? "w-[55px] md:w-[100px]" : "w-[73px] md:w-[110px]",
|
||||
)}
|
||||
>
|
||||
<div className="no-scrollbar w-[55px] overflow-y-auto md:w-[100px]">
|
||||
{motionData ? (
|
||||
<MotionReviewTimeline
|
||||
timelineRef={motionTimelineRef}
|
||||
segmentDuration={segmentDuration}
|
||||
timestampSpread={15}
|
||||
timelineStart={timeRangeSegments.end}
|
||||
timelineEnd={timeRangeSegments.start}
|
||||
motionOnly={motionOnly}
|
||||
showHandlebar
|
||||
handlebarTime={currentTime}
|
||||
setHandlebarTime={setCurrentTime}
|
||||
events={reviewItems?.all ?? []}
|
||||
motion_events={motionData ?? []}
|
||||
contentRef={contentRef}
|
||||
onHandlebarDraggingChange={(scrubbing) => {
|
||||
if (playing && scrubbing) {
|
||||
setPlaying(false);
|
||||
}
|
||||
|
||||
setScrubbing(scrubbing);
|
||||
}}
|
||||
dense={isMobileOnly}
|
||||
isZooming={false}
|
||||
zoomDirection={null}
|
||||
alwaysShowMotionLine={true}
|
||||
/>
|
||||
) : (
|
||||
<Skeleton className="size-full" />
|
||||
setScrubbing(scrubbing);
|
||||
}}
|
||||
dense={isMobileOnly}
|
||||
isZooming={false}
|
||||
zoomDirection={null}
|
||||
alwaysShowMotionLine={true}
|
||||
/>
|
||||
) : (
|
||||
<Skeleton className="size-full" />
|
||||
)}
|
||||
</div>
|
||||
{!motionOnly && (
|
||||
<div className="w-[18px] md:w-[10px]">
|
||||
{motionData ? (
|
||||
<SummaryTimeline
|
||||
reviewTimelineRef={motionTimelineRef}
|
||||
timelineStart={timeRangeSegments.end}
|
||||
timelineEnd={timeRangeSegments.start}
|
||||
segmentDuration={segmentDuration}
|
||||
motionData={motionData}
|
||||
motionScale={segmentDuration / 2}
|
||||
/>
|
||||
) : (
|
||||
<Skeleton className="w-full" />
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -70,6 +70,7 @@ import { cn } from "@/lib/utils";
|
||||
import { useFullscreen } from "@/hooks/use-fullscreen";
|
||||
import { useTimezone } from "@/hooks/use-date-utils";
|
||||
import { useTimelineZoom } from "@/hooks/use-timeline-zoom";
|
||||
import SummaryTimeline from "@/components/timeline/SummaryTimeline";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useTimelineUtils } from "@/hooks/use-timeline-utils";
|
||||
import {
|
||||
@@ -1317,14 +1318,14 @@ function Timeline({
|
||||
isDesktop
|
||||
? cn(
|
||||
timelineType == "timeline"
|
||||
? "w-[100px] flex-shrink-0"
|
||||
? "w-[110px] flex-shrink-0"
|
||||
: timelineType == "detail"
|
||||
? "min-w-[20rem] max-w-[30%] flex-shrink-0 flex-grow-0 basis-[30rem] md:min-w-[20rem] md:max-w-[25%] lg:min-w-[30rem] lg:max-w-[33%]"
|
||||
: "w-80 flex-shrink-0",
|
||||
)
|
||||
: cn(
|
||||
timelineType == "timeline"
|
||||
? "portrait:flex-grow landscape:w-[100px] landscape:flex-shrink-0"
|
||||
? "portrait:flex-grow landscape:w-[128px] landscape:flex-shrink-0"
|
||||
: timelineType == "detail"
|
||||
? "portrait:flex-grow landscape:w-[19rem] landscape:flex-shrink-0"
|
||||
: "portrait:flex-grow landscape:w-[19rem] landscape:flex-shrink-0",
|
||||
@@ -1345,32 +1346,51 @@ function Timeline({
|
||||
)}
|
||||
{timelineType == "timeline" ? (
|
||||
!isLoading ? (
|
||||
<MotionReviewTimeline
|
||||
timelineRef={selectedTimelineRef}
|
||||
segmentDuration={zoomSettings.segmentDuration}
|
||||
timestampSpread={zoomSettings.timestampSpread}
|
||||
timelineStart={timeRange.before}
|
||||
timelineEnd={timeRange.after}
|
||||
showHandlebar={exportRange == undefined}
|
||||
showExportHandles={exportRange != undefined}
|
||||
exportStartTime={exportRange?.after}
|
||||
exportEndTime={exportRange?.before}
|
||||
setExportStartTime={setExportStartTime}
|
||||
setExportEndTime={setExportEndTime}
|
||||
handlebarTime={currentTime}
|
||||
setHandlebarTime={setCurrentTime}
|
||||
events={mainCameraReviewItems}
|
||||
motion_events={motionData ?? []}
|
||||
noRecordingRanges={noRecordings ?? []}
|
||||
subOnlyRanges={subOnlyRanges}
|
||||
contentRef={contentRef}
|
||||
onHandlebarDraggingChange={setScrubbing}
|
||||
isZooming={isZooming}
|
||||
zoomDirection={zoomDirection}
|
||||
onZoomChange={handleZoomChange}
|
||||
possibleZoomLevels={possibleZoomLevels}
|
||||
currentZoomLevel={currentZoomLevel}
|
||||
/>
|
||||
<div className="flex size-full flex-row">
|
||||
<div className="relative h-full min-w-0 flex-1">
|
||||
<MotionReviewTimeline
|
||||
timelineRef={selectedTimelineRef}
|
||||
segmentDuration={zoomSettings.segmentDuration}
|
||||
timestampSpread={zoomSettings.timestampSpread}
|
||||
timelineStart={timeRange.before}
|
||||
timelineEnd={timeRange.after}
|
||||
showHandlebar={exportRange == undefined}
|
||||
showExportHandles={exportRange != undefined}
|
||||
exportStartTime={exportRange?.after}
|
||||
exportEndTime={exportRange?.before}
|
||||
setExportStartTime={setExportStartTime}
|
||||
setExportEndTime={setExportEndTime}
|
||||
handlebarTime={currentTime}
|
||||
setHandlebarTime={setCurrentTime}
|
||||
events={mainCameraReviewItems}
|
||||
motion_events={motionData ?? []}
|
||||
noRecordingRanges={noRecordings ?? []}
|
||||
subOnlyRanges={subOnlyRanges}
|
||||
contentRef={contentRef}
|
||||
onHandlebarDraggingChange={setScrubbing}
|
||||
isZooming={isZooming}
|
||||
zoomDirection={zoomDirection}
|
||||
onZoomChange={handleZoomChange}
|
||||
possibleZoomLevels={possibleZoomLevels}
|
||||
currentZoomLevel={currentZoomLevel}
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className={cn(
|
||||
"flex-shrink-0",
|
||||
isDesktop ? "w-[10px]" : "w-[28px]",
|
||||
)}
|
||||
>
|
||||
<SummaryTimeline
|
||||
reviewTimelineRef={selectedTimelineRef}
|
||||
timelineStart={timeRange.before}
|
||||
timelineEnd={timeRange.after}
|
||||
segmentDuration={zoomSettings.segmentDuration}
|
||||
motionData={motionData}
|
||||
motionScale={Math.round(zoomSettings.segmentDuration / 2)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<Skeleton className="size-full" />
|
||||
)
|
||||
|
||||
@@ -184,8 +184,8 @@ export default function ObjectSettingsView({
|
||||
{config?.cameras[cameraConfig.name]?.webui_url && (
|
||||
<div className="mb-5 text-sm text-muted-foreground">
|
||||
<div className="mt-2 flex flex-row items-center text-primary">
|
||||
<Link
|
||||
to={config?.cameras[cameraConfig.name]?.webui_url ?? ""}
|
||||
<a
|
||||
href={config?.cameras[cameraConfig.name]?.webui_url ?? ""}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline"
|
||||
@@ -194,7 +194,7 @@ export default function ObjectSettingsView({
|
||||
camera: cameraName,
|
||||
})}
|
||||
<LuExternalLink className="ml-2 inline-flex size-3" />
|
||||
</Link>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user