mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-11-09 11:52:30 +01:00
Changes include:
Features Neighbour details modal with full info and map view WebSocket support with heartbeat and automatic reconnection Improved signal quality calculations (SNR-based RSSI) Route-based pagination for faster initial loads UI Mobile sidebar tweaks (logout, version info, lazy-loaded charts) Sorting added to the neighbour table Packet view now shows multi-hop paths CAD calibration charts respect light/dark themes Statistics charts now show the full requested time range Performance Reduced polling when WebSocket is active Lazy loading for heavier components Noise floor data capped to keep charts responsive Technical Improved type safety across API responses Contrast improvements for accessibility Cleaner WebSocket and MQTT reconnection handling Additional metrics added to heartbeat stats Bug fixes Corrected noise floor history query Fixed authentication for CAD calibration streams Nothing major required from users — just update and carry on. As always, shout if something looks off.
This commit is contained in:
1 parent
5bdea1132c
commit
599e4628d9
46 files changed
+4559
-4237
No files matched your search
@@ -236,6 +236,13 @@ install_repeater() {
|
||||
echo " Generated version: $GENERATED_VERSION"
|
||||
fi
|
||||
|
||||
echo "29"; echo "# Cleaning old installation files..."
|
||||
# Remove old repeater directory to ensure clean install
|
||||
rm -rf "$INSTALL_DIR/repeater" 2>/dev/null || true
|
||||
# Clean up old Python bytecode
|
||||
find "$INSTALL_DIR" -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
|
||||
find "$INSTALL_DIR" -type f -name '*.pyc' -delete 2>/dev/null || true
|
||||
|
||||
echo "30"; echo "# Installing files..."
|
||||
cp -r "$SCRIPT_DIR/repeater" "$INSTALL_DIR/"
|
||||
cp "$SCRIPT_DIR/pyproject.toml" "$INSTALL_DIR/"
|
||||
@@ -411,6 +418,14 @@ upgrade_repeater() {
|
||||
fi
|
||||
echo " ✓ Version file generated"
|
||||
|
||||
echo "[3.8/9] Cleaning old installation files..."
|
||||
# Remove old repeater directory to ensure clean upgrade
|
||||
rm -rf "$INSTALL_DIR/repeater" 2>/dev/null || true
|
||||
# Clean up old Python bytecode
|
||||
find "$INSTALL_DIR" -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
|
||||
find "$INSTALL_DIR" -type f -name '*.pyc' -delete 2>/dev/null || true
|
||||
echo " ✓ Old files cleaned"
|
||||
|
||||
echo "[4/9] Installing new files..."
|
||||
cp -r repeater "$INSTALL_DIR/" 2>/dev/null || true
|
||||
cp pyproject.toml "$INSTALL_DIR/" 2>/dev/null || true
|
||||
@@ -465,8 +480,18 @@ EOF
|
||||
# Suppress pip root user warnings
|
||||
export PIP_ROOT_USER_ACTION=ignore
|
||||
|
||||
# First, upgrade the package and dependencies (only updates what needs updating)
|
||||
if python3 -m pip install --break-system-packages --upgrade --no-cache-dir .; then
|
||||
# Calculate version from git for setuptools_scm
|
||||
if [ -d .git ]; then
|
||||
git fetch --tags 2>/dev/null || true
|
||||
GIT_VERSION=$(python3 -m setuptools_scm 2>/dev/null || echo "1.0.5")
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION="$GIT_VERSION"
|
||||
echo "Upgrading to version: $GIT_VERSION"
|
||||
else
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION="1.0.5"
|
||||
fi
|
||||
|
||||
# Force reinstall the package and all dependencies for clean upgrade
|
||||
if python3 -m pip install --break-system-packages --force-reinstall --no-cache-dir --ignore-installed .; then
|
||||
echo ""
|
||||
echo "✓ Package and dependencies updated successfully!"
|
||||
else
|
||||
@@ -474,28 +499,10 @@ EOF
|
||||
echo "⚠ Package update failed, but continuing..."
|
||||
fi
|
||||
|
||||
# Force reinstall pymc_core to ensure it's always updated
|
||||
# Extract the pymc_core dependency from pyproject.toml
|
||||
# Note: pymc_core is already reinstalled as part of the full --force-reinstall above
|
||||
echo ""
|
||||
echo "Ensuring pymc_core is up to date..."
|
||||
PYMC_CORE_DEP=$(grep -oP '"pymc_core\[hardware\][^"]*"' pyproject.toml 2>/dev/null | tr -d '"' || echo "")
|
||||
if [ -n "$PYMC_CORE_DEP" ]; then
|
||||
# Check if it's a Git URL (contains @)
|
||||
if [[ "$PYMC_CORE_DEP" == *" @ "* ]]; then
|
||||
# Extract just the URL part after " @ "
|
||||
PYMC_CORE_SPEC="${PYMC_CORE_DEP#* @ }"
|
||||
else
|
||||
# Just the package name, use as-is
|
||||
PYMC_CORE_SPEC="$PYMC_CORE_DEP"
|
||||
fi
|
||||
if python3 -m pip install --break-system-packages --force-reinstall --no-cache-dir --no-deps "$PYMC_CORE_SPEC"; then
|
||||
echo "✓ pymc_core updated successfully!"
|
||||
else
|
||||
echo "⚠ pymc_core update failed, but continuing..."
|
||||
fi
|
||||
else
|
||||
echo "⚠ Could not find pymc_core dependency in pyproject.toml"
|
||||
fi
|
||||
echo "✓ All packages including pymc_core reinstalled successfully"
|
||||
|
||||
|
||||
echo "[8/9] Starting service..."
|
||||
systemctl daemon-reload
|
||||
|
||||
@@ -38,6 +38,7 @@ dependencies = [
|
||||
"cherrypy-cors==1.7.0",
|
||||
"psutil>=5.9.0",
|
||||
"pyjwt>=2.8.0",
|
||||
"ws4py>=0.6.0",
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -72,6 +72,9 @@ class _BrokerConnection:
|
||||
self._connect_time = None
|
||||
self._tls_verified = False
|
||||
self._running = False
|
||||
self._reconnect_attempts = 0
|
||||
self._reconnect_timer = None
|
||||
self._max_reconnect_delay = 300 # 5 minutes max
|
||||
|
||||
# MQTT WebSocket client - unique client ID per broker
|
||||
client_id = f"meshcore_{self.public_key}_{broker['host']}"
|
||||
@@ -118,18 +121,52 @@ class _BrokerConnection:
|
||||
if rc == 0:
|
||||
logging.info(f"Connected to {self.broker['name']}")
|
||||
self._running = True
|
||||
self._reconnect_attempts = 0 # Reset counter on success
|
||||
if self._on_connect_callback:
|
||||
self._on_connect_callback(self.broker["name"])
|
||||
else:
|
||||
logging.error(f"Failed to connect to {self.broker['name']} (rc={rc})")
|
||||
self._schedule_reconnect()
|
||||
|
||||
def _on_disconnect(self, client, userdata, rc):
|
||||
"""MQTT disconnection callback"""
|
||||
logging.warning(f"Disconnected from {self.broker['name']} (rc={rc})")
|
||||
was_running = self._running
|
||||
self._running = False
|
||||
|
||||
if rc != 0: # Unexpected disconnect
|
||||
logging.warning(f"Disconnected from {self.broker['name']} (rc={rc})")
|
||||
if was_running: # Only reconnect if we were intentionally connected
|
||||
self._schedule_reconnect()
|
||||
else:
|
||||
logging.info(f"Clean disconnect from {self.broker['name']}")
|
||||
|
||||
if self._on_disconnect_callback:
|
||||
self._on_disconnect_callback(self.broker["name"])
|
||||
|
||||
def _schedule_reconnect(self):
|
||||
"""Schedule reconnection with exponential backoff"""
|
||||
if self._reconnect_timer:
|
||||
self._reconnect_timer.cancel()
|
||||
|
||||
# Exponential backoff: 5s, 10s, 20s, 40s, 80s, up to max
|
||||
delay = min(5 * (2 ** self._reconnect_attempts), self._max_reconnect_delay)
|
||||
self._reconnect_attempts += 1
|
||||
|
||||
logging.info(f"Scheduling reconnect to {self.broker['name']} in {delay}s (attempt {self._reconnect_attempts})")
|
||||
self._reconnect_timer = threading.Timer(delay, self._attempt_reconnect)
|
||||
self._reconnect_timer.daemon = True
|
||||
self._reconnect_timer.start()
|
||||
|
||||
def _attempt_reconnect(self):
|
||||
"""Attempt to reconnect to broker"""
|
||||
try:
|
||||
logging.info(f"Attempting reconnection to {self.broker['name']}...")
|
||||
self.refresh_jwt_token() # Refresh token before reconnecting
|
||||
self.client.reconnect()
|
||||
except Exception as e:
|
||||
logging.error(f"Reconnection failed for {self.broker['name']}: {e}")
|
||||
self._schedule_reconnect() # Try again later
|
||||
|
||||
def refresh_jwt_token(self):
|
||||
"""Refresh JWT token for MQTT authentication"""
|
||||
token = self._generate_jwt()
|
||||
@@ -165,6 +202,12 @@ class _BrokerConnection:
|
||||
def disconnect(self):
|
||||
"""Disconnect from broker"""
|
||||
self._running = False
|
||||
|
||||
# Cancel any pending reconnection
|
||||
if self._reconnect_timer:
|
||||
self._reconnect_timer.cancel()
|
||||
self._reconnect_timer = None
|
||||
|
||||
self.client.loop_stop()
|
||||
self.client.disconnect()
|
||||
logging.info(f"Disconnected from {self.broker['name']}")
|
||||
|
||||
@@ -766,22 +766,31 @@ class SQLiteHandler:
|
||||
logger.error(f"Failed to get neighbors: {e}")
|
||||
return {}
|
||||
|
||||
def get_noise_floor_history(self, hours: int = 24) -> list:
|
||||
def get_noise_floor_history(self, hours: int = 24, limit: int = None) -> list:
|
||||
try:
|
||||
cutoff = time.time() - (hours * 3600)
|
||||
|
||||
with sqlite3.connect(self.sqlite_path) as conn:
|
||||
conn.row_factory = sqlite3.Row
|
||||
|
||||
measurements = conn.execute("""
|
||||
# Build query with optional limit
|
||||
query = """
|
||||
SELECT timestamp, noise_floor_dbm
|
||||
FROM noise_floor
|
||||
WHERE timestamp > ?
|
||||
ORDER BY timestamp ASC
|
||||
""", (cutoff,)).fetchall()
|
||||
ORDER BY timestamp DESC
|
||||
"""
|
||||
|
||||
return [{"timestamp": row["timestamp"], "noise_floor_dbm": row["noise_floor_dbm"]}
|
||||
for row in measurements]
|
||||
if limit:
|
||||
query += f" LIMIT {int(limit)}"
|
||||
|
||||
measurements = conn.execute(query, (cutoff,)).fetchall()
|
||||
|
||||
# Reverse to get chronological order (oldest to newest)
|
||||
result = [{"timestamp": row["timestamp"], "noise_floor_dbm": row["noise_floor_dbm"]}
|
||||
for row in reversed(measurements)]
|
||||
|
||||
return result
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to get noise floor history: {e}")
|
||||
|
||||
@@ -66,18 +66,62 @@ class StorageCollector:
|
||||
from .hardware_stats import HardwareStatsCollector
|
||||
self.hardware_stats = HardwareStatsCollector()
|
||||
logger.info("Hardware stats collector initialized")
|
||||
|
||||
# Initialize WebSocket handler for real-time updates
|
||||
self.websocket_available = False
|
||||
try:
|
||||
from .websocket_handler import broadcast_packet, broadcast_stats
|
||||
self.websocket_broadcast_packet = broadcast_packet
|
||||
self.websocket_broadcast_stats = broadcast_stats
|
||||
self.websocket_available = True
|
||||
logger.info("WebSocket handler initialized for real-time updates")
|
||||
except ImportError:
|
||||
logger.debug("WebSocket handler not available")
|
||||
|
||||
def _get_live_stats(self) -> dict:
|
||||
"""Get live stats from RepeaterHandler"""
|
||||
if not self.repeater_handler:
|
||||
return {"uptime_secs": 0, "packets_sent": 0, "packets_received": 0}
|
||||
return {
|
||||
"uptime_secs": 0,
|
||||
"packets_sent": 0,
|
||||
"packets_received": 0,
|
||||
"errors": 0,
|
||||
"queue_len": 0
|
||||
}
|
||||
|
||||
uptime_secs = int(time.time() - self.repeater_handler.start_time)
|
||||
return {
|
||||
|
||||
# Get airtime stats
|
||||
airtime_stats = self.repeater_handler.airtime_mgr.get_stats()
|
||||
|
||||
# Get latest noise floor from database
|
||||
noise_floor = None
|
||||
try:
|
||||
recent_noise = self.sqlite_handler.get_noise_floor_history(hours=0.5, limit=1)
|
||||
if recent_noise and len(recent_noise) > 0:
|
||||
noise_floor = recent_noise[-1].get('noise_floor_dbm')
|
||||
except Exception as e:
|
||||
logger.debug(f"Could not fetch noise floor: {e}")
|
||||
|
||||
stats = {
|
||||
"uptime_secs": uptime_secs,
|
||||
"packets_sent": self.repeater_handler.forwarded_count,
|
||||
"packets_received": self.repeater_handler.rx_count,
|
||||
"errors": 0,
|
||||
"queue_len": 0, # N/A for Python repeater
|
||||
}
|
||||
|
||||
# Add airtime stats
|
||||
if airtime_stats:
|
||||
stats["tx_air_secs"] = airtime_stats["total_airtime_ms"] / 1000
|
||||
stats["current_airtime_ms"] = airtime_stats["current_airtime_ms"]
|
||||
stats["utilization_percent"] = airtime_stats["utilization_percent"]
|
||||
|
||||
# Add noise floor if available
|
||||
if noise_floor is not None:
|
||||
stats["noise_floor"] = noise_floor
|
||||
|
||||
return stats
|
||||
|
||||
def record_packet(self, packet_record: dict, skip_letsmesh_if_invalid: bool = True):
|
||||
"""Record packet to storage and publish to MQTT/LetsMesh
|
||||
@@ -96,6 +140,26 @@ class StorageCollector:
|
||||
cumulative_counts = self.sqlite_handler.get_cumulative_counts()
|
||||
self.rrd_handler.update_packet_metrics(packet_record, cumulative_counts)
|
||||
self.mqtt_handler.publish(packet_record, "packet")
|
||||
|
||||
# Broadcast to WebSocket clients for real-time updates
|
||||
if self.websocket_available:
|
||||
try:
|
||||
self.websocket_broadcast_packet(packet_record)
|
||||
|
||||
# Also broadcast lightweight stats update
|
||||
uptime_seconds = time.time() - self.repeater_handler.start_time if self.repeater_handler else 0
|
||||
self.websocket_broadcast_stats({
|
||||
"packet_stats": {
|
||||
"total_packets": cumulative_counts.get("rx_total", 0),
|
||||
"transmitted_packets": cumulative_counts.get("tx_total", 0),
|
||||
"dropped_packets": cumulative_counts.get("drop_total", 0),
|
||||
},
|
||||
"system_stats": {
|
||||
"uptime_seconds": uptime_seconds,
|
||||
}
|
||||
})
|
||||
except Exception as e:
|
||||
logger.debug(f"WebSocket broadcast failed: {e}")
|
||||
|
||||
# Publish to LetsMesh if enabled (skip invalid packets if requested)
|
||||
if skip_letsmesh_if_invalid and packet_record.get('drop_reason'):
|
||||
@@ -209,8 +273,8 @@ class StorageCollector:
|
||||
def cleanup_old_data(self, days: int = 7):
|
||||
self.sqlite_handler.cleanup_old_data(days)
|
||||
|
||||
def get_noise_floor_history(self, hours: int = 24) -> list:
|
||||
return self.sqlite_handler.get_noise_floor_history(hours)
|
||||
def get_noise_floor_history(self, hours: int = 24, limit: int = None) -> list:
|
||||
return self.sqlite_handler.get_noise_floor_history(hours, limit)
|
||||
|
||||
def get_noise_floor_stats(self, hours: int = 24) -> dict:
|
||||
return self.sqlite_handler.get_noise_floor_stats(hours)
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
"""
|
||||
WebSocket handler for real-time packet updates - simple ws4py implementation
|
||||
"""
|
||||
import json
|
||||
import logging
|
||||
import threading
|
||||
import time
|
||||
import cherrypy
|
||||
from ws4py.websocket import WebSocket
|
||||
from ws4py.server.cherrypyserver import WebSocketPlugin, WebSocketTool
|
||||
|
||||
logger = logging.getLogger("WebSocket")
|
||||
|
||||
# Suppress noisy ws4py error logs for normal disconnections (ConnectionResetError, etc.)
|
||||
logging.getLogger('ws4py').setLevel(logging.CRITICAL)
|
||||
|
||||
# Global set of connected clients
|
||||
_connected_clients = set()
|
||||
|
||||
# Heartbeat configuration
|
||||
PING_INTERVAL = 30 # seconds
|
||||
_heartbeat_thread = None
|
||||
_heartbeat_running = False
|
||||
|
||||
|
||||
class PacketWebSocket(WebSocket):
|
||||
|
||||
def opened(self):
|
||||
"""Called when a WebSocket connection is established"""
|
||||
_connected_clients.add(self)
|
||||
logger.info(f"WebSocket connected. Total clients: {len(_connected_clients)}")
|
||||
|
||||
def closed(self, code, reason=None):
|
||||
"""Called when a WebSocket connection is closed"""
|
||||
_connected_clients.discard(self)
|
||||
logger.info(f"WebSocket disconnected. Total clients: {len(_connected_clients)}")
|
||||
|
||||
def received_message(self, message):
|
||||
"""Handle messages from client"""
|
||||
try:
|
||||
data = json.loads(str(message))
|
||||
if data.get("type") == "ping":
|
||||
self.send(json.dumps({"type": "pong"}))
|
||||
elif data.get("type") == "pong":
|
||||
# Client responded to our ping
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
def broadcast_packet(packet_data: dict):
|
||||
|
||||
if not _connected_clients:
|
||||
return
|
||||
|
||||
message = json.dumps({"type": "packet", "data": packet_data})
|
||||
|
||||
for client in list(_connected_clients):
|
||||
try:
|
||||
client.send(message)
|
||||
except Exception as e:
|
||||
logger.error(f"WebSocket send error: {e}")
|
||||
_connected_clients.discard(client)
|
||||
|
||||
|
||||
def broadcast_stats(stats_data: dict):
|
||||
|
||||
if not _connected_clients:
|
||||
return
|
||||
|
||||
message = json.dumps({"type": "stats", "data": stats_data})
|
||||
|
||||
for client in list(_connected_clients):
|
||||
try:
|
||||
client.send(message)
|
||||
except Exception as e:
|
||||
logger.error(f"WebSocket send error: {e}")
|
||||
_connected_clients.discard(client)
|
||||
|
||||
|
||||
def _heartbeat_loop():
|
||||
"""Background thread to send periodic pings to all connected clients"""
|
||||
global _heartbeat_running
|
||||
|
||||
while _heartbeat_running:
|
||||
time.sleep(PING_INTERVAL)
|
||||
|
||||
if not _connected_clients:
|
||||
continue
|
||||
|
||||
ping_message = json.dumps({"type": "ping"})
|
||||
|
||||
for client in list(_connected_clients):
|
||||
try:
|
||||
client.send(ping_message)
|
||||
except Exception as e:
|
||||
logger.debug(f"Heartbeat ping failed: {e}")
|
||||
_connected_clients.discard(client)
|
||||
|
||||
|
||||
def init_websocket():
|
||||
"""Initialize WebSocket plugin and start heartbeat"""
|
||||
global _heartbeat_thread, _heartbeat_running
|
||||
|
||||
WebSocketPlugin(cherrypy.engine).subscribe()
|
||||
cherrypy.tools.websocket = WebSocketTool()
|
||||
|
||||
# Start heartbeat thread
|
||||
if not _heartbeat_running:
|
||||
_heartbeat_running = True
|
||||
_heartbeat_thread = threading.Thread(target=_heartbeat_loop, daemon=True)
|
||||
_heartbeat_thread.start()
|
||||
logger.info(f"WebSocket initialized with {PING_INTERVAL}s heartbeat")
|
||||
else:
|
||||
logger.info("WebSocket initialized")
|
||||
@@ -1270,12 +1270,13 @@ class APIEndpoints:
|
||||
|
||||
@cherrypy.expose
|
||||
@cherrypy.tools.json_out()
|
||||
def noise_floor_history(self, hours: int = 24):
|
||||
def noise_floor_history(self, hours: int = 24, limit: int = None):
|
||||
|
||||
try:
|
||||
storage = self._get_storage()
|
||||
hours = int(hours)
|
||||
history = storage.get_noise_floor_history(hours=hours)
|
||||
limit = int(limit) if limit else None
|
||||
history = storage.get_noise_floor_history(hours=hours, limit=limit)
|
||||
|
||||
return self._success({
|
||||
"history": history,
|
||||
|
||||
@@ -8,7 +8,8 @@ def check_auth():
|
||||
"""
|
||||
CherryPy tool to check authentication before processing request.
|
||||
|
||||
Checks for either JWT in Authorization header or API token in X-API-Key header.
|
||||
Checks for either JWT in Authorization header, API token in X-API-Key header,
|
||||
or JWT token in query parameter (for EventSource/SSE connections).
|
||||
Sets cherrypy.request.user on success.
|
||||
Returns 401 JSON response on failure.
|
||||
"""
|
||||
@@ -29,7 +30,7 @@ def check_auth():
|
||||
cherrypy.response.status = 500
|
||||
return {"success": False, "error": "Authentication system not configured"}
|
||||
|
||||
# Check for JWT token first
|
||||
# Check for JWT token in Authorization header first
|
||||
auth_header = cherrypy.request.headers.get("Authorization", "")
|
||||
if auth_header.startswith("Bearer "):
|
||||
token = auth_header[7:] # Remove "Bearer " prefix
|
||||
@@ -43,7 +44,23 @@ def check_auth():
|
||||
}
|
||||
return
|
||||
|
||||
# Check for API token
|
||||
# Check for JWT token in query parameter (for EventSource/SSE)
|
||||
# EventSource doesn't support custom headers, so we use query param
|
||||
query_token = cherrypy.request.params.get("token")
|
||||
if query_token:
|
||||
payload = jwt_handler.verify_jwt(query_token)
|
||||
|
||||
if payload:
|
||||
cherrypy.request.user = {
|
||||
"username": payload.get("sub"),
|
||||
"client_id": payload.get("client_id"),
|
||||
"auth_type": "jwt_query"
|
||||
}
|
||||
# Remove token from params to avoid exposing it in logs
|
||||
del cherrypy.request.params["token"]
|
||||
return
|
||||
|
||||
# Check for API token in X-API-Key header
|
||||
api_key = cherrypy.request.headers.get("X-API-Key", "")
|
||||
if api_key:
|
||||
token_info = token_manager.verify_token(api_key)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
.glass-card[data-v-c30e5f38]{background:var(--color-glass-bg);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid var(--color-glass-border);box-shadow:var(--color-glass-shadow)}
|
||||
@@ -0,0 +1 @@
|
||||
import{a as G,M as K,c as W,r as o,o as X,Q as Y,b as g,e as a,g as k,i as F,t as l,k as h,n as ee,L as T,Z as te,$ as ae,p as f,x as se}from"./index-C2DY4pTz.js";import{P as M}from"./plotly.min-DO11Gp-n.js";import"./_commonjsHelpers-CqkleIqs.js";const oe={class:"p-6 space-y-6"},re={class:"glass-card rounded-[15px] p-6"},le={class:"flex justify-center"},ne={class:"flex gap-4"},ie=["disabled"],ce=["disabled"],de={class:"glass-card rounded-[15px] p-6 space-y-4"},ue={class:"text-content-primary dark:text-content-primary"},ve={key:0,class:"p-4 bg-primary/10 border border-primary/30 rounded-lg"},pe={class:"text-content-primary dark:text-primary"},me={class:"space-y-2"},be={class:"w-full bg-white/10 rounded-full h-2"},ge={class:"text-content-secondary dark:text-content-muted text-sm"},fe={class:"grid grid-cols-2 md:grid-cols-4 gap-4"},xe={class:"glass-card rounded-[15px] p-4 text-center"},ye={class:"text-2xl font-bold text-primary"},_e={class:"glass-card rounded-[15px] p-4 text-center"},ke={class:"text-2xl font-bold text-primary"},he={class:"glass-card rounded-[15px] p-4 text-center"},Ce={class:"text-2xl font-bold text-primary"},we={class:"glass-card rounded-[15px] p-4 text-center"},Re={class:"text-2xl font-bold text-primary"},Se={key:0,class:"glass-card rounded-[15px] p-6 space-y-4"},De={key:0,class:"p-4 bg-accent-green/10 border border-accent-green/30 rounded-lg"},Ae={class:"text-content-primary dark:text-content-primary mb-4"},Be={key:1,class:"p-4 bg-secondary/20 border border-secondary/40 rounded-lg"},Ee=G({name:"CADCalibrationView",__name:"CADCalibration",setup(Fe){const m=K(),$=W(()=>document.documentElement.classList.contains("dark")),I=()=>{const e=$.value;return{title:e?"#F9FAFB":"#111827",subtitle:e?"#9CA3AF":"#6B7280",axis:e?"#D1D5DB":"#374151",tick:e?"#9CA3AF":"#6B7280",grid:e?"rgba(148, 163, 184, 0.1)":"rgba(107, 114, 128, 0.15)",zeroline:e?"rgba(148, 163, 184, 0.2)":"rgba(107, 114, 128, 0.25)",line:e?"rgba(148, 163, 184, 0.3)":"rgba(107, 114, 128, 0.35)",colorbarBorder:e?"rgba(255,255,255,0.2)":"rgba(0,0,0,0.15)",markerLine:e?"rgba(255,255,255,0.2)":"rgba(0,0,0,0.15)"}},u=o(!1),C=o(null),r=o(null),v=o({}),n=o(null),P=o([]),N=o({}),d=o("Ready to start calibration"),x=o(0),b=o(0),w=o(0),R=o(0),S=o(0),D=o(0),i=o(null),A=o(!1),B=o(!1),y=o(!1),_=o(!1);let c=null;const O={responsive:!0,displayModeBar:!0,modeBarButtonsToRemove:["pan2d","select2d","lasso2d","autoScale2d"],displaylogo:!1,toImageButtonOptions:{format:"png",filename:"cad-calibration-heatmap",height:600,width:800,scale:2}};function V(){const e=I(),t=[{x:[],y:[],z:[],mode:"markers",type:"scatter",marker:{size:12,color:[],colorscale:[[0,"rgba(75, 85, 99, 0.4)"],[.1,"rgba(6, 182, 212, 0.3)"],[.5,"rgba(6, 182, 212, 0.6)"],[1,"rgba(16, 185, 129, 0.9)"]],showscale:!0,colorbar:{title:{text:"Detection Rate (%)",font:{color:e.axis,size:14}},tickfont:{color:e.tick},bgcolor:"rgba(0,0,0,0)",bordercolor:e.colorbarBorder,borderwidth:1,thickness:15},line:{color:e.markerLine,width:1}},hovertemplate:"<b>Peak:</b> %{x}<br><b>Min:</b> %{y}<br><b>Detection Rate:</b> %{marker.color:.1f}%<br><extra></extra>",name:"Test Results"}],s={title:{text:`CAD Detection Rate<br><sub style="color: ${e.subtitle};">Channel Activity Detection Calibration</sub>`,font:{color:e.title,size:18},x:.5},xaxis:{title:{text:"CAD Peak Threshold",font:{color:e.axis,size:14}},tickfont:{color:e.tick},gridcolor:e.grid,zerolinecolor:e.zeroline,linecolor:e.line},yaxis:{title:{text:"CAD Min Threshold",font:{color:e.axis,size:14}},tickfont:{color:e.tick},gridcolor:e.grid,zerolinecolor:e.zeroline,linecolor:e.line},plot_bgcolor:"rgba(0, 0, 0, 0)",paper_bgcolor:"rgba(0, 0, 0, 0)",font:{color:e.title,family:"Inter, system-ui, sans-serif"},margin:{l:80,r:80,t:100,b:80},showlegend:!1};M.newPlot("plotly-chart",t,s,O)}function j(){if(Object.keys(v.value).length===0)return;const e=Object.values(v.value),t=[],s=[],p=[];for(const E of e)t.push(E.det_peak),s.push(E.det_min),p.push(E.detection_rate);const q={x:[t],y:[s],"marker.color":[p],hovertemplate:"<b>Peak:</b> %{x}<br><b>Min:</b> %{y}<br><b>Detection Rate:</b> %{marker.color:.1f}%<br><b>Status:</b> Tested<br><extra></extra>"};M.restyle("plotly-chart",q,[0])}async function U(){try{const s=await T.post("/cad-calibration-start",{samples:10,delay_ms:50});if(s.success)u.value=!0,C.value=Date.now(),m.setCadCalibrationRunning(!0),v.value={},P.value=[],N.value={},n.value=null,A.value=!1,B.value=!1,y.value=!1,_.value=!1,w.value=0,R.value=0,S.value=0,D.value=0,x.value=0,b.value=0,c=setInterval(()=>{C.value&&(D.value=Math.floor((Date.now()-C.value)/1e3))},1e3),L();else throw new Error(s.error||"Failed to start calibration")}catch(s){d.value=`Error: ${s instanceof Error?s.message:"Unknown error"}`}}async function z(){try{(await T.post("/cad-calibration-stop")).success&&(u.value=!1,m.setCadCalibrationRunning(!1),r.value&&(r.value.close(),r.value=null),c&&(clearInterval(c),c=null))}catch(e){console.error("Failed to stop calibration:",e)}}function L(){r.value&&r.value.cLine truncated
|
||||
@@ -0,0 +1,2 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/leaflet-src-BtisrQHC.js","assets/_commonjsHelpers-CqkleIqs.js"])))=>i.map(i=>d[i]);
|
||||
import{a as q,M as ee,c as N,r as v,D as Q,b as s,g as S,e,t as b,F as K,w as E,v as V,h as Y,q as te,k as I,L as U,p as r,Q as pe,s as G,E as ne,U as ae,x as le,f as R,y as de,d as be,V as re,j as P,l as ie,N as ce,W as ue,T as ve,i as O,X as Z,o as oe,u as W,Y as xe,R as J}from"./index-C2DY4pTz.js";/* empty css */import{_ as ke}from"./ConfirmDialog.vue_vue_type_script_setup_true_lang-BIwbENrM.js";import{g as ge,s as ye}from"./preferences-DtwbSSgO.js";const fe={class:"space-y-4"},he={key:0,class:"bg-green-100 dark:bg-green-500/20 border border-green-500/50 rounded-lg p-3"},we={class:"text-green-600 dark:text-green-400 text-sm"},_e={key:1,class:"bg-red-100 dark:bg-red-500/20 border border-red-500/50 rounded-lg p-3"},$e={class:"text-red-600 dark:text-red-400 text-sm"},Ce={class:"flex justify-end gap-2"},Me=["disabled"],Ae=["disabled"],je={class:"bg-background-mute dark:bg-white/5 rounded-lg p-3 sm:p-4 space-y-3"},Ne={class:"flex flex-col sm:flex-row sm:justify-between sm:items-center py-2 border-b border-stroke-subtle dark:border-stroke/10 gap-1"},Se={key:0,class:"text-content-primary dark:text-content-primary font-mono text-sm"},Te={key:1,class:"flex items-center gap-2"},Be={class:"flex flex-col sm:flex-row sm:justify-between sm:items-center py-2 border-b border-stroke-subtle dark:border-stroke/10 gap-1"},Ee={key:0,class:"text-content-primary dark:text-content-primary font-mono text-sm"},Fe={key:1},Le=["value"],Pe={class:"flex flex-col sm:flex-row sm:justify-between sm:items-center py-2 border-b border-stroke-subtle dark:border-stroke/10 gap-1"},ze={key:0,class:"text-content-primary dark:text-content-primary font-mono text-sm"},Ie={key:1},De=["value"],He={class:"flex flex-col sm:flex-row sm:justify-between sm:items-center py-2 border-b border-stroke-subtle dark:border-stroke/10 gap-1"},Ue={key:0,class:"text-content-primary dark:text-content-primary font-mono text-sm"},Ve={key:1,class:"flex items-center gap-2"},Re={class:"flex flex-col sm:flex-row sm:justify-between sm:items-center py-2 border-b border-stroke-subtle dark:border-stroke/10 gap-1"},Ke={key:0,class:"text-content-primary dark:text-content-primary font-mono text-sm"},qe={key:1},We={class:"flex flex-col sm:flex-row sm:justify-between sm:items-center py-2 gap-1"},Oe={class:"text-content-primary dark:text-content-primary font-mono text-sm"},Ge={key:2,class:"bg-yellow-500/10 dark:bg-yellow-500/10 border border-yellow-500/30 rounded-lg p-3"},Ye=q({__name:"RadioSettings",setup(z){const f=ee(),l=N(()=>f.stats?.config?.radio||{}),m=v(!1),g=v(!1),d=v(null),i=v(null),o=v(0),c=v(0),y=v(0),h=v(0),A=v(0),$=v(0),C=[{value:7.8,label:"7.8 kHz"},{value:10.4,label:"10.4 kHz"},{value:15.6,label:"15.6 kHz"},{value:20.8,label:"20.8 kHz"},{value:31.25,label:"31.25 kHz"},{value:41.7,label:"41.7 kHz"},{value:62.5,label:"62.5 kHz"},{value:125,label:"125 kHz"},{value:250,label:"250 kHz"},{value:500,label:"500 kHz"}];Q(l,_=>{_&&!m.value&&(o.value=_.frequency?Number((_.frequency/1e6).toFixed(3)):0,c.value=_.spreading_factor??0,y.value=_.bandwidth?Number((_.bandwidth/1e3).toFixed(1)):0,h.value=_.tx_power??0,A.value=_.coding_rate??0,$.value=_.preamble_length??0)},{immediate:!0});const a=N(()=>{const _=l.value.frequency;return _?(_/1e6).toFixed(3)+" MHz":"Not set"}),t=N(()=>{const _=l.value.bandwidth;return _?(_/1e3).toFixed(1)+" kHz":"Not set"}),n=N(()=>{const _=l.value.tx_power;return _!==void 0?_+" dBm":"Not set"}),M=N(()=>{const _=l.value.coding_rate;return _?"4/"+_:"Not set"}),p=N(()=>{const _=l.value.preamble_length;return _?_+" symbols":"Not set"}),u=N(()=>l.value.spreading_factor??"Not set"),x=()=>{m.value=!0,d.value=null,i.value=null},L=()=>{m.value=!1,d.value=null;const _=l.value;o.value=_.frequency?Number((_.frequency/1e6).toFixed(3)):0,c.value=_.spreading_factor??0,y.value=_.bandwidth?Number((_.bandwidth/1e3).toFixed(1)):0,h.value=_.tx_power??0,A.value=_.coding_rate??0,$.value=_.preamble_length??0},X=async()=>{g.value=!0,d.value=null,i.value=null;try{const _={};o.value&&(_.frequency=o.value*1e6),c.value&&(_.spreading_factor=c.value),y.value&&(_.bandwidth=y.value*1e3),h.value&&(_.tx_power=h.value),A.value&&(_.coding_rate=A.value);const F=(await U.post("/update_radio_config",_)).data;F.message||F.persisted?(i.value=F.message||"Settings saved successfully",m.value=!1,await f.fetchStats(),setTimeout(()=>{i.value=null},3e3)):F.error?d.value=F.error:d.value="Unknown response from server"}catch(_){console.error("Failed to update radio settings:",_);const j=_;d.value=j.response?.data?.error||"Failed to update settings"}finally{g.value=!1}};return(_,j)=>(r(),s("div",fe,[i.value?(r(),s("div",he,[e("p",we,b(i.value),1)])):S("",!0),d.value?(r(),s("div",_e,[e("p",$e,b(d.value),1)])):S("",!0),e("div",Ce,[m.value?(r(),s(K,{key:1},[e("button",{onClick:L,disabled:g.value,class:"px-3 sm:px-4 py-2 bg-background-mute dark:bg-white/5 hover:bg-stroke-subtle dark:hover:bg-white/10 text-content-primary dark:text-content-primary rounded-lg border border-stroke-subtle dark:boLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
.leaflet-pane[data-v-186d3c86],.leaflet-tile[data-v-186d3c86],.leaflet-marker-icon[data-v-186d3c86],.leaflet-marker-shadow[data-v-186d3c86],.leaflet-tile-container[data-v-186d3c86],.leaflet-pane>svg[data-v-186d3c86],.leaflet-pane>canvas[data-v-186d3c86],.leaflet-zoom-box[data-v-186d3c86],.leaflet-image-layer[data-v-186d3c86],.leaflet-layer[data-v-186d3c86]{position:absolute;left:0;top:0}.leaflet-container[data-v-186d3c86]{overflow:hidden}.leaflet-tile[data-v-186d3c86],.leaflet-marker-icon[data-v-186d3c86],.leaflet-marker-shadow[data-v-186d3c86]{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile[data-v-186d3c86]::-moz-selection{background:transparent}.leaflet-tile[data-v-186d3c86]::selection{background:transparent}.leaflet-safari .leaflet-tile[data-v-186d3c86]{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container[data-v-186d3c86]{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon[data-v-186d3c86],.leaflet-marker-shadow[data-v-186d3c86]{display:block}.leaflet-container .leaflet-overlay-pane svg[data-v-186d3c86]{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img[data-v-186d3c86],.leaflet-container .leaflet-shadow-pane img[data-v-186d3c86],.leaflet-container .leaflet-tile-pane img[data-v-186d3c86],.leaflet-container img.leaflet-image-layer[data-v-186d3c86],.leaflet-container .leaflet-tile[data-v-186d3c86]{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile[data-v-186d3c86]{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom[data-v-186d3c86]{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag[data-v-186d3c86]{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom[data-v-186d3c86]{touch-action:none}.leaflet-container[data-v-186d3c86]{-webkit-tap-highlight-color:transparent}.leaflet-container a[data-v-186d3c86]{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile[data-v-186d3c86]{filter:inherit;visibility:hidden}.leaflet-tile-loaded[data-v-186d3c86]{visibility:inherit}.leaflet-zoom-box[data-v-186d3c86]{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg[data-v-186d3c86]{-moz-user-select:none}.leaflet-pane[data-v-186d3c86]{z-index:400}.leaflet-tile-pane[data-v-186d3c86]{z-index:200}.leaflet-overlay-pane[data-v-186d3c86]{z-index:400}.leaflet-shadow-pane[data-v-186d3c86]{z-index:500}.leaflet-marker-pane[data-v-186d3c86]{z-index:600}.leaflet-tooltip-pane[data-v-186d3c86]{z-index:650}.leaflet-popup-pane[data-v-186d3c86]{z-index:700}.leaflet-map-pane canvas[data-v-186d3c86]{z-index:100}.leaflet-map-pane svg[data-v-186d3c86]{z-index:200}.leaflet-vml-shape[data-v-186d3c86]{width:1px;height:1px}.lvml[data-v-186d3c86]{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control[data-v-186d3c86]{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top[data-v-186d3c86],.leaflet-bottom[data-v-186d3c86]{position:absolute;z-index:1000;pointer-events:none}.leaflet-top[data-v-186d3c86]{top:0}.leaflet-right[data-v-186d3c86]{right:0}.leaflet-bottom[data-v-186d3c86]{bottom:0}.leaflet-left[data-v-186d3c86]{left:0}.leaflet-control[data-v-186d3c86]{float:left;clear:both}.leaflet-right .leaflet-control[data-v-186d3c86]{float:right}.leaflet-top .leaflet-control[data-v-186d3c86]{margin-top:10px}.leaflet-bottom .leaflet-control[data-v-186d3c86]{margin-bottom:10px}.leaflet-left .leaflet-control[data-v-186d3c86]{margin-left:10px}.leaflet-right .leaflet-control[data-v-186d3c86]{margin-right:10px}.leaflet-fade-anim .leaflet-popup[data-v-186d3c86]{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup[data-v-186d3c86]{opacity:1}.leaflet-zoom-animated[data-v-186d3c86]{transform-origin:0 0}svg.leaflet-zoom-animated[data-v-186d3c86]{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated[data-v-186d3c86]{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile[data-v-186d3c86],.leaflet-pan-anim .leaflet-tile[data-v-186d3c86]{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide[data-v-186d3c86]{visibility:hidden}.leaflet-interactive[data-v-186d3c86]{cursor:pointer}.leaflet-grab[data-v-186d3c86]{cursor:grab}.leaflet-crosshair[data-v-186d3c86],.leaflet-crosshair .leaflet-interactive[data-v-186d3c86]{cursor:crosshair}.leaflet-popup-pane[data-v-186d3c86],.leaflet-control[data-v-186d3c86]{cursor:auto}.leaflet-dragging .leaflet-grab[data-v-186d3c86],.leaflet-dragging .leaflet-grab .leaflet-interactive[data-v-186d3c86],.leaflet-dragging .leaflet-marker-draggable[data-v-186d3c86]{cursor:move;cursor:grabbing}.leaflet-marker-icon[data-v-186d3c86],.leaflet-marker-shadow[data-v-186d3c86],.leaflet-image-layer[data-v-186d3c86],.leaflet-pane>svg path[data-v-186d3c86],.leaflet-tile-container[data-v-186d3c86]{pointer-events:none}.leafleLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{a as p,b as n,g as m,e as t,s as g,t as s,j as d,p as l}from"./index-C2DY4pTz.js";const f={class:"flex items-center justify-between mb-4"},w={class:"text-xl font-semibold text-content-primary dark:text-content-primary"},v={class:"mb-6"},h={key:0,class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},y={key:1,class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},C={key:2,class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},B={class:"text-content-secondary dark:text-content-primary/80 text-base leading-relaxed"},j={class:"flex gap-3"},_=p({__name:"ConfirmDialog",props:{show:{type:Boolean},title:{default:"Confirm Action"},message:{},confirmText:{default:"Confirm"},cancelText:{default:"Cancel"},variant:{default:"warning"}},emits:["close","confirm"],setup(c,{emit:b}){const o=c,r=b,u=i=>{i.target===i.currentTarget&&r("close")},k={danger:"bg-red-100 dark:bg-red-500/20 border-red-500/30 text-red-600 dark:text-red-400",warning:"bg-yellow-100 dark:bg-yellow-500/20 border-yellow-500/30 text-yellow-600 dark:text-yellow-400",info:"bg-blue-500/20 border-blue-500/30 text-blue-600 dark:text-blue-400"},x={danger:"bg-red-500 hover:bg-red-600",warning:"bg-yellow-500 hover:bg-yellow-600",info:"bg-blue-500 hover:bg-blue-600"};return(i,e)=>o.show?(l(),n("div",{key:0,onClick:u,class:"fixed inset-0 bg-black/40 backdrop-blur-lg z-[99999] flex items-center justify-center p-4",style:{"backdrop-filter":"blur(8px) saturate(180%)",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"}},[t("div",{class:"bg-white dark:bg-surface-elevated backdrop-blur-xl rounded-[20px] p-6 w-full max-w-md border border-stroke-subtle dark:border-white/10",onClick:e[3]||(e[3]=g(()=>{},["stop"]))},[t("div",f,[t("h3",w,s(o.title),1),t("button",{onClick:e[0]||(e[0]=a=>r("close")),class:"text-content-secondary dark:text-content-muted hover:text-content-primary dark:hover:text-content-primary transition-colors"},e[4]||(e[4]=[t("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),t("div",v,[t("div",{class:d(["inline-flex p-3 rounded-xl mb-4",k[o.variant]])},[o.variant==="danger"?(l(),n("svg",h,e[5]||(e[5]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"},null,-1)]))):o.variant==="warning"?(l(),n("svg",y,e[6]||(e[6]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"},null,-1)]))):(l(),n("svg",C,e[7]||(e[7]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)])))],2),t("p",B,s(o.message),1)]),t("div",j,[t("button",{onClick:e[1]||(e[1]=a=>r("close")),class:"flex-1 px-4 py-3 rounded-xl bg-background-mute dark:bg-white/5 hover:bg-stroke-subtle dark:hover:bg-white/10 text-content-primary dark:text-content-primary transition-all duration-200 border border-stroke-subtle dark:border-stroke/10"},s(o.cancelText),1),t("button",{onClick:e[2]||(e[2]=a=>r("confirm")),class:d(["flex-1 px-4 py-3 rounded-xl text-white transition-all duration-200",x[o.variant]])},s(o.confirmText),3)])])])):m("",!0)}});export{_};
|
||||
@@ -0,0 +1,2 @@
|
||||
import{C as wt,a as Bt,L as Ft,P as jt,b as It,c as Et,i as Ut}from"./chart-B185MtDy.js";import{a as dt,r as D,c as K,D as st,o as ut,E as it,H as yt,b as l,e as t,t as n,n as xt,g as _,I as Lt,p as r,x as pt,J as ft,K as kt,f as Z,F as L,h as O,L as ht,M as Vt,i as Pt,u as ct,k as rt,N as Ht,T as zt,l as Ct,O as Xt,j as T,s as Gt,w as $t,q as Tt,P as Ot,Q as Qt}from"./index-C2DY4pTz.js";import{u as Wt}from"./useSignalQuality-D9wfbwdb.js";import{g as St,s as Rt}from"./preferences-DtwbSSgO.js";const Kt={class:"sparkline-card"},qt={class:"card-header"},Jt={class:"card-title"},Yt={class:"card-chart"},Zt=dt({name:"ChartSparkline",__name:"ChartSparkline",props:{title:{},value:{},color:{},data:{default:()=>[]},showChart:{type:Boolean,default:!0}},setup(at){wt.register(Bt,Ft,jt,It,Et,Ut);const S=at,H=D(null),m=D(null),R=h=>{if(h.length<3)return h;const C=Math.min(15,Math.max(3,Math.floor(h.length*.2))),B=[];for(let b=0;b<h.length;b++){const x=Math.floor(C/2),i=Math.max(0,b-x),j=Math.min(h.length,b+x+1),A=h.slice(i,j);B.push(A.reduce((P,M)=>P+M,0)/A.length)}const W=Math.min(12,B.length),z=B.length/W,f=[];for(let b=0;b<W;b++){const x=Math.floor(b*z);f.push(B[x])}return f},w=K(()=>!S.data||S.data.length===0?[]:R(S.data)),F=()=>{if(!H.value)return;const h=H.value.getContext("2d");if(!h)return;m.value&&(m.value.destroy(),m.value=null);const C=w.value;C.length<2||(m.value=Lt(new wt(h,{type:"line",data:{labels:C.map((B,W)=>W.toString()),datasets:[{data:C,borderColor:S.color,borderWidth:2.5,fill:!1,tension:.4,pointRadius:0,pointHoverRadius:0}]},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:800,easing:"easeOutQuart"},plugins:{legend:{display:!1},tooltip:{enabled:!1}},scales:{x:{display:!1,grid:{display:!1}},y:{display:!1,grid:{display:!1},grace:"10%"}},elements:{line:{capBezierPoints:!0}}}})))},E=()=>{if(!m.value){F();return}const h=w.value;h.length<2||(m.value.data.labels=h.map((C,B)=>B.toString()),m.value.data.datasets[0].data=h,m.value.update("default"))};return st(()=>S.data,()=>{it(()=>E())},{deep:!0}),st(()=>S.color,()=>{m.value&&(m.value.data.datasets[0].borderColor=S.color,m.value.update("none"))}),ut(()=>{it(()=>F())}),yt(()=>{m.value&&(m.value.destroy(),m.value=null)}),(h,C)=>(r(),l("div",Kt,[t("div",qt,[t("p",Jt,n(h.title),1),t("span",{class:"card-value",style:xt({color:h.color})},n(typeof h.value=="number"?h.value.toLocaleString():h.value),5)]),t("div",Yt,[h.showChart?(r(),l("canvas",{key:0,ref_key:"canvasRef",ref:H},null,512)):_("",!0)])]))}}),vt=pt(Zt,[["__scopeId","data-v-bcd5cf93"]]),te={class:"grid grid-cols-2 lg:grid-cols-4 gap-3 lg:gap-4 mb-5 stats-cards-container"},ee=dt({name:"StatsCards",__name:"StatsCards",setup(at){const S=ft(),H=kt(),m=D(null),R=D(null),w=D(!1),F=K(()=>{const C=S.packetStats,B=S.systemStats,W=x=>{const i=Math.floor(x/86400),j=Math.floor(x%86400/3600),A=Math.floor(x%3600/60);return i>0?`${i}d ${j}h`:j>0?`${j}h ${A}m`:`${A}m`},z=C?.total_packets||0,f=C?.dropped_packets||0,b=z>0?Math.round(f/z*100):0;return{packetsReceived:z,packetsForwarded:C?.transmitted_packets||0,uptimeFormatted:B?W(B.uptime_seconds||0):"0m",uptimeHours:B?Math.floor((B.uptime_seconds||0)/3600):0,droppedPackets:f,dropPercent:`${b}%`,signalQuality:Math.round((C?.avg_rssi||0)+120)}}),E=K(()=>S.sparklineData),h=async()=>{if(!w.value)try{w.value=!0,await Promise.all([S.fetchSystemStats(),S.fetchPacketStats({hours:24})]),await it()}catch(C){console.error("Error fetching stats:",C)}finally{w.value=!1}};return ut(async()=>{await S.initializeSparklineHistory(),h();const C=H.isConnected?12e4:3e4;m.value=window.setInterval(h,C),R.value=window.setInterval(()=>{S.interpolateRates()},6e4)}),st(()=>H.isConnected,C=>{if(m.value){clearInterval(m.value);const B=C?12e4:3e4;m.value=window.setInterval(h,B)}}),yt(()=>{m.value&&clearInterval(m.value),R.value&&clearInterval(R.value)}),(C,B)=>(r(),l("div",te,[Z(vt,{title:"Up Time",value:F.value.uptimeFormatted,color:"#EBA0FC",data:[],showChart:!1,class:"stat-card"},null,8,["value"]),Z(vt,{title:"RX Packets",value:F.value.packetsReceived,color:"#AAE8E8",data:E.value.totalPackets,class:"stat-card"},null,8,["value","data"]),Z(vt,{title:"Forward",value:F.value.packetsForwarded,color:"#FFC246",data:E.value.transmittedPackets,class:"stat-card"},null,8,["value","data"]),Z(vt,{title:"Dropped",value:F.value.droppedPackets,color:"#FB787B",data:E.value.droppedPackets,class:"stat-card"},null,8,["value","data"])]))}}),se=pt(ee,[["__scopeId","data-v-41b33099"]]),ae={class:"glass-card rounded-[10px] p-4 lg:p-6"},ne={class:"h-48 lg:h-56 relative"},oe={key:0,class:"absolute inset-0 flex items-center justify-center"},re={key:1,class:"absolute inset-0 flex items-center justify-center"},le={class:"text-red-600 dark:text-red-400 text-sm lg:text-base"},ie={key:2,class:"absolute inset-0 flex items-center justify-center"},de={key:3,class:"h-full flex flex-col"},ce={key:0,class:"absolute top-2 left-1/2 -translate-x-1/2 bg-white/95 dark:bg-surface-elevated border border-stroke-subtle dark:bordLine truncated
|
||||
`)||s},z=(s,e,c)=>{try{let d=0;const o=e.length/2;if(o>=100){if(e.length>=d+64){const y=e.slice(d,d+64);s.push({name:"Public Key",byteRange:`${(c+d)/2}-${(c+d+63)/2}`,hexData:y.match(/.{8}/g)?.join(" ")||y,description:"Ed25519 public key of the node (32 bytes)",fields:[{bits:"0-255",name:"Ed25519 Public Key",value:`${y.slice(0,16)}...${y.slice(-16)}`,binary:"32 bytes (256 bits)"}]}),d+=64}if(e.length>=d+8){const y=e.slice(d,d+8),k=parseInt(y,16),N=new Date(k*1e3);s.push({name:"Timestamp",byteRange:`${(c+d)/2}-${(c+d+7)/2}`,hexData:y.match(/.{2}/g)?.join(" ")||y,description:"Unix timestamp of advertisement",fields:[{bits:"0-31",name:"Unix Timestamp",value:`${k} (${N.toLocaleString()})`,binary:k.toString(2).padStart(32,"0")}]}),d+=8}if(e.length>=d+128){const y=e.slice(d,d+128);s.push({name:"Signature",byteRange:`${(c+d)/2}-${(c+d+127)/2}`,hexData:y.match(/.{8}/g)?.join(" ")||y,description:"Ed25519 signature of public key, timestamp, and appdata",fields:[{bits:"0-511",name:"Ed25519 Signature",value:`${y.slice(0,16)}...${y.slice(-16)}`,binary:"64 bytes (512 bits)"}]}),d+=128}if(e.length>d){const y=e.slice(d);f(s,y,c+d)}}else s.push({name:"ADVERT AppData (Partial)",byteRange:`${c/2}-${c/2+o-1}`,hexData:e.match(/.{2}/g)?.join(" ")||e,description:`Partial ADVERT data - appears to be just AppData portion (${o} bytes)`,fields:[{bits:`0-${o*8-1}`,name:"Partial Data",value:`${o} bytes - attempting to decode as AppData`,binary:`${o} bytes (${o*8} bits)`}]}),f(s,e,c)}catch(d){s.push({name:"ADVERT Parse Error",byteRange:"N/A",hexData:e.slice(0,32)+"...",description:"Failed to parse ADVERT payload structure",fields:[{bits:"N/A",name:"Error",value:`Parse error: ${d instanceof Error?d.message:"Unknown error"}`,binary:"Invalid"}]})}},f=(s,e,c)=>{try{const d=e.length/2;s.push({name:"AppData",byteRange:`${c/2}-${c/2+d-1}`,hexData:e.match(/.{2}/g)?.join(" ")||e,description:`Node advertisement application data (${d} bytes)`,fields:[{bits:`0-${d*8-1}`,name:"Application Data",value:`${d} bytes (contains flags, location, name, etc.)`,binary:`${d} bytes (${d*8} bits)`}]});let o=0;if(e.length>=2){const y=parseInt(e.slice(o,o+2),16),k=[],N=!!(y&16),U=!!(y&32),q=!!(y&64),tt=!!(y&128);if(y&1&&k.push("is chat node"),y&2&&k.push("is repeater"),y&4&&k.push("is room server"),y&8&&k.push("is sensor"),N&&k.push("has location"),U&&k.push("has feature 1"),q&&k.push("has feature 2"),tt&&k.push("has name"),s.push({name:"AppData Flags",byteRange:`${(c+o)/2}`,hexData:`0x${e.slice(o,o+2)}`,description:"Flags indicating which optional fields are present",fields:[{bits:"0-7",name:"Flags",value:k.join(", ")||"none",binary:y.toString(2).padStart(8,"0")}]}),o+=2,N&&e.length>=o+16){const V=e.slice(o,o+8),X=[];for(let p=6;p>=0;p-=2)X.push(V.slice(p,p+2));const g=parseInt(X.join(""),16),v=g>2147483647?g-4294967296:g,I=v/1e6,Q=e.slice(o+8,o+16),et=[];for(let p=6;p>=0;p-=2)et.push(Q.slice(p,p+2));const Y=parseInt(et.join(""),16),nt=Y>2147483647?Y-4294967296:Y,bt=nt/1e6;s.push({name:"Location Data",byteRange:`${(c+o)/2}-${(c+o+15)/2}`,hexData:`${V.match(/.{2}/g)?.join(" ")||V} ${Q.match(/.{2}/g)?.join(" ")||Q}`,description:"GPS coordinates (latitude and longitude)",fields:[{bits:"0-31",name:"Latitude",value:`${I.toFixed(6)}° (raw: ${v})`,binary:v.toString(2).padStart(32,"0")},{bits:"32-63",name:"Longitude",value:`${bt.toFixed(6)}° (raw: ${nt})`,binary:nt.toString(2).padStart(32,"0")}]}),o+=16}if(U&&e.length>=o+4){const V=e.slice(o,o+4),X=parseInt(V,16);s.push({name:"Feature 1",byteRange:`${(c+o)/2}-${(c+o+3)/2}`,hexData:V.match(/.{2}/g)?.join(" ")||V,description:"Reserved feature 1 (2 bytes)",fields:[{bits:"0-15",name:"Feature 1 Value",value:`${X}`,binary:X.toString(2).padStart(16,"0")}]}),o+=4}if(q&&e.length>=o+4){const V=e.slice(o,o+4),X=parseInt(V,16);s.push({name:"Feature 2",byteRange:`${(c+o)/2}-${(c+o+3)/2}`,hexData:V.match(/.{2}/g)?.join(" ")||V,description:"Reserved feature 2 (2 bytes)",fields:[{bits:"0-15",name:"Feature 2 Value",value:`${X}`,binary:X.toString(2).padStart(16,"0")}]}),o+=4}if(tt&&e.length>o){const V=e.slice(o),X=V.match(/.{2}/g)||[],g=X.map(v=>{const I=parseInt(v,16);return I>=32&&I<=126?String.fromCharCode(I):"."}).join("").replace(/\.+$/,"");s.push({name:"Node Name",byteRange:`${(c+o)/2}-${(c+e.length-1)/2}`,hexData:V.match(/.{2}/g)?.join(" ")||V,description:`Node name string (${X.length} bytes)`,fields:[{bits:`0-${X.length*8-1}`,name:"Node Name",value:`"${g}"`,binary:`ASCII text (${X.length} bytes)`}]})}}}catch(d){s.push({name:"AppData Parse Error",byteRange:"N/A",hexData:e.slice(0,Math.min(32,e.length)),description:"Failed to parse AppData structure",fields:[{bits:"N/A",name:"Error",value:`Parse error: ${d instanceof Error?d.message:"Unknown error"}`,binary:"Invalid"}]})}},b=s=>{if(!s)return[];if(Array.isArray(s))return s;if(typeof s=="string")try{return JSON.parse(s)}catch{return[]}return[]},x=s=>{const e=[];if(!s)return e;try{const c=s.raw_packet;if(c){const d=c.replace(/\s+/g,"").toUpperCase();let o=0;if(d.length>=2){const y=d
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
.sparkline-card[data-v-bcd5cf93]{background:#ffffffbf;border:1px solid rgba(0,0,0,.06);border-radius:12px;padding:12px 14px;-webkit-backdrop-filter:blur(50px);backdrop-filter:blur(50px);overflow:hidden;transition:background .3s ease,border-color .3s ease,box-shadow .3s ease;box-shadow:0 4px 16px #0000000a,0 1px 3px #00000005}.dark .sparkline-card[data-v-bcd5cf93]{background:#0006;border:1px solid rgba(255,255,255,.05);box-shadow:0 4px 16px #0003}.card-header[data-v-bcd5cf93]{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:8px}.card-title[data-v-bcd5cf93]{color:#4b5563b3;font-size:11px;font-weight:500;text-transform:uppercase;letter-spacing:.05em;transition:color .3s ease}.dark .card-title[data-v-bcd5cf93]{color:#fff9}.card-value[data-v-bcd5cf93]{font-size:22px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums}.card-chart[data-v-bcd5cf93]{width:100%;height:28px;overflow:hidden}.card-chart canvas[data-v-bcd5cf93]{width:100%!important;height:100%!important}@media (min-width: 1024px){.sparkline-card[data-v-bcd5cf93]{padding:14px 16px}.card-header[data-v-bcd5cf93]{margin-bottom:10px}.card-title[data-v-bcd5cf93]{font-size:12px}.card-value[data-v-bcd5cf93]{font-size:26px}.card-chart[data-v-bcd5cf93]{height:32px}}.stats-cards-container[data-v-41b33099]{will-change:auto;contain:layout}.stat-card[data-v-41b33099]{transition:opacity .3s ease-out}.stat-card[data-v-41b33099] .text-lg,.stat-card[data-v-41b33099] .text-\[30px\]{transition:color .2s ease-out}canvas[data-v-0aca4e12]{width:100%;height:100%}.modal-enter-active[data-v-7f139e4b]{transition:all .3s cubic-bezier(.4,0,.2,1)}.modal-leave-active[data-v-7f139e4b]{transition:all .2s ease-in}.modal-enter-from[data-v-7f139e4b]{opacity:0;transform:scale(.95) translateY(-10px)}.modal-leave-to[data-v-7f139e4b]{opacity:0;transform:scale(1.05)}.custom-scrollbar[data-v-7f139e4b]{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.3) transparent}.custom-scrollbar[data-v-7f139e4b]::-webkit-scrollbar{width:6px}.custom-scrollbar[data-v-7f139e4b]::-webkit-scrollbar-track{background:#ffffff1a;border-radius:3px}.custom-scrollbar[data-v-7f139e4b]::-webkit-scrollbar-thumb{background:#ffffff4d;border-radius:3px}.custom-scrollbar[data-v-7f139e4b]::-webkit-scrollbar-thumb:hover{background:#fff6}.glass-card[data-v-7f139e4b]{-webkit-backdrop-filter:blur(50px);backdrop-filter:blur(50px)}.fade-enter-active[data-v-836a7cf1],.fade-leave-active[data-v-836a7cf1]{transition:opacity .3s ease-out,transform .3s ease-out}.fade-enter-from[data-v-836a7cf1],.fade-leave-to[data-v-836a7cf1]{opacity:0;transform:translateY(-10px)}@keyframes spin-836a7cf1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin[data-v-836a7cf1]{animation:spin-836a7cf1 .8s linear infinite}.packet-list-enter-active[data-v-836a7cf1],.packet-list-leave-active[data-v-836a7cf1],.packet-list-move[data-v-836a7cf1]{transition:all .4s ease-out}.packet-list-enter-from[data-v-836a7cf1]{opacity:0;transform:translateY(-30px) scale(.98)}.packet-list-enter-to[data-v-836a7cf1],.packet-list-leave-from[data-v-836a7cf1]{opacity:1;transform:translateY(0) scale(1)}.packet-list-leave-to[data-v-836a7cf1]{opacity:0;transform:translateY(-20px) scale(.95)}.packet-row[data-v-836a7cf1]{position:relative;transition:all .3s ease}.packet-list-enter-active .packet-row[data-v-836a7cf1]{background:linear-gradient(90deg,rgba(78,201,176,.1) 0%,rgba(78,201,176,.05) 50%,transparent 100%);box-shadow:0 0 20px #4ec9b033;border-left:3px solid rgba(78,201,176,.6);border-radius:8px;padding-left:12px}.packet-row[data-v-836a7cf1]:hover{background:#ffffff05;border-radius:8px;transition:background .2s ease}@media (max-width: 1023px){.filter-container[data-v-836a7cf1]{flex-direction:column;gap:1rem;align-items:stretch}.header-info[data-v-836a7cf1]{flex-direction:column;align-items:flex-start;gap:.5rem}.packet-count[data-v-836a7cf1]{order:1}.live-mode-badge[data-v-836a7cf1]{order:2;align-self:flex-start}.loading-indicator[data-v-836a7cf1],.error-indicator[data-v-836a7cf1]{order:3;align-self:flex-start}.filter-controls[data-v-836a7cf1]{display:grid!important;grid-template-columns:1fr 1fr;gap:.75rem;flex-direction:column}.filter-controls .flex.flex-col[data-v-836a7cf1]{flex-direction:column;align-items:stretch;gap:.25rem}.filter-controls .flex.flex-col label[data-v-836a7cf1]{margin-bottom:0;font-size:.75rem}.reset-container[data-v-836a7cf1]{grid-column:span 2!important;display:flex;justify-content:center;margin-top:.5rem}.pagination-container[data-v-836a7cf1]{flex-direction:column;gap:1rem;align-items:stretch}.pagination-info[data-v-836a7cf1]{justify-content:center;text-align:center;flex-direction:column;gap:.5rem}.load-more-section[data-v-836a7cf1]{justify-content:center}.load-more-count[data-v-836a7cf1]{display:none}.pagination-controls[data-v-836a7cf1]{justify-content:center}.page-numbers[data-v-836a7cf1]{max-width:200px;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.page-numbers[data-v-836a7cf1]::-webkLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{a as e,b as r,i as o,p as n}from"./index-C2DY4pTz.js";const d=e({name:"HelpView",__name:"Help",setup(a){return(i,t)=>(n(),r("div",null,t[0]||(t[0]=[o('<div class="glass-card backdrop-blur border border-stroke-subtle dark:border-white/10 rounded-[15px] p-8"><h1 class="text-content-primary dark:text-content-primary text-2xl font-semibold mb-6">Help & Documentation</h1><div class="text-center py-12"><div class="text-primary mb-6"><svg class="w-20 h-20 mx-auto mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.746 0 3.332.477 4.5 1.253v13C19.832 18.477 18.246 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"></path></svg></div><h2 class="text-content-primary dark:text-content-primary text-xl font-medium mb-3">pyMC Repeater Wiki</h2><p class="text-content-secondary dark:text-content-muted mb-8 max-w-md mx-auto"> Access documentation, setup guides, troubleshooting tips, and community resources on our official wiki. </p><a href="https://github.com/rightup/pyMC_Repeater/wiki" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-2 bg-primary hover:bg-primary/80 text-white dark:text-background font-medium py-3 px-6 rounded-xl transition-colors duration-200"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg> Visit Wiki Documentation </a><div class="mt-8 text-xs text-content-muted dark:text-content-muted"> Opens in a new tab </div></div></div>',1)])))}});export{d as default};
|
||||
@@ -0,0 +1 @@
|
||||
.bg-gradient-light[data-v-7d3a3377]{background:linear-gradient(to bottom,#0ea5e966,#06b6d44d)}.bg-gradient-dark[data-v-7d3a3377]{background:linear-gradient(to bottom,#67e8f94d,#a5f3fc26)}.login-card[data-v-7d3a3377]{background:#11191c66;backdrop-filter:blur(40px) saturate(180%);-webkit-backdrop-filter:blur(40px) saturate(180%)}.login-card[data-v-7d3a3377]{background:#ffffffb3}.dark .login-card[data-v-7d3a3377]{background:#11191c66}.input-glass[data-v-7d3a3377]{backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}.input-glass[data-v-7d3a3377]{background:#ffffffe6;border:1px solid #D1D5DB}.dark .input-glass[data-v-7d3a3377]{background:#ffffff0d;border-color:#ffffff1a}.input-glass[data-v-7d3a3377]:focus{background:#fff}.dark .input-glass[data-v-7d3a3377]:focus{background:#ffffff1a}.input-glass[data-v-7d3a3377]:focus{box-shadow:0 0 0 1px #aae8e833,0 0 20px #aae8e826,inset 0 1px #ffffff1a}.input-glow[data-v-7d3a3377]{opacity:0;transition:opacity .3s ease;box-shadow:inset 0 1px #ffffff0d}.input-glass:focus+.input-glow[data-v-7d3a3377]{opacity:1;box-shadow:0 0 20px #aae8e833,inset 0 1px #ffffff1a}.button-glass[data-v-7d3a3377]{backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);position:relative}.button-glass[data-v-7d3a3377]:before{content:"";position:absolute;inset:0;border-radius:12px;padding:1px;background:linear-gradient(90deg,transparent 0%,rgba(170,232,232,.3) 50%,transparent 100%);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;transform:translate(-100%);transition:transform 1s ease}.button-glass[data-v-7d3a3377]:hover:not(:disabled):before{transform:translate(100%)}.button-glass[data-v-7d3a3377]{box-shadow:0 0 0 1px #aae8e833,0 4px 16px #0003,inset 0 1px #ffffff1a}.button-glass[data-v-7d3a3377]:hover:not(:disabled){box-shadow:0 0 0 1px #aae8e866,0 0 30px #aae8e84d,0 4px 20px #0000004d,inset 0 1px #ffffff26}.login-content:has(.button-glass:hover:not(:disabled)) .logo-image[data-v-7d3a3377]{filter:brightness(1.4) drop-shadow(0 0 12px rgba(170,232,232,.7));transform:scale(1.02)}.login-content:has(.button-glass:hover:not(:disabled)) .logo-glow[data-v-7d3a3377]{opacity:.6;transform:scale(1.15)}.logo-glow[data-v-7d3a3377]{opacity:0}.dark .logo-glow[data-v-7d3a3377]{opacity:1}@keyframes float-7d3a3377{0%,to{transform:translateY(0)}50%{transform:translateY(-10px)}}@keyframes pulse-slow-7d3a3377{0%,to{opacity:.8;transform:scale(1)}50%{opacity:.6;transform:scale(1.05)}}@keyframes pulse-slower-7d3a3377{0%,to{opacity:.75;transform:scale(1)}50%{opacity:.5;transform:scale(1.08)}}@keyframes pulse-slowest-7d3a3377{0%,to{opacity:.8;transform:scale(1)}50%{opacity:.6;transform:scale(1.06)}}.animate-pulse-slow[data-v-7d3a3377]{animation:pulse-slow-7d3a3377 8s ease-in-out infinite}.animate-pulse-slower[data-v-7d3a3377]{animation:pulse-slower-7d3a3377 10s ease-in-out infinite}.animate-pulse-slowest[data-v-7d3a3377]{animation:pulse-slowest-7d3a3377 12s ease-in-out infinite}@keyframes shake-7d3a3377{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-5px)}20%,40%,60%,80%{transform:translate(5px)}}.animate-shake[data-v-7d3a3377]{animation:shake-7d3a3377 .5s ease-in-out}.form-group[data-v-7d3a3377]{position:relative}.form-group:hover label[data-v-7d3a3377]{color:#aae8e8e6;transition:color .3s ease}
|
||||
@@ -0,0 +1 @@
|
||||
import{a as P,r as a,b as i,g,s as _,e,w as v,v as h,t as y,k as M,y as S,p as u,f as w,_ as $,i as N,G as j,C as B,z as D,m as I,A as L,B as C,x as U}from"./index-C2DY4pTz.js";const q={class:"glass-card backdrop-blur-xl border border-stroke-subtle dark:border-white/20 rounded-[15px] p-6 max-w-md w-full shadow-2xl"},E={key:0,class:"bg-red-500/10 border border-red-500/30 rounded-lg p-3"},z={class:"text-red-600 dark:text-red-400 text-sm"},T={key:1,class:"bg-green-500/10 border border-green-600/40 dark:border-green-500/30 rounded-lg p-3"},G={class:"text-green-600 dark:text-green-400 text-sm"},H={class:"flex justify-end gap-3 mt-6"},F=["disabled"],O=["disabled"],R={key:0,class:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"},A=P({name:"ChangePasswordModal",__name:"ChangePasswordModal",props:{isOpen:{type:Boolean},canSkip:{type:Boolean,default:!0}},emits:["close","success"],setup(V,{emit:x}){const p=x,l=a(""),s=a(""),d=a(""),o=a(!1),n=a(""),m=a(""),f=()=>{o.value||p("close")},k=()=>{p("close")},c=async()=>{if(n.value="",m.value="",s.value.length<8){n.value="New password must be at least 8 characters long";return}if(s.value!==d.value){n.value="Passwords do not match";return}if(s.value===l.value){n.value="New password must be different from current password";return}o.value=!0;try{const r=(await S.post("/auth/change_password",{current_password:l.value,new_password:s.value})).data;r&&r.success?(m.value=r.message||"Password changed successfully!",setTimeout(()=>{p("success"),p("close")},1500)):n.value=r?.error||"Failed to change password"}catch(t){console.error("Password change error:",t),n.value=t.response?.data?.error||"Failed to change password. Please try again."}finally{o.value=!1}};return(t,r)=>t.isOpen?(u(),i("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm",onClick:_(f,["self"])},[e("div",q,[r[6]||(r[6]=e("h3",{class:"text-xl font-semibold text-content-primary dark:text-content-primary mb-2"},"Change Default Password",-1)),r[7]||(r[7]=e("p",{class:"text-content-secondary dark:text-content-muted text-sm mb-6"}," You're using the default password. Please change it to secure your account. ",-1)),e("form",{onSubmit:_(c,["prevent"]),class:"space-y-4"},[e("div",null,[r[3]||(r[3]=e("label",{class:"block text-sm font-medium text-content-secondary dark:text-content-primary/70 mb-2"},"Current Password",-1)),v(e("input",{"onUpdate:modelValue":r[0]||(r[0]=b=>l.value=b),type:"password",required:"",class:"w-full px-4 py-2 bg-white dark:bg-white/5 border border-stroke-subtle dark:border-stroke/10 rounded-lg text-content-primary dark:text-content-primary placeholder-gray-500 dark:placeholder-white/40 focus:outline-none focus:border-primary transition-colors",placeholder:"Enter current password"},null,512),[[h,l.value]])]),e("div",null,[r[4]||(r[4]=e("label",{class:"block text-sm font-medium text-content-secondary dark:text-content-primary/70 mb-2"},"New Password",-1)),v(e("input",{"onUpdate:modelValue":r[1]||(r[1]=b=>s.value=b),type:"password",required:"",minlength:"8",class:"w-full px-4 py-2 bg-white dark:bg-white/5 border border-stroke-subtle dark:border-stroke/10 rounded-lg text-content-primary dark:text-content-primary placeholder-gray-500 dark:placeholder-white/40 focus:outline-none focus:border-primary transition-colors",placeholder:"Enter new password (min 8 characters)"},null,512),[[h,s.value]])]),e("div",null,[r[5]||(r[5]=e("label",{class:"block text-sm font-medium text-content-secondary dark:text-content-primary/70 mb-2"},"Confirm New Password",-1)),v(e("input",{"onUpdate:modelValue":r[2]||(r[2]=b=>d.value=b),type:"password",required:"",minlength:"8",class:"w-full px-4 py-2 bg-white dark:bg-white/5 border border-stroke-subtle dark:border-stroke/10 rounded-lg text-content-primary dark:text-content-primary placeholder-gray-500 dark:placeholder-white/40 focus:outline-none focus:border-primary transition-colors",placeholder:"Confirm new password"},null,512),[[h,d.value]])]),n.value?(u(),i("div",E,[e("p",z,y(n.value),1)])):g("",!0),m.value?(u(),i("div",T,[e("p",G,y(m.value),1)])):g("",!0),e("div",H,[t.canSkip?(u(),i("button",{key:0,type:"button",onClick:k,disabled:o.value,class:"px-4 py-2 bg-background-mute dark:bg-white/5 hover:bg-stroke-subtle dark:hover:bg-white/10 text-content-primary dark:text-content-primary rounded-lg border border-stroke-subtle dark:border-stroke/10 transition-colors disabled:opacity-50"}," Skip for Now ",8,F)):g("",!0),e("button",{type:"submit",disabled:o.value,class:"px-4 py-2 bg-primary/20 hover:bg-primary/30 text-white rounded-lg border border-primary/50 transition-colors disabled:opacity-50 flex items-center gap-2"},[o.value?(u(),i("div",R)):g("",!0),M(" "+y(o.value?"Changing...":"Change Password"),1)],8,O)])],32)])])):g("",!0)}}),Y={class:"min-h-screen bg-background dark:bg-background overflow-hidden relative flex items-start sm:items-center justify-center p-2 sm:p-4 pt-8 sm:pt-4"},J={class:"absolute toLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{a as j,r as i,c as w,o as H,H as T,b as s,e as o,k as $,j as h,t as c,g as q,F as L,h as N,i as J,L as K,p as n}from"./index-C2DY4pTz.js";const P={class:"space-y-6"},Q={class:"glass-card backdrop-blur border border-stroke-subtle dark:border-white/10 rounded-[15px] p-6"},X={class:"flex items-center justify-between mb-4"},Y=["disabled"],Z={class:"bg-gray-50 dark:bg-white/5 border border-stroke-subtle dark:border-stroke/10 rounded-lg p-4"},ee={class:"flex flex-wrap gap-2"},te=["onClick"],re={key:0,class:"w-px h-6 bg-stroke-subtle dark:bg-stroke/20 mx-2 self-center"},oe=["onClick"],se={class:"glass-card backdrop-blur border border-stroke-subtle dark:border-white/10 rounded-[15px] overflow-hidden"},ne={key:0,class:"p-8 text-center"},ae={key:1,class:"p-8 text-center"},le={class:"text-content-secondary dark:text-content-muted mb-4"},de={key:2,class:"max-h-[600px] overflow-y-auto"},ce={key:0,class:"p-8 text-center"},ie={key:1,class:"divide-y divide-gray-200 dark:divide-white/5"},ue={class:"flex-shrink-0 text-content-secondary dark:text-content-muted"},ge={class:"flex-shrink-0 px-2 py-1 text-xs font-medium rounded bg-blue-500/20 text-blue-600 dark:text-blue-400"},be={class:"text-content-primary dark:text-content-primary flex-1 break-all"},ve=j({name:"LogsView",__name:"Logs",setup(xe){const x=i([]),a=i(new Set),d=i(new Set(["DEBUG","INFO","WARNING","ERROR"])),v=i(new Set),p=i(new Set),m=i(!0),k=i(null);let u=null;const f=t=>{const e=t.match(/- ([^-]+) - (?:DEBUG|INFO|WARNING|ERROR) -/);return e?e[1].trim():"Unknown"},S=t=>{const e=t.match(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3} - [^-]+ - (?:DEBUG|INFO|WARNING|ERROR) - (.+)$/);return e?e[1]:t},R=(t,e)=>{if(t.size!==e.size)return!1;for(const r of t)if(!e.has(r))return!1;return!0},y=async()=>{try{const t=await K.getLogs();if(t.logs&&t.logs.length>0){x.value=t.logs;const e=new Set;x.value.forEach(b=>{const z=f(b.message);e.add(z)});const r=new Set;x.value.forEach(b=>{r.add(b.level)}),a.value.size===0&&(a.value=new Set(e));const l=!R(v.value,e),g=!R(p.value,r);l&&(v.value=e),g&&(p.value=r),k.value=null}}catch(t){console.error("Error loading logs:",t),k.value=t instanceof Error?t.message:"Failed to load logs"}finally{m.value=!1}},_=w(()=>x.value.filter(e=>{const r=f(e.message),l=a.value.has(r),g=d.value.has(e.level);return l&&g})),C=w(()=>Array.from(v.value).sort()),A=w(()=>{const t=["ERROR","WARNING","WARN","INFO","DEBUG"];return Array.from(p.value).sort((r,l)=>{const g=t.indexOf(r),b=t.indexOf(l);return g!==-1&&b!==-1?g-b:r.localeCompare(l)})}),I=t=>{d.value.has(t)?d.value.delete(t):d.value.add(t),d.value=new Set(d.value)},O=t=>new Date(t).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),B=t=>({ERROR:"text-red-600 dark:text-red-400 bg-red-900/20",WARNING:"text-yellow-600 dark:text-yellow-400 bg-yellow-900/20",WARN:"text-yellow-600 dark:text-yellow-400 bg-yellow-900/20",INFO:"text-blue-600 dark:text-blue-400 bg-blue-900/20",DEBUG:"text-gray-400 bg-gray-900/20"})[t]||"text-gray-400 bg-gray-900/20",E=(t,e)=>e?{ERROR:"bg-red-100 dark:bg-red-500/20 text-red-600 dark:text-red-400 border-red-500/50",WARNING:"bg-yellow-100 dark:bg-yellow-500/20 text-yellow-600 dark:text-yellow-400 border-yellow-500/50",WARN:"bg-yellow-100 dark:bg-yellow-500/20 text-yellow-600 dark:text-yellow-400 border-yellow-500/50",INFO:"bg-blue-500/20 text-blue-600 dark:text-blue-400 border-blue-500/50",DEBUG:"bg-gray-500/20 text-gray-400 border-gray-500/50"}[t]||"bg-primary/20 text-primary border-primary/50":"bg-background-mute dark:bg-white/5 text-content-muted dark:text-white/60 border-stroke-subtle dark:border-white/20 hover:bg-stroke-subtle dark:hover:bg-white/10",G=t=>{a.value.has(t)?a.value.delete(t):a.value.add(t),a.value=new Set(a.value)},F=()=>{a.value=new Set(v.value)},M=()=>{a.value=new Set},D=()=>{d.value=new Set(p.value)},U=()=>{d.value=new Set},W=()=>{u&&clearInterval(u),u=setInterval(y,5e3)},V=()=>{u&&(clearInterval(u),u=null)};return H(()=>{y(),W()}),T(()=>{V()}),(t,e)=>(n(),s("div",P,[o("div",Q,[o("div",X,[e[1]||(e[1]=o("div",null,[o("h1",{class:"text-content-primary dark:text-content-primary text-2xl font-semibold mb-2"},"System Logs"),o("p",{class:"text-content-secondary dark:text-content-muted"},"Real-time system events and diagnostics")],-1)),o("button",{onClick:y,disabled:m.value,class:"flex items-center gap-2 px-4 py-2 bg-primary/20 hover:bg-primary/30 text-primary border border-primary/50 rounded-lg transition-colors disabled:opacity-50"},[(n(),s("svg",{class:h(["w-4 h-4",{"animate-spin":m.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},e[0]||(e[0]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)]),2)),$(" "+c(m.value?"Loading...":"Refresh"),1)],8,Y)]),o("div",Z,[o("div",{class:"flex flex-wrap items-center gap-3 mb-4"},[e[2]||(e[2]=o("span",{class:"text-content-primLine truncated
|
||||
@@ -0,0 +1,65 @@
|
||||
import{a as bt,b as $,g as D,e as t,t as C,s as Lt,p as f,M as Yt,r as F,c as J,D as ht,N as zt,f as it,T as Ft,l as Dt,O as jt,j as M,F as ct,h as gt,x as It,k as tt,o as Xt,Q as te,i as ft,E as Pt,n as At,w as wt,R as ie,q as Wt,v as le,L as Et}from"./index-C2DY4pTz.js";import{u as Ut}from"./useSignalQuality-D9wfbwdb.js";import{L as W}from"./leaflet-src-BtisrQHC.js";/* empty css */import{g as _t,s as Ct}from"./preferences-DtwbSSgO.js";import"./_commonjsHelpers-CqkleIqs.js";const de={class:"bg-gray-50 dark:bg-white/5 border border-stroke-subtle dark:border-stroke/10 rounded-lg p-4 mb-6"},ce={class:"flex items-center gap-3"},ue={class:"flex-1 min-w-0"},pe={class:"text-content-primary dark:text-content-primary font-medium truncate"},ge={class:"text-content-secondary dark:text-content-muted text-sm font-mono"},me={key:0,class:"text-white/50 text-xs"},he={key:1,class:"text-white/50 text-xs"},be=bt({__name:"DeleteNeighborModal",props:{show:{type:Boolean},neighbor:{}},emits:["close","delete"],setup(A,{emit:o}){const r=A,i=o,e=()=>{r.neighbor&&(i("delete",r.neighbor.id),d())},d=()=>{i("close")},g=s=>{s.target===s.currentTarget&&d()};return(s,a)=>s.show&&s.neighbor?(f(),$("div",{key:0,onClick:g,class:"fixed inset-0 bg-black/80 backdrop-blur-lg z-[99999] flex items-center justify-center p-4",style:{"backdrop-filter":"blur(8px) saturate(180%)",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"}},[t("div",{class:"bg-white dark:bg-surface-elevated backdrop-blur-xl rounded-[20px] p-6 w-full max-w-md border border-stroke-subtle dark:border-white/10",onClick:a[0]||(a[0]=Lt(()=>{},["stop"]))},[t("div",{class:"flex items-center gap-3 mb-6"},[a[2]||(a[2]=t("svg",{class:"w-6 h-6 text-accent-red",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})],-1)),a[3]||(a[3]=t("div",null,[t("h3",{class:"text-xl font-semibold text-content-primary dark:text-content-primary"},"Delete Neighbor"),t("p",{class:"text-content-secondary dark:text-content-muted text-sm mt-1"}," Are you sure you want to delete this neighbor? ")],-1)),t("button",{onClick:d,class:"ml-auto text-content-secondary dark:text-content-muted hover:text-content-primary dark:hover:text-content-primary transition-colors"},a[1]||(a[1]=[t("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),t("div",de,[t("div",ce,[t("div",ue,[t("div",pe,C(s.neighbor?.node_name||s.neighbor?.long_name||s.neighbor?.short_name||"Unknown"),1),t("div",ge," ID: "+C(s.neighbor?.node_num_hex||s.neighbor?.node_num||s.neighbor?.id||"N/A"),1),s.neighbor?.contact_type?(f(),$("div",me,C(s.neighbor.contact_type),1)):D("",!0),s.neighbor?.hw_model?(f(),$("div",he,C(s.neighbor.hw_model),1)):D("",!0)])])]),a[4]||(a[4]=t("div",{class:"bg-accent-red/10 border border-accent-red/30 rounded-lg p-4 mb-6"},[t("div",{class:"flex items-center gap-2 text-accent-red text-sm"},[t("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]),t("span",null,"This action cannot be undone")])],-1)),t("div",{class:"flex gap-3"},[t("button",{onClick:d,class:"flex-1 px-4 py-3 bg-background-mute dark:bg-white/5 hover:bg-stroke-subtle dark:hover:bg-white/10 border border-stroke-subtle dark:border-stroke/20 text-content-primary dark:text-content-primary rounded-lg transition-colors"}," Cancel "),t("button",{onClick:e,class:"flex-1 px-4 py-3 bg-accent-red/20 hover:bg-accent-red/30 border border-accent-red/50 text-accent-red rounded-lg transition-colors font-medium"}," Delete ")])])])):D("",!0)}}),xe={class:"bg-gradient-to-r from-primary/20 to-accent-blue/20 border-b border-stroke-subtle dark:border-stroke/10 px-6 py-4"},ve={class:"flex items-center justify-between"},ye={class:"flex items-center gap-3"},ke={key:0,class:"text-sm text-content-secondary dark:text-content-muted"},fe={class:"p-6"},we={key:0,class:"text-center py-8"},_e={key:1,class:"text-center py-8"},Ce={class:"text-content-secondary dark:text-content-muted text-sm"},$e={key:2,class:"space-y-4"},Me={class:"bg-background-mute dark:bg-background/50 border border-stroke-subtle dark:border-stroke/10 rounded-[15px] p-4"},Ae={class:"flex items-center justify-between mb-2"},Le={class:"flex items-baseline gap-2"},Te={class:"text-3xl font-bold text-content-primary dark:text-content-primary"},Ee={class:"grid grid-cols-2 gap-3"},Se={class:"bg-background-mute dark:bg-background/50 border border-stroke-subtle dark:border-stroke/10 rounded-[15px] p-4"},Be={class:"flex items-center gap-2 mb-2"},Ne={class:"flex gap-0.5"},Fe={class:"flex items-baseline gaLine truncated
|
||||
<div style="
|
||||
width: ${H}px;
|
||||
height: ${H}px;
|
||||
background: rgba(170, 232, 232, 0.2);
|
||||
border: 2px solid #AAE8E8;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
backdrop-filter: blur(10px);
|
||||
box-shadow: 0 4px 12px rgba(170, 232, 232, 0.3);
|
||||
color: #ffffff;
|
||||
font-size: ${H<35?"11px":"13px"};
|
||||
font-weight: bold;
|
||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
||||
">
|
||||
${R}
|
||||
</div>
|
||||
`,iconSize:[H,H],iconAnchor:[H/2,H/2]})},B=n("#ef4444",!0);W.marker([E,c],{icon:B}).addTo(s).bindPopup(`
|
||||
<div class="p-2">
|
||||
<strong style="color: #ef4444;">Base Station</strong><br>
|
||||
<span class="text-sm" style="color: #9CA3AF;">Base Station</span><br>
|
||||
<span class="text-xs" style="color: #6B7280;">${E.toFixed(6)}, ${c.toFixed(6)}</span>
|
||||
</div>
|
||||
`);const z={Unknown:"#9CA3AF","Chat Node":"#60A5FA",Repeater:"#A5E5B6","Room Server":"#EBA0FC","Hybrid Node":"#FFC246"},V=(R,H,h,p,T=0)=>{if(!s)return;const N=R.jittered_latitude||R.latitude,U=R.jittered_longitude||R.longitude;if(N===null||U===null)return;const O=R.route_type||0;let Y=p,ot=3,Q=.7,q;O===2?(Y="#A5E5B6",ot=4,Q=.9):O===1?(Y="#FFC246",q="10, 5",Q=.8):O===3?(Y="#059669",ot=5,Q=.95):O===0?(Y="#ea580c",q="12, 6",Q=.8):(Y="#9CA3AF",q="2, 5",Q=.6);const rt=[H,h],st=[N,U],dt=W.polyline([rt,st],{color:Y,weight:ot,opacity:0,dashArray:q,className:"connection-line"}).addTo(s),xt=W.polyline([rt,rt],{color:Y,weight:ot,opacity:0,dashArray:q,className:"connection-line animated-line"}).addTo(s);setTimeout(()=>{let Tt=0;const Vt=30;xt.setStyle({opacity:Q+.2});const Ht=()=>{Tt++;const Zt=Tt/Vt,ne=rt[0]+(st[0]-rt[0])*Zt,se=rt[1]+(st[1]-rt[1])*Zt;xt.setLatLngs([rt,[ne,se]]),Tt<Vt?setTimeout(Ht,30):setTimeout(()=>{s&&xt&&xt.remove(),dt.setStyle({opacity:Q}),dt.on("mouseover",()=>{dt.setStyle({weight:ot+2,opacity:Math.min(Q+.3,1)})}),dt.on("mouseout",()=>{dt.setStyle({weight:ot,opacity:Q})});const ae=u(H,h,N,U);dt.bindPopup(`
|
||||
<div class="p-2">
|
||||
<strong style="color: ${p}">Connection to ${R.node_name||"Unknown Node"}</strong><br>
|
||||
<span class="text-sm" style="color: #E5E7EB;">Distance: ${ae.toFixed(2)} km</span><br>
|
||||
<span class="text-sm" style="color: #E5E7EB;">Route: ${v(R.route_type)}</span><br>
|
||||
<span class="text-sm" style="color: #E5E7EB;">Signal: ${I(R.rssi)} / ${Z(R.snr)}</span>
|
||||
</div>
|
||||
`),y.value.push(dt)},200)};Ht()},T)},G=()=>{if(!s||!w)return;const R=s.getBounds(),H=Math.floor(s.getZoom());m.value.forEach(p=>{s&&p.remove()}),m.value.clear(),y.value.forEach(p=>{s&&p.remove()}),y.value.length=0,w.getClusters([R.getWest(),R.getSouth(),R.getEast(),R.getNorth()],H).forEach(p=>{const[T,N]=p.geometry.coordinates,U=p.properties;if(U.cluster){const O=W.marker([N,T],{icon:l(U.point_count||0)}).addTo(s);O.on("click",()=>{if(s&&w){const st=w.getClusterExpansionZoom(U.cluster_id);s.setView([N,T],st)}});const ot=w.getLeaves(U.cluster_id,1/0).map(st=>`<div style="margin: 2px 0; color: ${z[st.properties.advert.contact_type]||z.Unknown};">
|
||||
• ${st.properties.advert.node_name||"Unknown Node"} (${st.properties.advert.contact_type})
|
||||
</div>`).join("");O.bindPopup(`
|
||||
<div class="p-2">
|
||||
<strong style="color: #AAE8E8;">Cluster: ${U.point_count} nodes</strong><br>
|
||||
<div style="max-height: 200px; overflow-y: auto; margin-top: 8px;">
|
||||
${ot}
|
||||
</div>
|
||||
<div style="margin-top: 8px; font-size: 11px; color: #ffffff99;">
|
||||
Click to zoom in and separate nodes
|
||||
</div>
|
||||
</div>
|
||||
`),m.value.set(`cluster-${U.cluster_id}`,O);const Q=u(E,c,N,T),q=Math.min(Math.floor(Q*5),200),rt={node_name:`Cluster of ${U.point_count} nodes`,contact_type:"Cluster",route_type:2,rssi:null,snr:null,jittered_latitude:N,jittered_longitude:T,latitude:N,longitude:T};V(rt,E,c,"#AAE8E8",q)}else{const O=U.advert,Y=z[O.contact_type]||z.Unknown,ot=n(Y),Q=N,q=T,rt=u(E,c,Q,q),st=W.marker([Q,q],{icon:ot}).addTo(s).bindPopup(`
|
||||
<div class="p-2">
|
||||
<strong style="color: ${Y}">${O.node_name||"Unknown Node"}</strong><br>
|
||||
<span class="text-sm" style="color: #E5E7EB;">Type: ${O.contact_type}</span><br>
|
||||
<span class="text-sm" style="color: #E5E7EB;">Distance: ${rt.toFixed(2)} km</span><br>
|
||||
<span class="text-sm" style="color: #E5E7EB;">Signal: ${I(O.rssi)} / ${Z(O.snr)}</span><br>
|
||||
<span class="text-sm" style="color: #E5E7EB;">Route: ${v(O.route_type)}</span><br>
|
||||
<span class="text-sm" style="color: #E5E7EB;">Last Seen: ${P(O.last_seen)}</span>
|
||||
${O.jittered_latitude?'<br><span class="text-xs" style="color: #9CA3AF;">Position adjusted to separate overlapping nodes</span>':""}
|
||||
</div>
|
||||
`);a.value.set(O.pubkey,st),m.value.set(`node-${O.pubkey}`,st);const dt=Math.min(Math.floor(rt*5),200),xt={...O,jittered_latitude:Q,jittered_longitude:q};V(xt,E,c,Y,dt)}})},X=(R,H)=>{let h=0;et(i.adverts).forEach(T=>{const N=T.properties.advert;if(N.latitude!==null&&N.longitude!==null){const U=z[N.contact_type]||z.Unknown,O=n(U),Y=N.jittered_latitude||N.latitude,ot=N.jittered_longitude||N.longitude,Q=W.marker([Y,ot],{icon:O}).addTo(s).bindPopup(`
|
||||
<div class="p-2">
|
||||
<strong style="color: ${U}">${N.node_name||"Unknown Node"}</strong><br>
|
||||
<span class="text-sm" style="color: #E5E7EB;">Type: ${N.contact_type}</span><br>
|
||||
<span class="text-sm" style="color: #E5E7EB;">Distance: ${u(R,H,Y,ot).toFixed(2)} km</span><br>
|
||||
<span class="text-sm" style="color: #E5E7EB;">Signal: ${I(N.rssi)} / ${Z(N.snr)}</span><br>
|
||||
<span class="text-sm" style="color: #E5E7EB;">Route: ${v(N.route_type)}</span><br>
|
||||
<span class="text-sm" style="color: #E5E7EB;">Last Seen: ${P(N.last_seen)}</span>
|
||||
${N.jittered_latitude?'<br><span class="text-xs" style="color: #9CA3AF;">Position adjusted to separate overlapping nodes</span>':""}
|
||||
</div>
|
||||
`);a.value.set(N.pubkey,Q);const q=Q.getElement();q&&(q.style.opacity="0",q.style.transition="opacity 0.5s ease-out"),V(N,R,H,U,h),setTimeout(()=>{q&&(q.style.opacity="1")},h+1e3),h+=100}})};if(S.value&&i.adverts.length>0)try{const R=et(i.adverts);lt(R);const H=Math.min(14,s.getZoom());s.setZoom(H),setTimeout(()=>{try{G()}catch(h){console.warn("Error updating clusters:",h),X(E,c)}},100),s.on("moveend",()=>{try{G()}catch(h){console.warn("Error updating clusters on move:",h)}}),s.on("zoomend",()=>{try{G()}catch(h){console.warn("Error updating clusters on zoom:",h)}})}catch(R){console.warn("Error initializing clustering:",R),X(E,c)}else X(E,c);setTimeout(()=>{s&&s.invalidateSize()},1e3)}catch(n){console.error("Error initializing map:",n)}};return o({highlightNode:E=>{const c=a.value.get(E);if(c){const n=c.getElement();if(n){const l=n.querySelector("div");l&&l.classList.add("marker-highlight")}}},unhighlightNode:E=>{const c=a.value.get(E);if(c){const n=c.getElement();if(n){const l=n.querySelector("div");l&&l.classList.remove("marker-highlight")}}},initializeOpenStreetMap:at}),ht(()=>i.adverts,()=>{s&&k.value&&setTimeout(()=>{at()},100)},{immediate:!1}),Xt(()=>{_.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),k.value&&i.adverts.length>0&&setTimeout(()=>{at()},300)}),te(()=>{_.disconnect(),j()}),(E,c)=>(f(),$("div",Uo,[k.value?(f(),$("div",{key:1,ref_key:"mapContainer",ref:g,class:"leaflet-map-container h-96 w-full glass-card backdrop-blur border border-black/6 dark:border-white/10 rounded-[12px] overflow-hidden shadow-sm dark:shadow-none",style:{"min-height":"384px",position:"relative"}},null,512)):(f(),$("div",Oo,c[0]||(c[0]=[ft('<div class="text-center text-content-primary dark:text-content-primary" data-v-a6a23e33><svg class="w-8 h-8 mx-auto mb-2 text-content-muted dark:text-content-muted" fill="currentColor" viewBox="0 0 20 20" data-v-a6a23e33><path d="M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z" data-v-a6a23e33></path></svg><p class="text-sm text-content-primary dark:text-content-primary" data-v-a6a23e33>No valid coordinates available</p><p class="text-xs text-content-secondary dark:text-content-muted" data-v-a6a23e33>Configure base station location to view map</p></div>',1)]))),k.value&&E.adverts.length>0?(f(),$("button",{key:2,onClick:d,class:"absolute bottom-3 right-3 z-[1001] flex items-center gap-2 px-3 py-2 bg-black/40 border border-white/10 rounded-lg text-white/80 hover:bg-white/10 hover:text-white transition-colors text-sm backdrop-blur-sm"},[c[1]||(c[1]=t("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1)),t("span",Vo,C(E.showLegend?"Hide":"Show"),1)])):D("",!0),k.value&&E.adverts.length>0&&E.showLegend?(f(),$("div",Ho,[c[2]||(c[2]=ft('<div class="legend-section" data-v-a6a23e33><div class="legend-subtitle" data-v-a6a23e33>Node Types</div><div class="legend-items" data-v-a6a23e33><div class="legend-item" data-v-a6a23e33><div class="legend-icon" style="background-color:#ef4444;" data-v-a6a23e33></div><span data-v-a6a23e33>Base Station</span></div><div class="legend-item" data-v-a6a23e33><div class="legend-icon" style="background-color:#60A5FA;" data-v-a6a23e33></div><span data-v-a6a23e33>Chat Node</span></div><div class="legend-item" data-v-a6a23e33><div class="legend-icon" style="background-color:#A5E5B6;" data-v-a6a23e33></div><span data-v-a6a23e33>Repeater</span></div><div class="legend-item" data-v-a6a23e33><div class="legend-icon" style="background-color:#EBA0FC;" data-v-a6a23e33></div><span data-v-a6a23e33>Room Server</span></div><div class="legend-item" data-v-a6a23e33><div class="legend-icon" style="background-color:#FFC246;" data-v-a6a23e33></div><span data-v-a6a23e33>Hybrid Node</span></div></div></div><div class="legend-section" data-v-a6a23e33><div class="legend-subtitle" data-v-a6a23e33>Route Types</div><div class="legend-items" data-v-a6a23e33><div class="legend-item" data-v-a6a23e33><div class="legend-line" style="background:#A5E5B6;height:3px;" data-v-a6a23e33></div><span data-v-a6a23e33>Direct</span></div><div class="legend-item" data-v-a6a23e33><div class="legend-line" style="background:#059669;height:4px;" data-v-a6a23e33></div><span data-v-a6a23e33>Transport Direct</span></div><div class="legend-item" data-v-a6a23e33><div class="legend-line legend-line-dashed" style="background:#FFC246;" data-v-a6a23e33></div><span data-v-a6a23e33>Flood</span></div><div class="legend-item" data-v-a6a23e33><div class="legend-line legend-line-dashed" style="background:#ea580c;" data-v-a6a23e33></div><span data-v-a6a23e33>Transport Flood</span></div></div></div>',2)),t("div",Zo,C(E.adverts.length)+" node"+C(E.adverts.length!==1?"s":"")+" visible ",1)])):D("",!0),k.value?(f(),$("
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
.modal-enter-active[data-v-bea9143c],.modal-leave-active[data-v-bea9143c]{transition:opacity .2s ease}.modal-enter-from[data-v-bea9143c],.modal-leave-to[data-v-bea9143c]{opacity:0}.modal-enter-active>div[data-v-bea9143c],.modal-leave-active>div[data-v-bea9143c]{transition:transform .2s ease}.modal-enter-from>div[data-v-bea9143c],.modal-leave-to>div[data-v-bea9143c]{transform:scale(.95)}.packet-enter-active[data-v-bea9143c],.packet-leave-active[data-v-bea9143c]{transition:all .15s ease}.packet-enter-from[data-v-bea9143c],.packet-leave-to[data-v-bea9143c]{opacity:0;transform:translate(-50%) scale(.5)}.custom-scrollbar[data-v-cbe6bf60]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-cbe6bf60]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-cbe6bf60]::-webkit-scrollbar-thumb{background:#0003;border-radius:4px}.dark .custom-scrollbar[data-v-cbe6bf60]::-webkit-scrollbar-thumb{background:#fff3}.custom-scrollbar[data-v-cbe6bf60]::-webkit-scrollbar-thumb:hover{background:#0000004d}.dark .custom-scrollbar[data-v-cbe6bf60]::-webkit-scrollbar-thumb:hover{background:#ffffff4d}.modal-enter-active[data-v-cbe6bf60],.modal-leave-active[data-v-cbe6bf60]{transition:opacity .3s ease}.modal-enter-active>div[data-v-cbe6bf60],.modal-leave-active>div[data-v-cbe6bf60]{transition:transform .3s ease,opacity .3s ease}.modal-enter-from[data-v-cbe6bf60],.modal-leave-to[data-v-cbe6bf60]{opacity:0}.modal-enter-from>div[data-v-cbe6bf60],.modal-leave-to>div[data-v-cbe6bf60]{transform:scale(.95);opacity:0}.leaflet-container{background:transparent}.custom-marker{background:transparent!important;border:none!important}.map-container[data-v-a6a23e33]{position:relative;background:transparent;border-radius:15px;overflow:hidden}.leaflet-map-container[data-v-a6a23e33]{background:linear-gradient(135deg,#09090bcc,#0009);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.map-legend[data-v-a6a23e33]{position:absolute;top:10px;right:10px;background:#0006;border:1px solid rgba(255,255,255,.1);border-radius:15px;padding:12px;font-size:12px;color:#fff;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);z-index:1000;min-width:150px;max-width:180px;box-shadow:0 8px 32px #0000004d}.legend-title[data-v-a6a23e33]{font-weight:700;margin-bottom:10px;color:#fff;font-size:13px}.legend-section[data-v-a6a23e33]{margin-bottom:10px}.legend-section[data-v-a6a23e33]:last-of-type{margin-bottom:8px}.legend-subtitle[data-v-a6a23e33]{font-weight:600;margin-bottom:6px;color:#fffc;font-size:11px;text-transform:uppercase;letter-spacing:.5px}.legend-footer[data-v-a6a23e33]{margin-top:10px;padding-top:8px;border-top:1px solid rgba(255,255,255,.1);color:#fff9;font-size:10px;text-align:center}.legend-items[data-v-a6a23e33]{display:flex;flex-direction:column;gap:4px}.legend-item[data-v-a6a23e33]{display:flex;align-items:center;gap:6px}.legend-icon[data-v-a6a23e33]{width:8px;height:8px;border-radius:50%;border:1px solid rgba(255,255,255,.8);box-shadow:0 1px 2px #0003;flex-shrink:0}.legend-icon.cluster-icon[data-v-a6a23e33]{width:16px;height:16px;border-radius:50%;border:1px solid #AAE8E8;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.legend-line[data-v-a6a23e33]{width:16px;height:2px;border-radius:1px;flex-shrink:0;position:relative}.legend-line-dashed[data-v-a6a23e33]{background-image:repeating-linear-gradient(90deg,currentColor 0px,currentColor 4px,transparent 4px,transparent 8px)!important;background-color:transparent!important}.legend-line-dashed[style*="#FFC246"][data-v-a6a23e33]{color:#ffc246!important}.legend-line-dashed[style*="#ea580c"][data-v-a6a23e33]{color:#ea580c!important}.marker-highlight{position:relative!important;z-index:1000!important;animation:marker-glow-a6a23e33 1s ease-in-out infinite!important;border-radius:50%!important;box-shadow:0 0 0 3px #a5e5b6,0 0 8px #a5e5b6,0 0 16px #a5e5b6!important;transform:scale(1.2)!important}@keyframes marker-glow-a6a23e33{0%,to{box-shadow:0 0 0 3px #a5e5b6,0 0 8px #a5e5b6,0 0 16px #a5e5b6;filter:brightness(1)}50%{box-shadow:0 0 0 5px #a5e5b6,0 0 12px #a5e5b6,0 0 24px #a5e5b6;filter:brightness(1.3)}}@keyframes pulse-highlight-a6a23e33{0%{box-shadow:0 0 #3b82f6b3}70%{box-shadow:0 0 0 8px #3b82f600}to{box-shadow:0 0 #3b82f600}}.leaflet-popup-content-wrapper{background:#0006!important;color:#fff!important;border-radius:15px!important;box-shadow:0 8px 32px #0000004d!important;border:1px solid rgba(255,255,255,.1)!important;-webkit-backdrop-filter:blur(20px)!important;backdrop-filter:blur(20px)!important}.leaflet-popup-tip{background:#0006!important;border:1px solid rgba(255,255,255,.1)!important}.leaflet-popup-close-button{color:#fff9!important;font-size:18px!important}.leaflet-popup-close-button:hover{color:#fff!important}.custom-div-icon,.custom-cluster-icon{background:transparent!important;border:none!important}.custom-cluster-icon div{transition:all .3s ease!important;cursor:pointer!important}.custom-cluster-icon:hover div{transform:scale(1.1)!important;box-shadowLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{a as te,b as s,g as c,e,j as f,t as a,s as q,p as n,r as d,D as xe,o as ge,L as y,f as Z,i as G,k,F as N,h as J,w as v,v as b,Y as ee}from"./index-C2DY4pTz.js";import{g as ye,s as ke}from"./preferences-DtwbSSgO.js";import{_ as fe}from"./ConfirmDialog.vue_vue_type_script_setup_true_lang-BIwbENrM.js";const he={class:"mb-6"},we={key:0,class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},_e={key:1,class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Ce={key:2,class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Me={class:"text-content-secondary dark:text-content-primary/80 text-base leading-relaxed"},je={class:"flex"},Le=te({__name:"MessageDialog",props:{show:{type:Boolean},message:{},variant:{default:"success"}},emits:["close"],setup(W,{emit:B}){const x=W,i=B,M=g=>{g.target===g.currentTarget&&i("close")},j={success:"bg-green-100 dark:bg-green-500/20 border-green-600/40 dark:border-green-500/30 text-green-600 dark:text-green-400",error:"bg-red-100 dark:bg-red-500/20 border-red-500/30 text-red-600 dark:text-red-400",info:"bg-blue-500/20 border-blue-500/30 text-blue-600 dark:text-blue-400"},l={success:"bg-green-500 hover:bg-green-600",error:"bg-red-500 hover:bg-red-600",info:"bg-blue-500 hover:bg-blue-600"};return(g,p)=>x.show?(n(),s("div",{key:0,onClick:M,class:"fixed inset-0 bg-black/40 backdrop-blur-lg z-[99999] flex items-center justify-center p-4",style:{"backdrop-filter":"blur(8px) saturate(180%)",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"}},[e("div",{class:"bg-white dark:bg-surface-elevated backdrop-blur-xl rounded-[20px] p-6 w-full max-w-md border border-stroke-subtle dark:border-white/10",onClick:p[1]||(p[1]=q(()=>{},["stop"]))},[e("div",he,[e("div",{class:f(["inline-flex p-3 rounded-xl mb-4",j[x.variant]])},[x.variant==="success"?(n(),s("svg",we,p[2]||(p[2]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)]))):x.variant==="error"?(n(),s("svg",_e,p[3]||(p[3]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1)]))):(n(),s("svg",Ce,p[4]||(p[4]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)])))],2),e("p",Me,a(x.message),1)]),e("div",je,[e("button",{onClick:p[0]||(p[0]=L=>i("close")),class:f(["flex-1 px-4 py-3 rounded-xl text-white transition-all duration-200",l[x.variant]])}," OK ",2)])])])):c("",!0)}}),$e={class:"p-6 space-y-6"},Se={class:"relative overflow-hidden rounded-[20px] p-6 mb-6 glass-card backdrop-blur-xl border border-stroke-subtle dark:border-white/10"},Be={class:"relative flex items-center justify-between"},Ae={key:0,class:"grid grid-cols-1 md:grid-cols-3 gap-4"},Ve={class:"group relative overflow-hidden glass-card backdrop-blur-xl border border-stroke-subtle dark:border-white/10 rounded-[15px] p-5 hover:scale-[1.02] transition-all duration-300 cursor-pointer"},Re={class:"relative flex items-center justify-between"},ze={class:"text-3xl font-bold text-content-primary dark:text-content-primary mb-1"},De={class:"group relative overflow-hidden glass-card backdrop-blur-xl border border-stroke-subtle dark:border-white/10 rounded-[15px] p-5 hover:scale-[1.02] transition-all duration-300 cursor-pointer"},Ee={class:"relative flex items-center justify-between"},Fe={class:"text-3xl font-bold text-primary mb-1"},Ie={class:"group relative overflow-hidden glass-card backdrop-blur-xl border border-stroke-subtle dark:border-white/10 rounded-[15px] p-5 hover:scale-[1.02] transition-all duration-300 cursor-pointer"},Ne={class:"relative flex items-center justify-between"},Ue={key:0,class:"w-6 h-6 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},He={key:1,class:"w-6 h-6 text-accent-yellow",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Ke={class:"glass-card backdrop-blur-xl border border-stroke-subtle dark:border-white/10 rounded-[15px] p-6"},Oe={key:0,class:"flex items-center justify-center py-12"},Pe={key:1,class:"flex items-center justify-center py-12"},Te={class:"text-center"},Ge={class:"text-content-secondary dark:text-content-muted text-sm mb-4"},Je={key:2,class:"space-y-4"},qe={class:"relative flex items-start justify-between"},We={class:"flex-1"},Ye={class:"flex items-center gap-3 mb-4"},Qe={class:"relative"},Xe={key:0,class:"absolute inset-0 bg-accent-green/50 rounded-full animate-ping"},Ze={class:"text-xl font-bold text-content-primary dark:text-content-primary group-hover:text-primary transition-colors"},et={key:0,class:"text-content-muted dark:text-content-muted text-sm"},tt={class:"grid grid-cols-1 md:grid-cols-2 gap-3 text-sm mb-3"},rt={class:"text-content-primary dark:text-content-primary/90 ml-2"},ot={class:"flex items-center gap-2"},st={key:0,class:"text-content-primary dark:text-content-primary/90 font-mono ml-2 text-xs"},nt={key:1,class:"text-content-muted dark:texLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{a as I,r as d,o as N,L as b,c as S,b as o,e as t,g as f,t as n,F as m,h as y,w as R,q as V,j as i,k as B,p as r}from"./index-C2DY4pTz.js";const z={class:"p-6 space-y-6"},D={key:0,class:"grid grid-cols-1 md:grid-cols-4 gap-4"},F={class:"glass-card rounded-[15px] p-4"},T={class:"text-2xl font-bold text-content-primary dark:text-content-primary"},$={class:"glass-card rounded-[15px] p-4"},E={class:"text-2xl font-bold text-cyan-500 dark:text-primary"},H={class:"glass-card rounded-[15px] p-4"},P={class:"text-2xl font-bold text-green-700 dark:text-green-500 dark:text-accent-green"},G={class:"glass-card rounded-[15px] p-4"},O={class:"text-2xl font-bold text-yellow-500 dark:text-secondary"},q={class:"glass-card rounded-[15px] p-6"},U={class:"flex flex-wrap border-b border-stroke-subtle dark:border-stroke/10 mb-6"},J=["onClick"],K={class:"flex items-center gap-2"},Q={key:0,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},W={key:1,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},X={key:2,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Y={class:"min-h-[400px]"},Z={key:0,class:"flex items-center justify-center py-12"},tt={key:1,class:"flex items-center justify-center py-12"},et={class:"text-center"},st={class:"text-content-secondary dark:text-content-muted text-sm mb-4"},nt={key:2,class:"space-y-4"},ot={key:0,class:"text-center py-12 text-content-secondary dark:text-content-muted"},rt={key:1,class:"space-y-4"},at={class:"flex items-start justify-between"},dt={class:"flex-1"},it={class:"flex items-center gap-3 mb-2"},lt={class:"text-lg font-semibold text-content-primary dark:text-content-primary"},ct={class:"text-content-muted dark:text-content-muted text-sm"},xt={class:"grid grid-cols-2 md:grid-cols-4 gap-4 mt-4"},ut={class:"text-content-primary dark:text-content-primary font-medium"},mt={class:"text-cyan-500 dark:text-primary font-medium"},yt={class:"mt-3 flex items-center gap-2"},vt={key:3,class:"space-y-4"},kt={key:0,class:"text-center py-12 text-content-secondary dark:text-content-muted"},pt={key:1,class:"overflow-x-auto"},bt={class:"w-full"},_t={class:"py-3"},gt={class:"font-mono text-sm text-content-primary dark:text-content-primary"},ht={class:"py-3"},ft={class:"font-mono text-xs text-content-secondary dark:text-content-muted"},wt={class:"py-3"},Ct={class:"text-sm text-content-primary dark:text-content-primary"},At={class:"text-xs text-content-muted dark:text-content-muted"},Lt={class:"py-3"},St={class:"py-3"},Mt={class:"text-sm text-content-secondary dark:text-content-muted"},jt={class:"py-3"},It=["onClick"],Nt={key:4,class:"space-y-4"},Rt={class:"mb-4"},Vt=["value"],Bt={key:0,class:"text-center py-12 text-content-secondary dark:text-content-muted"},zt={key:1,class:"grid grid-cols-1 gap-4"},Dt={class:"flex items-start justify-between"},Ft={class:"flex-1"},Tt={class:"flex items-center gap-3 mb-3"},$t={class:"text-content-primary dark:text-content-primary font-mono text-sm"},Et={class:"grid grid-cols-1 md:grid-cols-2 gap-3 text-sm"},Ht={class:"text-content-primary dark:text-content-primary/90 font-mono ml-2"},Pt={class:"text-content-primary dark:text-content-primary/90 ml-2"},Gt={class:"text-content-primary dark:text-content-primary/90 ml-2"},Ot={class:"text-content-primary dark:text-content-primary/90 ml-2"},qt=["onClick"],Ut={class:"flex justify-end"},Jt=["disabled"],Wt=I({name:"SessionsView",__name:"Sessions",setup(Kt){const c=d("overview"),w=d(!1),x=d(!1),v=d(null),_=d(null),u=d([]),l=d(null),k=d(null),M=[{id:"overview",label:"Overview",icon:"overview"},{id:"clients",label:"Authenticated Clients",icon:"clients"},{id:"identities",label:"By Identity",icon:"identities"}];N(async()=>{await p(),w.value=!0});async function p(){x.value=!0,v.value=null;try{const a=await b.getACLInfo();a.success&&(_.value=a.data);const s=await b.getACLClients();s.success&&s.data&&(u.value=s.data.clients||[]);const e=await b.getACLStats();e.success&&(l.value=e.data)}catch(a){v.value=a instanceof Error?a.message:"Failed to load ACL data",console.error("Error fetching ACL data:",a)}finally{x.value=!1}}async function C(a,s){if(confirm("Are you sure you want to remove this client from the ACL?"))try{const e=await b.removeACLClient({public_key:a,identity_hash:s});e.success?await p():alert(`Failed to remove client: ${e.error}`)}catch(e){alert(`Error removing client: ${e}`)}}function g(a){return a?new Date(a*1e3).toLocaleString():"Never"}function j(a){c.value=a}const A=S(()=>k.value?u.value.filter(a=>a.identity_name===k.value):u.value),h=S(()=>_.value?_.value.acls||[]:[]);return(a,s)=>(r(),o("div",z,[s[22]||(s[22]=t("div",null,[t("h1",{class:"text-2xl font-bold text-content-primary dark:text-content-primary"},"Sessions & Access Control"),t("p",{class:"text-content-secondary dark:text-content-muted mt-2"},"Manage authenticated clients and access control lists")],-1)),l.value?(r(),o("div",D,[t("div",F,[s[1]||(s[1]=t("div",{class:"text-content-secondary dark:text-content-mLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{d as A,r as l,c as P,a as W,o as I,b as a,e,f as B,_ as Y,t as i,u as o,n as J,g as k,F as N,h as z,i as K,w as h,v as C,j as _,k as V,l as q,T,m as Q,p as n,q as E,s as X,x as Z}from"./index-C2DY4pTz.js";const ee=A("setup",()=>{const m=l(1),r=l(5),y=l(`pyRpt${Math.floor(Math.random()*1e4).toString().padStart(4,"0")}`),b=l(null),v=l(null),x=l(""),f=l(""),w=l(!1),c=l({frequency:"915.0",spreading_factor:"7",bandwidth:"125",coding_rate:"5"}),R=l([]),j=l([]),g=l(!1),S=l(!1),u=l(null),t=P(()=>{switch(m.value){case 1:return!0;case 2:return y.value.trim().length>0;case 3:return b.value!==null;case 4:return w.value?c.value.frequency&&c.value.spreading_factor&&c.value.bandwidth&&c.value.coding_rate:v.value!==null;case 5:return x.value.length>=6&&x.value===f.value;default:return!1}}),s=P(()=>m.value>1),M=P(()=>m.value===r.value);async function F(){g.value=!0,u.value=null;try{const p=await(await fetch("/api/hardware_options")).json();if(p.error)throw new Error(p.error);R.value=p.hardware||[]}catch(d){u.value=d instanceof Error?d.message:"Failed to load hardware options",console.error("Error fetching hardware options:",d)}finally{g.value=!1}}async function H(){g.value=!0,u.value=null;try{const p=await(await fetch("/api/radio_presets")).json();if(p.error)throw new Error(p.error);j.value=p.presets||[]}catch(d){u.value=d instanceof Error?d.message:"Failed to load radio presets",console.error("Error fetching radio presets:",d)}finally{g.value=!1}}async function U(){if(!t.value)return{success:!1,error:"Please complete all required fields"};S.value=!0,u.value=null;try{const d=w.value?{title:"Custom Configuration",description:"Custom radio settings",frequency:c.value.frequency,spreading_factor:c.value.spreading_factor,bandwidth:c.value.bandwidth,coding_rate:c.value.coding_rate}:v.value,L=await(await fetch("/api/setup_wizard",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({node_name:y.value.trim(),hardware_key:b.value?.key,radio_preset:d,admin_password:x.value})})).json();if(!L.success)throw new Error(L.error||"Setup failed");return{success:!0,data:L}}catch(d){const p=d instanceof Error?d.message:"Failed to complete setup";return u.value=p,{success:!1,error:p}}finally{S.value=!1}}function O(){t.value&&m.value<r.value&&m.value++}function $(){s.value&&m.value--}function G(d){d>=1&&d<=r.value&&(m.value=d)}function D(){m.value=1,y.value=`pyRpt${Math.floor(Math.random()*1e4).toString().padStart(4,"0")}`,b.value=null,v.value=null,w.value=!1,c.value={frequency:"915.0",spreading_factor:"7",bandwidth:"125",coding_rate:"5"},x.value="",f.value="",u.value=null}return{currentStep:m,totalSteps:r,nodeName:y,selectedHardware:b,selectedRadioPreset:v,useCustomRadio:w,customRadio:c,adminPassword:x,confirmPassword:f,hardwareOptions:R,radioPresets:j,isLoading:g,isSubmitting:S,error:u,canGoNext:t,canGoBack:s,isLastStep:M,fetchHardwareOptions:F,fetchRadioPresets:H,completeSetup:U,nextStep:O,previousStep:$,goToStep:G,reset:D}}),te={class:"min-h-screen bg-background dark:bg-background overflow-hidden relative flex items-center justify-center p-4"},re={class:"absolute top-4 right-4 z-20"},oe={class:"w-full max-w-4xl relative z-10"},se={class:"mb-8"},ae={class:"flex justify-between mb-2"},ne={class:"text-content-secondary dark:text-content-muted text-sm"},de={class:"text-content-secondary dark:text-content-muted text-sm"},ie={class:"h-2 bg-stroke-subtle dark:bg-stroke/10 rounded-full overflow-hidden"},le={class:"bg-white dark:bg-surface-elevated backdrop-blur-xl border border-stroke-subtle dark:border-white/10 rounded-[20px] p-6 sm:p-8 md:p-12"},ue={class:"flex justify-center mb-8"},ce={class:"flex gap-2"},pe={class:"mb-8"},me={class:"text-2xl sm:text-3xl font-bold text-content-primary dark:text-content-primary mb-2 text-center"},be={key:0,class:"space-y-6 mt-8"},fe={key:1,class:"space-y-6 mt-8"},xe={class:"max-w-md mx-auto"},ke={key:2,class:"space-y-6 mt-8"},ve={key:0,class:"text-center text-content-secondary dark:text-content-muted"},ge={key:1,class:"text-center text-content-secondary dark:text-content-muted"},ye={key:2,class:"grid grid-cols-1 md:grid-cols-2 gap-4 max-w-3xl mx-auto"},he=["onClick"],we={class:"font-medium text-content-primary dark:text-content-primary mb-1"},_e={class:"text-sm text-content-secondary dark:text-content-muted"},Se={key:3,class:"space-y-6 mt-8"},Ce={key:0,class:"text-center text-content-secondary dark:text-content-muted"},Re={key:1,class:"text-center text-content-secondary dark:text-content-muted"},je={key:2,class:"max-w-5xl mx-auto"},Pe={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-4"},Me=["onClick"],Le={class:"relative z-10"},Be={class:"font-medium text-content-primary dark:text-content-primary mb-1 flex items-start justify-between gap-2"},Ne={class:"flex items-center gap-2"},ze={class:"text-2xl"},Ve={key:0,class:"text-primary flex-shrink-0"},qe={class:"text-xs text-content-secondary dark:text-content-muted mb-3"},Te={class:"grid grid-cols-2 gap-2 text-xs"},Ee={clLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
.glass-card[data-v-20a8772f]{background:#ffffff0d;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.1)}.modal-enter-active[data-v-20a8772f],.modal-leave-active[data-v-20a8772f]{transition:opacity .3s ease}.modal-enter-from[data-v-20a8772f],.modal-leave-to[data-v-20a8772f]{opacity:0}.modal-enter-active .glass-card[data-v-20a8772f],.modal-leave-active .glass-card[data-v-20a8772f]{transition:transform .3s ease}.modal-enter-from .glass-card[data-v-20a8772f],.modal-leave-to .glass-card[data-v-20a8772f]{transform:scale(.9)}.slide-enter-active[data-v-20a8772f],.slide-leave-active[data-v-20a8772f]{transition:all .3s ease}.slide-enter-from[data-v-20a8772f],.slide-leave-to[data-v-20a8772f]{opacity:0;transform:translateY(-10px)}@keyframes float-slow-20a8772f{0%,to{opacity:.8;transform:translate(0) scale(1) rotate(-24.22deg)}50%{opacity:.6;transform:translate(20px,-20px) scale(1.05) rotate(-24.22deg)}}@keyframes float-slower-20a8772f{0%,to{opacity:.75;transform:translate(0) scale(1) rotate(-24.22deg)}50%{opacity:.5;transform:translate(-30px,20px) scale(1.08) rotate(-24.22deg)}}@keyframes float-slowest-20a8772f{0%,to{opacity:.8;transform:translate(0) scale(1) rotate(-24.22deg)}50%{opacity:.55;transform:translate(25px,25px) scale(1.1) rotate(-24.22deg)}}.animate-pulse-slow[data-v-20a8772f]{animation:float-slow-20a8772f 15s ease-in-out infinite;will-change:transform,opacity}.animate-pulse-slower[data-v-20a8772f]{animation:float-slower-20a8772f 18s ease-in-out infinite;will-change:transform,opacity}.animate-pulse-slowest[data-v-20a8772f]{animation:float-slowest-20a8772f 20s ease-in-out infinite;will-change:transform,opacity}
|
||||
@@ -0,0 +1 @@
|
||||
.plotly-chart[data-v-967da4a4]{background:transparent!important}
|
||||
@@ -0,0 +1 @@
|
||||
import{a as Fe,J as Me,r as u,D as Pe,c as ie,o as Be,E as ce,S as M,H as Ae,b as k,e as a,g as B,w as Ne,q as Oe,F as de,h as ue,f as ee,u as pe,i as Le,t as K,L as X,I as te,n as He,p as C,x as ze}from"./index-C2DY4pTz.js";import{S as ae}from"./chartjs-adapter-date-fns.esm-BTd89PGn.js";import{g as Je,s as Ue}from"./preferences-DtwbSSgO.js";import{C as G,a as Ie,L as Ve,P as je,b as $e,c as Ke,B as Xe,D as Ge,S as We,p as Ye,d as Ze,e as qe,A as Qe,f as et,i as tt,T as at}from"./chart-B185MtDy.js";import{P as H}from"./plotly.min-DO11Gp-n.js";import"./_commonjsHelpers-CqkleIqs.js";const st={class:"p-3 sm:p-6 space-y-4 sm:space-y-6"},rt={class:"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3"},ot={class:"flex items-center gap-2 sm:gap-3"},lt=["value"],nt={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4"},it={class:"glass-card rounded-[15px] p-3 sm:p-6"},ct={class:"relative h-40 sm:h-48 rounded-lg p-2 sm:p-4"},dt={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/50 dark:bg-white/5 backdrop-blur-xs z-20"},ut={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/50 dark:bg-white/5 z-20"},pt={class:"grid grid-cols-1 lg:grid-cols-2 gap-4 sm:gap-6 items-stretch"},mt={class:"glass-card rounded-[15px] p-3 sm:p-6 flex flex-col"},vt={class:"relative flex-1 min-h-[12rem] sm:min-h-[16rem] rounded-lg"},ft={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/50 dark:bg-white/5 backdrop-blur-xs z-20"},gt={class:"glass-card rounded-[15px] p-3 sm:p-6 flex flex-col"},xt={class:"flex-1 flex flex-col justify-evenly"},bt={key:0,class:"flex items-center justify-center flex-1"},yt={key:1,class:"flex items-center justify-center flex-1"},ht={class:"w-28 sm:w-32 text-sm text-content-primary dark:text-content-primary truncate"},kt={class:"flex-1 h-12 bg-background-mute dark:bg-stroke/10 rounded overflow-hidden"},Ct={class:"w-20 text-sm text-content-secondary dark:text-content-muted text-right tabular-nums"},_t={key:0,class:"glass-card rounded-[15px] p-6 sm:p-8 text-center"},wt={key:1,class:"glass-card rounded-[15px] p-6 sm:p-8 text-center"},St={class:"text-content-secondary dark:text-content-muted text-sm"},Rt=Fe({name:"StatisticsView",__name:"Statistics",setup(Tt){G.register(Ie,Ve,je,$e,Ke,Xe,Ge,We,Ye,Ze,qe,Qe,et,tt,at);const A=Me(),W=u(null),Y=u(!1),R=()=>{const t=document.documentElement.classList.contains("dark");return{gridColor:t?"rgba(255, 255, 255, 0.1)":"rgba(0, 0, 0, 0.1)",tickColor:t?"rgba(255, 255, 255, 0.7)":"rgba(0, 0, 0, 0.7)",legendColor:t?"rgba(255, 255, 255, 0.8)":"rgba(0, 0, 0, 0.8)",titleColor:t?"rgba(255, 255, 255, 0.8)":"rgba(0, 0, 0, 0.8)"}},g=u(Je("statistics_selectedHours",24)),me=[{value:1,label:"1 Hour"},{value:6,label:"6 Hours"},{value:12,label:"12 Hours"},{value:24,label:"24 Hours"},{value:48,label:"2 Days"},{value:168,label:"1 Week"}];Pe(g,t=>Ue("statistics_selectedHours",t));const T=u(null),N=u(null),z=u([]),D=u(null),Z=u([]),J=u(!0),U=u(null),S=u({packetRate:!0,packetType:!0,noiseFloor:!1,routePie:!0,sparklines:!0}),O=u(!1),I=u(!1),L=u(!1),_=u(null),w=u(null),h=u(null),V=u(null),q=u(null),Q=u(null),E=u(null),se=ie(()=>{const t=A.packetStats;return t?{totalRx:t.total_packets||0,totalTx:t.transmitted_packets||0}:{totalRx:0,totalTx:0}}),re=(t,e)=>{if(t.length===0)return[];const i=Math.round(e*60*60*1e3/72),r=new Map;return t.forEach(([o,f])=>{let p=o;o>1e15?p=o/1e3:o>1e9&&o<1e12&&(p=o*1e3);const x=Math.floor(p/i)*i;r.has(x)||r.set(x,[]),r.get(x).push(f)}),Array.from(r.entries()).sort((o,f)=>o[0]-f[0]).map(([,o])=>o.reduce((f,p)=>f+p,0)/o.length)},oe=ie(()=>{let t=[],e=[];if(T.value?.series){const s=T.value.series.find(r=>r.type==="rx_count"),i=T.value.series.find(r=>r.type==="tx_count");s?.data&&(t=re(s.data,g.value)),i?.data&&(e=re(i.data,g.value))}return{totalPackets:t,transmittedPackets:e,droppedPackets:[]}}),j=async()=>{try{J.value=!0,U.value=null,await Promise.all([A.fetchPacketStats({hours:g.value}),A.fetchSystemStats()]),J.value=!1,ve()}catch(t){U.value=t instanceof Error?t.message:"Failed to fetch data",J.value=!1}},ve=async()=>{S.value={packetRate:!0,packetType:!0,noiseFloor:!0,routePie:!0,sparklines:!0};const t=[fe(),ge(),xe(),be()];try{await Promise.allSettled(t),await ce(),!V.value||!q.value?setTimeout(()=>{le()},100):le()}catch(e){console.error("Error loading chart data:",e)}},fe=async()=>{try{const t=await X.get("/metrics_graph_data",{hours:g.value,resolution:"average",metrics:"rx_count,tx_count"});t?.success&&(T.value=t.data)}catch{T.value=null}},ge=async()=>{try{const t=await X.get("/packet_type_graph_data",{hours:g.value,resolution:"average",types:"all"});if(t?.success&&t.data){const e=t.data;z.value=e.series||[]}}catch{z.value=[]}},xe=async()=>{try{const t=await X.get("/route_stats",{hours:g.value});t?.success&&t.data&&(D.value=t.data)}catch{D.value=null}},be=async()=>{try{const s=Math.floor(g.value*120);let i;s<=1500?i=void 0:i=2e3;const r={hours:g.value};i!==void 0&&(r.limit=i);const o=await X.Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
.glass-card[data-v-eab6d04d]{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#ffffffbf;border:1px solid rgba(0,0,0,.06);box-shadow:0 2px 8px #0000000a}.dark .glass-card[data-v-eab6d04d]{background:#0000004d;border:1px solid rgba(255,255,255,.1);box-shadow:none}.chart-updating[data-v-eab6d04d]{animation:subtle-pulse-eab6d04d .8s ease-in-out}@keyframes subtle-pulse-eab6d04d{0%{transform:scale(1)}50%{transform:scale(1.02)}to{transform:scale(1)}}.chart-container[data-v-eab6d04d]{position:relative;transition:all .3s ease}.chart-container[data-v-eab6d04d]:hover{background:#0000000a}.dark .chart-container[data-v-eab6d04d]:hover{background:#ffffff14}.process-row[data-v-eab6d04d]{transition:all .3s ease}.process-row[data-v-eab6d04d]:hover{background:#00000005;transform:translate(2px)}.dark .process-row[data-v-eab6d04d]:hover{background:#ffffff0d}.process-row-enter-active[data-v-eab6d04d],.process-row-leave-active[data-v-eab6d04d]{transition:all .4s ease}.process-row-enter-from[data-v-eab6d04d]{opacity:0;transform:translateY(-10px) scale(.95)}.process-row-leave-to[data-v-eab6d04d]{opacity:0;transform:translateY(10px) scale(.95)}.process-row-move[data-v-eab6d04d]{transition:transform .4s ease}.cpu-value[data-v-eab6d04d],.memory-value[data-v-eab6d04d]{transition:all .3s ease;padding:2px 6px;border-radius:4px}.cpu-value[data-v-eab6d04d]:hover,.memory-value[data-v-eab6d04d]:hover{background:#f59e0b1a;transform:scale(1.05)}@keyframes value-update-eab6d04d{0%{background:#f59e0b4d}to{background:transparent}}.value-updated[data-v-eab6d04d]{animation:value-update-eab6d04d .6s ease-out}
|
||||
@@ -0,0 +1,2 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/plotly.min-DO11Gp-n.js","assets/_commonjsHelpers-CqkleIqs.js"])))=>i.map(i=>d[i]);
|
||||
import{a as ot,r as u,c as W,E as N,o as nt,S as X,U as O,H as lt,b as d,e as t,g as v,f as A,t as o,F as Y,h as G,I as K,L as Q,j as V,p as i,x as dt}from"./index-C2DY4pTz.js";import{S as P}from"./chartjs-adapter-date-fns.esm-BTd89PGn.js";import{C as j,a as it,L as ct,P as ut,b as mt,c as vt,B as pt,D as xt,p as yt,d as gt,e as ft,A as bt,f as kt,i as ht,T as _t}from"./chart-B185MtDy.js";const Ct={class:"p-6 space-y-6"},wt={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4"},Ft={class:"grid grid-cols-1 lg:grid-cols-2 gap-6"},St={class:"glass-card rounded-[15px] p-6"},Ut={class:"relative h-32 bg-gray-100/50 dark:bg-white/5 rounded-lg p-4 mb-4 chart-container"},Bt={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/50 dark:bg-white/5 backdrop-blur-sm z-20"},Et={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/50 dark:bg-white/5 z-20"},At={key:0,class:"grid grid-cols-2 gap-4 text-sm"},Pt={class:"text-content-primary dark:text-content-primary font-semibold"},Lt={class:"text-content-primary dark:text-content-primary font-semibold"},Mt={class:"text-content-primary dark:text-content-primary font-semibold"},Dt={class:"text-content-primary dark:text-content-primary font-semibold"},Rt={class:"glass-card rounded-[15px] p-6"},Tt={class:"relative h-32 bg-gray-100/50 dark:bg-white/5 rounded-lg p-4 mb-4 chart-container"},zt={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/50 dark:bg-white/5 backdrop-blur-sm z-20"},$t={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/50 dark:bg-white/5 z-20"},It={key:0,class:"grid grid-cols-2 gap-4 text-sm"},Nt={class:"text-content-primary dark:text-content-primary font-semibold"},Ot={class:"text-content-primary dark:text-content-primary font-semibold"},Vt={class:"text-content-primary dark:text-content-primary font-semibold"},jt={class:"text-content-primary dark:text-content-primary font-semibold"},Ht={class:"grid grid-cols-1 lg:grid-cols-2 gap-6"},qt={class:"glass-card rounded-[15px] p-6"},Jt={class:"relative h-48"},Wt={key:0,class:"grid grid-cols-3 gap-4 text-sm mt-4"},Xt={class:"text-center"},Yt={class:"text-content-primary dark:text-content-primary font-semibold"},Gt={class:"text-center"},Kt={class:"font-semibold text-red-500 dark:text-red-400"},Qt={class:"text-center"},Zt={class:"font-semibold text-green-700 dark:text-green-400"},te={class:"glass-card rounded-[15px] p-6"},ee={key:0,class:"space-y-4"},ae={class:"grid grid-cols-2 gap-4 text-sm"},se={class:"text-content-primary dark:text-content-primary font-semibold"},re={class:"text-content-primary dark:text-content-primary font-semibold"},oe={class:"text-content-primary dark:text-content-primary font-semibold"},ne={class:"text-content-primary dark:text-content-primary font-semibold"},le={key:0,class:"pt-4 border-t border-stroke-subtle dark:border-stroke/10"},de={class:"grid grid-cols-2 gap-2 text-sm"},ie={class:"text-content-secondary dark:text-content-muted"},ce={class:"text-content-primary dark:text-content-primary font-semibold ml-1"},ue={class:"glass-card rounded-[15px] p-6"},me={key:0,class:"overflow-x-auto"},ve={class:"w-full text-sm"},pe={class:"text-content-secondary dark:text-content-primary/80 py-2 transition-all duration-300"},xe={class:"text-content-primary dark:text-content-primary font-semibold py-2 transition-all duration-300"},ye={class:"text-center text-orange-500 dark:text-orange-400 py-2 transition-all duration-300"},ge={class:"text-center text-green-700 dark:text-green-400 py-2 transition-all duration-300"},fe={class:"text-right text-content-secondary dark:text-content-primary/80 py-2 transition-all duration-300"},be={key:0,class:"mt-4 text-center text-content-secondary dark:text-content-muted text-sm transition-all duration-300"},ke={key:1,class:"text-center text-content-secondary dark:text-content-muted py-8"},he={key:0,class:"glass-card rounded-[15px] p-8 text-center"},_e={key:1,class:"glass-card rounded-[15px] p-8 text-center"},Ce={class:"text-content-secondary dark:text-content-muted text-sm"},we=ot({name:"SystemStatsView",__name:"SystemStats",setup(Fe){j.register(it,ct,ut,mt,vt,pt,xt,yt,gt,ft,bt,kt,ht,_t);const L=u(null),_=u(!0),C=u(null),s=u(null),b=u(null),x=u([]),M=u(null),p=u({cpuChart:!0,memoryChart:!0,diskChart:!1,processChart:!0}),D=u(!1),R=u(!1),y=u(null),g=u(null),T=u(null),z=u(null),k=u(null),B=W(()=>s.value?{cpuUsage:s.value.cpu.usage_percent,memoryUsage:s.value.memory.usage_percent,diskUsage:s.value.disk.usage_percent,uptime:s.value.system.uptime}:{cpuUsage:0,memoryUsage:0,diskUsage:0,uptime:0}),E=W(()=>x.value.length===0?{cpu:[],memory:[],disk:[],network:[]}:{cpu:x.value.map(a=>a.cpu.usage_percent),memory:x.value.map(a=>a.memory.usage_percent),disk:x.value.map(a=>a.disk.usage_percent),network:x.value.map(a=>a.network.bytes_recv/1024/1024)}),f=a=>{const e=["B","KB","MB","GB","TB"];if(a===0)return"0 B";const r=Math.floor(Math.log(a)/Math.log(1024));return parseFloat((a/Math.pow(1024,r)).toFixed(2)Line truncated
|
||||
@@ -0,0 +1,184 @@
|
||||
import{L as J,a as zl,r as ut,o as Hl,a0 as Ul,Q as Rn,D as ql,b as tt,e as Z,g as Yt,t as Is,w as Kl,v as Vl,Y as Ji,j as Tn,s as jl,p as it,x as Gl}from"./index-C2DY4pTz.js";/**
|
||||
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
||||
* @license MIT
|
||||
*
|
||||
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
||||
* @license MIT
|
||||
*
|
||||
* Originally forked from (with the author's permission):
|
||||
* Fabrice Bellard's javascript vt100 for jslinux:
|
||||
* http://bellard.org/jslinux/
|
||||
* Copyright (c) 2011 Fabrice Bellard
|
||||
*/var oa=Object.defineProperty,Yl=Object.getOwnPropertyDescriptor,Xl=(t,e)=>{for(var i in e)oa(t,i,{get:e[i],enumerable:!0})},ue=(t,e,i,s)=>{for(var r=s>1?void 0:s?Yl(e,i):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(s?o(e,i,r):o(r))||r);return s&&r&&oa(e,i,r),r},P=(t,e)=>(i,s)=>e(i,s,t),Dn="Terminal input",pr={get:()=>Dn,set:t=>Dn=t},An="Too much output to announce, navigate to rows manually to read",vr={get:()=>An,set:t=>An=t};function Jl(t){return t.replace(/\r?\n/g,"\r")}function Zl(t,e){return e?"\x1B[200~"+t+"\x1B[201~":t}function Ql(t,e){t.clipboardData&&t.clipboardData.setData("text/plain",e.selectionText),t.preventDefault()}function eh(t,e,i,s){if(t.stopPropagation(),t.clipboardData){let r=t.clipboardData.getData("text/plain");aa(r,e,i,s)}}function aa(t,e,i,s){t=Jl(t),t=Zl(t,i.decPrivateModes.bracketedPasteMode&&s.rawOptions.ignoreBracketedPasteMode!==!0),i.triggerDataEvent(t,!0),e.value=""}function la(t,e,i){let s=i.getBoundingClientRect(),r=t.clientX-s.left-10,n=t.clientY-s.top-10;e.style.width="20px",e.style.height="20px",e.style.left=`${r}px`,e.style.top=`${n}px`,e.style.zIndex="1000",e.focus()}function Pn(t,e,i,s,r){la(t,e,i),r&&s.rightClickSelect(t),e.value=s.selectionText,e.select()}function Kt(t){return t>65535?(t-=65536,String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):String.fromCharCode(t)}function Ts(t,e=0,i=t.length){let s="";for(let r=e;r<i;++r){let n=t[r];n>65535?(n-=65536,s+=String.fromCharCode((n>>10)+55296)+String.fromCharCode(n%1024+56320)):s+=String.fromCharCode(n)}return s}var th=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,i){let s=e.length;if(!s)return 0;let r=0,n=0;if(this._interim){let o=e.charCodeAt(n++);56320<=o&&o<=57343?i[r++]=(this._interim-55296)*1024+o-56320+65536:(i[r++]=this._interim,i[r++]=o),this._interim=0}for(let o=n;o<s;++o){let l=e.charCodeAt(o);if(55296<=l&&l<=56319){if(++o>=s)return this._interim=l,r;let h=e.charCodeAt(o);56320<=h&&h<=57343?i[r++]=(l-55296)*1024+h-56320+65536:(i[r++]=l,i[r++]=h);continue}l!==65279&&(i[r++]=l)}return r}},ih=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,i){let s=e.length;if(!s)return 0;let r=0,n,o,l,h,a=0,c=0;if(this.interim[0]){let d=!1,m=this.interim[0];m&=(m&224)===192?31:(m&240)===224?15:7;let y=0,k;for(;(k=this.interim[++y]&63)&&y<4;)m<<=6,m|=k;let R=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,D=R-y;for(;c<D;){if(c>=s)return 0;if(k=e[c++],(k&192)!==128){c--,d=!0;break}else this.interim[y++]=k,m<<=6,m|=k&63}d||(R===2?m<128?c--:i[r++]=m:R===3?m<2048||m>=55296&&m<=57343||m===65279||(i[r++]=m):m<65536||m>1114111||(i[r++]=m)),this.interim.fill(0)}let _=s-4,f=c;for(;f<s;){for(;f<_&&!((n=e[f])&128)&&!((o=e[f+1])&128)&&!((l=e[f+2])&128)&&!((h=e[f+3])&128);)i[r++]=n,i[r++]=o,i[r++]=l,i[r++]=h,f+=4;if(n=e[f++],n<128)i[r++]=n;else if((n&224)===192){if(f>=s)return this.interim[0]=n,r;if(o=e[f++],(o&192)!==128){f--;continue}if(a=(n&31)<<6|o&63,a<128){f--;continue}i[r++]=a}else if((n&240)===224){if(f>=s)return this.interim[0]=n,r;if(o=e[f++],(o&192)!==128){f--;continue}if(f>=s)return this.interim[0]=n,this.interim[1]=o,r;if(l=e[f++],(l&192)!==128){f--;continue}if(a=(n&15)<<12|(o&63)<<6|l&63,a<2048||a>=55296&&a<=57343||a===65279)continue;i[r++]=a}else if((n&248)===240){if(f>=s)return this.interim[0]=n,r;if(o=e[f++],(o&192)!==128){f--;continue}if(f>=s)return this.interim[0]=n,this.interim[1]=o,r;if(l=e[f++],(l&192)!==128){f--;continue}if(f>=s)return this.interim[0]=n,this.interim[1]=o,this.interim[2]=l,r;if(h=e[f++],(h&192)!==128){f--;continue}if(a=(n&7)<<18|(o&63)<<12|(l&63)<<6|h&63,a<65536||a>1114111)continue;i[r++]=a}}return r}},ha="",Vt=" ",ji=class ca{constructor(){this.fg=0,this.bg=0,this.extended=new bs}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let e=new ca;return e.fg=this.fg,e.bg=this.bg,e.extended=this.extended.clone(),e}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;defaulLine truncated
|
||||
|
||||
WARNING: This link could potentially be dangerous`)){let i=window.open();if(i){try{i.opener=null}catch{}i.location.href=e}else console.warn("Opening link blocked as opener could not be cleared")}}var Ds=Ie("CharSizeService"),$t=Ie("CoreBrowserService"),gn=Ie("MouseService"),It=Ie("RenderService"),lh=Ie("SelectionService"),pa=Ie("CharacterJoinerService"),bi=Ie("ThemeService"),va=Ie("LinkProviderService"),hh=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?In.isErrorNoTelemetry(e)?new In(e.message+`
|
||||
|
||||
`+e.stack):new Error(e.message+`
|
||||
|
||||
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(i=>{i(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},ch=new hh;function hs(t){dh(t)||ch.onUnexpectedError(t)}var Sr="Canceled";function dh(t){return t instanceof uh?!0:t instanceof Error&&t.name===Sr&&t.message===Sr}var uh=class extends Error{constructor(){super(Sr),this.name=this.message}};function _h(t){return new Error(`Illegal argument: ${t}`)}var In=class br extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof br)return e;let i=new br;return i.message=e.message,i.stack=e.stack,i}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}},yr=class ma extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,ma.prototype)}};function Xe(t,e=0){return t[t.length-(1+e)]}var fh;(t=>{function e(n){return n<0}t.isLessThan=e;function i(n){return n<=0}t.isLessThanOrEqual=i;function s(n){return n>0}t.isGreaterThan=s;function r(n){return n===0}t.isNeitherLessOrGreaterThan=r,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(fh||={});function gh(t,e){let i=this,s=!1,r;return function(){return s||(s=!0,e||(r=t.apply(i,arguments))),r}}var wa;(t=>{function e(S){return S&&typeof S=="object"&&typeof S[Symbol.iterator]=="function"}t.is=e;let i=Object.freeze([]);function s(){return i}t.empty=s;function*r(S){yield S}t.single=r;function n(S){return e(S)?S:r(S)}t.wrap=n;function o(S){return S||i}t.from=o;function*l(S){for(let L=S.length-1;L>=0;L--)yield S[L]}t.reverse=l;function h(S){return!S||S[Symbol.iterator]().next().done===!0}t.isEmpty=h;function a(S){return S[Symbol.iterator]().next().value}t.first=a;function c(S,L){let B=0;for(let $ of S)if(L($,B++))return!0;return!1}t.some=c;function _(S,L){for(let B of S)if(L(B))return B}t.find=_;function*f(S,L){for(let B of S)L(B)&&(yield B)}t.filter=f;function*d(S,L){let B=0;for(let $ of S)yield L($,B++)}t.map=d;function*m(S,L){let B=0;for(let $ of S)yield*L($,B++)}t.flatMap=m;function*y(...S){for(let L of S)yield*L}t.concat=y;function k(S,L,B){let $=B;for(let U of S)$=L($,U);return $}t.reduce=k;function*R(S,L,B=S.length){for(L<0&&(L+=S.length),B<0?B+=S.length:B>S.length&&(B=S.length);L<B;L++)yield S[L]}t.slice=R;function D(S,L=Number.POSITIVE_INFINITY){let B=[];if(L===0)return[B,S];let $=S[Symbol.iterator]();for(let U=0;U<L;U++){let Y=$.next();if(Y.done)return[B,t.empty()];B.push(Y.value)}return[B,{[Symbol.iterator](){return $}}]}t.consume=D;async function T(S){let L=[];for await(let B of S)L.push(B);return Promise.resolve(L)}t.asyncToArray=T})(wa||={});function oi(t){if(wa.is(t)){let e=[];for(let i of t)if(i)try{i.dispose()}catch(s){e.push(s)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function ph(...t){return re(()=>oi(t))}function re(t){return{dispose:gh(()=>{t()})}}var Sa=class ba{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{oi(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?ba.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),void 0)}};Sa.DISABLE_DISPOSED_WARNING=!1;var jt=Sa,j=class{constructor(){this._store=new jt,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};j.None=Object.freeze({dispose(){}});var Si=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e}},At=typeof window=="object"?window:globalThis,Cr=class xr{constructor(e){this.element=e,this.next=xr.Undefined,this.prev=xr.Undefined}};Cr.Undefined=new Cr(void 0);var oe=Cr,On=class{constructor(){this._first=oe.Undefined,this._last=oe.Undefined,this._size=0}get size(){return this._size}isEmpty()
Line truncated
|
||||
`).slice(2).join(`
|
||||
`))}},Ch=class extends Error{constructor(t,e){super(t),this.name="ListenerLeakError",this.stack=e}},xh=class extends Error{constructor(t,e){super(t),this.name="ListenerRefusalError",this.stack=e}},kh=0,Fs=class{constructor(e){this.value=e,this.id=kh++}},Lh=2,Bh,A=class{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new bh(e?.onListenerError??hs,this._options?.leakWarningThreshold??Sh):void 0,this._perfMon=this._options?._profName?new wh(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,i,s)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let l=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(l);let h=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],a=new xh(`${l}. HINT: Stack shows most frequent listener (${h[1]}-times)`,h[0]);return(this._options?.onListenerError||hs)(a),j.None}if(this._disposed)return j.None;i&&(e=e.bind(i));let r=new Fs(e),n;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=yh.create(),n=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof Fs?(this._deliveryQueue??=new Eh,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;let o=re(()=>{n?.(),this._removeListener(r)});return s instanceof jt?s.add(o):Array.isArray(s)&&s.push(o),o},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let i=this._listeners,s=i.indexOf(e);if(s===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,i[s]=void 0;let r=this._deliveryQueue.current===this;if(this._size*Lh<=i.length){let n=0;for(let o=0;o<i.length;o++)i[o]?i[n++]=i[o]:r&&(this._deliveryQueue.end--,n<this._deliveryQueue.i&&this._deliveryQueue.i--);i.length=n}}_deliver(e,i){if(!e)return;let s=this._options?.onListenerError||hs;if(!s){e.value(i);return}try{e.value(i)}catch(r){s(r)}}_deliverQueue(e){let i=e.current._listeners;for(;e.i<e.end;)this._deliver(i[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Fs)this._deliver(this._listeners,e);else{let i=this._deliveryQueue;i.enqueue(this,e,this._listeners.length),this._deliverQueue(i)}this._perfMon?.stop()}hasListeners(){return this._size>0}},Eh=class{constructor(){this.i=-1,this.end=0}enqueue(e,i,s){this.i=0,this.end=s,this.current=e,this.value=i}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Br=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new A,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new A,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,i){if(this.getZoomLevel(i)===e)return;let s=this.getWindowId(i);this.mapWindowIdToZoomLevel.set(s,e),this._onDidChangeZoomLevel.fire(s)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,i){this.mapWindowIdToZoomFactor.set(this.getWindowId(i),e)}setFullscreen(e,i){if(this.isFullscreen(i)===e)return;let s=this.getWindowId(i);this.mapWindowIdToFullScreen.set(s,e),this._onDidChangeFullscreen.fire(s)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};Br.INSTANCE=new Br;var pn=Br;function Mh(t,e,i){typeof e=="string"&&(e=t.matchMedia(e)),e.addEventListener("change",i)}pn.INSTANCE.onDidChangeZoomLevel;function Rh(t){return pn.INSTANCE.getZoomFactor(t)}pn.INSTANCE.onDidChangeFullscreen;var yi=typeof navigator=="object"?navigator.userAgent:"",Er=yi.indexOf("Firefox")>=0,Th=yi.indexOf("AppleWebKit")>=0,vn=yi.indexOf("Chrome")>=0,Dh=!vn&&yi.indexOf("Safari")>=0;yi.indexOf("Electron/")>=0;yi.indexOf("Android")>=0;var Ns=!1;if(typeof At.matchMedia=="function"){let t=At.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=At.matchMedia("(display-mode: fullscreen)");Ns=t.matches,Mh(At,t,({matches:i})=>{Ns&&e.matches||(Ns=
Line truncated
|
||||
`)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(c=>this._handleScroll(c)))}scrollLines(e){let i=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:i.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,i){i&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!i,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:this._optionsService.rawOptions.overviewRuler?.width||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let i=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),s=i-this._bufferService.buffer.ydisp;s!==0&&(this._latestYDisp=i,this._onRequestScrollLines.fire(s)),this._isHandlingScroll=!1}};$r=ue([P(2,Ve),P(3,$t),P(4,_a),P(5,bi),P(6,je),P(7,It)],$r);var Ir=class extends j{constructor(e,i,s,r,n){super(),this._screenElement=e,this._bufferService=i,this._coreBrowserService=s,this._decorationService=r,this._renderService=n,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(o=>this._removeDecoration(o))),this._register(re(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){let i=this._coreBrowserService.mainDocument.createElement("div");i.classList.add("xterm-decoration"),i.classList.toggle("xterm-decoration-top-layer",e?.options?.layer==="top"),i.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,i.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,i.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,i.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let s=e.options.x??0;return s&&s>this._bufferService.cols&&(i.style.display="none"),this._refreshXPosition(e,i),i}_refreshStyle(e){let i=e.marker.line-this._bufferService.buffers.active.ydisp;if(i<0||i>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let s=this._decorationElements.get(e);s||(s=this._createElement(e),e.element=s,this._decorationElements.set(e,s),this._container.appendChild(s),e.onDispose(()=>{this._decorationElements.delete(e),s.remove()})),s.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(s.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,s.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,s.style.top=`${i*this._renderServiceLine truncated
|
||||
`,t.VT="\v",t.FF="\f",t.CR="\r",t.SO="",t.SI="",t.DLE="",t.DC1="",t.DC2="",t.DC3="",t.DC4="",t.NAK="",t.SYN="",t.ETB="",t.CAN="",t.EM="",t.SUB="",t.ESC="\x1B",t.FS="",t.GS="",t.RS="",t.US="",t.SP=" ",t.DEL=""))(E||={});var us;(t=>(t.PAD="",t.HOP="",t.BPH="",t.NBH="",t.IND="",t.NEL="
",t.SSA="",t.ESA="",t.HTS="",t.HTJ="",t.VTS="",t.PLD="",t.PLU="",t.RI="",t.SS2="",t.SS3="",t.DCS="",t.PU1="",t.PU2="",t.STS="",t.CCH="",t.MW="",t.SPA="",t.EPA="",t.SOS="",t.SGCI="",t.SCI="",t.CSI="",t.ST="",t.OSC="",t.PM="",t.APC=""))(us||={});var Pa;(t=>t.ST=`${E.ESC}\\`)(Pa||={});var Or=class{constructor(e,i,s,r,n,o){this._textarea=e,this._compositionView=i,this._bufferService=s,this._optionsService=r,this._coreService=n,this._renderService=o,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){let i={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let s;i.start+=this._dataAlreadySent.length,this._isComposing?s=this._textarea.value.substring(i.start,this._compositionPosition.start):s=this._textarea.value.substring(i.start),s.length>0&&this._coreService.triggerDataEvent(s,!0)}},0)}else{this._isSendingComposition=!1;let i=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(i,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let i=this._textarea.value,s=i.replace(e,"");this._dataAlreadySent=s,i.length>e.length?this._coreService.triggerDataEvent(s,!0):i.length<e.length?this._coreService.triggerDataEvent(`${E.DEL}`,!0):i.length===e.length&&i!==e&&this._coreService.triggerDataEvent(i,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let i=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),s=this._renderService.dimensions.css.cell.height,r=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,n=i*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=n+"px",this._compositionView.style.top=r+"px",this._compositionView.style.height=s+"px",this._compositionView.style.lineHeight=s+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let o=this._compositionView.getBoundingClientRect();this._textarea.style.left=n+"px",this._textarea.style.top=r+"px",this._textarea.style.width=Math.max(o.width,1)+"px",this._textarea.style.height=Math.max(o.height,1)+"px",this._textarea.style.lineHeight=o.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};Or=ue([P(2,Ve),P(3,je),P(4,li),P(5,It)],Or);var Re=0,Te=0,De=0,ce=0,Zn={css:"#00000000",rgba:0},Se;(t=>{function e(r,n,o,l){return l!==void 0?`#${Xt(r)}${Xt(n)}${Xt(o)}${Xt(l)}`:`#${Xt(r)}${Xt(n)}${Xt(o)}`}t.toCss=e;function i(r,n,o,l=255){return(r<<24|n<<16|o<<8|l)>>>0}t.toRgba=i;function s(r,n,o,l){return{css:t.toCss(r,n,o,l),rgba:t.toRgba(r,n,o,l)}}t.toColor=s})(Se||={});var ie;(t=>{function e(h,a){if(ce=(a.rgba&255)/255,ce===1)return{css:a.css,rgba:a.rgba};let c=a.rgba>>24&255,_=a.rgba>>16&255,f=a.rgba>>8&255,d=h.rgba>>24&255,m=h.rgba>>16&255,y=h.rgba>>8&255;Re=d+Math.round((c-d)*ce),Te=m+Math.round((_-m)*ce),De=y+Math.round((f-y)*ce);let k=Se.toCss(Re,Te,De),R=Se.toRgba(Re,Te,De);return{css:k,rgba:R}}t.blend=e;function i(h){return(h.rgba&255)===255}t.isOpaque=i;function s(h,a,c){let _=_s.ensureContrastRatio(h.rgba,a.rgba,c);if(_)return Se.toColor(_>>24&255,_>>16&255,_>>8&255)}t.ensureContrastRatio=s;function r(h){let a=(h.rgba|255)>>>0;return[Re,Te,De]=_s.toChannels(a),{css:Se.toCss(Re,Te,De),rgba:a}}t.opaque=r;function n(h,a){return ce=Math.round(a*255),[Re,Te,De]=_s.toChannels(h.rgba),{css:Se.toCss(Re,Te,De,ce),rgba:Se.toRgba(Re,Te,De,ce)}}t.opacity=n;function o(h,a){return ce=h.rgba&255,n(h,ce*a/255)}t.multiplyOpacity=o;function l(h){return[h.rgba
Line truncated
|
||||
`:`
|
||||
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),Cn&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let i=this._getMouseBufferCoords(e),s=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!s||!r||!i?!1:this._areCoordsInSelection(i,s,r)}isCellInSelection(e,i){let s=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!s||!r?!1:this._areCoordsInSelection([e,i],s,r)}_areCoordsInSelection(e,i,s){return e[1]>i[1]&&e[1]<s[1]||i[1]===s[1]&&e[1]===i[1]&&e[0]>=i[0]&&e[0]<s[0]||i[1]<s[1]&&e[1]===s[1]&&e[0]<s[0]||i[1]<s[1]&&e[1]===i[1]&&e[0]>=i[0]}_selectWordAtCursor(e,i){let s=this._linkifier.currentLink?.link?.range;if(s)return this._model.selectionStart=[s.start.x-1,s.start.y-1],this._model.selectionStartLength=to(s,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let r=this._getMouseBufferCoords(e);return r?(this._selectWordAt(r,i),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,i){this._model.clearSelection(),e=Math.max(e,0),i=Math.min(i,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,i],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let i=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(i)return i[0]--,i[1]--,i[1]+=this._bufferService.buffer.ydisp,i}_getMouseEventScrollAmount(e){let i=yn(this._coreBrowserService.window,e,this._screenElement)[1],s=this._renderService.dimensions.css.canvas.height;return i>=0&&i<=s?0:(i>s&&(i-=s),i=Math.min(Math.max(i,-Us),Us),i/=Us,i/Math.abs(i)+Math.round(i*(sd-1)))}shouldForceSelection(e){return xs?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),rd)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let i=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);i&&i.length!==this._model.selectionStart[0]&&i.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let i=this._getMouseBufferCoords(e);i&&(this._activeSelectionMode=2,this._selectLineAt(i[1]))}shouldColumnSelect(e){return e.altKey&&!(xs&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let i=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEven
Line truncated
|
||||
`))),this._register(this._terminal.onA11yTab(n=>this._handleTab(n))),this._register(this._terminal.onKey(n=>this._handleKey(n.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(H(r,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(re(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(t){for(let e=0;e<t;e++)this._handleChar(" ")}_handleChar(t){this._liveRegionLineCount<ko+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==t&&(this._charsToAnnounce+=t):this._charsToAnnounce+=t,t===`
|
||||
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===ko+1&&(this._liveRegion.textContent+=vr.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(t){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(t)||this._charsToConsume.push(t)}_refreshRows(t,e){this._liveRegionDebouncer.refresh(t,e,this._terminal.rows)}_renderRows(t,e){let i=this._terminal.buffer,s=i.lines.length.toString();for(let r=t;r<=e;r++){let n=i.lines.get(i.ydisp+r),o=[],l=n?.translateToString(!0,void 0,void 0,o)||"",h=(i.ydisp+r+1).toString(),a=this._rowElements[r];a&&(l.length===0?(a.textContent=" ",this._rowColumns.set(a,[0,1])):(a.textContent=l,this._rowColumns.set(a,o)),a.setAttribute("aria-posinset",h),a.setAttribute("aria-setsize",s),this._alignRowWidth(a))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(t,e){let i=t.target,s=this._rowElements[e===0?1:this._rowElements.length-2],r=i.getAttribute("aria-posinset"),n=e===0?"1":`${this._terminal.buffer.lines.length}`;if(r===n||t.relatedTarget!==s)return;let o,l;if(e===0?(o=i,l=this._rowElements.pop(),this._rowContainer.removeChild(l)):(o=this._rowElements.shift(),l=i,this._rowContainer.removeChild(o)),o.removeEventListener("focus",this._topBoundaryFocusListener),l.removeEventListener("focus",this._bottomBoundaryFocusListener),e===0){let h=this._createAccessibilityTreeNode();this._rowElements.unshift(h),this._rowContainer.insertAdjacentElement("afterbegin",h)}else{let h=this._createAccessibilityTreeNode();this._rowElements.push(h),this._rowContainer.appendChild(h)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(e===0?-1:1),this._rowElements[e===0?1:this._rowElements.length-2].focus(),t.preventDefault(),t.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let t=this._coreBrowserService.mainDocument.getSelection();if(!t)return;if(t.isCollapsed){this._rowContainer.contains(t.anchorNode)&&this._terminal.clearSelection();return}if(!t.anchorNode||!t.focusNode){console.error("anchorNode and/or focusNode are null");return}let e={node:t.anchorNode,offset:t.anchorOffset},i={node:t.focusNode,offset:t.focusOffset};if((e.node.compareDocumentPosition(i.node)&Node.DOCUMENT_POSITION_PRECEDING||e.node===i.node&&e.offset>i.offset)&&([e,i]=[i,e]),e.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(e={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(e.node))return;let s=this._rowElements.slice(-1)[0];if(i.node.compareDocumentPosition(s)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(i={node:s,offset:s.textContent?.length??0}),!this._rowContainer.contains(i.node))return;let r=({node:l,offset:h})=>{let a=l instanceof Text?l.parentNode:l,c=parseInt(a?.getAttribute("aria-posinset"),10)-1;if(isNaN(c))return console.warn("row is invalid. Race condition?"),null;let _=this._rowColumns.get(a);if(!_)return console.warn("columns is null. Race condition?"),null;let f=h<_.length?_[h]:_.slice(-1)[0]+1;return f>=this._terminal.cols&&(++c,f=0),{row:c,column:f}},n=r(e),o=r(i);if(!(!n||!o)){if(n.row>o.row||n.row===o.row&&n.column>=o.column)throw new Error("invalid range");this._terminal.select(n.column,n.row,(o.row-n.row)*this._terminal.cols-n.column+o.column)}}_handleResize(t){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let e=this._rowContainer.children.length;e<this._terminal.rows;e++)this._rowElements[e]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[e]);for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let t=this._coreBrowserService.mainDocument.createElement("div");return t.setAttribute("role","listitem"),t.tabIndex=-1,this._refreshRowDimensions(t),t}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let t=0;t<this._terminal.rows;t++)this._refreshRowDimensions(this._rowElements[t]),this._alignRowWidth(this._rowElements[t])}}_refreshRowDimensions(t){t.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(t){t.style.transform="";let e=t.getBoundingClientRect().width,i=this._rowColumns.get(t)?.sli
Line truncated
|
||||
`,e)}paste(t){this._core.paste(t)}refresh(t,e){this._verifyIntegers(t,e),this._core.refresh(t,e)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(t){this._addonManager.loadAddon(this,t)}static get strings(){return{get promptLabel(){return pr.get()},set promptLabel(t){pr.set(t)},get tooMuchOutput(){return vr.get()},set tooMuchOutput(t){vr.set(t)}}}_verifyIntegers(...t){for(ft of t)if(ft===1/0||isNaN(ft)||ft%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...t){for(ft of t)if(ft&&(ft===1/0||isNaN(ft)||ft%1!==0||ft<0))throw new Error("This API only accepts positive integers")}};/**
|
||||
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
||||
* @license MIT
|
||||
*
|
||||
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
||||
* @license MIT
|
||||
*
|
||||
* Originally forked from (with the author's permission):
|
||||
* Fabrice Bellard's javascript vt100 for jslinux:
|
||||
* http://bellard.org/jslinux/
|
||||
* Copyright (c) 2011 Fabrice Bellard
|
||||
*/var ru=2,nu=1,ou=class{activate(t){this._terminal=t}dispose(){}fit(){let t=this.proposeDimensions();if(!t||!this._terminal||isNaN(t.cols)||isNaN(t.rows))return;let e=this._terminal._core;(this._terminal.rows!==t.rows||this._terminal.cols!==t.cols)&&(e._renderService.clear(),this._terminal.resize(t.cols,t.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let t=this._terminal._core._renderService.dimensions;if(t.css.cell.width===0||t.css.cell.height===0)return;let e=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,i=window.getComputedStyle(this._terminal.element.parentElement),s=parseInt(i.getPropertyValue("height")),r=Math.max(0,parseInt(i.getPropertyValue("width"))),n=window.getComputedStyle(this._terminal.element),o={top:parseInt(n.getPropertyValue("padding-top")),bottom:parseInt(n.getPropertyValue("padding-bottom")),right:parseInt(n.getPropertyValue("padding-right")),left:parseInt(n.getPropertyValue("padding-left"))},l=o.top+o.bottom,h=o.right+o.left,a=s-l,c=r-h-e;return{cols:Math.max(ru,Math.floor(c/t.css.cell.width)),rows:Math.max(nu,Math.floor(a/t.css.cell.height))}}};/**
|
||||
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
||||
* @license MIT
|
||||
*
|
||||
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
||||
* @license MIT
|
||||
*
|
||||
* Originally forked from (with the author's permission):
|
||||
* Fabrice Bellard's javascript vt100 for jslinux:
|
||||
* http://bellard.org/jslinux/
|
||||
* Copyright (c) 2011 Fabrice Bellard
|
||||
*/var au=class{constructor(t,e,i,s={}){this._terminal=t,this._regex=e,this._handler=i,this._options=s}provideLinks(t,e){let i=hu.computeLink(t,this._regex,this._terminal,this._handler);e(this._addCallbacks(i))}_addCallbacks(t){return t.map(e=>(e.leave=this._options.leave,e.hover=(i,s)=>{if(this._options.hover){let{range:r}=e;this._options.hover(i,s,r)}},e))}};function lu(t){try{let e=new URL(t),i=e.password&&e.username?`${e.protocol}//${e.username}:${e.password}@${e.host}`:e.username?`${e.protocol}//${e.username}@${e.host}`:`${e.protocol}//${e.host}`;return t.toLocaleLowerCase().startsWith(i.toLocaleLowerCase())}catch{return!1}}var hu=class gs{static computeLink(e,i,s,r){let n=new RegExp(i.source,(i.flags||"")+"g"),[o,l]=gs._getWindowedLineStrings(e-1,s),h=o.join(""),a,c=[];for(;a=n.exec(h);){let _=a[0];if(!lu(_))continue;let[f,d]=gs._mapStrIdx(s,l,0,a.index),[m,y]=gs._mapStrIdx(s,f,d,_.length);if(f===-1||d===-1||m===-1||y===-1)continue;let k={start:{x:d+1,y:f+1},end:{x:y,y:m+1}};c.push({range:k,text:_,activate:r})}return c}static _getWindowedLineStrings(e,i){let s,r=e,n=e,o=0,l="",h=[];if(s=i.buffer.active.getLine(e)){let a=s.translateToString(!0);if(s.isWrapped&&a[0]!==" "){for(o=0;(s=i.buffer.active.getLine(--r))&&o<2048&&(l=s.translateToString(!0),o+=l.length,h.push(l),!(!s.isWrapped||l.indexOf(" ")!==-1)););h.reverse()}for(h.push(a),o=0;(s=i.buffer.active.getLine(++n))&&s.isWrapped&&o<2048&&(l=s.translateToString(!0),o+=l.length,h.push(l),l.indexOf(" ")===-1););}return[h,r]}static _mapStrIdx(e,i,s,r){let n=e.buffer.active,o=n.getNullCell(),l=s;for(;r;){let h=n.getLine(i);if(!h)return[-1,-1];for(let a=l;a<h.length;++a){h.getCell(a,o);let c=o.getChars();if(o.getWidth()&&(r-=c.length||1,a===h.length-1&&c==="")){let _=n.getLine(i+1);_&&_.isWrapped&&(_.getCell(0,o),o.getWidth()===2&&(r+=1))}if(r<0)return[i,a]}i++,l=0}return[i,l]}},cu=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function du(t,e){let i=window.open();if(i){try{i.opener=null}catch{}i.location.href=e}else console.warn("Opening link blocked as opener could not be cleared")}var uu=class{constructor(t=du,e={}){this._handler=t,this._options=e}activate(t){this._terminal=t;let e=this._options,i=e.urlRegex||cu;this._linkProvider=this._terminal.registerLinkProvider(new au(this._terminal,i,this._handler,e))}dispose(){this._linkProvider?.dispose()}};/**
|
||||
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
||||
* @license MIT
|
||||
*
|
||||
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
||||
* @license MIT
|
||||
*
|
||||
* Originally forked from (with the author's permission):
|
||||
* Fabrice Bellard's javascript vt100 for jslinux:
|
||||
* http://bellard.org/jslinux/
|
||||
* Copyright (c) 2011 Fabrice Bellard
|
||||
*/var _u=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?Bo.isErrorNoTelemetry(t)?new Bo(t.message+`
|
||||
|
||||
`+t.stack):new Error(t.message+`
|
||||
|
||||
`+t.stack):t},0)}}addListener(t){return this.listeners.push(t),()=>{this._removeListener(t)}}emit(t){this.listeners.forEach(e=>{e(t)})}_removeListener(t){this.listeners.splice(this.listeners.indexOf(t),1)}setUnexpectedErrorHandler(t){this.unexpectedErrorHandler=t}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}},fu=new _u;function Xs(t){gu(t)||fu.onUnexpectedError(t)}var Qr="Canceled";function gu(t){return t instanceof pu?!0:t instanceof Error&&t.name===Qr&&t.message===Qr}var pu=class extends Error{constructor(){super(Qr),this.name=this.message}},Bo=class en extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof en)return e;let i=new en;return i.message=e.message,i.stack=e.stack,i}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}},vu;(t=>{function e(n){return n<0}t.isLessThan=e;function i(n){return n<=0}t.isLessThanOrEqual=i;function s(n){return n>0}t.isGreaterThan=s;function r(n){return n===0}t.isNeitherLessOrGreaterThan=r,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(vu||={});function mu(t,e){let i=this,s=!1,r;return function(){return s||(s=!0,e||(r=t.apply(i,arguments))),r}}var Xa;(t=>{function e(S){return S&&typeof S=="object"&&typeof S[Symbol.iterator]=="function"}t.is=e;let i=Object.freeze([]);function s(){return i}t.empty=s;function*r(S){yield S}t.single=r;function n(S){return e(S)?S:r(S)}t.wrap=n;function o(S){return S||i}t.from=o;function*l(S){for(let L=S.length-1;L>=0;L--)yield S[L]}t.reverse=l;function h(S){return!S||S[Symbol.iterator]().next().done===!0}t.isEmpty=h;function a(S){return S[Symbol.iterator]().next().value}t.first=a;function c(S,L){let B=0;for(let $ of S)if(L($,B++))return!0;return!1}t.some=c;function _(S,L){for(let B of S)if(L(B))return B}t.find=_;function*f(S,L){for(let B of S)L(B)&&(yield B)}t.filter=f;function*d(S,L){let B=0;for(let $ of S)yield L($,B++)}t.map=d;function*m(S,L){let B=0;for(let $ of S)yield*L($,B++)}t.flatMap=m;function*y(...S){for(let L of S)yield*L}t.concat=y;function k(S,L,B){let $=B;for(let U of S)$=L($,U);return $}t.reduce=k;function*R(S,L,B=S.length){for(L<0&&(L+=S.length),B<0?B+=S.length:B>S.length&&(B=S.length);L<B;L++)yield S[L]}t.slice=R;function D(S,L=Number.POSITIVE_INFINITY){let B=[];if(L===0)return[B,S];let $=S[Symbol.iterator]();for(let U=0;U<L;U++){let Y=$.next();if(Y.done)return[B,t.empty()];B.push(Y.value)}return[B,{[Symbol.iterator](){return $}}]}t.consume=D;async function T(S){let L=[];for await(let B of S)L.push(B);return Promise.resolve(L)}t.asyncToArray=T})(Xa||={});function Hi(t){if(Xa.is(t)){let e=[];for(let i of t)if(i)try{i.dispose()}catch(s){e.push(s)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function Ja(...t){return Ci(()=>Hi(t))}function Ci(t){return{dispose:mu(()=>{t()})}}var Za=class Qa{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Hi(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Qa.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),void 0)}};Za.DISABLE_DISPOSED_WARNING=!1;var xn=Za,Gt=class{constructor(){this._store=new xn,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Gt.None=Object.freeze({dispose(){}});var Bs=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e}},wu=globalThis.performance&&typeof globalThis.performance.now=="function",Su=class el{static create(e){return new el(e)}constructor(e){this._now=wu&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},kn;(t=>{t.None=()=>Gt.None;function e(v,u){return _(v,()=>{},0,void 0,!0,voi
Line truncated
|
||||
`).slice(2).join(`
|
||||
`))}},ku=class extends Error{constructor(e,i){super(e),this.name="ListenerLeakError",this.stack=i}},Lu=class extends Error{constructor(e,i){super(e),this.name="ListenerRefusalError",this.stack=i}},Bu=0,Js=class{constructor(e){this.value=e,this.id=Bu++}},Eu=2,Mu,vt=class{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new Cu(e?.onListenerError??Xs,this._options?.leakWarningThreshold??yu):void 0,this._perfMon=this._options?._profName?new bu(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,i,s)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let l=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(l);let h=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],a=new Lu(`${l}. HINT: Stack shows most frequent listener (${h[1]}-times)`,h[0]);return(this._options?.onListenerError||Xs)(a),Gt.None}if(this._disposed)return Gt.None;i&&(e=e.bind(i));let r=new Js(e),n;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=xu.create(),n=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof Js?(this._deliveryQueue??=new Ru,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;let o=Ci(()=>{n?.(),this._removeListener(r)});return s instanceof xn?s.add(o):Array.isArray(s)&&s.push(o),o},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let i=this._listeners,s=i.indexOf(e);if(s===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,i[s]=void 0;let r=this._deliveryQueue.current===this;if(this._size*Eu<=i.length){let n=0;for(let o=0;o<i.length;o++)i[o]?i[n++]=i[o]:r&&(this._deliveryQueue.end--,n<this._deliveryQueue.i&&this._deliveryQueue.i--);i.length=n}}_deliver(e,i){if(!e)return;let s=this._options?.onListenerError||Xs;if(!s){e.value(i);return}try{e.value(i)}catch(r){s(r)}}_deliverQueue(e){let i=e.current._listeners;for(;e.i<e.end;)this._deliver(i[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Js)this._deliver(this._listeners,e);else{let i=this._deliveryQueue;i.enqueue(this,e,this._listeners.length),this._deliverQueue(i)}this._perfMon?.stop()}hasListeners(){return this._size>0}},Ru=class{constructor(){this.i=-1,this.end=0}enqueue(t,e,i){this.i=0,this.end=i,this.current=t,this.value=e}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},rl=Object.freeze(function(t,e){let i=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(i)}}}),Tu;(t=>{function e(i){return i===t.None||i===t.Cancelled||i instanceof Du?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}t.isCancellationToken=e,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:kn.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:rl})})(Tu||={});var Du=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?rl:(this._emitter||(this._emitter=new vt),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},pi="en",Zs=!1,rs,ps=pi,Eo=pi,Au,Rt,si=globalThis,Qe;typeof si.vscode<"u"&&typeof si.vscode.process<"u"?Qe=si.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Qe=process);var Pu=typeof Qe?.versions?.electron=="string",$u=Pu&&Qe?.type==="renderer";if(typeof Qe=="object"){Qe.platform,Qe.platform,Zs=Qe.platform==="linux",Zs&&Qe.env.SNAP&&Qe.env.SNAP_REVISION,Qe.env.CI||Qe.env.BUILD_ARTIFACTSTAGINGDIRECTORY,rs=pi,ps=pi;let t=Qe.env.VSCODE_NLS_CONFIG;if(t)try{let e=JSON.parse(t);rs=e.userLocale,Eo=e.osLocale,ps=e.resolvedLanguage||pi,Au=e.languagePack?.translationsConfigFile}catch{}}else typeof navigator=="object"&&!$u?(Rt=navigator.userAgent,Rt.indexOf("Windows")>=0,Rt.indexOf("Macintosh")>=0,(Rt.indexOf("Macintosh")>=0||Rt.indexOf("iP
Line truncated
|
||||
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
||||
* @license MIT
|
||||
*
|
||||
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
||||
* @license MIT
|
||||
*
|
||||
* Originally forked from (with the author's permission):
|
||||
* Fabrice Bellard's javascript vt100 for jslinux:
|
||||
* http://bellard.org/jslinux/
|
||||
* Copyright (c) 2011 Fabrice Bellard
|
||||
*/var Qs=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],Vu=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],xe;function ju(t,e){let i=0,s=e.length-1,r;if(t<e[0][0]||t>e[s][1])return!1;for(;s>=i;)if(r=i+s>>1,t>e[r][1])i=r+1;else if(t<e[r][0])s=r-1;else return!0;return!1}var Gu=class{constructor(){if(this.version="6",!xe){xe=new Uint8Array(65536),xe.fill(1),xe[0]=0,xe.fill(0,1,32),xe.fill(0,127,160),xe.fill(2,4352,4448),xe[9001]=2,xe[9002]=2,xe.fill(2,11904,42192),xe[12351]=1,xe.fill(2,44032,55204),xe.fill(2,63744,64256),xe.fill(2,65040,65050),xe.fill(2,65072,65136),xe.fill(2,65280,65377),xe.fill(2,65504,65511);for(let e=0;e<Qs.length;++e)xe.fill(0,Qs[e][0],Qs[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?xe[e]:ju(e,Vu)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,i){let s=this.wcwidth(e),r=s===0&&i!==0;if(r){let n=Ms.extractWidth(i);n===0?r=!1:n>s&&(s=n)}return Ms.createPropertyValue(0,s,r)}},Yu=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?Ro.isErrorNoTelemetry(t)?new Ro(t.message+`
|
||||
|
||||
`+t.stack):new Error(t.message+`
|
||||
|
||||
`+t.stack):t},0)}}addListener(t){return this.listeners.push(t),()=>{this._removeListener(t)}}emit(t){this.listeners.forEach(e=>{e(t)})}_removeListener(t){this.listeners.splice(this.listeners.indexOf(t),1)}setUnexpectedErrorHandler(t){this.unexpectedErrorHandler=t}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}},Xu=new Yu;function er(t){Ju(t)||Xu.onUnexpectedError(t)}var rn="Canceled";function Ju(t){return t instanceof Zu?!0:t instanceof Error&&t.name===rn&&t.message===rn}var Zu=class extends Error{constructor(){super(rn),this.name=this.message}},Ro=class nn extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof nn)return e;let i=new nn;return i.message=e.message,i.stack=e.stack,i}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}};function Qu(t,e){let i=this,s=!1,r;return function(){return s||(s=!0,e||(r=t.apply(i,arguments))),r}}var e_;(t=>{function e(n){return n<0}t.isLessThan=e;function i(n){return n<=0}t.isLessThanOrEqual=i;function s(n){return n>0}t.isGreaterThan=s;function r(n){return n===0}t.isNeitherLessOrGreaterThan=r,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(e_||={});var ol;(t=>{function e(S){return S&&typeof S=="object"&&typeof S[Symbol.iterator]=="function"}t.is=e;let i=Object.freeze([]);function s(){return i}t.empty=s;function*r(S){yield S}t.single=r;function n(S){return e(S)?S:r(S)}t.wrap=n;function o(S){return S||i}t.from=o;function*l(S){for(let L=S.length-1;L>=0;L--)yield S[L]}t.reverse=l;function h(S){return!S||S[Symbol.iterator]().next().done===!0}t.isEmpty=h;function a(S){return S[Symbol.iterator]().next().value}t.first=a;function c(S,L){let B=0;for(let $ of S)if(L($,B++))return!0;return!1}t.some=c;function _(S,L){for(let B of S)if(L(B))return B}t.find=_;function*f(S,L){for(let B of S)L(B)&&(yield B)}t.filter=f;function*d(S,L){let B=0;for(let $ of S)yield L($,B++)}t.map=d;function*m(S,L){let B=0;for(let $ of S)yield*L($,B++)}t.flatMap=m;function*y(...S){for(let L of S)yield*L}t.concat=y;function k(S,L,B){let $=B;for(let U of S)$=L($,U);return $}t.reduce=k;function*R(S,L,B=S.length){for(L<0&&(L+=S.length),B<0?B+=S.length:B>S.length&&(B=S.length);L<B;L++)yield S[L]}t.slice=R;function D(S,L=Number.POSITIVE_INFINITY){let B=[];if(L===0)return[B,S];let $=S[Symbol.iterator]();for(let U=0;U<L;U++){let Y=$.next();if(Y.done)return[B,t.empty()];B.push(Y.value)}return[B,{[Symbol.iterator](){return $}}]}t.consume=D;async function T(S){let L=[];for await(let B of S)L.push(B);return Promise.resolve(L)}t.asyncToArray=T})(ol||={});function al(t){if(ol.is(t)){let e=[];for(let i of t)if(i)try{i.dispose()}catch(s){e.push(s)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function t_(...t){return ll(()=>al(t))}function ll(t){return{dispose:Qu(()=>{t()})}}var hl=class cl{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{al(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?cl.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),void 0)}};hl.DISABLE_DISPOSED_WARNING=!1;var Ln=hl,Es=class{constructor(){this._store=new Ln,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}};Es.None=Object.freeze({dispose(){}});var i_=globalThis.performance&&typeof globalThis.performance.now=="function",s_=class dl{static create(e){return new dl(e)}constructor(e){this._now=i_&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},r_;(t=>{t.None=()=>Es.None;function e(v,u){return _(v,()=>{},0,void 0,!0,void 0,u)}t.defer=e;function i(v){return(u,p=null,g)=>{let w=!1,b;return b=v(C=>{if(!w)return b?b.dispose():w=!0,u.call(p,C)},null,g),w&&b.dispose(),b}}t.once=i;function s(v,u,p){return a((g,w=null,b)=>v(C=>g.call(w,u(C)),null,b),p)}t.map=s;function r(v,u,p){return a((g,w=null,b)=>v(C=>{u(C),g.call(w,C)},null,b),p)}t.forEach=r;function n(v,u,p
Line truncated
|
||||
`).slice(2).join(`
|
||||
`))}},h_=class extends Error{constructor(e,i){super(e),this.name="ListenerLeakError",this.stack=i}},c_=class extends Error{constructor(e,i){super(e),this.name="ListenerRefusalError",this.stack=i}},d_=0,tr=class{constructor(t){this.value=t,this.id=d_++}},u_=2,__,Ht=class{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new a_(e?.onListenerError??er,this._options?.leakWarningThreshold??o_):void 0,this._perfMon=this._options?._profName?new n_(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,i,s)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let l=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(l);let h=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],a=new c_(`${l}. HINT: Stack shows most frequent listener (${h[1]}-times)`,h[0]);return(this._options?.onListenerError||er)(a),Es.None}if(this._disposed)return Es.None;i&&(e=e.bind(i));let r=new tr(e),n;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=l_.create(),n=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof tr?(this._deliveryQueue??=new f_,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;let o=ll(()=>{n?.(),this._removeListener(r)});return s instanceof Ln?s.add(o):Array.isArray(s)&&s.push(o),o},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let i=this._listeners,s=i.indexOf(e);if(s===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,i[s]=void 0;let r=this._deliveryQueue.current===this;if(this._size*u_<=i.length){let n=0;for(let o=0;o<i.length;o++)i[o]?i[n++]=i[o]:r&&(this._deliveryQueue.end--,n<this._deliveryQueue.i&&this._deliveryQueue.i--);i.length=n}}_deliver(e,i){if(!e)return;let s=this._options?.onListenerError||er;if(!s){e.value(i);return}try{e.value(i)}catch(r){s(r)}}_deliverQueue(e){let i=e.current._listeners;for(;e.i<e.end;)this._deliver(i[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof tr)this._deliver(this._listeners,e);else{let i=this._deliveryQueue;i.enqueue(this,e,this._listeners.length),this._deliverQueue(i)}this._perfMon?.stop()}hasListeners(){return this._size>0}},f_=class{constructor(){this.i=-1,this.end=0}enqueue(t,e,i){this.i=0,this.end=i,this.current=t,this.value=e}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Ms=class vs{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new Ht,this.onChange=this._onChange.event;let e=new Gu;this.register(e),this._active=e.version,this._activeProvider=e}static extractShouldJoin(e){return(e&1)!==0}static extractWidth(e){return e>>1&3}static extractCharKind(e){return e>>3}static createPropertyValue(e,i,s=!1){return(e&16777215)<<3|(i&3)<<1|(s?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(e){if(!this._providers[e])throw new Error(`unknown Unicode version "${e}"`);this._active=e,this._activeProvider=this._providers[e],this._onChange.fire(e)}register(e){this._providers[e.version]=e}wcwidth(e){return this._activeProvider.wcwidth(e)}getStringCellWidth(e){let i=0,s=0,r=e.length;for(let n=0;n<r;++n){let o=e.charCodeAt(n);if(55296<=o&&o<=56319){if(++n>=r)return i+this.wcwidth(o);let a=e.charCodeAt(n);56320<=a&&a<=57343?o=(o-55296)*1024+a-56320+65536:i+=this.wcwidth(a)}let l=this.charProperties(o,s),h=vs.extractWidth(l);vs.extractShouldJoin(l)&&(h-=vs.extractWidth(s)),i+=h,s=l}return i}charProperties(e,i){return this._activeProvider.charProperties(e,i)}},ir=[[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1541],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1757],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[253
Line truncated
|
||||
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
||||
* @license MIT
|
||||
*
|
||||
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
||||
* @license MIT
|
||||
*
|
||||
* Originally forked from (with the author's permission):
|
||||
* Fabrice Bellard's javascript vt100 for jslinux:
|
||||
* http://bellard.org/jslinux/
|
||||
* Copyright (c) 2011 Fabrice Bellard
|
||||
*/var w_=(t,e,i,s)=>{for(var r=e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r},S_=(t,e)=>(i,s)=>e(i,s,t),b_=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?Do.isErrorNoTelemetry(t)?new Do(t.message+`
|
||||
|
||||
`+t.stack):new Error(t.message+`
|
||||
|
||||
`+t.stack):t},0)}}addListener(t){return this.listeners.push(t),()=>{this._removeListener(t)}}emit(t){this.listeners.forEach(e=>{e(t)})}_removeListener(t){this.listeners.splice(this.listeners.indexOf(t),1)}setUnexpectedErrorHandler(t){this.unexpectedErrorHandler=t}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}},y_=new b_;function rr(t){C_(t)||y_.onUnexpectedError(t)}var ln="Canceled";function C_(t){return t instanceof x_?!0:t instanceof Error&&t.name===ln&&t.message===ln}var x_=class extends Error{constructor(){super(ln),this.name=this.message}},Do=class hn extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof hn)return e;let i=new hn;return i.message=e.message,i.stack=e.stack,i}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}},k_;(t=>{function e(n){return n<0}t.isLessThan=e;function i(n){return n<=0}t.isLessThanOrEqual=i;function s(n){return n>0}t.isGreaterThan=s;function r(n){return n===0}t.isNeitherLessOrGreaterThan=r,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(k_||={});function L_(t,e){let i=this,s=!1,r;return function(){return s||(s=!0,e||(r=t.apply(i,arguments))),r}}var gl;(t=>{function e(S){return S&&typeof S=="object"&&typeof S[Symbol.iterator]=="function"}t.is=e;let i=Object.freeze([]);function s(){return i}t.empty=s;function*r(S){yield S}t.single=r;function n(S){return e(S)?S:r(S)}t.wrap=n;function o(S){return S||i}t.from=o;function*l(S){for(let L=S.length-1;L>=0;L--)yield S[L]}t.reverse=l;function h(S){return!S||S[Symbol.iterator]().next().done===!0}t.isEmpty=h;function a(S){return S[Symbol.iterator]().next().value}t.first=a;function c(S,L){let B=0;for(let $ of S)if(L($,B++))return!0;return!1}t.some=c;function _(S,L){for(let B of S)if(L(B))return B}t.find=_;function*f(S,L){for(let B of S)L(B)&&(yield B)}t.filter=f;function*d(S,L){let B=0;for(let $ of S)yield L($,B++)}t.map=d;function*m(S,L){let B=0;for(let $ of S)yield*L($,B++)}t.flatMap=m;function*y(...S){for(let L of S)yield*L}t.concat=y;function k(S,L,B){let $=B;for(let U of S)$=L($,U);return $}t.reduce=k;function*R(S,L,B=S.length){for(L<0&&(L+=S.length),B<0?B+=S.length:B>S.length&&(B=S.length);L<B;L++)yield S[L]}t.slice=R;function D(S,L=Number.POSITIVE_INFINITY){let B=[];if(L===0)return[B,S];let $=S[Symbol.iterator]();for(let U=0;U<L;U++){let Y=$.next();if(Y.done)return[B,t.empty()];B.push(Y.value)}return[B,{[Symbol.iterator](){return $}}]}t.consume=D;async function T(S){let L=[];for await(let B of S)L.push(B);return Promise.resolve(L)}t.asyncToArray=T})(gl||={});function pl(t){if(gl.is(t)){let e=[];for(let i of t)if(i)try{i.dispose()}catch(s){e.push(s)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function vl(...t){return We(()=>pl(t))}function We(t){return{dispose:L_(()=>{t()})}}var ml=class wl{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{pl(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?wl.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),void 0)}};ml.DISABLE_DISPOSED_WARNING=!1;var wi=ml,dt=class{constructor(){this._store=new wi,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}};dt.None=Object.freeze({dispose(){}});var Ti=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(t){this._isDisposed||t===this._value||(this._value?.dispose(),this._value=t)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}clearAndLeak(){let t=this._value;return this._value=void 0,t}},Bn=typeof process<"u"&&"title"in process,$s=Bn?"node":navigator.userAgent,B_=Bn?"node":navigator.platform,E_=$s.includes("Firefox"),M_=$s.includes("Edge"),Sl=/^((?!chrome|android).)*safari/i.test($s);function R_(){if(!Sl)return 0;let t=$s.match(/Version\/(\d+)/);return t===null||t.length<2?0:parseInt(t[1])}B_.indexOf("Linux")>=0;var T_="",Ae=0,Pe=0,$e=0,de=0,ot={css:"#00000000",rgba:0},Ke;(t=>{function e(r,n,o,l){return l!==void 0?`#${Jt(r)}${Jt(n)}${Jt(o)}${Jt(l)}`:`#${Jt(r)}${Jt(n)}${Jt(o)}`}t.toCss=e;function i(r,n,o,l=
Line truncated
|
||||
`).slice(2).join(`
|
||||
`))}},of=class extends Error{constructor(t,e){super(t),this.name="ListenerLeakError",this.stack=e}},af=class extends Error{constructor(t,e){super(t),this.name="ListenerRefusalError",this.stack=e}},lf=0,or=class{constructor(t){this.value=t,this.id=lf++}},hf=2,cf,se=class{constructor(t){this._size=0,this._options=t,this._leakageMon=this._options?.leakWarningThreshold?new rf(t?.onListenerError??rr,this._options?.leakWarningThreshold??sf):void 0,this._perfMon=this._options?._profName?new tf(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(t,e,i)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let o=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(o);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],h=new af(`${o}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||rr)(h),dt.None}if(this._disposed)return dt.None;e&&(t=t.bind(e));let s=new or(t),r;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=nf.create(),r=this._leakageMon.check(s.stack,this._size+1)),this._listeners?this._listeners instanceof or?(this._deliveryQueue??=new df,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._size++;let n=We(()=>{r?.(),this._removeListener(s)});return i instanceof wi?i.add(n):Array.isArray(i)&&i.push(n),n},this._event}_removeListener(t){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let e=this._listeners,i=e.indexOf(t);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,e[i]=void 0;let s=this._deliveryQueue.current===this;if(this._size*hf<=e.length){let r=0;for(let n=0;n<e.length;n++)e[n]?e[r++]=e[n]:s&&(this._deliveryQueue.end--,r<this._deliveryQueue.i&&this._deliveryQueue.i--);e.length=r}}_deliver(t,e){if(!t)return;let i=this._options?.onListenerError||rr;if(!i){t.value(e);return}try{t.value(e)}catch(s){i(s)}}_deliverQueue(t){let e=t.current._listeners;for(;t.i<t.end;)this._deliver(e[t.i++],t.value);t.reset()}fire(t){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof or)this._deliver(this._listeners,t);else{let e=this._deliveryQueue;e.enqueue(this,t,this._listeners.length),this._deliverQueue(e)}this._perfMon?.stop()}hasListeners(){return this._size>0}},df=class{constructor(){this.i=-1,this.end=0}enqueue(t,e,i){this.i=0,this.end=i,this.current=t,this.value=e}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Oo={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}},Di=2,Ai,Ut=class fi{constructor(e,i,s){this._document=e,this._config=i,this._unicodeService=s,this._didWarmUp=!1,this._cacheMap=new Io,this._cacheMapCombined=new Io,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new vi,this._textureSize=512,this._onAddTextureAtlasCanvas=new se,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new se,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=Al(e,this._config.deviceCellWidth*4+Di*2,this._config.deviceCellHeight+Di*2),this._tmpCtx=we(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}get pages(){return this._pages}dispose(){this._tmpCanvas.remove();for(let e of this.pages)e.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){let e=new Z_;for(let i=33;i<126;i++)e.enqueue(()=>{if(!this._cacheMap.get(i,0,0,0)){let s=this._drawToCache(i,0,0,0,!1,void 0);this._cacheMap.set(i,0,0,0,s)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(!(this._pages[0].currentRow.x===0&&this._pages[0].currentRow.y===0)){for(let e of this._pages)e.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(fi.maxAtlasPages&&this._pages.length>=Math.max(4,fi.maxAtlasPages)){let i=this._pages.filter(a=>a.canvas.width*2<=(fi.maxTextureS
Line truncated
|
||||
layout (location = 0) in vec2 a_unitquad;
|
||||
layout (location = 1) in vec2 a_cellpos;
|
||||
layout (location = 2) in vec2 a_offset;
|
||||
layout (location = 3) in vec2 a_size;
|
||||
layout (location = 4) in float a_texpage;
|
||||
layout (location = 5) in vec2 a_texcoord;
|
||||
layout (location = 6) in vec2 a_texsize;
|
||||
|
||||
uniform mat4 u_projection;
|
||||
uniform vec2 u_resolution;
|
||||
|
||||
out vec2 v_texcoord;
|
||||
flat out int v_texpage;
|
||||
|
||||
void main() {
|
||||
vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
|
||||
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
||||
v_texpage = int(a_texpage);
|
||||
v_texcoord = a_texcoord + a_unitquad * a_texsize;
|
||||
}`;function Sf(t){let e="";for(let i=1;i<t;i++)e+=` else if (v_texpage == ${i}) { outColor = texture(u_texture[${i}], v_texcoord); }`;return`#version 300 es
|
||||
precision lowp float;
|
||||
|
||||
in vec2 v_texcoord;
|
||||
flat in int v_texpage;
|
||||
|
||||
uniform sampler2D u_texture[${t}];
|
||||
|
||||
out vec4 outColor;
|
||||
|
||||
void main() {
|
||||
if (v_texpage == 0) {
|
||||
outColor = texture(u_texture[0], v_texcoord);
|
||||
} ${e}
|
||||
}`}var qt=11,ui=qt*Float32Array.BYTES_PER_ELEMENT,bf=2,he=0,te,hr=0,Pi=0,yf=class extends dt{constructor(t,e,i,s){super(),this._terminal=t,this._gl=e,this._dimensions=i,this._optionsService=s,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};let r=this._gl;Ut.maxAtlasPages===void 0&&(Ut.maxAtlasPages=Math.min(32,we(r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS))),Ut.maxTextureSize=we(r.getParameter(r.MAX_TEXTURE_SIZE))),this._program=we(Ol(r,wf,Sf(Ut.maxAtlasPages))),this._register(We(()=>r.deleteProgram(this._program))),this._projectionLocation=we(r.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=we(r.getUniformLocation(this._program,"u_resolution")),this._textureLocation=we(r.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=r.createVertexArray(),r.bindVertexArray(this._vertexArrayObject);let n=new Float32Array([0,0,1,0,0,1,1,1]),o=r.createBuffer();this._register(We(()=>r.deleteBuffer(o))),r.bindBuffer(r.ARRAY_BUFFER,o),r.bufferData(r.ARRAY_BUFFER,n,r.STATIC_DRAW),r.enableVertexAttribArray(0),r.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);let l=new Uint8Array([0,1,2,3]),h=r.createBuffer();this._register(We(()=>r.deleteBuffer(h))),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,h),r.bufferData(r.ELEMENT_ARRAY_BUFFER,l,r.STATIC_DRAW),this._attributesBuffer=we(r.createBuffer()),this._register(We(()=>r.deleteBuffer(this._attributesBuffer))),r.bindBuffer(r.ARRAY_BUFFER,this._attributesBuffer),r.enableVertexAttribArray(2),r.vertexAttribPointer(2,2,r.FLOAT,!1,ui,0),r.vertexAttribDivisor(2,1),r.enableVertexAttribArray(3),r.vertexAttribPointer(3,2,r.FLOAT,!1,ui,2*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(3,1),r.enableVertexAttribArray(4),r.vertexAttribPointer(4,1,r.FLOAT,!1,ui,4*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(4,1),r.enableVertexAttribArray(5),r.vertexAttribPointer(5,2,r.FLOAT,!1,ui,5*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(5,1),r.enableVertexAttribArray(6),r.vertexAttribPointer(6,2,r.FLOAT,!1,ui,7*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(6,1),r.enableVertexAttribArray(1),r.vertexAttribPointer(1,2,r.FLOAT,!1,ui,9*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(1,1),r.useProgram(this._program);let a=new Int32Array(Ut.maxAtlasPages);for(let c=0;c<Ut.maxAtlasPages;c++)a[c]=c;r.uniform1iv(this._textureLocation,a),r.uniformMatrix4fv(this._projectionLocation,!1,Il),this._atlasTextures=[];for(let c=0;c<Ut.maxAtlasPages;c++){let _=new mf(we(r.createTexture()));this._register(We(()=>r.deleteTexture(_.texture))),r.activeTexture(r.TEXTURE0+c),r.bindTexture(r.TEXTURE_2D,_.texture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,1,1,0,r.RGBA,r.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[c]=_}r.enable(r.BLEND),r.blendFunc(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return this._atlas?this._atlas.beginFrame():!0}updateCell(t,e,i,s,r,n,o,l,h){this._updateCell(this._vertices.attributes,t,e,i,s,r,n,o,l,h)}_updateCell(t,e,i,s,r,n,o,l,h,a){if(he=(i*this._terminal.cols+e)*qt,s===0||s===void 0){t.fill(0,he,he+qt-1-bf);return}this._atlas&&(l&&l.length>1?te=this._atlas.getRasterizedGlyphCombinedChar(l,r,n,o,!1,this._terminal.element):te=this._atlas.getRasterizedGlyph(s,r,n,o,!1,this._terminal.element),hr=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),r!==a&&te.offset.x>hr?(Pi=te.offset.x-hr,t[he]=-(te.offset.x-Pi)+this._dimensions.device.char.left,t[he+1]=-te.offset.y+this._dimensions.device.char.top,t[he+2]=(te.size.x-Pi)/this._dimensions.device.canvas.width,t[he+3]=te.size.y/this._dimensions.device.canvas.height,t[he+4]=te.texturePage,t[he+5]=te.texturePositionClipSpace.x+Pi/this._atlas.pages[te.texturePage].canvas.width,t[he+6]=te.texturePositionClipSpace.y,t[he+7]=te.sizeClipSpace.x-Pi/this._atlas.pages[te.texturePage].canvas.width,t[he+8]=te.sizeClipSpace.y):(t[he]=-te.offset.x+this._dimensions.device.char.left,t[he+1]=-te.offset.y+this._dimensions.device.char.top,t[he+2]=te.size.x/this._dimensions.device.canvas.width,t[he+3]=te.size.y/this._dimensions.device.canvas.height,t[he+4]=te.texturePage,t[he+5]=te.texturePositionClipSpace.x,t[he+6]=te.texturePositionClipSpace.y,t[he+7]=te.sizeClipSpace.x,t[he+8]=te.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&O_(s,h,te.size.x,this._dimensions.device.cell.width)&&(t[he+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width))}clear(){let t=this._terminal,e=t.cols*t.rows*qt;this._vertices.count!==e?this._vertices.attributes=new Float32Array(e):this._vertices.attributes.fill(0);let i=0;for(;i<this._vertices.attributesBuffers.length;i++)this._vertices.count!==e?this._vertices.attributesBuffers[i]=new Float32Array(e):this._vertices.attributesBuffers[i].fill(0);this.
Line truncated
|
||||
layout (location = 0) in vec2 a_position;
|
||||
layout (location = 1) in vec2 a_size;
|
||||
layout (location = 2) in vec4 a_color;
|
||||
layout (location = 3) in vec2 a_unitquad;
|
||||
|
||||
uniform mat4 u_projection;
|
||||
|
||||
out vec4 v_color;
|
||||
|
||||
void main() {
|
||||
vec2 zeroToOne = a_position + (a_unitquad * a_size);
|
||||
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
||||
v_color = a_color;
|
||||
}`,Ef=`#version 300 es
|
||||
precision lowp float;
|
||||
|
||||
in vec4 v_color;
|
||||
|
||||
out vec4 outColor;
|
||||
|
||||
void main() {
|
||||
outColor = v_color;
|
||||
}`,Dt=8,dr=Dt*Float32Array.BYTES_PER_ELEMENT,Mf=20*Dt,Uo=class{constructor(){this.attributes=new Float32Array(Mf),this.count=0}},Et=0,qo=0,Ko=0,Vo=0,jo=0,Go=0,Yo=0,Rf=class extends dt{constructor(t,e,i,s){super(),this._terminal=t,this._gl=e,this._dimensions=i,this._themeService=s,this._vertices=new Uo,this._verticesCursor=new Uo;let r=this._gl;this._program=we(Ol(r,Bf,Ef)),this._register(We(()=>r.deleteProgram(this._program))),this._projectionLocation=we(r.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=r.createVertexArray(),r.bindVertexArray(this._vertexArrayObject);let n=new Float32Array([0,0,1,0,0,1,1,1]),o=r.createBuffer();this._register(We(()=>r.deleteBuffer(o))),r.bindBuffer(r.ARRAY_BUFFER,o),r.bufferData(r.ARRAY_BUFFER,n,r.STATIC_DRAW),r.enableVertexAttribArray(3),r.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let l=new Uint8Array([0,1,2,3]),h=r.createBuffer();this._register(We(()=>r.deleteBuffer(h))),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,h),r.bufferData(r.ELEMENT_ARRAY_BUFFER,l,r.STATIC_DRAW),this._attributesBuffer=we(r.createBuffer()),this._register(We(()=>r.deleteBuffer(this._attributesBuffer))),r.bindBuffer(r.ARRAY_BUFFER,this._attributesBuffer),r.enableVertexAttribArray(0),r.vertexAttribPointer(0,2,r.FLOAT,!1,dr,0),r.vertexAttribDivisor(0,1),r.enableVertexAttribArray(1),r.vertexAttribPointer(1,2,r.FLOAT,!1,dr,2*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(1,1),r.enableVertexAttribArray(2),r.vertexAttribPointer(2,4,r.FLOAT,!1,dr,4*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(2,1),this._updateCachedColors(s.colors),this._register(this._themeService.onChangeColors(a=>{this._updateCachedColors(a),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(t){let e=this._gl;e.useProgram(this._program),e.bindVertexArray(this._vertexArrayObject),e.uniformMatrix4fv(this._projectionLocation,!1,Il),e.bindBuffer(e.ARRAY_BUFFER,this._attributesBuffer),e.bufferData(e.ARRAY_BUFFER,t.attributes,e.DYNAMIC_DRAW),e.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,e.UNSIGNED_BYTE,0,t.count)}handleResize(){this._updateViewportRectangle()}setDimensions(t){this._dimensions=t}_updateCachedColors(t){this._bgFloat=this._colorToFloat32Array(t.background),this._cursorFloat=this._colorToFloat32Array(t.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(t){let e=this._terminal,i=this._vertices,s=1,r,n,o,l,h,a,c,_,f,d,m;for(r=0;r<e.rows;r++){for(o=-1,l=0,h=0,a=!1,n=0;n<e.cols;n++)c=(r*e.cols+n)*Rs,_=t.cells[c+ms],f=t.cells[c+ws],d=!!(f&67108864),(_!==l||f!==h&&(a||d))&&((l!==0||a&&h!==0)&&(m=s++*Dt,this._updateRectangle(i,m,h,l,o,n,r)),o=n,l=_,h=f,a=d);(l!==0||a&&h!==0)&&(m=s++*Dt,this._updateRectangle(i,m,h,l,o,e.cols,r))}i.count=s}updateCursor(t){let e=this._verticesCursor,i=t.cursor;if(!i||i.style==="block"){e.count=0;return}let s,r=0;(i.style==="bar"||i.style==="outline")&&(s=r++*Dt,this._addRectangleFloat(e.attributes,s,i.x*this._dimensions.device.cell.width,i.y*this._dimensions.device.cell.height,i.style==="bar"?i.dpr*i.cursorWidth:i.dpr,this._dimensions.device.cell.height,this._cursorFloat)),(i.style==="underline"||i.style==="outline")&&(s=r++*Dt,this._addRectangleFloat(e.attributes,s,i.x*this._dimensions.device.cell.width,(i.y+1)*this._dimensions.device.cell.height-i.dpr,i.width*this._dimensions.device.cell.width,i.dpr,this._cursorFloat)),i.style==="outline"&&(s=r++*Dt,this._addRectangleFloat(e.attributes,s,i.x*this._dimensions.device.cell.width,i.y*this._dimensions.device.cell.height,i.width*this._dimensions.device.cell.width,i.dpr,this._cursorFloat),s=r++*Dt,this._addRectangleFloat(e.attributes,s,(i.x+i.width)*this._dimensions.device.cell.width-i.dpr,i.y*this._dimensions.device.cell.height,i.dpr,this._dimensions.device.cell.height,this._cursorFloat)),e.count=r}_updateRectangle(t,e,i,s,r,n,o){if(i&67108864)switch(i&50331648){case 16777216:case 33554432:Et=this._themeService.colors.ansi[i&255].rgba;break;case 50331648:Et=(i&16777215)<<8;break;case 0:default:Et=this._themeService.colors.foreground.rgba}else switch(s&50331648){case 16777216:case 33554432:Et=this._themeService.colors.ansi[s&255].rgba;break;case 50331648:Et=(s&16777215)<<8;break;case 0:default:Et=this._themeService.colors.background.rgba}t.attributes.length<e+4&&(t.attributes=vf(t.attributes,this._terminal.rows*this._terminal.cols*Dt)),qo=r*this._dimensions.device.cell.width,Ko=o*this._dimensions.device.cell.height,Vo=(Et>>24&255)/255,jo=(Et>>16&255)/255,Go=(Et>>8&255)/255,Yo=1,this._addRectangle(t.attributes,e,qo,Ko,(n-r)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,Vo,jo,Go,Yo)}_addRectangle(t,e,i,s,r,n,o,l,h,a){t[e]=i/this._dimensions.device.canvas.width,t[e+1]=s/this._dimensions.device.canvas.heigh
Line truncated
|
||||
\x1B[1;36m❯\x1B[0m `)},v=O=>{if(!(!d||!O)){d.write(`\x1B[90m${O}\x1B[0m`);for(let I=0;I<O.length;I++)d.write("\b")}},u=()=>{if(!(!d||!T)){for(let O=0;O<T.length;O++)d.write(" ");for(let O=0;O<T.length;O++)d.write("\b");T=""}},p=O=>{if(!d)return;const I=O.charCodeAt(0);if(I===13){u(),d.write(`\r
|
||||
`),k.trim()?(w(k.trim()),R.push(k.trim()),D=R.length):W(),k="";return}if(I===127){k.length>0&&(u(),k=k.slice(0,-1),d.write("\b \b"),g());return}if(I===3){u(),d.write(`^C\r
|
||||
`),k="",W();return}if(I===12){d.clear(),k="",W();return}if(I===6){h.value=!h.value;return}if(O==="\x1B[A"){R.length>0&&D>0&&(u(),D--,d.write("\r\x1B[K"),W(),k=R[D],d.write(k));return}if(O==="\x1B[B"){u(),D<R.length-1?(D++,d.write("\r\x1B[K"),W(),k=R[D],d.write(k)):D===R.length-1&&(D=R.length,d.write("\r\x1B[K"),W(),k="");return}if(O==="\x1B[C"&&T&&!c.value){u();const G=T;k+=G,d.write(G),T="";return}if(I===9){u();const G=k.toLowerCase(),X=k.split(/\s+/),_e=X[0]?.toLowerCase();if(X.length>2&&Y[_e]){const N=X[1]?.toLowerCase(),be=X.slice(2).join(" ").toLowerCase(),fe=Y[_e][N];if(fe){const ee=fe.filter(He=>He.toLowerCase().startsWith(be));if(ee.length===1){const He=X.slice(2).join(" "),ve=ee[0].slice(He.length);k+=ve,d.write(ve)}else ee.length>1&&(d.write(`\r
|
||||
\r
|
||||
\x1B[33mAvailable values:\x1B[0m\r
|
||||
\r
|
||||
`),ee.forEach(He=>{d.writeln(` \x1B[36m${He}\x1B[0m`)}),W(),d.write(k));return}}if(X.length>1&&U[_e]){if(_e==="ping"){const fe=X.slice(1).join(" ").toLowerCase(),ee=Date.now();ee-$>3e4&&na().then(ve=>{B=ve,$=ee,U.ping=ve});const He=B.filter(ve=>ve.toLowerCase().startsWith(fe));if(He.length===1){const ve=X.slice(1).join(" "),hi=He[0].slice(ve.length)+" ";k+=hi,d.write(hi)}else He.length>1?(d.write(`\r
|
||||
\r
|
||||
\x1B[33mAvailable neighbors:\x1B[0m\r
|
||||
\r
|
||||
`),He.forEach(ve=>{d.writeln(` \x1B[36m${ve}\x1B[0m`)}),W(),d.write(k)):B.length===0&&fe===""&&(d.write(`\r
|
||||
\r
|
||||
\x1B[33mFetching neighbors...\x1B[0m\r
|
||||
`),na().then(ve=>{B=ve,$=ee,U.ping=ve,d.write(`\r
|
||||
\x1B[33mAvailable neighbors:\x1B[0m\r
|
||||
\r
|
||||
`),ve.forEach(hi=>{d.writeln(` \x1B[36m${hi}\x1B[0m`)}),W(),d.write(k)}).catch(()=>{d.write(`\r
|
||||
\x1B[31mFailed to fetch neighbors\x1B[0m\r
|
||||
`),W(),d.write(k)}));return}const N=X.slice(1).join(" ").toLowerCase(),be=U[_e].filter(fe=>fe.toLowerCase().startsWith(N));if(be.length===1){const fe=X.slice(1).join(" "),ee=be[0].slice(fe.length)+" ";k+=ee,d.write(ee)}else if(be.length>1){d.write(`\r
|
||||
\r
|
||||
\x1B[33mAvailable parameters:\x1B[0m\r
|
||||
\r
|
||||
`);const fe=le[_e]||{};be.forEach(ee=>{const He=fe[ee]||"",ve=ee.padEnd(20);d.writeln(` \x1B[36m${ve}\x1B[0m\x1B[90m${He}\x1B[0m`)}),W(),d.write(k)}return}const Be=S.getAllCommands().filter(N=>!!(N.name.toLowerCase().startsWith(G)||N.aliases?.some(be=>be.toLowerCase().startsWith(G))));if(Be.length===1){const N=Be[0].name.slice(k.length)+" ";k+=N,d.write(N)}else Be.length>1&&(d.write(`\r
|
||||
\r
|
||||
\x1B[33mAvailable commands:\x1B[0m\r
|
||||
\r
|
||||
`),Be.forEach(N=>{const be=N.aliases&&N.aliases.length>0?` (${N.aliases.join(", ")})`:"";d.writeln(` \x1B[36m${N.name.padEnd(15)}\x1B[0m ${N.description}${be}`)}),W(),d.write(k));return}I>=32&&I<127&&(u(),k+=O,d.write(O),c.value||g())},g=()=>{if(k.length===0){T="";return}const O=L.filter(I=>I.startsWith(k.toLowerCase()));O.length===1&&O[0]!==k?(T=O[0].slice(k.length),v(T)):T=""},w=async O=>{if(!d)return;const I=O.trim(),[G,...X]=I.split(/\s+/),_e=S.findCommand(G);if(_e)try{await _e.execute({term:d,args:X,writePrompt:W})}catch(Le){console.error("Command execution error:",Le),d.writeln(`\x1B[1;31m✗ Error:\x1B[0m ${Le instanceof Error?Le.message:"Command failed"}`),W()}else d.writeln(`\x1B[1;31m✗ Unknown command:\x1B[0m ${G}`),d.writeln("\x1B[90mType \x1B[36mhelp\x1B[90m for available commands\x1B[0m"),W()},b=()=>{!y||!l.value||y.findNext(l.value,{caseSensitive:!1})},C=()=>{!y||!l.value||y.findPrevious(l.value,{caseSensitive:!1})},x=()=>{h.value=!1,l.value="",d?.focus()},M=async()=>{if(o.value){if(_.value)try{document.exitFullscreen&&await document.exitFullscreen(),_.value=!1}catch(O){console.error("Failed to exit fullscreen:",O)}else try{o.value.requestFullscreen&&await o.value.requestFullscreen(),_.value=!0,setTimeout(()=>{c.value&&n.value?n.value.focus():d&&d.focus()},100)}catch(O){console.error("Failed to enter fullscreen:",O)}setTimeout(()=>{m?.fit()},100)}},F=()=>{f.value=!f.value,f.value&&c.value&&setTimeout(()=>{window.scrollTo(0,1)},100),setTimeout(()=>{c.value&&n.value?n.value.focus():d?.focus(),m?.fit()},150)},K=()=>{f.value=!1,setTimeout(()=>{m?.fit()},100)};ql(e,O=>{d&&(d.options.theme=O==="dark"?i:s)}),typeof document<"u"&&(document.addEventListener("fullscreenchange",()=>{_.value=!!document.fullscreenElement,setTimeout(()=>m?.fit(),100)}),document.addEventListener("keydown",O=>{O.key==="Escape"&&f.value&&!_.value&&K()}),document.addEventListener("keydown",O=>{O.key==="Escape"&&f.value&&!_.value&&K()}));const z=()=>{c.value&&n.value&&n.value.focus()},pe=O=>{const I=O.target,G=I.value;if(G&&d){const X=G.slice(-1);p(X)}I.value=""},q=()=>{d&&p("\r"),n.value&&(n.value.value="")},ne=()=>{d&&p(""),n.value&&(n.value.value="")};return(O,I)=>(it(),tt("div",mg,[Z("div",wg,[Z("div",Sg,[I[8]||(I[8]=Z("div",null,[Z("h1",{class:"text-content-primary dark:text-content-primary text-lg md:text-xl font-semibold"},"Terminal"),Z("p",{class:"text-content-secondary dark:text-content-muted text-sm hidden md:block"},"Interactive command-line interface")],-1)),Z("div",bg,[c.value?(it(),tt("button",{key:0,onClick:F,class:"flex items-center gap-2 px-3 py-2 bg-accent-purple/20 hover:bg-accent-purple/30 text-accent-purple border border-accent-purple/50 rounded-lg transition-colors",title:f.value?"Exit fullscreen":"Enter fullscreen"},[f.value?(it(),tt("svg",xg,I[3]||(I[3]=[Z("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1)]))):(it(),tt("svg",Cg,I[2]||(I[2]=[Z("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"},null,-1)]))),Z("span",kg,Is(f.value?"Exit":"Fullscreen"),1)],8,yg)):Yt("",!0),c.value?Yt("",!0):(it(),tt("button",{key:1,onClick:F,class:"flex items-center gap-2 px-3 py-2 md:px-4 bg-accent-purple/20 hover:bg-accent-purple/30 text-accent-purple border border-accent-purple/50 rounded-lg transition-colors",title:f.value?"Exit full window":"Full window"},[I[4]||(I[4]=Z("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Z("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"})],-1)),Z("span",Bg,Is(f.value?"Exit Window":"Full Window"),1)],8,Lg)),c.value?Yt("",!0):(it(),tt("button",{key:2,onClick:M,class:"flex items-center gap-2 px-3 py-2 md:px-4 bg-accent-purple/20 hover:bg-accent-purple/30 text-accent-purple border border-accent-purple/50 rounded-lg transition-colors",title:_.value?"Exit fullscreen":"Fullscreen"},[_.value?(it(),tt("svg",Rg,I[6]||(I[6]=[Z("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1)]))):(it(),tt("svg",Mg,I[5]||(I[5]=[Z("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"},null,-1)]))),Z("span",Tg,Is(_.value?"Exit Full":"Fullscreen"),1)],8,Eg)),Z("button",{onClick:I[0]||(I[0]=G=>h.value=!h.value),class:"flex items-center gap-2 px-3 py-2 md:px-4 bg-primary/20 hover:bg-primary/30 text-primary border border-primary/50 rounded-lg transition-colors"},I[7]||(I[7]=[Z("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Z("path",{"stroke-linecap":"round","stroke-linejoin"
Line truncated
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
||||
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
||||
* https://github.com/chjj/term.js
|
||||
* @license MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* Originally forked from (with the author's permission):
|
||||
* Fabrice Bellard's javascript vt100 for jslinux:
|
||||
* http://bellard.org/jslinux/
|
||||
* Copyright (c) 2011 Fabrice Bellard
|
||||
* The original design remains. The terminal itself
|
||||
* has been extended to include xterm CSI codes, among
|
||||
* other features.
|
||||
*/.xterm{cursor:text;position:relative;-moz-user-select:none;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;inset:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;inset:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::-moz-selection{color:transparent}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{font-family:monospace;-webkit-user-select:text;-moz-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:-moz-fit-content;width:fit-content}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:double underline;text-decoration:double underline}.xterm-underline-3{-webkit-text-decoration:wavy underline;text-decoration:wavy underline}.xterm-underline-4{-webkit-text-decoration:dotted underline;text-decoration:dotted underline}.xterm-underline-5{-webkit-text-decoration:dashed underline;text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.terminal-container[data-v-7ea2281b]{height:calc(100vh - 220px);min-height:400px;min-height:calc(100dvh - 220px);background-color:var(--color-surface)}@media (max-width: 768px){.terminal-container[data-v-7ea2281b]{height:calc(100vh - 140px);min-height:300px;min-height:calc(100dvh - 140px)}}@media (max-width: 640px){.terminal-container[data-v-7ea2281b]{height:calc(100vh - 120px);min-height:250px;min-height:calc(100dvh - 120px)}}[data-v-7ea2281b] .xterm{padding:1.5rem;height:100%!important}@media (max-width: 768px){[data-v-7ea2281b] .xterm{padding:1rem}}@media (max-width: 640px){[data-v-7ea2281b] .xterm{padding:.75rem}}[data-v-7ea2281b] .xterm-viewport,[data-v-7ea2281b] .xterm-screen{background-color:transparent!important}[data-v-7ea2281b] .xterm-selection{background-color:#00d9ff4d!important}kbd[data-v-7ea2281b]{font-family:Menlo,Monaco,Courier New,monospacLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}export{e as g};
|
||||
@@ -0,0 +1,18 @@
|
||||
/*!
|
||||
* @kurkle/color v0.3.4
|
||||
* https://github.com/kurkle/color#readme
|
||||
* (c) 2024 Jukka Kurkela
|
||||
* Released under the MIT License
|
||||
*/function ae(i){return i+.5|0}const ut=(i,t,e)=>Math.max(Math.min(i,e),t);function Ut(i){return ut(ae(i*2.55),0,255)}function mt(i){return ut(ae(i*255),0,255)}function ct(i){return ut(ae(i/2.55)/100,0,1)}function Mi(i){return ut(ae(i*100),0,100)}const Z={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Ze=[..."0123456789ABCDEF"],In=i=>Ze[i&15],Fn=i=>Ze[(i&240)>>4]+Ze[i&15],he=i=>(i&240)>>4===(i&15),zn=i=>he(i.r)&&he(i.g)&&he(i.b)&&he(i.a);function Bn(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&Z[i[1]]*17,g:255&Z[i[2]]*17,b:255&Z[i[3]]*17,a:t===5?Z[i[4]]*17:255}:(t===7||t===9)&&(e={r:Z[i[1]]<<4|Z[i[2]],g:Z[i[3]]<<4|Z[i[4]],b:Z[i[5]]<<4|Z[i[6]],a:t===9?Z[i[7]]<<4|Z[i[8]]:255})),e}const Wn=(i,t)=>i<255?t(i):"";function Hn(i){var t=zn(i)?In:Fn;return i?"#"+t(i.r)+t(i.g)+t(i.b)+Wn(i.a,t):void 0}const Vn=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Vs(i,t,e){const s=t*Math.min(e,1-e),n=(o,r=(o+i/30)%12)=>e-s*Math.max(Math.min(r-3,9-r,1),-1);return[n(0),n(8),n(4)]}function Nn(i,t,e){const s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function jn(i,t,e){const s=Vs(i,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function $n(i,t,e,s,n){return i===n?(t-e)/s+(t<e?6:0):t===n?(e-i)/s+2:(i-t)/s+4}function ri(i){const e=i.r/255,s=i.g/255,n=i.b/255,o=Math.max(e,s,n),r=Math.min(e,s,n),a=(o+r)/2;let l,c,h;return o!==r&&(h=o-r,c=a>.5?h/(2-o-r):h/(o+r),l=$n(e,s,n,h,o),l=l*60+.5),[l|0,c||0,a]}function ai(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(mt)}function li(i,t,e){return ai(Vs,i,t,e)}function Yn(i,t,e){return ai(jn,i,t,e)}function Xn(i,t,e){return ai(Nn,i,t,e)}function Ns(i){return(i%360+360)%360}function Un(i){const t=Vn.exec(i);let e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?Ut(+t[5]):mt(+t[5]));const n=Ns(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?s=Yn(n,o,r):t[1]==="hsv"?s=Xn(n,o,r):s=li(n,o,r),{r:s[0],g:s[1],b:s[2],a:e}}function Kn(i,t){var e=ri(i);e[0]=Ns(e[0]+t),e=li(e),i.r=e[0],i.g=e[1],i.b=e[2]}function qn(i){if(!i)return;const t=ri(i),e=t[0],s=Mi(t[1]),n=Mi(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${ct(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}const Si={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},ki={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Gn(){const i={},t=Object.keys(ki),e=Object.keys(Si);let s,n,o,r,a;for(s=0;s<t.length;s++){for(r=a=t[s],n=0;n<e.length;n++)o=e[n],a=a.replace(Line truncated
|
||||
* Chart.js v4.5.1
|
||||
* https://www.chartjs.org
|
||||
* (c) 2025 Chart.js Contributors
|
||||
* Released under the MIT License
|
||||
*/function rt(){}const so=(()=>{let i=0;return()=>i++})();function T(i){return i==null}function H(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function C(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function U(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function it(i,t){return U(i)?i:t}function P(i,t){return typeof i>"u"?t:i}const no=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,$s=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function I(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function R(i,t,e,s){let n,o,r;if(H(i))for(o=i.length,n=0;n<o;n++)t.call(e,i[n],n);else if(C(i))for(r=Object.keys(i),o=r.length,n=0;n<o;n++)t.call(e,i[r[n]],r[n])}function we(i,t){let e,s,n,o;if(!i||!t||i.length!==t.length)return!1;for(e=0,s=i.length;e<s;++e)if(n=i[e],o=t[e],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function Pe(i){if(H(i))return i.map(Pe);if(C(i)){const t=Object.create(null),e=Object.keys(i),s=e.length;let n=0;for(;n<s;++n)t[e[n]]=Pe(i[e[n]]);return t}return i}function Ys(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function oo(i,t,e,s){if(!Ys(i))return;const n=t[i],o=e[i];C(n)&&C(o)?ee(n,o,s):t[i]=Pe(o)}function ee(i,t,e){const s=H(t)?t:[t],n=s.length;if(!C(i))return i;e=e||{};const o=e.merger||oo;let r;for(let a=0;a<n;++a){if(r=s[a],!C(r))continue;const l=Object.keys(r);for(let c=0,h=l.length;c<h;++c)o(l[c],i,r,e)}return i}function Gt(i,t){return ee(i,t,{merger:ro})}function ro(i,t,e){if(!Ys(i))return;const s=t[i],n=e[i];C(s)&&C(n)?Gt(s,n):Object.prototype.hasOwnProperty.call(t,i)||(t[i]=Pe(n))}const Pi={"":i=>i,x:i=>i.x,y:i=>i.y};function ao(i){const t=i.split("."),e=[];let s="";for(const n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function lo(i){const t=ao(i);return e=>{for(const s of t){if(s==="")break;e=e&&e[s]}return e}}function Dt(i,t){return(Pi[t]||(Pi[t]=lo(t)))(i)}function ci(i){return i.charAt(0).toUpperCase()+i.slice(1)}const ie=i=>typeof i<"u",bt=i=>typeof i=="function",Di=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function co(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const L=Math.PI,z=2*L,ho=z+L,De=Number.POSITIVE_INFINITY,fo=L/180,V=L/2,yt=L/4,Oi=L*2/3,Xs=Math.log10,ot=Math.sign;function Jt(i,t,e){return Math.abs(i-t)<e}function Ci(i){const t=Math.round(i);i=Jt(i,t,i/1e3)?t:i;const e=Math.pow(10,Math.floor(Xs(i))),s=i/e;return(s<=1?1:s<=2?2:s<=5?5:10)*e}function uo(i){const t=[],e=Math.sqrt(i);let s;for(s=1;s<e;s++)i%s===0&&(t.push(s),t.push(i/s));return e===(e|0)&&t.push(e),t.sort((n,o)=>n-o).pop(),t}function go(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function Ft(i){return!go(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function po(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function mo(i,t,e){let s,n,o;for(s=0,n=i.length;s<n;s++)o=i[s][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function ht(i){return i*(L/180)}function bo(i){return i*(180/L)}function Ai(i){if(!U(i))return;let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}function Us(i,t){const e=t.x-i.x,s=t.y-i.y,n=Math.sqrt(e*e+s*s);let o=Math.atan2(s,e);return o<-.5*L&&(o+=z),{angle:o,distance:n}}function Qe(i,t){return Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2))}function _o(i,t){return(i-t+ho)%z-L}function J(i){return(i%z+z)%z}function se(i,t,e,s){const n=J(i),o=J(t),r=J(e),a=J(o-n),l=J(r-n),c=J(n-o),h=J(n-r);return n===o||n===r||s&&o===r||a>l&&c<h}function Y(i,t,e){return Math.max(t,Math.min(e,i))}function xo(i){return Y(i,-32768,32767)}function dt(i,t,e,s=1e-6){return i>=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function hi(i,t,e){e=e||(r=>i[r]<t);let s=i.length-1,n=0,o;for(;s-n>1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}const wt=(i,t,e,s)=>hi(i,e,s?n=>{const o=i[n][t];return o<e||o===e&&i[n+1][t]===e}:n=>i[n][t]<e),yo=(i,t,e)=>hi(i,e,s=>i[s][t]>=e);function vo(i,t,e){let s=0,n=i.length;for(;s<n&&i[s]<t;)s++;for(;n>s&&i[n-1]>e;)n--;return s>0||n<i.length?i.slice(s,n):i}const Ks=["push","pop","shift","splice","unshift"];function Mo(i,t){if(i._chartjs){i._chartjs.listeners.push(t);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Ks.forEach(e=>{const s="_onData"+ci(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const r=n.apply(this,o);return i._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...o)}),r}})})}function Ti(i,t){const e=i._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(Ks.forEach(o=>{delete i[o]}),delete i._chartjs)}function qs(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const Gs=function(){return typeof window>"u"?function(i)Line truncated
|
||||
* Chart.js v4.5.1
|
||||
* https://www.chartjs.org
|
||||
* (c) 2025 Chart.js Contributors
|
||||
* Released under the MIT License
|
||||
*/class wr{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,s,n){const o=e.listeners[n],r=e.duration;o.forEach(a=>a({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(s-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=Gs.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;const o=s.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const s=e.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var at=new wr;const Yi="transparent",Pr={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const s=Ei(i||Yi),n=s.valid&&Ei(t||Yi);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class Dr{constructor(t,e,s,n){const o=e[s];n=ge([t.to,n,o,t.from]);const r=ge([t.from,o,n]);this._active=!0,this._fn=t.fn||Pr[t.type||typeof r],this._easing=Zt[t.easing]||Zt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const n=this._target[this._prop],o=s-this._start,r=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=ge([t.to,e,n,t.from]),this._from=ge([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,n=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||e<s),!this._active){this._target[n]=a,this._notify(!0);return}if(e<0){this._target[n]=o;return}l=e/s%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){const e=t?"res":"rej",s=this._promises||[];for(let n=0;n<s.length;n++)s[n][e]()}}class pn{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!C(t))return;const e=Object.keys(W.animation),s=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const o=t[n];if(!C(o))return;const r={};for(const a of e)r[a]=o[a];(H(o.properties)&&o.properties||[n]).forEach(a=>{(a===n||!s.has(a))&&s.set(a,r)})})}_animateOptions(t,e){const s=e.options,n=Cr(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&Or(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){const s=this._properties,n=[],o=t.$animations||(t.$animations={}),r=Object.keys(e),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}const h=e[c];let d=o[c];const f=s.get(c);if(d)if(f&&d.active()){d.update(f,h,a);continue}else d.cancel();if(!f||!f.duration){t[c]=h;continue}o[c]=d=new Dr(f,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const s=this._createAnimations(t,e);if(s.length)return at.add(this._chart,s),!0}}function Or(i,t){const e=[],s=Object.keys(t);for(let n=0;n<s.length;n++){const o=i[s[n]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function Cr(i,t){if(!t)return;let e=i.options;if(!e){i.options=t;return}return e.$shared&&(i.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function Xi(i,t){const e=i&&i.options||{},s=e.reverse,n=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:s?o:n,end:s?n:o}}function Ar(i,t,e){if(e===!1)return!1;const s=Xi(i,e),n=Xi(t,e);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}function Tr(i){let t,e,s,n;return C(i)?(t=i.top,e=i.right,s=i.bottom,n=i.left):t=e=s=n=i,{top:t,right:e,bottom:s,left:n,disabled:i===!1}}function mn(i,t){const e=[],s=i._getSortedDatasetMetas(t);let n,o;for(n=0,o=s.length;n<o;++n)e.push(s[n].index);rLine truncated
|
||||
`)>-1?i.split(`
|
||||
`):i}function Jl(i,t){const{element:e,datasetIndex:s,index:n}=t,o=i.getDatasetMeta(s).controller,{label:r,value:a}=o.getLabelAndValue(n);return{chart:i,label:r,parsed:o.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:a,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function Ds(i,t){const e=i.chart.ctx,{body:s,footer:n,title:o}=i,{boxWidth:r,boxHeight:a}=t,l=X(t.bodyFont),c=X(t.titleFont),h=X(t.footerFont),d=o.length,f=n.length,u=s.length,p=tt(t.padding);let g=p.height,m=0,b=s.reduce((y,x)=>y+x.before.length+x.lines.length+x.after.length,0);if(b+=i.beforeBody.length+i.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const y=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;g+=u*y+(b-u)*l.lineHeight+(b-1)*t.bodySpacing}f&&(g+=t.footerMarginTop+f*h.lineHeight+(f-1)*t.footerSpacing);let _=0;const v=function(y){m=Math.max(m,e.measureText(y).width+_)};return e.save(),e.font=c.string,R(i.title,v),e.font=l.string,R(i.beforeBody.concat(i.afterBody),v),_=t.displayColors?r+2+t.boxPadding:0,R(s,y=>{R(y.before,v),R(y.lines,v),R(y.after,v)}),_=0,e.font=h.string,R(i.footer,v),e.restore(),m+=p.width,{width:m,height:g}}function Zl(i,t){const{y:e,height:s}=t;return e<s/2?"top":e>i.height-s/2?"bottom":"center"}function Ql(i,t,e,s){const{x:n,width:o}=s,r=e.caretSize+e.caretPadding;if(i==="left"&&n+o+r>t.width||i==="right"&&n-o-r<0)return!0}function tc(i,t,e,s){const{x:n,width:o}=e,{width:r,chartArea:{left:a,right:l}}=i;let c="center";return s==="center"?c=n<=(a+l)/2?"left":"right":n<=o/2?c="left":n>=r-o/2&&(c="right"),Ql(c,i,t,e)&&(c="center"),c}function Os(i,t,e){const s=e.yAlign||t.yAlign||Zl(i,e);return{xAlign:e.xAlign||t.xAlign||tc(i,t,e,s),yAlign:s}}function ec(i,t){let{x:e,width:s}=i;return t==="right"?e-=s:t==="center"&&(e-=s/2),e}function ic(i,t,e){let{y:s,height:n}=i;return t==="top"?s+=e:t==="bottom"?s-=n+e:s-=n/2,s}function Cs(i,t,e,s){const{caretSize:n,caretPadding:o,cornerRadius:r}=i,{xAlign:a,yAlign:l}=e,c=n+o,{topLeft:h,topRight:d,bottomLeft:f,bottomRight:u}=Et(r);let p=ec(t,a);const g=ic(t,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(h,f)+n:a==="right"&&(p+=Math.max(d,u)+n),{x:Y(p,0,s.width-t.width),y:Y(g,0,s.height-t.height)}}function ve(i,t,e){const s=tt(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function As(i){return st([],lt(i))}function sc(i,t,e){return Ct(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Ts(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}const En={beforeTitle:rt,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex<s)return e[t.dataIndex]}return""},afterTitle:rt,beforeBody:rt,beforeLabel:rt,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let t=i.dataset.label||"";t&&(t+=": ");const e=i.formattedValue;return T(e)||(t+=e),t},labelColor(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:rt,afterBody:rt,beforeFooter:rt,footer:rt,afterFooter:rt};function K(i,t,e,s){const n=i[t].call(e,s);return typeof n>"u"?En[t].call(e,s):n}class Rs extends ft{static positioners=qt;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,o=new pn(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=sc(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:s}=e,n=K(s,"beforeTitle",this,t),o=K(s,"title",this,t),r=K(s,"afterTitle",this,t);let a=[];return a=st(a,lt(n)),a=st(a,lt(o)),a=st(a,lt(r)),a}getBeforeBody(t,e){return As(K(e.
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
.sparkline-card[data-v-257cbdca]{background:#ffffffbf;border:1px solid rgba(0,0,0,.06);border-radius:12px;padding:12px 14px;-webkit-backdrop-filter:blur(50px);backdrop-filter:blur(50px);overflow:hidden;transition:background .3s ease,border-color .3s ease,box-shadow .3s ease;box-shadow:0 4px 16px #0000000a,0 1px 3px #00000005}.dark .sparkline-card[data-v-257cbdca]{background:#0006;border:1px solid rgba(255,255,255,.05);box-shadow:0 4px 16px #0003}.card-header[data-v-257cbdca]{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:8px}.card-title[data-v-257cbdca]{color:#4b5563b3;font-size:11px;font-weight:500;text-transform:uppercase;letter-spacing:.05em;transition:color .3s ease}.dark .card-title[data-v-257cbdca]{color:#fff9}.card-subtitle[data-v-257cbdca]{color:#4b556380;font-size:9px;font-weight:400;margin-top:2px;transition:color .3s ease}.dark .card-subtitle[data-v-257cbdca]{color:#fff6}.card-value[data-v-257cbdca]{font-size:22px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums}.card-chart[data-v-257cbdca]{width:100%;height:28px;overflow:hidden}.chart-svg[data-v-257cbdca]{width:100%;height:100%}.chart-loader[data-v-257cbdca]{display:flex;align-items:center;justify-content:center;height:100%}.loader-spinner[data-v-257cbdca]{width:18px;height:18px;border:2px solid rgba(255,255,255,.2);border-radius:50%;animation:spin-257cbdca 1s linear infinite}.chart-text[data-v-257cbdca]{display:flex;align-items:center;justify-content:center;height:100%}.percent-value[data-v-257cbdca]{font-size:20px;font-weight:500;color:#ffffff80;font-variant-numeric:tabular-nums}.sparkline-path[data-v-257cbdca]{transition:d 1s ease-out}@keyframes spin-257cbdca{to{transform:rotate(360deg)}}@media (min-width: 1024px){.sparkline-card[data-v-257cbdca]{padding:14px 16px}.card-header[data-v-257cbdca]{margin-bottom:10px}.card-title[data-v-257cbdca]{font-size:12px}.card-value[data-v-257cbdca]{font-size:26px}.card-chart[data-v-257cbdca]{height:32px}.percent-value[data-v-257cbdca]{font-size:24px}}
|
||||
@@ -0,0 +1,6 @@
|
||||
import{a as Ae,c as j,b as O,e as I,g as U,t as Z,n as ye,F as ge,p as Y,x as Ge}from"./index-C2DY4pTz.js";import{g as Ve}from"./chart-B185MtDy.js";const ze={class:"sparkline-card"},je={class:"card-header"},Ue={class:"card-title"},Ze={key:0,class:"card-subtitle"},Je={key:0,class:"card-chart"},Ke={key:0,class:"chart-loader"},Se={key:1,class:"chart-text"},et={class:"percent-value"},tt=["id","viewBox"],nt=["d","fill"],rt=["d","stroke"],J=100,K=40,at=Ae({name:"SparklineChart",__name:"Sparkline",props:{title:{},value:{},color:{},data:{default:()=>[]},showChart:{type:Boolean,default:!0},variant:{default:"smooth"},loading:{type:Boolean,default:!1},centerText:{default:""},subtitle:{default:""}},setup(r){const e=r,t=i=>{if(i.length<3)return i;const d=Math.min(15,Math.max(3,Math.floor(i.length*.2))),f=[];for(let D=0;D<i.length;D++){const P=Math.floor(d/2),l=Math.max(0,D-P),w=Math.min(i.length,D+P+1),k=i.slice(l,w);f.push(k.reduce((R,H)=>R+H,0)/k.length)}const y=Math.min(10,f.length),T=f.length/y,N=[];for(let D=0;D<y;D++){const P=Math.floor(D*T);N.push(f[P])}return N},n=j(()=>!e.data||e.data.length===0?[]:e.variant==="smooth"?t(e.data):e.data),a=i=>{if(i.length<2)return"";const d=Math.max(...i),f=Math.min(...i),y=d-f||1,T=e.variant==="classic"?4:2;let N="";return i.forEach((D,P)=>{const l=P/(i.length-1)*J,w=(D-f)/y,k=T+(K-T*2)*(1-w);if(P===0)N+=`M ${l.toFixed(2)} ${k.toFixed(2)}`;else{const H=((P-1)/(i.length-1)*J+l)/2;N+=` Q ${H.toFixed(2)} ${k.toFixed(2)} ${l.toFixed(2)} ${k.toFixed(2)}`}}),N},s=j(()=>a(n.value)),o=j(()=>s.value?`${s.value} L ${J} ${K} L 0 ${K} Z`:""),c=j(()=>`sparkline-${e.title.replace(/\s+/g,"-").toLowerCase()}`);return(i,d)=>(Y(),O("div",ze,[I("div",je,[I("div",null,[I("p",Ue,Z(i.title),1),i.subtitle?(Y(),O("p",Ze,Z(i.subtitle),1)):U("",!0)]),I("span",{class:"card-value",style:ye({color:i.color})},Z(typeof i.value=="number"?i.value.toLocaleString():i.value),5)]),i.showChart?(Y(),O("div",Je,[i.loading&&i.variant==="classic"?(Y(),O("div",Ke,[I("div",{class:"loader-spinner",style:ye({borderTopColor:i.color})},null,4)])):i.centerText?(Y(),O("div",Se,[I("span",et,Z(i.centerText),1)])):(Y(),O("svg",{key:2,id:c.value,class:"chart-svg",viewBox:`0 0 ${J} ${K}`,preserveAspectRatio:"none"},[i.variant==="classic"?(Y(),O(ge,{key:0},[n.value.length>1?(Y(),O("path",{key:0,d:o.value,fill:i.color,"fill-opacity":"0.8",class:"sparkline-path"},null,8,nt)):U("",!0)],64)):(Y(),O(ge,{key:1},[n.value.length>1?(Y(),O("path",{key:0,d:s.value,stroke:i.color,"stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:"sparkline-path"},null,8,rt)):U("",!0)],64))],8,tt))])):U("",!0)]))}}),Vr=Ge(at,[["__scopeId","data-v-257cbdca"]]),Te=6048e5,st=864e5,G=6e4,V=36e5,ot=1e3,pe=Symbol.for("constructDateFrom");function p(r,e){return typeof r=="function"?r(e):r&&typeof r=="object"&&pe in r?r[pe](e):r instanceof Date?new r.constructor(e):new Date(e)}function u(r,e){return p(e||r,r)}function ne(r,e,t){const n=u(r,t?.in);return isNaN(e)?p(t?.in||r,NaN):(e&&n.setDate(n.getDate()+e),n)}function ce(r,e,t){const n=u(r,t?.in);if(isNaN(e))return p(r,NaN);if(!e)return n;const a=n.getDate(),s=p(r,n.getTime());s.setMonth(n.getMonth()+e+1,0);const o=s.getDate();return a>=o?s:(n.setFullYear(s.getFullYear(),s.getMonth(),a),n)}function ue(r,e,t){return p(r,+u(r)+e)}function it(r,e,t){return ue(r,e*V)}let ct={};function F(){return ct}function W(r,e){const t=F(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,a=u(r,e?.in),s=a.getDay(),o=(s<n?7:0)+s-n;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function Q(r,e){return W(r,{...e,weekStartsOn:1})}function Pe(r,e){const t=u(r,e?.in),n=t.getFullYear(),a=p(t,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const s=Q(a),o=p(t,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const c=Q(o);return t.getTime()>=s.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}function ee(r){const e=u(r),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+r-+t}function C(r,...e){const t=p.bind(null,e.find(n=>typeof n=="object"));return e.map(t)}function se(r,e){const t=u(r,e?.in);return t.setHours(0,0,0,0),t}function Oe(r,e,t){const[n,a]=C(t?.in,r,e),s=se(n),o=se(a),c=+s-ee(s),i=+o-ee(o);return Math.round((c-i)/st)}function ut(r,e){const t=Pe(r,e),n=p(r,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Q(n)}function dt(r,e,t){const n=u(r,t?.in);return n.setTime(n.getTime()+e*G),n}function lt(r,e,t){return ce(r,e*3,t)}function ft(r,e,t){return ue(r,e*1e3)}function ht(r,e,t){return ne(r,e*7,t)}function mt(r,e,t){return ce(r,e*12,t)}function A(r,e){const t=+u(r)-+u(e);return t<0?-1:t>0?1:t}function wt(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function Ye(r){return!(!wt(r)&&typeof r!="number"||isNaN(+u(r)))}function yt(r,e,t){const[n,a]=C(t?.in,r,e),s=n.getFullYear()-a.getFulLine truncated
|
||||
* chartjs-adapter-date-fns v3.0.0
|
||||
* https://www.chartjs.org
|
||||
* (c) 2022 chartjs-adapter-date-fns Contributors
|
||||
* Released under the MIT license
|
||||
*/const $r={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};Ve._date.override({_id:"date-fns",formats:function(){return $r},parse:function(r,e){if(r===null||typeof r>"u")return null;const t=typeof r;return t==="number"||r instanceof Date?r=u(r):t==="string"&&(typeof e=="string"?r=Dr(r,e,new Date,this.options):r=Yr(r,this.options)),Ye(r)?r.getTime():null},format:function(r,e){return Tn(r,e,this.options)},add:function(r,e,t){switch(t){case"millisecond":return ue(r,e);case"second":return ft(r,e);case"minute":return dt(r,e);case"hour":return it(r,e);case"day":return ne(r,e);case"week":return ht(r,e);case"month":return ce(r,e);case"quarter":return lt(r,e);case"year":return mt(r,e);default:return r}},diff:function(r,e,t){switch(t){case"millisecond":return de(r,e);case"second":return Dt(r,e);case"minute":return bt(r,e);case"hour":return pt(r,e);case"day":return ve(r,e);case"week":return kt(r,e);case"month":return Ne(r,e);case"quarter":return Mt(r,e);case"year":return Tt(r,e);default:return 0}},startOf:function(r,e,t){switch(e){case"second":return Or(r);case"minute":return Pr(r);case"hour":return Tr(r);case"day":return se(r);case"week":return W(r);case"isoWeek":return W(r,{weekStartsOn:+t});case"month":return Ot(r);case"quarter":return Pt(r);case"year":return Ee(r);default:return r}},endOf:function(r,e){switch(e){case"second":return Et(r);case"minute":return Wt(r);case"hour":return vt(r);case"day":return _e(r);case"week":return _t(r);case"month":return We(r);case"quarter":return Nt(r);case"year":return Yt(r);default:return r}}});export{Vr as S};
|
||||
@@ -0,0 +1,35 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Setup-CbTFhVaK.js","assets/Setup-RshMWyiL.css","assets/Login-l9pwpiS6.js","assets/Login-BiyTDci2.css","assets/Dashboard-DMnus2lM.js","assets/chart-B185MtDy.js","assets/useSignalQuality-D9wfbwdb.js","assets/preferences-DtwbSSgO.js","assets/Dashboard-QP8Te5jj.css","assets/Neighbors-BhwSlX3P.js","assets/leaflet-src-BtisrQHC.js","assets/_commonjsHelpers-CqkleIqs.js","assets/Neighbors-Dm-0E9wE.css","assets/leaflet-Dgihpmma.css","assets/Statistics-D8GGvrdt.js","assets/chartjs-adapter-date-fns.esm-BTd89PGn.js","assets/chartjs-adapter-date-fns-kwjCs6JU.css","assets/plotly.min-DO11Gp-n.js","assets/Statistics-D4QKs0bR.css","assets/SystemStats-C7xzR_wP.js","assets/SystemStats-B8-MXEai.css","assets/Configuration-BFp_Zwgj.js","assets/ConfirmDialog.vue_vue_type_script_setup_true_lang-BIwbENrM.js","assets/Configuration-DCyoN75P.css","assets/CADCalibration-sfiSWhAM.js","assets/CADCalibration-DnmufMQ0.css","assets/RoomServers-IKqFauvg.js","assets/Terminal-DYn8WA9j.js","assets/Terminal-NOfYg9Od.css"])))=>i.map(i=>d[i]);
|
||||
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();/**
|
||||
* @vue/shared v3.5.18
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**//*! #__NO_SIDE_EFFECTS__ */function ao(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const we={},Cn=[],Et=()=>{},Vc=()=>!1,Zr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),lo=e=>e.startsWith("onUpdate:"),Ie=Object.assign,co=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Bc=Object.prototype.hasOwnProperty,Ce=(e,t)=>Bc.call(e,t),ae=Array.isArray,_n=e=>ir(e)==="[object Map]",zr=e=>ir(e)==="[object Set]",Uo=e=>ir(e)==="[object Date]",de=e=>typeof e=="function",Te=e=>typeof e=="string",St=e=>typeof e=="symbol",xe=e=>e!==null&&typeof e=="object",ha=e=>(xe(e)||de(e))&&de(e.then)&&de(e.catch),ma=Object.prototype.toString,ir=e=>ma.call(e),Hc=e=>ir(e).slice(8,-1),ga=e=>ir(e)==="[object Object]",uo=e=>Te(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Un=ao(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Jr=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},jc=/-(\w)/g,ut=Jr(e=>e.replace(jc,(t,n)=>n?n.toUpperCase():"")),Uc=/\B([A-Z])/g,Xt=Jr(e=>e.replace(Uc,"-$1").toLowerCase()),Yr=Jr(e=>e.charAt(0).toUpperCase()+e.slice(1)),gs=Jr(e=>e?`on${Yr(e)}`:""),zt=(e,t)=>!Object.is(e,t),kr=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Fs=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Lr=e=>{const t=parseFloat(e);return isNaN(t)?e:t},qc=e=>{const t=Te(e)?Number(e):NaN;return isNaN(t)?e:t};let qo;const Qr=()=>qo||(qo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function On(e){if(ae(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],s=Te(r)?Zc(r):On(r);if(s)for(const o in s)t[o]=s[o]}return t}else if(Te(e)||xe(e))return e}const Kc=/;(?![^(]*\))/g,Wc=/:([^]+)/,Gc=/\/\*[^]*?\*\//g;function Zc(e){const t={};return e.replace(Gc,"").split(Kc).forEach(n=>{if(n){const r=n.split(Wc);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function le(e){let t="";if(Te(e))t=e;else if(ae(e))for(let n=0;n<e.length;n++){const r=le(e[n]);r&&(t+=r+" ")}else if(xe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const zc="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Jc=ao(zc);function ya(e){return!!e||e===""}function Yc(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=xn(e[r],t[r]);return n}function xn(e,t){if(e===t)return!0;let n=Uo(e),r=Uo(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=St(e),r=St(t),n||r)return e===t;if(n=ae(e),r=ae(t),n||r)return n&&r?Yc(e,t):!1;if(n=xe(e),r=xe(t),n||r){if(!n||!r)return!1;const s=Object.keys(e).length,o=Object.keys(t).length;if(s!==o)return!1;for(const i in e){const a=e.hasOwnProperty(i),c=t.hasOwnProperty(i);if(a&&!c||!a&&c||!xn(e[i],t[i]))return!1}}return String(e)===String(t)}function Qc(e,t){return e.findIndex(n=>xn(n,t))}const va=e=>!!(e&&e.__v_isRef===!0),X=e=>Te(e)?e:e==null?"":ae(e)||xe(e)&&(e.toString===ma||!de(e.toString))?va(e)?X(e.value):JSON.stringify(e,ba,2):String(e),ba=(e,t)=>va(t)?ba(e,t.value):_n(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],o)=>(n[ys(r,o)+" =>"]=s,n),{})}:zr(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ys(n))}:St(t)?ys(t):xe(t)&&!ae(t)&&!ga(t)?String(t):t,ys=(e,t="")=>{var n;return St(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
||||
* @vue/reactivity v3.5.18
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/let Ve;class Ca{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Ve,!t&&Ve&&(this.index=(Ve.scopes||(Ve.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Ve;try{return Ve=this,t()}finally{Ve=n}}}on(){++this._on===1&&(this.prevScope=Ve,Ve=this)}off(){this._on>0&&--this._on===0&&(Ve=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function _a(e){return new Ca(e)}function wa(){return Ve}function Xc(e,t=!1){Ve&&Ve.cleanups.push(e)}let Ee;const vs=new WeakSet;class xa{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ve&&Ve.active&&Ve.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,vs.has(this)&&(vs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ea(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ko(this),Sa(this);const t=Ee,n=dt;Ee=this,dt=!0;try{return this.fn()}finally{Aa(this),Ee=t,dt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ho(t);this.deps=this.depsTail=void 0,Ko(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?vs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Vs(this)&&this.run()}get dirty(){return Vs(this)}}let ka=0,qn,Kn;function Ea(e,t=!1){if(e.flags|=8,t){e.next=Kn,Kn=e;return}e.next=qn,qn=e}function fo(){ka++}function po(){if(--ka>0)return;if(Kn){let t=Kn;for(Kn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;qn;){let t=qn;for(qn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function Sa(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Aa(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),ho(r),eu(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function Vs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ra(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ra(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Xn)||(e.globalVersion=Xn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Vs(e))))return;e.flags|=2;const t=e.dep,n=Ee,r=dt;Ee=e,dt=!0;try{Sa(e);const s=e.fn(e._value);(t.version===0||zt(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{Ee=n,dt=r,Aa(e),e.flags&=-3}}function ho(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)ho(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function eu(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let dt=!0;const Ta=[];function It(){Ta.push(dt),dt=!1}function Dt(){const e=Ta.pop();dt=e===void 0?!0:e}function Ko(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ee;Ee=void 0;try{t()}finally{Ee=n}}}let Xn=0;class tu{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class mo{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Ee||!dt||Ee===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ee)n=this.activeLink=new tu(Ee,this),Ee.deps?(n.prevDep=Ee.depsTail,Ee.depsTail.nextDep=n,Ee.depsTail=n):Ee.deps=Ee.depsTail=n,Oa(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=Ee.depsTail,n.nextDep=void 0,Ee.depsTail.nextDep=n,Ee.depsTail=n,Ee.deps===n&&(Ee.deps=r)}return n}trigger(t){this.version++,Xn++,this.notify(t)}notify(t){fo();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{po()}}}functiLine truncated
|
||||
* @vue/runtime-core v3.5.18
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/function lr(e,t,n,r){try{return r?e(...r):e()}catch(s){cr(s,t,n)}}function ft(e,t,n,r){if(de(e)){const s=lr(e,t,n,r);return s&&ha(s)&&s.catch(o=>{cr(o,t,n)}),s}if(ae(e)){const s=[];for(let o=0;o<e.length;o++)s.push(ft(e[o],t,n,r));return s}}function cr(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||we;if(t){let a=t.parent;const c=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const l=a.ec;if(l){for(let d=0;d<l.length;d++)if(l[d](e,c,u)===!1)return}a=a.parent}if(o){It(),lr(o,null,10,[e,c,u]),Dt();return}}Tu(e,n,s,r,i)}function Tu(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const We=[];let wt=-1;const wn=[];let Ut=null,vn=0;const Ha=Promise.resolve();let $r=null;function es(e){const t=$r||Ha;return e?t.then(this?e.bind(this):e):t}function Ou(e){let t=wt+1,n=We.length;for(;t<n;){const r=t+n>>>1,s=We[r],o=tr(s);o<e||o===e&&s.flags&2?t=r+1:n=r}return t}function Co(e){if(!(e.flags&1)){const t=tr(e),n=We[We.length-1];!n||!(e.flags&2)&&t>=tr(n)?We.push(e):We.splice(Ou(t),0,e),e.flags|=1,ja()}}function ja(){$r||($r=Ha.then(qa))}function Mu(e){ae(e)?wn.push(...e):Ut&&e.id===-1?Ut.splice(vn+1,0,e):e.flags&1||(wn.push(e),e.flags|=1),ja()}function Go(e,t,n=wt+1){for(;n<We.length;n++){const r=We[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;We.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Ua(e){if(wn.length){const t=[...new Set(wn)].sort((n,r)=>tr(n)-tr(r));if(wn.length=0,Ut){Ut.push(...t);return}for(Ut=t,vn=0;vn<Ut.length;vn++){const n=Ut[vn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Ut=null,vn=0}}const tr=e=>e.id==null?e.flags&2?-1:1/0:e.id;function qa(e){try{for(wt=0;wt<We.length;wt++){const t=We[wt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),lr(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;wt<We.length;wt++){const t=We[wt];t&&(t.flags&=-2)}wt=-1,We.length=0,Ua(),$r=null,(We.length||wn.length)&&qa()}}let rt=null,Ka=null;function Fr(e){const t=rt;return rt=e,Ka=e&&e.type.__scopeId||null,t}function Pu(e,t=rt,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&li(-1);const o=Fr(t);let i;try{i=e(...s)}finally{Fr(o),r._d&&li(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function ph(e,t){if(rt===null)return e;const n=as(rt),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[o,i,a,c=we]=t[s];o&&(de(o)&&(o={mounted:o,updated:o}),o.deep&&Pt(i),r.push({dir:o,instance:n,value:i,oldValue:void 0,arg:a,modifiers:c}))}return e}function en(e,t,n,r){const s=e.dirs,o=t&&t.dirs;for(let i=0;i<s.length;i++){const a=s[i];o&&(a.oldValue=o[i].value);let c=a.dir[r];c&&(It(),ft(c,n,8,[e.el,a,e,t]),Dt())}}const Wa=Symbol("_vte"),Ga=e=>e.__isTeleport,Wn=e=>e&&(e.disabled||e.disabled===""),Zo=e=>e&&(e.defer||e.defer===""),zo=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Jo=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,js=(e,t)=>{const n=e&&e.to;return Te(n)?t?t(n):null:n},Za={name:"Teleport",__isTeleport:!0,process(e,t,n,r,s,o,i,a,c,u){const{mc:l,pc:d,pbc:f,o:{insert:y,querySelector:g,createText:b,createComment:x}}=u,k=Wn(t.props);let{shapeFlag:L,children:E,dynamicChildren:R}=t;if(e==null){const H=t.el=b(""),ee=t.anchor=b("");y(H,n,r),y(ee,n,r);const G=(T,q)=>{L&16&&(s&&s.isCE&&(s.ce._teleportTarget=T),l(E,T,q,s,o,i,a,c))},J=()=>{const T=t.target=js(t.props,g),q=za(T,t,b,y);T&&(i!=="svg"&&zo(T)?i="svg":i!=="mathml"&&Jo(T)&&(i="mathml"),k||(G(T,q),Er(t,!1)))};k&&(G(n,ee),Er(t,!0)),Zo(t.props)?(t.el.__isMounted=!1,qe(()=>{J(),delete t.el.__isMounted},o)):J()}else{if(Zo(t.props)&&e.el.__isMounted===!1){qe(()=>{Za.process(e,t,n,r,s,o,i,a,c,u)},o);return}t.el=e.el,t.targetStart=e.targetStart;const H=t.anchor=e.anchor,ee=t.target=e.target,G=t.targetAnchor=e.targetAnchor,J=Wn(e.props),T=J?n:ee,q=J?H:G;if(i==="svg"||zo(ee)?i="svg":(i==="mathml"||Jo(ee))&&(i="mathml"),R?(f(e.dynamicChildren,R,T,s,o,i,a),Eo(e,t,!0)):c||d(e,t,T,q,s,o,i,a,!1),k)J?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Cr(t,n,H,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const $=t.target=js(t.props,g);$&&Cr(t,$,null,u,0)}else J&&Cr(t,ee,G,u,1);Er(t,k)}},remove(e,t,n,{um:r,o:{remove:s}},o){const{shapeFlag:i,children:a,anchor:c,targetStart:u,targetAnchor:l,target:d,props:f}=e;if(d&&(s(u),s(l)),o&&s(c),i&16){const y=o||!Wn(f);for(let g=0;g<a.length;g++){const b=a[g];r(b,t,n,y,!!b.dynamicChildren)}}},move:Cr,hydrate:Lu};function Cr(e,t,n,{o:{insert:r},m:s},o=2){o===0&&r(e.targetAnchor,t,n);const{el:i,anchor:a,shapeFlag:c,children:u,props:l}=e,d=o===2;if(d&&r(i,t,n),(!d||Wn(l))&&c&16)for(let f=0;f<u.length;f++)s(u[f],t,n,2);d&&r(a,t,n)}function Lu(e,t,n,r,s,o,{o:{nextSibling:i,parentNode:a,querySelector:c,insert:u,createText:l}},d){const f=t.target=js(t.props,c);if(f){const y=Wn(t.props),g=f._lpa||f.firstChild;if(t.shapeFlag&16)if(y)t.anchor=d(i(e),t,a(e),n,r,s,o),t.targetStart=g,t.targetAnchor=g&&i(g);else{t.anchor=i(e);let b=g;for(;b;){if(b&&b.nodeType===8){if(b.data==="teleport start
Line truncated
|
||||
* @vue/runtime-dom v3.5.18
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/let Zs;const di=typeof window<"u"&&window.trustedTypes;if(di)try{Zs=di.createPolicy("vue",{createHTML:e=>e})}catch{}const Al=Zs?e=>Zs.createHTML(e):e=>e,$1="http://www.w3.org/2000/svg",F1="http://www.w3.org/1998/Math/MathML",Ot=typeof document<"u"?document:null,fi=Ot&&Ot.createElement("template"),V1={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?Ot.createElementNS($1,e):t==="mathml"?Ot.createElementNS(F1,e):n?Ot.createElement(e,{is:n}):Ot.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>Ot.createTextNode(e),createComment:e=>Ot.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ot.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,o){const i=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{fi.innerHTML=Al(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=fi.content;if(r==="svg"||r==="mathml"){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Vt="transition",Dn="animation",En=Symbol("_vtc"),Rl={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Tl=Ie({},Ya,Rl),B1=e=>(e.displayName="Transition",e.props=Tl,e),hh=B1((e,{slots:t})=>Ao(Du,Ol(e),t)),nn=(e,t=[])=>{ae(e)?e.forEach(n=>n(...t)):e&&e(...t)},pi=e=>e?ae(e)?e.some(t=>t.length>1):e.length>1:!1;function Ol(e){const t={};for(const v in e)v in Rl||(t[v]=e[v]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:o=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:c=o,appearActiveClass:u=i,appearToClass:l=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:y=`${n}-leave-to`}=e,g=H1(s),b=g&&g[0],x=g&&g[1],{onBeforeEnter:k,onEnter:L,onEnterCancelled:E,onLeave:R,onLeaveCancelled:H,onBeforeAppear:ee=k,onAppear:G=L,onAppearCancelled:J=E}=t,T=(v,O,N,Q)=>{v._enterCancelled=Q,Ht(v,O?l:a),Ht(v,O?u:i),N&&N()},q=(v,O)=>{v._isLeaving=!1,Ht(v,d),Ht(v,y),Ht(v,f),O&&O()},$=v=>(O,N)=>{const Q=v?G:L,se=()=>T(O,v,N);nn(Q,[O,se]),hi(()=>{Ht(O,v?c:o),_t(O,v?l:a),pi(Q)||mi(O,r,b,se)})};return Ie(t,{onBeforeEnter(v){nn(k,[v]),_t(v,o),_t(v,i)},onBeforeAppear(v){nn(ee,[v]),_t(v,c),_t(v,u)},onEnter:$(!1),onAppear:$(!0),onLeave(v,O){v._isLeaving=!0;const N=()=>q(v,O);_t(v,d),v._enterCancelled?(_t(v,f),zs()):(zs(),_t(v,f)),hi(()=>{v._isLeaving&&(Ht(v,d),_t(v,y),pi(R)||mi(v,r,x,N))}),nn(R,[v,N])},onEnterCancelled(v){T(v,!1,void 0,!0),nn(E,[v])},onAppearCancelled(v){T(v,!0,void 0,!0),nn(J,[v])},onLeaveCancelled(v){q(v),nn(H,[v])}})}function H1(e){if(e==null)return null;if(xe(e))return[Es(e.enter),Es(e.leave)];{const t=Es(e);return[t,t]}}function Es(e){return qc(e)}function _t(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[En]||(e[En]=new Set)).add(t)}function Ht(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[En];n&&(n.delete(t),n.size||(e[En]=void 0))}function hi(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let j1=0;function mi(e,t,n,r){const s=e._endId=++j1,o=()=>{s===e._endId&&r()};if(n!=null)return setTimeout(o,n);const{type:i,timeout:a,propCount:c}=Ml(e,t);if(!i)return r();const u=i+"end";let l=0;const d=()=>{e.removeEventListener(u,f),o()},f=y=>{y.target===e&&++l>=c&&d()};setTimeout(()=>{l<c&&d()},a+1),e.addEventListener(u,f)}function Ml(e,t){const n=window.getComputedStyle(e),r=g=>(n[g]||"").split(", "),s=r(`${Vt}Delay`),o=r(`${Vt}Duration`),i=gi(s,o),a=r(`${Dn}Delay`),c=r(`${Dn}Duration`),u=gi(a,c);let l=null,d=0,f=0;t===Vt?i>0&&(l=Vt,d=i,f=o.length):t===Dn?u>0&&(l=Dn,d=u,f=c.length):(d=Math.max(i,u),l=d>0?i>u?Vt:Dn:null,f=l?l===Vt?o.length:c.length:0);const y=l===Vt&&/\b(transform|all)(,|$)/.test(r(`${Vt}Property`).toString());return{type:l,timeout:d,propCount:f,hasTransform:y}}function gi(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>yi(n)+yi(e[r])))}function yi(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function zs(){return document.body.offsetHeight}function U1(e,t,n){const r=e[En];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const jr=Symbol("_vod"),Pl=Symbol("_vsh"),mh={beforeMount(e,{value:t},{transition:n}){e[jr]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):$n(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},upd
Line truncated
|
||||
* pinia v3.0.4
|
||||
* (c) 2025 Eduardo San Martin Morote
|
||||
* @license MIT
|
||||
*/let Il;const ls=e=>Il=e,Dl=Symbol();function Ys(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Yn;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Yn||(Yn={}));function vd(){const e=_a(!0),t=e.run(()=>ne({}));let n=[],r=[];const s=bo({install(o){ls(s),s._a=o,o.provide(Dl,s),o.config.globalProperties.$pinia=s,r.forEach(i=>n.push(i)),r=[]},use(o){return this._a?n.push(o):r.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return s}const $l=()=>{};function Oi(e,t,n,r=$l){e.add(t);const s=()=>{e.delete(t)&&r()};return!n&&wa()&&Xc(s),s}function yn(e,...t){e.forEach(n=>{n(...t)})}const bd=e=>e(),Mi=Symbol(),Rs=Symbol();function Qs(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],s=e[n];Ys(s)&&Ys(r)&&e.hasOwnProperty(n)&&!Le(r)&&!Jt(r)?e[n]=Qs(s,r):e[n]=r}return e}const Cd=Symbol();function _d(e){return!Ys(e)||!Object.prototype.hasOwnProperty.call(e,Cd)}const{assign:jt}=Object;function wd(e){return!!(Le(e)&&e.effect)}function xd(e,t,n,r){const{state:s,actions:o,getters:i}=t,a=n.state.value[e];let c;function u(){a||(n.state.value[e]=s?s():{});const l=wu(n.state.value[e]);return jt(l,o,Object.keys(i||{}).reduce((d,f)=>(d[f]=bo(ie(()=>{ls(n);const y=n._s.get(e);return i[f].call(y,y)})),d),{}))}return c=Fl(e,u,t,n,r,!0),c}function Fl(e,t,n={},r,s,o){let i;const a=jt({actions:{}},n),c={deep:!0};let u,l,d=new Set,f=new Set,y;const g=r.state.value[e];!o&&!g&&(r.state.value[e]={}),ne({});let b;function x(J){let T;u=l=!1,typeof J=="function"?(J(r.state.value[e]),T={type:Yn.patchFunction,storeId:e,events:y}):(Qs(r.state.value[e],J),T={type:Yn.patchObject,payload:J,storeId:e,events:y});const q=b=Symbol();es().then(()=>{b===q&&(u=!0)}),l=!0,yn(d,T,r.state.value[e])}const k=o?function(){const{state:T}=n,q=T?T():{};this.$patch($=>{jt($,q)})}:$l;function L(){i.stop(),d.clear(),f.clear(),r._s.delete(e)}const E=(J,T="")=>{if(Mi in J)return J[Rs]=T,J;const q=function(){ls(r);const $=Array.from(arguments),v=new Set,O=new Set;function N(j){v.add(j)}function Q(j){O.add(j)}yn(f,{args:$,name:q[Rs],store:H,after:N,onError:Q});let se;try{se=J.apply(this&&this.$id===e?this:H,$)}catch(j){throw yn(O,j),j}return se instanceof Promise?se.then(j=>(yn(v,j),j)).catch(j=>(yn(O,j),Promise.reject(j))):(yn(v,se),se)};return q[Mi]=!0,q[Rs]=T,q},R={_p:r,$id:e,$onAction:Oi.bind(null,f),$patch:x,$reset:k,$subscribe(J,T={}){const q=Oi(d,J,T.detached,()=>$()),$=i.run(()=>Lt(()=>r.state.value[e],v=>{(T.flush==="sync"?l:u)&&J({storeId:e,type:Yn.direct,events:y},v)},jt({},c,T)));return q},$dispose:L},H=ar(R);r._s.set(e,H);const G=(r._a&&r._a.runWithContext||bd)(()=>r._e.run(()=>(i=_a()).run(()=>t({action:E}))));for(const J in G){const T=G[J];if(Le(T)&&!wd(T)||Jt(T))o||(g&&_d(T)&&(Le(T)?T.value=g[J]:Qs(T,g[J])),r.state.value[e][J]=T);else if(typeof T=="function"){const q=E(T,J);G[J]=q,a.actions[J]=T}}return jt(H,G),jt(ye(H),G),Object.defineProperty(H,"$state",{get:()=>r.state.value[e],set:J=>{x(T=>{jt(T,J)})}}),r._p.forEach(J=>{jt(H,i.run(()=>J({store:H,app:r._a,pinia:r,options:a})))}),g&&o&&n.hydrate&&n.hydrate(H.$state,g),u=!0,l=!0,H}/*! #__NO_SIDE_EFFECTS__ */function Ro(e,t,n){let r;const s=typeof t=="function";r=s?n:t;function o(i,a){const c=n1();return i=i||(c?ct(Dl,null):null),i&&ls(i),i=Il,i._s.has(e)||(s?Fl(e,t,r,i):xd(e,r,i)),i._s.get(e)}return o.$id=e,o}/*!
|
||||
* vue-router v4.6.3
|
||||
* (c) 2025 Eduardo San Martin Morote
|
||||
* @license MIT
|
||||
*/const bn=typeof document<"u";function Vl(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function kd(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Vl(e.default)}const be=Object.assign;function Ts(e,t){const n={};for(const r in t){const s=t[r];n[r]=pt(s)?s.map(e):e(s)}return n}const Qn=()=>{},pt=Array.isArray;function Pi(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}const Bl=/#/g,Ed=/&/g,Sd=/\//g,Ad=/=/g,Rd=/\?/g,Hl=/\+/g,Td=/%5B/g,Od=/%5D/g,jl=/%5E/g,Md=/%60/g,Ul=/%7B/g,Pd=/%7C/g,ql=/%7D/g,Ld=/%20/g;function To(e){return e==null?"":encodeURI(""+e).replace(Pd,"|").replace(Td,"[").replace(Od,"]")}function Nd(e){return To(e).replace(Ul,"{").replace(ql,"}").replace(jl,"^")}function Xs(e){return To(e).replace(Hl,"%2B").replace(Ld,"+").replace(Bl,"%23").replace(Ed,"%26").replace(Md,"`").replace(Ul,"{").replace(ql,"}").replace(jl,"^")}function Id(e){return Xs(e).replace(Ad,"%3D")}function Dd(e){return To(e).replace(Bl,"%23").replace(Rd,"%3F")}function $d(e){return Dd(e).replace(Sd,"%2F")}function or(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Fd=/\/$/,Vd=e=>e.replace(Fd,"");function Os(e,t,n="/"){let r,s={},o="",i="";const a=t.indexOf("#");let c=t.indexOf("?");return c=a>=0&&c>a?-1:c,c>=0&&(r=t.slice(0,c),o=t.slice(c,a>0?a:t.length),s=e(o.slice(1))),a>=0&&(r=r||t.slice(0,a),i=t.slice(a,t.length)),r=Ud(r??t,n),{fullPath:r+o+i,path:r,query:s,hash:or(i)}}function Bd(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Li(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Hd(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&An(t.matched[r],n.matched[s])&&Kl(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function An(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Kl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!jd(e[n],t[n]))return!1;return!0}function jd(e,t){return pt(e)?Ni(e,t):pt(t)?Ni(t,e):e===t}function Ni(e,t){return pt(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function Ud(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let o=n.length-1,i,a;for(i=0;i<r.length;i++)if(a=r[i],a!==".")if(a==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(i).join("/")}const Bt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let eo=function(e){return e.pop="pop",e.push="push",e}({}),Ms=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function qd(e){if(!e)if(bn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Vd(e)}const Kd=/^[^#]+#/;function Wd(e,t){return e.replace(Kd,"#")+t}function Gd(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const cs=()=>({left:window.scrollX,top:window.scrollY});function Zd(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=Gd(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Ii(e,t){return(history.state?history.state.position-t:-1)+e}const to=new Map;function zd(e,t){to.set(e,t)}function Jd(e){const t=to.get(e);return to.delete(e),t}function Yd(e){return typeof e=="string"||e&&typeof e=="object"}function Wl(e){return typeof e=="string"||typeof e=="symbol"}let Oe=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const Gl=Symbol("");Oe.MATCHER_NOT_FOUND+"",Oe.NAVIGATION_GUARD_REDIRECT+"",Oe.NAVIGATION_ABORTED+"",Oe.NAVIGATION_CANCELLED+"",Oe.NAVIGATION_DUPLICATED+"";function Rn(e,t){return be(new Error,{type:e,[Gl]:!0},t)}function Tt(e,t){return e instanceof Error&&Gl in e&&(t==null||!!(e.type&t))}const Qd=["params","query","hash"];function Xd(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Qd)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function ef(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<n.length;++r){const s=n[r].replace(Hl," "),o=s.indexOf("="),i=or(o<0?s:s.slice(0,o)),a=o<0?null:or(s.slice(o+1));if(i in t){let c=t[i];pt(c)||(c=t[i]=[c]),c.push(a)}else t[i]=a}return t}function Di(e){let t="";for(let n in e){conLine truncated
|
||||
* vue-router v4.6.3
|
||||
* (c) 2025 Eduardo San Martin Morote
|
||||
* @license MIT
|
||||
*/let sf=()=>location.protocol+"//"+location.host;function Zl(e,t){const{pathname:n,search:r,hash:s}=t,o=e.indexOf("#");if(o>-1){let i=s.includes(e.slice(o))?e.slice(o).length:1,a=s.slice(i);return a[0]!=="/"&&(a="/"+a),Li(a,"")}return Li(n,e)+r+s}function of(e,t,n,r){let s=[],o=[],i=null;const a=({state:f})=>{const y=Zl(e,location),g=n.value,b=t.value;let x=0;if(f){if(n.value=y,t.value=f,i&&i===g){i=null;return}x=b?f.position-b.position:0}else r(y);s.forEach(k=>{k(n.value,g,{delta:x,type:eo.pop,direction:x?x>0?Ms.forward:Ms.back:Ms.unknown})})};function c(){i=n.value}function u(f){s.push(f);const y=()=>{const g=s.indexOf(f);g>-1&&s.splice(g,1)};return o.push(y),y}function l(){if(document.visibilityState==="hidden"){const{history:f}=window;if(!f.state)return;f.replaceState(be({},f.state,{scroll:cs()}),"")}}function d(){for(const f of o)f();o=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",l),document.removeEventListener("visibilitychange",l)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",l),document.addEventListener("visibilitychange",l),{pauseListeners:c,listen:u,destroy:d}}function Fi(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?cs():null}}function af(e){const{history:t,location:n}=window,r={value:Zl(e,n)},s={value:t.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(c,u,l){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+c:sf()+e+c;try{t[l?"replaceState":"pushState"](u,"",f),s.value=u}catch(y){console.error(y),n[l?"replace":"assign"](f)}}function i(c,u){o(c,be({},t.state,Fi(s.value.back,c,s.value.forward,!0),u,{position:s.value.position}),!0),r.value=c}function a(c,u){const l=be({},s.value,t.state,{forward:c,scroll:cs()});o(l.current,l,!0),o(c,be({},Fi(r.value,c,null),{position:l.position+1},u),!1),r.value=c}return{location:r,state:s,push:a,replace:i}}function lf(e){e=qd(e);const t=af(e),n=of(e,t.state,t.location,t.replace);function r(o,i=!0){i||n.pauseListeners(),history.go(o)}const s=be({location:"",base:e,go:r,createHref:Wd.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}let an=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var Ne=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(Ne||{});const cf={type:an.Static,value:""},uf=/[a-zA-Z0-9_]/;function df(e){if(!e)return[[]];if(e==="/")return[[cf]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(y){throw new Error(`ERR (${n})/"${u}": ${y}`)}let n=Ne.Static,r=n;const s=[];let o;function i(){o&&s.push(o),o=[]}let a=0,c,u="",l="";function d(){u&&(n===Ne.Static?o.push({type:an.Static,value:u}):n===Ne.Param||n===Ne.ParamRegExp||n===Ne.ParamRegExpEnd?(o.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),o.push({type:an.Param,value:u,regexp:l,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),u="")}function f(){u+=c}for(;a<e.length;){if(c=e[a++],c==="\\"&&n!==Ne.ParamRegExp){r=n,n=Ne.EscapeNext;continue}switch(n){case Ne.Static:c==="/"?(u&&d(),i()):c===":"?(d(),n=Ne.Param):f();break;case Ne.EscapeNext:f(),n=r;break;case Ne.Param:c==="("?n=Ne.ParamRegExp:uf.test(c)?f():(d(),n=Ne.Static,c!=="*"&&c!=="?"&&c!=="+"&&a--);break;case Ne.ParamRegExp:c===")"?l[l.length-1]=="\\"?l=l.slice(0,-1)+c:n=Ne.ParamRegExpEnd:l+=c;break;case Ne.ParamRegExpEnd:d(),n=Ne.Static,c!=="*"&&c!=="?"&&c!=="+"&&a--,l="";break;default:t("Unknown state");break}}return n===Ne.ParamRegExp&&t(`Unfinished custom RegExp for param "${u}"`),d(),i(),s}const Vi="[^/]+?",ff={sensitive:!1,strict:!1,start:!0,end:!0};var Ke=function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e}(Ke||{});const pf=/[.+*?^${}()[\]/\\]/g;function hf(e,t){const n=be({},ff,t),r=[];let s=n.start?"^":"";const o=[];for(const u of e){const l=u.length?[]:[Ke.Root];n.strict&&!u.length&&(s+="/");for(let d=0;d<u.length;d++){const f=u[d];let y=Ke.Segment+(n.sensitive?Ke.BonusCaseSensitive:0);if(f.type===an.Static)d||(s+="/"),s+=f.value.replace(pf,"\\$&"),y+=Ke.Static;else if(f.type===an.Param){const{value:g,repeatable:b,optional:x,regexp:k}=f;o.push({name:g,repeatable:b,optional:x});const L=k||Vi;if(L!==Vi){y+=Ke.BonusLine truncated
|
||||
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&L2[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Qi=Symbol("internals");function Vn(e){return e&&String(e).trim().toLowerCase()}function Mr(e){return e===!1||e==null?e:_.isArray(e)?e.map(Mr):String(e)}function I2(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const D2=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ls(e,t,n,r,s){if(_.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!_.isString(t)){if(_.isString(r))return t.indexOf(r)!==-1;if(_.isRegExp(r))return r.test(t)}}function $2(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function F2(e,t){const n=_.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let Qe=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(a,c,u){const l=Vn(c);if(!l)throw new Error("header name must be a non-empty string");const d=_.findKey(s,l);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||c]=Mr(a))}const i=(a,c)=>_.forEach(a,(u,l)=>o(u,l,c));if(_.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(_.isString(t)&&(t=t.trim())&&!D2(t))i(N2(t),n);else if(_.isObject(t)&&_.isIterable(t)){let a={},c,u;for(const l of t){if(!_.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[u=l[0]]=(c=a[u])?_.isArray(c)?[...c,l[1]]:[c,l[1]]:l[1]}i(a,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=Vn(t),t){const r=_.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return I2(s);if(_.isFunction(n))return n.call(this,s,r);if(_.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Vn(t),t){const r=_.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ls(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=Vn(i),i){const a=_.findKey(r,i);a&&(!n||Ls(r,r[a],a,n))&&(delete r[a],s=!0)}}return _.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||Ls(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return _.forEach(this,(s,o)=>{const i=_.findKey(r,o);if(i){n[i]=Mr(s),delete n[o];return}const a=t?$2(o):String(o).trim();a!==o&&delete n[o],n[a]=Mr(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return _.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&_.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
||||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Qi]=this[Qi]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=Vn(i);r[a]||(F2(s,i),r[a]=!0)}return _.isArray(t)?t.forEach(o):o(t),this}};Qe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_.reduceDescriptors(Qe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});_.freezeMethods(Qe);function Ns(e,t){const n=this||mr,r=t||n,s=Qe.from(r.headers);let o=r.data;return _.forEach(e,function(a){o=a.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function fc(e){return!!(e&&e.__CANCEL__)}function Ln(e,t,n){fe.call(this,e??"canceled",fe.ERR_CANCELED,t,n),this.name="CanceledError"}_.inherits(Ln,fe,{__CANCEL__:!0});function pc(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new fe("Request failed with status code "+n.status,[fe.ERR_BAD_REQUEST,fe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function V2(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function B2(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),l=r[o];i||(i=u),n[s]=c,r[s]=u;let d=o,f=0;for(;d!==s;)f+=n[d++],d=d%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),u-i<t)return;const y=l&&u-l;return y?Math.round(f*1e3/y):void 0}}function H2(e,t){let n=0,r=1e3/t,s,o;const i=(u,l=Date.now())=>{n=l,s=null,o&&(clearTimeout(o),o=null),e(...u)};return[(...u)=>{const l=Date.now(),d=l-n;d>=r?i(u,l):(s=u,o||(o=setTimeout(()=>{o=null,i(s)},r-d)))},()=>s&&i(s)]}const qr=(e,t,n=3)=>{let r=0;const s=B2(50,250);return H2(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,c=i-r,u=s(c),l=i<=a;r=i;const d={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&l?(a-i)/u:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},Xi=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ea=e=>(...t)=>_.asap(()=>e(...t)),j2=He.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,He.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(He.origin),He.navigator&&/(msie|trident)/i.test(He.navigator.userAgent)):()=>!0,U2=He.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];_.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),_.isString(r)&&a.push(`path=${r}`),_.isString(s)&&a.push(`domain=${s}`),o===!0&&a.push("secure"),_.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function q2(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function K2(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function hc(e,t,n){let r=!q2(t);return e&&(r||n==!1)?K2(e,t):t}const ta=e=>e instanceof Qe?{...e}:e;function pn(e,t){t=t||{};const n={};function r(u,l,d,f){return _.isPlainObject(u)&&_.isPlainObject(l)?_.merge.call({caseless:f},u,l):_.isPlainObject(l)?_.merge({},l):_.isArray(l)?l.slice():l}function s(u,l,d,f){if(_.isUndefined(l)){if(!_.isUndefined(u))return r(void 0,u,d,f)}else return r(u,l,d,f)}function o(u,l){if(!_.isUndefined(l))return r(void 0,l)}function i(u,l){if(_.isUndefined(l)){if(!_.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function a(u,l,d){if(d in t)return r(u,l);if(d in e)return r(void 0,u)}const c={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,l,d)=>s(ta(u),ta(l),d,!0)};return _.forEach(Object.keys({...e,...t}),function(l){const d=c[l]||s,f=d(e[l],t[l],l);_.isUndefined(f)&&d!==a||(n[l]=f)}),n}const mc=e=>{const t=pn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=t;if(t.headers=i=Qe.from(i),t.url=cc(hc(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),_.isFormData(n)){if(He.hasStandardBrowserEnv||He.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(_.isFunction(n.getHeaders)){const c=n.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([l,d])=>{u.inclu
Line truncated
|
||||
`+i.map(aa).join(`
|
||||
`):" "+aa(i[0]):"as no adapter specified";throw new fe("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const yc={getAdapter:n0,adapters:Do};function Is(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ln(null,e)}function la(e){return Is(e),e.headers=Qe.from(e.headers),e.data=Ns.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),yc.getAdapter(e.adapter||mr.adapter,e)(e).then(function(r){return Is(e),r.data=Ns.call(e,e.transformResponse,r),r.headers=Qe.from(r.headers),r},function(r){return fc(r)||(Is(e),r&&r.response&&(r.response.data=Ns.call(e,e.transformResponse,r.response),r.response.headers=Qe.from(r.response.headers))),Promise.reject(r)})}const vc="1.13.2",ms={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ms[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ca={};ms.transitional=function(t,n,r){function s(o,i){return"[Axios v"+vc+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,a)=>{if(t===!1)throw new fe(s(i," has been removed"+(n?" in "+n:"")),fe.ERR_DEPRECATED);return n&&!ca[i]&&(ca[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,a):!0}};ms.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function r0(e,t,n){if(typeof e!="object")throw new fe("options must be an object",fe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const a=e[o],c=a===void 0||i(a,o,e);if(c!==!0)throw new fe("option "+o+" must be "+c,fe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new fe("Unknown option "+o,fe.ERR_BAD_OPTION)}}const Pr={assertOptions:r0,validators:ms},Ct=Pr.validators;let dn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Yi,response:new Yi}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
||||
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=pn(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Pr.assertOptions(r,{silentJSONParsing:Ct.transitional(Ct.boolean),forcedJSONParsing:Ct.transitional(Ct.boolean),clarifyTimeoutError:Ct.transitional(Ct.boolean)},!1),s!=null&&(_.isFunction(s)?n.paramsSerializer={serialize:s}:Pr.assertOptions(s,{encode:Ct.function,serialize:Ct.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Pr.assertOptions(n,{baseUrl:Ct.spelling("baseURL"),withXsrfToken:Ct.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&_.merge(o.common,o[n.method]);o&&_.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=Qe.concat(i,o);const a=[];let c=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(c=c&&b.synchronous,a.unshift(b.fulfilled,b.rejected))});const u=[];this.interceptors.response.forEach(function(b){u.push(b.fulfilled,b.rejected)});let l,d=0,f;if(!c){const g=[la.bind(this),void 0];for(g.unshift(...a),g.push(...u),f=g.length,l=Promise.resolve(n);d<f;)l=l.then(g[d++],g[d++]);return l}f=a.length;let y=n;for(;d<f;){const g=a[d++],b=a[d++];try{y=g(y)}catch(x){b.call(this,x);break}}try{l=la.call(this,y)}catch(g){return Promise.reject(g)}for(d=0,f=u.length;d<f;)l=l.then(u[d++],u[d++]);return l}getUri(t){t=pn(this.defaults,t);const n=hc(t.baseURL,t.url,t.allowAbsoluteUrls);return cc(n,t.params,t.paramsSerializer)}};_.forEach(["delete","get","head","options"],function(t){dn.prototype[t]=function(n,r){return this.request(pn(r||{},{method:t,url:n,data:(r||{}).data}))}});_.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,a){return this.request(pn(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}dn.prototype[t]=n(),dn.prototype[t+"Form"]=n(!0)});let s0=class bc{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,a){r.reason||(r.reason=new Ln(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new bc(function(s){t=s}),cancel:t}}};function o0(e){return function(n){return e.apply(null,n)}}function i0(e){return _.isObject(e)&&e.isAxiosError===!0}const io={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(io).forEach(([e,t])=>{io[t]=e});function Cc(e){const t=new dn(e),n=Yl(dn.prototype.request,t);return _.extend(n,dn.prototype,t,{allOwnKeys:!0}),_.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Cc(pn(e,s))},n}const Ae=Cc(mr);Ae.Axios=dn;Ae.CanceledError=Ln;Ae.CancelToken=s0;Ae.isCancel=fc;Ae.VERSION=vc;Ae.toFormData=hs;Ae.AxiosError=fe;Ae.Cancel=Ae.CanceledError;Ae.all=function(t){return Promise.all(t)};Ae.spread=o0;Ae.isAxiosError=i0;Ae.mergeConfig=pn;Ae.AxiosH
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
@tailwind base;@tailwind components;@tailwind utilities;:root{--vt-c-white: #ffffff;--vt-c-white-soft: #f8f8f8;--vt-c-white-mute: #f2f2f2;--vt-c-black: #181818;--vt-c-black-soft: #222222;--vt-c-black-mute: #282828;--vt-c-indigo: #2c3e50;--vt-c-divider-light-1: rgba(60, 60, 60, .29);--vt-c-divider-light-2: rgba(60, 60, 60, .12);--vt-c-divider-dark-1: rgba(84, 84, 84, .65);--vt-c-divider-dark-2: rgba(84, 84, 84, .48);--vt-c-text-light-1: var(--vt-c-indigo);--vt-c-text-light-2: rgba(60, 60, 60, .66);--vt-c-text-dark-1: var(--vt-c-white);--vt-c-text-dark-2: rgba(235, 235, 235, .64)}:root{--color-surface: #FFFFFF;--color-surface-elevated: #FFFFFF;--color-background: #F5F7FA;--color-background-soft: #F8F8F8;--color-background-mute: #EBEEF2;--color-text-primary: #111827;--color-text-secondary: #374151;--color-text-muted: #6B7280;--color-heading: #030712;--color-text: #374151;--color-border: #9CA3AF;--color-border-subtle: #D1D5DB;--color-border-hover: #6B7280;--color-primary: #0D7377;--color-secondary: #92610A;--color-accent-green: #15803D;--color-accent-purple: #7C3AED;--color-accent-red: #DC2626;--color-accent-cyan: #0E7490;--section-gap: 160px;--color-primary-bg: #AAE8E8;--color-secondary-bg: #FFC246;--color-accent-green-bg: #A5E5B6;--color-accent-purple-bg: #EBA0FC;--color-accent-red-bg: #FB787B;--color-accent-cyan-bg: #D1E6E4;--color-badge-cyan-bg: #D1E6E4;--color-badge-cyan-text: #0D7377;--color-badge-neutral-bg: #E5E7EB;--color-badge-neutral-text: #374151;--color-glass-bg: rgba(255, 255, 255, .75);--color-glass-border: rgba(0, 0, 0, .06);--color-glass-shadow: 0 4px 16px rgba(0, 0, 0, .04), 0 1px 3px rgba(0, 0, 0, .02);--color-glass-green-bg: linear-gradient(91deg, rgba(165, 229, 182, .35) 1.17%, rgba(165, 229, 182, .15) 99.82%);--color-glass-green-border: rgba(165, 229, 182, .3);--color-glass-green-shadow: 0 4px 12px rgba(165, 229, 182, .15);--color-glass-orange-bg: linear-gradient(91deg, rgba(245, 158, 11, .25) 1.17%, rgba(245, 158, 11, .12) 99.82%);--color-glass-orange-border: rgba(245, 158, 11, .25);--color-glass-orange-shadow: 0 4px 12px rgba(245, 158, 11, .15)}.dark{--color-surface: #0F1112;--color-surface-elevated: #1A1E1F;--color-background: #09090B;--color-background-soft: #111314;--color-background-mute: #1A1E1F;--color-text-primary: #F9FAFB;--color-text-secondary: #D1D5DB;--color-text-muted: #9CA3AF;--color-heading: #FFFFFF;--color-text: #ADADAD;--color-border: #4B4B4B;--color-border-subtle: #374151;--color-border-hover: #6B7280;--color-primary: #AAE8E8;--color-secondary: #FFC246;--color-accent-green: #A5E5B6;--color-accent-purple: #EBA0FC;--color-accent-red: #FB787B;--color-accent-cyan: #D1E6E4;--color-primary-bg: #0D7377;--color-secondary-bg: #92610A;--color-accent-green-bg: #15803D;--color-accent-purple-bg: #7C3AED;--color-accent-red-bg: #DC2626;--color-accent-cyan-bg: #0E7490;--color-badge-cyan-bg: #223231;--color-badge-cyan-text: #D1E6E4;--color-badge-neutral-bg: #374151;--color-badge-neutral-text: #D1D5DB;--color-glass-bg: rgba(0, 0, 0, .4);--color-glass-border: rgba(255, 255, 255, .05);--color-glass-shadow: 0 4px 16px rgba(0, 0, 0, .2);--color-glass-green-bg: linear-gradient(91deg, rgba(21, 128, 61, .25) 1.17%, rgba(21, 128, 61, .1) 99.82%);--color-glass-green-border: rgba(165, 229, 182, .15);--color-glass-green-shadow: 0 4px 12px rgba(0, 0, 0, .2);--color-glass-orange-bg: linear-gradient(91deg, rgba(245, 158, 11, .25) 1.17%, rgba(245, 158, 11, .12) 99.82%);--color-glass-orange-border: rgba(245, 158, 11, .15);--color-glass-orange-shadow: 0 4px 12px rgba(0, 0, 0, .2)}*,*:before,*:after{box-sizing:border-box;margin:0;font-weight:400}body{min-height:100vh;color:var(--color-text);background:var(--color-background);transition:color .5s,background-color .5s;line-height:1.6;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:15px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrLine truncated
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,32 +0,0 @@
|
||||
@tailwind base;@tailwind components;@tailwind utilities;:root{--vt-c-white: #ffffff;--vt-c-white-soft: #f8f8f8;--vt-c-white-mute: #f2f2f2;--vt-c-black: #181818;--vt-c-black-soft: #222222;--vt-c-black-mute: #282828;--vt-c-indigo: #2c3e50;--vt-c-divider-light-1: rgba(60, 60, 60, .29);--vt-c-divider-light-2: rgba(60, 60, 60, .12);--vt-c-divider-dark-1: rgba(84, 84, 84, .65);--vt-c-divider-dark-2: rgba(84, 84, 84, .48);--vt-c-text-light-1: var(--vt-c-indigo);--vt-c-text-light-2: rgba(60, 60, 60, .66);--vt-c-text-dark-1: var(--vt-c-white);--vt-c-text-dark-2: rgba(235, 235, 235, .64)}:root{--color-surface: #FFFFFF;--color-surface-elevated: #FFFFFF;--color-background: #F5F7FA;--color-background-soft: #F8F8F8;--color-background-mute: #EBEEF2;--color-text-primary: #111827;--color-text-secondary: #374151;--color-text-muted: #6B7280;--color-heading: #030712;--color-text: #374151;--color-border: #9CA3AF;--color-border-subtle: #D1D5DB;--color-border-hover: #6B7280;--color-primary: #0D7377;--color-secondary: #92610A;--color-accent-green: #15803D;--color-accent-purple: #7C3AED;--color-accent-red: #DC2626;--color-accent-cyan: #0E7490;--section-gap: 160px;--color-primary-bg: #AAE8E8;--color-secondary-bg: #FFC246;--color-accent-green-bg: #A5E5B6;--color-accent-purple-bg: #EBA0FC;--color-accent-red-bg: #FB787B;--color-accent-cyan-bg: #D1E6E4;--color-badge-cyan-bg: #D1E6E4;--color-badge-cyan-text: #0D7377;--color-badge-neutral-bg: #E5E7EB;--color-badge-neutral-text: #374151;--color-glass-bg: rgba(255, 255, 255, .75);--color-glass-border: rgba(0, 0, 0, .06);--color-glass-shadow: 0 4px 16px rgba(0, 0, 0, .04), 0 1px 3px rgba(0, 0, 0, .02);--color-glass-green-bg: linear-gradient(91deg, rgba(165, 229, 182, .35) 1.17%, rgba(165, 229, 182, .15) 99.82%);--color-glass-green-border: rgba(165, 229, 182, .3);--color-glass-green-shadow: 0 4px 12px rgba(165, 229, 182, .15);--color-glass-orange-bg: linear-gradient(91deg, rgba(245, 158, 11, .25) 1.17%, rgba(245, 158, 11, .12) 99.82%);--color-glass-orange-border: rgba(245, 158, 11, .25);--color-glass-orange-shadow: 0 4px 12px rgba(245, 158, 11, .15)}.dark{--color-surface: #0F1112;--color-surface-elevated: #1A1E1F;--color-background: #09090B;--color-background-soft: #111314;--color-background-mute: #1A1E1F;--color-text-primary: #F9FAFB;--color-text-secondary: #D1D5DB;--color-text-muted: #9CA3AF;--color-heading: #FFFFFF;--color-text: #ADADAD;--color-border: #4B4B4B;--color-border-subtle: #374151;--color-border-hover: #6B7280;--color-primary: #AAE8E8;--color-secondary: #FFC246;--color-accent-green: #A5E5B6;--color-accent-purple: #EBA0FC;--color-accent-red: #FB787B;--color-accent-cyan: #D1E6E4;--color-primary-bg: #0D7377;--color-secondary-bg: #92610A;--color-accent-green-bg: #15803D;--color-accent-purple-bg: #7C3AED;--color-accent-red-bg: #DC2626;--color-accent-cyan-bg: #0E7490;--color-badge-cyan-bg: #223231;--color-badge-cyan-text: #D1E6E4;--color-badge-neutral-bg: #374151;--color-badge-neutral-text: #D1D5DB;--color-glass-bg: rgba(0, 0, 0, .4);--color-glass-border: rgba(255, 255, 255, .05);--color-glass-shadow: 0 4px 16px rgba(0, 0, 0, .2);--color-glass-green-bg: linear-gradient(91deg, rgba(21, 128, 61, .25) 1.17%, rgba(21, 128, 61, .1) 99.82%);--color-glass-green-border: rgba(165, 229, 182, .15);--color-glass-green-shadow: 0 4px 12px rgba(0, 0, 0, .2);--color-glass-orange-bg: linear-gradient(91deg, rgba(245, 158, 11, .25) 1.17%, rgba(245, 158, 11, .12) 99.82%);--color-glass-orange-border: rgba(245, 158, 11, .15);--color-glass-orange-shadow: 0 4px 12px rgba(0, 0, 0, .2)}*,*:before,*:after{box-sizing:border-box;margin:0;font-weight:400}body{min-height:100vh;color:var(--color-text);background:var(--color-background);transition:color .5s,background-color .5s;line-height:1.6;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:15px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrLine truncated
|
||||
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
||||
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
||||
* https://github.com/chjj/term.js
|
||||
* @license MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* Originally forked from (with the author's permission):
|
||||
* Fabrice Bellard's javascript vt100 for jslinux:
|
||||
* http://bellard.org/jslinux/
|
||||
* Copyright (c) 2011 Fabrice Bellard
|
||||
* The original design remains. The terminal itself
|
||||
* has been extended to include xterm CSI codes, among
|
||||
* other features.
|
||||
*/.xterm{cursor:text;position:relative;-moz-user-select:none;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;inset:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;inset:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::-moz-selection{color:transparent}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{font-family:monospace;-webkit-user-select:text;-moz-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:-moz-fit-content;width:fit-content}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:double underline;text-decoration:double underline}.xterm-underline-3{-webkit-text-decoration:wavy underline;text-decoration:wavy underline}.xterm-underline-4{-webkit-text-decoration:dotted underline;text-decoration:dotted underline}.xterm-underline-5{-webkit-text-decoration:dashed underline;text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.terminal-container[data-v-7ea2281b]{height:calc(100vh - 220px);min-height:400px;min-height:calc(100dvh - 220px);background-color:var(--color-surface)}@media (max-width: 768px){.terminal-container[data-v-7ea2281b]{height:calc(100vh - 140px);min-height:300px;min-height:calc(100dvh - 140px)}}@media (max-width: 640px){.terminal-container[data-v-7ea2281b]{height:calc(100vh - 120px);min-height:250px;min-height:calc(100dvh - 120px)}}[data-v-7ea2281b] .xterm{padding:1.5rem;height:100%!important}@media (max-width: 768px){[data-v-7ea2281b] .xterm{padding:1rem}}@media (max-width: 640px){[data-v-7ea2281b] .xterm{padding:.75rem}}[data-v-7ea2281b] .xterm-viewport,[data-v-7ea2281b] .xterm-screen{background-color:transparent!important}[data-v-7ea2281b] .xterm-selection{background-color:#00d9ff4d!important}kbd[data-v-7ea2281b]{font-family:Menlo,Monaco,Courier New,monospacLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottLine truncated
|
||||
@@ -0,0 +1,4 @@
|
||||
import{g as Go}from"./_commonjsHelpers-CqkleIqs.js";var Wt={exports:{}};/* @preserve
|
||||
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
|
||||
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
||||
*/var Vo=Wt.exports,_n;function qo(){return _n||(_n=1,function(Yo,mn){(function(l,le){le(mn)})(Vo,function(l){var le="1.9.4";function b(t){var e,i,n,o;for(i=1,n=arguments.length;i<n;i++){o=arguments[i];for(e in o)t[e]=o[e]}return t}var Ut=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function S(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var Ye=0;function x(t){return"_leaflet_id"in t||(t._leaflet_id=++Ye),t._leaflet_id}function Xe(t,e,i){var n,o,s,r;return r=function(){n=!1,o&&(s.apply(i,o),o=!1)},s=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(r,e),n=!0)},s}function Mt(t,e,i){var n=e[1],o=e[0],s=n-o;return t===n&&i?t:((t-o)%s+s)%s+o}function E(){return!1}function J(t,e){if(e===!1)return t;var i=Math.pow(10,e===void 0?6:e);return Math.round(t*i)/i}function ce(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function ct(t){return ce(t).split(/\s+/)}function C(t,e){Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?Ut(t.options):{});for(var i in e)t.options[i]=e[i];return t.options}function Je(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(!e||e.indexOf("?")===-1?"?":"&")+n.join("&")}var pn=/\{ *([\w_ -]+) *\}/g;function $e(t,e){return t.replace(pn,function(i,n){var o=e[n];if(o===void 0)throw new Error("No value provided for variable "+i);return typeof o=="function"&&(o=o(e)),o})}var K=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function fe(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var Gt="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function de(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var Qe=0;function ti(t){var e=+new Date,i=Math.max(0,16-(e-Qe));return Qe=e+i,window.setTimeout(t,i)}var _e=window.requestAnimationFrame||de("RequestAnimationFrame")||ti,ei=window.cancelAnimationFrame||de("CancelAnimationFrame")||de("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function D(t,e,i){if(i&&_e===ti)t.call(e);else return _e.call(window,S(t,e))}function G(t){t&&ei.call(window,t)}var vn={__proto__:null,extend:b,create:Ut,bind:S,get lastId(){return Ye},stamp:x,throttle:Xe,wrapNum:Mt,falseFn:E,formatNum:J,trim:ce,splitWords:ct,setOptions:C,getParamString:Je,template:$e,isArray:K,indexOf:fe,emptyImageUrl:Gt,requestFn:_e,cancelFn:ei,requestAnimFrame:D,cancelAnimFrame:G};function it(){}it.extend=function(t){var e=function(){C(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=e.__super__=this.prototype,n=Ut(i);n.constructor=e,e.prototype=n;for(var o in this)Object.prototype.hasOwnProperty.call(this,o)&&o!=="prototype"&&o!=="__super__"&&(e[o]=this[o]);return t.statics&&b(e,t.statics),t.includes&&(gn(t.includes),b.apply(null,[n].concat(t.includes))),b(n,t),delete n.statics,delete n.includes,n.options&&(n.options=i.options?Ut(i.options):{},b(n.options,t.options)),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var s=0,r=n._initHooks.length;s<r;s++)n._initHooks[s].call(this)}},e},it.include=function(t){var e=this.prototype.options;return b(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},it.mergeOptions=function(t){return b(this.prototype.options,t),this},it.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i=typeof t=="function"?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};function gn(t){if(!(typeof L>"u"||!L||!L.Mixin)){t=K(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var U={on:function(t,e,i){if(typeof t=="object")for(var n in t)this._on(n,t[n],e);else{t=ct(t);for(var o=0,s=t.length;o<s;o++)this._on(t[o],e,i)}return this},off:function(t,e,i){if(!arguments.length)delete this._events;else if(typeof t=="object")for(var n in t)this._off(n,t[n],e);else{t=ct(t);for(var o=arguments.length===1,s=0,r=t.length;s<r;s++)o?this._off(t[s]):this._off(t[s],e,i)}return this},_on:function(t,e,i,n){if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}if(this._listens(t,e,i)===!1){i===this&&(i=void 0);var o={fn:e,ctx:i};n&&(o.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(o)}},_off:function(t,e,i){var n,o,s;if(this._events&&(n=this._events[t],!!n)){if(arguments.length===1){if(this._firingCount)for(o=0,s=n.length;o<s;o++)n[o].fn=E;delete this._events[t];return}if(typeof e!="function"){console.warn("wrongLine truncated
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
||||
const n="pymc_pref_";function c(r,t){try{const e=localStorage.getItem(n+r);return e===null?t:JSON.parse(e)}catch(e){return console.warn(`Failed to get preference ${r}:`,e),t}}function o(r,t){try{localStorage.setItem(n+r,JSON.stringify(t))}catch(e){console.warn(`Failed to set preference ${r}:`,e)}}export{c as g,o as s};
|
||||
@@ -0,0 +1 @@
|
||||
import{M as x,c as s}from"./index-C2DY4pTz.js";const l={7:-7.5,8:-10,9:-12.5,10:-15,11:-17.5,12:-20},d=-116,i=8,u=5;function y(t,e){return t-e}function S(t){return l[t]??l[i]}function f(t,e){const r=e+u;if(t<=e){const o=t<=e-5?0:1;return{bars:o,color:"text-red-600 dark:text-red-400",snr:t,quality:o===0?"none":"poor"}}if(t<r){const n=(t-e)/u<.5?2:3;return{bars:n,color:n===2?"text-orange-600 dark:text-orange-400":"text-yellow-600 dark:text-yellow-400",snr:t,quality:"fair"}}const a=t-r>=10?5:4;return{bars:a,color:a===5?"text-green-600 dark:text-green-400":"text-green-600 dark:text-green-300",snr:t,quality:a===5?"excellent":"good"}}function N(){const t=x(),e=s(()=>t.noiseFloorDbm??d),r=s(()=>t.stats?.config?.radio?.spreading_factor??i),c=s(()=>S(r.value));return{getSignalQuality:o=>{if(!o||o>0||o<-120)return{bars:0,color:"text-gray-400 dark:text-gray-500",snr:-999,quality:"none"};const n=y(o,e.value),g=Math.max(-30,Math.min(20,n));return f(g,c.value)},noiseFloor:e,spreadingFactor:r,minSNR:c}}export{N as u};
|
||||
@@ -8,8 +8,8 @@
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
<script type="module" crossorigin src="/assets/index-Dz5Q9Vcf.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-KLnbrplX.css">
|
||||
<script type="module" crossorigin src="/assets/index-C2DY4pTz.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DEJx-WQR.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -20,6 +20,15 @@ from .auth.jwt_handler import JWTHandler
|
||||
from .auth.api_tokens import APITokenManager
|
||||
from .auth import cherrypy_tool # Import to register the tool
|
||||
|
||||
# WebSocket support
|
||||
try:
|
||||
from repeater.data_acquisition.websocket_handler import PacketWebSocket, init_websocket, broadcast_packet
|
||||
WEBSOCKET_AVAILABLE = True
|
||||
except ImportError:
|
||||
WEBSOCKET_AVAILABLE = False
|
||||
logger = logging.getLogger("HTTPServer")
|
||||
logger.warning("ws4py not available - WebSocket support disabled")
|
||||
|
||||
logger = logging.getLogger("HTTPServer")
|
||||
|
||||
|
||||
@@ -426,6 +435,27 @@ class HTTPStatsServer:
|
||||
|
||||
cherrypy.tree.mount(self.doc_app, "/doc", doc_config)
|
||||
|
||||
# Initialize WebSocket if available
|
||||
if WEBSOCKET_AVAILABLE:
|
||||
try:
|
||||
init_websocket()
|
||||
|
||||
# Create WebSocket app
|
||||
class WSApp:
|
||||
@cherrypy.expose
|
||||
def index(self):
|
||||
pass # WebSocket tool handles the actual upgrade
|
||||
|
||||
cherrypy.tree.mount(WSApp(), '/ws/packets', {
|
||||
'/': {
|
||||
'tools.websocket.on': True,
|
||||
'tools.websocket.handler_cls': PacketWebSocket,
|
||||
}
|
||||
})
|
||||
logger.info("WebSocket endpoint mounted at /ws/packets")
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to initialize WebSocket: {e}")
|
||||
|
||||
# Store auth handlers in cherrypy config for middleware access
|
||||
cherrypy.config.update({
|
||||
"jwt_handler": self.jwt_handler,
|
||||
|
||||
Reference in new issue
Block a user