diff --git a/repeater/data_acquisition/sqlite_handler.py b/repeater/data_acquisition/sqlite_handler.py index 0cee69f..ac4babf 100644 --- a/repeater/data_acquisition/sqlite_handler.py +++ b/repeater/data_acquisition/sqlite_handler.py @@ -666,40 +666,46 @@ class SQLiteHandler: logger.error(f"Failed to get adverts by contact_type '{contact_type}': {e}") return [] - def generate_transport_key(self, key_length_bytes: int = 32) -> str: + def generate_transport_key(self, name: str, key_length_bytes: int = 32) -> str: """ - Generate a cryptographically secure transport key. + Generate a transport key using the proper MeshCore key derivation. Args: + name: The key name to derive the key from key_length_bytes: Length of the key in bytes (default: 32 bytes = 256 bits) Returns: - A base64-encoded secure random key + A base64-encoded transport key derived from the name """ try: - # Generate cryptographically secure random bytes - random_bytes = secrets.token_bytes(key_length_bytes) + from pymc_core.protocol.transport_keys import get_auto_key_for + + # Use the proper MeshCore key derivation function + key_bytes = get_auto_key_for(name) # Encode to base64 for safe storage and transmission - key = base64.b64encode(random_bytes).decode('utf-8') + key = base64.b64encode(key_bytes).decode('utf-8') - logger.debug(f"Generated transport key with {key_length_bytes} bytes ({len(key)} base64 chars)") + logger.debug(f"Generated transport key for '{name}' with {len(key_bytes)} bytes ({len(key)} base64 chars)") return key except Exception as e: - logger.error(f"Failed to generate transport key: {e}") - # Fallback to a simpler method if crypto fails - import random - import string - fallback_key = ''.join(random.choices(string.ascii_letters + string.digits, k=key_length_bytes)) - logger.warning(f"Using fallback key generation method") - return base64.b64encode(fallback_key.encode()).decode('utf-8') + logger.error(f"Failed to generate transport key using get_auto_key_for: {e}") + # Fallback to secure random if MeshCore function fails + try: + random_bytes = secrets.token_bytes(key_length_bytes) + key = base64.b64encode(random_bytes).decode('utf-8') + logger.warning(f"Using fallback random key generation for '{name}'") + return key + except Exception as fallback_e: + logger.error(f"Fallback key generation also failed: {fallback_e}") + raise def create_transport_key(self, name: str, flood_policy: str, transport_key: Optional[str] = None, parent_id: Optional[int] = None, last_used: Optional[float] = None) -> Optional[int]: try: # Generate key if not provided if transport_key is None: - transport_key = self.generate_transport_key() + transport_key = self.generate_transport_key(name) current_time = time.time() with sqlite3.connect(self.sqlite_path) as conn: diff --git a/repeater/engine.py b/repeater/engine.py index 749d0de..1c972c0 100644 --- a/repeater/engine.py +++ b/repeater/engine.py @@ -13,6 +13,9 @@ from pymc_core.protocol.constants import ( PH_ROUTE_MASK, ROUTE_TYPE_DIRECT, ROUTE_TYPE_FLOOD, + ROUTE_TYPE_TRANSPORT_FLOOD, + ROUTE_TYPE_TRANSPORT_DIRECT, + ) from pymc_core.protocol.packet_utils import PacketHeaderUtils, PacketTimingUtils @@ -95,6 +98,9 @@ class RepeaterHandler(BaseHandler): self._transport_keys_cache_time = 0 self._transport_keys_cache_ttl = 60 # Cache for 60 seconds + # Track last drop reason for better logging + self._last_drop_reason = None + self._start_background_tasks() async def __call__(self, packet: Packet, metadata: Optional[dict] = None) -> None: @@ -104,6 +110,9 @@ class RepeaterHandler(BaseHandler): self.rx_count += 1 + # Reset drop reason for this packet processing + self._last_drop_reason = None + # Check if we're in monitor mode (receive only, no forwarding) mode = self.config.get("repeater", {}).get("mode", "forward") monitor_mode = mode == "monitor" @@ -158,7 +167,7 @@ class RepeaterHandler(BaseHandler): if monitor_mode: drop_reason = "Monitor mode" else: - drop_reason = self._get_drop_reason(packet) + drop_reason = self._last_drop_reason or self._get_drop_reason(packet) logger.debug(f"Packet not forwarded: {drop_reason}") # Extract packet type and route from header @@ -321,9 +330,7 @@ class RepeaterHandler(BaseHandler): # Check if global flood policy blocked it global_flood_allow = self.config.get("mesh", {}).get("global_flood_allow", True) if not global_flood_allow: - allowed, reason = self._check_transport_codes(packet) - if not allowed: - return reason or "Not allowed by global flood policy" + return "Global flood policy disabled" if route_type == ROUTE_TYPE_DIRECT: if not packet.path or len(packet.path) == 0: @@ -413,7 +420,6 @@ class RepeaterHandler(BaseHandler): pkt_hash = packet.calculate_packet_hash().hex() if pkt_hash in self.seen_packets: - logger.debug(f"Duplicate suppressed: {pkt_hash[:16]}") return True return False @@ -436,17 +442,7 @@ class RepeaterHandler(BaseHandler): return True, "" def _check_transport_codes(self, packet: Packet) -> Tuple[bool, str]: - """ - Check if packet has valid transport codes for forwarding. - Validates packet against all transport keys in database. - Uses caching to avoid repeated database queries. - - Args: - packet: The packet to check - - Returns: - Tuple of (is_valid, reason) - """ + if not self.storage: logger.warning("Transport code check failed: no storage available") return False, "No storage available for transport key validation" @@ -461,51 +457,45 @@ class RepeaterHandler(BaseHandler): # Refresh cache self._transport_keys_cache = self.storage.get_transport_keys() self._transport_keys_cache_time = current_time - logger.debug(f"Refreshed transport keys cache: {len(self._transport_keys_cache or [])} keys") transport_keys = self._transport_keys_cache if not transport_keys: - logger.debug("No transport keys configured - denying packet") - return False, "No matching transport code" + return False, "No transport keys configured" - # Get payload once for efficiency + # Check if packet has transport codes + if not packet.has_transport_codes(): + return False, "No transport codes present" + + + transport_code_0 = packet.transport_codes[0] # First transport code + + payload = packet.get_payload() - if len(payload) < 2: - logger.debug("Packet payload too short for transport code") - return False, "No matching transport code" - - # Extract packet's transport code (first 2 bytes) - packet_code = struct.unpack('> 2) # Check packet against each transport key for key_record in transport_keys: - transport_key_hex = key_record.get("transport_key") + transport_key_encoded = key_record.get("transport_key") + key_name = key_record.get("name", "unknown") - if not transport_key_hex: + if not transport_key_encoded: continue try: - # Convert hex string to bytes and calculate expected code - transport_key = bytes.fromhex(transport_key_hex) + import base64 + transport_key = base64.b64decode(transport_key_encoded) expected_code = calc_transport_code(transport_key, packet) - - # Check if codes match - if packet_code == expected_code: - key_name = key_record.get("name", "unknown") - logger.debug( - f"Transport code validated: key='{key_name}', " - f"code=0x{packet_code:04X}" - ) + if transport_code_0 == expected_code: + logger.debug(f"Transport code validated for key '{key_name}'") return True, "" except Exception as e: - key_name = key_record.get("name", "unknown") - logger.debug(f"Error checking transport key '{key_name}': {e}") + logger.warning(f"Error checking transport key '{key_name}': {e}") continue # No matching transport code found - logger.debug(f"Packet denied: no matching transport code (checked {len(transport_keys)} keys)") + logger.debug(f"Transport code 0x{transport_code_0:04X} denied (checked {len(transport_keys)} keys)") return False, "No matching transport code" except Exception as e: @@ -517,23 +507,26 @@ class RepeaterHandler(BaseHandler): # Validate valid, reason = self.validate_packet(packet) if not valid: - logger.debug(f"Flood validation failed: {reason}") + self._last_drop_reason = reason return None # Check global flood policy global_flood_allow = self.config.get("mesh", {}).get("global_flood_allow", True) if not global_flood_allow: - # Global flood disabled - check transport codes - allowed, check_reason = self._check_transport_codes(packet) - if not allowed: - logger.debug(f"Flood denied: {check_reason or 'no matching transport code'}") + route_type = packet.header & PH_ROUTE_MASK + if route_type == ROUTE_TYPE_FLOOD or route_type == ROUTE_TYPE_TRANSPORT_FLOOD: + + allowed, check_reason = self._check_transport_codes(packet) + if not allowed: + self._last_drop_reason = check_reason + return None + else: + self._last_drop_reason = "Global flood policy disabled" return None - logger.debug("Flood allowed by transport code validation") - else: - logger.debug("Global flood policy enabled - allowing packet") # Suppress duplicates if self.is_duplicate(packet): + self._last_drop_reason = "Duplicate" return None if packet.path is None: @@ -545,7 +538,6 @@ class RepeaterHandler(BaseHandler): packet.path_len = len(packet.path) self.mark_seen(packet) - logger.debug(f"Flood: forwarding with path len {packet.path_len}") return packet @@ -553,22 +545,18 @@ class RepeaterHandler(BaseHandler): # Check if we're the next hop if not packet.path or len(packet.path) == 0: - logger.debug("Direct: no path") + self._last_drop_reason = "Direct: no path" return None next_hop = packet.path[0] if next_hop != self.local_hash: - logger.debug(f"Direct: not our hop (next={next_hop:02X}, local={self.local_hash:02X})") + self._last_drop_reason = "Direct: not for us" return None original_path = list(packet.path) packet.path = bytearray(packet.path[1:]) packet.path_len = len(packet.path) - old_path = [f"{b:02X}" for b in original_path] - new_path = [f"{b:02X}" for b in packet.path] - logger.debug(f"Direct: forwarding, path {old_path} -> {new_path}") - return packet @staticmethod @@ -649,14 +637,14 @@ class RepeaterHandler(BaseHandler): route_type = packet.header & PH_ROUTE_MASK - if route_type == ROUTE_TYPE_FLOOD: + if route_type == ROUTE_TYPE_FLOOD or route_type == ROUTE_TYPE_TRANSPORT_FLOOD: fwd_pkt = self.flood_forward(packet) if fwd_pkt is None: return None delay = self._calculate_tx_delay(fwd_pkt, snr) return fwd_pkt, delay - elif route_type == ROUTE_TYPE_DIRECT: + elif route_type == ROUTE_TYPE_DIRECT or route_type == ROUTE_TYPE_TRANSPORT_DIRECT: fwd_pkt = self.direct_forward(packet) if fwd_pkt is None: return None @@ -664,7 +652,7 @@ class RepeaterHandler(BaseHandler): return fwd_pkt, delay else: - logger.debug(f"Unknown route type: {route_type}") + self._last_drop_reason = f"Unknown route type: {route_type}" return None async def schedule_retransmit(self, fwd_pkt: Packet, delay: float, airtime_ms: float = 0.0): diff --git a/repeater/templates/cad-calibration.html b/repeater/templates/cad-calibration.html deleted file mode 100644 index d5e1fa9..0000000 --- a/repeater/templates/cad-calibration.html +++ /dev/null @@ -1,1216 +0,0 @@ - - - - pyMC Repeater - CAD Calibration - - - - - - - - - -
- - - - -
-
-

CAD Calibration Tool

-

Real-time Channel Activity Detection calibration

-
- - -
-
- - -
-
- - -
-
Ready to start calibration
- - -
-
-
-
-
0 / 0 tests completed
-
-
- - -
-
-
0
-
Tests Completed
-
-
-
0%
-
Best Detection Rate
-
-
-
0%
-
Average Rate
-
-
-
0s
-
Elapsed Time
-
-
- - -
-
-
- - - -
-
- - - - \ No newline at end of file diff --git a/repeater/templates/configuration.html b/repeater/templates/configuration.html deleted file mode 100644 index 5adb4dd..0000000 --- a/repeater/templates/configuration.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - pyMC Repeater - Configuration - - - - - -
- - - - -
-
-

Configuration

-

System configuration and settings

-
- -
- Configuration is read-only. To modify settings, edit the config file and restart the daemon. -
- - -
- CAD Calibration Tool Available -

- Optimize your Channel Activity Detection settings. - Launch CAD Calibration Tool → -

-
- - -

Radio Settings

-
-
-
Frequency
-
Loading...
-
-
-
Spreading Factor
-
Loading...
-
-
-
Bandwidth
-
Loading...
-
-
-
TX Power
-
Loading...
-
-
-
Coding Rate
-
Loading...
-
-
-
Preamble Length
-
Loading...
-
-
- - -

Repeater Settings

-
-
-
Node Name
-
Loading...
-
-
-
Local Hash
-
Loading...
-
-
-
Public Key
-
Loading...
-
-
-
Latitude
-
Loading...
-
-
-
Longitude
-
Loading...
-
-
-
Mode
-
Loading...
-
-
-
Periodic Advertisement Interval
-
Loading...
-
How often the repeater sends an advertisement packet (0 = disabled)
-
-
- - -

Duty Cycle

-
-
-
Max Airtime %
-
Loading...
-
-
-
Enforcement
-
Loading...
-
-
- - -

Transmission Delays

-
-
-
Flood TX Delay Factor
-
Loading...
-
Multiplier for flood packet transmission delays (collision avoidance)
-
-
-
Direct TX Delay Factor
-
Loading...
-
Base delay for direct-routed packet transmission (seconds)
-
-
-
-
- - - - diff --git a/repeater/templates/dashboard.html b/repeater/templates/dashboard.html deleted file mode 100644 index c76007c..0000000 --- a/repeater/templates/dashboard.html +++ /dev/null @@ -1,1298 +0,0 @@ - - - - pyMC Repeater Stats - - - - - - -
- - - - -
-
-

Repeater Dashboard

-
- System Status: Active - Updated: {{ last_updated }} -
-
- - -
-
-
RX Packets
-
{{ rx_count }}total
-
- -
-
Forwarded
-
{{ forwarded_count }}packets
-
- -
-
Uptime
-
{{ uptime_hours }}h
-
- -
-
Dropped
-
{{ dropped_count }}packets
-
-
- - -

Performance Metrics

-
-
-

Packet Rate (RX/TX per hour)

-
- -
-
- -
-

Signal Quality Distribution

-
- -
-
-
- - -

Recent Packets

-
- - - - - - - - - - - - - - - - - - - - -
TimeTypeRouteLenPath / HashesRSSISNRScoreTX DelayStatus
- No packets received yet - waiting for traffic... -
-
- -
- Real-time updates enabled -
-
-
- - -
-
-
-

Packet Details

- -
-
-
- -
-
-
-
- - - - - - diff --git a/repeater/templates/help.html b/repeater/templates/help.html deleted file mode 100644 index 7b91ef4..0000000 --- a/repeater/templates/help.html +++ /dev/null @@ -1,934 +0,0 @@ - - - - pyMC Repeater - Help - - - - - - -
- - - - -
-
-

Help & Documentation

-

Learn how to interpret packet data, understand scoring, and optimize your configuration

-
- -
- - - - -
- -
-

Packet Table Overview

- -

The packet table displays real-time information about every packet your repeater receives and processes. Each row represents a single packet event, showing transmission details, signal quality metrics, and repeater processing information.

- -
-

Purpose: The packet table helps you monitor network traffic, diagnose signal issues, and understand how your repeater is handling different types of packets.

-
-
- - -
-

Column Details

- -
-

Time

-
Format: HH:MM:SS
-
- The exact time the packet was received by the radio module. Displayed in 24-hour format. Useful for correlating events with logs and identifying traffic patterns throughout the day. -
-
- -
-

Type

-
Packet payload type identifier
-
- ADVERT: Node advertisement/discovery packets (usually broadcasts)
- ACK: Acknowledgment responses
- TXT: Text messages
- GRP: Group messages
- PATH: Path information packets
- RESP: Response packets
- TRACE: Trace/debug packets
- -
-
- -
-

Route

-
Routing mode indicator
-
- DIRECT: Packet explicitly routed to this repeater (contains its address in the path)
- FLOOD: Broadcast packet intended for all nodes in range
- DIRECT packets have higher priority since they're specifically addressed to your repeater. FLOOD packets are retransmitted if bandwidth allows. -
-
- -
-

Length

-
Payload size in bytes
-
- The actual payload data size (not including LoRa overhead). Affects airtime consumption and score calculation. Larger packets take longer to transmit, consuming more airtime budget. Typical range: 20-250 bytes. -
-
- -
-

RSSI

-
Received Signal Strength Indicator (dBm)
-
- Measures signal power. More negative = weaker signal
- Excellent: -80 to -100 dBm (strong)
- Good: -100 to -120 dBm (acceptable)
- Poor: -120 to -140 dBm (weak, may be unreliable)
- Affects score calculation - better RSSI yields higher scores. Distance and obstacles reduce RSSI. -
-
- -
-

SNR

-
Signal-to-Noise Ratio (dB)
-
- Measures signal clarity vs. background noise. Higher = cleaner signal
- Excellent: SNR > 10 dB (very clean)
- Good: SNR 5-10 dB (normal operation)
- Poor: SNR < 5 dB (noisy environment)
- Even with weak RSSI, high SNR indicates reliable reception. Critical for score calculation. -
-
- -
-

Score

-
Composite quality metric (0.0 - 1.0)
-
- A single number representing overall packet quality based on SNR and packet length. This matches the C++ MeshCore algorithm exactly. Higher scores (closer to 1.0) indicate better quality packets with good SNR relative to the spreading factor threshold. Used internally for optional reactive delay optimization (when use_score_for_tx is enabled). See Scoring System section for detailed calculation method. -
-
- -
-

TX Delay

-
Time in milliseconds
-
- How long the repeater waited before retransmitting. Delay factors include:
- • Airtime budget checking
- • Random collision avoidance (0-5ms factor)
- • Current channel utilization
- • Optional quality-based prioritization (when enabled)
- Longer delays may indicate congestion or airtime throttling to comply with duty cycle limits. -
-
- -
-

Status

-
Packet processing outcome
-
- FORWARDED: Packet has been successfully retransmitted to other nodes. The repeater forwarded this packet over the air.
- DROPPED: Packet was rejected and not forwarded.
-
- Drop Reasons: -
    -
  • Duplicate: Packet hash already in cache. Prevents redundant retransmission.
  • -
  • Empty payload: Packet has no payload data. Cannot be processed.
  • -
  • Path at max size: Path field has reached maximum length. Cannot add repeater identifier.
  • -
  • Duty cycle limit: Airtime budget exhausted. Cannot transmit (EU 1% duty cycle or configured limit).
  • -
  • Direct: no path: Direct-mode packet lacks routing path.
  • -
  • Direct: not our hop: Direct-mode packet is not addressed to this repeater node.
  • -
-
-
-
- - -
-

Scoring System

- -

The packet score is calculated using the exact same algorithm as the C++ MeshCore implementation. It combines SNR (relative to spreading factor threshold) and packet length to produce a single quality indicator (0.0 to 1.0). This score can optionally be used for reactive delay optimization when use_score_for_tx is enabled.

- -

The Scoring Formula

- -
-
-
- Score = SNR Factor × Length Factor -
- - - - - - -
-
SNR Factor
-
- (SNR - SFthreshold) / 10 -
-
-
Length Factor
-
- (1 - length / 256) -
-
-
- -

Spreading Factor Thresholds

-
-
- SF7 → -7.5 dB -
-
- SF8 → -10.0 dB -
-
- SF9 → -12.5 dB -
-
- SF10 → -15.0 dB -
-
- SF11 → -17.5 dB -
-
- SF12 → -20.0 dB -
-
- -

Real-World Example

-
-

Packet Details:

-
    -
  • SNR: 12 dB
  • -
  • Spreading Factor: SF8
  • -
  • Payload Length: 100 bytes
  • -
-
-

Calculation:

-
- SNR Factor = (12 - (-10)) / 10 = 22 / 10 = 2.2 (clamped to 1.0)
- Length Factor = (1 - 100/256) = 0.609
- Score = 1.0 × 0.609 = 0.61 (FAIR quality) -
-
-
- -

This formula ensures that:

-
    -
  • Signal quality matters: Higher SNR produces higher scores, with SF-specific thresholds
  • -
  • Smaller packets score higher: They consume less airtime due to shorter transmission time
  • -
  • Poor SNR packets may score zero: If SNR falls below SF threshold, score = 0.0
  • -
- -

Score Interpretation

- -
- -
-
Quality Scale
-
-
- 0.0 - 0.25 - 0.5 - 0.75 - 1.0 -
-
- - -
-
-
0.9 - 1.0 Excellent
-
Perfect conditions, high SNR, small payload
-
- -
-
0.7 - 0.9 Good
-
Normal operation, acceptable signal
-
- -
-
0.5 - 0.7 Fair
-
Degraded conditions, lower SNR
-
- -
-
0.3 - 0.5 Poor
-
Marginal conditions, weak signal
-
- -
-
< 0.3 Very Poor
-
Barely usable, may be dropped
-
-
-
-
- - -
-

What Affects Your Score?

- -

Primary Factors

- -
-

Signal-to-Noise Ratio (SNR)

-
- Impact: HIGHEST
- Each 1 dB improvement in SNR can increase score by ~0.05. High interference environments significantly reduce scores. The repeater benefits from placement with clear LoS (line of sight) to minimize multipath and fading. -
-
- -
-

Packet Payload Length

-
- Impact: HIGH
- Larger packets consume more airtime due to longer transmission times. A 100-byte packet scores lower than a 50-byte packet with identical SNR. -
- -
-

RSSI (Signal Strength)

-
- Impact: NOT USED IN SCORING
- RSSI is displayed for monitoring purposes but does NOT affect the score calculation. The C++ MeshCore algorithm uses only SNR and packet length. However, RSSI correlates with SNR - better RSSI typically means better SNR, which indirectly results in higher scores. -
-
- -

Environmental Factors

- -
    -
  • Weather: Rain and fog reduce signal strength and increase noise
  • -
  • Time of Day: Atmospheric conditions change, especially during dawn/dusk
  • -
  • Frequency Congestion: More devices on 869 MHz = higher noise floor
  • -
  • Physical Obstructions: Buildings and trees block signals, increase fading
  • -
  • Antenna Orientation: Poor antenna alignment reduces SNR significantly
  • -
- -
-

Environmental Issues: If you see consistently low scores across many packets, check your antenna placement, orientation, and surroundings. Poor environmental conditions are often the limiting factor, not the repeater itself.

-
-
- - -
-

Reactive Score-Based Delay Optimization

- -

The repeater includes an optional reactive scoring system that dynamically prioritizes packets based on signal quality during network congestion. This feature matches the C++ MeshCore behavior for intelligent packet prioritization.

- -

How It Works

- -
-

Key Principle: When the repeater detects congestion (calculated TX delay ≥ 50ms), it automatically applies a quality-based delay multiplier to high-quality packets, giving them priority while gracefully backing off low-quality packets.

-

Default Behavior: This feature is disabled by default (use_score_for_tx: false). When disabled, all packets follow standard C++ MeshCore delay calculation with pure randomization.

-
- -

Delay Multiplier Formula

- -
-
-
- Applied Only When: delay ≥ 50ms AND use_score_for_tx = true -
- -
- Delay Multiplier = max(0.2, 1.0 - score) -
- -
-

What this means:

-
    -
  • Perfect packet (score 1.0): Multiplier = max(0.2, 0.0) = 0.2 → Gets 20% of base delay (fast priority)
  • -
  • Good packet (score 0.7): Multiplier = max(0.2, 0.3) = 0.3 → Gets 30% of base delay
  • -
  • Fair packet (score 0.5): Multiplier = max(0.2, 0.5) = 0.5 → Gets 50% of base delay
  • -
  • Poor packet (score 0.2): Multiplier = max(0.2, 0.8) = 0.8 → Gets 80% of base delay (slower, backoff)
  • -
  • Minimum floor: No packet gets less than 20% multiplier (prevents starvation)
  • -
-
-
-
- -

Example: Reactive Scoring in Action

- -
-

Scenario: Two packets arrive during congestion (base delay 100ms), tx_delay_factor=1.0

-
    -
  • Packet X: Excellent signal, score = 0.9
  • -
  • Packet Y: Weak signal, score = 0.4
  • -
-

Without Reactive Scoring (disabled):

-
    -
  • Packet X: TX Delay = 0-500ms (pure random collision avoidance)
  • -
  • Packet Y: TX Delay = 0-500ms (pure random collision avoidance)
  • -
  • Result: Both may transmit at same time, causing collision
  • -
-

With Reactive Scoring (enabled, congestion detected):

-
    -
  • Packet X: Multiplier = 0.1 → TX Delay = 0-50ms (high priority, transmits first)
  • -
  • Packet Y: Multiplier = 0.6 → TX Delay = 0-300ms (lower priority, waits longer)
  • -
  • Result: High-quality packets forward with minimal delay; marginal packets gracefully back off
  • -
-
- -

Configuration

- -
-

use_score_for_tx

-
Enable/disable reactive score-based delay optimization
-
- Default: false (disabled)
- Options: true or false
- When true: Activates quality-based delay multiplier when congestion detected (delay ≥ 50ms)
- When false: Standard C++ MeshCore behavior, pure random delays, no score influence on timing
- Location in config.yaml: -
- repeater:
-   use_score_for_tx: false -
-
-
- -
-

score_threshold

-
Reserved for future enhancement / statistics monitoring
-
- Default: 0.3
- Range: 0.0 - 1.0
- Current Status: This value is read from config but not currently used in packet processing. It is reserved for future features.
- Future Potential Uses: -
    -
  • Dashboard quality alerts when average packet score drops below threshold
  • -
  • Proactive packet filtering - dropping very poor quality packets upfront (below threshold)
  • -
  • Quality monitoring and trend statistics in web UI
  • -
  • Logging alerts for poor signal conditions
  • -
- Recommendation: Leave at default (0.3). Changing it currently has no effect on packet processing. This setting will become active once future quality monitoring features are implemented. -
-
- -

When to Enable Reactive Scoring

- -
-
-
Enable (use_score_for_tx: true)
-

- • High-traffic networks where collisions are frequent
- • Noisy environments with poor average signal quality
- • You want to prioritize high-quality packets during congestion
- • Testing adaptive network behavior
- • Duty-cycle constrained regions (EU) with limited bandwidth -

-
- -
-
Disable (use_score_for_tx: false)
-

- • Low-traffic networks where congestion is rare
- • You want pure C++ MeshCore compatibility
- • Consistent delay behavior is more important than efficiency
- • New deployments - start simple and tune later
- -

-
-
- -
-

Important: Reactive scoring only affects TX delay timing, not packet forwarding decisions. All packets still get forwarded (unless dropped for other reasons like duplicates or duty cycle). The system gracefully prioritizes quality during congestion without dropping packets, matching MeshCore's intelligent backpressure strategy.

-
-
-

Configuration Impact on Scoring

- -

Your repeater's configuration settings directly affect packet scoring and processing behavior.

- -

Radio Configuration Parameters

- -
-
-
Spreading Factor (SF)
-

Current setting: SF 8
- Higher SF (9-12): Better range and SNR, but slower transmission, more airtime consumed
- Lower SF (7): Faster transmission, less airtime, but worse sensitivity and range
- Score impact: Higher SF generally improves SNR = higher scores, but increases payload duration penalty

-
- -
-
Bandwidth (BW)
-

Current setting: 62.5 kHz
- Wider BW (125 kHz): Faster data rate, less airtime per byte, but worse sensitivity
- Narrower BW (31.25 kHz): Better sensitivity, but slower transmission
- Score impact: BW affects SNR - narrower = potentially better SNR but longer TX times

-
- -
-
TX Power
-

Current setting: 14 dBm
- Higher power: Better outbound range, but may increase noise at nearby receivers
- Lower power: Reduces interference, saves energy, but limits outbound range
- Score impact: TX power only affects outgoing transmissions, not received score

-
- -
-
Coding Rate (CR)
-

Current setting: 4/8
- Higher CR (4/7): Less error correction, faster transmission, more airtime efficient
- Lower CR (4/8): More error correction, better resilience to interference
- Score impact: Higher CR can improve SNR in clean environments, reduce it in noisy ones

-
-
- -

Duty Cycle Configuration

- -
-

Current Duty Cycle Limit: 6% max airtime per hour

-

This means your repeater can spend at most 3.6 minutes (21.6 seconds per minute) transmitting per hour. How this affects packet handling:

-
    -
  • When below limit: All packets retransmitted if they pass validation
  • -
  • When approaching limit: Incoming packets may be dropped if airtime budget is exhausted
  • -
  • When limit reached: All new transmissions are dropped until the duty cycle budget resets (each minute)
  • -
-

Important: The repeater does NOT queue packets for later transmission. When duty cycle limit is reached, packets are immediately dropped. This is by design - a repeater must forward immediately or drop the packet. Note: Packet score does not affect duty cycle enforcement - all packets are treated equally when duty cycle limit is reached.

-
- -

Airtime Consumption Example

- -
-

Scenario: 100-byte packet at SF8, BW 62.5 kHz, CR 4/8
- Airtime: ~512 ms
- At 6% duty cycle: Can transmit ~420 packets/hour maximum
- Effect on score: High volume of large packets will consume budget quickly, causing lower-scored packets to be dropped -

-
- - - -
-

Configuration Settings Reference

- -

The repeater is configured via config.yaml. This section explains key settings and how they affect packet performance.

- -
-

Important: Packet Score (signal quality) and TX Delay (collision avoidance timing) are independent systems. Score is calculated from SNR and packet length. Delays are configured via tx_delay_factor and direct_tx_delay_factor and are based on airtime, not signal quality.

-
- -

Delay Settings

- -
-

tx_delay_factor

-
Flood mode transmission delay multiplier
-
- Default: 1.0
- Purpose: Scales the base collision-avoidance delay for flood packets.
- Formula: delay = random(0-5) × (airtime × 52/50 ÷ 2) × tx_delay_factor
- Effect: Higher values = longer delays between flood packet retransmissions, reducing collisions but increasing latency. Lower values speed up propagation in low-traffic areas.
- Typical range: 0.5 - 2.0 (0.5 = faster, 2.0 = collision-resistant) -
-
- -
-

direct_tx_delay_factor

-
Direct mode transmission delay (in seconds)
-
- Default: 0.5 seconds
- Purpose: Fixed delay for direct-routed packets (packets specifically addressed to this repeater).
- Effect: Direct packets wait this many seconds before retransmission. Direct packets bypass the collision-avoidance algorithm and use a fixed delay instead.
- Note: Typically lower than flood delays to prioritize DIRECT packets. 0 = immediate forwarding.
- Typical range: 0 - 2.0 seconds -
-
- -

How TX Delay is Calculated

- -

The TX Delay shown in the packet table follows the MeshCore C++ implementation for collision avoidance:

- -
-

For FLOOD packets (broadcast):
- TX Delay = random(0 to 5) × (airtime_ms × 52/50 ÷ 2) × tx_delay_factor ÷ 1000

- For DIRECT packets (addressed to this repeater):
- TX Delay = direct_tx_delay_factor (fixed, in seconds)

- Optional Reactive Scoring:
- If use_score_for_tx is enabled AND delay ≥ 50ms:
- TX Delay = base_delay × max(0.2, 1.0 - packet_score)
- This applies a quality-based multiplier during congestion: high-score packets get shorter delays (priority), low-score packets get longer delays (backoff).

- Example: FLOOD packet with 100ms airtime, tx_delay_factor=1.0, score=0.8:
- • Base delay = (100 × 52/50 ÷ 2) = 52 ms
- • With random(0-5) multiplier: 0-260 ms (before score adjustment)
- • If ≥50ms AND score adjustment active: 0-260ms × max(0.2, 1.0-0.8) = 0-260ms × 0.2 = 0-52ms (prioritized)

- Tuning: Increase tx_delay_factor in high-traffic areas to reduce collisions. Decrease in low-traffic areas for faster propagation. Enable use_score_for_tx for intelligent priority during congestion. Direct packets bypass randomization and use fixed delays. -

-
- -

Duty Cycle Constraints

- -
-

max_airtime_per_minute

-
Maximum transmission time per minute in milliseconds
-
- Common values:
- • 3600 ms/min = 100% duty cycle (US/AU FCC, no restriction)
- • 36 ms/min = 1% duty cycle (EU ETSI standard)
- • 360 ms/min = 10% duty cycle (compromise for EU testing)

- Effect on packet handling: Duty cycle enforcement is independent of packet score. When duty cycle limit is reached, ALL packets are dropped equally - regardless of signal quality. The system does not prioritize high-score packets; it simply refuses to transmit until the budget resets.
- TX Delay impact: TX Delay shown in the packet table is unaffected by duty cycle limits. However, packets may be completely blocked (dropped) when airtime budget is exhausted. There is no queuing or delay-until-later mechanism - dropped packets are lost immediately.
- Packet distribution during high traffic: When approaching or exceeding duty cycle limits (>80%), incoming packets are dropped indiscriminately based on airtime availability. The mean packet score will fluctuate based on random traffic mix, not because the system prefers high-score packets. All packets have equal probability of being dropped when budget is exhausted. -
-
- -

How These Work Together

- -
-

Example Scenario - Packet Forwarding with Delay:

-

You receive 3 packets with different routes and sizes (tx_delay_factor=1.0, direct_tx_delay_factor=0.5s):

-
    -
  • Packet A: Route DIRECT, 50 bytes → TX Delay = 0.5 seconds (fixed)
  • -
  • Packet B: Route FLOOD, 100 bytes → TX Delay = random(0-5) × 52ms × 1.0 = 0-260 ms
  • -
  • Packet C: Route FLOOD, 150 bytes → TX Delay = random(0-5) × 78ms × 1.0 = 0-390 ms
  • -
-

Processing order (without duty cycle limits):

-
    -
  • Packet A: Waits 0.5s, then forwards (direct packets get fixed priority)
  • -
  • Packets B & C: Random delays prevent collision, lower packet transmitted first if random lucky
  • -
-

If duty cycle ~95% full: Still forwards all three, but with increased TX delays. If insufficient airtime remains for a packet, it is dropped immediately (not queued)

-
- -

Optimization Tips

- -
    -
  • For high-traffic/interference: Increase tx_delay_factor to 1.5-2.0 to reduce collisions with more randomization
  • -
  • For low-traffic areas: Decrease tx_delay_factor to 0.5 for faster propagation
  • -
  • For priority direct packets: Lower direct_tx_delay_factor below 0.5s for faster handling
  • -
  • For duty-cycle constrained regions (EU): Keep default settings; airtime budget enforces fairness
  • -
  • Monitor TX Delay column: Increasing delays indicate network congestion or approaching duty cycle limits
  • -
-
- - ↑ Back to Top -
-
-
-
- - - - diff --git a/repeater/templates/logs.html b/repeater/templates/logs.html deleted file mode 100644 index 22317e0..0000000 --- a/repeater/templates/logs.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - pyMC Repeater - Logs - - - - - -
- - - - -
-
-

System Logs

-

Real-time system events and diagnostics

-
- - -
-
- - - -
-
- -
-
- - -
-
- [Loading...] - INFO - Fetching system logs... -
-
-
-
- - - - diff --git a/repeater/templates/nav.html b/repeater/templates/nav.html deleted file mode 100644 index 5417728..0000000 --- a/repeater/templates/nav.html +++ /dev/null @@ -1,723 +0,0 @@ - - - - - - diff --git a/repeater/templates/neighbors.html b/repeater/templates/neighbors.html deleted file mode 100644 index 47654a5..0000000 --- a/repeater/templates/neighbors.html +++ /dev/null @@ -1,796 +0,0 @@ - - - - pyMC Repeater - Neighbors - - - - - - - -
- - - - -
-
-

Neighbor Repeaters

-
- Tracking: 0 repeaters - Updated: {{ last_updated }} -
-
- - -
-

Repeater Network Map

-
-
-
-
- - -
-

Discovered Repeaters

-
- - - - - - - - - - - - - - - - - - - - -
Node NamePublic KeyContact TypeLocationDistanceRSSISNRLast SeenFirst SeenAdvert Count
- No repeaters discovered yet - waiting for adverts... -
-
-
-
-
- - - - - - diff --git a/repeater/templates/statistics.html b/repeater/templates/statistics.html deleted file mode 100644 index a91bb9b..0000000 --- a/repeater/templates/statistics.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - pyMC Repeater - Statistics - - - - - - - -
- - - - -
-
-

Statistics

-

Detailed performance analytics and metrics

-
- - -

Summary

-
-
-
Total RX
-
0packets
-
- -
-
Total TX
-
0packets
-
- -
-
Repeats
-
0packets
-
-
- - -

Performance Charts

-
-
-

RX vs TX Over Time

-
- -
-
- -
-

Packet Type Distribution

-
- -
-
- -
-

Signal Metrics Over Time

-
- -
-
- -
-

Route Type Distribution

-
- -
-
-
-
-
- - - - diff --git a/repeater/templates/style.css b/repeater/templates/style.css deleted file mode 100644 index ed16ed9..0000000 --- a/repeater/templates/style.css +++ /dev/null @@ -1,1848 +0,0 @@ -/* ============================================================================ - LoRa Repeater Dashboard - Professional Design System - - Design Philosophy: - - Modern, minimal aesthetic inspired by contemporary design systems - - Consistent spacing, subtle depth, and refined typography - - Accessible colour palette with WCAG AA+ contrast ratios - - Responsive, mobile-first approach - ============================================================================ */ - -/* ============================================================================ - COLOUR PALETTE & DESIGN TOKENS - ============================================================================ */ - -:root { - /* Colour Palette */ - --color-bg-primary: #0f1419; - --color-bg-secondary: #1a1f2e; - --color-bg-tertiary: #252d3d; - --color-bg-hover: #2d3547; - - --color-text-primary: #f1f3f5; - --color-text-secondary: #a8b1c3; - --color-text-tertiary: #7d8599; - - --color-border: #3a4454; - --color-border-light: #2d3547; - - /* Brand Accent */ - --color-accent-primary: #00d4ff; - --color-accent-primary-hover: #00e5ff; - --color-accent-primary-dim: rgba(0, 212, 255, 0.15); - - /* Status Colours (accessible) */ - --color-success: #10b981; - --color-success-dim: rgba(16, 185, 129, 0.15); - --color-warning: #f59e0b; - --color-warning-dim: rgba(245, 158, 11, 0.15); - --color-error: #ef4444; - --color-error-dim: rgba(239, 68, 68, 0.15); - --color-info: #3b82f6; - --color-info-dim: rgba(59, 130, 246, 0.15); - - /* Spacing Scale (8px base) */ - --spacing-xs: 0.25rem; /* 4px */ - --spacing-sm: 0.5rem; /* 8px */ - --spacing-md: 1rem; /* 16px */ - --spacing-lg: 1.5rem; /* 24px */ - --spacing-xl: 2rem; /* 32px */ - --spacing-2xl: 3rem; /* 48px */ - - /* Sizing */ - --size-sidebar: 280px; - --size-header-height: 64px; - - /* Shadows */ - --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05); - --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1); - --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1); - --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15); - - /* Border Radius */ - --radius-sm: 0.375rem; /* 6px */ - --radius-md: 0.5rem; /* 8px */ - --radius-lg: 0.75rem; /* 12px */ - - /* Transitions */ - --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1); - --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1); - --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1); - - /* Typography */ - --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif; - --font-family-mono: "SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", monospace; - - --font-size-xs: 0.75rem; /* 12px */ - --font-size-sm: 0.875rem; /* 14px */ - --font-size-base: 1rem; /* 16px */ - --font-size-lg: 1.125rem; /* 18px */ - --font-size-xl: 1.25rem; /* 20px */ - --font-size-2xl: 1.5rem; /* 24px */ - --font-size-3xl: 2rem; /* 32px */ - - --font-weight-regular: 400; - --font-weight-medium: 500; - --font-weight-semibold: 600; - --font-weight-bold: 700; -} - -/* ============================================================================ - RESET & GLOBAL STYLES - ============================================================================ */ - -*, -*::before, -*::after { - margin: 0; - padding: 0; - box-sizing: border-box; -} - -html { - scroll-behavior: smooth; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -body { - font-family: var(--font-family-base); - font-size: var(--font-size-base); - font-weight: var(--font-weight-regular); - line-height: 1.5; - color: var(--color-text-primary); - background: var(--color-bg-primary); - height: 100vh; -} - -/* Reset link styling globally */ -a { - color: inherit; - text-decoration: none; -} - -a:visited { - color: inherit; -} - -/* ============================================================================ - LAYOUT: SIDEBAR + CONTENT - ============================================================================ */ - -.layout { - display: flex; - height: 100vh; - overflow: hidden; -} - -/* Desktop layout - no extra padding */ -@media (min-width: 769px) { - .layout { - padding-top: 0; - } -} - -/* SIDEBAR */ - -.sidebar { - width: var(--size-sidebar); - background: var(--color-bg-secondary); - border-right: 1px solid var(--color-border); - display: flex; - flex-direction: column; - overflow-y: auto; - overflow-x: hidden; -} - -.sidebar::-webkit-scrollbar { - width: 6px; -} - -.sidebar::-webkit-scrollbar-track { - background: var(--color-bg-secondary); -} - -.sidebar::-webkit-scrollbar-thumb { - background: var(--color-border); - border-radius: var(--radius-sm); -} - -.sidebar::-webkit-scrollbar-thumb:hover { - background: var(--color-border-light); -} - -/* SIDEBAR HEADER */ - -.sidebar-header { - padding: var(--spacing-lg); - border-bottom: 1px solid var(--color-border); - background: linear-gradient( - 135deg, - rgba(0, 212, 255, 0.1) 0%, - rgba(59, 130, 246, 0.05) 100% - ); -} - -.sidebar-header h1 { - font-size: var(--font-size-xl); - font-weight: var(--font-weight-bold); - color: var(--color-accent-primary); - margin-bottom: var(--spacing-xs); - letter-spacing: -0.5px; -} - -.sidebar-header .node-name { - font-size: var(--font-size-sm); - color: var(--color-text-secondary); - font-weight: var(--font-weight-regular); -} - -.sidebar-header .node-pubkey { - font-size: 0.7rem; - color: var(--color-text-tertiary); - font-family: 'Courier New', monospace; - margin-top: 0.25rem; - word-break: break-all; -} - -/* Hide menu toggle on desktop */ -.menu-toggle { - display: none !important; -} - -/* ============================================================================ - MODERN SIDEBAR NAVIGATION - ============================================================================ */ - -.sidebar-nav { - flex-grow: 1; - display: flex; - flex-direction: column; - gap: 2rem; - padding: 1rem; -} - -.nav-section { - display: flex; - flex-direction: column; - gap: 0.5rem; -} - -.nav-section-title { - font-size: 0.75rem; - text-transform: uppercase; - letter-spacing: 0.08em; - font-weight: 600; - color: var(--color-text-tertiary); - margin-bottom: 0.5rem; - padding: 0; -} - -.nav-item { - display: flex; - align-items: center; - gap: 0.75rem; - color: var(--color-text-secondary); - text-decoration: none; - padding: 0.85rem 1rem; - border-radius: 12px; - transition: background 250ms ease, color 250ms ease; - font-size: 0.95rem; - font-weight: 500; - cursor: pointer; - user-select: none; -} - -.nav-item:hover { - background: rgba(255, 255, 255, 0.08); - color: #60a5fa; -} - -.nav-item.active { - background: #3b82f6; - color: #ffffff; - font-weight: 600; - box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3); -} - -.nav-item .icon { - width: 1.5rem; - height: 1.5rem; - flex-shrink: 0; - stroke: currentColor; - stroke-width: 1.5; - opacity: 0.9; - transition: opacity 250ms ease; -} - -.nav-item:hover .icon, -.nav-item.active .icon { - opacity: 1; -} - -.nav-action { - background: rgba(16, 185, 129, 0.15) !important; - border: 1px solid rgba(16, 185, 129, 0.4); - cursor: pointer; - color: #ffffff; -} - -.nav-action:hover { - background: rgba(16, 185, 129, 0.25) !important; - color: #ffffff; - border-color: rgba(16, 185, 129, 0.6); -} - -.nav-action:active { - background: rgba(16, 185, 129, 0.35) !important; - color: #ffffff; -} - -.nav-action:disabled { - opacity: 0.6; - cursor: not-allowed; - background: rgba(16, 185, 129, 0.1) !important; - color: rgba(255, 255, 255, 0.6); -} - -.nav-button { - display: flex; - align-items: center; - gap: 0.75rem; - color: #ffffff; - background: linear-gradient(135deg, #10b981 0%, #059669 100%); - border: none; - padding: 0.85rem 1rem; - border-radius: 12px; - transition: all 250ms ease; - font-size: 0.95rem; - font-weight: 600; - cursor: pointer; - user-select: none; - width: 100%; - text-align: left; - box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3); -} - -.nav-button:hover { - background: linear-gradient(135deg, #059669 0%, #047857 100%); - box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4); - transform: translateY(-1px); -} - -.nav-button:active { - transform: translateY(0); - box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3); -} - -.nav-button .icon { - width: 1.5rem; - height: 1.5rem; - flex-shrink: 0; - stroke: currentColor; - stroke-width: 1.5; -} - -svg.icon { - display: inline-block; - width: 1.5rem !important; - height: 1.5rem !important; - min-width: 1.5rem; - min-height: 1.5rem; - vertical-align: middle; - flex-shrink: 0; -} - -/* SIDEBAR CONTENT WRAPPER - Desktop: transparent wrapper, doesn't affect layout */ - -.sidebar-content-wrapper { - display: contents; /* Makes wrapper invisible on desktop, children act as if wrapper doesn't exist */ -} - -/* SIDEBAR FOOTER */ - -.sidebar-footer { - margin-top: auto; /* Push footer to bottom of sidebar */ - padding: var(--spacing-lg); - border-top: 1px solid var(--color-border); - background: var(--color-bg-tertiary); -} - -.status-badge { - display: inline-block; - background: var(--color-success-dim); - color: var(--color-success); - padding: var(--spacing-xs) var(--spacing-sm); - border-radius: var(--radius-sm); - font-size: var(--font-size-xs); - font-weight: var(--font-weight-semibold); -} - -.version-badge { - display: inline-block; - background: rgba(100, 116, 139, 0.15); - color: var(--color-text-secondary); - padding: var(--spacing-xs) var(--spacing-sm); - border-radius: var(--radius-sm); - font-size: var(--font-size-xs); - font-weight: var(--font-weight-semibold); - font-family: monospace; -} - -/* Control Buttons */ -.control-buttons { - display: flex; - flex-direction: column; - gap: var(--spacing-sm); - margin-bottom: var(--spacing-md); -} - -.control-btn { - display: flex; - align-items: center; - gap: var(--spacing-sm); - padding: var(--spacing-sm) var(--spacing-md); - background: var(--color-bg-secondary); - border: 1px solid var(--color-border); - border-radius: var(--radius-md); - color: var(--color-text-secondary); - cursor: pointer; - transition: all var(--transition-base); - font-family: var(--font-family-base); - font-size: var(--font-size-sm); - width: 100%; - text-align: left; -} - -.control-btn:hover:not(.control-btn-active):not(.control-btn-warning) { - background: var(--color-bg-hover); - border-color: var(--color-accent-primary); - transform: translateY(-1px); - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); -} - -.control-btn.control-btn-active:hover, -.control-btn.control-btn-warning:hover { - transform: translateY(-1px); - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); - filter: brightness(1.1); -} - -.control-btn:active { - transform: translateY(0); -} - -.control-btn:disabled { - opacity: 0.5; - cursor: not-allowed; - transform: none; -} - -.control-btn .icon { - width: 1.25rem; - height: 1.25rem; - flex-shrink: 0; - stroke: currentColor; -} - -.control-label { - display: flex; - flex-direction: column; - gap: 2px; - flex: 1; -} - -.control-title { - font-size: var(--font-size-xs); - color: var(--color-text-tertiary); - text-transform: uppercase; - letter-spacing: 0.5px; - font-weight: var(--font-weight-semibold); -} - -.control-value { - font-size: var(--font-size-sm); - color: var(--color-text-primary); - font-weight: var(--font-weight-semibold); -} - -.control-btn.control-btn-active { - border-color: var(--color-success) !important; - background: var(--color-success-dim) !important; -} - -.control-btn.control-btn-active .icon { - stroke: var(--color-success) !important; -} - -.control-btn.control-btn-active .control-title { - color: var(--color-text-secondary) !important; -} - -.control-btn.control-btn-active .control-value { - color: var(--color-success) !important; -} - -.control-btn.control-btn-warning { - border-color: var(--color-warning) !important; - background: var(--color-warning-dim) !important; -} - -.control-btn.control-btn-warning .icon { - stroke: var(--color-warning) !important; -} - -.control-btn.control-btn-warning .control-title { - color: var(--color-text-secondary) !important; -} - -.control-btn.control-btn-warning .control-value { - color: var(--color-warning) !important; -} - -.duty-cycle-stats { - margin: var(--spacing-md) 0; -} - -.duty-cycle-bar-container { - width: 100%; - height: 6px; - background: var(--color-bg-secondary); - border-radius: 3px; - overflow: hidden; - margin-bottom: var(--spacing-xs); -} - -.duty-cycle-bar { - height: 100%; - background: var(--color-success); - transition: width 0.3s ease, background-color 0.3s ease; - border-radius: 3px; -} - -.duty-cycle-text { - display: block; - color: var(--color-text-secondary); - font-size: var(--font-size-xs); - line-height: 1.4; -} - -.duty-cycle-text strong { - color: var(--color-text-primary); - font-weight: var(--font-weight-semibold); -} - -.sidebar-footer small { - display: block; - color: var(--color-text-tertiary); - font-size: var(--font-size-xs); - line-height: 1.6; -} - -/* CONTENT AREA */ - -.content { - flex: 1; - overflow-y: auto; - overflow-x: hidden; - padding: var(--spacing-2xl); - background: var(--color-bg-primary); -} - -.content::-webkit-scrollbar { - width: 8px; -} - -.content::-webkit-scrollbar-track { - background: var(--color-bg-primary); -} - -.content::-webkit-scrollbar-thumb { - background: var(--color-border); - border-radius: var(--radius-sm); -} - -.content::-webkit-scrollbar-thumb:hover { - background: var(--color-text-tertiary); -} - - -/* ============================================================================ - HEADER & TYPOGRAPHY - ============================================================================ */ - -header { - margin-bottom: var(--spacing-2xl); - border-bottom: 1px solid var(--color-border); - padding-bottom: var(--spacing-lg); -} - -h1 { - font-size: var(--font-size-3xl); - font-weight: var(--font-weight-bold); - color: var(--color-text-primary); - margin-bottom: var(--spacing-md); - letter-spacing: -0.5px; -} - -h2 { - font-size: var(--font-size-2xl); - font-weight: var(--font-weight-bold); - color: var(--color-text-primary); - margin: var(--spacing-2xl) 0 var(--spacing-lg) 0; - letter-spacing: -0.25px; -} - -h3 { - font-size: var(--font-size-lg); - font-weight: var(--font-weight-semibold); - color: var(--color-text-primary); -} - -.header-info { - display: flex; - justify-content: space-between; - align-items: center; - font-size: var(--font-size-sm); - color: var(--color-text-secondary); -} - - -/* ============================================================================ - STAT CARDS - ============================================================================ */ - -.stats-grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); - gap: var(--spacing-lg); - margin-bottom: var(--spacing-2xl); -} - -.stat-card { - background: var(--color-bg-secondary); - padding: var(--spacing-lg); - border-radius: var(--radius-lg); - border: 1px solid var(--color-border); - box-shadow: var(--shadow-sm); - transition: all var(--transition-base); - border-left: 3px solid var(--color-accent-primary); -} - -.stat-card:hover { - border-color: var(--color-border-light); - box-shadow: var(--shadow-md); - transform: translateY(-2px); -} - -.stat-card.success { - border-left-color: var(--color-success); -} - -.stat-card.warning { - border-left-color: var(--color-warning); -} - -.stat-card.error { - border-left-color: var(--color-error); -} - -.stat-label { - display: block; - font-size: var(--font-size-xs); - font-weight: var(--font-weight-semibold); - color: var(--color-text-secondary); - text-transform: uppercase; - letter-spacing: 0.5px; - margin-bottom: var(--spacing-md); -} - -.stat-value { - font-size: var(--font-size-3xl); - font-weight: var(--font-weight-bold); - color: var(--color-accent-primary); - line-height: 1; - margin-bottom: var(--spacing-sm); -} - -.stat-unit { - font-size: var(--font-size-sm); - color: var(--color-text-tertiary); - margin-left: var(--spacing-xs); -} - - -/* ============================================================================ - CHARTS - ============================================================================ */ - -.charts-grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(480px, 1fr)); - gap: var(--spacing-lg); - margin-bottom: var(--spacing-2xl); -} - -.chart-card { - background: var(--color-bg-secondary); - padding: var(--spacing-lg); - border-radius: var(--radius-lg); - border: 1px solid var(--color-border); - box-shadow: var(--shadow-sm); - transition: all var(--transition-base); -} - -.chart-card:hover { - border-color: var(--color-border-light); - box-shadow: var(--shadow-md); -} - -.chart-card h3 { - font-size: var(--font-size-sm); - font-weight: var(--font-weight-semibold); - color: var(--color-text-primary); - text-transform: uppercase; - letter-spacing: 0.5px; - margin-bottom: var(--spacing-lg); -} - -.chart-container { - position: relative; - height: 240px; -} - -/* Chart.js customization */ -.chart-container canvas { - max-height: 240px; -} - - -/* ============================================================================ - TABLES - ============================================================================ */ - -.table-container { - overflow-x: auto; - border-radius: var(--radius-lg); - box-shadow: var(--shadow-sm); -} - -table { - width: 100%; - border-collapse: collapse; - background: var(--color-bg-secondary); - border: 1px solid var(--color-border); - border-radius: var(--radius-lg); - overflow: hidden; -} - -thead { - background: linear-gradient( - 90deg, - rgba(0, 212, 255, 0.15) 0%, - rgba(59, 130, 246, 0.1) 100% - ); - border-bottom: 1px solid var(--color-border); -} - -th { - padding: var(--spacing-md); - text-align: left; - font-weight: var(--font-weight-semibold); - font-size: var(--font-size-xs); - color: var(--color-text-primary); - text-transform: uppercase; - letter-spacing: 0.5px; -} - -td { - padding: var(--spacing-md); - border-bottom: 1px solid var(--color-border-light); - font-size: var(--font-size-sm); - color: var(--color-text-secondary); -} - -tbody tr { - transition: background-color var(--transition-fast); -} - -tbody tr:hover { - background: var(--color-bg-tertiary); -} - -tbody tr:last-child td { - border-bottom: none; -} - -/* Table cell styles */ -.packet-type { - color: var(--color-accent-primary); - font-weight: var(--font-weight-medium); - font-size: var(--font-size-xs); -} - -.route-flood { - color: var(--color-warning); - background: var(--color-warning-dim); - padding: var(--spacing-xs) var(--spacing-sm); - border-radius: var(--radius-sm); - font-weight: var(--font-weight-medium); - font-size: var(--font-size-xs); - display: inline-block; -} - -.route-direct { - color: var(--color-success); - background: var(--color-success-dim); - padding: var(--spacing-xs) var(--spacing-sm); - border-radius: var(--radius-sm); - font-weight: var(--font-weight-medium); - font-size: var(--font-size-xs); - display: inline-block; -} - -.score { - color: var(--color-accent-primary); - font-weight: var(--font-weight-semibold); -} - -.status-tx { - color: var(--color-success); - font-weight: var(--font-weight-medium); -} - -.status-wait { - color: var(--color-warning); - font-weight: var(--font-weight-medium); -} - -.status-drop { - color: var(--color-error); - font-weight: var(--font-weight-medium); -} - -/* Path and hash styling */ -.path-hash, -.src-dst-hash { - font-family: 'Courier New', monospace; - font-size: 0.85rem; - letter-spacing: 0.3px; - word-break: break-all; - line-height: 1.5; - display: block; - margin: var(--spacing-sm) 0; -} - -.path-hash { - color: #e0e0e0; - background: #2a2a2a; - padding: var(--spacing-sm) var(--spacing-md); - border-radius: 4px; - overflow-wrap: break-word; - border: 1px solid #404040; -} - -.src-dst-hash { - color: #ffffff; - background: #1e3a8a; - padding: var(--spacing-sm) var(--spacing-md); - border-radius: 4px; - font-weight: var(--font-weight-bold); - border: 1px solid #3b82f6; -} - -.my-hash { - background: #dc2626; - color: #ffffff; - padding: 2px 6px; - border-radius: 3px; - font-weight: var(--font-weight-bold); - display: inline-block; - font-size: 0.8rem; - border: 1px solid #ef4444; -} - -.path-transform { - color: #999999; - font-size: 0.75rem; - display: inline; -} - -.dupe-badge { - background: #991b1b; - color: #fca5a5; - padding: 3px 8px; - border-radius: 3px; - font-size: 0.7rem; - font-weight: var(--font-weight-bold); - display: inline-block; - margin-left: var(--spacing-sm); - border: 1px solid #dc2626; -} - -.drop-reason { - color: #fca5a5; - font-size: 0.75rem; - display: block; - margin-top: 3px; -} - -.na { - color: var(--color-text-tertiary); - font-style: italic; -} - -.empty-message { - text-align: center; - color: var(--color-text-tertiary); - padding: var(--spacing-2xl) var(--spacing-lg); - font-style: italic; - font-size: var(--font-size-sm); -} - - -/* ============================================================================ - CONFIGURATION SECTION - ============================================================================ */ - -.config-section { - background: var(--color-bg-secondary); - padding: var(--spacing-lg); - border-radius: var(--radius-lg); - border: 1px solid var(--color-border); - margin-bottom: var(--spacing-lg); - box-shadow: var(--shadow-sm); -} - -.config-section h3 { - margin-top: 0; - margin-bottom: var(--spacing-lg); - padding-bottom: var(--spacing-md); - border-bottom: 1px solid var(--color-border); -} - -.config-item { - display: grid; - grid-template-columns: 180px 1fr; - gap: var(--spacing-lg); - margin-bottom: var(--spacing-lg); - align-items: flex-start; -} - -.config-item:last-child { - margin-bottom: 0; -} - -.config-label { - font-size: var(--font-size-sm); - font-weight: var(--font-weight-semibold); - color: var(--color-text-primary); -} - -.config-value { - background: var(--color-bg-tertiary); - padding: var(--spacing-md); - border-radius: var(--radius-md); - border: 1px solid var(--color-border); - color: var(--color-accent-primary); - font-family: var(--font-family-mono); - font-size: var(--font-size-sm); - word-break: break-all; - line-height: 1.6; -} - -.config-help { - grid-column: 2; - font-size: var(--font-size-xs); - color: var(--color-text-secondary); - margin-top: var(--spacing-xs); - font-style: italic; - line-height: 1.4; -} - -.info-box { - background: var(--color-accent-primary-dim); - border: 1px solid rgba(0, 212, 255, 0.3); - border-left: 3px solid var(--color-accent-primary); - padding: var(--spacing-lg); - border-radius: var(--radius-lg); - margin-bottom: var(--spacing-lg); - color: var(--color-text-secondary); - font-size: var(--font-size-sm); - line-height: 1.6; -} - -.score-formula { - margin-bottom: var(--spacing-xl); -} - -.score-formula code { - background: var(--color-bg-tertiary); - border: 1px solid var(--color-border); - padding: 2px 6px; - border-radius: var(--radius-sm); - font-size: 0.9em; - color: var(--color-accent-primary); - font-family: var(--font-family-mono); -} - -.score-formula table { - width: 100%; - border-collapse: collapse; -} - -.score-formula ul { - margin-left: var(--spacing-lg); - margin-top: var(--spacing-sm); - margin-bottom: var(--spacing-md); -} - -.score-formula li { - margin-bottom: var(--spacing-sm); - color: var(--color-text-secondary); -} - - -/* ============================================================================ - LOG VIEWER - ============================================================================ */ - -.log-container { - background: var(--color-bg-tertiary); - border: 1px solid var(--color-border); - border-radius: var(--radius-lg); - padding: var(--spacing-lg); - font-family: var(--font-family-mono); - font-size: var(--font-size-sm); - max-height: 500px; - overflow-y: auto; - box-shadow: var(--shadow-sm); - line-height: 1.7; -} - -.log-container::-webkit-scrollbar { - width: 6px; -} - -.log-container::-webkit-scrollbar-track { - background: var(--color-bg-tertiary); -} - -.log-container::-webkit-scrollbar-thumb { - background: var(--color-border); - border-radius: var(--radius-sm); -} - -.log-line { - display: flex; - gap: var(--spacing-md); - margin-bottom: var(--spacing-sm); - padding: var(--spacing-sm) 0; - border-bottom: 1px solid var(--color-border-light); -} - -.log-line:last-child { - border-bottom: none; - margin-bottom: 0; -} - -.log-time { - color: var(--color-text-tertiary); - min-width: 100px; - flex-shrink: 0; -} - -.log-level { - display: inline-block; - min-width: 70px; - padding: var(--spacing-xs) var(--spacing-sm); - border-radius: var(--radius-sm); - font-weight: var(--font-weight-semibold); - font-size: var(--font-size-xs); - text-transform: uppercase; - text-align: center; - flex-shrink: 0; -} - -.log-level.info { - background: var(--color-info-dim); - color: var(--color-info); -} - -.log-level.warning { - background: var(--color-warning-dim); - color: var(--color-warning); -} - -.log-level.error { - background: var(--color-error-dim); - color: var(--color-error); -} - -.log-level.debug { - background: var(--color-accent-primary-dim); - color: var(--color-accent-primary); -} - -.log-msg { - color: var(--color-text-secondary); - word-break: break-word; - flex: 1; -} - - -/* ============================================================================ - UTILITY CLASSES - ============================================================================ */ - -.refresh-info { - text-align: right; - margin-top: var(--spacing-lg); - font-size: var(--font-size-xs); - color: var(--color-text-tertiary); -} - -/* ============================================================================ - RESPONSIVE DESIGN - ============================================================================ */ - -/* Tablet: 768px and below */ -@media (max-width: 768px) { - :root { - --size-sidebar: 100%; - } - - .layout { - flex-direction: column; - padding-top: 60px; - } - - .sidebar { - width: 100%; - height: 60px; - flex-direction: row; - border-right: none; - border-bottom: 1px solid var(--color-border); - overflow: hidden; - position: fixed; - top: 0; - left: 0; - right: 0; - z-index: 1000; - transition: none; - } - - .sidebar.menu-open { - height: 100vh; - height: 100dvh; /* Use dynamic viewport height for better mobile support */ - max-height: none; - overflow: hidden; /* Changed from auto - we'll scroll the content instead */ - position: fixed; - flex-direction: column; - display: flex; - top: 0; - left: 0; - right: 0; - bottom: 0; - } - - .layout { - padding-top: 60px; - } - - .content { - margin-top: 0; - } - - .sidebar-header { - border-right: none; - border-bottom: 1px solid var(--color-border); - padding: 0 var(--spacing-md); - display: flex; - align-items: center; - min-width: auto; - width: 100%; - height: 60px; - background: var(--color-bg-secondary); - position: relative; - flex-shrink: 0; /* Prevent header from shrinking */ - } - - .sidebar.menu-open .sidebar-header { - border-right: none; - border-bottom: 1px solid var(--color-border); - background: var(--color-bg-secondary); - position: sticky; /* Make header sticky at top */ - top: 0; - z-index: 10; - } - - /* Wrapper for scrollable content on mobile */ - .sidebar-content-wrapper { - display: contents; /* On mobile closed state, act transparent like desktop */ - } - - .sidebar.menu-open .sidebar-content-wrapper { - display: flex; - flex-direction: column; - flex: 1; - overflow-y: auto; - overflow-x: hidden; - -webkit-overflow-scrolling: touch; - min-height: 0; - position: relative; - } - - .sidebar-header h1 { - font-size: var(--font-size-lg); - margin-bottom: 0; - color: var(--color-accent-primary); - padding-right: var(--spacing-2xl); - } - - .sidebar-header .node-name { - display: none; - } - - .sidebar-header .node-pubkey { - display: none; - } - - /* Show menu toggle on mobile */ - .menu-toggle { - display: flex !important; - align-items: center; - justify-content: center; - width: 44px; - height: 44px; - background: none; - border: none; - color: var(--color-text-secondary); - cursor: pointer; - padding: 0; - margin: 0; - flex-shrink: 0; - position: absolute; - right: 8px; - top: 50%; - transform: translateY(-50%); - } - - .menu-toggle svg { - width: 24px; - height: 24px; - } - - .sidebar-nav { - display: none; - padding: 0; - gap: 0; - width: 100%; - margin: 0; - flex-direction: column; - } - - .sidebar.menu-open .sidebar-nav { - display: flex; - flex-direction: column; - flex-shrink: 0; /* Don't let nav shrink, let wrapper handle scroll */ - } - - .nav-section { - border-bottom: 1px solid var(--color-border-light); - padding: var(--spacing-md) var(--spacing-lg) 0; - } - - .nav-section:first-child { - padding-top: var(--spacing-lg); - } - - .nav-section:last-child { - padding-bottom: var(--spacing-lg); - } - - .nav-section-title { - font-size: 0.7rem; - } - - .nav-item { - border-radius: 8px; - margin-bottom: var(--spacing-sm); - font-size: 0.95rem; - padding: 1rem var(--spacing-lg); - } - - /* Hide footer on mobile by default */ - .sidebar-footer { - display: none; - } - - /* Show footer only when menu is open */ - .sidebar.menu-open .sidebar-footer { - display: flex !important; /* Force display as flex when menu is open */ - flex-direction: column; - gap: var(--spacing-md); - margin-top: 0 !important; /* Remove auto margin on mobile */ - flex-shrink: 0; /* Don't shrink the footer */ - padding: var(--spacing-md) var(--spacing-lg); - border-top: 1px solid var(--color-border); - background: var(--color-bg-secondary); - } - - .content { - padding: var(--spacing-lg); - overflow-y: auto; - width: 100%; - } - - h1 { - font-size: var(--font-size-2xl); - } - - h2 { - font-size: var(--font-size-xl); - margin: var(--spacing-xl) 0 var(--spacing-lg) 0; - } - - .stats-grid { - grid-template-columns: 1fr; - gap: var(--spacing-md); - margin-bottom: var(--spacing-xl); - } - - /* Improve stat card readability on tablets */ - .stat-card { - display: flex; - align-items: center; - justify-content: space-between; - gap: var(--spacing-md); - padding: var(--spacing-md) var(--spacing-lg); - } - - .stat-label { - font-size: var(--font-size-sm); - margin-bottom: 0; - flex: 1; - text-align: left; - } - - .stat-value { - font-size: var(--font-size-2xl); - margin-bottom: 0; - flex-shrink: 0; - } - - .charts-grid { - grid-template-columns: 1fr; - gap: var(--spacing-md); - margin-bottom: var(--spacing-xl); - } - - .config-item { - grid-template-columns: 1fr; - gap: var(--spacing-sm); - align-items: stretch; - } - - /* Mobile table: card-based layout - structured design */ - .table-container { - overflow-x: visible; - } - - table { - display: block; - width: 100%; - } - - thead { - display: none; - } - - tbody { - display: block; - width: 100%; - } - - - tbody tr { - display: block; - background: var(--color-bg-secondary); - border: 1px solid var(--color-border); - border-radius: var(--radius-lg); - margin-bottom: var(--spacing-lg); - padding: 0; - overflow: hidden; - } - - tbody tr:hover { - background: var(--color-bg-tertiary); - border-color: var(--color-accent-primary); - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); - } - - /* Card header with time and type */ - td:nth-child(1), /* Time */ - td:nth-child(2) /* Type */ { - display: inline-block; - padding: var(--spacing-md); - margin: 0; - border: none; - background: transparent; - } - - td:nth-child(1) { - font-size: var(--font-size-lg); - font-weight: var(--font-weight-semibold); - color: var(--color-text-primary); - width: auto; - margin-right: var(--spacing-md); - } - - td:nth-child(1)::before { - content: attr(data-label); - font-size: 0.65rem; - color: var(--color-text-tertiary); - text-transform: uppercase; - letter-spacing: 0.5px; - display: block; - margin-bottom: 4px; - font-weight: var(--font-weight-semibold); - } - - td:nth-child(2) { - float: right; - padding: var(--spacing-md); - } - - td:nth-child(2)::before { - content: attr(data-label); - font-size: 0.65rem; - color: var(--color-text-tertiary); - text-transform: uppercase; - letter-spacing: 0.5px; - display: block; - margin-bottom: 4px; - text-align: right; - font-weight: var(--font-weight-semibold); - } - - /* Path/Hashes section - full width with label */ - td:nth-child(5) { - display: block; - width: 100%; - padding: var(--spacing-md); - margin: 0; - border-top: 1px solid var(--color-border); - background: rgba(0, 0, 0, 0.2); - clear: both; - } - - td:nth-child(5)::before { - content: attr(data-label); - font-size: 0.65rem; - color: var(--color-text-tertiary); - text-transform: uppercase; - letter-spacing: 0.5px; - display: block; - margin-bottom: 8px; - font-weight: var(--font-weight-semibold); - } - - /* Route badge on right side */ - td:nth-child(3) { - position: absolute; - top: var(--spacing-md); - right: var(--spacing-md); - margin: 0; - padding: 0; - } - - td:nth-child(3)::before { - display: none; - } - - /* Metrics row - RSSI, SNR, SCORE, TX DELAY */ - td:nth-child(6), /* RSSI */ - td:nth-child(7), /* SNR */ - td:nth-child(8), /* SCORE */ - td:nth-child(9) /* TX DELAY */ { - display: inline-block; - width: calc(50% - 8px); - padding: var(--spacing-sm) var(--spacing-md); - margin: 0; - margin-right: 8px; - border: none; - text-align: left; - } - - td:nth-child(6)::before, - td:nth-child(7)::before, - td:nth-child(8)::before, - td:nth-child(9)::before { - content: attr(data-label); - font-size: 0.6rem; - color: var(--color-text-tertiary); - text-transform: uppercase; - letter-spacing: 0.5px; - display: block; - margin-bottom: 2px; - font-weight: var(--font-weight-semibold); - } - - td:nth-child(6), - td:nth-child(8) { - margin-right: 8px; - } - - td:nth-child(7), - td:nth-child(9) { - margin-right: 0; - } - - /* Status section - full width */ - td:nth-child(10) { - display: block; - width: 100%; - padding: var(--spacing-md); - margin: 0; - border-top: 1px solid var(--color-border); - } - - td:nth-child(10)::before { - content: attr(data-label); - font-size: 0.65rem; - color: var(--color-text-tertiary); - text-transform: uppercase; - letter-spacing: 0.5px; - display: block; - margin-bottom: 6px; - font-weight: var(--font-weight-semibold); - } - - /* Hide LEN - not critical for mobile */ - td:nth-child(4) { - display: none; - } - - /* Better card positioning with relative parent */ - tbody tr { - position: relative; - } - - /* Path hash styling on mobile */ - .path-hash, - .src-dst-hash { - font-size: 0.85rem; - padding: 4px 8px; - line-height: 1.4; - display: inline-block; - margin: 2px; - } - - .path-hash { - font-family: 'Courier New', monospace; - letter-spacing: 0.2px; - } - - .my-hash { - padding: 4px 8px; - font-size: 0.85rem; - display: inline-block; - } - - .path-arrow { - font-size: 1em; - padding: 0 4px; - } - - .stat-value { - font-size: var(--font-size-2xl); - } - - header { - margin-bottom: var(--spacing-xl); - } -} - -/* Tablet: 480px - 768px range */ -@media (max-width: 600px) { - /* Compact stat cards for tablet - horizontal layout */ - .stat-card { - padding: var(--spacing-md) var(--spacing-lg); - display: flex; - align-items: center; - justify-content: space-between; - gap: var(--spacing-md); - } - - .stat-label { - font-size: var(--font-size-sm); - margin-bottom: 0; - flex: 1; - text-align: left; - } - - .stat-value { - font-size: var(--font-size-2xl); - margin-bottom: 0; - flex-shrink: 0; - } - - .stat-unit { - font-size: var(--font-size-sm); - } - - /* Show all details compactly - inline with labels */ - tbody tr { - padding: var(--spacing-md); - } - - td { - display: inline-flex; - align-items: center; - gap: var(--spacing-xs); - margin-bottom: var(--spacing-xs); - margin-right: var(--spacing-md); - font-size: 0.7rem; - } - - td::before { - font-size: 0.55rem; - padding: 1px 4px; - } - - /* Path/Hashes wraps to next line */ - td:nth-child(5) { - display: block; - width: 100%; - margin-right: 0; - margin-bottom: var(--spacing-sm); - } - - /* Optimize path hash display for tablet */ - .path-hash, - .src-dst-hash { - font-size: 0.78rem; - word-break: break-all; - padding: var(--spacing-sm) var(--spacing-md); - } - - .my-hash { - padding: 2px 5px; - font-size: 0.72rem; - } - - /* Status on its own line */ - td:nth-child(10) { - display: block; - width: 100%; - margin-right: 0; - padding-top: var(--spacing-xs); - border-top: 1px solid var(--color-border-light); - } -} - -/* Mobile: 480px and below */ -@media (max-width: 480px) { - .content { - padding: var(--spacing-md); - } - - h1 { - font-size: var(--font-size-xl); - } - - /* Compact stat cards for mobile - horizontal layout */ - .stat-card { - padding: var(--spacing-md); - display: flex; - align-items: center; - justify-content: space-between; - gap: var(--spacing-md); - } - - .stat-label { - font-size: var(--font-size-sm); - margin-bottom: 0; - flex: 1; - text-align: left; - } - - .stat-value { - font-size: var(--font-size-xl); - margin-bottom: 0; - flex-shrink: 0; - } - - .stat-unit { - font-size: var(--font-size-xs); - } - - .chart-card { - padding: var(--spacing-md); - } - - .chart-container { - height: 200px; - } - - .log-container { - max-height: 300px; - font-size: var(--font-size-xs); - } - - .log-line { - flex-direction: column; - gap: var(--spacing-sm); - } - - .log-time { - min-width: auto; - } - - .log-level { - min-width: auto; - width: fit-content; - } - - /* Very compact table with all details */ - tbody tr { - padding: var(--spacing-sm); - } - - td { - display: inline-flex; - align-items: center; - gap: var(--spacing-xs); - margin-bottom: var(--spacing-xs); - margin-right: var(--spacing-sm); - font-size: 0.65rem; - } - - td::before { - font-size: 0.5rem; - padding: 1px 3px; - } - - /* Full width items */ - td:nth-child(5), - td:nth-child(10) { - display: block; - width: 100%; - margin-right: 0; - margin-bottom: var(--spacing-xs); - } - - td:nth-child(10) { - padding-top: var(--spacing-xs); - border-top: 1px solid var(--color-border-light); - } - - td::before { - margin-bottom: 2px; - } - - /* Ultra-compact path hash for tiny screens */ - .path-hash, - .src-dst-hash { - font-size: 0.75rem; - padding: var(--spacing-sm) var(--spacing-md); - line-height: 1.4; - word-break: break-all; - white-space: normal; - } - - .path-hash { - font-family: 'Courier New', monospace; - letter-spacing: 0.1px; - } - - .my-hash { - padding: 2px 4px; - font-size: 0.7rem; - display: inline-block; - } - - .src-dst-hash { - font-size: 0.75rem; - } - - .path-transform { - font-size: 0.65rem; - display: block; - } - - .dupe-badge { - font-size: 0.65rem; - padding: 2px 6px; - } - - .drop-reason { - font-size: 0.7rem; - } - - /* Mobile filter buttons */ - #filterContainer { - flex-direction: column !important; - } - - .filter-btn { - width: 100%; - justify-content: center; - } - - #selectAllBtn, - #clearAllBtn { - width: 100%; - } -} - -/* ============================================================================ - ANIMATION & TRANSITIONS - ============================================================================ */ - -@media (prefers-reduced-motion: reduce) { - *, - *::before, - *::after { - animation-duration: 0.01ms !important; - animation-iteration-count: 1 !important; - transition-duration: 0.01ms !important; - scroll-behavior: auto !important; - } -} - -/* Smooth transitions for interactive elements */ -button, -a, -input, -select, -textarea { - transition: all var(--transition-fast); -} - -/* ============================================================================ - ACCESSIBILITY - ============================================================================ */ - -/* Focus states for keyboard navigation */ -a:focus-visible, -button:focus-visible, -input:focus-visible, -select:focus-visible, -textarea:focus-visible { - outline: 2px solid var(--color-accent-primary); - outline-offset: 2px; -} - -/* High contrast mode support */ -@media (prefers-contrast: more) { - --color-border: #4a5568; - --color-text-secondary: #cbd5e0; - --color-accent-primary: #00e5ff; -} - -/* Dark mode preference (already applied by default) */ -@media (prefers-color-scheme: dark) { - /* Already dark - no changes needed */ -} diff --git a/repeater/web/html/assets/index-BJnLrjMq.js b/repeater/web/html/assets/index-BJnLrjMq.js new file mode 100644 index 0000000..fdcb01f --- /dev/null +++ b/repeater/web/html/assets/index-BJnLrjMq.js @@ -0,0 +1,3950 @@ +(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const J of document.querySelectorAll('link[rel="modulepreload"]'))j(J);new MutationObserver(J=>{for(const mt of J)if(mt.type==="childList")for(const kt of mt.addedNodes)kt.tagName==="LINK"&&kt.rel==="modulepreload"&&j(kt)}).observe(document,{childList:!0,subtree:!0});function z(J){const mt={};return J.integrity&&(mt.integrity=J.integrity),J.referrerPolicy&&(mt.referrerPolicy=J.referrerPolicy),J.crossOrigin==="use-credentials"?mt.credentials="include":J.crossOrigin==="anonymous"?mt.credentials="omit":mt.credentials="same-origin",mt}function j(J){if(J.ep)return;J.ep=!0;const mt=z(J);fetch(J.href,mt)}})();/** +* @vue/shared v3.5.18 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function SA(d){const l=Object.create(null);for(const z of d.split(","))l[z]=1;return z=>z in l}const mf={},n_=[],ug=()=>{},j$=()=>!1,_4=d=>d.charCodeAt(0)===111&&d.charCodeAt(1)===110&&(d.charCodeAt(2)>122||d.charCodeAt(2)<97),EA=d=>d.startsWith("onUpdate:"),op=Object.assign,CA=(d,l)=>{const z=d.indexOf(l);z>-1&&d.splice(z,1)},U$=Object.prototype.hasOwnProperty,Fh=(d,l)=>U$.call(d,l),ru=Array.isArray,i_=d=>$2(d)==="[object Map]",b4=d=>$2(d)==="[object Set]",_C=d=>$2(d)==="[object Date]",Uu=d=>typeof d=="function",sd=d=>typeof d=="string",Sm=d=>typeof d=="symbol",gf=d=>d!==null&&typeof d=="object",fz=d=>(gf(d)||Uu(d))&&Uu(d.then)&&Uu(d.catch),dz=Object.prototype.toString,$2=d=>dz.call(d),V$=d=>$2(d).slice(8,-1),pz=d=>$2(d)==="[object Object]",LA=d=>sd(d)&&d!=="NaN"&&d[0]!=="-"&&""+parseInt(d,10)===d,m2=SA(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),w4=d=>{const l=Object.create(null);return z=>l[z]||(l[z]=d(z))},H$=/-(\w)/g,cm=w4(d=>d.replace(H$,(l,z)=>z?z.toUpperCase():"")),W$=/\B([A-Z])/g,Ey=w4(d=>d.replace(W$,"-$1").toLowerCase()),k4=w4(d=>d.charAt(0).toUpperCase()+d.slice(1)),h8=w4(d=>d?`on${k4(d)}`:""),f1=(d,l)=>!Object.is(d,l),U5=(d,...l)=>{for(let z=0;z{Object.defineProperty(d,l,{configurable:!0,enumerable:!1,writable:j,value:z})},Q5=d=>{const l=parseFloat(d);return isNaN(l)?d:l},q$=d=>{const l=sd(d)?Number(d):NaN;return isNaN(l)?d:l};let bC;const T4=()=>bC||(bC=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function av(d){if(ru(d)){const l={};for(let z=0;z{if(z){const j=z.split($$);j.length>1&&(l[j[0].trim()]=j[1].trim())}}),l}function Xs(d){let l="";if(sd(d))l=d;else if(ru(d))for(let z=0;zu_(z,l))}const gz=d=>!!(d&&d.__v_isRef===!0),aa=d=>sd(d)?d:d==null?"":ru(d)||gf(d)&&(d.toString===dz||!Uu(d.toString))?gz(d)?aa(d.value):JSON.stringify(d,vz,2):String(d),vz=(d,l)=>gz(l)?vz(d,l.value):i_(l)?{[`Map(${l.size})`]:[...l.entries()].reduce((z,[j,J],mt)=>(z[f8(j,mt)+" =>"]=J,z),{})}:b4(l)?{[`Set(${l.size})`]:[...l.values()].map(z=>f8(z))}:Sm(l)?f8(l):gf(l)&&!ru(l)&&!pz(l)?String(l):l,f8=(d,l="")=>{var z;return Sm(d)?`Symbol(${(z=d.description)!=null?z:l})`:d};/** +* @vue/reactivity v3.5.18 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let qp;class yz{constructor(l=!1){this.detached=l,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=qp,!l&&qp&&(this.index=(qp.scopes||(qp.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let l,z;if(this.scopes)for(l=0,z=this.scopes.length;l0&&--this._on===0&&(qp=this.prevScope,this.prevScope=void 0)}stop(l){if(this._active){this._active=!1;let z,j;for(z=0,j=this.effects.length;z0)return;if(v2){let l=v2;for(v2=void 0;l;){const z=l.next;l.next=void 0,l.flags&=-9,l=z}}let d;for(;g2;){let l=g2;for(g2=void 0;l;){const z=l.next;if(l.next=void 0,l.flags&=-9,l.flags&1)try{l.trigger()}catch(j){d||(d=j)}l=z}}if(d)throw d}function Tz(d){for(let l=d.deps;l;l=l.nextDep)l.version=-1,l.prevActiveLink=l.dep.activeLink,l.dep.activeLink=l}function Az(d){let l,z=d.depsTail,j=z;for(;j;){const J=j.prevDep;j.version===-1?(j===z&&(z=J),IA(j),eG(j)):l=j,j.dep.activeLink=j.prevActiveLink,j.prevActiveLink=void 0,j=J}d.deps=l,d.depsTail=z}function $8(d){for(let l=d.deps;l;l=l.nextDep)if(l.dep.version!==l.version||l.dep.computed&&(Mz(l.dep.computed)||l.dep.version!==l.version))return!0;return!!d._dirty}function Mz(d){if(d.flags&4&&!(d.flags&16)||(d.flags&=-17,d.globalVersion===C2)||(d.globalVersion=C2,!d.isSSR&&d.flags&128&&(!d.deps&&!d._dirty||!$8(d))))return;d.flags|=2;const l=d.dep,z=kf,j=Mm;kf=d,Mm=!0;try{Tz(d);const J=d.fn(d._value);(l.version===0||f1(J,d._value))&&(d.flags|=128,d._value=J,l.version++)}catch(J){throw l.version++,J}finally{kf=z,Mm=j,Az(d),d.flags&=-3}}function IA(d,l=!1){const{dep:z,prevSub:j,nextSub:J}=d;if(j&&(j.nextSub=J,d.prevSub=void 0),J&&(J.prevSub=j,d.nextSub=void 0),z.subs===d&&(z.subs=j,!j&&z.computed)){z.computed.flags&=-5;for(let mt=z.computed.deps;mt;mt=mt.nextDep)IA(mt,!0)}!l&&!--z.sc&&z.map&&z.map.delete(z.key)}function eG(d){const{prevDep:l,nextDep:z}=d;l&&(l.nextDep=z,d.prevDep=void 0),z&&(z.prevDep=l,d.nextDep=void 0)}let Mm=!0;const Sz=[];function nv(){Sz.push(Mm),Mm=!1}function iv(){const d=Sz.pop();Mm=d===void 0?!0:d}function wC(d){const{cleanup:l}=d;if(d.cleanup=void 0,l){const z=kf;kf=void 0;try{l()}finally{kf=z}}}let C2=0;class rG{constructor(l,z){this.sub=l,this.dep=z,this.version=z.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class OA{constructor(l){this.computed=l,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(l){if(!kf||!Mm||kf===this.computed)return;let z=this.activeLink;if(z===void 0||z.sub!==kf)z=this.activeLink=new rG(kf,this),kf.deps?(z.prevDep=kf.depsTail,kf.depsTail.nextDep=z,kf.depsTail=z):kf.deps=kf.depsTail=z,Ez(z);else if(z.version===-1&&(z.version=this.version,z.nextDep)){const j=z.nextDep;j.prevDep=z.prevDep,z.prevDep&&(z.prevDep.nextDep=j),z.prevDep=kf.depsTail,z.nextDep=void 0,kf.depsTail.nextDep=z,kf.depsTail=z,kf.deps===z&&(kf.deps=j)}return z}trigger(l){this.version++,C2++,this.notify(l)}notify(l){PA();try{for(let z=this.subs;z;z=z.prevSub)z.sub.notify()&&z.sub.dep.notify()}finally{zA()}}}function Ez(d){if(d.dep.sc++,d.sub.flags&4){const l=d.dep.computed;if(l&&!d.dep.subs){l.flags|=20;for(let j=l.deps;j;j=j.nextDep)Ez(j)}const z=d.dep.subs;z!==d&&(d.prevSub=z,z&&(z.nextSub=d)),d.dep.subs=d}}const t4=new WeakMap,xy=Symbol(""),G8=Symbol(""),L2=Symbol("");function Zp(d,l,z){if(Mm&&kf){let j=t4.get(d);j||t4.set(d,j=new Map);let J=j.get(z);J||(j.set(z,J=new OA),J.map=j,J.key=z),J.track()}}function Jg(d,l,z,j,J,mt){const kt=t4.get(d);if(!kt){C2++;return}const Dt=Gt=>{Gt&&Gt.trigger()};if(PA(),l==="clear")kt.forEach(Dt);else{const Gt=ru(d),re=Gt&&LA(z);if(Gt&&z==="length"){const pe=Number(j);kt.forEach((Ne,or)=>{(or==="length"||or===L2||!Sm(or)&&or>=pe)&&Dt(Ne)})}else switch((z!==void 0||kt.has(void 0))&&Dt(kt.get(z)),re&&Dt(kt.get(L2)),l){case"add":Gt?re&&Dt(kt.get("length")):(Dt(kt.get(xy)),i_(d)&&Dt(kt.get(G8)));break;case"delete":Gt||(Dt(kt.get(xy)),i_(d)&&Dt(kt.get(G8)));break;case"set":i_(d)&&Dt(kt.get(xy));break}}zA()}function nG(d,l){const z=t4.get(d);return z&&z.get(l)}function Yx(d){const l=ju(d);return l===d?l:(Zp(l,"iterate",L2),sm(d)?l:l.map(zp))}function A4(d){return Zp(d=ju(d),"iterate",L2),d}const iG={__proto__:null,[Symbol.iterator](){return p8(this,Symbol.iterator,zp)},concat(...d){return Yx(this).concat(...d.map(l=>ru(l)?Yx(l):l))},entries(){return p8(this,"entries",d=>(d[1]=zp(d[1]),d))},every(d,l){return Wg(this,"every",d,l,void 0,arguments)},filter(d,l){return Wg(this,"filter",d,l,z=>z.map(zp),arguments)},find(d,l){return Wg(this,"find",d,l,zp,arguments)},findIndex(d,l){return Wg(this,"findIndex",d,l,void 0,arguments)},findLast(d,l){return Wg(this,"findLast",d,l,zp,arguments)},findLastIndex(d,l){return Wg(this,"findLastIndex",d,l,void 0,arguments)},forEach(d,l){return Wg(this,"forEach",d,l,void 0,arguments)},includes(...d){return m8(this,"includes",d)},indexOf(...d){return m8(this,"indexOf",d)},join(d){return Yx(this).join(d)},lastIndexOf(...d){return m8(this,"lastIndexOf",d)},map(d,l){return Wg(this,"map",d,l,void 0,arguments)},pop(){return Gb(this,"pop")},push(...d){return Gb(this,"push",d)},reduce(d,...l){return kC(this,"reduce",d,l)},reduceRight(d,...l){return kC(this,"reduceRight",d,l)},shift(){return Gb(this,"shift")},some(d,l){return Wg(this,"some",d,l,void 0,arguments)},splice(...d){return Gb(this,"splice",d)},toReversed(){return Yx(this).toReversed()},toSorted(d){return Yx(this).toSorted(d)},toSpliced(...d){return Yx(this).toSpliced(...d)},unshift(...d){return Gb(this,"unshift",d)},values(){return p8(this,"values",zp)}};function p8(d,l,z){const j=A4(d),J=j[l]();return j!==d&&!sm(d)&&(J._next=J.next,J.next=()=>{const mt=J._next();return mt.value&&(mt.value=z(mt.value)),mt}),J}const aG=Array.prototype;function Wg(d,l,z,j,J,mt){const kt=A4(d),Dt=kt!==d&&!sm(d),Gt=kt[l];if(Gt!==aG[l]){const Ne=Gt.apply(d,mt);return Dt?zp(Ne):Ne}let re=z;kt!==d&&(Dt?re=function(Ne,or){return z.call(this,zp(Ne),or,d)}:z.length>2&&(re=function(Ne,or){return z.call(this,Ne,or,d)}));const pe=Gt.call(kt,re,j);return Dt&&J?J(pe):pe}function kC(d,l,z,j){const J=A4(d);let mt=z;return J!==d&&(sm(d)?z.length>3&&(mt=function(kt,Dt,Gt){return z.call(this,kt,Dt,Gt,d)}):mt=function(kt,Dt,Gt){return z.call(this,kt,zp(Dt),Gt,d)}),J[l](mt,...j)}function m8(d,l,z){const j=ju(d);Zp(j,"iterate",L2);const J=j[l](...z);return(J===-1||J===!1)&&RA(z[0])?(z[0]=ju(z[0]),j[l](...z)):J}function Gb(d,l,z=[]){nv(),PA();const j=ju(d)[l].apply(d,z);return zA(),iv(),j}const oG=SA("__proto__,__v_isRef,__isVue"),Cz=new Set(Object.getOwnPropertyNames(Symbol).filter(d=>d!=="arguments"&&d!=="caller").map(d=>Symbol[d]).filter(Sm));function sG(d){Sm(d)||(d=String(d));const l=ju(this);return Zp(l,"has",d),l.hasOwnProperty(d)}class Lz{constructor(l=!1,z=!1){this._isReadonly=l,this._isShallow=z}get(l,z,j){if(z==="__v_skip")return l.__v_skip;const J=this._isReadonly,mt=this._isShallow;if(z==="__v_isReactive")return!J;if(z==="__v_isReadonly")return J;if(z==="__v_isShallow")return mt;if(z==="__v_raw")return j===(J?mt?vG:Oz:mt?Iz:zz).get(l)||Object.getPrototypeOf(l)===Object.getPrototypeOf(j)?l:void 0;const kt=ru(l);if(!J){let Gt;if(kt&&(Gt=iG[z]))return Gt;if(z==="hasOwnProperty")return sG}const Dt=Reflect.get(l,z,Ud(l)?l:j);return(Sm(z)?Cz.has(z):oG(z))||(J||Zp(l,"get",z),mt)?Dt:Ud(Dt)?kt&&LA(z)?Dt:Dt.value:gf(Dt)?J?Fz(Dt):ky(Dt):Dt}}class Pz extends Lz{constructor(l=!1){super(!1,l)}set(l,z,j,J){let mt=l[z];if(!this._isShallow){const Gt=m1(mt);if(!sm(j)&&!m1(j)&&(mt=ju(mt),j=ju(j)),!ru(l)&&Ud(mt)&&!Ud(j))return Gt?!1:(mt.value=j,!0)}const kt=ru(l)&&LA(z)?Number(z)d,b5=d=>Reflect.getPrototypeOf(d);function fG(d,l,z){return function(...j){const J=this.__v_raw,mt=ju(J),kt=i_(mt),Dt=d==="entries"||d===Symbol.iterator&&kt,Gt=d==="keys"&&kt,re=J[d](...j),pe=z?Y8:l?e4:zp;return!l&&Zp(mt,"iterate",Gt?G8:xy),{next(){const{value:Ne,done:or}=re.next();return or?{value:Ne,done:or}:{value:Dt?[pe(Ne[0]),pe(Ne[1])]:pe(Ne),done:or}},[Symbol.iterator](){return this}}}}function w5(d){return function(...l){return d==="delete"?!1:d==="clear"?void 0:this}}function dG(d,l){const z={get(J){const mt=this.__v_raw,kt=ju(mt),Dt=ju(J);d||(f1(J,Dt)&&Zp(kt,"get",J),Zp(kt,"get",Dt));const{has:Gt}=b5(kt),re=l?Y8:d?e4:zp;if(Gt.call(kt,J))return re(mt.get(J));if(Gt.call(kt,Dt))return re(mt.get(Dt));mt!==kt&&mt.get(J)},get size(){const J=this.__v_raw;return!d&&Zp(ju(J),"iterate",xy),Reflect.get(J,"size",J)},has(J){const mt=this.__v_raw,kt=ju(mt),Dt=ju(J);return d||(f1(J,Dt)&&Zp(kt,"has",J),Zp(kt,"has",Dt)),J===Dt?mt.has(J):mt.has(J)||mt.has(Dt)},forEach(J,mt){const kt=this,Dt=kt.__v_raw,Gt=ju(Dt),re=l?Y8:d?e4:zp;return!d&&Zp(Gt,"iterate",xy),Dt.forEach((pe,Ne)=>J.call(mt,re(pe),re(Ne),kt))}};return op(z,d?{add:w5("add"),set:w5("set"),delete:w5("delete"),clear:w5("clear")}:{add(J){!l&&!sm(J)&&!m1(J)&&(J=ju(J));const mt=ju(this);return b5(mt).has.call(mt,J)||(mt.add(J),Jg(mt,"add",J,J)),this},set(J,mt){!l&&!sm(mt)&&!m1(mt)&&(mt=ju(mt));const kt=ju(this),{has:Dt,get:Gt}=b5(kt);let re=Dt.call(kt,J);re||(J=ju(J),re=Dt.call(kt,J));const pe=Gt.call(kt,J);return kt.set(J,mt),re?f1(mt,pe)&&Jg(kt,"set",J,mt):Jg(kt,"add",J,mt),this},delete(J){const mt=ju(this),{has:kt,get:Dt}=b5(mt);let Gt=kt.call(mt,J);Gt||(J=ju(J),Gt=kt.call(mt,J)),Dt&&Dt.call(mt,J);const re=mt.delete(J);return Gt&&Jg(mt,"delete",J,void 0),re},clear(){const J=ju(this),mt=J.size!==0,kt=J.clear();return mt&&Jg(J,"clear",void 0,void 0),kt}}),["keys","values","entries",Symbol.iterator].forEach(J=>{z[J]=fG(J,d,l)}),z}function DA(d,l){const z=dG(d,l);return(j,J,mt)=>J==="__v_isReactive"?!d:J==="__v_isReadonly"?d:J==="__v_raw"?j:Reflect.get(Fh(z,J)&&J in j?z:j,J,mt)}const pG={get:DA(!1,!1)},mG={get:DA(!1,!0)},gG={get:DA(!0,!1)};const zz=new WeakMap,Iz=new WeakMap,Oz=new WeakMap,vG=new WeakMap;function yG(d){switch(d){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function xG(d){return d.__v_skip||!Object.isExtensible(d)?0:yG(V$(d))}function ky(d){return m1(d)?d:FA(d,!1,uG,pG,zz)}function Dz(d){return FA(d,!1,hG,mG,Iz)}function Fz(d){return FA(d,!0,cG,gG,Oz)}function FA(d,l,z,j,J){if(!gf(d)||d.__v_raw&&!(l&&d.__v_isReactive))return d;const mt=xG(d);if(mt===0)return d;const kt=J.get(d);if(kt)return kt;const Dt=new Proxy(d,mt===2?j:z);return J.set(d,Dt),Dt}function d1(d){return m1(d)?d1(d.__v_raw):!!(d&&d.__v_isReactive)}function m1(d){return!!(d&&d.__v_isReadonly)}function sm(d){return!!(d&&d.__v_isShallow)}function RA(d){return d?!!d.__v_raw:!1}function ju(d){const l=d&&d.__v_raw;return l?ju(l):d}function BA(d){return!Fh(d,"__v_skip")&&Object.isExtensible(d)&&Z8(d,"__v_skip",!0),d}const zp=d=>gf(d)?ky(d):d,e4=d=>gf(d)?Fz(d):d;function Ud(d){return d?d.__v_isRef===!0:!1}function lo(d){return Rz(d,!1)}function _G(d){return Rz(d,!0)}function Rz(d,l){return Ud(d)?d:new bG(d,l)}class bG{constructor(l,z){this.dep=new OA,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=z?l:ju(l),this._value=z?l:zp(l),this.__v_isShallow=z}get value(){return this.dep.track(),this._value}set value(l){const z=this._rawValue,j=this.__v_isShallow||sm(l)||m1(l);l=j?l:ju(l),f1(l,z)&&(this._rawValue=l,this._value=j?l:zp(l),this.dep.trigger())}}function Ju(d){return Ud(d)?d.value:d}const wG={get:(d,l,z)=>l==="__v_raw"?d:Ju(Reflect.get(d,l,z)),set:(d,l,z,j)=>{const J=d[l];return Ud(J)&&!Ud(z)?(J.value=z,!0):Reflect.set(d,l,z,j)}};function Bz(d){return d1(d)?d:new Proxy(d,wG)}function kG(d){const l=ru(d)?new Array(d.length):{};for(const z in d)l[z]=AG(d,z);return l}class TG{constructor(l,z,j){this._object=l,this._key=z,this._defaultValue=j,this.__v_isRef=!0,this._value=void 0}get value(){const l=this._object[this._key];return this._value=l===void 0?this._defaultValue:l}set value(l){this._object[this._key]=l}get dep(){return nG(ju(this._object),this._key)}}function AG(d,l,z){const j=d[l];return Ud(j)?j:new TG(d,l,z)}class MG{constructor(l,z,j){this.fn=l,this.setter=z,this._value=void 0,this.dep=new OA(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=C2-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!z,this.isSSR=j}notify(){if(this.flags|=16,!(this.flags&8)&&kf!==this)return kz(this,!0),!0}get value(){const l=this.dep.track();return Mz(this),l&&(l.version=this.dep.version),this._value}set value(l){this.setter&&this.setter(l)}}function SG(d,l,z=!1){let j,J;return Uu(d)?j=d:(j=d.get,J=d.set),new MG(j,J,z)}const k5={},r4=new WeakMap;let cy;function EG(d,l=!1,z=cy){if(z){let j=r4.get(z);j||r4.set(z,j=[]),j.push(d)}}function CG(d,l,z=mf){const{immediate:j,deep:J,once:mt,scheduler:kt,augmentJob:Dt,call:Gt}=z,re=ei=>J?ei:sm(ei)||J===!1||J===0?Qg(ei,1):Qg(ei);let pe,Ne,or,_r,Fr=!1,zr=!1;if(Ud(d)?(Ne=()=>d.value,Fr=sm(d)):d1(d)?(Ne=()=>re(d),Fr=!0):ru(d)?(zr=!0,Fr=d.some(ei=>d1(ei)||sm(ei)),Ne=()=>d.map(ei=>{if(Ud(ei))return ei.value;if(d1(ei))return re(ei);if(Uu(ei))return Gt?Gt(ei,2):ei()})):Uu(d)?l?Ne=Gt?()=>Gt(d,2):d:Ne=()=>{if(or){nv();try{or()}finally{iv()}}const ei=cy;cy=pe;try{return Gt?Gt(d,3,[_r]):d(_r)}finally{cy=ei}}:Ne=ug,l&&J){const ei=Ne,jn=J===!0?1/0:J;Ne=()=>Qg(ei(),jn)}const Wr=_z(),An=()=>{pe.stop(),Wr&&Wr.active&&CA(Wr.effects,pe)};if(mt&&l){const ei=l;l=(...jn)=>{ei(...jn),An()}}let Ft=zr?new Array(d.length).fill(k5):k5;const kn=ei=>{if(!(!(pe.flags&1)||!pe.dirty&&!ei))if(l){const jn=pe.run();if(J||Fr||(zr?jn.some((ai,Qi)=>f1(ai,Ft[Qi])):f1(jn,Ft))){or&&or();const ai=cy;cy=pe;try{const Qi=[jn,Ft===k5?void 0:zr&&Ft[0]===k5?[]:Ft,_r];Ft=jn,Gt?Gt(l,3,Qi):l(...Qi)}finally{cy=ai}}}else pe.run()};return Dt&&Dt(kn),pe=new bz(Ne),pe.scheduler=kt?()=>kt(kn,!1):kn,_r=ei=>EG(ei,!1,pe),or=pe.onStop=()=>{const ei=r4.get(pe);if(ei){if(Gt)Gt(ei,4);else for(const jn of ei)jn();r4.delete(pe)}},l?j?kn(!0):Ft=pe.run():kt?kt(kn.bind(null,!0),!0):pe.run(),An.pause=pe.pause.bind(pe),An.resume=pe.resume.bind(pe),An.stop=An,An}function Qg(d,l=1/0,z){if(l<=0||!gf(d)||d.__v_skip||(z=z||new Set,z.has(d)))return d;if(z.add(d),l--,Ud(d))Qg(d.value,l,z);else if(ru(d))for(let j=0;j{Qg(j,l,z)});else if(pz(d)){for(const j in d)Qg(d[j],l,z);for(const j of Object.getOwnPropertySymbols(d))Object.prototype.propertyIsEnumerable.call(d,j)&&Qg(d[j],l,z)}return d}/** +* @vue/runtime-core v3.5.18 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function G2(d,l,z,j){try{return j?d(...j):d()}catch(J){M4(J,l,z)}}function Em(d,l,z,j){if(Uu(d)){const J=G2(d,l,z,j);return J&&fz(J)&&J.catch(mt=>{M4(mt,l,z)}),J}if(ru(d)){const J=[];for(let mt=0;mt>>1,J=f0[j],mt=P2(J);mt=P2(z)?f0.push(d):f0.splice(PG(l),0,d),d.flags|=1,jz()}}function jz(){n4||(n4=Nz.then(Vz))}function zG(d){ru(d)?a_.push(...d):n1&&d.id===-1?n1.splice(t_+1,0,d):d.flags&1||(a_.push(d),d.flags|=1),jz()}function TC(d,l,z=ig+1){for(;zP2(z)-P2(j));if(a_.length=0,n1){n1.push(...l);return}for(n1=l,t_=0;t_d.id==null?d.flags&2?-1:1/0:d.id;function Vz(d){try{for(ig=0;ig{j._d&&BC(-1);const mt=i4(l);let kt;try{kt=d(...J)}finally{i4(mt),j._d&&BC(1)}return kt};return j._n=!0,j._c=!0,j._d=!0,j}function $p(d,l){if(Ip===null)return d;const z=z4(Ip),j=d.dirs||(d.dirs=[]);for(let J=0;Jd.__isTeleport,y2=d=>d&&(d.disabled||d.disabled===""),AC=d=>d&&(d.defer||d.defer===""),MC=d=>typeof SVGElement<"u"&&d instanceof SVGElement,SC=d=>typeof MathMLElement=="function"&&d instanceof MathMLElement,K8=(d,l)=>{const z=d&&d.to;return sd(z)?l?l(z):null:z},Zz={name:"Teleport",__isTeleport:!0,process(d,l,z,j,J,mt,kt,Dt,Gt,re){const{mc:pe,pc:Ne,pbc:or,o:{insert:_r,querySelector:Fr,createText:zr,createComment:Wr}}=re,An=y2(l.props);let{shapeFlag:Ft,children:kn,dynamicChildren:ei}=l;if(d==null){const jn=l.el=zr(""),ai=l.anchor=zr("");_r(jn,z,j),_r(ai,z,j);const Qi=(un,ia)=>{Ft&16&&(J&&J.isCE&&(J.ce._teleportTarget=un),pe(kn,un,ia,J,mt,kt,Dt,Gt))},Gi=()=>{const un=l.target=K8(l.props,Fr),ia=Gz(un,l,zr,_r);un&&(kt!=="svg"&&MC(un)?kt="svg":kt!=="mathml"&&SC(un)&&(kt="mathml"),An||(Qi(un,ia),V5(l,!1)))};An&&(Qi(z,ai),V5(l,!0)),AC(l.props)?(l.el.__isMounted=!1,c0(()=>{Gi(),delete l.el.__isMounted},mt)):Gi()}else{if(AC(l.props)&&d.el.__isMounted===!1){c0(()=>{Zz.process(d,l,z,j,J,mt,kt,Dt,Gt,re)},mt);return}l.el=d.el,l.targetStart=d.targetStart;const jn=l.anchor=d.anchor,ai=l.target=d.target,Qi=l.targetAnchor=d.targetAnchor,Gi=y2(d.props),un=Gi?z:ai,ia=Gi?jn:Qi;if(kt==="svg"||MC(ai)?kt="svg":(kt==="mathml"||SC(ai))&&(kt="mathml"),ei?(or(d.dynamicChildren,ei,un,J,mt,kt,Dt),WA(d,l,!0)):Gt||Ne(d,l,un,ia,J,mt,kt,Dt,!1),An)Gi?l.props&&d.props&&l.props.to!==d.props.to&&(l.props.to=d.props.to):T5(l,z,jn,re,1);else if((l.props&&l.props.to)!==(d.props&&d.props.to)){const fa=l.target=K8(l.props,Fr);fa&&T5(l,fa,null,re,0)}else Gi&&T5(l,ai,Qi,re,1);V5(l,An)}},remove(d,l,z,{um:j,o:{remove:J}},mt){const{shapeFlag:kt,children:Dt,anchor:Gt,targetStart:re,targetAnchor:pe,target:Ne,props:or}=d;if(Ne&&(J(re),J(pe)),mt&&J(Gt),kt&16){const _r=mt||!y2(or);for(let Fr=0;Fr{d.isMounted=!0}),dg(()=>{d.isUnmounting=!0}),d}const im=[Function,Array],Kz={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:im,onEnter:im,onAfterEnter:im,onEnterCancelled:im,onBeforeLeave:im,onLeave:im,onAfterLeave:im,onLeaveCancelled:im,onBeforeAppear:im,onAppear:im,onAfterAppear:im,onAppearCancelled:im},Xz=d=>{const l=d.subTree;return l.component?Xz(l.component):l},OG={name:"BaseTransition",props:Kz,setup(d,{slots:l}){const z=P4(),j=Yz();return()=>{const J=l.default&&jA(l.default(),!0);if(!J||!J.length)return;const mt=Jz(J),kt=ju(d),{mode:Dt}=kt;if(j.isLeaving)return g8(mt);const Gt=EC(mt);if(!Gt)return g8(mt);let re=z2(Gt,kt,j,z,Ne=>re=Ne);Gt.type!==Gp&&Ty(Gt,re);let pe=z.subTree&&EC(z.subTree);if(pe&&pe.type!==Gp&&!py(Gt,pe)&&Xz(z).type!==Gp){let Ne=z2(pe,kt,j,z);if(Ty(pe,Ne),Dt==="out-in"&&Gt.type!==Gp)return j.isLeaving=!0,Ne.afterLeave=()=>{j.isLeaving=!1,z.job.flags&8||z.update(),delete Ne.afterLeave,pe=void 0},g8(mt);Dt==="in-out"&&Gt.type!==Gp?Ne.delayLeave=(or,_r,Fr)=>{const zr=Qz(j,pe);zr[String(pe.key)]=pe,or[i1]=()=>{_r(),or[i1]=void 0,delete re.delayedLeave,pe=void 0},re.delayedLeave=()=>{Fr(),delete re.delayedLeave,pe=void 0}}:pe=void 0}else pe&&(pe=void 0);return mt}}};function Jz(d){let l=d[0];if(d.length>1){for(const z of d)if(z.type!==Gp){l=z;break}}return l}const DG=OG;function Qz(d,l){const{leavingVNodes:z}=d;let j=z.get(l.type);return j||(j=Object.create(null),z.set(l.type,j)),j}function z2(d,l,z,j,J){const{appear:mt,mode:kt,persisted:Dt=!1,onBeforeEnter:Gt,onEnter:re,onAfterEnter:pe,onEnterCancelled:Ne,onBeforeLeave:or,onLeave:_r,onAfterLeave:Fr,onLeaveCancelled:zr,onBeforeAppear:Wr,onAppear:An,onAfterAppear:Ft,onAppearCancelled:kn}=l,ei=String(d.key),jn=Qz(z,d),ai=(un,ia)=>{un&&Em(un,j,9,ia)},Qi=(un,ia)=>{const fa=ia[1];ai(un,ia),ru(un)?un.every(Li=>Li.length<=1)&&fa():un.length<=1&&fa()},Gi={mode:kt,persisted:Dt,beforeEnter(un){let ia=Gt;if(!z.isMounted)if(mt)ia=Wr||Gt;else return;un[i1]&&un[i1](!0);const fa=jn[ei];fa&&py(d,fa)&&fa.el[i1]&&fa.el[i1](),ai(ia,[un])},enter(un){let ia=re,fa=pe,Li=Ne;if(!z.isMounted)if(mt)ia=An||re,fa=Ft||pe,Li=kn||Ne;else return;let yi=!1;const ra=un[A5]=Da=>{yi||(yi=!0,Da?ai(Li,[un]):ai(fa,[un]),Gi.delayedLeave&&Gi.delayedLeave(),un[A5]=void 0)};ia?Qi(ia,[un,ra]):ra()},leave(un,ia){const fa=String(d.key);if(un[A5]&&un[A5](!0),z.isUnmounting)return ia();ai(or,[un]);let Li=!1;const yi=un[i1]=ra=>{Li||(Li=!0,ia(),ra?ai(zr,[un]):ai(Fr,[un]),un[i1]=void 0,jn[fa]===d&&delete jn[fa])};jn[fa]=d,_r?Qi(_r,[un,yi]):yi()},clone(un){const ia=z2(un,l,z,j,J);return J&&J(ia),ia}};return Gi}function g8(d){if(S4(d))return d=g1(d),d.children=null,d}function EC(d){if(!S4(d))return qz(d.type)&&d.children?Jz(d.children):d;if(d.component)return d.component.subTree;const{shapeFlag:l,children:z}=d;if(z){if(l&16)return z[0];if(l&32&&Uu(z.default))return z.default()}}function Ty(d,l){d.shapeFlag&6&&d.component?(d.transition=l,Ty(d.component.subTree,l)):d.shapeFlag&128?(d.ssContent.transition=l.clone(d.ssContent),d.ssFallback.transition=l.clone(d.ssFallback)):d.transition=l}function jA(d,l=!1,z){let j=[],J=0;for(let mt=0;mt1)for(let mt=0;mtx2(Fr,l&&(ru(l)?l[zr]:l),z,j,J));return}if(o_(j)&&!J){j.shapeFlag&512&&j.type.__asyncResolved&&j.component.subTree.component&&x2(d,l,z,j.component.subTree);return}const mt=j.shapeFlag&4?z4(j.component):j.el,kt=J?null:mt,{i:Dt,r:Gt}=d,re=l&&l.r,pe=Dt.refs===mf?Dt.refs={}:Dt.refs,Ne=Dt.setupState,or=ju(Ne),_r=Ne===mf?()=>!1:Fr=>Fh(or,Fr);if(re!=null&&re!==Gt&&(sd(re)?(pe[re]=null,_r(re)&&(Ne[re]=null)):Ud(re)&&(re.value=null)),Uu(Gt))G2(Gt,Dt,12,[kt,pe]);else{const Fr=sd(Gt),zr=Ud(Gt);if(Fr||zr){const Wr=()=>{if(d.f){const An=Fr?_r(Gt)?Ne[Gt]:pe[Gt]:Gt.value;J?ru(An)&&CA(An,mt):ru(An)?An.includes(mt)||An.push(mt):Fr?(pe[Gt]=[mt],_r(Gt)&&(Ne[Gt]=pe[Gt])):(Gt.value=[mt],d.k&&(pe[d.k]=Gt.value))}else Fr?(pe[Gt]=kt,_r(Gt)&&(Ne[Gt]=kt)):zr&&(Gt.value=kt,d.k&&(pe[d.k]=kt))};kt?(Wr.id=-1,c0(Wr,z)):Wr()}}}T4().requestIdleCallback;T4().cancelIdleCallback;const o_=d=>!!d.type.__asyncLoader,S4=d=>d.type.__isKeepAlive;function FG(d,l){eI(d,"a",l)}function RG(d,l){eI(d,"da",l)}function eI(d,l,z=Yp){const j=d.__wdc||(d.__wdc=()=>{let J=z;for(;J;){if(J.isDeactivated)return;J=J.parent}return d()});if(E4(l,j,z),z){let J=z.parent;for(;J&&J.parent;)S4(J.parent.vnode)&&BG(j,l,z,J),J=J.parent}}function BG(d,l,z,j){const J=E4(l,d,j,!0);K2(()=>{CA(j[l],J)},z)}function E4(d,l,z=Yp,j=!1){if(z){const J=z[d]||(z[d]=[]),mt=l.__weh||(l.__weh=(...kt)=>{nv();const Dt=X2(z),Gt=Em(l,z,d,kt);return Dt(),iv(),Gt});return j?J.unshift(mt):J.push(mt),mt}}const ov=d=>(l,z=Yp)=>{(!D2||d==="sp")&&E4(d,(...j)=>l(...j),z)},NG=ov("bm"),t0=ov("m"),jG=ov("bu"),rI=ov("u"),dg=ov("bum"),K2=ov("um"),UG=ov("sp"),VG=ov("rtg"),HG=ov("rtc");function WG(d,l=Yp){E4("ec",d,l)}const nI="components";function UA(d,l){return aI(nI,d,!0,l)||d}const iI=Symbol.for("v-ndc");function a4(d){return sd(d)?aI(nI,d,!1)||d:d||iI}function aI(d,l,z=!0,j=!1){const J=Ip||Yp;if(J){const mt=J.type;{const Dt=zY(mt,!1);if(Dt&&(Dt===l||Dt===cm(l)||Dt===k4(cm(l))))return mt}const kt=CC(J[d]||mt[d],l)||CC(J.appContext[d],l);return!kt&&j?mt:kt}}function CC(d,l){return d&&(d[l]||d[cm(l)]||d[k4(cm(l))])}function sf(d,l,z,j){let J;const mt=z,kt=ru(d);if(kt||sd(d)){const Dt=kt&&d1(d);let Gt=!1,re=!1;Dt&&(Gt=!sm(d),re=m1(d),d=A4(d)),J=new Array(d.length);for(let pe=0,Ne=d.length;pel(Dt,Gt,void 0,mt));else{const Dt=Object.keys(d);J=new Array(Dt.length);for(let Gt=0,re=Dt.length;GtO2(l)?!(l.type===Gp||l.type===Ou&&!oI(l.children)):!0)?d:null}const X8=d=>d?AI(d)?z4(d):X8(d.parent):null,_2=op(Object.create(null),{$:d=>d,$el:d=>d.vnode.el,$data:d=>d.data,$props:d=>d.props,$attrs:d=>d.attrs,$slots:d=>d.slots,$refs:d=>d.refs,$parent:d=>X8(d.parent),$root:d=>X8(d.root),$host:d=>d.ce,$emit:d=>d.emit,$options:d=>lI(d),$forceUpdate:d=>d.f||(d.f=()=>{NA(d.update)}),$nextTick:d=>d.n||(d.n=Z0.bind(d.proxy)),$watch:d=>dY.bind(d)}),v8=(d,l)=>d!==mf&&!d.__isScriptSetup&&Fh(d,l),ZG={get({_:d},l){if(l==="__v_skip")return!0;const{ctx:z,setupState:j,data:J,props:mt,accessCache:kt,type:Dt,appContext:Gt}=d;let re;if(l[0]!=="$"){const _r=kt[l];if(_r!==void 0)switch(_r){case 1:return j[l];case 2:return J[l];case 4:return z[l];case 3:return mt[l]}else{if(v8(j,l))return kt[l]=1,j[l];if(J!==mf&&Fh(J,l))return kt[l]=2,J[l];if((re=d.propsOptions[0])&&Fh(re,l))return kt[l]=3,mt[l];if(z!==mf&&Fh(z,l))return kt[l]=4,z[l];J8&&(kt[l]=0)}}const pe=_2[l];let Ne,or;if(pe)return l==="$attrs"&&Zp(d.attrs,"get",""),pe(d);if((Ne=Dt.__cssModules)&&(Ne=Ne[l]))return Ne;if(z!==mf&&Fh(z,l))return kt[l]=4,z[l];if(or=Gt.config.globalProperties,Fh(or,l))return or[l]},set({_:d},l,z){const{data:j,setupState:J,ctx:mt}=d;return v8(J,l)?(J[l]=z,!0):j!==mf&&Fh(j,l)?(j[l]=z,!0):Fh(d.props,l)||l[0]==="$"&&l.slice(1)in d?!1:(mt[l]=z,!0)},has({_:{data:d,setupState:l,accessCache:z,ctx:j,appContext:J,propsOptions:mt}},kt){let Dt;return!!z[kt]||d!==mf&&Fh(d,kt)||v8(l,kt)||(Dt=mt[0])&&Fh(Dt,kt)||Fh(j,kt)||Fh(_2,kt)||Fh(J.config.globalProperties,kt)},defineProperty(d,l,z){return z.get!=null?d._.accessCache[l]=0:Fh(z,"value")&&this.set(d,l,z.value,null),Reflect.defineProperty(d,l,z)}};function LC(d){return ru(d)?d.reduce((l,z)=>(l[z]=null,l),{}):d}let J8=!0;function $G(d){const l=lI(d),z=d.proxy,j=d.ctx;J8=!1,l.beforeCreate&&PC(l.beforeCreate,d,"bc");const{data:J,computed:mt,methods:kt,watch:Dt,provide:Gt,inject:re,created:pe,beforeMount:Ne,mounted:or,beforeUpdate:_r,updated:Fr,activated:zr,deactivated:Wr,beforeDestroy:An,beforeUnmount:Ft,destroyed:kn,unmounted:ei,render:jn,renderTracked:ai,renderTriggered:Qi,errorCaptured:Gi,serverPrefetch:un,expose:ia,inheritAttrs:fa,components:Li,directives:yi,filters:ra}=l;if(re&&GG(re,j,null),kt)for(const Ei in kt){const Va=kt[Ei];Uu(Va)&&(j[Ei]=Va.bind(z))}if(J){const Ei=J.call(z,z);gf(Ei)&&(d.data=ky(Ei))}if(J8=!0,mt)for(const Ei in mt){const Va=mt[Ei],ss=Uu(Va)?Va.bind(z,z):Uu(Va.get)?Va.get.bind(z,z):ug,mo=!Uu(Va)&&Uu(Va.set)?Va.set.bind(z):ug,ko=Yo({get:ss,set:mo});Object.defineProperty(j,Ei,{enumerable:!0,configurable:!0,get:()=>ko.value,set:pl=>ko.value=pl})}if(Dt)for(const Ei in Dt)sI(Dt[Ei],j,z,Ei);if(Gt){const Ei=Uu(Gt)?Gt.call(z):Gt;Reflect.ownKeys(Ei).forEach(Va=>{H5(Va,Ei[Va])})}pe&&PC(pe,d,"c");function Ni(Ei,Va){ru(Va)?Va.forEach(ss=>Ei(ss.bind(z))):Va&&Ei(Va.bind(z))}if(Ni(NG,Ne),Ni(t0,or),Ni(jG,_r),Ni(rI,Fr),Ni(FG,zr),Ni(RG,Wr),Ni(WG,Gi),Ni(HG,ai),Ni(VG,Qi),Ni(dg,Ft),Ni(K2,ei),Ni(UG,un),ru(ia))if(ia.length){const Ei=d.exposed||(d.exposed={});ia.forEach(Va=>{Object.defineProperty(Ei,Va,{get:()=>z[Va],set:ss=>z[Va]=ss,enumerable:!0})})}else d.exposed||(d.exposed={});jn&&d.render===ug&&(d.render=jn),fa!=null&&(d.inheritAttrs=fa),Li&&(d.components=Li),yi&&(d.directives=yi),un&&tI(d)}function GG(d,l,z=ug){ru(d)&&(d=Q8(d));for(const j in d){const J=d[j];let mt;gf(J)?"default"in J?mt=lm(J.from||j,J.default,!0):mt=lm(J.from||j):mt=lm(J),Ud(mt)?Object.defineProperty(l,j,{enumerable:!0,configurable:!0,get:()=>mt.value,set:kt=>mt.value=kt}):l[j]=mt}}function PC(d,l,z){Em(ru(d)?d.map(j=>j.bind(l.proxy)):d.bind(l.proxy),l,z)}function sI(d,l,z,j){let J=j.includes(".")?_I(z,j):()=>z[j];if(sd(d)){const mt=l[d];Uu(mt)&&um(J,mt)}else if(Uu(d))um(J,d.bind(z));else if(gf(d))if(ru(d))d.forEach(mt=>sI(mt,l,z,j));else{const mt=Uu(d.handler)?d.handler.bind(z):l[d.handler];Uu(mt)&&um(J,mt,d)}}function lI(d){const l=d.type,{mixins:z,extends:j}=l,{mixins:J,optionsCache:mt,config:{optionMergeStrategies:kt}}=d.appContext,Dt=mt.get(l);let Gt;return Dt?Gt=Dt:!J.length&&!z&&!j?Gt=l:(Gt={},J.length&&J.forEach(re=>o4(Gt,re,kt,!0)),o4(Gt,l,kt)),gf(l)&&mt.set(l,Gt),Gt}function o4(d,l,z,j=!1){const{mixins:J,extends:mt}=l;mt&&o4(d,mt,z,!0),J&&J.forEach(kt=>o4(d,kt,z,!0));for(const kt in l)if(!(j&&kt==="expose")){const Dt=YG[kt]||z&&z[kt];d[kt]=Dt?Dt(d[kt],l[kt]):l[kt]}return d}const YG={data:zC,props:IC,emits:IC,methods:u2,computed:u2,beforeCreate:u0,created:u0,beforeMount:u0,mounted:u0,beforeUpdate:u0,updated:u0,beforeDestroy:u0,beforeUnmount:u0,destroyed:u0,unmounted:u0,activated:u0,deactivated:u0,errorCaptured:u0,serverPrefetch:u0,components:u2,directives:u2,watch:XG,provide:zC,inject:KG};function zC(d,l){return l?d?function(){return op(Uu(d)?d.call(this,this):d,Uu(l)?l.call(this,this):l)}:l:d}function KG(d,l){return u2(Q8(d),Q8(l))}function Q8(d){if(ru(d)){const l={};for(let z=0;z1)return z&&Uu(l)?l.call(j&&j.proxy):l}}function tY(){return!!(P4()||_y)}const cI={},hI=()=>Object.create(cI),fI=d=>Object.getPrototypeOf(d)===cI;function eY(d,l,z,j=!1){const J={},mt=hI();d.propsDefaults=Object.create(null),dI(d,l,J,mt);for(const kt in d.propsOptions[0])kt in J||(J[kt]=void 0);z?d.props=j?J:Dz(J):d.type.props?d.props=J:d.props=mt,d.attrs=mt}function rY(d,l,z,j){const{props:J,attrs:mt,vnode:{patchFlag:kt}}=d,Dt=ju(J),[Gt]=d.propsOptions;let re=!1;if((j||kt>0)&&!(kt&16)){if(kt&8){const pe=d.vnode.dynamicProps;for(let Ne=0;Ne{Gt=!0;const[or,_r]=pI(Ne,l,!0);op(kt,or),_r&&Dt.push(..._r)};!z&&l.mixins.length&&l.mixins.forEach(pe),d.extends&&pe(d.extends),d.mixins&&d.mixins.forEach(pe)}if(!mt&&!Gt)return gf(d)&&j.set(d,n_),n_;if(ru(mt))for(let pe=0;ped==="_"||d==="__"||d==="_ctx"||d==="$stable",HA=d=>ru(d)?d.map(og):[og(d)],iY=(d,l,z)=>{if(l._n)return l;const j=Y2((...J)=>HA(l(...J)),z);return j._c=!1,j},mI=(d,l,z)=>{const j=d._ctx;for(const J in d){if(VA(J))continue;const mt=d[J];if(Uu(mt))l[J]=iY(J,mt,j);else if(mt!=null){const kt=HA(mt);l[J]=()=>kt}}},gI=(d,l)=>{const z=HA(l);d.slots.default=()=>z},vI=(d,l,z)=>{for(const j in l)(z||!VA(j))&&(d[j]=l[j])},aY=(d,l,z)=>{const j=d.slots=hI();if(d.vnode.shapeFlag&32){const J=l.__;J&&Z8(j,"__",J,!0);const mt=l._;mt?(vI(j,l,z),z&&Z8(j,"_",mt,!0)):mI(l,j)}else l&&gI(d,l)},oY=(d,l,z)=>{const{vnode:j,slots:J}=d;let mt=!0,kt=mf;if(j.shapeFlag&32){const Dt=l._;Dt?z&&Dt===1?mt=!1:vI(J,l,z):(mt=!l.$stable,mI(l,J)),kt=l}else l&&(gI(d,l),kt={default:1});if(mt)for(const Dt in J)!VA(Dt)&&kt[Dt]==null&&delete J[Dt]},c0=_Y;function sY(d){return lY(d)}function lY(d,l){const z=T4();z.__VUE__=!0;const{insert:j,remove:J,patchProp:mt,createElement:kt,createText:Dt,createComment:Gt,setText:re,setElementText:pe,parentNode:Ne,nextSibling:or,setScopeId:_r=ug,insertStaticContent:Fr}=d,zr=(gi,bi,li,co=null,vo=null,yo=null,ms=void 0,ns=null,Ko=!!bi.dynamicChildren)=>{if(gi===bi)return;gi&&!py(gi,bi)&&(co=Ea(gi),pl(gi,vo,yo,!0),gi=null),bi.patchFlag===-2&&(Ko=!1,bi.dynamicChildren=null);const{type:Oo,ref:wl,shapeFlag:ws}=bi;switch(Oo){case L4:Wr(gi,bi,li,co);break;case Gp:An(gi,bi,li,co);break;case W5:gi==null&&Ft(bi,li,co,ms);break;case Ou:Li(gi,bi,li,co,vo,yo,ms,ns,Ko);break;default:ws&1?jn(gi,bi,li,co,vo,yo,ms,ns,Ko):ws&6?yi(gi,bi,li,co,vo,yo,ms,ns,Ko):(ws&64||ws&128)&&Oo.process(gi,bi,li,co,vo,yo,ms,ns,Ko,Ps)}wl!=null&&vo?x2(wl,gi&&gi.ref,yo,bi||gi,!bi):wl==null&&gi&&gi.ref!=null&&x2(gi.ref,null,yo,gi,!0)},Wr=(gi,bi,li,co)=>{if(gi==null)j(bi.el=Dt(bi.children),li,co);else{const vo=bi.el=gi.el;bi.children!==gi.children&&re(vo,bi.children)}},An=(gi,bi,li,co)=>{gi==null?j(bi.el=Gt(bi.children||""),li,co):bi.el=gi.el},Ft=(gi,bi,li,co)=>{[gi.el,gi.anchor]=Fr(gi.children,bi,li,co,gi.el,gi.anchor)},kn=({el:gi,anchor:bi},li,co)=>{let vo;for(;gi&&gi!==bi;)vo=or(gi),j(gi,li,co),gi=vo;j(bi,li,co)},ei=({el:gi,anchor:bi})=>{let li;for(;gi&&gi!==bi;)li=or(gi),J(gi),gi=li;J(bi)},jn=(gi,bi,li,co,vo,yo,ms,ns,Ko)=>{bi.type==="svg"?ms="svg":bi.type==="math"&&(ms="mathml"),gi==null?ai(bi,li,co,vo,yo,ms,ns,Ko):un(gi,bi,vo,yo,ms,ns,Ko)},ai=(gi,bi,li,co,vo,yo,ms,ns)=>{let Ko,Oo;const{props:wl,shapeFlag:ws,transition:Il,dirs:du}=gi;if(Ko=gi.el=kt(gi.type,yo,wl&&wl.is,wl),ws&8?pe(Ko,gi.children):ws&16&&Gi(gi.children,Ko,null,co,vo,y8(gi,yo),ms,ns),du&&ny(gi,null,co,"created"),Qi(Ko,gi,gi.scopeId,ms,co),wl){for(const Fc in wl)Fc!=="value"&&!m2(Fc)&&mt(Ko,Fc,null,wl[Fc],yo,co);"value"in wl&&mt(Ko,"value",null,wl.value,yo),(Oo=wl.onVnodeBeforeMount)&&Qm(Oo,co,gi)}du&&ny(gi,null,co,"beforeMount");const Hu=uY(vo,Il);Hu&&Il.beforeEnter(Ko),j(Ko,bi,li),((Oo=wl&&wl.onVnodeMounted)||Hu||du)&&c0(()=>{Oo&&Qm(Oo,co,gi),Hu&&Il.enter(Ko),du&&ny(gi,null,co,"mounted")},vo)},Qi=(gi,bi,li,co,vo)=>{if(li&&_r(gi,li),co)for(let yo=0;yo{for(let Oo=Ko;Oo{const ns=bi.el=gi.el;let{patchFlag:Ko,dynamicChildren:Oo,dirs:wl}=bi;Ko|=gi.patchFlag&16;const ws=gi.props||mf,Il=bi.props||mf;let du;if(li&&iy(li,!1),(du=Il.onVnodeBeforeUpdate)&&Qm(du,li,bi,gi),wl&&ny(bi,gi,li,"beforeUpdate"),li&&iy(li,!0),(ws.innerHTML&&Il.innerHTML==null||ws.textContent&&Il.textContent==null)&&pe(ns,""),Oo?ia(gi.dynamicChildren,Oo,ns,li,co,y8(bi,vo),yo):ms||Va(gi,bi,ns,null,li,co,y8(bi,vo),yo,!1),Ko>0){if(Ko&16)fa(ns,ws,Il,li,vo);else if(Ko&2&&ws.class!==Il.class&&mt(ns,"class",null,Il.class,vo),Ko&4&&mt(ns,"style",ws.style,Il.style,vo),Ko&8){const Hu=bi.dynamicProps;for(let Fc=0;Fc{du&&Qm(du,li,bi,gi),wl&&ny(bi,gi,li,"updated")},co)},ia=(gi,bi,li,co,vo,yo,ms)=>{for(let ns=0;ns{if(bi!==li){if(bi!==mf)for(const yo in bi)!m2(yo)&&!(yo in li)&&mt(gi,yo,bi[yo],null,vo,co);for(const yo in li){if(m2(yo))continue;const ms=li[yo],ns=bi[yo];ms!==ns&&yo!=="value"&&mt(gi,yo,ns,ms,vo,co)}"value"in li&&mt(gi,"value",bi.value,li.value,vo)}},Li=(gi,bi,li,co,vo,yo,ms,ns,Ko)=>{const Oo=bi.el=gi?gi.el:Dt(""),wl=bi.anchor=gi?gi.anchor:Dt("");let{patchFlag:ws,dynamicChildren:Il,slotScopeIds:du}=bi;du&&(ns=ns?ns.concat(du):du),gi==null?(j(Oo,li,co),j(wl,li,co),Gi(bi.children||[],li,wl,vo,yo,ms,ns,Ko)):ws>0&&ws&64&&Il&&gi.dynamicChildren?(ia(gi.dynamicChildren,Il,li,vo,yo,ms,ns),(bi.key!=null||vo&&bi===vo.subTree)&&WA(gi,bi,!0)):Va(gi,bi,li,wl,vo,yo,ms,ns,Ko)},yi=(gi,bi,li,co,vo,yo,ms,ns,Ko)=>{bi.slotScopeIds=ns,gi==null?bi.shapeFlag&512?vo.ctx.activate(bi,li,co,ms,Ko):ra(bi,li,co,vo,yo,ms,Ko):Da(gi,bi,Ko)},ra=(gi,bi,li,co,vo,yo,ms)=>{const ns=gi.component=SY(gi,co,vo);if(S4(gi)&&(ns.ctx.renderer=Ps),EY(ns,!1,ms),ns.asyncDep){if(vo&&vo.registerDep(ns,Ni,ms),!gi.el){const Ko=ns.subTree=gu(Gp);An(null,Ko,bi,li),gi.placeholder=Ko.el}}else Ni(ns,gi,bi,li,vo,yo,ms)},Da=(gi,bi,li)=>{const co=bi.component=gi.component;if(yY(gi,bi,li))if(co.asyncDep&&!co.asyncResolved){Ei(co,bi,li);return}else co.next=bi,co.update();else bi.el=gi.el,co.vnode=bi},Ni=(gi,bi,li,co,vo,yo,ms)=>{const ns=()=>{if(gi.isMounted){let{next:ws,bu:Il,u:du,parent:Hu,vnode:Fc}=gi;{const d0=yI(gi);if(d0){ws&&(ws.el=Fc.el,Ei(gi,ws,ms)),d0.asyncDep.then(()=>{gi.isUnmounted||ns()});return}}let kc=ws,Vd;iy(gi,!1),ws?(ws.el=Fc.el,Ei(gi,ws,ms)):ws=Fc,Il&&U5(Il),(Vd=ws.props&&ws.props.onVnodeBeforeUpdate)&&Qm(Vd,Hu,ws,Fc),iy(gi,!0);const kd=FC(gi),e0=gi.subTree;gi.subTree=kd,zr(e0,kd,Ne(e0.el),Ea(e0),gi,vo,yo),ws.el=kd.el,kc===null&&xY(gi,kd.el),du&&c0(du,vo),(Vd=ws.props&&ws.props.onVnodeUpdated)&&c0(()=>Qm(Vd,Hu,ws,Fc),vo)}else{let ws;const{el:Il,props:du}=bi,{bm:Hu,m:Fc,parent:kc,root:Vd,type:kd}=gi,e0=o_(bi);iy(gi,!1),Hu&&U5(Hu),!e0&&(ws=du&&du.onVnodeBeforeMount)&&Qm(ws,kc,bi),iy(gi,!0);{Vd.ce&&Vd.ce._def.shadowRoot!==!1&&Vd.ce._injectChildStyle(kd);const d0=gi.subTree=FC(gi);zr(null,d0,li,co,gi,vo,yo),bi.el=d0.el}if(Fc&&c0(Fc,vo),!e0&&(ws=du&&du.onVnodeMounted)){const d0=bi;c0(()=>Qm(ws,kc,d0),vo)}(bi.shapeFlag&256||kc&&o_(kc.vnode)&&kc.vnode.shapeFlag&256)&&gi.a&&c0(gi.a,vo),gi.isMounted=!0,bi=li=co=null}};gi.scope.on();const Ko=gi.effect=new bz(ns);gi.scope.off();const Oo=gi.update=Ko.run.bind(Ko),wl=gi.job=Ko.runIfDirty.bind(Ko);wl.i=gi,wl.id=gi.uid,Ko.scheduler=()=>NA(wl),iy(gi,!0),Oo()},Ei=(gi,bi,li)=>{bi.component=gi;const co=gi.vnode.props;gi.vnode=bi,gi.next=null,rY(gi,bi.props,co,li),oY(gi,bi.children,li),nv(),TC(gi),iv()},Va=(gi,bi,li,co,vo,yo,ms,ns,Ko=!1)=>{const Oo=gi&&gi.children,wl=gi?gi.shapeFlag:0,ws=bi.children,{patchFlag:Il,shapeFlag:du}=bi;if(Il>0){if(Il&128){mo(Oo,ws,li,co,vo,yo,ms,ns,Ko);return}else if(Il&256){ss(Oo,ws,li,co,vo,yo,ms,ns,Ko);return}}du&8?(wl&16&&Ta(Oo,vo,yo),ws!==Oo&&pe(li,ws)):wl&16?du&16?mo(Oo,ws,li,co,vo,yo,ms,ns,Ko):Ta(Oo,vo,yo,!0):(wl&8&&pe(li,""),du&16&&Gi(ws,li,co,vo,yo,ms,ns,Ko))},ss=(gi,bi,li,co,vo,yo,ms,ns,Ko)=>{gi=gi||n_,bi=bi||n_;const Oo=gi.length,wl=bi.length,ws=Math.min(Oo,wl);let Il;for(Il=0;Ilwl?Ta(gi,vo,yo,!0,!1,ws):Gi(bi,li,co,vo,yo,ms,ns,Ko,ws)},mo=(gi,bi,li,co,vo,yo,ms,ns,Ko)=>{let Oo=0;const wl=bi.length;let ws=gi.length-1,Il=wl-1;for(;Oo<=ws&&Oo<=Il;){const du=gi[Oo],Hu=bi[Oo]=Ko?a1(bi[Oo]):og(bi[Oo]);if(py(du,Hu))zr(du,Hu,li,null,vo,yo,ms,ns,Ko);else break;Oo++}for(;Oo<=ws&&Oo<=Il;){const du=gi[ws],Hu=bi[Il]=Ko?a1(bi[Il]):og(bi[Il]);if(py(du,Hu))zr(du,Hu,li,null,vo,yo,ms,ns,Ko);else break;ws--,Il--}if(Oo>ws){if(Oo<=Il){const du=Il+1,Hu=duIl)for(;Oo<=ws;)pl(gi[Oo],vo,yo,!0),Oo++;else{const du=Oo,Hu=Oo,Fc=new Map;for(Oo=Hu;Oo<=Il;Oo++){const sp=bi[Oo]=Ko?a1(bi[Oo]):og(bi[Oo]);sp.key!=null&&Fc.set(sp.key,Oo)}let kc,Vd=0;const kd=Il-Hu+1;let e0=!1,d0=0;const Pm=new Array(kd);for(Oo=0;Oo=kd){pl(sp,vo,yo,!0);continue}let p0;if(sp.key!=null)p0=Fc.get(sp.key);else for(kc=Hu;kc<=Il;kc++)if(Pm[kc-Hu]===0&&py(sp,bi[kc])){p0=kc;break}p0===void 0?pl(sp,vo,yo,!0):(Pm[p0-Hu]=Oo+1,p0>=d0?d0=p0:e0=!0,zr(sp,bi[p0],li,null,vo,yo,ms,ns,Ko),Vd++)}const uv=e0?cY(Pm):n_;for(kc=uv.length-1,Oo=kd-1;Oo>=0;Oo--){const sp=Hu+Oo,p0=bi[sp],zm=bi[sp+1],zy=sp+1{const{el:yo,type:ms,transition:ns,children:Ko,shapeFlag:Oo}=gi;if(Oo&6){ko(gi.component.subTree,bi,li,co);return}if(Oo&128){gi.suspense.move(bi,li,co);return}if(Oo&64){ms.move(gi,bi,li,Ps);return}if(ms===Ou){j(yo,bi,li);for(let ws=0;wsns.enter(yo),vo);else{const{leave:ws,delayLeave:Il,afterLeave:du}=ns,Hu=()=>{gi.ctx.isUnmounted?J(yo):j(yo,bi,li)},Fc=()=>{ws(yo,()=>{Hu(),du&&du()})};Il?Il(yo,Hu,Fc):Fc()}else j(yo,bi,li)},pl=(gi,bi,li,co=!1,vo=!1)=>{const{type:yo,props:ms,ref:ns,children:Ko,dynamicChildren:Oo,shapeFlag:wl,patchFlag:ws,dirs:Il,cacheIndex:du}=gi;if(ws===-2&&(vo=!1),ns!=null&&(nv(),x2(ns,null,li,gi,!0),iv()),du!=null&&(bi.renderCache[du]=void 0),wl&256){bi.ctx.deactivate(gi);return}const Hu=wl&1&&Il,Fc=!o_(gi);let kc;if(Fc&&(kc=ms&&ms.onVnodeBeforeUnmount)&&Qm(kc,bi,gi),wl&6)fo(gi.component,li,co);else{if(wl&128){gi.suspense.unmount(li,co);return}Hu&&ny(gi,null,bi,"beforeUnmount"),wl&64?gi.type.remove(gi,bi,li,Ps,co):Oo&&!Oo.hasOnce&&(yo!==Ou||ws>0&&ws&64)?Ta(Oo,bi,li,!1,!0):(yo===Ou&&ws&384||!vo&&wl&16)&&Ta(Ko,bi,li),co&&fu(gi)}(Fc&&(kc=ms&&ms.onVnodeUnmounted)||Hu)&&c0(()=>{kc&&Qm(kc,bi,gi),Hu&&ny(gi,null,bi,"unmounted")},li)},fu=gi=>{const{type:bi,el:li,anchor:co,transition:vo}=gi;if(bi===Ou){qo(li,co);return}if(bi===W5){ei(gi);return}const yo=()=>{J(li),vo&&!vo.persisted&&vo.afterLeave&&vo.afterLeave()};if(gi.shapeFlag&1&&vo&&!vo.persisted){const{leave:ms,delayLeave:ns}=vo,Ko=()=>ms(li,yo);ns?ns(gi.el,yo,Ko):Ko()}else yo()},qo=(gi,bi)=>{let li;for(;gi!==bi;)li=or(gi),J(gi),gi=li;J(bi)},fo=(gi,bi,li)=>{const{bum:co,scope:vo,job:yo,subTree:ms,um:ns,m:Ko,a:Oo,parent:wl,slots:{__:ws}}=gi;DC(Ko),DC(Oo),co&&U5(co),wl&&ru(ws)&&ws.forEach(Il=>{wl.renderCache[Il]=void 0}),vo.stop(),yo&&(yo.flags|=8,pl(ms,gi,bi,li)),ns&&c0(ns,bi),c0(()=>{gi.isUnmounted=!0},bi),bi&&bi.pendingBranch&&!bi.isUnmounted&&gi.asyncDep&&!gi.asyncResolved&&gi.suspenseId===bi.pendingId&&(bi.deps--,bi.deps===0&&bi.resolve())},Ta=(gi,bi,li,co=!1,vo=!1,yo=0)=>{for(let ms=yo;ms{if(gi.shapeFlag&6)return Ea(gi.component.subTree);if(gi.shapeFlag&128)return gi.suspense.next();const bi=or(gi.anchor||gi.el),li=bi&&bi[Wz];return li?or(li):bi};let go=!1;const Ao=(gi,bi,li)=>{gi==null?bi._vnode&&pl(bi._vnode,null,null,!0):zr(bi._vnode||null,gi,bi,null,null,null,li),bi._vnode=gi,go||(go=!0,TC(),Uz(),go=!1)},Ps={p:zr,um:pl,m:ko,r:fu,mt:ra,mc:Gi,pc:Va,pbc:ia,n:Ea,o:d};return{render:Ao,hydrate:void 0,createApp:QG(Ao)}}function y8({type:d,props:l},z){return z==="svg"&&d==="foreignObject"||z==="mathml"&&d==="annotation-xml"&&l&&l.encoding&&l.encoding.includes("html")?void 0:z}function iy({effect:d,job:l},z){z?(d.flags|=32,l.flags|=4):(d.flags&=-33,l.flags&=-5)}function uY(d,l){return(!d||d&&!d.pendingBranch)&&l&&!l.persisted}function WA(d,l,z=!1){const j=d.children,J=l.children;if(ru(j)&&ru(J))for(let mt=0;mt>1,d[z[Dt]]0&&(l[j]=z[mt-1]),z[mt]=j)}}for(mt=z.length,kt=z[mt-1];mt-- >0;)z[mt]=kt,kt=l[kt];return z}function yI(d){const l=d.subTree.component;if(l)return l.asyncDep&&!l.asyncResolved?l:yI(l)}function DC(d){if(d)for(let l=0;llm(hY);function um(d,l,z){return xI(d,l,z)}function xI(d,l,z=mf){const{immediate:j,deep:J,flush:mt,once:kt}=z,Dt=op({},z),Gt=l&&j||!l&&mt!=="post";let re;if(D2){if(mt==="sync"){const _r=fY();re=_r.__watcherHandles||(_r.__watcherHandles=[])}else if(!Gt){const _r=()=>{};return _r.stop=ug,_r.resume=ug,_r.pause=ug,_r}}const pe=Yp;Dt.call=(_r,Fr,zr)=>Em(_r,pe,Fr,zr);let Ne=!1;mt==="post"?Dt.scheduler=_r=>{c0(_r,pe&&pe.suspense)}:mt!=="sync"&&(Ne=!0,Dt.scheduler=(_r,Fr)=>{Fr?_r():NA(_r)}),Dt.augmentJob=_r=>{l&&(_r.flags|=4),Ne&&(_r.flags|=2,pe&&(_r.id=pe.uid,_r.i=pe))};const or=CG(d,l,Dt);return D2&&(re?re.push(or):Gt&&or()),or}function dY(d,l,z){const j=this.proxy,J=sd(d)?d.includes(".")?_I(j,d):()=>j[d]:d.bind(j,j);let mt;Uu(l)?mt=l:(mt=l.handler,z=l);const kt=X2(this),Dt=xI(J,mt.bind(j),z);return kt(),Dt}function _I(d,l){const z=l.split(".");return()=>{let j=d;for(let J=0;Jl==="modelValue"||l==="model-value"?d.modelModifiers:d[`${l}Modifiers`]||d[`${cm(l)}Modifiers`]||d[`${Ey(l)}Modifiers`];function mY(d,l,...z){if(d.isUnmounted)return;const j=d.vnode.props||mf;let J=z;const mt=l.startsWith("update:"),kt=mt&&pY(j,l.slice(7));kt&&(kt.trim&&(J=z.map(pe=>sd(pe)?pe.trim():pe)),kt.number&&(J=z.map(Q5)));let Dt,Gt=j[Dt=h8(l)]||j[Dt=h8(cm(l))];!Gt&&mt&&(Gt=j[Dt=h8(Ey(l))]),Gt&&Em(Gt,d,6,J);const re=j[Dt+"Once"];if(re){if(!d.emitted)d.emitted={};else if(d.emitted[Dt])return;d.emitted[Dt]=!0,Em(re,d,6,J)}}function bI(d,l,z=!1){const j=l.emitsCache,J=j.get(d);if(J!==void 0)return J;const mt=d.emits;let kt={},Dt=!1;if(!Uu(d)){const Gt=re=>{const pe=bI(re,l,!0);pe&&(Dt=!0,op(kt,pe))};!z&&l.mixins.length&&l.mixins.forEach(Gt),d.extends&&Gt(d.extends),d.mixins&&d.mixins.forEach(Gt)}return!mt&&!Dt?(gf(d)&&j.set(d,null),null):(ru(mt)?mt.forEach(Gt=>kt[Gt]=null):op(kt,mt),gf(d)&&j.set(d,kt),kt)}function C4(d,l){return!d||!_4(l)?!1:(l=l.slice(2).replace(/Once$/,""),Fh(d,l[0].toLowerCase()+l.slice(1))||Fh(d,Ey(l))||Fh(d,l))}function FC(d){const{type:l,vnode:z,proxy:j,withProxy:J,propsOptions:[mt],slots:kt,attrs:Dt,emit:Gt,render:re,renderCache:pe,props:Ne,data:or,setupState:_r,ctx:Fr,inheritAttrs:zr}=d,Wr=i4(d);let An,Ft;try{if(z.shapeFlag&4){const ei=J||j,jn=ei;An=og(re.call(jn,ei,pe,Ne,_r,or,Fr)),Ft=Dt}else{const ei=l;An=og(ei.length>1?ei(Ne,{attrs:Dt,slots:kt,emit:Gt}):ei(Ne,null)),Ft=l.props?Dt:gY(Dt)}}catch(ei){b2.length=0,M4(ei,d,1),An=gu(Gp)}let kn=An;if(Ft&&zr!==!1){const ei=Object.keys(Ft),{shapeFlag:jn}=kn;ei.length&&jn&7&&(mt&&ei.some(EA)&&(Ft=vY(Ft,mt)),kn=g1(kn,Ft,!1,!0))}return z.dirs&&(kn=g1(kn,null,!1,!0),kn.dirs=kn.dirs?kn.dirs.concat(z.dirs):z.dirs),z.transition&&Ty(kn,z.transition),An=kn,i4(Wr),An}const gY=d=>{let l;for(const z in d)(z==="class"||z==="style"||_4(z))&&((l||(l={}))[z]=d[z]);return l},vY=(d,l)=>{const z={};for(const j in d)(!EA(j)||!(j.slice(9)in l))&&(z[j]=d[j]);return z};function yY(d,l,z){const{props:j,children:J,component:mt}=d,{props:kt,children:Dt,patchFlag:Gt}=l,re=mt.emitsOptions;if(l.dirs||l.transition)return!0;if(z&&Gt>=0){if(Gt&1024)return!0;if(Gt&16)return j?RC(j,kt,re):!!kt;if(Gt&8){const pe=l.dynamicProps;for(let Ne=0;Ned.__isSuspense;function _Y(d,l){l&&l.pendingBranch?ru(d)?l.effects.push(...d):l.effects.push(d):zG(d)}const Ou=Symbol.for("v-fgt"),L4=Symbol.for("v-txt"),Gp=Symbol.for("v-cmt"),W5=Symbol.for("v-stc"),b2=[];let $0=null;function zi(d=!1){b2.push($0=d?null:[])}function bY(){b2.pop(),$0=b2[b2.length-1]||null}let I2=1;function BC(d,l=!1){I2+=d,d<0&&$0&&l&&($0.hasOnce=!0)}function kI(d){return d.dynamicChildren=I2>0?$0||n_:null,bY(),I2>0&&$0&&$0.push(d),d}function Vi(d,l,z,j,J,mt){return kI(Re(d,l,z,j,J,mt,!0))}function hm(d,l,z,j,J){return kI(gu(d,l,z,j,J,!0))}function O2(d){return d?d.__v_isVNode===!0:!1}function py(d,l){return d.type===l.type&&d.key===l.key}const TI=({key:d})=>d??null,q5=({ref:d,ref_key:l,ref_for:z})=>(typeof d=="number"&&(d=""+d),d!=null?sd(d)||Ud(d)||Uu(d)?{i:Ip,r:d,k:l,f:!!z}:d:null);function Re(d,l=null,z=null,j=0,J=null,mt=d===Ou?0:1,kt=!1,Dt=!1){const Gt={__v_isVNode:!0,__v_skip:!0,type:d,props:l,key:l&&TI(l),ref:l&&q5(l),scopeId:Hz,slotScopeIds:null,children:z,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:mt,patchFlag:j,dynamicProps:J,dynamicChildren:null,appContext:null,ctx:Ip};return Dt?(qA(Gt,z),mt&128&&d.normalize(Gt)):z&&(Gt.shapeFlag|=sd(z)?8:16),I2>0&&!kt&&$0&&(Gt.patchFlag>0||mt&6)&&Gt.patchFlag!==32&&$0.push(Gt),Gt}const gu=wY;function wY(d,l=null,z=null,j=0,J=null,mt=!1){if((!d||d===iI)&&(d=Gp),O2(d)){const Dt=g1(d,l,!0);return z&&qA(Dt,z),I2>0&&!mt&&$0&&(Dt.shapeFlag&6?$0[$0.indexOf(d)]=Dt:$0.push(Dt)),Dt.patchFlag=-2,Dt}if(IY(d)&&(d=d.__vccOpts),l){l=kY(l);let{class:Dt,style:Gt}=l;Dt&&!sd(Dt)&&(l.class=Xs(Dt)),gf(Gt)&&(RA(Gt)&&!ru(Gt)&&(Gt=op({},Gt)),l.style=av(Gt))}const kt=sd(d)?1:wI(d)?128:qz(d)?64:gf(d)?4:Uu(d)?2:0;return Re(d,l,z,j,J,kt,mt,!0)}function kY(d){return d?RA(d)||fI(d)?op({},d):d:null}function g1(d,l,z=!1,j=!1){const{props:J,ref:mt,patchFlag:kt,children:Dt,transition:Gt}=d,re=l?TY(J||{},l):J,pe={__v_isVNode:!0,__v_skip:!0,type:d.type,props:re,key:re&&TI(re),ref:l&&l.ref?z&&mt?ru(mt)?mt.concat(q5(l)):[mt,q5(l)]:q5(l):mt,scopeId:d.scopeId,slotScopeIds:d.slotScopeIds,children:Dt,target:d.target,targetStart:d.targetStart,targetAnchor:d.targetAnchor,staticCount:d.staticCount,shapeFlag:d.shapeFlag,patchFlag:l&&d.type!==Ou?kt===-1?16:kt|16:kt,dynamicProps:d.dynamicProps,dynamicChildren:d.dynamicChildren,appContext:d.appContext,dirs:d.dirs,transition:Gt,component:d.component,suspense:d.suspense,ssContent:d.ssContent&&g1(d.ssContent),ssFallback:d.ssFallback&&g1(d.ssFallback),placeholder:d.placeholder,el:d.el,anchor:d.anchor,ctx:d.ctx,ce:d.ce};return Gt&&j&&Ty(pe,Gt.clone(pe)),pe}function nc(d=" ",l=0){return gu(L4,null,d,l)}function Ff(d,l){const z=gu(W5,null,d);return z.staticCount=l,z}function bs(d="",l=!1){return l?(zi(),hm(Gp,null,d)):gu(Gp,null,d)}function og(d){return d==null||typeof d=="boolean"?gu(Gp):ru(d)?gu(Ou,null,d.slice()):O2(d)?a1(d):gu(L4,null,String(d))}function a1(d){return d.el===null&&d.patchFlag!==-1||d.memo?d:g1(d)}function qA(d,l){let z=0;const{shapeFlag:j}=d;if(l==null)l=null;else if(ru(l))z=16;else if(typeof l=="object")if(j&65){const J=l.default;J&&(J._c&&(J._d=!1),qA(d,J()),J._c&&(J._d=!0));return}else{z=32;const J=l._;!J&&!fI(l)?l._ctx=Ip:J===3&&Ip&&(Ip.slots._===1?l._=1:(l._=2,d.patchFlag|=1024))}else Uu(l)?(l={default:l,_ctx:Ip},z=32):(l=String(l),j&64?(z=16,l=[nc(l)]):z=8);d.children=l,d.shapeFlag|=z}function TY(...d){const l={};for(let z=0;zYp||Ip;let s4,eA;{const d=T4(),l=(z,j)=>{let J;return(J=d[z])||(J=d[z]=[]),J.push(j),mt=>{J.length>1?J.forEach(kt=>kt(mt)):J[0](mt)}};s4=l("__VUE_INSTANCE_SETTERS__",z=>Yp=z),eA=l("__VUE_SSR_SETTERS__",z=>D2=z)}const X2=d=>{const l=Yp;return s4(d),d.scope.on(),()=>{d.scope.off(),s4(l)}},NC=()=>{Yp&&Yp.scope.off(),s4(null)};function AI(d){return d.vnode.shapeFlag&4}let D2=!1;function EY(d,l=!1,z=!1){l&&eA(l);const{props:j,children:J}=d.vnode,mt=AI(d);eY(d,j,mt,l),aY(d,J,z||l);const kt=mt?CY(d,l):void 0;return l&&eA(!1),kt}function CY(d,l){const z=d.type;d.accessCache=Object.create(null),d.proxy=new Proxy(d.ctx,ZG);const{setup:j}=z;if(j){nv();const J=d.setupContext=j.length>1?PY(d):null,mt=X2(d),kt=G2(j,d,0,[d.props,J]),Dt=fz(kt);if(iv(),mt(),(Dt||d.sp)&&!o_(d)&&tI(d),Dt){if(kt.then(NC,NC),l)return kt.then(Gt=>{jC(d,Gt)}).catch(Gt=>{M4(Gt,d,0)});d.asyncDep=kt}else jC(d,kt)}else MI(d)}function jC(d,l,z){Uu(l)?d.type.__ssrInlineRender?d.ssrRender=l:d.render=l:gf(l)&&(d.setupState=Bz(l)),MI(d)}function MI(d,l,z){const j=d.type;d.render||(d.render=j.render||ug);{const J=X2(d);nv();try{$G(d)}finally{iv(),J()}}}const LY={get(d,l){return Zp(d,"get",""),d[l]}};function PY(d){const l=z=>{d.exposed=z||{}};return{attrs:new Proxy(d.attrs,LY),slots:d.slots,emit:d.emit,expose:l}}function z4(d){return d.exposed?d.exposeProxy||(d.exposeProxy=new Proxy(Bz(BA(d.exposed)),{get(l,z){if(z in l)return l[z];if(z in _2)return _2[z](d)},has(l,z){return z in l||z in _2}})):d.proxy}function zY(d,l=!0){return Uu(d)?d.displayName||d.name:d.name||l&&d.__name}function IY(d){return Uu(d)&&"__vccOpts"in d}const Yo=(d,l)=>SG(d,l,D2);function ZA(d,l,z){const j=arguments.length;return j===2?gf(l)&&!ru(l)?O2(l)?gu(d,null,[l]):gu(d,l):gu(d,null,l):(j>3?z=Array.prototype.slice.call(arguments,2):j===3&&O2(z)&&(z=[z]),gu(d,l,z))}const OY="3.5.18";/** +* @vue/runtime-dom v3.5.18 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let rA;const UC=typeof window<"u"&&window.trustedTypes;if(UC)try{rA=UC.createPolicy("vue",{createHTML:d=>d})}catch{}const SI=rA?d=>rA.createHTML(d):d=>d,DY="http://www.w3.org/2000/svg",FY="http://www.w3.org/1998/Math/MathML",Kg=typeof document<"u"?document:null,VC=Kg&&Kg.createElement("template"),RY={insert:(d,l,z)=>{l.insertBefore(d,z||null)},remove:d=>{const l=d.parentNode;l&&l.removeChild(d)},createElement:(d,l,z,j)=>{const J=l==="svg"?Kg.createElementNS(DY,d):l==="mathml"?Kg.createElementNS(FY,d):z?Kg.createElement(d,{is:z}):Kg.createElement(d);return d==="select"&&j&&j.multiple!=null&&J.setAttribute("multiple",j.multiple),J},createText:d=>Kg.createTextNode(d),createComment:d=>Kg.createComment(d),setText:(d,l)=>{d.nodeValue=l},setElementText:(d,l)=>{d.textContent=l},parentNode:d=>d.parentNode,nextSibling:d=>d.nextSibling,querySelector:d=>Kg.querySelector(d),setScopeId(d,l){d.setAttribute(l,"")},insertStaticContent(d,l,z,j,J,mt){const kt=z?z.previousSibling:l.lastChild;if(J&&(J===mt||J.nextSibling))for(;l.insertBefore(J.cloneNode(!0),z),!(J===mt||!(J=J.nextSibling)););else{VC.innerHTML=SI(j==="svg"?`${d}`:j==="mathml"?`${d}`:d);const Dt=VC.content;if(j==="svg"||j==="mathml"){const Gt=Dt.firstChild;for(;Gt.firstChild;)Dt.appendChild(Gt.firstChild);Dt.removeChild(Gt)}l.insertBefore(Dt,z)}return[kt?kt.nextSibling:l.firstChild,z?z.previousSibling:l.lastChild]}},Jv="transition",Yb="animation",c_=Symbol("_vtc"),EI={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},CI=op({},Kz,EI),BY=d=>(d.displayName="Transition",d.props=CI,d),LI=BY((d,{slots:l})=>ZA(DG,PI(d),l)),ay=(d,l=[])=>{ru(d)?d.forEach(z=>z(...l)):d&&d(...l)},HC=d=>d?ru(d)?d.some(l=>l.length>1):d.length>1:!1;function PI(d){const l={};for(const Li in d)Li in EI||(l[Li]=d[Li]);if(d.css===!1)return l;const{name:z="v",type:j,duration:J,enterFromClass:mt=`${z}-enter-from`,enterActiveClass:kt=`${z}-enter-active`,enterToClass:Dt=`${z}-enter-to`,appearFromClass:Gt=mt,appearActiveClass:re=kt,appearToClass:pe=Dt,leaveFromClass:Ne=`${z}-leave-from`,leaveActiveClass:or=`${z}-leave-active`,leaveToClass:_r=`${z}-leave-to`}=d,Fr=NY(J),zr=Fr&&Fr[0],Wr=Fr&&Fr[1],{onBeforeEnter:An,onEnter:Ft,onEnterCancelled:kn,onLeave:ei,onLeaveCancelled:jn,onBeforeAppear:ai=An,onAppear:Qi=Ft,onAppearCancelled:Gi=kn}=l,un=(Li,yi,ra,Da)=>{Li._enterCancelled=Da,e1(Li,yi?pe:Dt),e1(Li,yi?re:kt),ra&&ra()},ia=(Li,yi)=>{Li._isLeaving=!1,e1(Li,Ne),e1(Li,_r),e1(Li,or),yi&&yi()},fa=Li=>(yi,ra)=>{const Da=Li?Qi:Ft,Ni=()=>un(yi,Li,ra);ay(Da,[yi,Ni]),WC(()=>{e1(yi,Li?Gt:mt),rg(yi,Li?pe:Dt),HC(Da)||qC(yi,j,zr,Ni)})};return op(l,{onBeforeEnter(Li){ay(An,[Li]),rg(Li,mt),rg(Li,kt)},onBeforeAppear(Li){ay(ai,[Li]),rg(Li,Gt),rg(Li,re)},onEnter:fa(!1),onAppear:fa(!0),onLeave(Li,yi){Li._isLeaving=!0;const ra=()=>ia(Li,yi);rg(Li,Ne),Li._enterCancelled?(rg(Li,or),nA()):(nA(),rg(Li,or)),WC(()=>{Li._isLeaving&&(e1(Li,Ne),rg(Li,_r),HC(ei)||qC(Li,j,Wr,ra))}),ay(ei,[Li,ra])},onEnterCancelled(Li){un(Li,!1,void 0,!0),ay(kn,[Li])},onAppearCancelled(Li){un(Li,!0,void 0,!0),ay(Gi,[Li])},onLeaveCancelled(Li){ia(Li),ay(jn,[Li])}})}function NY(d){if(d==null)return null;if(gf(d))return[x8(d.enter),x8(d.leave)];{const l=x8(d);return[l,l]}}function x8(d){return q$(d)}function rg(d,l){l.split(/\s+/).forEach(z=>z&&d.classList.add(z)),(d[c_]||(d[c_]=new Set)).add(l)}function e1(d,l){l.split(/\s+/).forEach(j=>j&&d.classList.remove(j));const z=d[c_];z&&(z.delete(l),z.size||(d[c_]=void 0))}function WC(d){requestAnimationFrame(()=>{requestAnimationFrame(d)})}let jY=0;function qC(d,l,z,j){const J=d._endId=++jY,mt=()=>{J===d._endId&&j()};if(z!=null)return setTimeout(mt,z);const{type:kt,timeout:Dt,propCount:Gt}=zI(d,l);if(!kt)return j();const re=kt+"end";let pe=0;const Ne=()=>{d.removeEventListener(re,or),mt()},or=_r=>{_r.target===d&&++pe>=Gt&&Ne()};setTimeout(()=>{pe(z[Fr]||"").split(", "),J=j(`${Jv}Delay`),mt=j(`${Jv}Duration`),kt=ZC(J,mt),Dt=j(`${Yb}Delay`),Gt=j(`${Yb}Duration`),re=ZC(Dt,Gt);let pe=null,Ne=0,or=0;l===Jv?kt>0&&(pe=Jv,Ne=kt,or=mt.length):l===Yb?re>0&&(pe=Yb,Ne=re,or=Gt.length):(Ne=Math.max(kt,re),pe=Ne>0?kt>re?Jv:Yb:null,or=pe?pe===Jv?mt.length:Gt.length:0);const _r=pe===Jv&&/\b(transform|all)(,|$)/.test(j(`${Jv}Property`).toString());return{type:pe,timeout:Ne,propCount:or,hasTransform:_r}}function ZC(d,l){for(;d.length$C(z)+$C(d[j])))}function $C(d){return d==="auto"?0:Number(d.slice(0,-1).replace(",","."))*1e3}function nA(){return document.body.offsetHeight}function UY(d,l,z){const j=d[c_];j&&(l=(l?[l,...j]:[...j]).join(" ")),l==null?d.removeAttribute("class"):z?d.setAttribute("class",l):d.className=l}const l4=Symbol("_vod"),II=Symbol("_vsh"),Kb={beforeMount(d,{value:l},{transition:z}){d[l4]=d.style.display==="none"?"":d.style.display,z&&l?z.beforeEnter(d):Xb(d,l)},mounted(d,{value:l},{transition:z}){z&&l&&z.enter(d)},updated(d,{value:l,oldValue:z},{transition:j}){!l!=!z&&(j?l?(j.beforeEnter(d),Xb(d,!0),j.enter(d)):j.leave(d,()=>{Xb(d,!1)}):Xb(d,l))},beforeUnmount(d,{value:l}){Xb(d,l)}};function Xb(d,l){d.style.display=l?d[l4]:"none",d[II]=!l}const VY=Symbol(""),HY=/(^|;)\s*display\s*:/;function WY(d,l,z){const j=d.style,J=sd(z);let mt=!1;if(z&&!J){if(l)if(sd(l))for(const kt of l.split(";")){const Dt=kt.slice(0,kt.indexOf(":")).trim();z[Dt]==null&&Z5(j,Dt,"")}else for(const kt in l)z[kt]==null&&Z5(j,kt,"");for(const kt in z)kt==="display"&&(mt=!0),Z5(j,kt,z[kt])}else if(J){if(l!==z){const kt=j[VY];kt&&(z+=";"+kt),j.cssText=z,mt=HY.test(z)}}else l&&d.removeAttribute("style");l4 in d&&(d[l4]=mt?j.display:"",d[II]&&(j.display="none"))}const GC=/\s*!important$/;function Z5(d,l,z){if(ru(z))z.forEach(j=>Z5(d,l,j));else if(z==null&&(z=""),l.startsWith("--"))d.setProperty(l,z);else{const j=qY(d,l);GC.test(z)?d.setProperty(Ey(j),z.replace(GC,""),"important"):d[j]=z}}const YC=["Webkit","Moz","ms"],_8={};function qY(d,l){const z=_8[l];if(z)return z;let j=cm(l);if(j!=="filter"&&j in d)return _8[l]=j;j=k4(j);for(let J=0;Jb8||(YY.then(()=>b8=0),b8=Date.now());function XY(d,l){const z=j=>{if(!j._vts)j._vts=Date.now();else if(j._vts<=z.attached)return;Em(JY(j,z.value),l,5,[j])};return z.value=d,z.attached=KY(),z}function JY(d,l){if(ru(l)){const z=d.stopImmediatePropagation;return d.stopImmediatePropagation=()=>{z.call(d),d._stopped=!0},l.map(j=>J=>!J._stopped&&j&&j(J))}else return l}const eL=d=>d.charCodeAt(0)===111&&d.charCodeAt(1)===110&&d.charCodeAt(2)>96&&d.charCodeAt(2)<123,QY=(d,l,z,j,J,mt)=>{const kt=J==="svg";l==="class"?UY(d,j,kt):l==="style"?WY(d,z,j):_4(l)?EA(l)||$Y(d,l,z,j,mt):(l[0]==="."?(l=l.slice(1),!0):l[0]==="^"?(l=l.slice(1),!1):tK(d,l,j,kt))?(JC(d,l,j),!d.tagName.includes("-")&&(l==="value"||l==="checked"||l==="selected")&&XC(d,l,j,kt,mt,l!=="value")):d._isVueCE&&(/[A-Z]/.test(l)||!sd(j))?JC(d,cm(l),j,mt,l):(l==="true-value"?d._trueValue=j:l==="false-value"&&(d._falseValue=j),XC(d,l,j,kt))};function tK(d,l,z,j){if(j)return!!(l==="innerHTML"||l==="textContent"||l in d&&eL(l)&&Uu(z));if(l==="spellcheck"||l==="draggable"||l==="translate"||l==="autocorrect"||l==="form"||l==="list"&&d.tagName==="INPUT"||l==="type"&&d.tagName==="TEXTAREA")return!1;if(l==="width"||l==="height"){const J=d.tagName;if(J==="IMG"||J==="VIDEO"||J==="CANVAS"||J==="SOURCE")return!1}return eL(l)&&sd(z)?!1:l in d}const OI=new WeakMap,DI=new WeakMap,u4=Symbol("_moveCb"),rL=Symbol("_enterCb"),eK=d=>(delete d.props.mode,d),rK=eK({name:"TransitionGroup",props:op({},CI,{tag:String,moveClass:String}),setup(d,{slots:l}){const z=P4(),j=Yz();let J,mt;return rI(()=>{if(!J.length)return;const kt=d.moveClass||`${d.name||"v"}-move`;if(!sK(J[0].el,z.vnode.el,kt)){J=[];return}J.forEach(iK),J.forEach(aK);const Dt=J.filter(oK);nA(),Dt.forEach(Gt=>{const re=Gt.el,pe=re.style;rg(re,kt),pe.transform=pe.webkitTransform=pe.transitionDuration="";const Ne=re[u4]=or=>{or&&or.target!==re||(!or||/transform$/.test(or.propertyName))&&(re.removeEventListener("transitionend",Ne),re[u4]=null,e1(re,kt))};re.addEventListener("transitionend",Ne)}),J=[]}),()=>{const kt=ju(d),Dt=PI(kt);let Gt=kt.tag||Ou;if(J=[],mt)for(let re=0;re{Dt.split(/\s+/).forEach(Gt=>Gt&&j.classList.remove(Gt))}),z.split(/\s+/).forEach(Dt=>Dt&&j.classList.add(Dt)),j.style.display="none";const mt=l.nodeType===1?l:l.parentNode;mt.appendChild(j);const{hasTransform:kt}=zI(j);return mt.removeChild(j),kt}const h_=d=>{const l=d.props["onUpdate:modelValue"]||!1;return ru(l)?z=>U5(l,z):l};function lK(d){d.target.composing=!0}function nL(d){const l=d.target;l.composing&&(l.composing=!1,l.dispatchEvent(new Event("input")))}const rv=Symbol("_assign"),$A={created(d,{modifiers:{lazy:l,trim:z,number:j}},J){d[rv]=h_(J);const mt=j||J.props&&J.props.type==="number";s1(d,l?"change":"input",kt=>{if(kt.target.composing)return;let Dt=d.value;z&&(Dt=Dt.trim()),mt&&(Dt=Q5(Dt)),d[rv](Dt)}),z&&s1(d,"change",()=>{d.value=d.value.trim()}),l||(s1(d,"compositionstart",lK),s1(d,"compositionend",nL),s1(d,"change",nL))},mounted(d,{value:l}){d.value=l??""},beforeUpdate(d,{value:l,oldValue:z,modifiers:{lazy:j,trim:J,number:mt}},kt){if(d[rv]=h_(kt),d.composing)return;const Dt=(mt||d.type==="number")&&!/^0\d/.test(d.value)?Q5(d.value):d.value,Gt=l??"";Dt!==Gt&&(document.activeElement===d&&d.type!=="range"&&(j&&l===z||J&&d.value.trim()===Gt)||(d.value=Gt))}},F2={created(d,{value:l},z){d.checked=u_(l,z.props.value),d[rv]=h_(z),s1(d,"change",()=>{d[rv](R2(d))})},beforeUpdate(d,{value:l,oldValue:z},j){d[rv]=h_(j),l!==z&&(d.checked=u_(l,j.props.value))}},iA={deep:!0,created(d,{value:l,modifiers:{number:z}},j){const J=b4(l);s1(d,"change",()=>{const mt=Array.prototype.filter.call(d.options,kt=>kt.selected).map(kt=>z?Q5(R2(kt)):R2(kt));d[rv](d.multiple?J?new Set(mt):mt:mt[0]),d._assigning=!0,Z0(()=>{d._assigning=!1})}),d[rv]=h_(j)},mounted(d,{value:l}){iL(d,l)},beforeUpdate(d,l,z){d[rv]=h_(z)},updated(d,{value:l}){d._assigning||iL(d,l)}};function iL(d,l){const z=d.multiple,j=ru(l);if(!(z&&!j&&!b4(l))){for(let J=0,mt=d.options.length;JString(re)===String(Dt)):kt.selected=Q$(l,Dt)>-1}else kt.selected=l.has(Dt);else if(u_(R2(kt),l)){d.selectedIndex!==J&&(d.selectedIndex=J);return}}!z&&d.selectedIndex!==-1&&(d.selectedIndex=-1)}}function R2(d){return"_value"in d?d._value:d.value}const uK=["ctrl","shift","alt","meta"],cK={stop:d=>d.stopPropagation(),prevent:d=>d.preventDefault(),self:d=>d.target!==d.currentTarget,ctrl:d=>!d.ctrlKey,shift:d=>!d.shiftKey,alt:d=>!d.altKey,meta:d=>!d.metaKey,left:d=>"button"in d&&d.button!==0,middle:d=>"button"in d&&d.button!==1,right:d=>"button"in d&&d.button!==2,exact:(d,l)=>uK.some(z=>d[`${z}Key`]&&!l.includes(z))},hg=(d,l)=>{const z=d._withMods||(d._withMods={}),j=l.join(".");return z[j]||(z[j]=(J,...mt)=>{for(let kt=0;kt{const l=fK().createApp(...d),{mount:z}=l;return l.mount=j=>{const J=mK(j);if(!J)return;const mt=l._component;!Uu(mt)&&!mt.render&&!mt.template&&(mt.template=J.innerHTML),J.nodeType===1&&(J.textContent="");const kt=z(J,!1,pK(J));return J instanceof Element&&(J.removeAttribute("v-cloak"),J.setAttribute("data-v-app","")),kt},l};function pK(d){if(d instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&d instanceof MathMLElement)return"mathml"}function mK(d){return sd(d)?document.querySelector(d):d}/*! + * pinia v3.0.4 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */let FI;const I4=d=>FI=d,RI=Symbol();function aA(d){return d&&typeof d=="object"&&Object.prototype.toString.call(d)==="[object Object]"&&typeof d.toJSON!="function"}var w2;(function(d){d.direct="direct",d.patchObject="patch object",d.patchFunction="patch function"})(w2||(w2={}));function gK(){const d=xz(!0),l=d.run(()=>lo({}));let z=[],j=[];const J=BA({install(mt){I4(J),J._a=mt,mt.provide(RI,J),mt.config.globalProperties.$pinia=J,j.forEach(kt=>z.push(kt)),j=[]},use(mt){return this._a?z.push(mt):j.push(mt),this},_p:z,_a:null,_e:d,_s:new Map,state:l});return J}const BI=()=>{};function oL(d,l,z,j=BI){d.add(l);const J=()=>{d.delete(l)&&j()};return!z&&_z()&&tG(J),J}function Kx(d,...l){d.forEach(z=>{z(...l)})}const vK=d=>d(),sL=Symbol(),w8=Symbol();function oA(d,l){d instanceof Map&&l instanceof Map?l.forEach((z,j)=>d.set(j,z)):d instanceof Set&&l instanceof Set&&l.forEach(d.add,d);for(const z in l){if(!l.hasOwnProperty(z))continue;const j=l[z],J=d[z];aA(J)&&aA(j)&&d.hasOwnProperty(z)&&!Ud(j)&&!d1(j)?d[z]=oA(J,j):d[z]=j}return d}const yK=Symbol();function xK(d){return!aA(d)||!Object.prototype.hasOwnProperty.call(d,yK)}const{assign:r1}=Object;function _K(d){return!!(Ud(d)&&d.effect)}function bK(d,l,z,j){const{state:J,actions:mt,getters:kt}=l,Dt=z.state.value[d];let Gt;function re(){Dt||(z.state.value[d]=J?J():{});const pe=kG(z.state.value[d]);return r1(pe,mt,Object.keys(kt||{}).reduce((Ne,or)=>(Ne[or]=BA(Yo(()=>{I4(z);const _r=z._s.get(d);return kt[or].call(_r,_r)})),Ne),{}))}return Gt=NI(d,re,l,z,j,!0),Gt}function NI(d,l,z={},j,J,mt){let kt;const Dt=r1({actions:{}},z),Gt={deep:!0};let re,pe,Ne=new Set,or=new Set,_r;const Fr=j.state.value[d];!mt&&!Fr&&(j.state.value[d]={}),lo({});let zr;function Wr(Gi){let un;re=pe=!1,typeof Gi=="function"?(Gi(j.state.value[d]),un={type:w2.patchFunction,storeId:d,events:_r}):(oA(j.state.value[d],Gi),un={type:w2.patchObject,payload:Gi,storeId:d,events:_r});const ia=zr=Symbol();Z0().then(()=>{zr===ia&&(re=!0)}),pe=!0,Kx(Ne,un,j.state.value[d])}const An=mt?function(){const{state:un}=z,ia=un?un():{};this.$patch(fa=>{r1(fa,ia)})}:BI;function Ft(){kt.stop(),Ne.clear(),or.clear(),j._s.delete(d)}const kn=(Gi,un="")=>{if(sL in Gi)return Gi[w8]=un,Gi;const ia=function(){I4(j);const fa=Array.from(arguments),Li=new Set,yi=new Set;function ra(Ei){Li.add(Ei)}function Da(Ei){yi.add(Ei)}Kx(or,{args:fa,name:ia[w8],store:jn,after:ra,onError:Da});let Ni;try{Ni=Gi.apply(this&&this.$id===d?this:jn,fa)}catch(Ei){throw Kx(yi,Ei),Ei}return Ni instanceof Promise?Ni.then(Ei=>(Kx(Li,Ei),Ei)).catch(Ei=>(Kx(yi,Ei),Promise.reject(Ei))):(Kx(Li,Ni),Ni)};return ia[sL]=!0,ia[w8]=un,ia},ei={_p:j,$id:d,$onAction:oL.bind(null,or),$patch:Wr,$reset:An,$subscribe(Gi,un={}){const ia=oL(Ne,Gi,un.detached,()=>fa()),fa=kt.run(()=>um(()=>j.state.value[d],Li=>{(un.flush==="sync"?pe:re)&&Gi({storeId:d,type:w2.direct,events:_r},Li)},r1({},Gt,un)));return ia},$dispose:Ft},jn=ky(ei);j._s.set(d,jn);const Qi=(j._a&&j._a.runWithContext||vK)(()=>j._e.run(()=>(kt=xz()).run(()=>l({action:kn}))));for(const Gi in Qi){const un=Qi[Gi];if(Ud(un)&&!_K(un)||d1(un))mt||(Fr&&xK(un)&&(Ud(un)?un.value=Fr[Gi]:oA(un,Fr[Gi])),j.state.value[d][Gi]=un);else if(typeof un=="function"){const ia=kn(un,Gi);Qi[Gi]=ia,Dt.actions[Gi]=un}}return r1(jn,Qi),r1(ju(jn),Qi),Object.defineProperty(jn,"$state",{get:()=>j.state.value[d],set:Gi=>{Wr(un=>{r1(un,Gi)})}}),j._p.forEach(Gi=>{r1(jn,kt.run(()=>Gi({store:jn,app:j._a,pinia:j,options:Dt})))}),Fr&&mt&&z.hydrate&&z.hydrate(jn.$state,Fr),re=!0,pe=!0,jn}/*! #__NO_SIDE_EFFECTS__ */function GA(d,l,z){let j;const J=typeof l=="function";j=J?z:l;function mt(kt,Dt){const Gt=tY();return kt=kt||(Gt?lm(RI,null):null),kt&&I4(kt),kt=FI,kt._s.has(d)||(J?NI(d,l,j,kt):bK(d,j,kt)),kt._s.get(d)}return mt.$id=d,mt}/*! + * vue-router v4.6.3 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */const e_=typeof document<"u";function jI(d){return typeof d=="object"||"displayName"in d||"props"in d||"__vccOpts"in d}function wK(d){return d.__esModule||d[Symbol.toStringTag]==="Module"||d.default&&jI(d.default)}const Dh=Object.assign;function k8(d,l){const z={};for(const j in l){const J=l[j];z[j]=Cm(J)?J.map(d):d(J)}return z}const k2=()=>{},Cm=Array.isArray;function lL(d,l){const z={};for(const j in d)z[j]=j in l?l[j]:d[j];return z}const UI=/#/g,kK=/&/g,TK=/\//g,AK=/=/g,MK=/\?/g,VI=/\+/g,SK=/%5B/g,EK=/%5D/g,HI=/%5E/g,CK=/%60/g,WI=/%7B/g,LK=/%7C/g,qI=/%7D/g,PK=/%20/g;function YA(d){return d==null?"":encodeURI(""+d).replace(LK,"|").replace(SK,"[").replace(EK,"]")}function zK(d){return YA(d).replace(WI,"{").replace(qI,"}").replace(HI,"^")}function sA(d){return YA(d).replace(VI,"%2B").replace(PK,"+").replace(UI,"%23").replace(kK,"%26").replace(CK,"`").replace(WI,"{").replace(qI,"}").replace(HI,"^")}function IK(d){return sA(d).replace(AK,"%3D")}function OK(d){return YA(d).replace(UI,"%23").replace(MK,"%3F")}function DK(d){return OK(d).replace(TK,"%2F")}function B2(d){if(d==null)return null;try{return decodeURIComponent(""+d)}catch{}return""+d}const FK=/\/$/,RK=d=>d.replace(FK,"");function T8(d,l,z="/"){let j,J={},mt="",kt="";const Dt=l.indexOf("#");let Gt=l.indexOf("?");return Gt=Dt>=0&&Gt>Dt?-1:Gt,Gt>=0&&(j=l.slice(0,Gt),mt=l.slice(Gt,Dt>0?Dt:l.length),J=d(mt.slice(1))),Dt>=0&&(j=j||l.slice(0,Dt),kt=l.slice(Dt,l.length)),j=UK(j??l,z),{fullPath:j+mt+kt,path:j,query:J,hash:B2(kt)}}function BK(d,l){const z=l.query?d(l.query):"";return l.path+(z&&"?")+z+(l.hash||"")}function uL(d,l){return!l||!d.toLowerCase().startsWith(l.toLowerCase())?d:d.slice(l.length)||"/"}function NK(d,l,z){const j=l.matched.length-1,J=z.matched.length-1;return j>-1&&j===J&&f_(l.matched[j],z.matched[J])&&ZI(l.params,z.params)&&d(l.query)===d(z.query)&&l.hash===z.hash}function f_(d,l){return(d.aliasOf||d)===(l.aliasOf||l)}function ZI(d,l){if(Object.keys(d).length!==Object.keys(l).length)return!1;for(const z in d)if(!jK(d[z],l[z]))return!1;return!0}function jK(d,l){return Cm(d)?cL(d,l):Cm(l)?cL(l,d):d===l}function cL(d,l){return Cm(l)?d.length===l.length&&d.every((z,j)=>z===l[j]):d.length===1&&d[0]===l}function UK(d,l){if(d.startsWith("/"))return d;if(!d)return l;const z=l.split("/"),j=d.split("/"),J=j[j.length-1];(J===".."||J===".")&&j.push("");let mt=z.length-1,kt,Dt;for(kt=0;kt1&&mt--;else break;return z.slice(0,mt).join("/")+"/"+j.slice(kt).join("/")}const Qv={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let lA=function(d){return d.pop="pop",d.push="push",d}({}),A8=function(d){return d.back="back",d.forward="forward",d.unknown="",d}({});function VK(d){if(!d)if(e_){const l=document.querySelector("base");d=l&&l.getAttribute("href")||"/",d=d.replace(/^\w+:\/\/[^\/]+/,"")}else d="/";return d[0]!=="/"&&d[0]!=="#"&&(d="/"+d),RK(d)}const HK=/^[^#]+#/;function WK(d,l){return d.replace(HK,"#")+l}function qK(d,l){const z=document.documentElement.getBoundingClientRect(),j=d.getBoundingClientRect();return{behavior:l.behavior,left:j.left-z.left-(l.left||0),top:j.top-z.top-(l.top||0)}}const O4=()=>({left:window.scrollX,top:window.scrollY});function ZK(d){let l;if("el"in d){const z=d.el,j=typeof z=="string"&&z.startsWith("#"),J=typeof z=="string"?j?document.getElementById(z.slice(1)):document.querySelector(z):z;if(!J)return;l=qK(J,d)}else l=d;"scrollBehavior"in document.documentElement.style?window.scrollTo(l):window.scrollTo(l.left!=null?l.left:window.scrollX,l.top!=null?l.top:window.scrollY)}function hL(d,l){return(history.state?history.state.position-l:-1)+d}const uA=new Map;function $K(d,l){uA.set(d,l)}function GK(d){const l=uA.get(d);return uA.delete(d),l}function YK(d){return typeof d=="string"||d&&typeof d=="object"}function $I(d){return typeof d=="string"||typeof d=="symbol"}let xd=function(d){return d[d.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",d[d.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",d[d.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",d[d.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",d[d.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",d}({});const GI=Symbol("");xd.MATCHER_NOT_FOUND+"",xd.NAVIGATION_GUARD_REDIRECT+"",xd.NAVIGATION_ABORTED+"",xd.NAVIGATION_CANCELLED+"",xd.NAVIGATION_DUPLICATED+"";function d_(d,l){return Dh(new Error,{type:d,[GI]:!0},l)}function qg(d,l){return d instanceof Error&&GI in d&&(l==null||!!(d.type&l))}const KK=["params","query","hash"];function XK(d){if(typeof d=="string")return d;if(d.path!=null)return d.path;const l={};for(const z of KK)z in d&&(l[z]=d[z]);return JSON.stringify(l,null,2)}function JK(d){const l={};if(d===""||d==="?")return l;const z=(d[0]==="?"?d.slice(1):d).split("&");for(let j=0;jJ&&sA(J)):[j&&sA(j)]).forEach(J=>{J!==void 0&&(l+=(l.length?"&":"")+z,J!=null&&(l+="="+J))})}return l}function QK(d){const l={};for(const z in d){const j=d[z];j!==void 0&&(l[z]=Cm(j)?j.map(J=>J==null?null:""+J):j==null?j:""+j)}return l}const tX=Symbol(""),dL=Symbol(""),D4=Symbol(""),KA=Symbol(""),cA=Symbol("");function Jb(){let d=[];function l(j){return d.push(j),()=>{const J=d.indexOf(j);J>-1&&d.splice(J,1)}}function z(){d=[]}return{add:l,list:()=>d.slice(),reset:z}}function o1(d,l,z,j,J,mt=kt=>kt()){const kt=j&&(j.enterCallbacks[J]=j.enterCallbacks[J]||[]);return()=>new Promise((Dt,Gt)=>{const re=or=>{or===!1?Gt(d_(xd.NAVIGATION_ABORTED,{from:z,to:l})):or instanceof Error?Gt(or):YK(or)?Gt(d_(xd.NAVIGATION_GUARD_REDIRECT,{from:l,to:or})):(kt&&j.enterCallbacks[J]===kt&&typeof or=="function"&&kt.push(or),Dt())},pe=mt(()=>d.call(j&&j.instances[J],l,z,re));let Ne=Promise.resolve(pe);d.length<3&&(Ne=Ne.then(re)),Ne.catch(or=>Gt(or))})}function M8(d,l,z,j,J=mt=>mt()){const mt=[];for(const kt of d)for(const Dt in kt.components){let Gt=kt.components[Dt];if(!(l!=="beforeRouteEnter"&&!kt.instances[Dt]))if(jI(Gt)){const re=(Gt.__vccOpts||Gt)[l];re&&mt.push(o1(re,z,j,kt,Dt,J))}else{let re=Gt();mt.push(()=>re.then(pe=>{if(!pe)throw new Error(`Couldn't resolve component "${Dt}" at "${kt.path}"`);const Ne=wK(pe)?pe.default:pe;kt.mods[Dt]=pe,kt.components[Dt]=Ne;const or=(Ne.__vccOpts||Ne)[l];return or&&o1(or,z,j,kt,Dt,J)()}))}}return mt}function eX(d,l){const z=[],j=[],J=[],mt=Math.max(l.matched.length,d.matched.length);for(let kt=0;ktf_(re,Dt))?j.push(Dt):z.push(Dt));const Gt=d.matched[kt];Gt&&(l.matched.find(re=>f_(re,Gt))||J.push(Gt))}return[z,j,J]}/*! + * vue-router v4.6.3 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */let rX=()=>location.protocol+"//"+location.host;function YI(d,l){const{pathname:z,search:j,hash:J}=l,mt=d.indexOf("#");if(mt>-1){let kt=J.includes(d.slice(mt))?d.slice(mt).length:1,Dt=J.slice(kt);return Dt[0]!=="/"&&(Dt="/"+Dt),uL(Dt,"")}return uL(z,d)+j+J}function nX(d,l,z,j){let J=[],mt=[],kt=null;const Dt=({state:or})=>{const _r=YI(d,location),Fr=z.value,zr=l.value;let Wr=0;if(or){if(z.value=_r,l.value=or,kt&&kt===Fr){kt=null;return}Wr=zr?or.position-zr.position:0}else j(_r);J.forEach(An=>{An(z.value,Fr,{delta:Wr,type:lA.pop,direction:Wr?Wr>0?A8.forward:A8.back:A8.unknown})})};function Gt(){kt=z.value}function re(or){J.push(or);const _r=()=>{const Fr=J.indexOf(or);Fr>-1&&J.splice(Fr,1)};return mt.push(_r),_r}function pe(){if(document.visibilityState==="hidden"){const{history:or}=window;if(!or.state)return;or.replaceState(Dh({},or.state,{scroll:O4()}),"")}}function Ne(){for(const or of mt)or();mt=[],window.removeEventListener("popstate",Dt),window.removeEventListener("pagehide",pe),document.removeEventListener("visibilitychange",pe)}return window.addEventListener("popstate",Dt),window.addEventListener("pagehide",pe),document.addEventListener("visibilitychange",pe),{pauseListeners:Gt,listen:re,destroy:Ne}}function pL(d,l,z,j=!1,J=!1){return{back:d,current:l,forward:z,replaced:j,position:window.history.length,scroll:J?O4():null}}function iX(d){const{history:l,location:z}=window,j={value:YI(d,z)},J={value:l.state};J.value||mt(j.value,{back:null,current:j.value,forward:null,position:l.length-1,replaced:!0,scroll:null},!0);function mt(Gt,re,pe){const Ne=d.indexOf("#"),or=Ne>-1?(z.host&&document.querySelector("base")?d:d.slice(Ne))+Gt:rX()+d+Gt;try{l[pe?"replaceState":"pushState"](re,"",or),J.value=re}catch(_r){console.error(_r),z[pe?"replace":"assign"](or)}}function kt(Gt,re){mt(Gt,Dh({},l.state,pL(J.value.back,Gt,J.value.forward,!0),re,{position:J.value.position}),!0),j.value=Gt}function Dt(Gt,re){const pe=Dh({},J.value,l.state,{forward:Gt,scroll:O4()});mt(pe.current,pe,!0),mt(Gt,Dh({},pL(j.value,Gt,null),{position:pe.position+1},re),!1),j.value=Gt}return{location:j,state:J,push:Dt,replace:kt}}function aX(d){d=VK(d);const l=iX(d),z=nX(d,l.state,l.location,l.replace);function j(mt,kt=!0){kt||z.pauseListeners(),history.go(mt)}const J=Dh({location:"",base:d,go:j,createHref:WK.bind(null,d)},l,z);return Object.defineProperty(J,"location",{enumerable:!0,get:()=>l.location.value}),Object.defineProperty(J,"state",{enumerable:!0,get:()=>l.state.value}),J}let gy=function(d){return d[d.Static=0]="Static",d[d.Param=1]="Param",d[d.Group=2]="Group",d}({});var ip=function(d){return d[d.Static=0]="Static",d[d.Param=1]="Param",d[d.ParamRegExp=2]="ParamRegExp",d[d.ParamRegExpEnd=3]="ParamRegExpEnd",d[d.EscapeNext=4]="EscapeNext",d}(ip||{});const oX={type:gy.Static,value:""},sX=/[a-zA-Z0-9_]/;function lX(d){if(!d)return[[]];if(d==="/")return[[oX]];if(!d.startsWith("/"))throw new Error(`Invalid path "${d}"`);function l(_r){throw new Error(`ERR (${z})/"${re}": ${_r}`)}let z=ip.Static,j=z;const J=[];let mt;function kt(){mt&&J.push(mt),mt=[]}let Dt=0,Gt,re="",pe="";function Ne(){re&&(z===ip.Static?mt.push({type:gy.Static,value:re}):z===ip.Param||z===ip.ParamRegExp||z===ip.ParamRegExpEnd?(mt.length>1&&(Gt==="*"||Gt==="+")&&l(`A repeatable param (${re}) must be alone in its segment. eg: '/:ids+.`),mt.push({type:gy.Param,value:re,regexp:pe,repeatable:Gt==="*"||Gt==="+",optional:Gt==="*"||Gt==="?"})):l("Invalid state to consume buffer"),re="")}function or(){re+=Gt}for(;Dtl.length?l.length===1&&l[0]===h0.Static+h0.Segment?1:-1:0}function KI(d,l){let z=0;const j=d.score,J=l.score;for(;z0&&l[l.length-1]<0}const dX={strict:!1,end:!0,sensitive:!1};function pX(d,l,z){const j=hX(lX(d.path),z),J=Dh(j,{record:d,parent:l,children:[],alias:[]});return l&&!J.record.aliasOf==!l.record.aliasOf&&l.children.push(J),J}function mX(d,l){const z=[],j=new Map;l=lL(dX,l);function J(Ne){return j.get(Ne)}function mt(Ne,or,_r){const Fr=!_r,zr=yL(Ne);zr.aliasOf=_r&&_r.record;const Wr=lL(l,Ne),An=[zr];if("alias"in Ne){const ei=typeof Ne.alias=="string"?[Ne.alias]:Ne.alias;for(const jn of ei)An.push(yL(Dh({},zr,{components:_r?_r.record.components:zr.components,path:jn,aliasOf:_r?_r.record:zr})))}let Ft,kn;for(const ei of An){const{path:jn}=ei;if(or&&jn[0]!=="/"){const ai=or.record.path,Qi=ai[ai.length-1]==="/"?"":"/";ei.path=or.record.path+(jn&&Qi+jn)}if(Ft=pX(ei,or,Wr),_r?_r.alias.push(Ft):(kn=kn||Ft,kn!==Ft&&kn.alias.push(Ft),Fr&&Ne.name&&!xL(Ft)&&kt(Ne.name)),XI(Ft)&&Gt(Ft),zr.children){const ai=zr.children;for(let Qi=0;Qi{kt(kn)}:k2}function kt(Ne){if($I(Ne)){const or=j.get(Ne);or&&(j.delete(Ne),z.splice(z.indexOf(or),1),or.children.forEach(kt),or.alias.forEach(kt))}else{const or=z.indexOf(Ne);or>-1&&(z.splice(or,1),Ne.record.name&&j.delete(Ne.record.name),Ne.children.forEach(kt),Ne.alias.forEach(kt))}}function Dt(){return z}function Gt(Ne){const or=yX(Ne,z);z.splice(or,0,Ne),Ne.record.name&&!xL(Ne)&&j.set(Ne.record.name,Ne)}function re(Ne,or){let _r,Fr={},zr,Wr;if("name"in Ne&&Ne.name){if(_r=j.get(Ne.name),!_r)throw d_(xd.MATCHER_NOT_FOUND,{location:Ne});Wr=_r.record.name,Fr=Dh(vL(or.params,_r.keys.filter(kn=>!kn.optional).concat(_r.parent?_r.parent.keys.filter(kn=>kn.optional):[]).map(kn=>kn.name)),Ne.params&&vL(Ne.params,_r.keys.map(kn=>kn.name))),zr=_r.stringify(Fr)}else if(Ne.path!=null)zr=Ne.path,_r=z.find(kn=>kn.re.test(zr)),_r&&(Fr=_r.parse(zr),Wr=_r.record.name);else{if(_r=or.name?j.get(or.name):z.find(kn=>kn.re.test(or.path)),!_r)throw d_(xd.MATCHER_NOT_FOUND,{location:Ne,currentLocation:or});Wr=_r.record.name,Fr=Dh({},or.params,Ne.params),zr=_r.stringify(Fr)}const An=[];let Ft=_r;for(;Ft;)An.unshift(Ft.record),Ft=Ft.parent;return{name:Wr,path:zr,params:Fr,matched:An,meta:vX(An)}}d.forEach(Ne=>mt(Ne));function pe(){z.length=0,j.clear()}return{addRoute:mt,resolve:re,removeRoute:kt,clearRoutes:pe,getRoutes:Dt,getRecordMatcher:J}}function vL(d,l){const z={};for(const j of l)j in d&&(z[j]=d[j]);return z}function yL(d){const l={path:d.path,redirect:d.redirect,name:d.name,meta:d.meta||{},aliasOf:d.aliasOf,beforeEnter:d.beforeEnter,props:gX(d),children:d.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in d?d.components||null:d.component&&{default:d.component}};return Object.defineProperty(l,"mods",{value:{}}),l}function gX(d){const l={},z=d.props||!1;if("component"in d)l.default=z;else for(const j in d.components)l[j]=typeof z=="object"?z[j]:z;return l}function xL(d){for(;d;){if(d.record.aliasOf)return!0;d=d.parent}return!1}function vX(d){return d.reduce((l,z)=>Dh(l,z.meta),{})}function yX(d,l){let z=0,j=l.length;for(;z!==j;){const mt=z+j>>1;KI(d,l[mt])<0?j=mt:z=mt+1}const J=xX(d);return J&&(j=l.lastIndexOf(J,j-1)),j}function xX(d){let l=d;for(;l=l.parent;)if(XI(l)&&KI(d,l)===0)return l}function XI({record:d}){return!!(d.name||d.components&&Object.keys(d.components).length||d.redirect)}function _L(d){const l=lm(D4),z=lm(KA),j=Yo(()=>{const Gt=Ju(d.to);return l.resolve(Gt)}),J=Yo(()=>{const{matched:Gt}=j.value,{length:re}=Gt,pe=Gt[re-1],Ne=z.matched;if(!pe||!Ne.length)return-1;const or=Ne.findIndex(f_.bind(null,pe));if(or>-1)return or;const _r=bL(Gt[re-2]);return re>1&&bL(pe)===_r&&Ne[Ne.length-1].path!==_r?Ne.findIndex(f_.bind(null,Gt[re-2])):or}),mt=Yo(()=>J.value>-1&&TX(z.params,j.value.params)),kt=Yo(()=>J.value>-1&&J.value===z.matched.length-1&&ZI(z.params,j.value.params));function Dt(Gt={}){if(kX(Gt)){const re=l[Ju(d.replace)?"replace":"push"](Ju(d.to)).catch(k2);return d.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>re),re}return Promise.resolve()}return{route:j,href:Yo(()=>j.value.href),isActive:mt,isExactActive:kt,navigate:Dt}}function _X(d){return d.length===1?d[0]:d}const bX=Th({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:_L,setup(d,{slots:l}){const z=ky(_L(d)),{options:j}=lm(D4),J=Yo(()=>({[wL(d.activeClass,j.linkActiveClass,"router-link-active")]:z.isActive,[wL(d.exactActiveClass,j.linkExactActiveClass,"router-link-exact-active")]:z.isExactActive}));return()=>{const mt=l.default&&_X(l.default(z));return d.custom?mt:ZA("a",{"aria-current":z.isExactActive?d.ariaCurrentValue:null,href:z.href,onClick:z.navigate,class:J.value},mt)}}}),wX=bX;function kX(d){if(!(d.metaKey||d.altKey||d.ctrlKey||d.shiftKey)&&!d.defaultPrevented&&!(d.button!==void 0&&d.button!==0)){if(d.currentTarget&&d.currentTarget.getAttribute){const l=d.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(l))return}return d.preventDefault&&d.preventDefault(),!0}}function TX(d,l){for(const z in l){const j=l[z],J=d[z];if(typeof j=="string"){if(j!==J)return!1}else if(!Cm(J)||J.length!==j.length||j.some((mt,kt)=>mt!==J[kt]))return!1}return!0}function bL(d){return d?d.aliasOf?d.aliasOf.path:d.path:""}const wL=(d,l,z)=>d??l??z,AX=Th({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(d,{attrs:l,slots:z}){const j=lm(cA),J=Yo(()=>d.route||j.value),mt=lm(dL,0),kt=Yo(()=>{let re=Ju(mt);const{matched:pe}=J.value;let Ne;for(;(Ne=pe[re])&&!Ne.components;)re++;return re}),Dt=Yo(()=>J.value.matched[kt.value]);H5(dL,Yo(()=>kt.value+1)),H5(tX,Dt),H5(cA,J);const Gt=lo();return um(()=>[Gt.value,Dt.value,d.name],([re,pe,Ne],[or,_r,Fr])=>{pe&&(pe.instances[Ne]=re,_r&&_r!==pe&&re&&re===or&&(pe.leaveGuards.size||(pe.leaveGuards=_r.leaveGuards),pe.updateGuards.size||(pe.updateGuards=_r.updateGuards))),re&&pe&&(!_r||!f_(pe,_r)||!or)&&(pe.enterCallbacks[Ne]||[]).forEach(zr=>zr(re))},{flush:"post"}),()=>{const re=J.value,pe=d.name,Ne=Dt.value,or=Ne&&Ne.components[pe];if(!or)return kL(z.default,{Component:or,route:re});const _r=Ne.props[pe],Fr=_r?_r===!0?re.params:typeof _r=="function"?_r(re):_r:null,Wr=ZA(or,Dh({},Fr,l,{onVnodeUnmounted:An=>{An.component.isUnmounted&&(Ne.instances[pe]=null)},ref:Gt}));return kL(z.default,{Component:Wr,route:re})||Wr}}});function kL(d,l){if(!d)return null;const z=d(l);return z.length===1?z[0]:z}const MX=AX;function SX(d){const l=mX(d.routes,d),z=d.parseQuery||JK,j=d.stringifyQuery||fL,J=d.history,mt=Jb(),kt=Jb(),Dt=Jb(),Gt=_G(Qv);let re=Qv;e_&&d.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const pe=k8.bind(null,Ea=>""+Ea),Ne=k8.bind(null,DK),or=k8.bind(null,B2);function _r(Ea,go){let Ao,Ps;return $I(Ea)?(Ao=l.getRecordMatcher(Ea),Ps=go):Ps=Ea,l.addRoute(Ps,Ao)}function Fr(Ea){const go=l.getRecordMatcher(Ea);go&&l.removeRoute(go)}function zr(){return l.getRoutes().map(Ea=>Ea.record)}function Wr(Ea){return!!l.getRecordMatcher(Ea)}function An(Ea,go){if(go=Dh({},go||Gt.value),typeof Ea=="string"){const li=T8(z,Ea,go.path),co=l.resolve({path:li.path},go),vo=J.createHref(li.fullPath);return Dh(li,co,{params:or(co.params),hash:B2(li.hash),redirectedFrom:void 0,href:vo})}let Ao;if(Ea.path!=null)Ao=Dh({},Ea,{path:T8(z,Ea.path,go.path).path});else{const li=Dh({},Ea.params);for(const co in li)li[co]==null&&delete li[co];Ao=Dh({},Ea,{params:Ne(li)}),go.params=Ne(go.params)}const Ps=l.resolve(Ao,go),$o=Ea.hash||"";Ps.params=pe(or(Ps.params));const gi=BK(j,Dh({},Ea,{hash:zK($o),path:Ps.path})),bi=J.createHref(gi);return Dh({fullPath:gi,hash:$o,query:j===fL?QK(Ea.query):Ea.query||{}},Ps,{redirectedFrom:void 0,href:bi})}function Ft(Ea){return typeof Ea=="string"?T8(z,Ea,Gt.value.path):Dh({},Ea)}function kn(Ea,go){if(re!==Ea)return d_(xd.NAVIGATION_CANCELLED,{from:go,to:Ea})}function ei(Ea){return Qi(Ea)}function jn(Ea){return ei(Dh(Ft(Ea),{replace:!0}))}function ai(Ea,go){const Ao=Ea.matched[Ea.matched.length-1];if(Ao&&Ao.redirect){const{redirect:Ps}=Ao;let $o=typeof Ps=="function"?Ps(Ea,go):Ps;return typeof $o=="string"&&($o=$o.includes("?")||$o.includes("#")?$o=Ft($o):{path:$o},$o.params={}),Dh({query:Ea.query,hash:Ea.hash,params:$o.path!=null?{}:Ea.params},$o)}}function Qi(Ea,go){const Ao=re=An(Ea),Ps=Gt.value,$o=Ea.state,gi=Ea.force,bi=Ea.replace===!0,li=ai(Ao,Ps);if(li)return Qi(Dh(Ft(li),{state:typeof li=="object"?Dh({},$o,li.state):$o,force:gi,replace:bi}),go||Ao);const co=Ao;co.redirectedFrom=go;let vo;return!gi&&NK(j,Ps,Ao)&&(vo=d_(xd.NAVIGATION_DUPLICATED,{to:co,from:Ps}),ko(Ps,Ps,!0,!1)),(vo?Promise.resolve(vo):ia(co,Ps)).catch(yo=>qg(yo)?qg(yo,xd.NAVIGATION_GUARD_REDIRECT)?yo:mo(yo):Va(yo,co,Ps)).then(yo=>{if(yo){if(qg(yo,xd.NAVIGATION_GUARD_REDIRECT))return Qi(Dh({replace:bi},Ft(yo.to),{state:typeof yo.to=="object"?Dh({},$o,yo.to.state):$o,force:gi}),go||co)}else yo=Li(co,Ps,!0,bi,$o);return fa(co,Ps,yo),yo})}function Gi(Ea,go){const Ao=kn(Ea,go);return Ao?Promise.reject(Ao):Promise.resolve()}function un(Ea){const go=qo.values().next().value;return go&&typeof go.runWithContext=="function"?go.runWithContext(Ea):Ea()}function ia(Ea,go){let Ao;const[Ps,$o,gi]=eX(Ea,go);Ao=M8(Ps.reverse(),"beforeRouteLeave",Ea,go);for(const li of Ps)li.leaveGuards.forEach(co=>{Ao.push(o1(co,Ea,go))});const bi=Gi.bind(null,Ea,go);return Ao.push(bi),Ta(Ao).then(()=>{Ao=[];for(const li of mt.list())Ao.push(o1(li,Ea,go));return Ao.push(bi),Ta(Ao)}).then(()=>{Ao=M8($o,"beforeRouteUpdate",Ea,go);for(const li of $o)li.updateGuards.forEach(co=>{Ao.push(o1(co,Ea,go))});return Ao.push(bi),Ta(Ao)}).then(()=>{Ao=[];for(const li of gi)if(li.beforeEnter)if(Cm(li.beforeEnter))for(const co of li.beforeEnter)Ao.push(o1(co,Ea,go));else Ao.push(o1(li.beforeEnter,Ea,go));return Ao.push(bi),Ta(Ao)}).then(()=>(Ea.matched.forEach(li=>li.enterCallbacks={}),Ao=M8(gi,"beforeRouteEnter",Ea,go,un),Ao.push(bi),Ta(Ao))).then(()=>{Ao=[];for(const li of kt.list())Ao.push(o1(li,Ea,go));return Ao.push(bi),Ta(Ao)}).catch(li=>qg(li,xd.NAVIGATION_CANCELLED)?li:Promise.reject(li))}function fa(Ea,go,Ao){Dt.list().forEach(Ps=>un(()=>Ps(Ea,go,Ao)))}function Li(Ea,go,Ao,Ps,$o){const gi=kn(Ea,go);if(gi)return gi;const bi=go===Qv,li=e_?history.state:{};Ao&&(Ps||bi?J.replace(Ea.fullPath,Dh({scroll:bi&&li&&li.scroll},$o)):J.push(Ea.fullPath,$o)),Gt.value=Ea,ko(Ea,go,Ao,bi),mo()}let yi;function ra(){yi||(yi=J.listen((Ea,go,Ao)=>{if(!fo.listening)return;const Ps=An(Ea),$o=ai(Ps,fo.currentRoute.value);if($o){Qi(Dh($o,{replace:!0,force:!0}),Ps).catch(k2);return}re=Ps;const gi=Gt.value;e_&&$K(hL(gi.fullPath,Ao.delta),O4()),ia(Ps,gi).catch(bi=>qg(bi,xd.NAVIGATION_ABORTED|xd.NAVIGATION_CANCELLED)?bi:qg(bi,xd.NAVIGATION_GUARD_REDIRECT)?(Qi(Dh(Ft(bi.to),{force:!0}),Ps).then(li=>{qg(li,xd.NAVIGATION_ABORTED|xd.NAVIGATION_DUPLICATED)&&!Ao.delta&&Ao.type===lA.pop&&J.go(-1,!1)}).catch(k2),Promise.reject()):(Ao.delta&&J.go(-Ao.delta,!1),Va(bi,Ps,gi))).then(bi=>{bi=bi||Li(Ps,gi,!1),bi&&(Ao.delta&&!qg(bi,xd.NAVIGATION_CANCELLED)?J.go(-Ao.delta,!1):Ao.type===lA.pop&&qg(bi,xd.NAVIGATION_ABORTED|xd.NAVIGATION_DUPLICATED)&&J.go(-1,!1)),fa(Ps,gi,bi)}).catch(k2)}))}let Da=Jb(),Ni=Jb(),Ei;function Va(Ea,go,Ao){mo(Ea);const Ps=Ni.list();return Ps.length?Ps.forEach($o=>$o(Ea,go,Ao)):console.error(Ea),Promise.reject(Ea)}function ss(){return Ei&&Gt.value!==Qv?Promise.resolve():new Promise((Ea,go)=>{Da.add([Ea,go])})}function mo(Ea){return Ei||(Ei=!Ea,ra(),Da.list().forEach(([go,Ao])=>Ea?Ao(Ea):go()),Da.reset()),Ea}function ko(Ea,go,Ao,Ps){const{scrollBehavior:$o}=d;if(!e_||!$o)return Promise.resolve();const gi=!Ao&&GK(hL(Ea.fullPath,0))||(Ps||!Ao)&&history.state&&history.state.scroll||null;return Z0().then(()=>$o(Ea,go,gi)).then(bi=>bi&&ZK(bi)).catch(bi=>Va(bi,Ea,go))}const pl=Ea=>J.go(Ea);let fu;const qo=new Set,fo={currentRoute:Gt,listening:!0,addRoute:_r,removeRoute:Fr,clearRoutes:l.clearRoutes,hasRoute:Wr,getRoutes:zr,resolve:An,options:d,push:ei,replace:jn,go:pl,back:()=>pl(-1),forward:()=>pl(1),beforeEach:mt.add,beforeResolve:kt.add,afterEach:Dt.add,onError:Ni.add,isReady:ss,install(Ea){Ea.component("RouterLink",wX),Ea.component("RouterView",MX),Ea.config.globalProperties.$router=fo,Object.defineProperty(Ea.config.globalProperties,"$route",{enumerable:!0,get:()=>Ju(Gt)}),e_&&!fu&&Gt.value===Qv&&(fu=!0,ei(J.location).catch(Ps=>{}));const go={};for(const Ps in Qv)Object.defineProperty(go,Ps,{get:()=>Gt.value[Ps],enumerable:!0});Ea.provide(D4,fo),Ea.provide(KA,Dz(go)),Ea.provide(cA,Gt);const Ao=Ea.unmount;qo.add(Ea),Ea.unmount=function(){qo.delete(Ea),qo.size<1&&(re=Qv,yi&&yi(),yi=null,Gt.value=Qv,fu=!1,Ei=!1),Ao()}}};function Ta(Ea){return Ea.reduce((go,Ao)=>go.then(()=>un(Ao)),Promise.resolve())}return fo}function JI(){return lm(D4)}function QI(d){return lm(KA)}function tO(d,l){return function(){return d.apply(l,arguments)}}const{toString:EX}=Object.prototype,{getPrototypeOf:XA}=Object,{iterator:F4,toStringTag:eO}=Symbol,R4=(d=>l=>{const z=EX.call(l);return d[z]||(d[z]=z.slice(8,-1).toLowerCase())})(Object.create(null)),Lm=d=>(d=d.toLowerCase(),l=>R4(l)===d),B4=d=>l=>typeof l===d,{isArray:y_}=Array,p_=B4("undefined");function J2(d){return d!==null&&!p_(d)&&d.constructor!==null&&!p_(d.constructor)&&S0(d.constructor.isBuffer)&&d.constructor.isBuffer(d)}const rO=Lm("ArrayBuffer");function CX(d){let l;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?l=ArrayBuffer.isView(d):l=d&&d.buffer&&rO(d.buffer),l}const LX=B4("string"),S0=B4("function"),nO=B4("number"),Q2=d=>d!==null&&typeof d=="object",PX=d=>d===!0||d===!1,$5=d=>{if(R4(d)!=="object")return!1;const l=XA(d);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(eO in d)&&!(F4 in d)},zX=d=>{if(!Q2(d)||J2(d))return!1;try{return Object.keys(d).length===0&&Object.getPrototypeOf(d)===Object.prototype}catch{return!1}},IX=Lm("Date"),OX=Lm("File"),DX=Lm("Blob"),FX=Lm("FileList"),RX=d=>Q2(d)&&S0(d.pipe),BX=d=>{let l;return d&&(typeof FormData=="function"&&d instanceof FormData||S0(d.append)&&((l=R4(d))==="formdata"||l==="object"&&S0(d.toString)&&d.toString()==="[object FormData]"))},NX=Lm("URLSearchParams"),[jX,UX,VX,HX]=["ReadableStream","Request","Response","Headers"].map(Lm),WX=d=>d.trim?d.trim():d.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function tw(d,l,{allOwnKeys:z=!1}={}){if(d===null||typeof d>"u")return;let j,J;if(typeof d!="object"&&(d=[d]),y_(d))for(j=0,J=d.length;j0;)if(J=z[j],l===J.toLowerCase())return J;return null}const vy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,aO=d=>!p_(d)&&d!==vy;function hA(){const{caseless:d,skipUndefined:l}=aO(this)&&this||{},z={},j=(J,mt)=>{const kt=d&&iO(z,mt)||mt;$5(z[kt])&&$5(J)?z[kt]=hA(z[kt],J):$5(J)?z[kt]=hA({},J):y_(J)?z[kt]=J.slice():(!l||!p_(J))&&(z[kt]=J)};for(let J=0,mt=arguments.length;J(tw(l,(J,mt)=>{z&&S0(J)?d[mt]=tO(J,z):d[mt]=J},{allOwnKeys:j}),d),ZX=d=>(d.charCodeAt(0)===65279&&(d=d.slice(1)),d),$X=(d,l,z,j)=>{d.prototype=Object.create(l.prototype,j),d.prototype.constructor=d,Object.defineProperty(d,"super",{value:l.prototype}),z&&Object.assign(d.prototype,z)},GX=(d,l,z,j)=>{let J,mt,kt;const Dt={};if(l=l||{},d==null)return l;do{for(J=Object.getOwnPropertyNames(d),mt=J.length;mt-- >0;)kt=J[mt],(!j||j(kt,d,l))&&!Dt[kt]&&(l[kt]=d[kt],Dt[kt]=!0);d=z!==!1&&XA(d)}while(d&&(!z||z(d,l))&&d!==Object.prototype);return l},YX=(d,l,z)=>{d=String(d),(z===void 0||z>d.length)&&(z=d.length),z-=l.length;const j=d.indexOf(l,z);return j!==-1&&j===z},KX=d=>{if(!d)return null;if(y_(d))return d;let l=d.length;if(!nO(l))return null;const z=new Array(l);for(;l-- >0;)z[l]=d[l];return z},XX=(d=>l=>d&&l instanceof d)(typeof Uint8Array<"u"&&XA(Uint8Array)),JX=(d,l)=>{const j=(d&&d[F4]).call(d);let J;for(;(J=j.next())&&!J.done;){const mt=J.value;l.call(d,mt[0],mt[1])}},QX=(d,l)=>{let z;const j=[];for(;(z=d.exec(l))!==null;)j.push(z);return j},tJ=Lm("HTMLFormElement"),eJ=d=>d.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(z,j,J){return j.toUpperCase()+J}),TL=(({hasOwnProperty:d})=>(l,z)=>d.call(l,z))(Object.prototype),rJ=Lm("RegExp"),oO=(d,l)=>{const z=Object.getOwnPropertyDescriptors(d),j={};tw(z,(J,mt)=>{let kt;(kt=l(J,mt,d))!==!1&&(j[mt]=kt||J)}),Object.defineProperties(d,j)},nJ=d=>{oO(d,(l,z)=>{if(S0(d)&&["arguments","caller","callee"].indexOf(z)!==-1)return!1;const j=d[z];if(S0(j)){if(l.enumerable=!1,"writable"in l){l.writable=!1;return}l.set||(l.set=()=>{throw Error("Can not rewrite read-only method '"+z+"'")})}})},iJ=(d,l)=>{const z={},j=J=>{J.forEach(mt=>{z[mt]=!0})};return y_(d)?j(d):j(String(d).split(l)),z},aJ=()=>{},oJ=(d,l)=>d!=null&&Number.isFinite(d=+d)?d:l;function sJ(d){return!!(d&&S0(d.append)&&d[eO]==="FormData"&&d[F4])}const lJ=d=>{const l=new Array(10),z=(j,J)=>{if(Q2(j)){if(l.indexOf(j)>=0)return;if(J2(j))return j;if(!("toJSON"in j)){l[J]=j;const mt=y_(j)?[]:{};return tw(j,(kt,Dt)=>{const Gt=z(kt,J+1);!p_(Gt)&&(mt[Dt]=Gt)}),l[J]=void 0,mt}}return j};return z(d,0)},uJ=Lm("AsyncFunction"),cJ=d=>d&&(Q2(d)||S0(d))&&S0(d.then)&&S0(d.catch),sO=((d,l)=>d?setImmediate:l?((z,j)=>(vy.addEventListener("message",({source:J,data:mt})=>{J===vy&&mt===z&&j.length&&j.shift()()},!1),J=>{j.push(J),vy.postMessage(z,"*")}))(`axios@${Math.random()}`,[]):z=>setTimeout(z))(typeof setImmediate=="function",S0(vy.postMessage)),hJ=typeof queueMicrotask<"u"?queueMicrotask.bind(vy):typeof process<"u"&&process.nextTick||sO,fJ=d=>d!=null&&S0(d[F4]),to={isArray:y_,isArrayBuffer:rO,isBuffer:J2,isFormData:BX,isArrayBufferView:CX,isString:LX,isNumber:nO,isBoolean:PX,isObject:Q2,isPlainObject:$5,isEmptyObject:zX,isReadableStream:jX,isRequest:UX,isResponse:VX,isHeaders:HX,isUndefined:p_,isDate:IX,isFile:OX,isBlob:DX,isRegExp:rJ,isFunction:S0,isStream:RX,isURLSearchParams:NX,isTypedArray:XX,isFileList:FX,forEach:tw,merge:hA,extend:qX,trim:WX,stripBOM:ZX,inherits:$X,toFlatObject:GX,kindOf:R4,kindOfTest:Lm,endsWith:YX,toArray:KX,forEachEntry:JX,matchAll:QX,isHTMLForm:tJ,hasOwnProperty:TL,hasOwnProp:TL,reduceDescriptors:oO,freezeMethods:nJ,toObjectSet:iJ,toCamelCase:eJ,noop:aJ,toFiniteNumber:oJ,findKey:iO,global:vy,isContextDefined:aO,isSpecCompliantForm:sJ,toJSONObject:lJ,isAsyncFn:uJ,isThenable:cJ,setImmediate:sO,asap:hJ,isIterable:fJ};function Qu(d,l,z,j,J){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=d,this.name="AxiosError",l&&(this.code=l),z&&(this.config=z),j&&(this.request=j),J&&(this.response=J,this.status=J.status?J.status:null)}to.inherits(Qu,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:to.toJSONObject(this.config),code:this.code,status:this.status}}});const lO=Qu.prototype,uO={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(d=>{uO[d]={value:d}});Object.defineProperties(Qu,uO);Object.defineProperty(lO,"isAxiosError",{value:!0});Qu.from=(d,l,z,j,J,mt)=>{const kt=Object.create(lO);to.toFlatObject(d,kt,function(pe){return pe!==Error.prototype},re=>re!=="isAxiosError");const Dt=d&&d.message?d.message:"Error",Gt=l==null&&d?d.code:l;return Qu.call(kt,Dt,Gt,z,j,J),d&&kt.cause==null&&Object.defineProperty(kt,"cause",{value:d,configurable:!0}),kt.name=d&&d.name||"Error",mt&&Object.assign(kt,mt),kt};const dJ=null;function fA(d){return to.isPlainObject(d)||to.isArray(d)}function cO(d){return to.endsWith(d,"[]")?d.slice(0,-2):d}function AL(d,l,z){return d?d.concat(l).map(function(J,mt){return J=cO(J),!z&&mt?"["+J+"]":J}).join(z?".":""):l}function pJ(d){return to.isArray(d)&&!d.some(fA)}const mJ=to.toFlatObject(to,{},null,function(l){return/^is[A-Z]/.test(l)});function N4(d,l,z){if(!to.isObject(d))throw new TypeError("target must be an object");l=l||new FormData,z=to.toFlatObject(z,{metaTokens:!0,dots:!1,indexes:!1},!1,function(zr,Wr){return!to.isUndefined(Wr[zr])});const j=z.metaTokens,J=z.visitor||pe,mt=z.dots,kt=z.indexes,Gt=(z.Blob||typeof Blob<"u"&&Blob)&&to.isSpecCompliantForm(l);if(!to.isFunction(J))throw new TypeError("visitor must be a function");function re(Fr){if(Fr===null)return"";if(to.isDate(Fr))return Fr.toISOString();if(to.isBoolean(Fr))return Fr.toString();if(!Gt&&to.isBlob(Fr))throw new Qu("Blob is not supported. Use a Buffer instead.");return to.isArrayBuffer(Fr)||to.isTypedArray(Fr)?Gt&&typeof Blob=="function"?new Blob([Fr]):Buffer.from(Fr):Fr}function pe(Fr,zr,Wr){let An=Fr;if(Fr&&!Wr&&typeof Fr=="object"){if(to.endsWith(zr,"{}"))zr=j?zr:zr.slice(0,-2),Fr=JSON.stringify(Fr);else if(to.isArray(Fr)&&pJ(Fr)||(to.isFileList(Fr)||to.endsWith(zr,"[]"))&&(An=to.toArray(Fr)))return zr=cO(zr),An.forEach(function(kn,ei){!(to.isUndefined(kn)||kn===null)&&l.append(kt===!0?AL([zr],ei,mt):kt===null?zr:zr+"[]",re(kn))}),!1}return fA(Fr)?!0:(l.append(AL(Wr,zr,mt),re(Fr)),!1)}const Ne=[],or=Object.assign(mJ,{defaultVisitor:pe,convertValue:re,isVisitable:fA});function _r(Fr,zr){if(!to.isUndefined(Fr)){if(Ne.indexOf(Fr)!==-1)throw Error("Circular reference detected in "+zr.join("."));Ne.push(Fr),to.forEach(Fr,function(An,Ft){(!(to.isUndefined(An)||An===null)&&J.call(l,An,to.isString(Ft)?Ft.trim():Ft,zr,or))===!0&&_r(An,zr?zr.concat(Ft):[Ft])}),Ne.pop()}}if(!to.isObject(d))throw new TypeError("data must be an object");return _r(d),l}function ML(d){const l={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(d).replace(/[!'()~]|%20|%00/g,function(j){return l[j]})}function JA(d,l){this._pairs=[],d&&N4(d,this,l)}const hO=JA.prototype;hO.append=function(l,z){this._pairs.push([l,z])};hO.toString=function(l){const z=l?function(j){return l.call(this,j,ML)}:ML;return this._pairs.map(function(J){return z(J[0])+"="+z(J[1])},"").join("&")};function gJ(d){return encodeURIComponent(d).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function fO(d,l,z){if(!l)return d;const j=z&&z.encode||gJ;to.isFunction(z)&&(z={serialize:z});const J=z&&z.serialize;let mt;if(J?mt=J(l,z):mt=to.isURLSearchParams(l)?l.toString():new JA(l,z).toString(j),mt){const kt=d.indexOf("#");kt!==-1&&(d=d.slice(0,kt)),d+=(d.indexOf("?")===-1?"?":"&")+mt}return d}class SL{constructor(){this.handlers=[]}use(l,z,j){return this.handlers.push({fulfilled:l,rejected:z,synchronous:j?j.synchronous:!1,runWhen:j?j.runWhen:null}),this.handlers.length-1}eject(l){this.handlers[l]&&(this.handlers[l]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(l){to.forEach(this.handlers,function(j){j!==null&&l(j)})}}const dO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vJ=typeof URLSearchParams<"u"?URLSearchParams:JA,yJ=typeof FormData<"u"?FormData:null,xJ=typeof Blob<"u"?Blob:null,_J={isBrowser:!0,classes:{URLSearchParams:vJ,FormData:yJ,Blob:xJ},protocols:["http","https","file","blob","url","data"]},QA=typeof window<"u"&&typeof document<"u",dA=typeof navigator=="object"&&navigator||void 0,bJ=QA&&(!dA||["ReactNative","NativeScript","NS"].indexOf(dA.product)<0),wJ=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kJ=QA&&window.location.href||"http://localhost",TJ=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:QA,hasStandardBrowserEnv:bJ,hasStandardBrowserWebWorkerEnv:wJ,navigator:dA,origin:kJ},Symbol.toStringTag,{value:"Module"})),Kp={...TJ,..._J};function AJ(d,l){return N4(d,new Kp.classes.URLSearchParams,{visitor:function(z,j,J,mt){return Kp.isNode&&to.isBuffer(z)?(this.append(j,z.toString("base64")),!1):mt.defaultVisitor.apply(this,arguments)},...l})}function MJ(d){return to.matchAll(/\w+|\[(\w*)]/g,d).map(l=>l[0]==="[]"?"":l[1]||l[0])}function SJ(d){const l={},z=Object.keys(d);let j;const J=z.length;let mt;for(j=0;j=z.length;return kt=!kt&&to.isArray(J)?J.length:kt,Gt?(to.hasOwnProp(J,kt)?J[kt]=[J[kt],j]:J[kt]=j,!Dt):((!J[kt]||!to.isObject(J[kt]))&&(J[kt]=[]),l(z,j,J[kt],mt)&&to.isArray(J[kt])&&(J[kt]=SJ(J[kt])),!Dt)}if(to.isFormData(d)&&to.isFunction(d.entries)){const z={};return to.forEachEntry(d,(j,J)=>{l(MJ(j),J,z,0)}),z}return null}function EJ(d,l,z){if(to.isString(d))try{return(l||JSON.parse)(d),to.trim(d)}catch(j){if(j.name!=="SyntaxError")throw j}return(z||JSON.stringify)(d)}const ew={transitional:dO,adapter:["xhr","http","fetch"],transformRequest:[function(l,z){const j=z.getContentType()||"",J=j.indexOf("application/json")>-1,mt=to.isObject(l);if(mt&&to.isHTMLForm(l)&&(l=new FormData(l)),to.isFormData(l))return J?JSON.stringify(pO(l)):l;if(to.isArrayBuffer(l)||to.isBuffer(l)||to.isStream(l)||to.isFile(l)||to.isBlob(l)||to.isReadableStream(l))return l;if(to.isArrayBufferView(l))return l.buffer;if(to.isURLSearchParams(l))return z.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),l.toString();let Dt;if(mt){if(j.indexOf("application/x-www-form-urlencoded")>-1)return AJ(l,this.formSerializer).toString();if((Dt=to.isFileList(l))||j.indexOf("multipart/form-data")>-1){const Gt=this.env&&this.env.FormData;return N4(Dt?{"files[]":l}:l,Gt&&new Gt,this.formSerializer)}}return mt||J?(z.setContentType("application/json",!1),EJ(l)):l}],transformResponse:[function(l){const z=this.transitional||ew.transitional,j=z&&z.forcedJSONParsing,J=this.responseType==="json";if(to.isResponse(l)||to.isReadableStream(l))return l;if(l&&to.isString(l)&&(j&&!this.responseType||J)){const kt=!(z&&z.silentJSONParsing)&&J;try{return JSON.parse(l,this.parseReviver)}catch(Dt){if(kt)throw Dt.name==="SyntaxError"?Qu.from(Dt,Qu.ERR_BAD_RESPONSE,this,null,this.response):Dt}}return l}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Kp.classes.FormData,Blob:Kp.classes.Blob},validateStatus:function(l){return l>=200&&l<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};to.forEach(["delete","get","head","post","put","patch"],d=>{ew.headers[d]={}});const CJ=to.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),LJ=d=>{const l={};let z,j,J;return d&&d.split(` +`).forEach(function(kt){J=kt.indexOf(":"),z=kt.substring(0,J).trim().toLowerCase(),j=kt.substring(J+1).trim(),!(!z||l[z]&&CJ[z])&&(z==="set-cookie"?l[z]?l[z].push(j):l[z]=[j]:l[z]=l[z]?l[z]+", "+j:j)}),l},EL=Symbol("internals");function Qb(d){return d&&String(d).trim().toLowerCase()}function G5(d){return d===!1||d==null?d:to.isArray(d)?d.map(G5):String(d)}function PJ(d){const l=Object.create(null),z=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let j;for(;j=z.exec(d);)l[j[1]]=j[2];return l}const zJ=d=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(d.trim());function S8(d,l,z,j,J){if(to.isFunction(j))return j.call(this,l,z);if(J&&(l=z),!!to.isString(l)){if(to.isString(j))return l.indexOf(j)!==-1;if(to.isRegExp(j))return j.test(l)}}function IJ(d){return d.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(l,z,j)=>z.toUpperCase()+j)}function OJ(d,l){const z=to.toCamelCase(" "+l);["get","set","has"].forEach(j=>{Object.defineProperty(d,j+z,{value:function(J,mt,kt){return this[j].call(this,l,J,mt,kt)},configurable:!0})})}let E0=class{constructor(l){l&&this.set(l)}set(l,z,j){const J=this;function mt(Dt,Gt,re){const pe=Qb(Gt);if(!pe)throw new Error("header name must be a non-empty string");const Ne=to.findKey(J,pe);(!Ne||J[Ne]===void 0||re===!0||re===void 0&&J[Ne]!==!1)&&(J[Ne||Gt]=G5(Dt))}const kt=(Dt,Gt)=>to.forEach(Dt,(re,pe)=>mt(re,pe,Gt));if(to.isPlainObject(l)||l instanceof this.constructor)kt(l,z);else if(to.isString(l)&&(l=l.trim())&&!zJ(l))kt(LJ(l),z);else if(to.isObject(l)&&to.isIterable(l)){let Dt={},Gt,re;for(const pe of l){if(!to.isArray(pe))throw TypeError("Object iterator must return a key-value pair");Dt[re=pe[0]]=(Gt=Dt[re])?to.isArray(Gt)?[...Gt,pe[1]]:[Gt,pe[1]]:pe[1]}kt(Dt,z)}else l!=null&&mt(z,l,j);return this}get(l,z){if(l=Qb(l),l){const j=to.findKey(this,l);if(j){const J=this[j];if(!z)return J;if(z===!0)return PJ(J);if(to.isFunction(z))return z.call(this,J,j);if(to.isRegExp(z))return z.exec(J);throw new TypeError("parser must be boolean|regexp|function")}}}has(l,z){if(l=Qb(l),l){const j=to.findKey(this,l);return!!(j&&this[j]!==void 0&&(!z||S8(this,this[j],j,z)))}return!1}delete(l,z){const j=this;let J=!1;function mt(kt){if(kt=Qb(kt),kt){const Dt=to.findKey(j,kt);Dt&&(!z||S8(j,j[Dt],Dt,z))&&(delete j[Dt],J=!0)}}return to.isArray(l)?l.forEach(mt):mt(l),J}clear(l){const z=Object.keys(this);let j=z.length,J=!1;for(;j--;){const mt=z[j];(!l||S8(this,this[mt],mt,l,!0))&&(delete this[mt],J=!0)}return J}normalize(l){const z=this,j={};return to.forEach(this,(J,mt)=>{const kt=to.findKey(j,mt);if(kt){z[kt]=G5(J),delete z[mt];return}const Dt=l?IJ(mt):String(mt).trim();Dt!==mt&&delete z[mt],z[Dt]=G5(J),j[Dt]=!0}),this}concat(...l){return this.constructor.concat(this,...l)}toJSON(l){const z=Object.create(null);return to.forEach(this,(j,J)=>{j!=null&&j!==!1&&(z[J]=l&&to.isArray(j)?j.join(", "):j)}),z}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([l,z])=>l+": "+z).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(l){return l instanceof this?l:new this(l)}static concat(l,...z){const j=new this(l);return z.forEach(J=>j.set(J)),j}static accessor(l){const j=(this[EL]=this[EL]={accessors:{}}).accessors,J=this.prototype;function mt(kt){const Dt=Qb(kt);j[Dt]||(OJ(J,kt),j[Dt]=!0)}return to.isArray(l)?l.forEach(mt):mt(l),this}};E0.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);to.reduceDescriptors(E0.prototype,({value:d},l)=>{let z=l[0].toUpperCase()+l.slice(1);return{get:()=>d,set(j){this[z]=j}}});to.freezeMethods(E0);function E8(d,l){const z=this||ew,j=l||z,J=E0.from(j.headers);let mt=j.data;return to.forEach(d,function(Dt){mt=Dt.call(z,mt,J.normalize(),l?l.status:void 0)}),J.normalize(),mt}function mO(d){return!!(d&&d.__CANCEL__)}function x_(d,l,z){Qu.call(this,d??"canceled",Qu.ERR_CANCELED,l,z),this.name="CanceledError"}to.inherits(x_,Qu,{__CANCEL__:!0});function gO(d,l,z){const j=z.config.validateStatus;!z.status||!j||j(z.status)?d(z):l(new Qu("Request failed with status code "+z.status,[Qu.ERR_BAD_REQUEST,Qu.ERR_BAD_RESPONSE][Math.floor(z.status/100)-4],z.config,z.request,z))}function DJ(d){const l=/^([-+\w]{1,25})(:?\/\/|:)/.exec(d);return l&&l[1]||""}function FJ(d,l){d=d||10;const z=new Array(d),j=new Array(d);let J=0,mt=0,kt;return l=l!==void 0?l:1e3,function(Gt){const re=Date.now(),pe=j[mt];kt||(kt=re),z[J]=Gt,j[J]=re;let Ne=mt,or=0;for(;Ne!==J;)or+=z[Ne++],Ne=Ne%d;if(J=(J+1)%d,J===mt&&(mt=(mt+1)%d),re-kt{z=pe,J=null,mt&&(clearTimeout(mt),mt=null),d(...re)};return[(...re)=>{const pe=Date.now(),Ne=pe-z;Ne>=j?kt(re,pe):(J=re,mt||(mt=setTimeout(()=>{mt=null,kt(J)},j-Ne)))},()=>J&&kt(J)]}const c4=(d,l,z=3)=>{let j=0;const J=FJ(50,250);return RJ(mt=>{const kt=mt.loaded,Dt=mt.lengthComputable?mt.total:void 0,Gt=kt-j,re=J(Gt),pe=kt<=Dt;j=kt;const Ne={loaded:kt,total:Dt,progress:Dt?kt/Dt:void 0,bytes:Gt,rate:re||void 0,estimated:re&&Dt&&pe?(Dt-kt)/re:void 0,event:mt,lengthComputable:Dt!=null,[l?"download":"upload"]:!0};d(Ne)},z)},CL=(d,l)=>{const z=d!=null;return[j=>l[0]({lengthComputable:z,total:d,loaded:j}),l[1]]},LL=d=>(...l)=>to.asap(()=>d(...l)),BJ=Kp.hasStandardBrowserEnv?((d,l)=>z=>(z=new URL(z,Kp.origin),d.protocol===z.protocol&&d.host===z.host&&(l||d.port===z.port)))(new URL(Kp.origin),Kp.navigator&&/(msie|trident)/i.test(Kp.navigator.userAgent)):()=>!0,NJ=Kp.hasStandardBrowserEnv?{write(d,l,z,j,J,mt,kt){if(typeof document>"u")return;const Dt=[`${d}=${encodeURIComponent(l)}`];to.isNumber(z)&&Dt.push(`expires=${new Date(z).toUTCString()}`),to.isString(j)&&Dt.push(`path=${j}`),to.isString(J)&&Dt.push(`domain=${J}`),mt===!0&&Dt.push("secure"),to.isString(kt)&&Dt.push(`SameSite=${kt}`),document.cookie=Dt.join("; ")},read(d){if(typeof document>"u")return null;const l=document.cookie.match(new RegExp("(?:^|; )"+d+"=([^;]*)"));return l?decodeURIComponent(l[1]):null},remove(d){this.write(d,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function jJ(d){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(d)}function UJ(d,l){return l?d.replace(/\/?\/$/,"")+"/"+l.replace(/^\/+/,""):d}function vO(d,l,z){let j=!jJ(l);return d&&(j||z==!1)?UJ(d,l):l}const PL=d=>d instanceof E0?{...d}:d;function Ay(d,l){l=l||{};const z={};function j(re,pe,Ne,or){return to.isPlainObject(re)&&to.isPlainObject(pe)?to.merge.call({caseless:or},re,pe):to.isPlainObject(pe)?to.merge({},pe):to.isArray(pe)?pe.slice():pe}function J(re,pe,Ne,or){if(to.isUndefined(pe)){if(!to.isUndefined(re))return j(void 0,re,Ne,or)}else return j(re,pe,Ne,or)}function mt(re,pe){if(!to.isUndefined(pe))return j(void 0,pe)}function kt(re,pe){if(to.isUndefined(pe)){if(!to.isUndefined(re))return j(void 0,re)}else return j(void 0,pe)}function Dt(re,pe,Ne){if(Ne in l)return j(re,pe);if(Ne in d)return j(void 0,re)}const Gt={url:mt,method:mt,data:mt,baseURL:kt,transformRequest:kt,transformResponse:kt,paramsSerializer:kt,timeout:kt,timeoutMessage:kt,withCredentials:kt,withXSRFToken:kt,adapter:kt,responseType:kt,xsrfCookieName:kt,xsrfHeaderName:kt,onUploadProgress:kt,onDownloadProgress:kt,decompress:kt,maxContentLength:kt,maxBodyLength:kt,beforeRedirect:kt,transport:kt,httpAgent:kt,httpsAgent:kt,cancelToken:kt,socketPath:kt,responseEncoding:kt,validateStatus:Dt,headers:(re,pe,Ne)=>J(PL(re),PL(pe),Ne,!0)};return to.forEach(Object.keys({...d,...l}),function(pe){const Ne=Gt[pe]||J,or=Ne(d[pe],l[pe],pe);to.isUndefined(or)&&Ne!==Dt||(z[pe]=or)}),z}const yO=d=>{const l=Ay({},d);let{data:z,withXSRFToken:j,xsrfHeaderName:J,xsrfCookieName:mt,headers:kt,auth:Dt}=l;if(l.headers=kt=E0.from(kt),l.url=fO(vO(l.baseURL,l.url,l.allowAbsoluteUrls),d.params,d.paramsSerializer),Dt&&kt.set("Authorization","Basic "+btoa((Dt.username||"")+":"+(Dt.password?unescape(encodeURIComponent(Dt.password)):""))),to.isFormData(z)){if(Kp.hasStandardBrowserEnv||Kp.hasStandardBrowserWebWorkerEnv)kt.setContentType(void 0);else if(to.isFunction(z.getHeaders)){const Gt=z.getHeaders(),re=["content-type","content-length"];Object.entries(Gt).forEach(([pe,Ne])=>{re.includes(pe.toLowerCase())&&kt.set(pe,Ne)})}}if(Kp.hasStandardBrowserEnv&&(j&&to.isFunction(j)&&(j=j(l)),j||j!==!1&&BJ(l.url))){const Gt=J&&mt&&NJ.read(mt);Gt&&kt.set(J,Gt)}return l},VJ=typeof XMLHttpRequest<"u",HJ=VJ&&function(d){return new Promise(function(z,j){const J=yO(d);let mt=J.data;const kt=E0.from(J.headers).normalize();let{responseType:Dt,onUploadProgress:Gt,onDownloadProgress:re}=J,pe,Ne,or,_r,Fr;function zr(){_r&&_r(),Fr&&Fr(),J.cancelToken&&J.cancelToken.unsubscribe(pe),J.signal&&J.signal.removeEventListener("abort",pe)}let Wr=new XMLHttpRequest;Wr.open(J.method.toUpperCase(),J.url,!0),Wr.timeout=J.timeout;function An(){if(!Wr)return;const kn=E0.from("getAllResponseHeaders"in Wr&&Wr.getAllResponseHeaders()),jn={data:!Dt||Dt==="text"||Dt==="json"?Wr.responseText:Wr.response,status:Wr.status,statusText:Wr.statusText,headers:kn,config:d,request:Wr};gO(function(Qi){z(Qi),zr()},function(Qi){j(Qi),zr()},jn),Wr=null}"onloadend"in Wr?Wr.onloadend=An:Wr.onreadystatechange=function(){!Wr||Wr.readyState!==4||Wr.status===0&&!(Wr.responseURL&&Wr.responseURL.indexOf("file:")===0)||setTimeout(An)},Wr.onabort=function(){Wr&&(j(new Qu("Request aborted",Qu.ECONNABORTED,d,Wr)),Wr=null)},Wr.onerror=function(ei){const jn=ei&&ei.message?ei.message:"Network Error",ai=new Qu(jn,Qu.ERR_NETWORK,d,Wr);ai.event=ei||null,j(ai),Wr=null},Wr.ontimeout=function(){let ei=J.timeout?"timeout of "+J.timeout+"ms exceeded":"timeout exceeded";const jn=J.transitional||dO;J.timeoutErrorMessage&&(ei=J.timeoutErrorMessage),j(new Qu(ei,jn.clarifyTimeoutError?Qu.ETIMEDOUT:Qu.ECONNABORTED,d,Wr)),Wr=null},mt===void 0&&kt.setContentType(null),"setRequestHeader"in Wr&&to.forEach(kt.toJSON(),function(ei,jn){Wr.setRequestHeader(jn,ei)}),to.isUndefined(J.withCredentials)||(Wr.withCredentials=!!J.withCredentials),Dt&&Dt!=="json"&&(Wr.responseType=J.responseType),re&&([or,Fr]=c4(re,!0),Wr.addEventListener("progress",or)),Gt&&Wr.upload&&([Ne,_r]=c4(Gt),Wr.upload.addEventListener("progress",Ne),Wr.upload.addEventListener("loadend",_r)),(J.cancelToken||J.signal)&&(pe=kn=>{Wr&&(j(!kn||kn.type?new x_(null,d,Wr):kn),Wr.abort(),Wr=null)},J.cancelToken&&J.cancelToken.subscribe(pe),J.signal&&(J.signal.aborted?pe():J.signal.addEventListener("abort",pe)));const Ft=DJ(J.url);if(Ft&&Kp.protocols.indexOf(Ft)===-1){j(new Qu("Unsupported protocol "+Ft+":",Qu.ERR_BAD_REQUEST,d));return}Wr.send(mt||null)})},WJ=(d,l)=>{const{length:z}=d=d?d.filter(Boolean):[];if(l||z){let j=new AbortController,J;const mt=function(re){if(!J){J=!0,Dt();const pe=re instanceof Error?re:this.reason;j.abort(pe instanceof Qu?pe:new x_(pe instanceof Error?pe.message:pe))}};let kt=l&&setTimeout(()=>{kt=null,mt(new Qu(`timeout ${l} of ms exceeded`,Qu.ETIMEDOUT))},l);const Dt=()=>{d&&(kt&&clearTimeout(kt),kt=null,d.forEach(re=>{re.unsubscribe?re.unsubscribe(mt):re.removeEventListener("abort",mt)}),d=null)};d.forEach(re=>re.addEventListener("abort",mt));const{signal:Gt}=j;return Gt.unsubscribe=()=>to.asap(Dt),Gt}},qJ=function*(d,l){let z=d.byteLength;if(z{const J=ZJ(d,l);let mt=0,kt,Dt=Gt=>{kt||(kt=!0,j&&j(Gt))};return new ReadableStream({async pull(Gt){try{const{done:re,value:pe}=await J.next();if(re){Dt(),Gt.close();return}let Ne=pe.byteLength;if(z){let or=mt+=Ne;z(or)}Gt.enqueue(new Uint8Array(pe))}catch(re){throw Dt(re),re}},cancel(Gt){return Dt(Gt),J.return()}},{highWaterMark:2})},IL=64*1024,{isFunction:M5}=to,GJ=(({Request:d,Response:l})=>({Request:d,Response:l}))(to.global),{ReadableStream:OL,TextEncoder:DL}=to.global,FL=(d,...l)=>{try{return!!d(...l)}catch{return!1}},YJ=d=>{d=to.merge.call({skipUndefined:!0},GJ,d);const{fetch:l,Request:z,Response:j}=d,J=l?M5(l):typeof fetch=="function",mt=M5(z),kt=M5(j);if(!J)return!1;const Dt=J&&M5(OL),Gt=J&&(typeof DL=="function"?(Fr=>zr=>Fr.encode(zr))(new DL):async Fr=>new Uint8Array(await new z(Fr).arrayBuffer())),re=mt&&Dt&&FL(()=>{let Fr=!1;const zr=new z(Kp.origin,{body:new OL,method:"POST",get duplex(){return Fr=!0,"half"}}).headers.has("Content-Type");return Fr&&!zr}),pe=kt&&Dt&&FL(()=>to.isReadableStream(new j("").body)),Ne={stream:pe&&(Fr=>Fr.body)};J&&["text","arrayBuffer","blob","formData","stream"].forEach(Fr=>{!Ne[Fr]&&(Ne[Fr]=(zr,Wr)=>{let An=zr&&zr[Fr];if(An)return An.call(zr);throw new Qu(`Response type '${Fr}' is not supported`,Qu.ERR_NOT_SUPPORT,Wr)})});const or=async Fr=>{if(Fr==null)return 0;if(to.isBlob(Fr))return Fr.size;if(to.isSpecCompliantForm(Fr))return(await new z(Kp.origin,{method:"POST",body:Fr}).arrayBuffer()).byteLength;if(to.isArrayBufferView(Fr)||to.isArrayBuffer(Fr))return Fr.byteLength;if(to.isURLSearchParams(Fr)&&(Fr=Fr+""),to.isString(Fr))return(await Gt(Fr)).byteLength},_r=async(Fr,zr)=>{const Wr=to.toFiniteNumber(Fr.getContentLength());return Wr??or(zr)};return async Fr=>{let{url:zr,method:Wr,data:An,signal:Ft,cancelToken:kn,timeout:ei,onDownloadProgress:jn,onUploadProgress:ai,responseType:Qi,headers:Gi,withCredentials:un="same-origin",fetchOptions:ia}=yO(Fr),fa=l||fetch;Qi=Qi?(Qi+"").toLowerCase():"text";let Li=WJ([Ft,kn&&kn.toAbortSignal()],ei),yi=null;const ra=Li&&Li.unsubscribe&&(()=>{Li.unsubscribe()});let Da;try{if(ai&&re&&Wr!=="get"&&Wr!=="head"&&(Da=await _r(Gi,An))!==0){let ko=new z(zr,{method:"POST",body:An,duplex:"half"}),pl;if(to.isFormData(An)&&(pl=ko.headers.get("content-type"))&&Gi.setContentType(pl),ko.body){const[fu,qo]=CL(Da,c4(LL(ai)));An=zL(ko.body,IL,fu,qo)}}to.isString(un)||(un=un?"include":"omit");const Ni=mt&&"credentials"in z.prototype,Ei={...ia,signal:Li,method:Wr.toUpperCase(),headers:Gi.normalize().toJSON(),body:An,duplex:"half",credentials:Ni?un:void 0};yi=mt&&new z(zr,Ei);let Va=await(mt?fa(yi,ia):fa(zr,Ei));const ss=pe&&(Qi==="stream"||Qi==="response");if(pe&&(jn||ss&&ra)){const ko={};["status","statusText","headers"].forEach(fo=>{ko[fo]=Va[fo]});const pl=to.toFiniteNumber(Va.headers.get("content-length")),[fu,qo]=jn&&CL(pl,c4(LL(jn),!0))||[];Va=new j(zL(Va.body,IL,fu,()=>{qo&&qo(),ra&&ra()}),ko)}Qi=Qi||"text";let mo=await Ne[to.findKey(Ne,Qi)||"text"](Va,Fr);return!ss&&ra&&ra(),await new Promise((ko,pl)=>{gO(ko,pl,{data:mo,headers:E0.from(Va.headers),status:Va.status,statusText:Va.statusText,config:Fr,request:yi})})}catch(Ni){throw ra&&ra(),Ni&&Ni.name==="TypeError"&&/Load failed|fetch/i.test(Ni.message)?Object.assign(new Qu("Network Error",Qu.ERR_NETWORK,Fr,yi),{cause:Ni.cause||Ni}):Qu.from(Ni,Ni&&Ni.code,Fr,yi)}}},KJ=new Map,xO=d=>{let l=d&&d.env||{};const{fetch:z,Request:j,Response:J}=l,mt=[j,J,z];let kt=mt.length,Dt=kt,Gt,re,pe=KJ;for(;Dt--;)Gt=mt[Dt],re=pe.get(Gt),re===void 0&&pe.set(Gt,re=Dt?new Map:YJ(l)),pe=re;return re};xO();const tM={http:dJ,xhr:HJ,fetch:{get:xO}};to.forEach(tM,(d,l)=>{if(d){try{Object.defineProperty(d,"name",{value:l})}catch{}Object.defineProperty(d,"adapterName",{value:l})}});const RL=d=>`- ${d}`,XJ=d=>to.isFunction(d)||d===null||d===!1;function JJ(d,l){d=to.isArray(d)?d:[d];const{length:z}=d;let j,J;const mt={};for(let kt=0;kt`adapter ${Gt} `+(re===!1?"is not supported by the environment":"is not available in the build"));let Dt=z?kt.length>1?`since : +`+kt.map(RL).join(` +`):" "+RL(kt[0]):"as no adapter specified";throw new Qu("There is no suitable adapter to dispatch the request "+Dt,"ERR_NOT_SUPPORT")}return J}const _O={getAdapter:JJ,adapters:tM};function C8(d){if(d.cancelToken&&d.cancelToken.throwIfRequested(),d.signal&&d.signal.aborted)throw new x_(null,d)}function BL(d){return C8(d),d.headers=E0.from(d.headers),d.data=E8.call(d,d.transformRequest),["post","put","patch"].indexOf(d.method)!==-1&&d.headers.setContentType("application/x-www-form-urlencoded",!1),_O.getAdapter(d.adapter||ew.adapter,d)(d).then(function(j){return C8(d),j.data=E8.call(d,d.transformResponse,j),j.headers=E0.from(j.headers),j},function(j){return mO(j)||(C8(d),j&&j.response&&(j.response.data=E8.call(d,d.transformResponse,j.response),j.response.headers=E0.from(j.response.headers))),Promise.reject(j)})}const bO="1.13.2",j4={};["object","boolean","number","function","string","symbol"].forEach((d,l)=>{j4[d]=function(j){return typeof j===d||"a"+(l<1?"n ":" ")+d}});const NL={};j4.transitional=function(l,z,j){function J(mt,kt){return"[Axios v"+bO+"] Transitional option '"+mt+"'"+kt+(j?". "+j:"")}return(mt,kt,Dt)=>{if(l===!1)throw new Qu(J(kt," has been removed"+(z?" in "+z:"")),Qu.ERR_DEPRECATED);return z&&!NL[kt]&&(NL[kt]=!0,console.warn(J(kt," has been deprecated since v"+z+" and will be removed in the near future"))),l?l(mt,kt,Dt):!0}};j4.spelling=function(l){return(z,j)=>(console.warn(`${j} is likely a misspelling of ${l}`),!0)};function QJ(d,l,z){if(typeof d!="object")throw new Qu("options must be an object",Qu.ERR_BAD_OPTION_VALUE);const j=Object.keys(d);let J=j.length;for(;J-- >0;){const mt=j[J],kt=l[mt];if(kt){const Dt=d[mt],Gt=Dt===void 0||kt(Dt,mt,d);if(Gt!==!0)throw new Qu("option "+mt+" must be "+Gt,Qu.ERR_BAD_OPTION_VALUE);continue}if(z!==!0)throw new Qu("Unknown option "+mt,Qu.ERR_BAD_OPTION)}}const Y5={assertOptions:QJ,validators:j4},tg=Y5.validators;let by=class{constructor(l){this.defaults=l||{},this.interceptors={request:new SL,response:new SL}}async request(l,z){try{return await this._request(l,z)}catch(j){if(j instanceof Error){let J={};Error.captureStackTrace?Error.captureStackTrace(J):J=new Error;const mt=J.stack?J.stack.replace(/^.+\n/,""):"";try{j.stack?mt&&!String(j.stack).endsWith(mt.replace(/^.+\n.+\n/,""))&&(j.stack+=` +`+mt):j.stack=mt}catch{}}throw j}}_request(l,z){typeof l=="string"?(z=z||{},z.url=l):z=l||{},z=Ay(this.defaults,z);const{transitional:j,paramsSerializer:J,headers:mt}=z;j!==void 0&&Y5.assertOptions(j,{silentJSONParsing:tg.transitional(tg.boolean),forcedJSONParsing:tg.transitional(tg.boolean),clarifyTimeoutError:tg.transitional(tg.boolean)},!1),J!=null&&(to.isFunction(J)?z.paramsSerializer={serialize:J}:Y5.assertOptions(J,{encode:tg.function,serialize:tg.function},!0)),z.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?z.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:z.allowAbsoluteUrls=!0),Y5.assertOptions(z,{baseUrl:tg.spelling("baseURL"),withXsrfToken:tg.spelling("withXSRFToken")},!0),z.method=(z.method||this.defaults.method||"get").toLowerCase();let kt=mt&&to.merge(mt.common,mt[z.method]);mt&&to.forEach(["delete","get","head","post","put","patch","common"],Fr=>{delete mt[Fr]}),z.headers=E0.concat(kt,mt);const Dt=[];let Gt=!0;this.interceptors.request.forEach(function(zr){typeof zr.runWhen=="function"&&zr.runWhen(z)===!1||(Gt=Gt&&zr.synchronous,Dt.unshift(zr.fulfilled,zr.rejected))});const re=[];this.interceptors.response.forEach(function(zr){re.push(zr.fulfilled,zr.rejected)});let pe,Ne=0,or;if(!Gt){const Fr=[BL.bind(this),void 0];for(Fr.unshift(...Dt),Fr.push(...re),or=Fr.length,pe=Promise.resolve(z);Ne{if(!j._listeners)return;let mt=j._listeners.length;for(;mt-- >0;)j._listeners[mt](J);j._listeners=null}),this.promise.then=J=>{let mt;const kt=new Promise(Dt=>{j.subscribe(Dt),mt=Dt}).then(J);return kt.cancel=function(){j.unsubscribe(mt)},kt},l(function(mt,kt,Dt){j.reason||(j.reason=new x_(mt,kt,Dt),z(j.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(l){if(this.reason){l(this.reason);return}this._listeners?this._listeners.push(l):this._listeners=[l]}unsubscribe(l){if(!this._listeners)return;const z=this._listeners.indexOf(l);z!==-1&&this._listeners.splice(z,1)}toAbortSignal(){const l=new AbortController,z=j=>{l.abort(j)};return this.subscribe(z),l.signal.unsubscribe=()=>this.unsubscribe(z),l.signal}static source(){let l;return{token:new wO(function(J){l=J}),cancel:l}}};function eQ(d){return function(z){return d.apply(null,z)}}function rQ(d){return to.isObject(d)&&d.isAxiosError===!0}const pA={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(pA).forEach(([d,l])=>{pA[l]=d});function kO(d){const l=new by(d),z=tO(by.prototype.request,l);return to.extend(z,by.prototype,l,{allOwnKeys:!0}),to.extend(z,l,null,{allOwnKeys:!0}),z.create=function(J){return kO(Ay(d,J))},z}const _d=kO(ew);_d.Axios=by;_d.CanceledError=x_;_d.CancelToken=tQ;_d.isCancel=mO;_d.VERSION=bO;_d.toFormData=N4;_d.AxiosError=Qu;_d.Cancel=_d.CanceledError;_d.all=function(l){return Promise.all(l)};_d.spread=eQ;_d.isAxiosError=rQ;_d.mergeConfig=Ay;_d.AxiosHeaders=E0;_d.formToJSON=d=>pO(to.isHTMLForm(d)?new FormData(d):d);_d.getAdapter=_O.getAdapter;_d.HttpStatusCode=pA;_d.default=_d;const{Axios:yvt,AxiosError:xvt,CanceledError:_vt,isCancel:bvt,CancelToken:wvt,VERSION:kvt,all:Tvt,Cancel:Avt,isAxiosError:Mvt,spread:Svt,toFormData:Evt,AxiosHeaders:Cvt,HttpStatusCode:Lvt,formToJSON:Pvt,getAdapter:zvt,mergeConfig:Ivt}=_d,nQ="http://192.168.0.59:8000/api",iQ="http://192.168.0.59:8000",my=_d.create({baseURL:nQ,timeout:5e3,headers:{"Content-Type":"application/json"}});my.interceptors.request.use(d=>d,d=>(console.error("API Request Error:",d),Promise.reject(d)));my.interceptors.response.use(d=>d,d=>(console.error("API Response Error:",d.response?.data||d.message),Promise.reject(d)));class Xh{static async get(l,z){try{return(await my.get(l,{params:z})).data}catch(j){throw this.handleError(j)}}static async post(l,z,j){try{return(await my.post(l,z,j)).data}catch(J){throw this.handleError(J)}}static async put(l,z,j){try{return(await my.put(l,z,j)).data}catch(J){throw this.handleError(J)}}static async delete(l,z){try{return(await my.delete(l,z)).data}catch(j){throw this.handleError(j)}}static async getTransportKeys(){return this.get("transport_keys")}static async createTransportKey(l,z,j,J,mt){const kt={name:l,flood_policy:z,parent_id:J,last_used:mt};return j!==void 0&&(kt.transport_key=j),this.post("transport_keys",kt)}static async getTransportKey(l){return this.get(`transport_key/${l}`)}static async updateTransportKey(l,z,j,J,mt,kt){return this.put(`transport_key/${l}`,{name:z,flood_policy:j,transport_key:J,parent_id:mt,last_used:kt})}static async deleteTransportKey(l){return this.delete(`transport_key/${l}`)}static async updateGlobalFloodPolicy(l){return this.post("global_flood_policy",{global_flood_allow:l})}static async getLogs(){try{return(await my.get("logs")).data}catch(l){throw this.handleError(l)}}static handleError(l){if(_d.isAxiosError(l)){if(l.response){const z=l.response.data?.error||l.response.data?.message||`HTTP ${l.response.status}`;return new Error(z)}else if(l.request)return new Error("Network error - no response received")}return new Error(l instanceof Error?l.message:"Unknown error occurred")}}const sv=GA("system",()=>{const d=lo(null),l=lo(!1),z=lo(null),j=lo(null),J=lo("forward"),mt=lo(!0),kt=lo(0),Dt=lo(10),Gt=lo(!1),re=Yo(()=>d.value?.config?.node_name??"Unknown"),pe=Yo(()=>{const yi=d.value?.public_key;return!yi||yi==="Unknown"?"Unknown":yi.length>=16?`${yi.slice(0,8)} ... ${yi.slice(-8)}`:`${yi}`}),Ne=Yo(()=>d.value!==null),or=Yo(()=>d.value?.version??"Unknown"),_r=Yo(()=>d.value?.core_version??"Unknown"),Fr=Yo(()=>d.value?.noise_floor_dbm??null),zr=Yo(()=>Dt.value>0?Math.min(kt.value/Dt.value*100,100):0),Wr=Yo(()=>J.value==="monitor"?{text:"Monitor Mode",title:"Monitoring only - not forwarding packets"}:mt.value?{text:"Active",title:"Forwarding with duty cycle enforcement"}:{text:"No Limits",title:"Forwarding without duty cycle enforcement"}),An=Yo(()=>J.value==="monitor"?{active:!1,warning:!0}:{active:!0,warning:!1}),Ft=Yo(()=>mt.value?{active:!0,warning:!1}:{active:!1,warning:!0}),kn=yi=>{Gt.value=yi};async function ei(){try{l.value=!0,z.value=null;const yi=await Xh.get("/stats");if(yi.success&&yi.data)return d.value=yi.data,j.value=new Date,jn(yi.data),yi.data;if(yi&&"version"in yi){const ra=yi;return d.value=ra,j.value=new Date,jn(ra),ra}else throw new Error(yi.error||"Failed to fetch stats")}catch(yi){throw z.value=yi instanceof Error?yi.message:"Unknown error occurred",console.error("Error fetching stats:",yi),yi}finally{l.value=!1}}function jn(yi){if(yi.config){const Da=yi.config.repeater?.mode;(Da==="forward"||Da==="monitor")&&(J.value=Da);const Ni=yi.config.duty_cycle;if(Ni){mt.value=Ni.enforcement_enabled!==!1;const Ei=Ni.max_airtime_percent;typeof Ei=="number"?Dt.value=Ei:Ei&&typeof Ei=="object"&&"parsedValue"in Ei&&(Dt.value=Ei.parsedValue||10)}}const ra=yi.utilization_percent;typeof ra=="number"?kt.value=ra:ra&&typeof ra=="object"&&"parsedValue"in ra&&(kt.value=ra.parsedValue||0)}async function ai(yi){try{const ra=await Xh.post("/set_mode",{mode:yi});if(ra.success)return J.value=yi,!0;throw new Error(ra.error||"Failed to set mode")}catch(ra){throw z.value=ra instanceof Error?ra.message:"Unknown error occurred",console.error("Error setting mode:",ra),ra}}async function Qi(yi){try{const ra=await Xh.post("/set_duty_cycle",{enabled:yi});if(ra.success)return mt.value=yi,!0;throw new Error(ra.error||"Failed to set duty cycle")}catch(ra){throw z.value=ra instanceof Error?ra.message:"Unknown error occurred",console.error("Error setting duty cycle:",ra),ra}}async function Gi(){try{const yi=await Xh.post("/send_advert",{},{timeout:1e4});if(yi.success)return console.log("Advertisement sent successfully:",yi.data),!0;throw new Error(yi.error||"Failed to send advert")}catch(yi){throw z.value=yi instanceof Error?yi.message:"Unknown error occurred",console.error("Error sending advert:",yi),yi}}async function un(){const yi=J.value==="forward"?"monitor":"forward";return await ai(yi)}async function ia(){return await Qi(!mt.value)}async function fa(yi=5e3){await ei();const ra=setInterval(async()=>{try{await ei()}catch(Da){console.error("Auto-refresh error:",Da)}},yi);return()=>clearInterval(ra)}function Li(){d.value=null,z.value=null,j.value=null,l.value=!1,J.value="forward",mt.value=!0,kt.value=0,Dt.value=10}return{stats:d,isLoading:l,error:z,lastUpdated:j,currentMode:J,dutyCycleEnabled:mt,dutyCycleUtilization:kt,dutyCycleMax:Dt,cadCalibrationRunning:Gt,nodeName:re,pubKey:pe,hasStats:Ne,version:or,coreVersion:_r,noiseFloorDbm:Fr,dutyCyclePercentage:zr,statusBadge:Wr,modeButtonState:An,dutyCycleButtonState:Ft,fetchStats:ei,setMode:ai,setDutyCycle:Qi,sendAdvert:Gi,toggleMode:un,toggleDutyCycle:ia,startAutoRefresh:fa,reset:Li,setCadCalibrationRunning:kn}}),ld=(d,l)=>{const z=d.__vccOpts||d;for(const[j,J]of l)z[j]=J;return z},aQ={},oQ={width:"23",height:"25",viewBox:"0 0 23 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function sQ(d,l){return zi(),Vi("svg",oQ,l[0]||(l[0]=[Re("path",{d:"M2.84279 2.25795C2.90709 1.12053 3.17879 0.625914 3.95795 0.228723C4.79631 -0.198778 6.11858 0.000168182 7.67449 0.788054C8.34465 1.12757 8.41289 1.13448 9.58736 0.983905C11.1485 0.783681 13.1582 0.784388 14.5991 0.985738C15.6887 1.13801 15.7603 1.1304 16.4321 0.790174C18.6406 -0.328212 20.3842 -0.255036 21.0156 0.982491C21.3308 1.6002 21.3893 3.20304 21.1449 4.52503C21.0094 5.25793 21.0238 5.34943 21.3502 5.83037C23.6466 9.21443 21.9919 14.6998 18.0569 16.7469C17.7558 16.9036 17.502 17.0005 17.2952 17.0795C16.6602 17.3219 16.4674 17.3956 16.7008 18.5117C16.8132 19.0486 16.9486 20.3833 17.0018 21.478C17.098 23.4567 17.0966 23.4705 16.7495 23.8742C16.2772 24.4233 15.5963 24.4326 15.135 23.8962C14.8341 23.5464 14.8047 23.3812 14.8047 22.0315C14.8047 20.037 14.5861 18.7113 14.0695 17.5753C13.4553 16.2235 13.9106 15.7194 15.3154 15.4173C17.268 14.9973 18.793 13.7923 19.643 11.9978C20.4511 10.2921 20.5729 7.93485 19.1119 6.50124C18.6964 6.00746 18.6674 5.56022 18.9641 4.21159C19.075 3.70754 19.168 3.05725 19.1707 2.76637C19.1749 2.30701 19.1331 2.23764 18.8509 2.23764C18.6724 2.23764 17.9902 2.49736 17.3352 2.81474L16.2897 3.32145C16.1947 3.36751 16.0883 3.38522 15.9834 3.37318C13.3251 3.06805 10.7991 3.06334 8.12774 3.37438C8.02244 3.38663 7.91563 3.36892 7.82025 3.32263L6.77535 2.81559C6.12027 2.49764 5.43813 2.23764 5.25963 2.23764C4.84693 2.23764 4.84072 2.54233 5.2169 4.35258C5.44669 5.45816 5.60133 5.70451 4.93703 6.58851C3.94131 7.91359 3.69258 9.55902 4.22654 11.2878C4.89952 13.4664 6.54749 14.9382 8.86436 15.4292C10.261 15.7253 10.6261 16.1115 10.0928 17.713C9.67293 18.9734 9.40748 19.2982 8.79738 19.2982C7.97649 19.2982 7.46228 18.5871 7.74527 17.843C7.86991 17.5151 7.83283 17.4801 7.06383 17.1996C4.71637 16.3437 2.9209 14.4254 2.10002 11.8959C1.46553 9.94098 1.74471 7.39642 2.76257 5.85843C3.10914 5.33477 3.1145 5.29036 2.95277 4.28787C2.86126 3.72037 2.81177 2.80699 2.84279 2.25795Z",fill:"white"},null,-1),Re("path",{d:"M2.02306 16.5589C1.68479 16.0516 0.999227 15.9144 0.491814 16.2527C-0.0155884 16.591 -0.152708 17.2765 0.185564 17.7839C0.435301 18.1586 0.734065 18.4663 0.987777 18.72C1.03455 18.7668 1.08 18.8119 1.12438 18.856C1.3369 19.0671 1.52455 19.2535 1.71302 19.4748C2.12986 19.964 2.54572 20.623 2.78206 21.8047C2.88733 22.3311 3.26569 22.6147 3.47533 22.7386C3.70269 22.8728 3.9511 22.952 4.15552 23.0036C4.57369 23.109 5.08133 23.1638 5.56309 23.1957C6.09196 23.2308 6.665 23.2422 7.17743 23.2453C7.1778 23.8547 7.67202 24.3487 8.28162 24.3487C8.89146 24.3487 9.38582 23.8543 9.38582 23.2445V22.1403C9.38582 21.5305 8.89146 21.0361 8.28162 21.0361C8.17753 21.0361 8.06491 21.0364 7.94562 21.0369C7.29761 21.0389 6.45295 21.0414 5.70905 20.9922C5.35033 20.9684 5.05544 20.9347 4.8392 20.8936C4.50619 19.5863 3.96821 18.7165 3.39415 18.0426C3.14038 17.7448 2.87761 17.4842 2.66387 17.2722C2.62385 17.2326 2.58556 17.1946 2.54935 17.1584C2.30273 16.9118 2.1414 16.7365 2.02306 16.5589Z",fill:"white"},null,-1)]))}const lQ=ld(aQ,[["render",sQ]]),uQ={},cQ={width:"17",height:"24",viewBox:"0 0 17 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function hQ(d,l){return zi(),Vi("svg",cQ,l[0]||(l[0]=[Ff('',12)]))}const fQ=ld(uQ,[["render",hQ]]),rw=GA("packets",()=>{const d=lo(null),l=lo(null),z=lo([]),j=lo([]),J=lo(null),mt=lo(!1),kt=lo(null),Dt=lo(null),Gt=lo([]),re=lo([]),pe=Yo(()=>d.value!==null),Ne=Yo(()=>l.value!==null),or=Yo(()=>z.value.length>0),_r=Yo(()=>j.value.length>0),Fr=Yo(()=>J.value?.avg_noise_floor??0),zr=Yo(()=>d.value?.total_packets??0),Wr=Yo(()=>d.value?.avg_rssi??0),An=Yo(()=>d.value?.avg_snr??0),Ft=Yo(()=>l.value?.uptime_seconds??0),kn=Yo(()=>{if(!d.value?.packet_types)return[];const Ni=d.value.packet_types,Ei=Ni.reduce((Va,ss)=>Va+ss.count,0);return Ni.map(Va=>({type:Va.type.toString(),count:Va.count,percentage:Ei>0?Va.count/Ei*100:0}))}),ei=Yo(()=>{const Ni={};return z.value.forEach(Ei=>{Ni[Ei.type]||(Ni[Ei.type]=[]),Ni[Ei.type].push(Ei)}),Ni});async function jn(){try{const Ni=await Xh.get("/stats");if(Ni.success&&Ni.data){l.value=Ni.data;const Ei=new Date;return re.value.push({timestamp:Ei,stats:Ni.data}),re.value.length>50&&(re.value=re.value.slice(-50)),Ni.data}else if(Ni&&"version"in Ni){const Ei=Ni;l.value=Ei;const Va=new Date;return re.value.push({timestamp:Va,stats:Ei}),re.value.length>50&&(re.value=re.value.slice(-50)),Ei}else throw new Error(Ni.error||"Failed to fetch system stats")}catch(Ni){throw kt.value=Ni instanceof Error?Ni.message:"Unknown error occurred",console.error("Error fetching system stats:",Ni),Ni}}async function ai(Ni={hours:24}){try{const Ei=await Xh.get("/noise_floor_history",Ni);if(Ei.success&&Ei.data&&Ei.data.history)return j.value=Ei.data.history,Dt.value=new Date,Ei.data.history;throw new Error(Ei.error||"Failed to fetch noise floor history")}catch(Ei){throw kt.value=Ei instanceof Error?Ei.message:"Unknown error occurred",console.error("Error fetching noise floor history:",Ei),Ei}}async function Qi(Ni={hours:24}){try{const Ei=await Xh.get("/noise_floor_stats",Ni);if(Ei.success&&Ei.data&&Ei.data.stats)return J.value=Ei.data.stats,Dt.value=new Date,Ei.data.stats;throw new Error(Ei.error||"Failed to fetch noise floor stats")}catch(Ei){throw kt.value=Ei instanceof Error?Ei.message:"Unknown error occurred",console.error("Error fetching noise floor stats:",Ei),Ei}}const Gi=Yo(()=>!j.value||!Array.isArray(j.value)?[]:j.value.slice(-50).map(Ni=>Ni.noise_floor_dbm));async function un(Ni={hours:24}){try{mt.value=!0,kt.value=null;const Ei=await Xh.get("/packet_stats",Ni);if(Ei.success&&Ei.data){d.value=Ei.data;const Va=new Date;Gt.value.push({timestamp:Va,stats:Ei.data}),Gt.value.length>50&&(Gt.value=Gt.value.slice(-50)),Dt.value=Va}else throw new Error(Ei.error||"Failed to fetch packet stats")}catch(Ei){kt.value=Ei instanceof Error?Ei.message:"Unknown error occurred",console.error("Error fetching packet stats:",Ei)}finally{mt.value=!1}}async function ia(Ni={limit:100}){try{mt.value=!0,kt.value=null;const Ei=await Xh.get("/recent_packets",Ni);if(Ei.success&&Ei.data)z.value=Ei.data,Dt.value=new Date;else throw new Error(Ei.error||"Failed to fetch recent packets")}catch(Ei){kt.value=Ei instanceof Error?Ei.message:"Unknown error occurred",console.error("Error fetching recent packets:",Ei)}finally{mt.value=!1}}async function fa(Ni){try{mt.value=!0,kt.value=null;const Ei=await Xh.get("/filtered_packets",Ni);if(Ei.success&&Ei.data)return z.value=Ei.data,Dt.value=new Date,Ei.data;throw new Error(Ei.error||"Failed to fetch filtered packets")}catch(Ei){throw kt.value=Ei instanceof Error?Ei.message:"Unknown error occurred",console.error("Error fetching filtered packets:",Ei),Ei}finally{mt.value=!1}}async function Li(Ni){try{mt.value=!0,kt.value=null;const Ei=await Xh.get("/packet_by_hash",{packet_hash:Ni});if(Ei.success&&Ei.data)return Ei.data;throw new Error(Ei.error||"Packet not found")}catch(Ei){throw kt.value=Ei instanceof Error?Ei.message:"Unknown error occurred",console.error("Error fetching packet by hash:",Ei),Ei}finally{mt.value=!1}}const yi=Yo(()=>{const Ni=Gt.value,Ei=re.value;return{totalPackets:Ni.map(Va=>Va.stats.total_packets),transmittedPackets:Ni.map(Va=>Va.stats.transmitted_packets),droppedPackets:Ni.map(Va=>Va.stats.dropped_packets),avgRssi:Ni.map(Va=>Va.stats.avg_rssi),uptimeHours:Ei.map(Va=>Math.floor((Va.stats.uptime_seconds||0)/3600))}});async function ra(Ni=3e4){await Promise.all([jn(),un(),ia(),ai({hours:1}),Qi({hours:1})]);const Ei=setInterval(async()=>{try{await Promise.all([jn(),un(),ia(),ai({hours:1}),Qi({hours:1})])}catch(Va){console.error("Auto-refresh error:",Va)}},Ni);return()=>clearInterval(Ei)}function Da(){d.value=null,l.value=null,z.value=[],j.value=[],J.value=null,Gt.value=[],re.value=[],kt.value=null,Dt.value=null,mt.value=!1}return{packetStats:d,systemStats:l,recentPackets:z,noiseFloorHistory:j,noiseFloorStats:J,packetStatsHistory:Gt,systemStatsHistory:re,isLoading:mt,error:kt,lastUpdated:Dt,hasPacketStats:pe,hasSystemStats:Ne,hasRecentPackets:or,hasNoiseFloorData:_r,currentNoiseFloor:Fr,totalPackets:zr,averageRSSI:Wr,averageSNR:An,uptime:Ft,packetTypeBreakdown:kn,recentPacketsByType:ei,sparklineData:yi,noiseFloorSparklineData:Gi,fetchSystemStats:jn,fetchPacketStats:un,fetchRecentPackets:ia,fetchFilteredPackets:fa,getPacketByHash:Li,fetchNoiseFloorHistory:ai,fetchNoiseFloorStats:Qi,startAutoRefresh:ra,reset:Da}}),dQ={class:"glass-card-green p-5 relative overflow-hidden"},pQ={key:0,class:"absolute inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-10 rounded-lg"},mQ={class:"flex items-baseline gap-2 mb-8"},gQ={class:"text-primary text-2xl font-medium"},vQ={class:"absolute bottom-0 left-5 w-[196px] h-[30px]",viewBox:"0 0 196 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},yQ=["d"],xQ=["d"],_Q=["cy"],bQ=Th({__name:"RFNoiseFloor",setup(d){const l=rw(),z=sv(),j=lo(null),J=pe=>{if(pe.length<2)return"";const Ne=196,or=30,_r=4,Fr=-125,Wr=-105-Fr;let An="";return pe.forEach((Ft,kn)=>{const ei=kn/(pe.length-1)*Ne,jn=(Ft-Fr)/Wr,ai=or-jn*(or-_r*2)-_r;if(kn===0)An+=`M ${ei} ${ai}`;else{const Gi=((kn-1)/(pe.length-1)*Ne+ei)/2;An+=` Q ${Gi} ${ai} ${ei} ${ai}`}}),An},mt=async()=>{try{await Promise.all([l.fetchNoiseFloorHistory({hours:1}),l.fetchNoiseFloorStats({hours:1})])}catch(pe){console.error("Error fetching noise floor data:",pe)}};t0(()=>{mt(),j.value=window.setInterval(mt,5e3)}),dg(()=>{j.value&&clearInterval(j.value)});const kt=Yo(()=>{const pe=l.noiseFloorSparklineData;return pe&&pe.length>0?pe[pe.length-1]:l.noiseFloorStats?.avg_noise_floor??-116}),Dt=Yo(()=>l.noiseFloorSparklineData),Gt=Yo(()=>J(Dt.value)),re=Yo(()=>{if(Dt.value.length===0)return 15;const pe=Dt.value[Dt.value.length-1],Ne=-125,_r=-105-Ne;return 30-(pe-Ne)/_r*22-4});return(pe,Ne)=>(zi(),Vi("div",dQ,[Ju(z).cadCalibrationRunning?(zi(),Vi("div",pQ,Ne[0]||(Ne[0]=[Ff('
CAD Calibration

In Progress

',1)]))):bs("",!0),Ne[4]||(Ne[4]=Re("p",{class:"text-dark-text text-xs uppercase mb-2"},"RF NOISE FLOOR",-1)),Re("div",mQ,[Re("span",gQ,aa(kt.value),1),Ne[1]||(Ne[1]=Re("span",{class:"text-dark-text text-xs uppercase"},"dBm",-1))]),(zi(),Vi("svg",vQ,[Ne[3]||(Ne[3]=Ff('',1)),Dt.value.length>1?(zi(),Vi("path",{key:0,d:`${Gt.value} L 196 30 L 0 30 Z`,fill:"url(#rf-noise-gradient)",class:"transition-all duration-500 ease-out"},null,8,yQ)):bs("",!0),Dt.value.length>1?(zi(),Vi("path",{key:1,d:Gt.value,stroke:"#B1FFFF","stroke-width":"2",fill:"none",filter:"url(#line-glow)",class:"transition-all duration-500 ease-out"},null,8,xQ)):bs("",!0),Dt.value.length>0?(zi(),Vi("circle",{key:2,cx:196,cy:re.value,r:"2",fill:"#B1FFFF",class:"animate-pulse"},Ne[2]||(Ne[2]=[Re("animate",{attributeName:"r",values:"2;3;2",dur:"2s",repeatCount:"indefinite"},null,-1)]),8,_Q)):bs("",!0)]))]))}}),wQ=ld(bQ,[["__scopeId","data-v-ad12b3cb"]]),kQ={},TQ={width:"800px",height:"800px",viewBox:"0 -1.5 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"w-full h-full"};function AQ(d,l){return zi(),Vi("svg",TQ,l[0]||(l[0]=[Re("g",{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[Re("g",{transform:"translate(-420.000000, -3641.000000)",fill:"currentColor"},[Re("g",{id:"icons",transform:"translate(56.000000, 160.000000)"},[Re("path",{d:"M378.195439,3483.828 L376.781439,3485.242 C378.195439,3486.656 378.294439,3489.588 376.880439,3491.002 L378.294439,3492.417 C380.415439,3490.295 380.316439,3485.949 378.195439,3483.828 M381.023439,3481 L379.609439,3482.414 C382.438439,3485.242 382.537439,3491.002 379.708439,3493.831 L381.122439,3495.245 C385.365439,3491.002 384.559439,3484.535 381.023439,3481 M375.432439,3486.737 C375.409439,3486.711 375.392439,3486.682 375.367439,3486.656 L375.363439,3486.66 C374.582439,3485.879 373.243439,3485.952 372.536439,3486.659 C371.829439,3487.366 371.831439,3488.778 372.538439,3489.485 C372.547439,3489.494 372.558439,3489.499 372.567439,3489.508 C372.590439,3489.534 372.607439,3489.563 372.632439,3489.588 L372.636439,3489.585 C373.201439,3490.15 373.000439,3488.284 373.000439,3498 L375.000439,3498 C375.000439,3488.058 374.753439,3490.296 375.463439,3489.586 C376.170439,3488.879 376.168439,3487.467 375.461439,3486.76 C375.452439,3486.751 375.441439,3486.746 375.432439,3486.737 M371.119439,3485.242 L369.705439,3483.828 C367.584439,3485.949 367.683439,3490.295 369.804439,3492.417 L371.218439,3491.002 C369.804439,3489.588 369.705439,3486.656 371.119439,3485.242 M368.390439,3493.831 L366.976439,3495.245 C363.440439,3491.709 362.634439,3485.242 366.877439,3481 L368.291439,3482.414 C365.462439,3485.242 365.561439,3491.002 368.390439,3493.831",id:"radio_tower-[#1019]"})])])],-1)]))}const MQ=ld(kQ,[["render",AQ]]),SQ={class:"text-center"},EQ={class:"relative flex items-center justify-center mb-8"},CQ={class:"relative w-32 h-32"},LQ={class:"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2"},PQ={key:0,class:"absolute inset-0 flex items-center justify-center"},zQ={key:1,class:"absolute inset-0 flex items-center justify-center"},IQ={key:2,class:"absolute inset-0"},OQ={class:"mb-6"},DQ={key:0,class:"text-white text-lg"},FQ={key:1,class:"text-accent-green text-lg font-medium"},RQ={key:2,class:"text-secondary text-lg"},BQ={key:3,class:"text-accent-red text-lg"},NQ={key:4,class:"text-dark-text"},jQ={key:5,class:"mt-3"},UQ={key:0,class:"text-secondary text-sm"},VQ={key:1,class:"text-accent-red text-sm"},HQ={key:0,class:"flex gap-3"},WQ={key:1,class:"text-dark-text text-sm"},qQ=Th({name:"AdvertModal",__name:"AdvertModal",props:{isOpen:{type:Boolean},isLoading:{type:Boolean},isSuccess:{type:Boolean},error:{default:null}},emits:["close","send"],setup(d,{emit:l}){const z=d,j=l,J=lo(!1),mt=lo(!1),kt=lo(!1);um(()=>z.isOpen,pe=>{pe?(J.value=!0,setTimeout(()=>{mt.value=!0},50)):(mt.value=!1,kt.value=!1,setTimeout(()=>{J.value=!1},300))},{immediate:!0}),um(()=>z.isLoading,pe=>{pe||setTimeout(()=>{kt.value=!1},1e3)});const Dt=()=>{z.isLoading||j("close")},Gt=()=>{z.isLoading||(kt.value=!0,j("send"))},re=pe=>pe?.includes("Network error - no response received")||pe?.includes("timeout");return(pe,Ne)=>(zi(),hm($z,{to:"body"},[J.value?(zi(),Vi("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4",onClick:hg(Dt,["self"])},[Re("div",{class:Xs(["absolute inset-0 bg-black/60 backdrop-blur-sm transition-opacity duration-300",mt.value?"opacity-100":"opacity-0"])},null,2),Re("div",{class:Xs(["relative glass-card rounded-[20px] p-8 max-w-md w-full transform transition-all duration-300",mt.value?"scale-100 opacity-100":"scale-95 opacity-0"])},[pe.isLoading?bs("",!0):(zi(),Vi("button",{key:0,onClick:Dt,class:"absolute top-4 right-4 text-dark-text hover:text-white transition-colors p-2"},Ne[0]||(Ne[0]=[Re("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))),Re("div",SQ,[Ne[6]||(Ne[6]=Re("h2",{class:"text-white text-xl font-semibold mb-6"},"Send Advertisement",-1)),Re("div",EQ,[Re("div",CQ,[Re("div",LQ,[gu(MQ,{class:Xs(["w-16 h-16 transition-all duration-500",[pe.isLoading?"animate-pulse":"",pe.isSuccess?"text-accent-green":pe.error&&!re(pe.error)?"text-accent-red":"text-primary"]]),style:av({filter:pe.isLoading?"drop-shadow(0 0 8px currentColor)":pe.isSuccess?"drop-shadow(0 0 8px #A5E5B6)":pe.error&&!re(pe.error)?"drop-shadow(0 0 8px #FB787B)":"drop-shadow(0 0 4px #AAE8E8)"})},null,8,["class","style"])]),pe.isLoading||pe.isSuccess?(zi(),Vi("div",PQ,[Re("div",{class:Xs(["absolute w-16 h-16 rounded-full border-2 animate-ping",[pe.isSuccess?"border-accent-green/60":"border-primary/60"]]),style:{"animation-duration":"1.5s"}},null,2),Re("div",{class:Xs(["absolute w-24 h-24 rounded-full border-2 animate-ping",[pe.isSuccess?"border-accent-green/40":"border-primary/40"]]),style:{"animation-duration":"2s","animation-delay":"0.3s"}},null,2),Re("div",{class:Xs(["absolute w-32 h-32 rounded-full border-2 animate-ping",[pe.isSuccess?"border-accent-green/20":"border-primary/20"]]),style:{"animation-duration":"2.5s","animation-delay":"0.6s"}},null,2)])):bs("",!0),kt.value?(zi(),Vi("div",zQ,Ne[1]||(Ne[1]=[Re("div",{class:"absolute w-8 h-8 rounded-full border-4 border-secondary animate-ping-fast"},null,-1),Re("div",{class:"absolute w-16 h-16 rounded-full border-3 border-secondary/70 animate-ping-fast",style:{"animation-delay":"0.1s"}},null,-1),Re("div",{class:"absolute w-24 h-24 rounded-full border-2 border-secondary/50 animate-ping-fast",style:{"animation-delay":"0.2s"}},null,-1),Re("div",{class:"absolute w-32 h-32 rounded-full border-2 border-secondary/30 animate-ping-fast",style:{"animation-delay":"0.3s"}},null,-1)]))):bs("",!0),pe.isLoading||pe.isSuccess?(zi(),Vi("div",IQ,[Re("div",{class:Xs(["absolute top-2 right-2 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[pe.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"0.5s"}},Ne[2]||(Ne[2]=[Re("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2),Re("div",{class:Xs(["absolute bottom-2 left-2 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[pe.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"1s"}},Ne[3]||(Ne[3]=[Re("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2),Re("div",{class:Xs(["absolute top-1/2 right-1 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[pe.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"1.5s",transform:"translateY(-50%)"}},Ne[4]||(Ne[4]=[Re("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2),Re("div",{class:Xs(["absolute top-3 left-3 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[pe.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"2s"}},Ne[5]||(Ne[5]=[Re("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2)])):bs("",!0)])]),Re("div",OQ,[pe.isLoading?(zi(),Vi("p",DQ," Broadcasting advertisement... ")):pe.isSuccess?(zi(),Vi("p",FQ," Advertisement sent successfully! ")):pe.error&&re(pe.error)?(zi(),Vi("p",RQ," Advertisement likely sent ")):pe.error?(zi(),Vi("p",BQ," Failed to send advertisement ")):(zi(),Vi("p",NQ," This will broadcast your node's presence to nearby nodes. ")),pe.error?(zi(),Vi("div",jQ,[re(pe.error)?(zi(),Vi("p",UQ," Network timeout occurred, but the advertisement may have been successfully transmitted to nearby nodes. ")):(zi(),Vi("p",VQ,aa(pe.error),1))])):bs("",!0)]),!pe.isLoading&&!pe.isSuccess?(zi(),Vi("div",HQ,[Re("button",{onClick:Dt,class:"flex-1 glass-card border border-dark-border hover:border-primary rounded-[10px] px-6 py-3 text-dark-text hover:text-white transition-all duration-200"}," Cancel "),Re("button",{onClick:Gt,class:Xs(["flex-1 rounded-[10px] px-6 py-3 font-medium transition-all duration-200 shadow-lg",[pe.error&&re(pe.error)?"bg-secondary hover:bg-secondary/90 text-dark-bg hover:shadow-secondary/20":"bg-primary hover:bg-primary/90 text-dark-bg hover:shadow-primary/20"]])},aa(pe.error&&re(pe.error)?"Try Again":"Send Advertisement"),3)])):bs("",!0),pe.isSuccess?(zi(),Vi("div",WQ," Closing automatically... ")):bs("",!0)])],2)])):bs("",!0)]))}}),ZQ=ld(qQ,[["__scopeId","data-v-a5eb8c7f"]]),$Q={},GQ={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function YQ(d,l){return zi(),Vi("svg",GQ,l[0]||(l[0]=[Ff('',2)]))}const TO=ld($Q,[["render",YQ]]),KQ={},XQ={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function JQ(d,l){return zi(),Vi("svg",XQ,l[0]||(l[0]=[Ff('',9)]))}const AO=ld(KQ,[["render",JQ]]),QQ={},ttt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ett(d,l){return zi(),Vi("svg",ttt,l[0]||(l[0]=[Ff('',2)]))}const MO=ld(QQ,[["render",ett]]),rtt={},ntt={width:"11",height:"14",viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function itt(d,l){return zi(),Vi("svg",ntt,l[0]||(l[0]=[Re("path",{d:"M9.81633 1.99133L8.5085 0.683492C8.29229 0.466088 8.03511 0.293723 7.75185 0.176372C7.46859 0.059021 7.16486 -0.000985579 6.85825 -0.000175002H1.75C1.28587 -0.000175002 0.840752 0.184199 0.512563 0.512388C0.184375 0.840577 0 1.2857 0 1.74983V13.9998H10.5V3.64099C10.4985 3.02248 10.2528 2.4296 9.81633 1.99133ZM8.9915 2.81616C9.02083 2.84799 9.04829 2.88149 9.07375 2.91649H7.58333V1.42608C7.61834 1.45153 7.65184 1.479 7.68367 1.50833L8.9915 2.81616ZM1.16667 12.8332V1.74983C1.16667 1.59512 1.22812 1.44674 1.33752 1.33735C1.44692 1.22795 1.59529 1.16649 1.75 1.16649H6.41667V4.08316H9.33333V12.8332H1.16667ZM2.33333 9.33316H8.16667V5.83316H2.33333V9.33316ZM3.5 6.99983H7V8.16649H3.5V6.99983ZM2.33333 10.4998H8.16667V11.6665H2.33333V10.4998Z",fill:"white"},null,-1)]))}const SO=ld(rtt,[["render",itt]]),att={},ott={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function stt(d,l){return zi(),Vi("svg",ott,l[0]||(l[0]=[Ff('',2)]))}const EO=ld(att,[["render",stt]]),ltt={},utt={width:"11",height:"14",viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ctt(d,l){return zi(),Vi("svg",utt,l[0]||(l[0]=[Re("path",{d:"M10.5 14.0004H9.33333V11.0586C9.33287 10.6013 9.15099 10.1628 8.82761 9.83942C8.50422 9.51603 8.06575 9.33415 7.60842 9.33369H2.89158C2.43425 9.33415 1.99578 9.51603 1.67239 9.83942C1.34901 10.1628 1.16713 10.6013 1.16667 11.0586V14.0004H0V11.0586C0.000926233 10.292 0.305872 9.55705 0.847948 9.01497C1.39002 8.47289 2.12497 8.16795 2.89158 8.16702H7.60842C8.37503 8.16795 9.10998 8.47289 9.65205 9.01497C10.1941 9.55705 10.4991 10.292 10.5 11.0586V14.0004Z",fill:"white"},null,-1),Re("path",{d:"M5.25 6.99997C4.55777 6.99997 3.88108 6.7947 3.30551 6.41011C2.72993 6.02553 2.28133 5.4789 2.01642 4.83936C1.75152 4.19982 1.6822 3.49609 1.81725 2.81716C1.9523 2.13822 2.28564 1.51458 2.77513 1.0251C3.26461 0.535614 3.88825 0.202271 4.56719 0.0672226C5.24612 -0.0678257 5.94985 0.00148598 6.58939 0.266393C7.22894 0.531299 7.77556 0.979903 8.16015 1.55548C8.54473 2.13105 8.75 2.80774 8.75 3.49997C8.74908 4.42794 8.38003 5.31765 7.72385 5.97382C7.06768 6.63 6.17798 6.99904 5.25 6.99997ZM5.25 1.16664C4.78851 1.16664 4.33739 1.30349 3.95367 1.55988C3.56996 1.81627 3.27089 2.18068 3.09428 2.60704C2.91768 3.0334 2.87147 3.50256 2.9615 3.95518C3.05153 4.4078 3.27376 4.82357 3.60009 5.14989C3.92641 5.47621 4.34217 5.69844 4.79479 5.78847C5.24741 5.8785 5.71657 5.83229 6.14293 5.65569C6.56929 5.47909 6.93371 5.18002 7.1901 4.7963C7.44649 4.41259 7.58334 3.96146 7.58334 3.49997C7.58334 2.88113 7.3375 2.28764 6.89992 1.85006C6.46233 1.41247 5.86884 1.16664 5.25 1.16664Z",fill:"white"},null,-1)]))}const CO=ld(ltt,[["render",ctt]]),htt={},ftt={width:"11",height:"13",viewBox:"0 0 11 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function dtt(d,l){return zi(),Vi("svg",ftt,l[0]||(l[0]=[Re("path",{d:"M6.77889 9.16667H10.1122V12.5M4.11222 3.83333H0.77889V0.5M10.3906 4.50227C10.0168 3.57711 9.39097 2.77536 8.58423 2.18815C7.77749 1.60094 6.82233 1.25168 5.82707 1.18034C4.8318 1.109 3.83627 1.31827 2.95402 1.78441C2.07177 2.25055 1.3381 2.95503 0.836182 3.81742M0.500244 8.49805C0.874034 9.42321 1.49986 10.225 2.30661 10.8122C3.11335 11.3994 4.06948 11.7482 5.06474 11.8195C6.06001 11.8909 7.05473 11.6816 7.93697 11.2155C8.81922 10.7494 9.55239 10.045 10.0543 9.18262",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const ptt=ld(htt,[["render",dtt]]),mtt={},gtt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function vtt(d,l){return zi(),Vi("svg",gtt,l[0]||(l[0]=[Ff('',2)]))}const ytt=ld(mtt,[["render",vtt]]),xtt={class:"w-[285px] flex-shrink-0 p-[15px] hidden lg:block"},_tt={class:"glass-card h-full p-6"},btt={class:"mb-12"},wtt={class:"text-[#C3C3C3] text-sm"},ktt=["title"],Ttt={class:"text-[#C3C3C3] text-sm mt-1"},Att={class:"mb-8"},Mtt={class:"mb-8"},Stt={class:"space-y-2"},Ett=["onClick"],Ctt={class:"mb-8"},Ltt={class:"space-y-2"},Ptt=["onClick"],ztt=["disabled"],Itt={class:"flex items-center gap-3"},Ott=["disabled"],Dtt={class:"flex items-center gap-3"},Ftt={class:"mb-4"},Rtt={class:"flex items-center gap-2"},Btt={class:"glass-card px-2 py-1 text-dark-text text-xs font-medium rounded border border-dark-border"},Ntt={class:"glass-card px-2 py-1 text-dark-text text-xs font-medium rounded border border-dark-border"},jtt={key:0,class:"mb-4"},Utt={class:"text-dark-text text-xs mb-2"},Vtt={class:"text-white"},Htt={class:"w-full h-1 bg-white/10 rounded-full overflow-hidden"},Wtt={class:"flex items-center justify-between"},qtt={class:"flex items-center gap-2 text-dark-text text-xs"},Ztt={class:"flex items-center gap-2"},$tt={href:"https://github.com/rightup",target:"_blank",class:"inline-block"},Gtt={href:"https://buymeacoffee.com/rightup",target:"_blank",class:"inline-block"},Ytt=Th({name:"SidebarNav",__name:"Sidebar",setup(d){const l=JI(),z=QI(),j=sv(),J=lo(!1),mt=lo(!1),kt=lo(!1),Dt=lo(!1),Gt=lo(!1),re=lo(null);let pe=null;t0(async()=>{pe=await j.startAutoRefresh(5e3)}),K2(()=>{pe&&pe()});const Ne={dashboard:AO,neighbors:CO,statistics:EO,configuration:TO,logs:SO,help:MO},or=[{name:"Dashboard",icon:"dashboard",route:"/"},{name:"Neighbors",icon:"neighbors",route:"/neighbors"},{name:"Statistics",icon:"statistics",route:"/statistics"},{name:"Configuration",icon:"configuration",route:"/configuration"},{name:"Logs",icon:"logs",route:"/logs"},{name:"Help",icon:"help",route:"/help"}],_r=Yo(()=>jn=>z.path===jn),Fr=jn=>{l.push(jn)},zr=async()=>{J.value=!0,re.value=null;try{await j.sendAdvert(),Gt.value=!0,setTimeout(()=>{Wr()},2e3)}catch(jn){re.value=jn instanceof Error?jn.message:"Unknown error occurred",console.error("Failed to send advert:",jn)}finally{J.value=!1}},Wr=()=>{Dt.value=!1,Gt.value=!1,re.value=null,J.value=!1},An=async()=>{if(!mt.value){mt.value=!0;try{await j.toggleMode()}catch(jn){console.error("Failed to toggle mode:",jn)}finally{mt.value=!1}}},Ft=async()=>{if(!kt.value){kt.value=!0;try{await j.toggleDutyCycle()}catch(jn){console.error("Failed to toggle duty cycle:",jn)}finally{kt.value=!1}}},kn=lo(new Date().toLocaleTimeString());setInterval(()=>{kn.value=new Date().toLocaleTimeString()},1e3);const ei=Yo(()=>{const jn=j.dutyCyclePercentage;let ai="#A5E5B6";return jn>90?ai="#FB787B":jn>70&&(ai="#FFC246"),{width:jn===0?"2px":`${Math.max(jn,2)}%`,backgroundColor:ai}});return(jn,ai)=>(zi(),Vi(Ou,null,[Re("aside",xtt,[Re("div",_tt,[Re("div",btt,[ai[1]||(ai[1]=Re("h1",{class:"text-white text-[22px] font-bold mb-2"},"pyMC Repeater",-1)),Re("p",wtt,[nc(aa(Ju(j).nodeName)+" ",1),Re("span",{class:Xs(["inline-block w-2 h-2 rounded-full ml-2",Ju(j).statusBadge.text==="Active"?"bg-accent-green":Ju(j).statusBadge.text==="Monitor Mode"?"bg-secondary":"bg-accent-red"]),title:Ju(j).statusBadge.title},null,10,ktt)]),Re("p",Ttt,"<"+aa(Ju(j).pubKey)+">",1)]),ai[10]||(ai[10]=Re("div",{class:"border-t border-dark-border mb-6"},null,-1)),Re("div",Att,[ai[3]||(ai[3]=Re("p",{class:"text-dark-text text-xs uppercase mb-4"},"Actions",-1)),Re("button",{onClick:ai[0]||(ai[0]=Qi=>Dt.value=!0),class:"w-full bg-white rounded-[10px] py-3 px-4 flex items-center gap-2 text-sm font-medium text-[#212122] hover:bg-gray-100 transition-colors"},ai[2]||(ai[2]=[Re("svg",{class:"w-3.5 h-3.5",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Re("path",{d:"M7 0C5.61553 0 4.26216 0.410543 3.11101 1.17971C1.95987 1.94888 1.06266 3.04213 0.532846 4.32122C0.003033 5.6003 -0.13559 7.00777 0.134506 8.36563C0.404603 9.7235 1.07129 10.9708 2.05026 11.9497C3.02922 12.9287 4.2765 13.5954 5.63437 13.8655C6.99224 14.1356 8.3997 13.997 9.67879 13.4672C10.9579 12.9373 12.0511 12.0401 12.8203 10.889C13.5895 9.73785 14 8.38447 14 7C13.998 5.1441 13.2599 3.36479 11.9475 2.05247C10.6352 0.74015 8.8559 0.0020073 7 0V0ZM7 12.8333C5.84628 12.8333 4.71846 12.4912 3.75918 11.8502C2.79989 11.2093 2.05222 10.2982 1.61071 9.23232C1.16919 8.16642 1.05368 6.99353 1.27876 5.86197C1.50384 4.73042 2.05941 3.69102 2.87521 2.87521C3.69102 2.0594 4.73042 1.50383 5.86198 1.27875C6.99353 1.05367 8.16642 1.16919 9.23232 1.6107C10.2982 2.05221 11.2093 2.79989 11.8502 3.75917C12.4912 4.71846 12.8333 5.84628 12.8333 7C12.8316 8.54658 12.2165 10.0293 11.1229 11.1229C10.0293 12.2165 8.54658 12.8316 7 12.8333ZM8.16667 7C8.1676 7.20501 8.11448 7.40665 8.01268 7.58461C7.91087 7.76256 7.76397 7.91054 7.58677 8.01365C7.40957 8.11676 7.20833 8.17136 7.00332 8.17194C6.7983 8.17252 6.59675 8.11906 6.41897 8.01696C6.24119 7.91485 6.09346 7.7677 5.99065 7.59033C5.88784 7.41295 5.83358 7.21162 5.83335 7.0066C5.83312 6.80159 5.88691 6.60013 5.98932 6.42252C6.09172 6.24491 6.23912 6.09743 6.41667 5.99492V3.5H7.58334V5.99492C7.76016 6.09659 7.90713 6.24298 8.00952 6.41939C8.1119 6.5958 8.1661 6.79603 8.16667 7Z",fill:"#212122"})],-1),nc(" Send Advert ",-1)]))]),Re("div",Mtt,[ai[4]||(ai[4]=Re("p",{class:"text-dark-text text-xs uppercase mb-4"},"Monitoring",-1)),Re("div",Stt,[(zi(!0),Vi(Ou,null,sf(or.slice(0,3),Qi=>(zi(),Vi("button",{key:Qi.name,onClick:Gi=>Fr(Qi.route),class:Xs([_r.value(Qi.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(zi(),hm(a4(Ne[Qi.icon]),{class:"w-3.5 h-3.5"})),nc(" "+aa(Qi.name),1)],10,Ett))),128))])]),Re("div",Ctt,[ai[5]||(ai[5]=Re("p",{class:"text-dark-text text-xs uppercase mb-4"},"System",-1)),Re("div",Ltt,[(zi(!0),Vi(Ou,null,sf(or.slice(3),Qi=>(zi(),Vi("button",{key:Qi.name,onClick:Gi=>Fr(Qi.route),class:Xs([_r.value(Qi.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(zi(),hm(a4(Ne[Qi.icon]),{class:"w-3.5 h-3.5"})),nc(" "+aa(Qi.name),1)],10,Ptt))),128))])]),gu(wQ,{"current-value":Ju(j).noiseFloorDbm||-116,"update-interval":3e3,class:"mb-6"},null,8,["current-value"]),Re("button",{onClick:An,disabled:mt.value,class:Xs(["p-4 flex items-center justify-between mb-4 w-full transition-all duration-200 cursor-pointer group",Ju(j).modeButtonState.warning?"glass-card-orange hover:bg-accent-red/10":"glass-card-green hover:bg-accent-green/10"])},[Re("div",Itt,[gu(ptt,{class:"w-4 h-4 text-white group-hover:text-primary transition-colors"}),ai[6]||(ai[6]=Re("span",{class:"text-white text-sm group-hover:text-primary transition-colors"},"Mode",-1))]),Re("span",{class:Xs(["text-xs font-medium group-hover:text-white transition-colors",Ju(j).modeButtonState.warning?"text-accent-red":"text-accent-green"])},aa(mt.value?"Changing...":Ju(j).currentMode.charAt(0).toUpperCase()+Ju(j).currentMode.slice(1)),3)],10,ztt),Re("button",{onClick:Ft,disabled:kt.value,class:Xs(["p-4 flex items-center justify-between mb-4 w-full transition-all duration-200 cursor-pointer group",Ju(j).dutyCycleButtonState.warning?"glass-card-orange hover:bg-accent-red/10":"glass-card-green hover:bg-accent-green/10"])},[Re("div",Dtt,[gu(ytt,{class:"w-3.5 h-3.5 text-white group-hover:text-primary transition-colors"}),ai[7]||(ai[7]=Re("span",{class:"text-white text-sm group-hover:text-primary transition-colors"},"Duty Cycle",-1))]),Re("span",{class:Xs(["text-xs font-medium group-hover:text-white transition-colors",Ju(j).dutyCycleButtonState.warning?"text-accent-red":"text-primary"])},aa(kt.value?"Changing...":Ju(j).dutyCycleEnabled?"Enabled":"Disabled"),3)],10,Ott),Re("div",Ftt,[Re("div",Rtt,[Re("span",Btt," R:v"+aa(Ju(j).version),1),Re("span",Ntt," C:v"+aa(Ju(j).coreVersion),1)])]),ai[11]||(ai[11]=Re("div",{class:"border-t border-accent-green mb-4"},null,-1)),Ju(j).dutyCycleEnabled?(zi(),Vi("div",jtt,[Re("p",Utt,[ai[8]||(ai[8]=nc(" Duty Cycle: ",-1)),Re("span",Vtt,aa(Ju(j).dutyCycleUtilization.toFixed(1))+"% / "+aa(Ju(j).dutyCycleMax.toFixed(1))+"%",1)]),Re("div",Htt,[Re("div",{class:"h-full rounded-full transition-all duration-300",style:av(ei.value)},null,4)])])):bs("",!0),Re("div",Wtt,[Re("div",qtt,[ai[9]||(ai[9]=Re("svg",{class:"w-3 h-3",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Re("path",{d:"M6.5 13C5.59722 13 4.75174 12.8286 3.96355 12.4858C3.17537 12.143 2.48926 11.6795 1.90522 11.0955C1.32119 10.5115 0.85776 9.82535 0.514945 9.03717C0.172131 8.24898 0.000482491 7.40326 1.0101e-06 6.5C-0.000480471 5.59674 0.171168 4.75126 0.514945 3.96356C0.858723 3.17585 1.32191 2.48974 1.9045 1.90522C2.48709 1.3207 3.1732 0.857278 3.96283 0.514944C4.75246 0.172611 5.59818 0.000962963 6.5 0C7.48703 0 8.42303 0.210648 9.30799 0.631944C10.193 1.05324 10.9421 1.64907 11.5555 2.41944V1.44444C11.5555 1.23981 11.6249 1.06841 11.7635 0.930222C11.9022 0.792037 12.0736 0.722704 12.2778 0.722222C12.4819 0.721741 12.6536 0.791074 12.7927 0.930222C12.9319 1.06937 13.001 1.24078 13 1.44444V4.33333C13 4.53796 12.9307 4.70961 12.792 4.84828C12.6533 4.98694 12.4819 5.05604 12.2778 5.05556H9.38888C9.18425 5.05556 9.01285 4.98622 8.87466 4.84756C8.73647 4.70889 8.66714 4.53748 8.66666 4.33333C8.66618 4.12919 8.73551 3.95778 8.87466 3.81911C9.01381 3.68044 9.18521 3.61111 9.38888 3.61111H10.6528C10.1593 2.93704 9.55138 2.40741 8.82916 2.02222C8.10694 1.63704 7.33055 1.44444 6.5 1.44444C5.09166 1.44444 3.89711 1.93507 2.91633 2.91633C1.93555 3.89759 1.44493 5.09215 1.44444 6.5C1.44396 7.90785 1.93459 9.10265 2.91633 10.0844C3.89807 11.0661 5.09263 11.5565 6.5 11.5556C7.64351 11.5556 8.66666 11.2125 9.56944 10.5264C10.4722 9.84028 11.068 8.95555 11.3569 7.87222C11.4171 7.67963 11.5255 7.53519 11.6819 7.43889C11.8384 7.34259 12.013 7.30648 12.2055 7.33055C12.4102 7.35463 12.5727 7.44178 12.693 7.592C12.8134 7.74222 12.8495 7.90785 12.8014 8.08889C12.4523 9.5213 11.694 10.698 10.5264 11.6191C9.35879 12.5402 8.01666 13.0005 6.5 13ZM7.22222 6.21111L9.02777 8.01667C9.16018 8.14907 9.22638 8.31759 9.22638 8.52222C9.22638 8.72685 9.16018 8.89537 9.02777 9.02778C8.89536 9.16018 8.72685 9.22639 8.52222 9.22639C8.31759 9.22639 8.14907 9.16018 8.01666 9.02778L5.99444 7.00556C5.92222 6.93333 5.86805 6.8522 5.83194 6.76217C5.79583 6.67213 5.77777 6.57872 5.77777 6.48194V3.61111C5.77777 3.40648 5.84711 3.23507 5.98577 3.09689C6.12444 2.9587 6.29585 2.88937 6.5 2.88889C6.70414 2.88841 6.87579 2.95774 7.01494 3.09689C7.15409 3.23604 7.22318 3.40744 7.22222 3.61111V6.21111Z",fill:"currentColor"})],-1)),nc(" Last Updated: "+aa(kn.value),1)]),Re("div",Ztt,[Re("a",$tt,[gu(lQ,{class:"w-4 h-4 text-dark-text hover:text-white transition-colors"})]),Re("a",Gtt,[gu(fQ,{class:"w-4 h-4 text-dark-text hover:text-white transition-colors"})])])])])]),gu(ZQ,{isOpen:Dt.value,isLoading:J.value,isSuccess:Gt.value,error:re.value,onClose:Wr,onSend:zr},null,8,["isOpen","isLoading","isSuccess","error"])],64))}}),Ktt={key:0,class:"fixed inset-0 z-40 lg:hidden"},Xtt={class:"absolute left-0 top-0 bottom-0 w-72 p-4"},Jtt={class:"glass-card h-full p-6 overflow-auto"},Qtt={class:"mb-4"},tet={class:"space-y-2 mb-3"},eet=["onClick"],ret={class:"mb-4"},net={class:"space-y-2 mb-3"},iet=["onClick"],aet=Th({name:"MobileSidebar",__name:"MobileSidebar",props:{showMobileSidebar:{type:Boolean}},emits:["update:showMobileSidebar"],setup(d,{emit:l}){const z=l,j=JI(),J=QI(),mt={dashboard:AO,neighbors:CO,statistics:EO,configuration:TO,logs:SO,help:MO},kt=[{name:"Dashboard",icon:"dashboard",route:"/"},{name:"Neighbors",icon:"neighbors",route:"/neighbors"},{name:"Statistics",icon:"statistics",route:"/statistics"},{name:"Configuration",icon:"configuration",route:"/configuration"},{name:"Logs",icon:"logs",route:"/logs"},{name:"Help",icon:"help",route:"/help"}],Dt=pe=>J.path===pe,Gt=pe=>{j.push(pe),re()},re=()=>{z("update:showMobileSidebar",!1)};return(pe,Ne)=>pe.showMobileSidebar?(zi(),Vi("div",Ktt,[Re("div",{class:"absolute inset-0 bg-black/50",onClick:re}),Re("div",Xtt,[Re("div",Jtt,[Re("div",{class:"mb-6 flex items-center justify-between"},[Ne[0]||(Ne[0]=Re("div",null,[Re("h1",{class:"text-white text-[20px] font-bold"},"pyMC Repeater"),Re("p",{class:"text-[#C3C3C3] text-sm"},[nc("phenix-rep56 "),Re("span",{class:"inline-block w-2 h-2 rounded-full bg-[#95F3AE] ml-2"})])],-1)),Re("button",{onClick:re,class:"text-dark-text"},"✕")]),Ne[5]||(Ne[5]=Re("div",{class:"border-t border-dark-border mb-4"},null,-1)),Re("div",null,[Ne[3]||(Ne[3]=Ff('

pyMC Repeater

phenix-rep56

<94eib04...4563ghbjbjn>

Actions

',3)),Re("div",Qtt,[Ne[1]||(Ne[1]=Re("p",{class:"text-dark-text text-xs uppercase mb-2"},"Monitoring",-1)),Re("div",tet,[(zi(!0),Vi(Ou,null,sf(kt.slice(0,3),or=>(zi(),Vi("button",{key:or.name,onClick:_r=>Gt(or.route),class:Xs([Dt(or.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(zi(),hm(a4(mt[or.icon]),{class:"w-3.5 h-3.5"})),nc(" "+aa(or.name),1)],10,eet))),128))])]),Re("div",ret,[Ne[2]||(Ne[2]=Re("p",{class:"text-dark-text text-xs uppercase mb-2"},"System",-1)),Re("div",net,[(zi(!0),Vi(Ou,null,sf(kt.slice(3),or=>(zi(),Vi("button",{key:or.name,onClick:_r=>Gt(or.route),class:Xs([Dt(or.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(zi(),hm(a4(mt[or.icon]),{class:"w-3.5 h-3.5"})),nc(" "+aa(or.name),1)],10,iet))),128))])]),Ne[4]||(Ne[4]=Ff('

RF NOISE FLOOR

-116.0dbm
Mode
Forward
Duty Cycle
Enabled
ActiveVl.0.2

Duty Cycle: 0.0% / 6.0%

Last Updated: 18:55:24

',7))])])])])):bs("",!0)}}),oet={class:"glass-card p-6 mb-5 rounded-[20px] relative z-10"},set={class:"flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4"},uet={class:"flex items-center gap-3"},cet={class:"text-right mr-4"},het={key:0,class:"flex items-center gap-2"},fet={key:1,class:"space-y-1"},det={class:"text-dark-text text-sm"},pet={class:"text-primary font-medium"},met={key:0,class:"text-xs text-dark-text/80"},get={key:0},vet={key:1,class:"text-xs text-dark-text/60"},yet={key:2},xet={key:0,class:"text-xs text-dark-text/60"},_et=["disabled"],bet={class:"flex items-center justify-between mb-3"},wet={class:"flex items-center gap-2"},ket=["disabled"],Tet=["disabled"],Aet={class:"space-y-3 text-sm"},Met={key:0,class:"bg-[#0B1014] p-3 rounded-lg border border-accent-red/30 border-l-2 border-l-accent-red"},Eet={class:"flex items-center justify-between"},Cet={class:"text-accent-red font-bold"},Let={class:"text-xs text-gray-400 mt-1"},Pet={key:1,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10 border-l-2 border-l-accent-green"},zet={class:"flex items-center justify-between"},Iet={class:"text-accent-green font-bold"},Oet={key:0,class:"text-xs text-gray-400 mt-1"},Det={key:2,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10"},Fet={key:3,class:"bg-[#0B1014] p-3 rounded-lg border border-accent-red/30 border-l-2 border-l-accent-red"},Ret={class:"text-xs text-gray-400"},Bet={class:"bg-[#0B1014] p-3 rounded-lg border border-white/10 border-l-2 border-l-primary"},Net={class:"flex items-center justify-between"},jet={class:"text-primary font-bold"},Uet={key:0,class:"text-xs text-gray-400 mt-1"},Vet={class:"flex items-center justify-between"},Het={class:"text-white font-medium"},Wet={key:0,class:"mt-2"},qet={class:"text-xs text-gray-400"},Zet={class:"text-gray-300"},$et={key:4,class:"bg-[#0B1014] p-4 rounded-lg border border-white/10 text-center"},Get={key:5,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10 text-center"},Yet=Th({name:"TopBar",__name:"TopBar",emits:["toggleMobileSidebar"],setup(d,{emit:l}){const z=l,j=sv(),J=lo(!1),mt=lo(null),kt=lo({hasUpdate:!1,currentVersion:"",latestVersion:"",isChecking:!1,lastChecked:null,error:null}),Dt=lo({}),Gt=lo(!0),re=lo(null),pe=["Chat Node","Repeater","Room Server"];function Ne(Gi){const un=Gi.target;mt.value&&!mt.value.contains(un)&&(J.value=!1)}const or=async()=>{try{Gt.value=!0;const Gi={};for(const un of pe)try{const ia=await Xh.get(`/adverts_by_contact_type?contact_type=${encodeURIComponent(un)}&hours=168`);ia.success&&Array.isArray(ia.data)?Gi[un]=ia.data:Gi[un]=[]}catch(ia){console.error(`Error fetching ${un} nodes:`,ia),Gi[un]=[]}Dt.value=Gi,re.value=new Date}catch(Gi){console.error("Error updating tracked nodes:",Gi)}finally{Gt.value=!1}},_r=async()=>{if(!kt.value.isChecking)try{kt.value.isChecking=!0,kt.value.error=null,await j.fetchStats();const Gi=j.version;if(!Gi||Gi==="Unknown"){kt.value.error="Unable to determine current version";return}const ia=await fetch("https://raw.githubusercontent.com/rightup/pyMC_Repeater/main/repeater/__init__.py");if(!ia.ok)throw new Error(`GitHub request failed: ${ia.status}`);const Li=(await ia.text()).match(/__version__\s*=\s*["']([^"']+)["']/);if(!Li)throw new Error("Could not parse version from GitHub file");const yi=Li[1];kt.value.currentVersion=Gi,kt.value.latestVersion=yi,kt.value.lastChecked=new Date,kt.value.hasUpdate=Gi!==yi}catch(Gi){console.error("Error checking for updates:",Gi),kt.value.error=Gi instanceof Error?Gi.message:"Failed to check for updates"}finally{kt.value.isChecking=!1}},Fr=Yo(()=>Object.values(Dt.value).reduce((un,ia)=>un+ia.length,0)),zr=Yo(()=>pe.map(un=>({type:un,count:Dt.value[un]?.length||0})).filter(un=>un.count>0)),Wr=Yo(()=>kt.value.hasUpdate||Fr.value>0),An=Gi=>({"Chat Node":"text-blue-400",Repeater:"text-accent-green","Room Server":"text-accent-purple"})[Gi]||"text-gray-400",Ft=Gi=>{const un=Dt.value[Gi]||[];return un.length===0?"None":un.reduce((fa,Li)=>Li.last_seen>fa.last_seen?Li:fa,un[0]).node_name||"Unknown Node"};let kn=null,ei=null;const jn=()=>{kn&&clearInterval(kn),kn=setInterval(()=>{or()},3e4),ei&&clearInterval(ei),ei=setInterval(()=>{_r()},6e5)},ai=()=>{kn&&(clearInterval(kn),kn=null),ei&&(clearInterval(ei),ei=null)};t0(()=>{document.addEventListener("click",Ne),or(),_r(),jn()}),dg(()=>{document.removeEventListener("click",Ne),ai()});const Qi=()=>{z("toggleMobileSidebar")};return(Gi,un)=>(zi(),Vi("div",oet,[Re("div",set,[Re("div",{class:"flex items-center gap-3"},[Re("button",{onClick:Qi,class:"lg:hidden w-10 h-10 rounded bg-[#1A1E1F] flex items-center justify-center hover:bg-[#2A2E2F] transition-colors"},un[2]||(un[2]=[Re("svg",{class:"w-5 h-5 text-white",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Re("path",{d:"M3 6h14M3 10h14M3 14h14",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])),un[3]||(un[3]=Re("div",null,[Re("h1",{class:"text-white text-[35px] font-bold mb-2"},"Welcome👋")],-1))]),Re("div",uet,[Re("div",cet,[Gt.value?(zi(),Vi("div",het,un[4]||(un[4]=[Re("div",{class:"animate-spin rounded-full h-3 w-3 border-b-2 border-primary"},null,-1),Re("p",{class:"text-dark-text text-sm"},"Loading tracking data...",-1)]))):Fr.value>0?(zi(),Vi("div",fet,[Re("p",det,[un[5]||(un[5]=nc(" Tracking: ",-1)),Re("span",pet,aa(Fr.value)+" node"+aa(Fr.value===1?"":"s"),1)]),zr.value.length>1?(zi(),Vi("div",met,[(zi(!0),Vi(Ou,null,sf(zr.value,(ia,fa)=>(zi(),Vi("span",{key:ia.type,class:"inline"},[nc(aa(ia.count)+" "+aa(ia.type)+aa(ia.count===1?"":"s"),1),faJ.value=!J.value,["stop"])),class:"w-[35px] h-[35px] rounded bg-[#1A1E1F] flex items-center justify-center hover:bg-[#2A2E2F] transition-colors relative"},[un[8]||(un[8]=Re("svg",{class:"w-5 h-5",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Re("path",{d:"M12.5 14.1667V15C12.5 16.3807 11.3807 17.5 9.99998 17.5C8.61927 17.5 7.49998 16.3807 7.49998 15V14.1667M12.5 14.1667L7.49998 14.1667M12.5 14.1667H15.8333C16.2936 14.1667 16.6666 13.7936 16.6666 13.3333V12.845C16.6666 12.624 16.5788 12.4122 16.4225 12.2559L15.9969 11.8302C15.8921 11.7255 15.8333 11.5833 15.8333 11.4351V8.33333C15.8333 8.1863 15.828 8.04045 15.817 7.89674M7.49998 14.1667L4.16665 14.1668C3.70641 14.1668 3.33331 13.7934 3.33331 13.3332V12.8451C3.33331 12.6241 3.42118 12.4124 3.57745 12.2561L4.00307 11.8299C4.10781 11.7251 4.16665 11.5835 4.16665 11.4353V8.33331C4.16665 5.11167 6.77831 2.5 9.99998 2.5C10.593 2.5 11.1653 2.58848 11.7045 2.75297M15.817 7.89674C16.8223 7.32275 17.5 6.24051 17.5 5C17.5 3.15905 16.0076 1.66666 14.1666 1.66666C13.1914 1.66666 12.3141 2.08544 11.7045 2.75297M15.817 7.89674C15.3304 8.17457 14.7671 8.33333 14.1666 8.33333C12.3257 8.33333 10.8333 6.84095 10.8333 5C10.8333 4.13425 11.1634 3.34558 11.7045 2.75297M15.817 7.89674C15.817 7.89674 15.817 7.89675 15.817 7.89674ZM11.7045 2.75297C11.7049 2.75309 11.7053 2.75321 11.7057 2.75333",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),Wr.value?(zi(),Vi("span",{key:0,class:Xs(["absolute top-2 right-2 w-2 h-2 rounded-full",kt.value.hasUpdate?"bg-accent-red animate-pulse":"bg-primary"])},null,2)):bs("",!0)]),J.value?(zi(),Vi("div",{key:0,ref_key:"notifRef",ref:mt,class:"absolute right-6 top-14 z-[100] w-80 bg-[#1A1E1F] border border-white/20 rounded-[15px] p-4 shadow-2xl backdrop-blur-sm",onClick:un[1]||(un[1]=hg(()=>{},["stop"]))},[Re("div",bet,[un[10]||(un[10]=Re("p",{class:"text-white font-semibold"},"System Status",-1)),Re("div",wet,[Re("button",{onClick:_r,disabled:kt.value.isChecking,class:"text-xs text-primary hover:text-primary/80 disabled:opacity-50",title:"Check for updates"},aa(kt.value.isChecking?"Checking...":"Check Updates"),9,ket),un[9]||(un[9]=Re("span",{class:"text-dark-text text-xs"},"•",-1)),Re("button",{onClick:or,disabled:Gt.value,class:"text-xs text-primary hover:text-primary/80 disabled:opacity-50"},aa(Gt.value?"Updating...":"Refresh"),9,Tet)])]),Re("div",Aet,[kt.value.hasUpdate?(zi(),Vi("div",Met,[Re("div",Eet,[un[11]||(un[11]=Re("span",{class:"text-white font-medium"},"Update Available",-1)),Re("span",Cet,aa(kt.value.latestVersion),1)]),Re("div",Let," Current: "+aa(kt.value.currentVersion),1),un[12]||(un[12]=Re("div",{class:"text-xs text-gray-300 mt-2"},[Re("a",{href:"https://github.com/rightup/pyMC_Repeater",target:"_blank",class:"text-accent-red hover:text-accent-red/80 underline"}," Goto Github→ ")],-1))])):kt.value.currentVersion&&!kt.value.isChecking?(zi(),Vi("div",Pet,[Re("div",zet,[un[13]||(un[13]=Re("span",{class:"text-white font-medium"},"Up to Date",-1)),Re("span",Iet,aa(kt.value.currentVersion),1)]),kt.value.lastChecked?(zi(),Vi("div",Oet," Last checked: "+aa(kt.value.lastChecked.toLocaleTimeString()),1)):bs("",!0)])):kt.value.isChecking?(zi(),Vi("div",Det,un[14]||(un[14]=[Re("div",{class:"flex items-center justify-center gap-2"},[Re("div",{class:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary"}),Re("span",{class:"text-gray-300"},"Checking for updates...")],-1)]))):kt.value.error?(zi(),Vi("div",Fet,[un[15]||(un[15]=Re("div",{class:"text-white font-medium mb-1"},"Update Check Failed",-1)),Re("div",Ret,aa(kt.value.error),1)])):bs("",!0),un[20]||(un[20]=Re("div",{class:"border-t border-white/10"},null,-1)),un[21]||(un[21]=Re("div",{class:"text-white font-medium text-sm mb-2"},"Mesh Network Status",-1)),Re("div",Bet,[Re("div",Net,[un[16]||(un[16]=Re("span",{class:"text-white font-medium"},"Total Tracked Nodes",-1)),Re("span",jet,aa(Fr.value),1)]),re.value?(zi(),Vi("div",Uet," Last updated: "+aa(re.value.toLocaleString()),1)):bs("",!0)]),(zi(!0),Vi(Ou,null,sf(zr.value,ia=>(zi(),Vi("div",{key:ia.type,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10"},[Re("div",Vet,[Re("span",Het,aa(ia.type)+aa(ia.count===1?"":"s"),1),Re("span",{class:Xs([An(ia.type),"font-bold"])},aa(ia.count),3)]),Dt.value[ia.type]?.length>0?(zi(),Vi("div",Wet,[Re("div",qet,[un[17]||(un[17]=nc(" Latest: ",-1)),Re("span",Zet,aa(Ft(ia.type)),1)])])):bs("",!0)]))),128)),Fr.value===0&&!Gt.value?(zi(),Vi("div",$et,un[18]||(un[18]=[Re("div",{class:"text-gray-400"},[Re("svg",{class:"w-8 h-8 mx-auto mb-2 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.172 16.172a4 4 0 015.656 0M9 12h6m-6-4h6m2 5.291A7.962 7.962 0 0112 15c-2.034 0-3.9.785-5.291 2.09M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]),Re("span",null,"No mesh nodes detected")],-1)]))):bs("",!0),Gt.value?(zi(),Vi("div",Get,un[19]||(un[19]=[Re("div",{class:"flex items-center justify-center gap-2"},[Re("div",{class:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary"}),Re("span",{class:"text-gray-300"},"Scanning mesh network...")],-1)]))):bs("",!0)])],512)):bs("",!0)])])]))}}),Ket=ld(Yet,[["__scopeId","data-v-0a06f286"]]),Xet={class:"min-h-screen bg-dark-bg overflow-hidden relative font-sans"},Jet={class:"relative flex min-h-screen"},Qet={class:"flex-1 p-4 lg:p-[15px] overflow-y-auto"},trt=Th({name:"DashboardLayout",__name:"DashboardLayout",setup(d){const l=lo(!1),z=()=>{l.value=!l.value},j=()=>{l.value=!1};return(J,mt)=>{const kt=UA("router-view");return zi(),Vi("div",Xet,[mt[1]||(mt[1]=Re("div",{class:"absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-cyan-400/25 to-cyan-200/10 blur-[120px] opacity-80 -top-[79px] left-[575px] mix-blend-screen pointer-events-none"},null,-1)),mt[2]||(mt[2]=Re("div",{class:"absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-cyan-400/25 to-cyan-200/10 blur-[120px] opacity-75 -top-[94px] -left-[92px] mix-blend-screen pointer-events-none"},null,-1)),mt[3]||(mt[3]=Re("div",{class:"absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-cyan-400/25 to-cyan-200/10 blur-[120px] opacity-80 top-[373px] left-[246px] mix-blend-screen pointer-events-none"},null,-1)),Re("div",Jet,[gu(Ytt,{class:"hidden lg:block"}),gu(aet,{showMobileSidebar:l.value,"onUpdate:showMobileSidebar":mt[0]||(mt[0]=Dt=>l.value=Dt),onClose:j},null,8,["showMobileSidebar"]),Re("main",Qet,[gu(Ket,{onToggleMobileSidebar:z}),gu(kt)])])])}}}),ert=Th({__name:"App",setup(d){return(l,z)=>(zi(),hm(trt))}}),rrt={class:"sparkline-container"},nrt={class:"text-white text-sm font-semibold mb-4"},irt={class:"flex items-end gap-4"},art=["id","width","height","viewBox"],ort=["id"],srt=["stop-color"],lrt=["stop-color"],urt=["d","fill"],crt=["d","stroke"],hrt=["cx","cy","fill"],frt=Th({name:"SparklineChart",__name:"Sparkline",props:{title:{},value:{},color:{},data:{default:()=>[]},width:{default:131},height:{default:37},animate:{type:Boolean,default:!0},showChart:{type:Boolean,default:!0}},setup(d){const l=d,z=Yo(()=>{if(l.data&&l.data.length>0)return l.data;const kt=typeof l.value=="number"?l.value:10,Dt=20,Gt=kt*.3;return Array.from({length:Dt},(re,pe)=>{const Ne=Math.sin(pe/Dt*Math.PI*2)*Gt*.5,or=(Math.random()-.5)*Gt*.3;return Math.max(0,kt+Ne+or)})}),j=Yo(()=>{const kt=z.value;if(kt.length<2)return"";const Dt=Math.max(...kt),Gt=Math.min(...kt),re=Dt-Gt||1,pe=l.width/(kt.length-1);let Ne="";return kt.forEach((or,_r)=>{const Fr=_r*pe,zr=l.height-(or-Gt)/re*l.height;if(_r===0)Ne+=`M ${Fr} ${zr}`;else{const An=((_r-1)*pe+Fr)/2;Ne+=` Q ${An} ${zr} ${Fr} ${zr}`}}),Ne}),J=lo("");t0(()=>{J.value=j.value}),um(()=>l.data,(kt,Dt)=>{const Gt=!Dt||kt.length!==Dt.length||Math.abs(kt.length-Dt.length)>5;l.animate&&Gt?(J.value="",setTimeout(()=>{J.value=j.value},50)):J.value=j.value});const mt=Yo(()=>`sparkline-${l.title.replace(/\s+/g,"-").toLowerCase()}`);return(kt,Dt)=>(zi(),Vi("div",rrt,[Re("p",nrt,aa(kt.title),1),Re("div",irt,[Re("span",{class:"text-[30px] font-bold",style:av({color:kt.color})},[nc(aa(kt.value),1),qG(kt.$slots,"unit",{},void 0)],4),kt.showChart?(zi(),Vi("svg",{key:0,id:mt.value,class:"mb-3 sparkline-svg",width:kt.width,height:kt.height,viewBox:`0 0 ${kt.width} ${kt.height}`,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Re("defs",null,[Re("linearGradient",{id:`gradient-${mt.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[Re("stop",{offset:"0%","stop-color":kt.color,"stop-opacity":"0.3"},null,8,srt),Re("stop",{offset:"100%","stop-color":kt.color,"stop-opacity":"0.1"},null,8,lrt)],8,ort)]),Re("path",{d:`${J.value} L ${kt.width} ${kt.height} L 0 ${kt.height} Z`,fill:`url(#gradient-${mt.value})`,class:"sparkline-fill"},null,8,urt),Re("path",{d:J.value,stroke:kt.color,"stroke-width":"2",fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:Xs(["sparkline-path",{"animate-draw":kt.animate}])},null,10,crt),z.value.length>0?(zi(),Vi("circle",{key:0,cx:kt.width,cy:kt.height-(z.value[z.value.length-1]-Math.min(...z.value))/(Math.max(...z.value)-Math.min(...z.value)||1)*kt.height,r:"2",fill:kt.color,class:Xs(["sparkline-dot",{"animate-pulse":kt.animate}])},null,10,hrt)):bs("",!0)],8,art)):bs("",!0)])]))}}),r_=ld(frt,[["__scopeId","data-v-574bf55e"]]),drt={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-5"},prt=Th({name:"StatsCards",__name:"StatsCards",setup(d){const l=rw(),z=lo(null),j=Yo(()=>{const kt=l.packetStats,Dt=l.systemStats,Gt=re=>{const pe=Math.floor(re/86400),Ne=Math.floor(re%86400/3600),or=Math.floor(re%3600/60);return pe>0?`${pe}d ${Ne}h`:Ne>0?`${Ne}h ${or}m`:`${or}m`};return{packetsReceived:kt?.total_packets||0,packetsForwarded:kt?.transmitted_packets||0,uptimeFormatted:Dt?Gt(Dt.uptime_seconds||0):"0m",uptimeHours:Dt?Math.floor((Dt.uptime_seconds||0)/3600):0,droppedPackets:kt?.dropped_packets||0,signalQuality:Math.round((kt?.avg_rssi||0)+120)}}),J=Yo(()=>l.sparklineData),mt=async()=>{try{await Promise.all([l.fetchSystemStats(),l.fetchPacketStats({hours:24})])}catch(kt){console.error("Error fetching stats:",kt)}};return t0(()=>{mt(),z.value=window.setInterval(mt,5e3)}),dg(()=>{z.value&&clearInterval(z.value)}),(kt,Dt)=>(zi(),Vi("div",drt,[gu(r_,{title:"RX Packets",value:j.value.packetsReceived,color:"#AAE8E8",data:J.value.totalPackets},null,8,["value","data"]),gu(r_,{title:"Forward",value:j.value.packetsForwarded,color:"#FFC246",data:J.value.transmittedPackets},null,8,["value","data"]),gu(r_,{title:"Up Time",value:j.value.uptimeFormatted,color:"#EBA0FC",data:[],showChart:!1},null,8,["value"]),gu(r_,{title:"Dropped",value:j.value.droppedPackets,color:"#FB787B",data:J.value.droppedPackets},null,8,["value","data"])]))}}),mrt={class:"glass-card rounded-[10px] p-6"},grt={class:"h-80 relative"},vrt={key:0,class:"absolute inset-0 flex items-center justify-center"},yrt={key:1,class:"absolute inset-0 flex items-center justify-center"},xrt={class:"text-red-400"},_rt={key:2,class:"absolute inset-0 flex items-center justify-center"},brt={key:3,class:"h-full flex items-end justify-around gap-2 px-4"},wrt={class:"relative w-full h-64 flex flex-col justify-end"},krt={class:"text-white text-xs font-semibold drop-shadow-lg backdrop-blur-sm bg-black/20 px-2 py-0.5 rounded-md border border-white/10"},Trt={class:"mt-2 text-center"},Art={class:"text-white text-xs font-medium leading-tight"},Mrt={key:0,class:"mt-4 text-sm text-white text-center"},Srt=Th({name:"SignalQualityChart",__name:"SignalQualityChart",setup(d){const l=lo([]),z=lo(null),j=lo(!0),J=lo(null),mt=["rgba(59, 130, 246, 0.8)","rgba(16, 185, 129, 0.8)","rgba(139, 92, 246, 0.8)","rgba(245, 158, 11, 0.8)","rgba(239, 68, 68, 0.8)","rgba(6, 182, 212, 0.8)","rgba(249, 115, 22, 0.8)","rgba(132, 204, 22, 0.8)","rgba(236, 72, 153, 0.8)","rgba(107, 114, 128, 0.8)"],kt=async()=>{try{J.value=null;const Gt=await Xh.get("/packet_type_graph_data");if(Gt?.success&&Gt?.data){const re=Gt.data;if(re?.series){const pe=[];re.series.forEach((Ne,or)=>{let _r=0;Ne.data&&Array.isArray(Ne.data)&&(_r=Ne.data.reduce((Fr,zr)=>Fr+(zr[1]||0),0)),_r>0&&pe.push({name:Ne.name||`Type ${Ne.type}`,type:Ne.type,count:_r,color:mt[or%mt.length]})}),pe.sort((Ne,or)=>or.count-Ne.count),l.value=pe,j.value=!1}else console.error("No series data found in response"),J.value="No series data in server response",j.value=!1}else console.error("Invalid API response structure:",Gt),J.value="Invalid response from server",j.value=!1}catch(Gt){console.error("Failed to fetch packet type data:",Gt),J.value=Gt instanceof Error?Gt.message:"Failed to load data",j.value=!1}},Dt=Gt=>{if(l.value.length===0)return 0;const re=Math.max(...l.value.map(pe=>pe.count));return Math.max(Gt/re*100,2)};return t0(()=>{kt(),z.value=setInterval(()=>{kt()},3e4)}),dg(()=>{z.value&&clearInterval(z.value)}),(Gt,re)=>(zi(),Vi("div",mrt,[re[2]||(re[2]=Re("h3",{class:"text-white text-xl font-semibold mb-4"},"Packet Types",-1)),re[3]||(re[3]=Re("p",{class:"text-white text-sm uppercase mb-4"},"Distribution by Type",-1)),Re("div",grt,[j.value?(zi(),Vi("div",vrt,re[0]||(re[0]=[Re("div",{class:"text-white"},"Loading packet types...",-1)]))):J.value?(zi(),Vi("div",yrt,[Re("div",xrt,aa(J.value),1)])):l.value.length===0?(zi(),Vi("div",_rt,re[1]||(re[1]=[Re("div",{class:"text-white"},"No packet data available",-1)]))):(zi(),Vi("div",brt,[(zi(!0),Vi(Ou,null,sf(l.value,pe=>(zi(),Vi("div",{key:pe.type,class:"flex flex-col items-center flex-1 max-w-20 h-full"},[Re("div",wrt,[Re("div",{class:"w-full rounded-t-[10px] transition-all duration-500 ease-out flex items-end justify-center pb-1 backdrop-blur-[50px] shadow-lg border border-white/20 hover:border-white/30",style:av({height:Dt(pe.count)+"%",background:`linear-gradient(135deg, + ${pe.color} 0%, + ${pe.color.replace("0.8","0.6")} 30%, + ${pe.color.replace("0.8","0.4")} 70%, + ${pe.color.replace("0.8","0.3")} 100%), + linear-gradient(91deg, rgba(34, 34, 34, 0.43) 1.17%, rgba(135, 135, 136, 0.10) 99.82%)`,backgroundBlendMode:"overlay, normal",minHeight:"8px",boxShadow:` + 0 8px 32px ${pe.color.replace("0.8","0.3")}, + 0 4px 15px rgba(0, 0, 0, 0.4), + inset 0 1px 0 rgba(255, 255, 255, 0.3), + inset 0 -1px 0 rgba(0, 0, 0, 0.2) + `})},[Re("span",krt,aa(pe.count),1)],4)]),Re("div",Trt,[Re("div",Art,aa(pe.name.replace(/\([^)]*\)/g,"").trim()),1)])]))),128))]))]),l.value.length>0?(zi(),Vi("div",Mrt," Total packet types: "+aa(l.value.length)+" | Total packets: "+aa(l.value.reduce((pe,Ne)=>pe+Ne.count,0)),1)):bs("",!0)]))}}),Ert=ld(Srt,[["__scopeId","data-v-dc58fd68"]]),Crt={class:"glass-card rounded-[10px] p-6"},Lrt={class:"relative h-48"},Prt={class:"mt-4 grid grid-cols-2 gap-4"},zrt={class:"text-center"},Irt={class:"text-2xl font-bold text-white"},Ort={class:"text-center"},Drt={class:"text-2xl font-bold text-white"},Frt={class:"mt-3 grid grid-cols-3 gap-3 text-center"},Rrt={class:"text-sm font-semibold text-accent-purple"},Brt={class:"text-sm font-semibold text-accent-red"},Nrt={class:"text-sm font-semibold text-white"},jrt=Th({name:"PerformanceChart",__name:"PerformanceChart",setup(d){const l=rw(),z=lo(null),j=lo([]),J=lo(null),mt=lo(!0),kt=async()=>{try{mt.value=!0;const Gt=await Xh.get("/recent_packets",{limit:50});if(!Gt.success){j.value=[],mt.value=!1,Z0(()=>{Dt()});return}const re=Gt.data||[],pe=Date.now(),Ne=24,or=12,_r=Ne*60*60*1e3/or,Fr=[];for(let zr=0;zr{const ai=jn.timestamp*1e3;return ai>=Wr&&ai!jn.transmitted).length,ei=Ft.filter(jn=>jn.transmitted).length;Fr.push({time:new Date(Wr+_r/2).toISOString(),rxPackets:kn,txPackets:ei})}j.value=Fr,mt.value=!1,Z0(()=>{Dt()})}catch{j.value=[],mt.value=!1,Z0(()=>{Dt()})}},Dt=()=>{if(!z.value)return;const Gt=z.value,re=Gt.getContext("2d");if(!re)return;const pe=Gt.parentElement;if(!pe)return;const Ne=pe.getBoundingClientRect(),or=Ne.width,_r=Ne.height;Gt.width=or*window.devicePixelRatio,Gt.height=_r*window.devicePixelRatio,Gt.style.width=or+"px",Gt.style.height=_r+"px",re.scale(window.devicePixelRatio,window.devicePixelRatio);const Fr=20;if(re.clearRect(0,0,or,_r),mt.value){re.fillStyle="#666",re.font="16px sans-serif",re.textAlign="center",re.fillText("Loading chart data...",or/2,_r/2);return}if(j.value.length===0){re.fillStyle="#666",re.font="16px sans-serif",re.textAlign="center",re.fillText("No data available",or/2,_r/2);return}const zr=j.value.every(Gi=>Gi.rxPackets===0&&Gi.txPackets===0),Wr=or-Fr*2,An=_r-Fr*2,Ft=j.value.flatMap(Gi=>[Gi.rxPackets,Gi.txPackets]),kn=Math.min(...Ft),ei=Math.max(...Ft),jn=kn,ai=ei,Qi=Math.max(ai-jn,1);if(re.strokeStyle="rgba(255, 255, 255, 0.1)",re.lineWidth=1,jn<=0&&ai>=0){re.strokeStyle="rgba(255, 255, 255, 0.3)",re.lineWidth=2;const Gi=_r-Fr-(0-jn)/Qi*An;re.beginPath(),re.moveTo(Fr,Gi),re.lineTo(or-Fr,Gi),re.stroke(),Gi>20&&Gi<_r-20&&(re.fillStyle="rgba(255, 255, 255, 0.7)",re.font="10px system-ui",re.textAlign="left",re.fillText("0",Fr+2,Gi-2)),re.strokeStyle="rgba(255, 255, 255, 0.1)",re.lineWidth=1}for(let Gi=0;Gi<=5;Gi++){const un=Fr+An*Gi/5;re.beginPath(),re.moveTo(Fr,un),re.lineTo(or-Fr,un),re.stroke()}for(let Gi=0;Gi<=6;Gi++){const un=Fr+Wr*Gi/6;re.beginPath(),re.moveTo(un,Fr),re.lineTo(un,_r-Fr),re.stroke()}j.value.length>1&&(re.strokeStyle="#EBA0FC",re.lineWidth=2,re.beginPath(),j.value.forEach((Gi,un)=>{const ia=Fr+Wr*un/(j.value.length-1),fa=_r-Fr-(Gi.rxPackets-jn)/Qi*An;un===0?re.moveTo(ia,fa):re.lineTo(ia,fa)}),re.stroke(),re.fillStyle="#EBA0FC",j.value.forEach((Gi,un)=>{const ia=Fr+Wr*un/(j.value.length-1),fa=_r-Fr-(Gi.rxPackets-jn)/Qi*An;re.beginPath(),re.arc(ia,fa,2,0,2*Math.PI),re.fill()})),j.value.length>1&&(re.strokeStyle="#FB787B",re.lineWidth=2,re.beginPath(),j.value.forEach((Gi,un)=>{const ia=Fr+Wr*un/(j.value.length-1),fa=_r-Fr-(Gi.txPackets-jn)/Qi*An;un===0?re.moveTo(ia,fa):re.lineTo(ia,fa)}),re.stroke(),re.fillStyle="#FB787B",j.value.forEach((Gi,un)=>{const ia=Fr+Wr*un/(j.value.length-1),fa=_r-Fr-(Gi.txPackets-jn)/Qi*An;re.beginPath(),re.arc(ia,fa,2,0,2*Math.PI),re.fill()})),re.fillStyle="rgba(255, 255, 255, 0.6)",re.font="12px system-ui",re.textAlign="center",zr&&(re.fillStyle="rgba(255, 255, 255, 0.6)",re.font="14px system-ui",re.textAlign="center",re.fillText("No packet activity in last 24 hours",or/2,_r-15))};return t0(()=>{kt(),J.value=window.setInterval(kt,3e4),Z0(()=>{Dt(),setTimeout(()=>{Dt()},100)}),window.addEventListener("resize",Dt)}),dg(()=>{J.value&&clearInterval(J.value),window.removeEventListener("resize",Dt)}),(Gt,re)=>(zi(),Vi("div",Crt,[re[5]||(re[5]=Ff('

Performance Metrics

Packet Activity (Last 24 Hours)

Received
Transmitted
',3)),Re("div",Lrt,[Re("canvas",{ref_key:"chartRef",ref:z,class:"absolute inset-0 w-full h-full"},null,512)]),Re("div",Prt,[Re("div",zrt,[Re("div",Irt,aa(Ju(l).packetStats?.total_packets||0),1),re[0]||(re[0]=Re("div",{class:"text-xs text-white/70 uppercase tracking-wide"},"Total Received",-1))]),Re("div",Ort,[Re("div",Drt,aa(Ju(l).packetStats?.transmitted_packets||0),1),re[1]||(re[1]=Re("div",{class:"text-xs text-white/70 uppercase tracking-wide"},"Total Transmitted",-1))])]),Re("div",Frt,[Re("div",null,[Re("div",Rrt,aa(j.value.length>0?Math.round(j.value.reduce((pe,Ne)=>pe+Ne.rxPackets,0)/j.value.length*100)/100:0),1),re[2]||(re[2]=Re("div",{class:"text-xs text-white/60"},"Avg RX/hr",-1))]),Re("div",null,[Re("div",Brt,aa(j.value.length>0?Math.round(j.value.reduce((pe,Ne)=>pe+Ne.txPackets,0)/j.value.length*100)/100:0),1),re[3]||(re[3]=Re("div",{class:"text-xs text-white/60"},"Avg TX/hr",-1))]),Re("div",null,[Re("div",Nrt,aa(Ju(l).packetStats?.dropped_packets||0),1),re[4]||(re[4]=Re("div",{class:"text-xs text-white/60"},"Dropped",-1))])])]))}}),Urt=ld(jrt,[["__scopeId","data-v-2ece57e8"]]),Vrt={class:"relative w-full max-w-4xl max-h-[90vh] overflow-hidden"},Hrt={class:"glass-card rounded-[20px] p-8 backdrop-blur-[50px] shadow-2xl border border-white/20"},Wrt={class:"flex items-center justify-between mb-6"},qrt={class:"text-white/70 text-sm"},Zrt={class:"max-h-[70vh] overflow-y-auto custom-scrollbar"},$rt={class:"mb-6"},Grt={class:"glass-card bg-white/5 rounded-[15px] p-4"},Yrt={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Krt={class:"space-y-3"},Xrt={class:"flex justify-between py-2 border-b border-white/10"},Jrt={class:"text-white font-mono text-sm"},Qrt={class:"flex justify-between py-2 border-b border-white/10"},tnt={class:"text-white font-mono text-xs break-all"},ent={key:0,class:"flex justify-between py-2 border-b border-white/10"},rnt={class:"text-white font-mono text-xs"},nnt={class:"space-y-3"},int={class:"flex justify-between py-2 border-b border-white/10"},ant={class:"text-white font-semibold"},ont={class:"flex justify-between py-2 border-b border-white/10"},snt={class:"text-white font-semibold"},lnt={class:"flex justify-between py-2 border-b border-white/10"},unt={class:"mb-6"},cnt={class:"glass-card bg-white/5 rounded-[15px] p-4"},hnt={class:"space-y-3"},fnt={class:"flex justify-between py-2 border-b border-white/10"},dnt={class:"text-white"},pnt={key:0,class:"pt-2"},mnt={class:"glass-card bg-black/30 rounded-[10px] p-4 mb-4"},gnt={class:"w-full overflow-x-auto"},vnt={class:"text-white/90 text-xs font-mono whitespace-pre leading-relaxed min-w-full"},ynt={class:"flex items-center justify-between mb-3"},xnt={class:"text-white/80 text-sm font-semibold"},_nt={class:"text-white/60 text-xs"},bnt={class:"glass-card bg-black/40 rounded-[8px] p-3 mb-3 overflow-x-auto"},wnt={class:"font-mono text-sm text-white whitespace-pre min-w-full"},knt={class:"glass-card bg-white/5 rounded-[10px] overflow-hidden"},Tnt={class:"text-cyan-400 text-sm font-mono"},Ant={class:"text-white text-sm"},Mnt={class:"text-white text-sm font-semibold"},Snt={class:"text-orange-400 text-sm font-mono"},Ent={key:0,class:"text-white/60 text-xs italic mt-2 px-1"},Cnt={key:1,class:"py-2"},Lnt={class:"mb-6"},Pnt={class:"glass-card bg-white/5 rounded-[15px] p-4"},znt={class:"space-y-4"},Int={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Ont={class:"flex justify-between py-2 border-b border-white/10"},Dnt={class:"flex justify-between py-2 border-b border-white/10"},Fnt={key:0,class:"py-2"},Rnt={class:"glass-card bg-black/20 rounded-[10px] p-4"},Bnt={class:"flex items-center flex-wrap gap-2"},Nnt={class:"relative group"},jnt={class:"relative px-3 py-2 bg-gradient-to-br from-blue-500/20 to-cyan-500/20 border border-cyan-400/40 rounded-lg transform transition-all hover:scale-105"},Unt={class:"font-mono text-xs font-semibold text-white/90"},Vnt={class:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-black/90 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10"},Hnt={key:0,class:"mx-2 text-cyan-400/60"},Wnt={key:1,class:"py-2"},qnt={class:"text-white/70 text-sm mb-2 flex items-center"},Znt={key:0,class:"w-4 h-4 ml-2 text-yellow-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},$nt={key:1,class:"text-yellow-400 text-xs ml-1"},Gnt={class:"glass-card bg-black/20 rounded-[10px] p-4"},Ynt={class:"flex items-center flex-wrap gap-2"},Knt={class:"relative group"},Xnt={key:0,class:"absolute -top-1 -right-1 w-2 h-2 bg-yellow-400 rounded-full animate-pulse"},Jnt={class:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-black/90 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10"},Qnt={key:0,class:"mx-1 text-orange-400/60"},tit={class:"mb-6"},eit={class:"glass-card bg-white/5 rounded-[15px] p-4"},rit={class:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-4"},nit={class:"text-center p-3 glass-card bg-black/20 rounded-[10px]"},iit={class:"text-lg font-bold text-white"},ait={class:"text-center p-3 glass-card bg-black/20 rounded-[10px]"},oit={class:"text-center p-3 glass-card bg-black/20 rounded-[10px]"},sit={class:"text-lg font-bold text-white"},lit={class:"mb-4"},uit={class:"flex items-center gap-3"},cit={class:"flex gap-1"},hit={class:"text-white/80 text-sm capitalize"},fit={key:0,class:"mb-4"},dit={class:"text-white/70 text-sm mb-3"},pit={class:"space-y-2"},mit={class:"flex items-center gap-3"},git={class:"text-white/60 text-sm"},vit={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},yit={class:"space-y-2"},xit={class:"flex justify-between py-2 border-b border-white/10"},_it={class:"text-white"},bit={class:"flex justify-between py-2 border-b border-white/10"},wit={class:"space-y-2"},kit={class:"flex justify-between py-2 border-b border-white/10"},Tit={key:0,class:"flex justify-between py-2 border-b border-white/10"},Ait={class:"text-red-400 text-sm"},Mit={class:"mt-6 pt-4 border-t border-white/10 flex justify-end"},Sit=Th({name:"PacketDetailsModal",__name:"PacketDetailsModal",props:{packet:{},isOpen:{type:Boolean},localHash:{}},emits:["close"],setup(d,{emit:l}){const z=d,j=l,J=Ft=>new Date(Ft*1e3).toLocaleString(),mt=Ft=>Ft.transmitted?Ft.is_duplicate?"text-amber-400":Ft.drop_reason?"text-red-400":"text-green-400":"text-red-400",kt=Ft=>Ft.transmitted?Ft.is_duplicate?"Duplicate":Ft.drop_reason?"Dropped":"Forwarded":"Dropped",Dt=Ft=>({0:"Request",1:"Response",2:"Plain Text Message",3:"Acknowledgment",4:"Node Advertisement",5:"Group Text Message",6:"Group Datagram",7:"Anonymous Request",8:"Returned Path",9:"Trace",10:"Multi-part Packet",15:"Custom Packet"})[Ft]||`Unknown Type (${Ft})`,Gt=Ft=>({0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"})[Ft]||`Unknown Route (${Ft})`,re=Ft=>{if(!Ft)return"None";const ei=Ft.replace(/\s+/g,"").toUpperCase().match(/.{2}/g)||[],jn=[];for(let ai=0;ai{try{let jn=0;const ai=kn.length/2;if(ai>=100){if(kn.length>=jn+64){const Qi=kn.slice(jn,jn+64);Ft.push({name:"Public Key",byteRange:`${(ei+jn)/2}-${(ei+jn+63)/2}`,hexData:Qi.match(/.{8}/g)?.join(" ")||Qi,description:"Ed25519 public key of the node (32 bytes)",fields:[{bits:"0-255",name:"Ed25519 Public Key",value:`${Qi.slice(0,16)}...${Qi.slice(-16)}`,binary:"32 bytes (256 bits)"}]}),jn+=64}if(kn.length>=jn+8){const Qi=kn.slice(jn,jn+8),Gi=parseInt(Qi,16),un=new Date(Gi*1e3);Ft.push({name:"Timestamp",byteRange:`${(ei+jn)/2}-${(ei+jn+7)/2}`,hexData:Qi.match(/.{2}/g)?.join(" ")||Qi,description:"Unix timestamp of advertisement",fields:[{bits:"0-31",name:"Unix Timestamp",value:`${Gi} (${un.toLocaleString()})`,binary:Gi.toString(2).padStart(32,"0")}]}),jn+=8}if(kn.length>=jn+128){const Qi=kn.slice(jn,jn+128);Ft.push({name:"Signature",byteRange:`${(ei+jn)/2}-${(ei+jn+127)/2}`,hexData:Qi.match(/.{8}/g)?.join(" ")||Qi,description:"Ed25519 signature of public key, timestamp, and appdata",fields:[{bits:"0-511",name:"Ed25519 Signature",value:`${Qi.slice(0,16)}...${Qi.slice(-16)}`,binary:"64 bytes (512 bits)"}]}),jn+=128}if(kn.length>jn){const Qi=kn.slice(jn);Ne(Ft,Qi,ei+jn)}}else Ft.push({name:"ADVERT AppData (Partial)",byteRange:`${ei/2}-${ei/2+ai-1}`,hexData:kn.match(/.{2}/g)?.join(" ")||kn,description:`Partial ADVERT data - appears to be just AppData portion (${ai} bytes)`,fields:[{bits:`0-${ai*8-1}`,name:"Partial Data",value:`${ai} bytes - attempting to decode as AppData`,binary:`${ai} bytes (${ai*8} bits)`}]}),Ne(Ft,kn,ei)}catch(jn){Ft.push({name:"ADVERT Parse Error",byteRange:"N/A",hexData:kn.slice(0,32)+"...",description:"Failed to parse ADVERT payload structure",fields:[{bits:"N/A",name:"Error",value:`Parse error: ${jn instanceof Error?jn.message:"Unknown error"}`,binary:"Invalid"}]})}},Ne=(Ft,kn,ei)=>{try{const jn=kn.length/2;Ft.push({name:"AppData",byteRange:`${ei/2}-${ei/2+jn-1}`,hexData:kn.match(/.{2}/g)?.join(" ")||kn,description:`Node advertisement application data (${jn} bytes)`,fields:[{bits:`0-${jn*8-1}`,name:"Application Data",value:`${jn} bytes (contains flags, location, name, etc.)`,binary:`${jn} bytes (${jn*8} bits)`}]});let ai=0;if(kn.length>=2){const Qi=parseInt(kn.slice(ai,ai+2),16),Gi=[],un=!!(Qi&16),ia=!!(Qi&32),fa=!!(Qi&64),Li=!!(Qi&128);if(Qi&1&&Gi.push("is chat node"),Qi&2&&Gi.push("is repeater"),Qi&4&&Gi.push("is room server"),Qi&8&&Gi.push("is sensor"),un&&Gi.push("has location"),ia&&Gi.push("has feature 1"),fa&&Gi.push("has feature 2"),Li&&Gi.push("has name"),Ft.push({name:"AppData Flags",byteRange:`${(ei+ai)/2}`,hexData:`0x${kn.slice(ai,ai+2)}`,description:"Flags indicating which optional fields are present",fields:[{bits:"0-7",name:"Flags",value:Gi.join(", ")||"none",binary:Qi.toString(2).padStart(8,"0")}]}),ai+=2,un&&kn.length>=ai+16){const yi=kn.slice(ai,ai+8),ra=[];for(let fu=6;fu>=0;fu-=2)ra.push(yi.slice(fu,fu+2));const Da=parseInt(ra.join(""),16),Ni=Da>2147483647?Da-4294967296:Da,Ei=Ni/1e6,Va=kn.slice(ai+8,ai+16),ss=[];for(let fu=6;fu>=0;fu-=2)ss.push(Va.slice(fu,fu+2));const mo=parseInt(ss.join(""),16),ko=mo>2147483647?mo-4294967296:mo,pl=ko/1e6;Ft.push({name:"Location Data",byteRange:`${(ei+ai)/2}-${(ei+ai+15)/2}`,hexData:`${yi.match(/.{2}/g)?.join(" ")||yi} ${Va.match(/.{2}/g)?.join(" ")||Va}`,description:"GPS coordinates (latitude and longitude)",fields:[{bits:"0-31",name:"Latitude",value:`${Ei.toFixed(6)}° (raw: ${Ni})`,binary:Ni.toString(2).padStart(32,"0")},{bits:"32-63",name:"Longitude",value:`${pl.toFixed(6)}° (raw: ${ko})`,binary:ko.toString(2).padStart(32,"0")}]}),ai+=16}if(ia&&kn.length>=ai+4){const yi=kn.slice(ai,ai+4),ra=parseInt(yi,16);Ft.push({name:"Feature 1",byteRange:`${(ei+ai)/2}-${(ei+ai+3)/2}`,hexData:yi.match(/.{2}/g)?.join(" ")||yi,description:"Reserved feature 1 (2 bytes)",fields:[{bits:"0-15",name:"Feature 1 Value",value:`${ra}`,binary:ra.toString(2).padStart(16,"0")}]}),ai+=4}if(fa&&kn.length>=ai+4){const yi=kn.slice(ai,ai+4),ra=parseInt(yi,16);Ft.push({name:"Feature 2",byteRange:`${(ei+ai)/2}-${(ei+ai+3)/2}`,hexData:yi.match(/.{2}/g)?.join(" ")||yi,description:"Reserved feature 2 (2 bytes)",fields:[{bits:"0-15",name:"Feature 2 Value",value:`${ra}`,binary:ra.toString(2).padStart(16,"0")}]}),ai+=4}if(Li&&kn.length>ai){const yi=kn.slice(ai),ra=yi.match(/.{2}/g)||[],Da=ra.map(Ni=>{const Ei=parseInt(Ni,16);return Ei>=32&&Ei<=126?String.fromCharCode(Ei):"."}).join("").replace(/\.+$/,"");Ft.push({name:"Node Name",byteRange:`${(ei+ai)/2}-${(ei+kn.length-1)/2}`,hexData:yi.match(/.{2}/g)?.join(" ")||yi,description:`Node name string (${ra.length} bytes)`,fields:[{bits:`0-${ra.length*8-1}`,name:"Node Name",value:`"${Da}"`,binary:`ASCII text (${ra.length} bytes)`}]})}}}catch(jn){Ft.push({name:"AppData Parse Error",byteRange:"N/A",hexData:kn.slice(0,Math.min(32,kn.length)),description:"Failed to parse AppData structure",fields:[{bits:"N/A",name:"Error",value:`Parse error: ${jn instanceof Error?jn.message:"Unknown error"}`,binary:"Invalid"}]})}},or=Ft=>{if(!Ft)return[];if(Array.isArray(Ft))return Ft;if(typeof Ft=="string")try{return JSON.parse(Ft)}catch{return[]}return[]},_r=Ft=>{const kn=[];if(!Ft)return kn;try{const ei=Ft.raw_packet;if(ei){const jn=ei.replace(/\s+/g,"").toUpperCase();let ai=0;if(jn.length>=2){const Qi=jn.slice(ai,ai+2),Gi=parseInt(Qi,16),un=Gi&3,ia=(Gi&60)>>2,fa=(Gi&192)>>6,Li={0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"},yi={0:"REQ",1:"RESPONSE",2:"TXT_MSG",3:"ACK",4:"ADVERT",5:"GRP_TXT",6:"GRP_DATA",7:"ANON_REQ",8:"PATH",9:"TRACE",10:"MULTIPART",15:"RAW_CUSTOM"};if(kn.push({name:"Header",byteRange:"0",hexData:`0x${Qi}`,description:"Contains routing type, payload type, and payload version",fields:[{bits:"0-1",name:"Route Type",value:Li[un]||"Unknown",binary:un.toString(2).padStart(2,"0")},{bits:"2-5",name:"Payload Type",value:yi[ia]||"Unknown",binary:ia.toString(2).padStart(4,"0")},{bits:"6-7",name:"Version",value:fa.toString(),binary:fa.toString(2).padStart(2,"0")}]}),ai+=2,(un===0||un===3)&&jn.length>=ai+8){const Da=jn.slice(ai,ai+8),Ni=parseInt(Da.slice(0,4),16),Ei=parseInt(Da.slice(4,8),16);kn.push({name:"Transport Codes",byteRange:"1-4",hexData:`${Da.slice(0,4)} ${Da.slice(4,8)}`,description:"2x 16-bit transport codes for routing optimization",fields:[{bits:"0-15",name:"Code 1",value:Ni.toString(),binary:Ni.toString(2).padStart(16,"0")},{bits:"16-31",name:"Code 2",value:Ei.toString(),binary:Ei.toString(2).padStart(16,"0")}]}),ai+=8}if(jn.length>=ai+2){const Da=jn.slice(ai,ai+2),Ni=parseInt(Da,16);if(kn.push({name:"Path Length",byteRange:`${ai/2}`,hexData:`0x${Da}`,description:`${Ni} bytes of path data`,fields:[{bits:"0-7",name:"Path Length",value:`${Ni} bytes`,binary:Ni.toString(2).padStart(8,"0")}]}),ai+=2,Ni>0&&jn.length>=ai+Ni*2){const Ei=jn.slice(ai,ai+Ni*2);kn.push({name:"Path Data",byteRange:`${ai/2}-${(ai+Ni*2-2)/2}`,hexData:Ei.match(/.{2}/g)?.join(" ")||Ei,description:"Routing path information",fields:[{bits:`0-${Ni*8-1}`,name:"Route Path",value:`${Ni} bytes of routing data`,binary:`${Ni} bytes (${Ni*8} bits)`}]}),ai+=Ni*2}}if(jn.length>ai){const Da=jn.slice(ai),Ni=Da.length/2;ia===4?pe(kn,Da,ai):kn.push({name:"Payload Data",byteRange:`${ai/2}-${ai/2+Ni-1}`,hexData:Da.match(/.{2}/g)?.join(" ")||Da,description:"Application data content",fields:[{bits:`0-${Ni*8-1}`,name:"Application Data",value:`${Ni} bytes`,binary:`${Ni} bytes (${Ni*8} bits)`}]})}}}else{if(Ft.header){const jn=Ft.header.replace(/0x/gi,"").replace(/\s+/g,"").toUpperCase(),ai=parseInt(jn,16),Qi=ai&3,Gi=(ai&60)>>2,un=(ai&192)>>6,ia={0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"},fa={0:"REQ",1:"RESPONSE",2:"TXT_MSG",3:"ACK",4:"ADVERT",5:"GRP_TXT",6:"GRP_DATA",7:"ANON_REQ",8:"PATH",9:"TRACE",10:"MULTIPART",15:"RAW_CUSTOM"};kn.push({name:"Header",byteRange:"0",hexData:`0x${jn}`,description:"Contains routing type, payload type, and payload version",fields:[{bits:"0-1",name:"Route Type",value:ia[Qi]||"Unknown",binary:Qi.toString(2).padStart(2,"0")},{bits:"2-5",name:"Payload Type",value:fa[Gi]||"Unknown",binary:Gi.toString(2).padStart(4,"0")},{bits:"6-7",name:"Version",value:un.toString(),binary:un.toString(2).padStart(2,"0")}]}),Ft.transport_codes&&kn.push({name:"Transport Codes",byteRange:"1-4",hexData:Ft.transport_codes,description:"2x 16-bit transport codes for routing optimization",fields:[{bits:"0-31",name:"Transport Codes",value:Ft.transport_codes,binary:"Available in separate field"}]}),Ft.original_path&&Ft.original_path.length>0&&kn.push({name:"Original Path",byteRange:"?",hexData:Ft.original_path.join(" "),description:`Original routing path (${Ft.original_path.length} nodes)`,fields:[{bits:"0-?",name:"Path Nodes",value:`${Ft.original_path.length} nodes`,binary:"Available as node list"}]}),Ft.forwarded_path&&Ft.forwarded_path.length>0&&kn.push({name:"Forwarded Path",byteRange:"?",hexData:Ft.forwarded_path.join(" "),description:`Forwarded routing path (${Ft.forwarded_path.length} nodes)`,fields:[{bits:"0-?",name:"Path Nodes",value:`${Ft.forwarded_path.length} nodes`,binary:"Available as node list"}]})}if(Ft.payload){const jn=Ft.payload.replace(/\s+/g,"").toUpperCase(),ai=jn.length/2;Ft.type===4?pe(kn,jn,0):kn.push({name:"Payload Data",byteRange:`0-${ai-1}`,hexData:jn.match(/.{2}/g)?.join(" ")||jn,description:`Application data content (${ai} bytes)`,fields:[{bits:`0-${ai*8-1}`,name:"Application Data",value:`${ai} bytes`,binary:`${ai} bytes (${ai*8} bits)`}]})}}}catch{kn.push({name:"Parse Error",byteRange:"N/A",hexData:"Error",description:"Unable to parse packet structure",fields:[{bits:"N/A",name:"Error",value:"Parse failed",binary:"Invalid"}]})}return kn},Fr=Ft=>Ft>=10?"text-green-400":Ft>=5?"text-cyan-400":Ft>=0?"text-yellow-400":"text-red-400",zr=(Ft,kn=8)=>{const jn={7:-7.5,8:-10,9:-12.5,10:-15,11:-17.5,12:-20}[kn]||-10;let ai,Qi;return Ft>=jn+10?(ai=4,Qi="signal-excellent"):Ft>=jn+5?(ai=3,Qi="signal-good"):Ft>=jn?(ai=2,Qi="signal-fair"):(ai=1,Qi="signal-poor"),{level:ai,className:Qi}},Wr=Ft=>{Ft.key==="Escape"&&j("close")},An=Ft=>{Ft.target===Ft.currentTarget&&j("close")};return(Ft,kn)=>(zi(),hm($z,{to:"body"},[gu(LI,{name:"modal",appear:""},{default:Y2(()=>[Ft.isOpen&&Ft.packet?(zi(),Vi("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4",onClick:An,onKeydown:Wr,tabindex:"0"},[kn[36]||(kn[36]=Re("div",{class:"absolute inset-0 bg-black/60 backdrop-blur-md"},null,-1)),Re("div",Vrt,[Re("div",Hrt,[Re("div",Wrt,[Re("div",null,[kn[2]||(kn[2]=Re("h2",{class:"text-2xl font-bold text-white mb-1"},"Packet Details",-1)),Re("p",qrt,aa(Dt(Ft.packet.type))+" - "+aa(Gt(Ft.packet.route)),1)]),Re("button",{onClick:kn[0]||(kn[0]=ei=>j("close")),class:"w-8 h-8 flex items-center justify-center rounded-full bg-white/10 hover:bg-white/20 transition-colors duration-200 text-white/70 hover:text-white"},kn[3]||(kn[3]=[Re("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Re("div",Zrt,[Re("div",$rt,[kn[10]||(kn[10]=Re("h3",{class:"text-lg font-semibold text-white mb-4 flex items-center"},[Re("div",{class:"w-2 h-2 rounded-full bg-cyan-400 mr-3"}),nc(" Basic Information ")],-1)),Re("div",Grt,[Re("div",Yrt,[Re("div",Krt,[Re("div",Xrt,[kn[4]||(kn[4]=Re("span",{class:"text-white/70 text-sm"},"Timestamp",-1)),Re("span",Jrt,aa(J(Ft.packet.timestamp)),1)]),Re("div",Qrt,[kn[5]||(kn[5]=Re("span",{class:"text-white/70 text-sm"},"Packet Hash",-1)),Re("span",tnt,aa(Ft.packet.packet_hash),1)]),Ft.packet.header?(zi(),Vi("div",ent,[kn[6]||(kn[6]=Re("span",{class:"text-white/70 text-sm"},"Header",-1)),Re("span",rnt,aa(Ft.packet.header),1)])):bs("",!0)]),Re("div",nnt,[Re("div",int,[kn[7]||(kn[7]=Re("span",{class:"text-white/70 text-sm"},"Type",-1)),Re("span",ant,aa(Ft.packet.type)+" ("+aa(Dt(Ft.packet.type))+")",1)]),Re("div",ont,[kn[8]||(kn[8]=Re("span",{class:"text-white/70 text-sm"},"Route",-1)),Re("span",snt,aa(Ft.packet.route)+" ("+aa(Gt(Ft.packet.route))+")",1)]),Re("div",lnt,[kn[9]||(kn[9]=Re("span",{class:"text-white/70 text-sm"},"Status",-1)),Re("span",{class:Xs(["font-semibold",mt(Ft.packet)])},aa(kt(Ft.packet)),3)])])])])]),Re("div",unt,[kn[16]||(kn[16]=Re("h3",{class:"text-lg font-semibold text-white mb-4 flex items-center"},[Re("div",{class:"w-2 h-2 rounded-full bg-orange-400 mr-3"}),nc(" Payload Data ")],-1)),Re("div",cnt,[Re("div",hnt,[Re("div",fnt,[kn[11]||(kn[11]=Re("span",{class:"text-white/70 text-sm"},"Payload Length",-1)),Re("span",dnt,aa(Ft.packet.payload_length||Ft.packet.length)+" bytes",1)]),Ft.packet.payload?(zi(),Vi("div",pnt,[kn[14]||(kn[14]=Re("div",{class:"text-white/70 text-sm mb-3"},"Payload Analysis",-1)),Re("div",mnt,[kn[12]||(kn[12]=Re("div",{class:"text-white/70 text-xs mb-2 font-semibold"},"Raw Hex Data",-1)),Re("div",gnt,[Re("pre",vnt,aa(re(Ft.packet.payload)),1)])]),(zi(!0),Vi(Ou,null,sf(_r(Ft.packet).filter(ei=>!ei.name.includes("Parse Error")),(ei,jn)=>(zi(),Vi("div",{key:jn,class:"mb-4"},[Re("div",ynt,[Re("h4",xnt,aa(ei.name),1),Re("span",_nt,"Bytes "+aa(ei.byteRange),1)]),Re("div",bnt,[Re("div",wnt,aa(ei.hexData),1)]),Re("div",knt,[kn[13]||(kn[13]=Re("div",{class:"grid grid-cols-4 gap-4 p-3 bg-white/10 text-white/70 text-xs font-semibold uppercase tracking-wide"},[Re("div",null,"Bits"),Re("div",null,"Field"),Re("div",null,"Value"),Re("div",null,"Binary")],-1)),(zi(!0),Vi(Ou,null,sf(ei.fields,(ai,Qi)=>(zi(),Vi("div",{key:Qi,class:"grid grid-cols-4 gap-4 p-3 border-b border-white/5 last:border-b-0 hover:bg-white/5 transition-colors"},[Re("div",Tnt,aa(ai.bits),1),Re("div",Ant,aa(ai.name),1),Re("div",Mnt,aa(ai.value),1),Re("div",Snt,aa(ai.binary),1)]))),128))]),ei.description?(zi(),Vi("div",Ent,aa(ei.description),1)):bs("",!0)]))),128))])):(zi(),Vi("div",Cnt,kn[15]||(kn[15]=[Re("span",{class:"text-white/70 text-sm"},"Payload:",-1),Re("span",{class:"text-white/50 ml-2"},"None",-1)])))])])]),Re("div",Lnt,[kn[24]||(kn[24]=Re("h3",{class:"text-lg font-semibold text-white mb-4 flex items-center"},[Re("div",{class:"w-2 h-2 rounded-full bg-purple-400 mr-3"}),nc(" Path Information ")],-1)),Re("div",Pnt,[Re("div",znt,[Re("div",Int,[Re("div",Ont,[kn[17]||(kn[17]=Re("span",{class:"text-white/70 text-sm"},"Source Hash",-1)),Re("span",{class:Xs(["text-white font-mono text-xs",z.localHash&&Ft.packet.src_hash===z.localHash?"bg-cyan-400/20 text-cyan-300 px-1 rounded":""])},aa(Ft.packet.src_hash||"Unknown"),3)]),Re("div",Dnt,[kn[18]||(kn[18]=Re("span",{class:"text-white/70 text-sm"},"Destination Hash",-1)),Re("span",{class:Xs(["text-white font-mono text-xs",z.localHash&&Ft.packet.dst_hash===z.localHash?"bg-cyan-400/20 text-cyan-300 px-1 rounded":""])},aa(Ft.packet.dst_hash||"Broadcast"),3)])]),or(Ft.packet.original_path).length>0?(zi(),Vi("div",Fnt,[kn[20]||(kn[20]=Re("div",{class:"text-white/70 text-sm mb-2"},"Original Path",-1)),Re("div",Rnt,[Re("div",Bnt,[(zi(!0),Vi(Ou,null,sf(or(Ft.packet.original_path),(ei,jn)=>(zi(),Vi("div",{key:jn,class:"flex items-center"},[Re("div",Nnt,[Re("div",jnt,[Re("div",Unt,aa(ei.length<=2?ei.toUpperCase():ei.slice(0,2).toUpperCase()),1)]),Re("div",Vnt," Node: "+aa(ei),1)]),jn0?(zi(),Vi("div",Wnt,[Re("div",qnt,[kn[22]||(kn[22]=nc(" Forwarded Path ",-1)),JSON.stringify(or(Ft.packet.original_path))!==JSON.stringify(or(Ft.packet.forwarded_path))?(zi(),Vi("svg",Znt,kn[21]||(kn[21]=[Re("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)]))):bs("",!0),JSON.stringify(or(Ft.packet.original_path))!==JSON.stringify(or(Ft.packet.forwarded_path))?(zi(),Vi("span",$nt,"(Modified)")):bs("",!0)]),Re("div",Gnt,[Re("div",Ynt,[(zi(!0),Vi(Ou,null,sf(or(Ft.packet.forwarded_path),(ei,jn)=>(zi(),Vi("div",{key:jn,class:"flex items-center"},[Re("div",Knt,[Re("div",{class:Xs(["relative px-3 py-2 bg-gradient-to-br from-orange-500/20 to-yellow-500/20 border border-orange-400/40 rounded-lg transform transition-all hover:scale-105",z.localHash&&ei===z.localHash?"bg-gradient-to-br from-yellow-400/30 to-orange-400/30 border-yellow-300 shadow-yellow-400/20 shadow-lg":"hover:border-orange-400/60"])},[Re("div",{class:Xs(["font-mono text-xs font-semibold",z.localHash&&ei===z.localHash?"text-yellow-200":"text-white/90"])},aa(ei.slice(0,2).toUpperCase()),3),z.localHash&&ei===z.localHash?(zi(),Vi("div",Xnt)):bs("",!0)],2),Re("div",Jnt,aa(ei),1)]),jnRe("div",{key:ei,class:Xs(["w-2 h-6 rounded-sm transition-all duration-300",ei<=zr(Ft.packet.snr).level?{"signal-excellent":"bg-green-400","signal-good":"bg-cyan-400","signal-fair":"bg-yellow-400","signal-poor":"bg-red-400"}[zr(Ft.packet.snr).className]:"bg-white/10"])},null,2)),64))]),Re("span",hit,aa(zr(Ft.packet.snr).className.replace("signal-","")),1)])]),Ft.packet.is_trace&&Ft.packet.path_snr_details&&Ft.packet.path_snr_details.length>0?(zi(),Vi("div",fit,[Re("div",dit,"Path SNR Details ("+aa(Ft.packet.path_snr_details.length)+" hops)",1),Re("div",pit,[(zi(!0),Vi(Ou,null,sf(Ft.packet.path_snr_details,(ei,jn)=>(zi(),Vi("div",{key:jn,class:"flex items-center justify-between p-2 glass-card bg-black/20 rounded-[8px]"},[Re("div",mit,[Re("span",git,aa(jn+1)+".",1),Re("span",{class:Xs(["font-mono text-xs text-white",z.localHash&&ei.hash===z.localHash?"bg-cyan-400/20 text-cyan-300 px-1 rounded":""])},aa(ei.hash),3)]),Re("span",{class:Xs(["text-sm font-bold",Fr(ei.snr_db)])},aa(ei.snr_db.toFixed(1))+"dB ",3)]))),128))])])):bs("",!0),Re("div",vit,[Re("div",yit,[Re("div",xit,[kn[31]||(kn[31]=Re("span",{class:"text-white/70 text-sm"},"TX Delay",-1)),Re("span",_it,aa(Number(Ft.packet.tx_delay_ms)>0?Number(Ft.packet.tx_delay_ms).toFixed(1)+"ms":"-"),1)]),Re("div",bit,[kn[32]||(kn[32]=Re("span",{class:"text-white/70 text-sm"},"Transmitted",-1)),Re("span",{class:Xs(Ft.packet.transmitted?"text-green-400":"text-red-400")},aa(Ft.packet.transmitted?"Yes":"No"),3)])]),Re("div",wit,[Re("div",kit,[kn[33]||(kn[33]=Re("span",{class:"text-white/70 text-sm"},"Is Duplicate",-1)),Re("span",{class:Xs(Ft.packet.is_duplicate?"text-amber-400":"text-white/60")},aa(Ft.packet.is_duplicate?"Yes":"No"),3)]),Ft.packet.drop_reason?(zi(),Vi("div",Tit,[kn[34]||(kn[34]=Re("span",{class:"text-white/70 text-sm"},"Drop Reason",-1)),Re("span",Ait,aa(Ft.packet.drop_reason),1)])):bs("",!0)])])])])]),Re("div",Mit,[Re("button",{onClick:kn[1]||(kn[1]=ei=>j("close")),class:"px-6 py-2 bg-gradient-to-r from-cyan-500/20 to-cyan-400/20 hover:from-cyan-500/30 hover:to-cyan-400/30 border border-cyan-400/30 rounded-[10px] text-white transition-all duration-200 backdrop-blur-sm"}," Close ")])])])],32)):bs("",!0)]),_:1})]))}}),Eit=ld(Sit,[["__scopeId","data-v-3b73bfd6"]]),Cit={class:"glass-card rounded-[20px] p-6"},Lit={class:"flex justify-between items-center mb-6"},Pit={class:"flex items-center gap-3"},zit={class:"text-dark-text text-sm"},Iit=["title"],Oit={key:1,class:"text-primary text-sm"},Dit={key:2,class:"text-accent-red text-sm"},Fit={class:"flex items-center gap-3"},Rit={class:"flex flex-col"},Bit=["value"],Nit={class:"flex flex-col"},jit=["value"],Uit={class:"flex flex-col"},Vit={class:"flex flex-col"},Hit=["disabled"],Wit={class:"space-y-4 overflow-hidden"},qit=["onClick"],Zit={class:"grid grid-cols-12 gap-2 items-center"},$it={class:"col-span-1 text-white text-sm"},Git={class:"col-span-1 flex items-center gap-2"},Yit={class:"text-white text-xs"},Kit={class:"col-span-2"},Xit={class:"col-span-1 text-white text-xs"},Jit={class:"col-span-2"},Qit={class:"space-y-1"},tat={class:"inline-block px-2 py-0.5 rounded bg-[#588187] text-accent-cyan text-xs"},eat={class:"col-span-1 text-white text-xs"},rat={class:"col-span-1 text-white text-xs"},nat={class:"col-span-1 text-white text-xs"},iat={class:"col-span-1 text-white text-xs"},aat={class:"col-span-1"},oat={key:0,class:"text-accent-red text-[8px] italic truncate"},sat={key:0,class:"flex justify-between items-center mt-6 pt-4 border-t border-dark-border"},lat={class:"flex items-center gap-4"},uat={class:"text-dark-text text-sm"},cat={key:0,class:"flex items-center gap-2"},hat=["disabled"],fat={class:"text-dark-text text-xs"},dat={class:"flex items-center gap-2"},pat=["disabled"],mat={class:"flex items-center gap-1"},gat={key:1,class:"text-dark-text text-sm px-2"},vat=["onClick"],yat={key:2,class:"text-dark-text text-sm px-2"},xat=["disabled"],_at={key:1,class:"flex justify-center mt-6 pt-4 border-t border-dark-border"},bat={class:"flex items-center gap-4"},wat={class:"text-dark-text text-sm"},kat={class:"text-dark-text text-xs"},Tat={key:2,class:"flex justify-center mt-6 pt-4 border-t border-dark-border"},t2=10,oy=1e3,Aat=Th({name:"PacketTable",__name:"PacketTable",setup(d){const l=rw(),z=lo(1),j=lo(null),J=lo(100),mt=lo(!1),kt=lo(null),Dt=lo(!1),Gt=ss=>{kt.value=ss,Dt.value=!0},re=()=>{Dt.value=!1,kt.value=null},pe=lo("all"),Ne=lo("all"),or=lo(!1),_r=lo(null),Fr=["all","0","1","2","3","4","5","6","7","8","9"],zr=["all","1","2"],Wr=Yo(()=>{let ss=l.recentPackets;if(pe.value!=="all"){const mo=parseInt(pe.value);ss=ss.filter(ko=>ko.type===mo)}if(Ne.value!=="all"){const mo=parseInt(Ne.value);ss=ss.filter(ko=>ko.route===mo)}return or.value&&_r.value!==null&&(ss=ss.filter(mo=>mo.timestamp>=_r.value)),ss}),An=Yo(()=>{const ss=(z.value-1)*t2,mo=ss+t2;return Wr.value.slice(ss,mo)}),Ft=Yo(()=>Math.ceil(Wr.value.length/t2)),kn=Yo(()=>z.value===Ft.value),ei=Yo(()=>l.recentPackets.length>=J.value&&J.valuekn.value&&ei.value&&!mt.value),ai=ss=>new Date(ss*1e3).toLocaleTimeString("en-US",{hour12:!1}),Qi=ss=>({0:"REQ",1:"RESPONSE",2:"TXT_MSG",3:"ACK",4:"ADVERT",5:"GRP_TXT",6:"GRP_DATA",7:"ANON_REQ",8:"PATH",9:"TRACE"})[ss]||`TYPE_${ss}`,Gi=ss=>({0:"T-Flood",1:"Flood",2:"Direct",3:"T-Direct"})[ss]||`Route ${ss}`,un=ss=>ss.transmitted?"text-accent-green":"text-primary",ia=ss=>ss.drop_reason?"Dropped":ss.transmitted?"Forward":"Received",fa=ss=>ss===1?"bg-[#223231] text-accent-cyan":"bg-secondary/30 text-secondary",Li=ss=>({0:"bg-primary",1:"bg-accent-green",2:"bg-secondary",3:"bg-accent-purple",4:"bg-accent-red",5:"bg-accent-cyan",6:"bg-primary",7:"bg-accent-purple",8:"bg-accent-green",9:"bg-secondary"})[ss]||"bg-gray-500",yi=ss=>({0:"border-l-primary",1:"border-l-accent-green",2:"border-l-secondary",3:"border-l-accent-purple",4:"border-l-accent-red",5:"border-l-accent-cyan",6:"border-l-primary",7:"border-l-accent-purple",8:"border-l-accent-green",9:"border-l-secondary"})[ss]||"border-l-gray-500",ra=()=>{pe.value="all",Ne.value="all",or.value=!1,_r.value=null,z.value=1},Da=()=>{or.value?(or.value=!1,_r.value=null):(or.value=!0,_r.value=Date.now()/1e3),z.value=1},Ni=Yo(()=>_r.value?new Date(_r.value*1e3).toLocaleTimeString():""),Ei=async ss=>{try{const mo=ss||J.value;await l.fetchRecentPackets({limit:mo})}catch(mo){console.error("Error fetching packet data:",mo)}},Va=async()=>{if(!(mt.value||J.value>=oy)){mt.value=!0;try{const ss=Math.min(J.value+200,oy);J.value=ss,await Ei(ss)}catch(ss){console.error("Error loading more records:",ss)}finally{mt.value=!1}}};return t0(async()=>{await Ei(),j.value=window.setInterval(Ei,5e3)}),dg(()=>{j.value&&clearInterval(j.value)}),(ss,mo)=>(zi(),Vi(Ou,null,[Re("div",Cit,[Re("div",Lit,[Re("div",Pit,[mo[6]||(mo[6]=Re("h3",{class:"text-white text-xl font-semibold"},"Recent Packets",-1)),Re("span",zit," ("+aa(Wr.value.length)+" of "+aa(Ju(l).recentPackets.length)+") ",1),or.value?(zi(),Vi("span",{key:0,class:"text-primary text-sm bg-primary/10 px-2 py-1 rounded-md border border-primary/20",title:`Filter activated at ${Ni.value}`}," Live Mode (since "+aa(Ni.value)+") ",9,Iit)):bs("",!0),Ju(l).isLoading?(zi(),Vi("span",Oit,"Loading...")):bs("",!0),Ju(l).error?(zi(),Vi("span",Dit,aa(Ju(l).error),1)):bs("",!0)]),Re("div",Fit,[Re("div",Rit,[mo[7]||(mo[7]=Re("label",{class:"text-dark-text text-xs mb-1"},"Type",-1)),$p(Re("select",{"onUpdate:modelValue":mo[0]||(mo[0]=ko=>pe.value=ko),class:"glass-card border border-dark-border rounded-[10px] px-3 py-2 text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20 transition-all duration-200 min-w-[120px] cursor-pointer hover:border-primary/50"},[(zi(),Vi(Ou,null,sf(Fr,ko=>Re("option",{key:ko,value:ko,class:"bg-[#1A1E1F] text-white"},aa(ko==="all"?"All Types":`Type ${ko} (${Qi(parseInt(ko))})`),9,Bit)),64))],512),[[iA,pe.value]])]),Re("div",Nit,[mo[8]||(mo[8]=Re("label",{class:"text-dark-text text-xs mb-1"},"Route",-1)),$p(Re("select",{"onUpdate:modelValue":mo[1]||(mo[1]=ko=>Ne.value=ko),class:"glass-card border border-dark-border rounded-[10px] px-3 py-2 text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20 transition-all duration-200 min-w-[120px] cursor-pointer hover:border-primary/50"},[(zi(),Vi(Ou,null,sf(zr,ko=>Re("option",{key:ko,value:ko,class:"bg-[#1A1E1F] text-white"},aa(ko==="all"?"All Routes":`Route ${ko} (${Gi(parseInt(ko))})`),9,jit)),64))],512),[[iA,Ne.value]])]),Re("div",Uit,[mo[9]||(mo[9]=Re("label",{class:"text-dark-text text-xs mb-1"},"Filter",-1)),Re("button",{onClick:Da,class:Xs(["glass-card border rounded-[10px] px-4 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20 min-w-[120px]",{"border-primary bg-primary/10 text-primary":or.value,"border-dark-border text-dark-text hover:border-primary hover:text-white hover:bg-primary/5":!or.value}])},aa(or.value?"New Only":"Show New"),3)]),Re("div",Vit,[mo[10]||(mo[10]=Re("label",{class:"text-transparent text-xs mb-1"},".",-1)),Re("button",{onClick:ra,class:Xs(["glass-card border border-dark-border hover:border-primary rounded-[10px] px-4 py-2 text-dark-text hover:text-white text-sm transition-all duration-200 focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20",{"opacity-50 cursor-not-allowed hover:border-dark-border hover:text-dark-text":pe.value==="all"&&Ne.value==="all"&&!or.value,"hover:bg-primary/10":pe.value!=="all"||Ne.value!=="all"||or.value}]),disabled:pe.value==="all"&&Ne.value==="all"&&!or.value}," Reset ",10,Hit)])])]),mo[14]||(mo[14]=Ff('
Time
Type
Route
LEN
Path/Hashes
RSSI
SNR
Score
TX Delay
Status
',1)),Re("div",Wit,[gu(nK,{name:"packet-list",tag:"div",class:"space-y-4",appear:""},{default:Y2(()=>[(zi(!0),Vi(Ou,null,sf(An.value,(ko,pl)=>(zi(),Vi("div",{key:`${ko.packet_hash}_${ko.timestamp}_${pl}`,class:Xs(["packet-row border-b border-dark-border/50 pb-4 hover:bg-white/5 transition-colors duration-200 cursor-pointer rounded-[10px] p-2 border-l-4",yi(ko.type)]),onClick:fu=>Gt(ko)},[Re("div",Zit,[Re("div",$it,aa(ai(ko.timestamp)),1),Re("div",Git,[Re("div",{class:Xs(["w-2 h-2 rounded-full",Li(ko.type)])},null,2),Re("span",Yit,aa(Qi(ko.type)),1)]),Re("div",Kit,[Re("span",{class:Xs(["inline-block px-2 py-1 rounded text-xs font-medium",fa(ko.route)])},aa(Gi(ko.route)),3)]),Re("div",Xit,aa(ko.length)+"B",1),Re("div",Jit,[Re("div",Qit,[Re("span",tat,aa(ko.src_hash?.slice(-4)||"????")+" → "+aa(ko.dst_hash?.slice(-4)||"????"),1)])]),Re("div",eat,aa(ko.rssi.toFixed(0)),1),Re("div",rat,aa(ko.snr.toFixed(1))+"dB",1),Re("div",nat,aa(ko.score.toFixed(2)),1),Re("div",iat,aa(Number(ko.tx_delay_ms)>0?Number(ko.tx_delay_ms).toFixed(1)+"ms":""),1),Re("div",aat,[Re("div",null,[Re("span",{class:Xs(["text-xs font-medium",un(ko)])},aa(ia(ko)),3),ko.drop_reason?(zi(),Vi("p",oat,aa(ko.drop_reason),1)):bs("",!0)])])])],10,qit))),128))]),_:1})]),Ft.value>1?(zi(),Vi("div",sat,[Re("div",lat,[Re("span",uat," Showing "+aa((z.value-1)*t2+1)+" - "+aa(Math.min(z.value*t2,Wr.value.length))+" of "+aa(Wr.value.length)+" packets ",1),jn.value?(zi(),Vi("div",cat,[mo[11]||(mo[11]=Re("span",{class:"text-dark-text text-xs"},"•",-1)),Re("button",{onClick:Va,disabled:mt.value,class:Xs(["glass-card border border-primary rounded-[8px] px-3 py-1.5 text-xs transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20 hover:bg-primary/5",{"text-primary border-primary cursor-pointer":!mt.value,"text-dark-text border-dark-border cursor-not-allowed opacity-50":mt.value}])},aa(mt.value?"Loading...":`Load ${Math.min(200,oy-J.value)} more`),11,hat),Re("span",fat,"("+aa(J.value)+"/"+aa(oy)+" max)",1)])):bs("",!0)]),Re("div",dat,[Re("button",{onClick:mo[2]||(mo[2]=ko=>z.value=z.value-1),disabled:z.value<=1,class:Xs(["glass-card border rounded-[10px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20",{"border-dark-border text-dark-text cursor-not-allowed opacity-50":z.value<=1,"border-dark-border text-white hover:border-primary hover:text-primary hover:bg-primary/5":z.value>1}])}," Previous ",10,pat),Re("div",mat,[z.value>3?(zi(),Vi("button",{key:0,onClick:mo[3]||(mo[3]=ko=>z.value=1),class:"glass-card border border-dark-border hover:border-primary rounded-[8px] px-3 py-2 text-sm text-white hover:text-primary hover:bg-primary/5 transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20"}," 1 ")):bs("",!0),z.value>4?(zi(),Vi("span",gat,"...")):bs("",!0),(zi(!0),Vi(Ou,null,sf(Array.from({length:Math.min(5,Ft.value)},(ko,pl)=>Math.max(1,Math.min(z.value-2,Ft.value-4))+pl).filter(ko=>ko<=Ft.value),ko=>(zi(),Vi("button",{key:ko,onClick:pl=>z.value=ko,class:Xs(["glass-card border rounded-[8px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20",{"border-primary bg-primary/10 text-primary":z.value===ko,"border-dark-border text-white hover:border-primary hover:text-primary hover:bg-primary/5":z.value!==ko}])},aa(ko),11,vat))),128)),z.valuez.value=Ft.value),class:"glass-card border border-dark-border hover:border-primary rounded-[8px] px-3 py-2 text-sm text-white hover:text-primary hover:bg-primary/5 transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20"},aa(Ft.value),1)):bs("",!0)]),Re("button",{onClick:mo[5]||(mo[5]=ko=>z.value=z.value+1),disabled:z.value>=Ft.value,class:Xs(["glass-card border rounded-[10px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20",{"border-dark-border text-dark-text cursor-not-allowed opacity-50":z.value>=Ft.value,"border-dark-border text-white hover:border-primary hover:text-primary hover:bg-primary/5":z.value(zi(),Vi("div",null,[gu(prt),Re("div",Sat,[gu(Urt),gu(Ert)]),gu(Mat)]))}});function LO(d){return d&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d}var c2={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 Cat=c2.exports,jL;function Lat(){return jL||(jL=1,function(d,l){(function(z,j){j(l)})(Cat,function(z){var j="1.9.4";function J(ct){var Bt,me,Qe,Pr;for(me=1,Qe=arguments.length;me"u"||!L||!L.Mixin)){ct=kn(ct)?ct:[ct];for(var Bt=0;Bt0?Math.floor(ct):Math.ceil(ct)};Va.prototype={clone:function(){return new Va(this.x,this.y)},add:function(ct){return this.clone()._add(mo(ct))},_add:function(ct){return this.x+=ct.x,this.y+=ct.y,this},subtract:function(ct){return this.clone()._subtract(mo(ct))},_subtract:function(ct){return this.x-=ct.x,this.y-=ct.y,this},divideBy:function(ct){return this.clone()._divideBy(ct)},_divideBy:function(ct){return this.x/=ct,this.y/=ct,this},multiplyBy:function(ct){return this.clone()._multiplyBy(ct)},_multiplyBy:function(ct){return this.x*=ct,this.y*=ct,this},scaleBy:function(ct){return new Va(this.x*ct.x,this.y*ct.y)},unscaleBy:function(ct){return new Va(this.x/ct.x,this.y/ct.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ss(this.x),this.y=ss(this.y),this},distanceTo:function(ct){ct=mo(ct);var Bt=ct.x-this.x,me=ct.y-this.y;return Math.sqrt(Bt*Bt+me*me)},equals:function(ct){return ct=mo(ct),ct.x===this.x&&ct.y===this.y},contains:function(ct){return ct=mo(ct),Math.abs(ct.x)<=Math.abs(this.x)&&Math.abs(ct.y)<=Math.abs(this.y)},toString:function(){return"Point("+or(this.x)+", "+or(this.y)+")"}};function mo(ct,Bt,me){return ct instanceof Va?ct:kn(ct)?new Va(ct[0],ct[1]):ct==null?ct:typeof ct=="object"&&"x"in ct&&"y"in ct?new Va(ct.x,ct.y):new Va(ct,Bt,me)}function ko(ct,Bt){if(ct)for(var me=Bt?[ct,Bt]:ct,Qe=0,Pr=me.length;Qe=this.min.x&&me.x<=this.max.x&&Bt.y>=this.min.y&&me.y<=this.max.y},intersects:function(ct){ct=pl(ct);var Bt=this.min,me=this.max,Qe=ct.min,Pr=ct.max,Tn=Pr.x>=Bt.x&&Qe.x<=me.x,ji=Pr.y>=Bt.y&&Qe.y<=me.y;return Tn&&ji},overlaps:function(ct){ct=pl(ct);var Bt=this.min,me=this.max,Qe=ct.min,Pr=ct.max,Tn=Pr.x>Bt.x&&Qe.xBt.y&&Qe.y=Bt.lat&&Pr.lat<=me.lat&&Qe.lng>=Bt.lng&&Pr.lng<=me.lng},intersects:function(ct){ct=qo(ct);var Bt=this._southWest,me=this._northEast,Qe=ct.getSouthWest(),Pr=ct.getNorthEast(),Tn=Pr.lat>=Bt.lat&&Qe.lat<=me.lat,ji=Pr.lng>=Bt.lng&&Qe.lng<=me.lng;return Tn&&ji},overlaps:function(ct){ct=qo(ct);var Bt=this._southWest,me=this._northEast,Qe=ct.getSouthWest(),Pr=ct.getNorthEast(),Tn=Pr.lat>Bt.lat&&Qe.latBt.lng&&Qe.lng1,e6=function(){var ct=!1;try{var Bt=Object.defineProperty({},"passive",{get:function(){ct=!0}});window.addEventListener("testPassiveEventSupport",Ne,Bt),window.removeEventListener("testPassiveEventSupport",Ne,Bt)}catch{}return ct}(),r6=function(){return!!document.createElement("canvas").getContext}(),b_=!!(document.createElementNS&&co("svg").createSVGRect),n6=!!b_&&function(){var ct=document.createElement("div");return ct.innerHTML="",(ct.firstChild&&ct.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),i6=!b_&&function(){try{var ct=document.createElement("div");ct.innerHTML='';var Bt=ct.firstChild;return Bt.style.behavior="url(#default#VML)",Bt&&typeof Bt.adj=="object"}catch{return!1}}(),cw=navigator.platform.indexOf("Mac")===0,w_=navigator.platform.indexOf("Linux")===0;function r0(ct){return navigator.userAgent.toLowerCase().indexOf(ct)>=0}var El={ie:ms,ielt9:ns,edge:Ko,webkit:Oo,android:wl,android23:ws,androidStock:du,opera:Hu,chrome:Fc,gecko:kc,safari:Vd,phantom:kd,opera12:e0,win:d0,ie3d:Pm,webkit3d:uv,gecko3d:sp,any3d:p0,mobile:zm,mobileWebkit:zy,mobileWebkit3d:K4,msPointer:sw,pointer:lw,touch:X4,touchNative:uw,mobileOpera:J4,mobileGecko:Q4,retina:t6,passiveEvents:e6,canvas:r6,svg:b_,vml:i6,inlineSvg:n6,mac:cw,linux:w_},Yc=El.msPointer?"MSPointerDown":"pointerdown",Td=El.msPointer?"MSPointerMove":"pointermove",k_=El.msPointer?"MSPointerUp":"pointerup",$u=El.msPointer?"MSPointerCancel":"pointercancel",y1={touchstart:Yc,touchmove:Td,touchend:k_,touchcancel:$u},hw={touchstart:s6,touchmove:G0,touchend:G0,touchcancel:G0},cv={},Iy=!1;function x1(ct,Bt,me){return Bt==="touchstart"&&T_(),hw[Bt]?(me=hw[Bt].bind(this,me),ct.addEventListener(y1[Bt],me,!1),me):(console.warn("wrong event specified:",Bt),Ne)}function a6(ct,Bt,me){if(!y1[Bt]){console.warn("wrong event specified:",Bt);return}ct.removeEventListener(y1[Bt],me,!1)}function Xo(ct){cv[ct.pointerId]=ct}function o6(ct){cv[ct.pointerId]&&(cv[ct.pointerId]=ct)}function _1(ct){delete cv[ct.pointerId]}function T_(){Iy||(document.addEventListener(Yc,Xo,!0),document.addEventListener(Td,o6,!0),document.addEventListener(k_,_1,!0),document.addEventListener($u,_1,!0),Iy=!0)}function G0(ct,Bt){if(Bt.pointerType!==(Bt.MSPOINTER_TYPE_MOUSE||"mouse")){Bt.touches=[];for(var me in cv)Bt.touches.push(cv[me]);Bt.changedTouches=[Bt],ct(Bt)}}function s6(ct,Bt){Bt.MSPOINTER_TYPE_TOUCH&&Bt.pointerType===Bt.MSPOINTER_TYPE_TOUCH&&mc(Bt),G0(ct,Bt)}function l6(ct){var Bt={},me,Qe;for(Qe in ct)me=ct[Qe],Bt[Qe]=me&&me.bind?me.bind(ct):me;return ct=Bt,Bt.type="dblclick",Bt.detail=2,Bt.isTrusted=!1,Bt._simulated=!0,Bt}var u6=200;function c6(ct,Bt){ct.addEventListener("dblclick",Bt);var me=0,Qe;function Pr(Tn){if(Tn.detail!==1){Qe=Tn.detail;return}if(!(Tn.pointerType==="mouse"||Tn.sourceCapabilities&&!Tn.sourceCapabilities.firesTouchEvents)){var ji=mw(Tn);if(!(ji.some(function(Ya){return Ya instanceof HTMLLabelElement&&Ya.attributes.for})&&!ji.some(function(Ya){return Ya instanceof HTMLInputElement||Ya instanceof HTMLSelectElement}))){var Na=Date.now();Na-me<=u6?(Qe++,Qe===2&&Bt(l6(Tn))):Qe=1,me=Na}}}return ct.addEventListener("click",Pr),{dblclick:Bt,simDblclick:Pr}}function A_(ct,Bt){ct.removeEventListener("dblclick",Bt.dblclick),ct.removeEventListener("click",Bt.simDblclick)}var M_=Dm(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),b1=Dm(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),fw=b1==="webkitTransition"||b1==="OTransition"?b1+"End":"transitionend";function dw(ct){return typeof ct=="string"?document.getElementById(ct):ct}function w1(ct,Bt){var me=ct.style[Bt]||ct.currentStyle&&ct.currentStyle[Bt];if((!me||me==="auto")&&document.defaultView){var Qe=document.defaultView.getComputedStyle(ct,null);me=Qe?Qe[Bt]:null}return me==="auto"?null:me}function Cc(ct,Bt,me){var Qe=document.createElement(ct);return Qe.className=Bt||"",me&&me.appendChild(Qe),Qe}function Tf(ct){var Bt=ct.parentNode;Bt&&Bt.removeChild(ct)}function Oy(ct){for(;ct.firstChild;)ct.removeChild(ct.firstChild)}function hv(ct){var Bt=ct.parentNode;Bt&&Bt.lastChild!==ct&&Bt.appendChild(ct)}function bn(ct){var Bt=ct.parentNode;Bt&&Bt.firstChild!==ct&&Bt.insertBefore(ct,Bt.firstChild)}function S_(ct,Bt){if(ct.classList!==void 0)return ct.classList.contains(Bt);var me=Om(ct);return me.length>0&&new RegExp("(^|\\s)"+Bt+"(\\s|$)").test(me)}function Wu(ct,Bt){if(ct.classList!==void 0)for(var me=Fr(Bt),Qe=0,Pr=me.length;Qe0?2*window.devicePixelRatio:1;function Ac(ct){return El.edge?ct.wheelDeltaY/2:ct.deltaY&&ct.deltaMode===0?-ct.deltaY/Xc:ct.deltaY&&ct.deltaMode===1?-ct.deltaY*20:ct.deltaY&&ct.deltaMode===2?-ct.deltaY*60:ct.deltaX||ct.deltaZ?0:ct.wheelDelta?(ct.wheelDeltaY||ct.wheelDelta)/2:ct.detail&&Math.abs(ct.detail)<32765?-ct.detail*20:ct.detail?ct.detail/-32765*60:0}function yg(ct,Bt){var me=Bt.relatedTarget;if(!me)return!0;try{for(;me&&me!==ct;)me=me.parentNode}catch{return!1}return me!==ct}var Dp={__proto__:null,on:Pu,off:Bh,stopPropagation:n0,disableScrollPropagation:dm,disableClickPropagation:fv,preventDefault:mc,stop:vg,getPropagationPath:mw,getMousePosition:Jd,getWheelDelta:Ac,isExternalTarget:yg,addListener:Pu,removeListener:Bh},A1=Ei.extend({run:function(ct,Bt,me,Qe){this.stop(),this._el=ct,this._inProgress=!0,this._duration=me||.25,this._easeOutPower=1/Math.max(Qe||.5,.2),this._startPos=Rc(ct),this._offset=Bt.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=fa(this._animate,this),this._step()},_step:function(ct){var Bt=+new Date-this._startTime,me=this._duration*1e3;Btthis.options.maxZoom)?this.setZoom(ct):this},panInsideBounds:function(ct,Bt){this._enforcingBounds=!0;var me=this.getCenter(),Qe=this._limitCenter(me,this._zoom,qo(ct));return me.equals(Qe)||this.panTo(Qe,Bt),this._enforcingBounds=!1,this},panInside:function(ct,Bt){Bt=Bt||{};var me=mo(Bt.paddingTopLeft||Bt.padding||[0,0]),Qe=mo(Bt.paddingBottomRight||Bt.padding||[0,0]),Pr=this.project(this.getCenter()),Tn=this.project(ct),ji=this.getPixelBounds(),Na=pl([ji.min.add(me),ji.max.subtract(Qe)]),Ya=Na.getSize();if(!Na.contains(Tn)){this._enforcingBounds=!0;var xo=Tn.subtract(Na.getCenter()),Vs=Na.extend(Tn).getSize().subtract(Ya);Pr.x+=xo.x<0?-Vs.x:Vs.x,Pr.y+=xo.y<0?-Vs.y:Vs.y,this.panTo(this.unproject(Pr),Bt),this._enforcingBounds=!1}return this},invalidateSize:function(ct){if(!this._loaded)return this;ct=J({animate:!1,pan:!0},ct===!0?{animate:!0}:ct);var Bt=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var me=this.getSize(),Qe=Bt.divideBy(2).round(),Pr=me.divideBy(2).round(),Tn=Qe.subtract(Pr);return!Tn.x&&!Tn.y?this:(ct.animate&&ct.pan?this.panBy(Tn):(ct.pan&&this._rawPanBy(Tn),this.fire("move"),ct.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(kt(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:Bt,newSize:me}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(ct){if(ct=this._locateOptions=J({timeout:1e4,watch:!1},ct),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var Bt=kt(this._handleGeolocationResponse,this),me=kt(this._handleGeolocationError,this);return ct.watch?this._locationWatchId=navigator.geolocation.watchPosition(Bt,me,ct):navigator.geolocation.getCurrentPosition(Bt,me,ct),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(ct){if(this._container._leaflet_id){var Bt=ct.code,me=ct.message||(Bt===1?"permission denied":Bt===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:Bt,message:"Geolocation error: "+me+"."})}},_handleGeolocationResponse:function(ct){if(this._container._leaflet_id){var Bt=ct.coords.latitude,me=ct.coords.longitude,Qe=new fo(Bt,me),Pr=Qe.toBounds(ct.coords.accuracy*2),Tn=this._locateOptions;if(Tn.setView){var ji=this.getBoundsZoom(Pr);this.setView(Qe,Tn.maxZoom?Math.min(ji,Tn.maxZoom):ji)}var Na={latlng:Qe,bounds:Pr,timestamp:ct.timestamp};for(var Ya in ct.coords)typeof ct.coords[Ya]=="number"&&(Na[Ya]=ct.coords[Ya]);this.fire("locationfound",Na)}},addHandler:function(ct,Bt){if(!Bt)return this;var me=this[ct]=new Bt(this);return this._handlers.push(me),this.options[ct]&&me.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Tf(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Li(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var ct;for(ct in this._layers)this._layers[ct].remove();for(ct in this._panes)Tf(this._panes[ct]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(ct,Bt){var me="leaflet-pane"+(ct?" leaflet-"+ct.replace("Pane","")+"-pane":""),Qe=Cc("div",me,Bt||this._mapPane);return ct&&(this._panes[ct]=Qe),Qe},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var ct=this.getPixelBounds(),Bt=this.unproject(ct.getBottomLeft()),me=this.unproject(ct.getTopRight());return new fu(Bt,me)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(ct,Bt,me){ct=qo(ct),me=mo(me||[0,0]);var Qe=this.getZoom()||0,Pr=this.getMinZoom(),Tn=this.getMaxZoom(),ji=ct.getNorthWest(),Na=ct.getSouthEast(),Ya=this.getSize().subtract(me),xo=pl(this.project(Na,Qe),this.project(ji,Qe)).getSize(),Vs=El.any3d?this.options.zoomSnap:1,xl=Ya.x/xo.x,Du=Ya.y/xo.y,Sd=Bt?Math.max(xl,Du):Math.min(xl,Du);return Qe=this.getScaleZoom(Sd,Qe),Vs&&(Qe=Math.round(Qe/(Vs/100))*(Vs/100),Qe=Bt?Math.ceil(Qe/Vs)*Vs:Math.floor(Qe/Vs)*Vs),Math.max(Pr,Math.min(Tn,Qe))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new Va(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(ct,Bt){var me=this._getTopLeftPoint(ct,Bt);return new ko(me,me.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(ct){return this.options.crs.getProjectedBounds(ct===void 0?this.getZoom():ct)},getPane:function(ct){return typeof ct=="string"?this._panes[ct]:ct},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(ct,Bt){var me=this.options.crs;return Bt=Bt===void 0?this._zoom:Bt,me.scale(ct)/me.scale(Bt)},getScaleZoom:function(ct,Bt){var me=this.options.crs;Bt=Bt===void 0?this._zoom:Bt;var Qe=me.zoom(ct*me.scale(Bt));return isNaN(Qe)?1/0:Qe},project:function(ct,Bt){return Bt=Bt===void 0?this._zoom:Bt,this.options.crs.latLngToPoint(Ta(ct),Bt)},unproject:function(ct,Bt){return Bt=Bt===void 0?this._zoom:Bt,this.options.crs.pointToLatLng(mo(ct),Bt)},layerPointToLatLng:function(ct){var Bt=mo(ct).add(this.getPixelOrigin());return this.unproject(Bt)},latLngToLayerPoint:function(ct){var Bt=this.project(Ta(ct))._round();return Bt._subtract(this.getPixelOrigin())},wrapLatLng:function(ct){return this.options.crs.wrapLatLng(Ta(ct))},wrapLatLngBounds:function(ct){return this.options.crs.wrapLatLngBounds(qo(ct))},distance:function(ct,Bt){return this.options.crs.distance(Ta(ct),Ta(Bt))},containerPointToLayerPoint:function(ct){return mo(ct).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(ct){return mo(ct).add(this._getMapPanePos())},containerPointToLatLng:function(ct){var Bt=this.containerPointToLayerPoint(mo(ct));return this.layerPointToLatLng(Bt)},latLngToContainerPoint:function(ct){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Ta(ct)))},mouseEventToContainerPoint:function(ct){return Jd(ct,this._container)},mouseEventToLayerPoint:function(ct){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(ct))},mouseEventToLatLng:function(ct){return this.layerPointToLatLng(this.mouseEventToLayerPoint(ct))},_initContainer:function(ct){var Bt=this._container=dw(ct);if(Bt){if(Bt._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Pu(Bt,"scroll",this._onScroll,this),this._containerId=Gt(Bt)},_initLayout:function(){var ct=this._container;this._fadeAnimated=this.options.fadeAnimation&&El.any3d,Wu(ct,"leaflet-container"+(El.touch?" leaflet-touch":"")+(El.retina?" leaflet-retina":"")+(El.ielt9?" leaflet-oldie":"")+(El.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var Bt=w1(ct,"position");Bt!=="absolute"&&Bt!=="relative"&&Bt!=="fixed"&&Bt!=="sticky"&&(ct.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var ct=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ic(this._mapPane,new Va(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Wu(ct.markerPane,"leaflet-zoom-hide"),Wu(ct.shadowPane,"leaflet-zoom-hide"))},_resetView:function(ct,Bt,me){ic(this._mapPane,new Va(0,0));var Qe=!this._loaded;this._loaded=!0,Bt=this._limitZoom(Bt),this.fire("viewprereset");var Pr=this._zoom!==Bt;this._moveStart(Pr,me)._move(ct,Bt)._moveEnd(Pr),this.fire("viewreset"),Qe&&this.fire("load")},_moveStart:function(ct,Bt){return ct&&this.fire("zoomstart"),Bt||this.fire("movestart"),this},_move:function(ct,Bt,me,Qe){Bt===void 0&&(Bt=this._zoom);var Pr=this._zoom!==Bt;return this._zoom=Bt,this._lastCenter=ct,this._pixelOrigin=this._getNewPixelOrigin(ct),Qe?me&&me.pinch&&this.fire("zoom",me):((Pr||me&&me.pinch)&&this.fire("zoom",me),this.fire("move",me)),this},_moveEnd:function(ct){return ct&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Li(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(ct){ic(this._mapPane,this._getMapPanePos().subtract(ct))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(ct){this._targets={},this._targets[Gt(this._container)]=this;var Bt=ct?Bh:Pu;Bt(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&Bt(window,"resize",this._onResize,this),El.any3d&&this.options.transform3DLimit&&(ct?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Li(this._resizeRequest),this._resizeRequest=fa(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var ct=this._getMapPanePos();Math.max(Math.abs(ct.x),Math.abs(ct.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(ct,Bt){for(var me=[],Qe,Pr=Bt==="mouseout"||Bt==="mouseover",Tn=ct.target||ct.srcElement,ji=!1;Tn;){if(Qe=this._targets[Gt(Tn)],Qe&&(Bt==="click"||Bt==="preclick")&&this._draggableMoved(Qe)){ji=!0;break}if(Qe&&Qe.listens(Bt,!0)&&(Pr&&!yg(Tn,ct)||(me.push(Qe),Pr))||Tn===this._container)break;Tn=Tn.parentNode}return!me.length&&!ji&&!Pr&&this.listens(Bt,!0)&&(me=[this]),me},_isClickDisabled:function(ct){for(;ct&&ct!==this._container;){if(ct._leaflet_disable_click)return!0;ct=ct.parentNode}},_handleDOMEvent:function(ct){var Bt=ct.target||ct.srcElement;if(!(!this._loaded||Bt._leaflet_disable_events||ct.type==="click"&&this._isClickDisabled(Bt))){var me=ct.type;me==="mousedown"&&Hd(Bt),this._fireDOMEvent(ct,me)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(ct,Bt,me){if(ct.type==="click"){var Qe=J({},ct);Qe.type="preclick",this._fireDOMEvent(Qe,Qe.type,me)}var Pr=this._findEventTargets(ct,Bt);if(me){for(var Tn=[],ji=0;ji0?Math.round(ct-Bt)/2:Math.max(0,Math.ceil(ct))-Math.max(0,Math.floor(Bt))},_limitZoom:function(ct){var Bt=this.getMinZoom(),me=this.getMaxZoom(),Qe=El.any3d?this.options.zoomSnap:1;return Qe&&(ct=Math.round(ct/Qe)*Qe),Math.max(Bt,Math.min(me,ct))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Rf(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(ct,Bt){var me=this._getCenterOffset(ct)._trunc();return(Bt&&Bt.animate)!==!0&&!this.getSize().contains(me)?!1:(this.panBy(me,Bt),!0)},_createAnimProxy:function(){var ct=this._proxy=Cc("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(ct),this.on("zoomanim",function(Bt){var me=M_,Qe=this._proxy.style[me];pu(this._proxy,this.project(Bt.center,Bt.zoom),this.getZoomScale(Bt.zoom,1)),Qe===this._proxy.style[me]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Tf(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var ct=this.getCenter(),Bt=this.getZoom();pu(this._proxy,this.project(ct,Bt),this.getZoomScale(Bt,1))},_catchTransitionEnd:function(ct){this._animatingZoom&&ct.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(ct,Bt,me){if(this._animatingZoom)return!0;if(me=me||{},!this._zoomAnimated||me.animate===!1||this._nothingToAnimate()||Math.abs(Bt-this._zoom)>this.options.zoomAnimationThreshold)return!1;var Qe=this.getZoomScale(Bt),Pr=this._getCenterOffset(ct)._divideBy(1-1/Qe);return me.animate!==!0&&!this.getSize().contains(Pr)?!1:(fa(function(){this._moveStart(!0,me.noMoveStart||!1)._animateZoom(ct,Bt,!0)},this),!0)},_animateZoom:function(ct,Bt,me,Qe){this._mapPane&&(me&&(this._animatingZoom=!0,this._animateToCenter=ct,this._animateToZoom=Bt,Wu(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:ct,zoom:Bt,noUpdate:Qe}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(kt(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Rf(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function js(ct,Bt){return new Mc(ct,Bt)}var lp=ra.extend({options:{position:"topright"},initialize:function(ct){zr(this,ct)},getPosition:function(){return this.options.position},setPosition:function(ct){var Bt=this._map;return Bt&&Bt.removeControl(this),this.options.position=ct,Bt&&Bt.addControl(this),this},getContainer:function(){return this._container},addTo:function(ct){this.remove(),this._map=ct;var Bt=this._container=this.onAdd(ct),me=this.getPosition(),Qe=ct._controlCorners[me];return Wu(Bt,"leaflet-control"),me.indexOf("bottom")!==-1?Qe.insertBefore(Bt,Qe.firstChild):Qe.appendChild(Bt),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Tf(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(ct){this._map&&ct&&ct.screenX>0&&ct.screenY>0&&this._map.getContainer().focus()}}),i0=function(ct){return new lp(ct)};Mc.include({addControl:function(ct){return ct.addTo(this),this},removeControl:function(ct){return ct.remove(),this},_initControlPos:function(){var ct=this._controlCorners={},Bt="leaflet-",me=this._controlContainer=Cc("div",Bt+"control-container",this._container);function Qe(Pr,Tn){var ji=Bt+Pr+" "+Bt+Tn;ct[Pr+Tn]=Cc("div",ji,me)}Qe("top","left"),Qe("top","right"),Qe("bottom","left"),Qe("bottom","right")},_clearControlPos:function(){for(var ct in this._controlCorners)Tf(this._controlCorners[ct]);Tf(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var dv=lp.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(ct,Bt,me,Qe){return me1,this._baseLayersList.style.display=ct?"":"none"),this._separator.style.display=Bt&&ct?"":"none",this},_onLayerChange:function(ct){this._handlingClick||this._update();var Bt=this._getLayer(Gt(ct.target)),me=Bt.overlay?ct.type==="add"?"overlayadd":"overlayremove":ct.type==="add"?"baselayerchange":null;me&&this._map.fire(me,Bt)},_createRadioElement:function(ct,Bt){var me='",Qe=document.createElement("div");return Qe.innerHTML=me,Qe.firstChild},_addItem:function(ct){var Bt=document.createElement("label"),me=this._map.hasLayer(ct.layer),Qe;ct.overlay?(Qe=document.createElement("input"),Qe.type="checkbox",Qe.className="leaflet-control-layers-selector",Qe.defaultChecked=me):Qe=this._createRadioElement("leaflet-base-layers_"+Gt(this),me),this._layerControlInputs.push(Qe),Qe.layerId=Gt(ct.layer),Pu(Qe,"click",this._onInputClick,this);var Pr=document.createElement("span");Pr.innerHTML=" "+ct.name;var Tn=document.createElement("span");Bt.appendChild(Tn),Tn.appendChild(Qe),Tn.appendChild(Pr);var ji=ct.overlay?this._overlaysList:this._baseLayersList;return ji.appendChild(Bt),this._checkDisabledLayers(),Bt},_onInputClick:function(){if(!this._preventClick){var ct=this._layerControlInputs,Bt,me,Qe=[],Pr=[];this._handlingClick=!0;for(var Tn=ct.length-1;Tn>=0;Tn--)Bt=ct[Tn],me=this._getLayer(Bt.layerId).layer,Bt.checked?Qe.push(me):Bt.checked||Pr.push(me);for(Tn=0;Tn=0;Pr--)Bt=ct[Pr],me=this._getLayer(Bt.layerId).layer,Bt.disabled=me.options.minZoom!==void 0&&Qeme.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var ct=this._section;this._preventClick=!0,Pu(ct,"click",mc),this.expand();var Bt=this;setTimeout(function(){Bh(ct,"click",mc),Bt._preventClick=!1})}}),Y0=function(ct,Bt,me){return new dv(ct,Bt,me)},Es=lp.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(ct){var Bt="leaflet-control-zoom",me=Cc("div",Bt+" leaflet-bar"),Qe=this.options;return this._zoomInButton=this._createButton(Qe.zoomInText,Qe.zoomInTitle,Bt+"-in",me,this._zoomIn),this._zoomOutButton=this._createButton(Qe.zoomOutText,Qe.zoomOutTitle,Bt+"-out",me,this._zoomOut),this._updateDisabled(),ct.on("zoomend zoomlevelschange",this._updateDisabled,this),me},onRemove:function(ct){ct.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(ct){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(ct.shiftKey?3:1))},_createButton:function(ct,Bt,me,Qe,Pr){var Tn=Cc("a",me,Qe);return Tn.innerHTML=ct,Tn.href="#",Tn.title=Bt,Tn.setAttribute("role","button"),Tn.setAttribute("aria-label",Bt),fv(Tn),Pu(Tn,"click",vg),Pu(Tn,"click",Pr,this),Pu(Tn,"click",this._refocusOnMap,this),Tn},_updateDisabled:function(){var ct=this._map,Bt="leaflet-disabled";Rf(this._zoomInButton,Bt),Rf(this._zoomOutButton,Bt),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||ct._zoom===ct.getMinZoom())&&(Wu(this._zoomOutButton,Bt),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||ct._zoom===ct.getMaxZoom())&&(Wu(this._zoomInButton,Bt),this._zoomInButton.setAttribute("aria-disabled","true"))}});Mc.mergeOptions({zoomControl:!0}),Mc.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Es,this.addControl(this.zoomControl))});var gw=function(ct){return new Es(ct)},E_=lp.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(ct){var Bt="leaflet-control-scale",me=Cc("div",Bt),Qe=this.options;return this._addScales(Qe,Bt+"-line",me),ct.on(Qe.updateWhenIdle?"moveend":"move",this._update,this),ct.whenReady(this._update,this),me},onRemove:function(ct){ct.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(ct,Bt,me){ct.metric&&(this._mScale=Cc("div",Bt,me)),ct.imperial&&(this._iScale=Cc("div",Bt,me))},_update:function(){var ct=this._map,Bt=ct.getSize().y/2,me=ct.distance(ct.containerPointToLatLng([0,Bt]),ct.containerPointToLatLng([this.options.maxWidth,Bt]));this._updateScales(me)},_updateScales:function(ct){this.options.metric&&ct&&this._updateMetric(ct),this.options.imperial&&ct&&this._updateImperial(ct)},_updateMetric:function(ct){var Bt=this._getRoundNum(ct),me=Bt<1e3?Bt+" m":Bt/1e3+" km";this._updateScale(this._mScale,me,Bt/ct)},_updateImperial:function(ct){var Bt=ct*3.2808399,me,Qe,Pr;Bt>5280?(me=Bt/5280,Qe=this._getRoundNum(me),this._updateScale(this._iScale,Qe+" mi",Qe/me)):(Pr=this._getRoundNum(Bt),this._updateScale(this._iScale,Pr+" ft",Pr/Bt))},_updateScale:function(ct,Bt,me){ct.style.width=Math.round(this.options.maxWidth*me)+"px",ct.innerHTML=Bt},_getRoundNum:function(ct){var Bt=Math.pow(10,(Math.floor(ct)+"").length-1),me=ct/Bt;return me=me>=10?10:me>=5?5:me>=3?3:me>=2?2:1,Bt*me}}),h6=function(ct){return new E_(ct)},C_='',L_=lp.extend({options:{position:"bottomright",prefix:''+(El.inlineSvg?C_+" ":"")+"Leaflet"},initialize:function(ct){zr(this,ct),this._attributions={}},onAdd:function(ct){ct.attributionControl=this,this._container=Cc("div","leaflet-control-attribution"),fv(this._container);for(var Bt in ct._layers)ct._layers[Bt].getAttribution&&this.addAttribution(ct._layers[Bt].getAttribution());return this._update(),ct.on("layeradd",this._addAttribution,this),this._container},onRemove:function(ct){ct.off("layeradd",this._addAttribution,this)},_addAttribution:function(ct){ct.layer.getAttribution&&(this.addAttribution(ct.layer.getAttribution()),ct.layer.once("remove",function(){this.removeAttribution(ct.layer.getAttribution())},this))},setPrefix:function(ct){return this.options.prefix=ct,this._update(),this},addAttribution:function(ct){return ct?(this._attributions[ct]||(this._attributions[ct]=0),this._attributions[ct]++,this._update(),this):this},removeAttribution:function(ct){return ct?(this._attributions[ct]&&(this._attributions[ct]--,this._update()),this):this},_update:function(){if(this._map){var ct=[];for(var Bt in this._attributions)this._attributions[Bt]&&ct.push(Bt);var me=[];this.options.prefix&&me.push(this.options.prefix),ct.length&&me.push(ct.join(", ")),this._container.innerHTML=me.join(' ')}}});Mc.mergeOptions({attributionControl:!0}),Mc.addInitHook(function(){this.options.attributionControl&&new L_().addTo(this)});var f6=function(ct){return new L_(ct)};lp.Layers=dv,lp.Zoom=Es,lp.Scale=E_,lp.Attribution=L_,i0.layers=Y0,i0.zoom=gw,i0.scale=h6,i0.attribution=f6;var K0=ra.extend({initialize:function(ct){this._map=ct},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});K0.addTo=function(ct,Bt){return ct.addHandler(Bt,this),this};var up={Events:Ni},P0=El.touch?"touchstart mousedown":"mousedown",Fm=Ei.extend({options:{clickTolerance:3},initialize:function(ct,Bt,me,Qe){zr(this,Qe),this._element=ct,this._dragStartTarget=Bt||ct,this._preventOutline=me},enable:function(){this._enabled||(Pu(this._dragStartTarget,P0,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Fm._dragging===this&&this.finishDrag(!0),Bh(this._dragStartTarget,P0,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(ct){if(this._enabled&&(this._moved=!1,!S_(this._element,"leaflet-zoom-anim"))){if(ct.touches&&ct.touches.length!==1){Fm._dragging===this&&this.finishDrag();return}if(!(Fm._dragging||ct.shiftKey||ct.which!==1&&ct.button!==1&&!ct.touches)&&(Fm._dragging=this,this._preventOutline&&Hd(this._element),Kc(),C0(),!this._moving)){this.fire("down");var Bt=ct.touches?ct.touches[0]:ct,me=Ad(this._element);this._startPoint=new Va(Bt.clientX,Bt.clientY),this._startPos=Rc(this._element),this._parentScale=T1(me);var Qe=ct.type==="mousedown";Pu(document,Qe?"mousemove":"touchmove",this._onMove,this),Pu(document,Qe?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(ct){if(this._enabled){if(ct.touches&&ct.touches.length>1){this._moved=!0;return}var Bt=ct.touches&&ct.touches.length===1?ct.touches[0]:ct,me=new Va(Bt.clientX,Bt.clientY)._subtract(this._startPoint);!me.x&&!me.y||Math.abs(me.x)+Math.abs(me.y)Tn&&(ji=Na,Tn=Ya);Tn>me&&(Bt[ji]=1,_g(ct,Bt,me,Qe,ji),_g(ct,Bt,me,ji,Pr))}function yw(ct,Bt){for(var me=[ct[0]],Qe=1,Pr=0,Tn=ct.length;QeBt&&(me.push(ct[Qe]),Pr=Qe);return PrBt.max.x&&(me|=2),ct.yBt.max.y&&(me|=8),me}function m6(ct,Bt){var me=Bt.x-ct.x,Qe=Bt.y-ct.y;return me*me+Qe*Qe}function pv(ct,Bt,me,Qe){var Pr=Bt.x,Tn=Bt.y,ji=me.x-Pr,Na=me.y-Tn,Ya=ji*ji+Na*Na,xo;return Ya>0&&(xo=((ct.x-Pr)*ji+(ct.y-Tn)*Na)/Ya,xo>1?(Pr=me.x,Tn=me.y):xo>0&&(Pr+=ji*xo,Tn+=Na*xo)),ji=ct.x-Pr,Na=ct.y-Tn,Qe?ji*ji+Na*Na:new Va(Pr,Tn)}function g0(ct){return!kn(ct[0])||typeof ct[0][0]!="object"&&typeof ct[0][0]<"u"}function xw(ct){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),g0(ct)}function _w(ct,Bt){var me,Qe,Pr,Tn,ji,Na,Ya,xo;if(!ct||ct.length===0)throw new Error("latlngs not passed");g0(ct)||(console.warn("latlngs are not flat! Only the first ring will be used"),ct=ct[0]);var Vs=Ta([0,0]),xl=qo(ct),Du=xl.getNorthWest().distanceTo(xl.getSouthWest())*xl.getNorthEast().distanceTo(xl.getNorthWest());Du<1700&&(Vs=Ry(ct));var Sd=ct.length,Bf=[];for(me=0;meQe){Ya=(Tn-Qe)/Pr,xo=[Na.x-Ya*(Na.x-ji.x),Na.y-Ya*(Na.y-ji.y)];break}var wp=Bt.unproject(mo(xo));return Ta([wp.lat+Vs.lat,wp.lng+Vs.lng])}var Qh={__proto__:null,simplify:z_,pointToSegmentDistance:vw,closestPointOnSegment:xg,clipSegment:O_,_getEdgeIntersection:bg,_getBitCode:wg,_sqClosestPointOnSegment:pv,isFlat:g0,_flat:xw,polylineCenter:_w},v0={project:function(ct){return new Va(ct.lng,ct.lat)},unproject:function(ct){return new fo(ct.y,ct.x)},bounds:new ko([-180,-90],[180,90])},mv={R:6378137,R_MINOR:6356752314245179e-9,bounds:new ko([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(ct){var Bt=Math.PI/180,me=this.R,Qe=ct.lat*Bt,Pr=this.R_MINOR/me,Tn=Math.sqrt(1-Pr*Pr),ji=Tn*Math.sin(Qe),Na=Math.tan(Math.PI/4-Qe/2)/Math.pow((1-ji)/(1+ji),Tn/2);return Qe=-me*Math.log(Math.max(Na,1e-10)),new Va(ct.lng*Bt*me,Qe)},unproject:function(ct){for(var Bt=180/Math.PI,me=this.R,Qe=this.R_MINOR/me,Pr=Math.sqrt(1-Qe*Qe),Tn=Math.exp(-ct.y/me),ji=Math.PI/2-2*Math.atan(Tn),Na=0,Ya=.1,xo;Na<15&&Math.abs(Ya)>1e-7;Na++)xo=Pr*Math.sin(ji),xo=Math.pow((1-xo)/(1+xo),Pr/2),Ya=Math.PI/2-2*Math.atan(Tn*xo)-ji,ji+=Ya;return new fo(ji*Bt,ct.x*Bt/me)}},D_={__proto__:null,LonLat:v0,Mercator:mv,SphericalMercator:Ps},F_=J({},go,{code:"EPSG:3395",projection:mv,transformation:function(){var ct=.5/(Math.PI*mv.R);return gi(ct,.5,-ct,.5)}()}),By=J({},go,{code:"EPSG:4326",projection:v0,transformation:gi(1/180,1,-1/180,.5)}),kg=J({},Ea,{projection:v0,transformation:gi(1,0,-1,0),scale:function(ct){return Math.pow(2,ct)},zoom:function(ct){return Math.log(ct)/Math.LN2},distance:function(ct,Bt){var me=Bt.lng-ct.lng,Qe=Bt.lat-ct.lat;return Math.sqrt(me*me+Qe*Qe)},infinite:!0});Ea.Earth=go,Ea.EPSG3395=F_,Ea.EPSG3857=bi,Ea.EPSG900913=li,Ea.EPSG4326=By,Ea.Simple=kg;var a0=Ei.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(ct){return ct.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(ct){return ct&&ct.removeLayer(this),this},getPane:function(ct){return this._map.getPane(ct?this.options[ct]||ct:this.options.pane)},addInteractiveTarget:function(ct){return this._map._targets[Gt(ct)]=this,this},removeInteractiveTarget:function(ct){return delete this._map._targets[Gt(ct)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(ct){var Bt=ct.target;if(Bt.hasLayer(this)){if(this._map=Bt,this._zoomAnimated=Bt._zoomAnimated,this.getEvents){var me=this.getEvents();Bt.on(me,this),this.once("remove",function(){Bt.off(me,this)},this)}this.onAdd(Bt),this.fire("add"),Bt.fire("layeradd",{layer:this})}}});Mc.include({addLayer:function(ct){if(!ct._layerAdd)throw new Error("The provided object is not a Layer.");var Bt=Gt(ct);return this._layers[Bt]?this:(this._layers[Bt]=ct,ct._mapToAdd=this,ct.beforeAdd&&ct.beforeAdd(this),this.whenReady(ct._layerAdd,ct),this)},removeLayer:function(ct){var Bt=Gt(ct);return this._layers[Bt]?(this._loaded&&ct.onRemove(this),delete this._layers[Bt],this._loaded&&(this.fire("layerremove",{layer:ct}),ct.fire("remove")),ct._map=ct._mapToAdd=null,this):this},hasLayer:function(ct){return Gt(ct)in this._layers},eachLayer:function(ct,Bt){for(var me in this._layers)ct.call(Bt,this._layers[me]);return this},_addLayers:function(ct){ct=ct?kn(ct)?ct:[ct]:[];for(var Bt=0,me=ct.length;Btthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&Bt[0]instanceof fo&&Bt[0].equals(Bt[me-1])&&Bt.pop(),Bt},_setLatLngs:function(ct){y0.prototype._setLatLngs.call(this,ct),g0(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return g0(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var ct=this._renderer._bounds,Bt=this.options.weight,me=new Va(Bt,Bt);if(ct=new ko(ct.min.subtract(me),ct.max.add(me)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(ct))){if(this.options.noClip){this._parts=this._rings;return}for(var Qe=0,Pr=this._rings.length,Tn;Qect.y!=Pr.y>ct.y&&ct.x<(Pr.x-Qe.x)*(ct.y-Qe.y)/(Pr.y-Qe.y)+Qe.x&&(Bt=!Bt);return Bt||y0.prototype._containsPoint.call(this,ct,!0)}});function v6(ct,Bt){return new yv(ct,Bt)}var pm=bp.extend({initialize:function(ct,Bt){zr(this,Bt),this._layers={},ct&&this.addData(ct)},addData:function(ct){var Bt=kn(ct)?ct:ct.features,me,Qe,Pr;if(Bt){for(me=0,Qe=Bt.length;me0&&Pr.push(Pr[0].slice()),Pr}function mm(ct,Bt){return ct.feature?J({},ct.feature,{geometry:Bt}):qy(Bt)}function qy(ct){return ct.type==="Feature"||ct.type==="FeatureCollection"?ct:{type:"Feature",properties:{},geometry:ct}}var U_={toGeoJSON:function(ct){return mm(this,{type:"Point",coordinates:j_(this.getLatLng(),ct)})}};M1.include(U_),Uy.include(U_),jy.include(U_),y0.include({toGeoJSON:function(ct){var Bt=!g0(this._latlngs),me=Wy(this._latlngs,Bt?1:0,!1,ct);return mm(this,{type:(Bt?"Multi":"")+"LineString",coordinates:me})}}),yv.include({toGeoJSON:function(ct){var Bt=!g0(this._latlngs),me=Bt&&!g0(this._latlngs[0]),Qe=Wy(this._latlngs,me?2:Bt?1:0,!0,ct);return Bt||(Qe=[Qe]),mm(this,{type:(me?"Multi":"")+"Polygon",coordinates:Qe})}}),Tg.include({toMultiPoint:function(ct){var Bt=[];return this.eachLayer(function(me){Bt.push(me.toGeoJSON(ct).geometry.coordinates)}),mm(this,{type:"MultiPoint",coordinates:Bt})},toGeoJSON:function(ct){var Bt=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(Bt==="MultiPoint")return this.toMultiPoint(ct);var me=Bt==="GeometryCollection",Qe=[];return this.eachLayer(function(Pr){if(Pr.toGeoJSON){var Tn=Pr.toGeoJSON(ct);if(me)Qe.push(Tn.geometry);else{var ji=qy(Tn);ji.type==="FeatureCollection"?Qe.push.apply(Qe,ji.features):Qe.push(ji)}}}),me?mm(this,{geometries:Qe,type:"GeometryCollection"}):{type:"FeatureCollection",features:Qe}}});function V_(ct,Bt){return new pm(ct,Bt)}var Zy=V_,gm=a0.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(ct,Bt,me){this._url=ct,this._bounds=qo(Bt),zr(this,me)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Wu(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Tf(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(ct){return this.options.opacity=ct,this._image&&this._updateOpacity(),this},setStyle:function(ct){return ct.opacity&&this.setOpacity(ct.opacity),this},bringToFront:function(){return this._map&&hv(this._image),this},bringToBack:function(){return this._map&&bn(this._image),this},setUrl:function(ct){return this._url=ct,this._image&&(this._image.src=ct),this},setBounds:function(ct){return this._bounds=qo(ct),this._map&&this._reset(),this},getEvents:function(){var ct={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(ct.zoomanim=this._animateZoom),ct},setZIndex:function(ct){return this.options.zIndex=ct,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var ct=this._url.tagName==="IMG",Bt=this._image=ct?this._url:Cc("img");if(Wu(Bt,"leaflet-image-layer"),this._zoomAnimated&&Wu(Bt,"leaflet-zoom-animated"),this.options.className&&Wu(Bt,this.options.className),Bt.onselectstart=Ne,Bt.onmousemove=Ne,Bt.onload=kt(this.fire,this,"load"),Bt.onerror=kt(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(Bt.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),ct){this._url=Bt.src;return}Bt.src=this._url,Bt.alt=this.options.alt},_animateZoom:function(ct){var Bt=this._map.getZoomScale(ct.zoom),me=this._map._latLngBoundsToNewLayerBounds(this._bounds,ct.zoom,ct.center).min;pu(this._image,me,Bt)},_reset:function(){var ct=this._image,Bt=new ko(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),me=Bt.getSize();ic(ct,Bt.min),ct.style.width=me.x+"px",ct.style.height=me.y+"px"},_updateOpacity:function(){m0(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var ct=this.options.errorOverlayUrl;ct&&this._url!==ct&&(this._url=ct,this._image.src=ct)},getCenter:function(){return this._bounds.getCenter()}}),vm=function(ct,Bt,me){return new gm(ct,Bt,me)},z0=gm.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var ct=this._url.tagName==="VIDEO",Bt=this._image=ct?this._url:Cc("video");if(Wu(Bt,"leaflet-image-layer"),this._zoomAnimated&&Wu(Bt,"leaflet-zoom-animated"),this.options.className&&Wu(Bt,this.options.className),Bt.onselectstart=Ne,Bt.onmousemove=Ne,Bt.onloadeddata=kt(this.fire,this,"load"),ct){for(var me=Bt.getElementsByTagName("source"),Qe=[],Pr=0;Pr0?Qe:[Bt.src];return}kn(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(Bt.style,"objectFit")&&(Bt.style.objectFit="fill"),Bt.autoplay=!!this.options.autoplay,Bt.loop=!!this.options.loop,Bt.muted=!!this.options.muted,Bt.playsInline=!!this.options.playsInline;for(var Tn=0;TnPr?(Bt.height=Pr+"px",Wu(ct,Tn)):Rf(ct,Tn),this._containerWidth=this._container.offsetWidth},_animateZoom:function(ct){var Bt=this._map._latLngToNewLayerPoint(this._latlng,ct.zoom,ct.center),me=this._getAnchor();ic(this._container,Bt.add(me))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var ct=this._map,Bt=parseInt(w1(this._container,"marginBottom"),10)||0,me=this._container.offsetHeight+Bt,Qe=this._containerWidth,Pr=new Va(this._containerLeft,-me-this._containerBottom);Pr._add(Rc(this._container));var Tn=ct.layerPointToContainerPoint(Pr),ji=mo(this.options.autoPanPadding),Na=mo(this.options.autoPanPaddingTopLeft||ji),Ya=mo(this.options.autoPanPaddingBottomRight||ji),xo=ct.getSize(),Vs=0,xl=0;Tn.x+Qe+Ya.x>xo.x&&(Vs=Tn.x+Qe-xo.x+Ya.x),Tn.x-Vs-Na.x<0&&(Vs=Tn.x-Na.x),Tn.y+me+Ya.y>xo.y&&(xl=Tn.y+me-xo.y+Ya.y),Tn.y-xl-Na.y<0&&(xl=Tn.y-Na.y),(Vs||xl)&&(this.options.keepInView&&(this._autopanning=!0),ct.fire("autopanstart").panBy([Vs,xl]))}},_getAnchor:function(){return mo(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),vf=function(ct,Bt){return new Ag(ct,Bt)};Mc.mergeOptions({closePopupOnClick:!0}),Mc.include({openPopup:function(ct,Bt,me){return this._initOverlay(Ag,ct,Bt,me).openOn(this),this},closePopup:function(ct){return ct=arguments.length?ct:this._popup,ct&&ct.close(),this}}),a0.include({bindPopup:function(ct,Bt){return this._popup=this._initOverlay(Ag,this._popup,ct,Bt),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(ct){return this._popup&&(this instanceof bp||(this._popup._source=this),this._popup._prepareOpen(ct||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(ct){return this._popup&&this._popup.setContent(ct),this},getPopup:function(){return this._popup},_openPopup:function(ct){if(!(!this._popup||!this._map)){vg(ct);var Bt=ct.layer||ct.target;if(this._popup._source===Bt&&!(Bt instanceof Bm)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(ct.latlng);return}this._popup._source=Bt,this.openPopup(ct.latlng)}},_movePopup:function(ct){this._popup.setLatLng(ct.latlng)},_onKeyPress:function(ct){ct.originalEvent.keyCode===13&&this._openPopup(ct)}});var S1=X0.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(ct){X0.prototype.onAdd.call(this,ct),this.setOpacity(this.options.opacity),ct.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(ct){X0.prototype.onRemove.call(this,ct),ct.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var ct=X0.prototype.getEvents.call(this);return this.options.permanent||(ct.preclick=this.close),ct},_initLayout:function(){var ct="leaflet-tooltip",Bt=ct+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Cc("div",Bt),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+Gt(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(ct){var Bt,me,Qe=this._map,Pr=this._container,Tn=Qe.latLngToContainerPoint(Qe.getCenter()),ji=Qe.layerPointToContainerPoint(ct),Na=this.options.direction,Ya=Pr.offsetWidth,xo=Pr.offsetHeight,Vs=mo(this.options.offset),xl=this._getAnchor();Na==="top"?(Bt=Ya/2,me=xo):Na==="bottom"?(Bt=Ya/2,me=0):Na==="center"?(Bt=Ya/2,me=xo/2):Na==="right"?(Bt=0,me=xo/2):Na==="left"?(Bt=Ya,me=xo/2):ji.xthis.options.maxZoom||meQe?this._retainParent(Pr,Tn,ji,Qe):!1)},_retainChildren:function(ct,Bt,me,Qe){for(var Pr=2*ct;Pr<2*ct+2;Pr++)for(var Tn=2*Bt;Tn<2*Bt+2;Tn++){var ji=new Va(Pr,Tn);ji.z=me+1;var Na=this._tileCoordsToKey(ji),Ya=this._tiles[Na];if(Ya&&Ya.active){Ya.retain=!0;continue}else Ya&&Ya.loaded&&(Ya.retain=!0);me+1this.options.maxZoom||this.options.minZoom!==void 0&&Pr1){this._setView(ct,me);return}for(var xl=Pr.min.y;xl<=Pr.max.y;xl++)for(var Du=Pr.min.x;Du<=Pr.max.x;Du++){var Sd=new Va(Du,xl);if(Sd.z=this._tileZoom,!!this._isValidTile(Sd)){var Bf=this._tiles[this._tileCoordsToKey(Sd)];Bf?Bf.current=!0:ji.push(Sd)}}if(ji.sort(function(wp,jm){return wp.distanceTo(Tn)-jm.distanceTo(Tn)}),ji.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var _0=document.createDocumentFragment();for(Du=0;Dume.max.x)||!Bt.wrapLat&&(ct.yme.max.y))return!1}if(!this.options.bounds)return!0;var Qe=this._tileCoordsToBounds(ct);return qo(this.options.bounds).overlaps(Qe)},_keyToBounds:function(ct){return this._tileCoordsToBounds(this._keyToTileCoords(ct))},_tileCoordsToNwSe:function(ct){var Bt=this._map,me=this.getTileSize(),Qe=ct.scaleBy(me),Pr=Qe.add(me),Tn=Bt.unproject(Qe,ct.z),ji=Bt.unproject(Pr,ct.z);return[Tn,ji]},_tileCoordsToBounds:function(ct){var Bt=this._tileCoordsToNwSe(ct),me=new fu(Bt[0],Bt[1]);return this.options.noWrap||(me=this._map.wrapLatLngBounds(me)),me},_tileCoordsToKey:function(ct){return ct.x+":"+ct.y+":"+ct.z},_keyToTileCoords:function(ct){var Bt=ct.split(":"),me=new Va(+Bt[0],+Bt[1]);return me.z=+Bt[2],me},_removeTile:function(ct){var Bt=this._tiles[ct];Bt&&(Tf(Bt.el),delete this._tiles[ct],this.fire("tileunload",{tile:Bt.el,coords:this._keyToTileCoords(ct)}))},_initTile:function(ct){Wu(ct,"leaflet-tile");var Bt=this.getTileSize();ct.style.width=Bt.x+"px",ct.style.height=Bt.y+"px",ct.onselectstart=Ne,ct.onmousemove=Ne,El.ielt9&&this.options.opacity<1&&m0(ct,this.options.opacity)},_addTile:function(ct,Bt){var me=this._getTilePos(ct),Qe=this._tileCoordsToKey(ct),Pr=this.createTile(this._wrapCoords(ct),kt(this._tileReady,this,ct));this._initTile(Pr),this.createTile.length<2&&fa(kt(this._tileReady,this,ct,null,Pr)),ic(Pr,me),this._tiles[Qe]={el:Pr,coords:ct,current:!0},Bt.appendChild(Pr),this.fire("tileloadstart",{tile:Pr,coords:ct})},_tileReady:function(ct,Bt,me){Bt&&this.fire("tileerror",{error:Bt,tile:me,coords:ct});var Qe=this._tileCoordsToKey(ct);me=this._tiles[Qe],me&&(me.loaded=+new Date,this._map._fadeAnimated?(m0(me.el,0),Li(this._fadeFrame),this._fadeFrame=fa(this._updateOpacity,this)):(me.active=!0,this._pruneTiles()),Bt||(Wu(me.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:me.el,coords:ct})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),El.ielt9||!this._map._fadeAnimated?fa(this._pruneTiles,this):setTimeout(kt(this._pruneTiles,this),250)))},_getTilePos:function(ct){return ct.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(ct){var Bt=new Va(this._wrapX?pe(ct.x,this._wrapX):ct.x,this._wrapY?pe(ct.y,this._wrapY):ct.y);return Bt.z=ct.z,Bt},_pxBoundsToTileRange:function(ct){var Bt=this.getTileSize();return new ko(ct.min.unscaleBy(Bt).floor(),ct.max.unscaleBy(Bt).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var ct in this._tiles)if(!this._tiles[ct].loaded)return!1;return!0}});function W_(ct){return new E1(ct)}var o0=E1.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(ct,Bt){this._url=ct,Bt=zr(this,Bt),Bt.detectRetina&&El.retina&&Bt.maxZoom>0?(Bt.tileSize=Math.floor(Bt.tileSize/2),Bt.zoomReverse?(Bt.zoomOffset--,Bt.minZoom=Math.min(Bt.maxZoom,Bt.minZoom+1)):(Bt.zoomOffset++,Bt.maxZoom=Math.max(Bt.minZoom,Bt.maxZoom-1)),Bt.minZoom=Math.max(0,Bt.minZoom)):Bt.zoomReverse?Bt.minZoom=Math.min(Bt.maxZoom,Bt.minZoom):Bt.maxZoom=Math.max(Bt.minZoom,Bt.maxZoom),typeof Bt.subdomains=="string"&&(Bt.subdomains=Bt.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(ct,Bt){return this._url===ct&&Bt===void 0&&(Bt=!0),this._url=ct,Bt||this.redraw(),this},createTile:function(ct,Bt){var me=document.createElement("img");return Pu(me,"load",kt(this._tileOnLoad,this,Bt,me)),Pu(me,"error",kt(this._tileOnError,this,Bt,me)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(me.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(me.referrerPolicy=this.options.referrerPolicy),me.alt="",me.src=this.getTileUrl(ct),me},getTileUrl:function(ct){var Bt={r:El.retina?"@2x":"",s:this._getSubdomain(ct),x:ct.x,y:ct.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var me=this._globalTileRange.max.y-ct.y;this.options.tms&&(Bt.y=me),Bt["-y"]=me}return Ft(this._url,J(Bt,this.options))},_tileOnLoad:function(ct,Bt){El.ielt9?setTimeout(kt(ct,this,null,Bt),0):ct(null,Bt)},_tileOnError:function(ct,Bt,me){var Qe=this.options.errorTileUrl;Qe&&Bt.getAttribute("src")!==Qe&&(Bt.src=Qe),ct(me,Bt)},_onTileRemove:function(ct){ct.tile.onload=null},_getZoomForUrl:function(){var ct=this._tileZoom,Bt=this.options.maxZoom,me=this.options.zoomReverse,Qe=this.options.zoomOffset;return me&&(ct=Bt-ct),ct+Qe},_getSubdomain:function(ct){var Bt=Math.abs(ct.x+ct.y)%this.options.subdomains.length;return this.options.subdomains[Bt]},_abortLoading:function(){var ct,Bt;for(ct in this._tiles)if(this._tiles[ct].coords.z!==this._tileZoom&&(Bt=this._tiles[ct].el,Bt.onload=Ne,Bt.onerror=Ne,!Bt.complete)){Bt.src=jn;var me=this._tiles[ct].coords;Tf(Bt),delete this._tiles[ct],this.fire("tileabort",{tile:Bt,coords:me})}},_removeTile:function(ct){var Bt=this._tiles[ct];if(Bt)return Bt.el.setAttribute("src",jn),E1.prototype._removeTile.call(this,ct)},_tileReady:function(ct,Bt,me){if(!(!this._map||me&&me.getAttribute("src")===jn))return E1.prototype._tileReady.call(this,ct,Bt,me)}});function $y(ct,Bt){return new o0(ct,Bt)}var Gy=o0.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(ct,Bt){this._url=ct;var me=J({},this.defaultWmsParams);for(var Qe in Bt)Qe in this.options||(me[Qe]=Bt[Qe]);Bt=zr(this,Bt);var Pr=Bt.detectRetina&&El.retina?2:1,Tn=this.getTileSize();me.width=Tn.x*Pr,me.height=Tn.y*Pr,this.wmsParams=me},onAdd:function(ct){this._crs=this.options.crs||ct.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var Bt=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[Bt]=this._crs.code,o0.prototype.onAdd.call(this,ct)},getTileUrl:function(ct){var Bt=this._tileCoordsToNwSe(ct),me=this._crs,Qe=pl(me.project(Bt[0]),me.project(Bt[1])),Pr=Qe.min,Tn=Qe.max,ji=(this._wmsVersion>=1.3&&this._crs===By?[Pr.y,Pr.x,Tn.y,Tn.x]:[Pr.x,Pr.y,Tn.x,Tn.y]).join(","),Na=o0.prototype.getTileUrl.call(this,ct);return Na+Wr(this.wmsParams,Na,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+ji},setParams:function(ct,Bt){return J(this.wmsParams,ct),Bt||this.redraw(),this}});function Sw(ct,Bt){return new Gy(ct,Bt)}o0.WMS=Gy,$y.wms=Sw;var ym=a0.extend({options:{padding:.1},initialize:function(ct){zr(this,ct),Gt(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Wu(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var ct={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(ct.zoomanim=this._onAnimZoom),ct},_onAnimZoom:function(ct){this._updateTransform(ct.center,ct.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(ct,Bt){var me=this._map.getZoomScale(Bt,this._zoom),Qe=this._map.getSize().multiplyBy(.5+this.options.padding),Pr=this._map.project(this._center,Bt),Tn=Qe.multiplyBy(-me).add(Pr).subtract(this._map._getNewPixelOrigin(ct,Bt));El.any3d?pu(this._container,Tn,me):ic(this._container,Tn)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var ct in this._layers)this._layers[ct]._reset()},_onZoomEnd:function(){for(var ct in this._layers)this._layers[ct]._project()},_updatePaths:function(){for(var ct in this._layers)this._layers[ct]._update()},_update:function(){var ct=this.options.padding,Bt=this._map.getSize(),me=this._map.containerPointToLayerPoint(Bt.multiplyBy(-ct)).round();this._bounds=new ko(me,me.add(Bt.multiplyBy(1+ct*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Ew=ym.extend({options:{tolerance:0},getEvents:function(){var ct=ym.prototype.getEvents.call(this);return ct.viewprereset=this._onViewPreReset,ct},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ym.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var ct=this._container=document.createElement("canvas");Pu(ct,"mousemove",this._onMouseMove,this),Pu(ct,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Pu(ct,"mouseout",this._handleMouseOut,this),ct._leaflet_disable_events=!0,this._ctx=ct.getContext("2d")},_destroyContainer:function(){Li(this._redrawRequest),delete this._ctx,Tf(this._container),Bh(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var ct;this._redrawBounds=null;for(var Bt in this._layers)ct=this._layers[Bt],ct._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ym.prototype._update.call(this);var ct=this._bounds,Bt=this._container,me=ct.getSize(),Qe=El.retina?2:1;ic(Bt,ct.min),Bt.width=Qe*me.x,Bt.height=Qe*me.y,Bt.style.width=me.x+"px",Bt.style.height=me.y+"px",El.retina&&this._ctx.scale(2,2),this._ctx.translate(-ct.min.x,-ct.min.y),this.fire("update")}},_reset:function(){ym.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(ct){this._updateDashArray(ct),this._layers[Gt(ct)]=ct;var Bt=ct._order={layer:ct,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=Bt),this._drawLast=Bt,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(ct){this._requestRedraw(ct)},_removePath:function(ct){var Bt=ct._order,me=Bt.next,Qe=Bt.prev;me?me.prev=Qe:this._drawLast=Qe,Qe?Qe.next=me:this._drawFirst=me,delete ct._order,delete this._layers[Gt(ct)],this._requestRedraw(ct)},_updatePath:function(ct){this._extendRedrawBounds(ct),ct._project(),ct._update(),this._requestRedraw(ct)},_updateStyle:function(ct){this._updateDashArray(ct),this._requestRedraw(ct)},_updateDashArray:function(ct){if(typeof ct.options.dashArray=="string"){var Bt=ct.options.dashArray.split(/[, ]+/),me=[],Qe,Pr;for(Pr=0;Pr')}}catch{}return function(ct){return document.createElement("<"+ct+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),_6={_initContainer:function(){this._container=Cc("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ym.prototype._update.call(this),this.fire("update"))},_initPath:function(ct){var Bt=ct._container=C1("shape");Wu(Bt,"leaflet-vml-shape "+(this.options.className||"")),Bt.coordsize="1 1",ct._path=C1("path"),Bt.appendChild(ct._path),this._updateStyle(ct),this._layers[Gt(ct)]=ct},_addPath:function(ct){var Bt=ct._container;this._container.appendChild(Bt),ct.options.interactive&&ct.addInteractiveTarget(Bt)},_removePath:function(ct){var Bt=ct._container;Tf(Bt),ct.removeInteractiveTarget(Bt),delete this._layers[Gt(ct)]},_updateStyle:function(ct){var Bt=ct._stroke,me=ct._fill,Qe=ct.options,Pr=ct._container;Pr.stroked=!!Qe.stroke,Pr.filled=!!Qe.fill,Qe.stroke?(Bt||(Bt=ct._stroke=C1("stroke")),Pr.appendChild(Bt),Bt.weight=Qe.weight+"px",Bt.color=Qe.color,Bt.opacity=Qe.opacity,Qe.dashArray?Bt.dashStyle=kn(Qe.dashArray)?Qe.dashArray.join(" "):Qe.dashArray.replace(/( *, *)/g," "):Bt.dashStyle="",Bt.endcap=Qe.lineCap.replace("butt","flat"),Bt.joinstyle=Qe.lineJoin):Bt&&(Pr.removeChild(Bt),ct._stroke=null),Qe.fill?(me||(me=ct._fill=C1("fill")),Pr.appendChild(me),me.color=Qe.fillColor||Qe.color,me.opacity=Qe.fillOpacity):me&&(Pr.removeChild(me),ct._fill=null)},_updateCircle:function(ct){var Bt=ct._point.round(),me=Math.round(ct._radius),Qe=Math.round(ct._radiusY||me);this._setPath(ct,ct._empty()?"M0 0":"AL "+Bt.x+","+Bt.y+" "+me+","+Qe+" 0,"+65535*360)},_setPath:function(ct,Bt){ct._path.v=Bt},_bringToFront:function(ct){hv(ct._container)},_bringToBack:function(ct){bn(ct._container)}},Nm=El.vml?C1:co,Fp=ym.extend({_initContainer:function(){this._container=Nm("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Nm("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Tf(this._container),Bh(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ym.prototype._update.call(this);var ct=this._bounds,Bt=ct.getSize(),me=this._container;(!this._svgSize||!this._svgSize.equals(Bt))&&(this._svgSize=Bt,me.setAttribute("width",Bt.x),me.setAttribute("height",Bt.y)),ic(me,ct.min),me.setAttribute("viewBox",[ct.min.x,ct.min.y,Bt.x,Bt.y].join(" ")),this.fire("update")}},_initPath:function(ct){var Bt=ct._path=Nm("path");ct.options.className&&Wu(Bt,ct.options.className),ct.options.interactive&&Wu(Bt,"leaflet-interactive"),this._updateStyle(ct),this._layers[Gt(ct)]=ct},_addPath:function(ct){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(ct._path),ct.addInteractiveTarget(ct._path)},_removePath:function(ct){Tf(ct._path),ct.removeInteractiveTarget(ct._path),delete this._layers[Gt(ct)]},_updatePath:function(ct){ct._project(),ct._update()},_updateStyle:function(ct){var Bt=ct._path,me=ct.options;Bt&&(me.stroke?(Bt.setAttribute("stroke",me.color),Bt.setAttribute("stroke-opacity",me.opacity),Bt.setAttribute("stroke-width",me.weight),Bt.setAttribute("stroke-linecap",me.lineCap),Bt.setAttribute("stroke-linejoin",me.lineJoin),me.dashArray?Bt.setAttribute("stroke-dasharray",me.dashArray):Bt.removeAttribute("stroke-dasharray"),me.dashOffset?Bt.setAttribute("stroke-dashoffset",me.dashOffset):Bt.removeAttribute("stroke-dashoffset")):Bt.setAttribute("stroke","none"),me.fill?(Bt.setAttribute("fill",me.fillColor||me.color),Bt.setAttribute("fill-opacity",me.fillOpacity),Bt.setAttribute("fill-rule",me.fillRule||"evenodd")):Bt.setAttribute("fill","none"))},_updatePoly:function(ct,Bt){this._setPath(ct,vo(ct._parts,Bt))},_updateCircle:function(ct){var Bt=ct._point,me=Math.max(Math.round(ct._radius),1),Qe=Math.max(Math.round(ct._radiusY),1)||me,Pr="a"+me+","+Qe+" 0 1,0 ",Tn=ct._empty()?"M0 0":"M"+(Bt.x-me)+","+Bt.y+Pr+me*2+",0 "+Pr+-me*2+",0 ";this._setPath(ct,Tn)},_setPath:function(ct,Bt){ct._path.setAttribute("d",Bt)},_bringToFront:function(ct){hv(ct._path)},_bringToBack:function(ct){bn(ct._path)}});El.vml&&Fp.include(_6);function Cw(ct){return El.svg||El.vml?new Fp(ct):null}Mc.include({getRenderer:function(ct){var Bt=ct.options.renderer||this._getPaneRenderer(ct.options.pane)||this.options.renderer||this._renderer;return Bt||(Bt=this._renderer=this._createRenderer()),this.hasLayer(Bt)||this.addLayer(Bt),Bt},_getPaneRenderer:function(ct){if(ct==="overlayPane"||ct===void 0)return!1;var Bt=this._paneRenderers[ct];return Bt===void 0&&(Bt=this._createRenderer({pane:ct}),this._paneRenderers[ct]=Bt),Bt},_createRenderer:function(ct){return this.options.preferCanvas&&q_(ct)||Cw(ct)}});var s0=yv.extend({initialize:function(ct,Bt){yv.prototype.initialize.call(this,this._boundsToLatLngs(ct),Bt)},setBounds:function(ct){return this.setLatLngs(this._boundsToLatLngs(ct))},_boundsToLatLngs:function(ct){return ct=qo(ct),[ct.getSouthWest(),ct.getNorthWest(),ct.getNorthEast(),ct.getSouthEast()]}});function I0(ct,Bt){return new s0(ct,Bt)}Fp.create=Nm,Fp.pointsToPath=vo,pm.geometryToLayer=Vy,pm.coordsToLatLng=N_,pm.coordsToLatLngs=Hy,pm.latLngToCoords=j_,pm.latLngsToCoords=Wy,pm.getFeature=mm,pm.asFeature=qy,Mc.mergeOptions({boxZoom:!0});var xv=K0.extend({initialize:function(ct){this._map=ct,this._container=ct._container,this._pane=ct._panes.overlayPane,this._resetStateTimeout=0,ct.on("unload",this._destroy,this)},addHooks:function(){Pu(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Bh(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Tf(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(ct){if(!ct.shiftKey||ct.which!==1&&ct.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),C0(),Kc(),this._startPoint=this._map.mouseEventToContainerPoint(ct),Pu(document,{contextmenu:vg,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(ct){this._moved||(this._moved=!0,this._box=Cc("div","leaflet-zoom-box",this._container),Wu(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(ct);var Bt=new ko(this._point,this._startPoint),me=Bt.getSize();ic(this._box,Bt.min),this._box.style.width=me.x+"px",this._box.style.height=me.y+"px"},_finish:function(){this._moved&&(Tf(this._box),Rf(this._container,"leaflet-crosshair")),pg(),Op(),Bh(document,{contextmenu:vg,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(ct){if(!(ct.which!==1&&ct.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(kt(this._resetState,this),0);var Bt=new fu(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(Bt).fire("boxzoomend",{boxZoomBounds:Bt})}},_onKeyDown:function(ct){ct.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Mc.addInitHook("addHandler","boxZoom",xv),Mc.mergeOptions({doubleClickZoom:!0});var x0=K0.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(ct){var Bt=this._map,me=Bt.getZoom(),Qe=Bt.options.zoomDelta,Pr=ct.originalEvent.shiftKey?me-Qe:me+Qe;Bt.options.doubleClickZoom==="center"?Bt.setZoom(Pr):Bt.setZoomAround(ct.containerPoint,Pr)}});Mc.addInitHook("addHandler","doubleClickZoom",x0),Mc.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var O0=K0.extend({addHooks:function(){if(!this._draggable){var ct=this._map;this._draggable=new Fm(ct._mapPane,ct._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),ct.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),ct.on("zoomend",this._onZoomEnd,this),ct.whenReady(this._onZoomEnd,this))}Wu(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Rf(this._map._container,"leaflet-grab"),Rf(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var ct=this._map;if(ct._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var Bt=qo(this._map.options.maxBounds);this._offsetLimit=pl(this._map.latLngToContainerPoint(Bt.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(Bt.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;ct.fire("movestart").fire("dragstart"),ct.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(ct){if(this._map.options.inertia){var Bt=this._lastTime=+new Date,me=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(me),this._times.push(Bt),this._prunePositions(Bt)}this._map.fire("move",ct).fire("drag",ct)},_prunePositions:function(ct){for(;this._positions.length>1&&ct-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var ct=this._map.getSize().divideBy(2),Bt=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=Bt.subtract(ct).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(ct,Bt){return ct-(ct-Bt)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var ct=this._draggable._newPos.subtract(this._draggable._startPos),Bt=this._offsetLimit;ct.xBt.max.x&&(ct.x=this._viscousLimit(ct.x,Bt.max.x)),ct.y>Bt.max.y&&(ct.y=this._viscousLimit(ct.y,Bt.max.y)),this._draggable._newPos=this._draggable._startPos.add(ct)}},_onPreDragWrap:function(){var ct=this._worldWidth,Bt=Math.round(ct/2),me=this._initialWorldOffset,Qe=this._draggable._newPos.x,Pr=(Qe-Bt+me)%ct+Bt-me,Tn=(Qe+Bt+me)%ct-Bt-me,ji=Math.abs(Pr+me)0?Tn:-Tn))-Bt;this._delta=0,this._startTime=null,ji&&(ct.options.scrollWheelZoom==="center"?ct.setZoom(Bt+ji):ct.setZoomAround(this._lastMousePos,Bt+ji))}});Mc.addInitHook("addHandler","scrollWheelZoom",Mg);var Pw=600;Mc.mergeOptions({tapHold:El.touchNative&&El.safari&&El.mobile,tapTolerance:15});var zw=K0.extend({addHooks:function(){Pu(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Bh(this._map._container,"touchstart",this._onDown,this)},_onDown:function(ct){if(clearTimeout(this._holdTimeout),ct.touches.length===1){var Bt=ct.touches[0];this._startPos=this._newPos=new Va(Bt.clientX,Bt.clientY),this._holdTimeout=setTimeout(kt(function(){this._cancel(),this._isTapValid()&&(Pu(document,"touchend",mc),Pu(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",Bt))},this),Pw),Pu(document,"touchend touchcancel contextmenu",this._cancel,this),Pu(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function ct(){Bh(document,"touchend",mc),Bh(document,"touchend touchcancel",ct)},_cancel:function(){clearTimeout(this._holdTimeout),Bh(document,"touchend touchcancel contextmenu",this._cancel,this),Bh(document,"touchmove",this._onMove,this)},_onMove:function(ct){var Bt=ct.touches[0];this._newPos=new Va(Bt.clientX,Bt.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(ct,Bt){var me=new MouseEvent(ct,{bubbles:!0,cancelable:!0,view:window,screenX:Bt.screenX,screenY:Bt.screenY,clientX:Bt.clientX,clientY:Bt.clientY});me._simulated=!0,Bt.target.dispatchEvent(me)}});Mc.addInitHook("addHandler","tapHold",zw),Mc.mergeOptions({touchZoom:El.touch,bounceAtZoomLimits:!0});var D0=K0.extend({addHooks:function(){Wu(this._map._container,"leaflet-touch-zoom"),Pu(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Rf(this._map._container,"leaflet-touch-zoom"),Bh(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(ct){var Bt=this._map;if(!(!ct.touches||ct.touches.length!==2||Bt._animatingZoom||this._zooming)){var me=Bt.mouseEventToContainerPoint(ct.touches[0]),Qe=Bt.mouseEventToContainerPoint(ct.touches[1]);this._centerPoint=Bt.getSize()._divideBy(2),this._startLatLng=Bt.containerPointToLatLng(this._centerPoint),Bt.options.touchZoom!=="center"&&(this._pinchStartLatLng=Bt.containerPointToLatLng(me.add(Qe)._divideBy(2))),this._startDist=me.distanceTo(Qe),this._startZoom=Bt.getZoom(),this._moved=!1,this._zooming=!0,Bt._stop(),Pu(document,"touchmove",this._onTouchMove,this),Pu(document,"touchend touchcancel",this._onTouchEnd,this),mc(ct)}},_onTouchMove:function(ct){if(!(!ct.touches||ct.touches.length!==2||!this._zooming)){var Bt=this._map,me=Bt.mouseEventToContainerPoint(ct.touches[0]),Qe=Bt.mouseEventToContainerPoint(ct.touches[1]),Pr=me.distanceTo(Qe)/this._startDist;if(this._zoom=Bt.getScaleZoom(Pr,this._startZoom),!Bt.options.bounceAtZoomLimits&&(this._zoomBt.getMaxZoom()&&Pr>1)&&(this._zoom=Bt._limitZoom(this._zoom)),Bt.options.touchZoom==="center"){if(this._center=this._startLatLng,Pr===1)return}else{var Tn=me._add(Qe)._divideBy(2)._subtract(this._centerPoint);if(Pr===1&&Tn.x===0&&Tn.y===0)return;this._center=Bt.unproject(Bt.project(this._pinchStartLatLng,this._zoom).subtract(Tn),this._zoom)}this._moved||(Bt._moveStart(!0,!1),this._moved=!0),Li(this._animRequest);var ji=kt(Bt._move,Bt,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=fa(ji,this,!0),mc(ct)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Li(this._animRequest),Bh(document,"touchmove",this._onTouchMove,this),Bh(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Mc.addInitHook("addHandler","touchZoom",D0),Mc.BoxZoom=xv,Mc.DoubleClickZoom=x0,Mc.Drag=O0,Mc.Keyboard=Lw,Mc.ScrollWheelZoom=Mg,Mc.TapHold=zw,Mc.TouchZoom=D0,z.Bounds=ko,z.Browser=El,z.CRS=Ea,z.Canvas=Ew,z.Circle=Uy,z.CircleMarker=jy,z.Class=ra,z.Control=lp,z.DivIcon=Mw,z.DivOverlay=X0,z.DomEvent=Dp,z.DomUtil=Tc,z.Draggable=Fm,z.Evented=Ei,z.FeatureGroup=bp,z.GeoJSON=pm,z.GridLayer=E1,z.Handler=K0,z.Icon=Rm,z.ImageOverlay=gm,z.LatLng=fo,z.LatLngBounds=fu,z.Layer=a0,z.LayerGroup=Tg,z.LineUtil=Qh,z.Map=Mc,z.Marker=M1,z.Mixin=up,z.Path=Bm,z.Point=Va,z.PolyUtil=d6,z.Polygon=yv,z.Polyline=y0,z.Popup=Ag,z.PosAnimation=A1,z.Projection=D_,z.Rectangle=s0,z.Renderer=ym,z.SVG=Fp,z.SVGOverlay=H_,z.TileLayer=o0,z.Tooltip=S1,z.Transformation=$o,z.Util=yi,z.VideoOverlay=z0,z.bind=kt,z.bounds=pl,z.canvas=q_,z.circle=vv,z.circleMarker=ww,z.control=i0,z.divIcon=x6,z.extend=J,z.featureGroup=bw,z.geoJSON=V_,z.geoJson=Zy,z.gridLayer=W_,z.icon=R_,z.imageOverlay=vm,z.latLng=Ta,z.latLngBounds=qo,z.layerGroup=Ny,z.map=js,z.marker=g6,z.point=mo,z.polygon=v6,z.polyline=kw,z.popup=vf,z.rectangle=I0,z.setOptions=zr,z.stamp=Gt,z.svg=Cw,z.svgOverlay=y6,z.tileLayer=$y,z.tooltip=Aw,z.transformation=gi,z.version=j,z.videoOverlay=tf;var F0=window.L;z.noConflict=function(){return window.L=F0,this},window.L=z})}(c2,c2.exports)),c2.exports}var Pat=Lat();const Zg=LO(Pat),zat={class:"space-y-6"},Iat={key:0,class:"flex items-center justify-center py-12"},Oat={key:1,class:"bg-accent-red/10 border border-accent-red/20 rounded-[15px] p-6"},Dat={class:"flex items-center gap-3"},Fat={class:"text-accent-red/80 text-sm"},Rat={key:0,class:"bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] p-6"},Bat={class:"flex items-center justify-between p-6 pb-4"},Nat={class:"text-white text-lg font-semibold"},jat={class:"text-sm text-dark-text ml-2"},Uat={class:"overflow-x-auto"},Vat={class:"w-full"},Hat={class:"bg-dark-bg/30"},Wat=["onMouseenter","onMouseleave"],qat={class:"py-4 px-6 text-white text-sm"},Zat={class:"py-4 px-6 text-white text-sm font-mono"},$at={class:"py-4 px-6 text-white text-sm"},Gat={key:0},Yat={key:1,class:"text-dark-text"},Kat={class:"py-4 px-6 text-white text-sm"},Xat={class:"py-4 px-6 text-white text-sm"},Jat={class:"py-4 px-6 text-white text-sm"},Qat={class:"py-4 px-6 text-white text-sm"},tot={class:"py-4 px-6 text-white text-sm"},eot={class:"py-4 px-6 text-white text-sm"},rot={class:"py-4 px-6 text-white text-sm text-center"},not={key:1,class:"text-center py-12"},iot=Th({name:"NeighborsView",__name:"Neighbors",setup(d){const l={0:"Unknown",1:"Chat Node",2:"Repeater",3:"Room Server",4:"Hybrid Node"},z={0:"text-gray-400",1:"text-blue-400",2:"text-accent-green",3:"text-accent-purple",4:"text-secondary"},j=lo({}),J=lo(!0),mt=lo(null),kt=lo();let Dt=null;const Gt=lo(new Map),re=Yo(()=>Object.entries(l).filter(([un])=>j.value[un]?.length>0).sort(([un],[ia])=>parseInt(un)-parseInt(ia))),pe=Yo(()=>Object.values(j.value).flat().filter(un=>un.latitude!==null&&un.longitude!==null)),Ne=un=>new Date(un*1e3).toLocaleString(),or=un=>un.length<=16?un:`${un.slice(0,8)}...${un.slice(-8)}`,_r=un=>un!==null?`${un} dBm`:"N/A",Fr=un=>un!==null?`${un.toFixed(1)} dB`:"N/A",zr=un=>un===null?"Unknown":{0:"Unknown",1:"Flood",2:"Direct"}[un]||`Type ${un}`,Wr=(un,ia,fa,Li)=>{const ra=(fa-un)*Math.PI/180,Da=(Li-ia)*Math.PI/180,Ni=Math.sin(ra/2)*Math.sin(ra/2)+Math.cos(un*Math.PI/180)*Math.cos(fa*Math.PI/180)*Math.sin(Da/2)*Math.sin(Da/2);return 6371*(2*Math.atan2(Math.sqrt(Ni),Math.sqrt(1-Ni)))},An=un=>un.latitude!==null&&un.longitude!==null?`${Wr(50.6185,-1.7339,un.latitude,un.longitude).toFixed(2)} km`:"Unknown",Ft=un=>{const ia={0:"#9CA3AF",1:"#60A5FA",2:"#A5E5B6",3:"#EBA0FC",4:"#FFC246"};return ia[un]||ia[0]},kn=async un=>{try{const ia=await Xh.get(`/adverts_by_contact_type?contact_type=${encodeURIComponent(un)}&hours=168`);return ia.success&&Array.isArray(ia.data)?ia.data:[]}catch(ia){return console.error(`Error fetching adverts for contact type ${un}:`,ia),[]}},ei=async()=>{J.value=!0,mt.value=null;try{j.value={};for(const[un,ia]of Object.entries(l)){const fa=await kn(ia);fa.length>0&&(j.value[un]=fa)}}catch(un){console.error("Error loading adverts:",un),mt.value=un instanceof Error?un.message:"Unknown error occurred"}finally{J.value=!1}},jn=async()=>{if(ai(),await Z0(),!kt.value){setTimeout(()=>{kt.value&&jn()},500);return}setTimeout(()=>{if(!kt.value)return;if(kt.value.offsetWidth===0||kt.value.offsetHeight===0){setTimeout(()=>jn(),500);return}const un=50.6185,ia=-1.7339;let fa=null;if(pe.value.length>0){const Li=[un,...pe.value.map(Va=>Va.latitude)],yi=[ia,...pe.value.map(Va=>Va.longitude)],ra=Math.min(...Li),Da=Math.max(...Li),Ni=Math.min(...yi),Ei=Math.max(...yi);fa=[[ra,Ni],[Da,Ei]]}try{fa?Dt=Zg.map(kt.value,{zoomControl:!0,attributionControl:!0,preferCanvas:!1}).fitBounds(fa,{padding:[50,50]}):Dt=Zg.map(kt.value,{center:[un,ia],zoom:12,zoomControl:!0,attributionControl:!0,preferCanvas:!1});const Li=Zg.tileLayer("https://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',maxZoom:18,minZoom:1,crossOrigin:!0}),yi=Zg.tileLayer("https://{s}.basemaps.cartocdn.com/dark_only_labels/{z}/{x}/{y}{r}.png",{maxZoom:18,minZoom:1,crossOrigin:!0});Li.addTo(Dt),yi.addTo(Dt);let ra=!1,Da=!1;const Ni=()=>{ra&&Da&&setTimeout(()=>{ss()},1e3)};Li.on("load",()=>{ra=!0,Dt&&Dt.invalidateSize(),Ni()}),yi.on("load",()=>{Da=!0,Ni()});const Ei=(mo,ko=!1)=>{const pl=ko?12:8;return Zg.divIcon({className:"custom-div-icon",html:`
`,iconSize:[pl+4,pl+4],iconAnchor:[pl/2+2,pl/2+2]})},Va=Ei("#AAE8E8",!0);Zg.marker([un,ia],{icon:Va}).addTo(Dt).bindPopup(` +
+ This Node
+ Base Station
+ ${un.toFixed(6)}, ${ia.toFixed(6)} +
+ `);const ss=()=>{const mo={0:"#9CA3AF",1:"#60A5FA",2:"#A5E5B6",3:"#EBA0FC",4:"#FFC246"},ko=[];let pl=0,fu=0;const qo=pe.value.length,fo=()=>{};pe.value.forEach(Ta=>{if(Ta.latitude!==null&&Ta.longitude!==null&&Dt){const Ea=parseInt(Ta.contact_type),go=mo[Ea]||mo[0],Ao=Ei(go),Ps=Wr(un,ia,Ta.latitude,Ta.longitude),$o=Zg.marker([Ta.latitude,Ta.longitude],{icon:Ao}).addTo(Dt).bindPopup(` +
+ ${Ta.node_name||"Unknown Node"}
+ ${l[Ea]||"Unknown"}
+ Distance: ${Ps.toFixed(2)} km
+ Route: ${zr(Ta.route_type)}
+ RSSI: ${_r(Ta.rssi)}
+ SNR: ${Fr(Ta.snr)}
+ ${Ta.latitude.toFixed(6)}, ${Ta.longitude.toFixed(6)} +
+ `);Gt.value.set(Ta.pubkey,$o);const gi=$o.getElement();gi&&(gi.style.opacity="0",gi.style.transition="opacity 0.5s ease-out");const bi=Ta.route_type||0;let li=go,co=3,vo=.7,yo;bi===2?(li="#A5E5B6",co=4,vo=.9):bi===1?(li="#FFC246",yo="10, 5",vo=.8):(li="#9CA3AF",yo="2, 5",vo=.6),(()=>{const ns=[un,ia],Ko=[Ta.latitude,Ta.longitude],Oo=Zg.polyline([ns,Ko],{color:li,weight:co,opacity:0,dashArray:yo,className:"connection-line"}).addTo(Dt),wl=Zg.polyline([ns,ns],{color:li,weight:co,opacity:0,dashArray:yo,className:"connection-line animated-line"}).addTo(Dt);setTimeout(()=>{wl.setStyle({opacity:vo});let ws=0;const Hu=1500/1e3*60,Fc=()=>{ws+=1/Hu,ws>1&&(ws=1);const kc=ns[0]+(Ko[0]-ns[0])*ws,Vd=ns[1]+(Ko[1]-ns[1])*ws,kd=[kc,Vd];wl.setLatLngs([ns,kd]),ws<1?requestAnimationFrame(Fc):(Dt.removeLayer(wl),Oo.setStyle({opacity:vo}),gi&&(gi.style.opacity="1"),Oo.on("mouseover",()=>{Oo.setStyle({weight:co+2,opacity:Math.min(vo+.3,1)})}),Oo.on("mouseout",()=>{Oo.setStyle({weight:co,opacity:vo})}),Oo.bindPopup(` +
+ Connection to ${Ta.node_name||"Unknown Node"}
+ Distance: ${Ps.toFixed(2)} km
+ Route: ${zr(Ta.route_type)}
+ Signal: ${_r(Ta.rssi)} / ${Fr(Ta.snr)} +
+ `),ko.push(Oo),fu++,fu===qo&&fo())};Fc()},pl)})(),pl+=300}})};setTimeout(()=>{Dt&&Dt.invalidateSize()},2e3)}catch(Li){console.error("Error initializing map:",Li)}},200)},ai=()=>{Dt&&(Dt.remove(),Dt=null),Gt.value.clear()},Qi=un=>{const ia=Gt.value.get(un);if(ia){const fa=ia.getElement();fa&&fa.classList.add("marker-highlight")}},Gi=un=>{const ia=Gt.value.get(un);if(ia){const fa=ia.getElement();fa&&fa.classList.remove("marker-highlight")}};return t0(async()=>{await ei()}),K2(()=>{ai()}),um(pe,async un=>{un.length>0&&!J.value&&(await Z0(),setTimeout(async()=>{await jn()},300))},{immediate:!1}),um(J,async un=>{!un&&pe.value.length>0&&(await Z0(),setTimeout(async()=>{await jn()},300))}),(un,ia)=>(zi(),Vi("div",zat,[J.value?(zi(),Vi("div",Iat,ia[0]||(ia[0]=[Re("div",{class:"text-center"},[Re("div",{class:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4"}),Re("p",{class:"text-dark-text"},"Loading neighbor data...")],-1)]))):mt.value?(zi(),Vi("div",Oat,[Re("div",Dat,[ia[2]||(ia[2]=Re("svg",{class:"w-5 h-5 text-accent-red",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("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 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"})],-1)),Re("div",null,[ia[1]||(ia[1]=Re("h3",{class:"text-accent-red font-medium"},"Error Loading Neighbors",-1)),Re("p",Fat,aa(mt.value),1)])])])):(zi(),Vi(Ou,{key:2},[pe.value.length>0?(zi(),Vi("div",Rat,[Re("div",{class:"flex items-center justify-between mb-4"},[ia[3]||(ia[3]=Re("h2",{class:"text-white text-lg font-semibold"},"Network Map",-1)),Re("button",{onClick:jn,class:"px-3 py-1 text-xs bg-primary/20 text-primary border border-primary/30 rounded-lg hover:bg-primary/30 transition-colors"}," Reload Map ")]),Re("div",{ref_key:"mapContainer",ref:kt,class:"w-full h-96 bg-gray-900 rounded-lg border border-gray-700/50 overflow-hidden leaflet-container shadow-xl",style:{"min-height":"384px",position:"relative",outline:"none","box-shadow":"inset 0 0 20px rgba(0,0,0,0.5)"}},null,512),ia[4]||(ia[4]=Ff('

Node Types

This Node
Repeater
Chat Node
Room Server
Hybrid Node

Connection Types

Direct Routing
Flood Routing
',1))])):bs("",!0),(zi(!0),Vi(Ou,null,sf(re.value,([fa,Li])=>(zi(),Vi("div",{key:fa,class:"bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] overflow-hidden"},[Re("div",Bat,[Re("h2",Nat,[nc(aa(Li)+" ",1),Re("span",jat,"("+aa(j.value[fa]?.length||0)+")",1)]),Re("div",{class:Xs(["flex items-center gap-2 text-sm",z[parseInt(fa)]])},[Re("div",{class:"w-2 h-2 rounded-full",style:av(`background-color: ${Ft(parseInt(fa))}`)},null,4),nc(" "+aa(Li),1)],2)]),Re("div",Uat,[Re("table",Vat,[ia[5]||(ia[5]=Re("thead",null,[Re("tr",{class:"bg-dark-bg/50"},[Re("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"Node Name"),Re("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"Public Key"),Re("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"Location"),Re("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"Distance"),Re("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"Route Type"),Re("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"RSSI"),Re("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"SNR"),Re("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"Last Seen"),Re("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"First Seen"),Re("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"Advert Count")])],-1)),Re("tbody",Hat,[(zi(!0),Vi(Ou,null,sf(j.value[fa],yi=>(zi(),Vi("tr",{key:yi.id,class:"hover:bg-white/5 transition-colors",onMouseenter:ra=>Qi(yi.pubkey),onMouseleave:ra=>Gi(yi.pubkey)},[Re("td",qat,aa(yi.node_name||"Unknown"),1),Re("td",Zat,aa(or(yi.pubkey)),1),Re("td",$at,[yi.latitude!==null&&yi.longitude!==null?(zi(),Vi("span",Gat,aa(yi.latitude.toFixed(6))+", "+aa(yi.longitude.toFixed(6)),1)):(zi(),Vi("span",Yat,"Unknown"))]),Re("td",Kat,aa(An(yi)),1),Re("td",Xat,[Re("span",{class:Xs(yi.route_type===2?"text-accent-green":yi.route_type===1?"text-secondary":"text-gray-400")},aa(zr(yi.route_type)),3)]),Re("td",Jat,aa(_r(yi.rssi)),1),Re("td",Qat,aa(Fr(yi.snr)),1),Re("td",tot,aa(Ne(yi.last_seen)),1),Re("td",eot,aa(Ne(yi.first_seen)),1),Re("td",rot,aa(yi.advert_count),1)],40,Wat))),128))])])])]))),128)),re.value.length===0?(zi(),Vi("div",not,[ia[6]||(ia[6]=Ff('

No Neighbors Found

No mesh neighbors have been discovered in your area yet.

',3)),Re("button",{onClick:ei,class:"mt-4 px-4 py-2 bg-primary/20 text-primary border border-primary/30 rounded-lg hover:bg-primary/30 transition-colors"}," Refresh ")])):bs("",!0)],64))]))}}),aot=ld(iot,[["__scopeId","data-v-eb494437"]]);/*! + * @kurkle/color v0.3.4 + * https://github.com/kurkle/color#readme + * (c) 2024 Jukka Kurkela + * Released under the MIT License + */function nw(d){return d+.5|0}const u1=(d,l,z)=>Math.max(Math.min(d,z),l);function h2(d){return u1(nw(d*2.55),0,255)}function p1(d){return u1(nw(d*255),0,255)}function Xg(d){return u1(nw(d/2.55)/100,0,1)}function UL(d){return u1(nw(d*100),0,100)}const am={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},mA=[..."0123456789ABCDEF"],oot=d=>mA[d&15],sot=d=>mA[(d&240)>>4]+mA[d&15],S5=d=>(d&240)>>4===(d&15),lot=d=>S5(d.r)&&S5(d.g)&&S5(d.b)&&S5(d.a);function uot(d){var l=d.length,z;return d[0]==="#"&&(l===4||l===5?z={r:255&am[d[1]]*17,g:255&am[d[2]]*17,b:255&am[d[3]]*17,a:l===5?am[d[4]]*17:255}:(l===7||l===9)&&(z={r:am[d[1]]<<4|am[d[2]],g:am[d[3]]<<4|am[d[4]],b:am[d[5]]<<4|am[d[6]],a:l===9?am[d[7]]<<4|am[d[8]]:255})),z}const cot=(d,l)=>d<255?l(d):"";function hot(d){var l=lot(d)?oot:sot;return d?"#"+l(d.r)+l(d.g)+l(d.b)+cot(d.a,l):void 0}const fot=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function PO(d,l,z){const j=l*Math.min(z,1-z),J=(mt,kt=(mt+d/30)%12)=>z-j*Math.max(Math.min(kt-3,9-kt,1),-1);return[J(0),J(8),J(4)]}function dot(d,l,z){const j=(J,mt=(J+d/60)%6)=>z-z*l*Math.max(Math.min(mt,4-mt,1),0);return[j(5),j(3),j(1)]}function pot(d,l,z){const j=PO(d,1,.5);let J;for(l+z>1&&(J=1/(l+z),l*=J,z*=J),J=0;J<3;J++)j[J]*=1-l-z,j[J]+=l;return j}function mot(d,l,z,j,J){return d===J?(l-z)/j+(l.5?pe/(2-mt-kt):pe/(mt+kt),Gt=mot(z,j,J,pe,mt),Gt=Gt*60+.5),[Gt|0,re||0,Dt]}function rM(d,l,z,j){return(Array.isArray(l)?d(l[0],l[1],l[2]):d(l,z,j)).map(p1)}function nM(d,l,z){return rM(PO,d,l,z)}function got(d,l,z){return rM(pot,d,l,z)}function vot(d,l,z){return rM(dot,d,l,z)}function zO(d){return(d%360+360)%360}function yot(d){const l=fot.exec(d);let z=255,j;if(!l)return;l[5]!==j&&(z=l[6]?h2(+l[5]):p1(+l[5]));const J=zO(+l[2]),mt=+l[3]/100,kt=+l[4]/100;return l[1]==="hwb"?j=got(J,mt,kt):l[1]==="hsv"?j=vot(J,mt,kt):j=nM(J,mt,kt),{r:j[0],g:j[1],b:j[2],a:z}}function xot(d,l){var z=eM(d);z[0]=zO(z[0]+l),z=nM(z),d.r=z[0],d.g=z[1],d.b=z[2]}function _ot(d){if(!d)return;const l=eM(d),z=l[0],j=UL(l[1]),J=UL(l[2]);return d.a<255?`hsla(${z}, ${j}%, ${J}%, ${Xg(d.a)})`:`hsl(${z}, ${j}%, ${J}%)`}const VL={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"},HL={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 bot(){const d={},l=Object.keys(HL),z=Object.keys(VL);let j,J,mt,kt,Dt;for(j=0;j>16&255,mt>>8&255,mt&255]}return d}let E5;function wot(d){E5||(E5=bot(),E5.transparent=[0,0,0,0]);const l=E5[d.toLowerCase()];return l&&{r:l[0],g:l[1],b:l[2],a:l.length===4?l[3]:255}}const kot=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Tot(d){const l=kot.exec(d);let z=255,j,J,mt;if(l){if(l[7]!==j){const kt=+l[7];z=l[8]?h2(kt):u1(kt*255,0,255)}return j=+l[1],J=+l[3],mt=+l[5],j=255&(l[2]?h2(j):u1(j,0,255)),J=255&(l[4]?h2(J):u1(J,0,255)),mt=255&(l[6]?h2(mt):u1(mt,0,255)),{r:j,g:J,b:mt,a:z}}}function Aot(d){return d&&(d.a<255?`rgba(${d.r}, ${d.g}, ${d.b}, ${Xg(d.a)})`:`rgb(${d.r}, ${d.g}, ${d.b})`)}const L8=d=>d<=.0031308?d*12.92:Math.pow(d,1/2.4)*1.055-.055,Xx=d=>d<=.04045?d/12.92:Math.pow((d+.055)/1.055,2.4);function Mot(d,l,z){const j=Xx(Xg(d.r)),J=Xx(Xg(d.g)),mt=Xx(Xg(d.b));return{r:p1(L8(j+z*(Xx(Xg(l.r))-j))),g:p1(L8(J+z*(Xx(Xg(l.g))-J))),b:p1(L8(mt+z*(Xx(Xg(l.b))-mt))),a:d.a+z*(l.a-d.a)}}function C5(d,l,z){if(d){let j=eM(d);j[l]=Math.max(0,Math.min(j[l]+j[l]*z,l===0?360:1)),j=nM(j),d.r=j[0],d.g=j[1],d.b=j[2]}}function IO(d,l){return d&&Object.assign(l||{},d)}function WL(d){var l={r:0,g:0,b:0,a:255};return Array.isArray(d)?d.length>=3&&(l={r:d[0],g:d[1],b:d[2],a:255},d.length>3&&(l.a=p1(d[3]))):(l=IO(d,{r:0,g:0,b:0,a:1}),l.a=p1(l.a)),l}function Sot(d){return d.charAt(0)==="r"?Tot(d):yot(d)}class N2{constructor(l){if(l instanceof N2)return l;const z=typeof l;let j;z==="object"?j=WL(l):z==="string"&&(j=uot(l)||wot(l)||Sot(l)),this._rgb=j,this._valid=!!j}get valid(){return this._valid}get rgb(){var l=IO(this._rgb);return l&&(l.a=Xg(l.a)),l}set rgb(l){this._rgb=WL(l)}rgbString(){return this._valid?Aot(this._rgb):void 0}hexString(){return this._valid?hot(this._rgb):void 0}hslString(){return this._valid?_ot(this._rgb):void 0}mix(l,z){if(l){const j=this.rgb,J=l.rgb;let mt;const kt=z===mt?.5:z,Dt=2*kt-1,Gt=j.a-J.a,re=((Dt*Gt===-1?Dt:(Dt+Gt)/(1+Dt*Gt))+1)/2;mt=1-re,j.r=255&re*j.r+mt*J.r+.5,j.g=255&re*j.g+mt*J.g+.5,j.b=255&re*j.b+mt*J.b+.5,j.a=kt*j.a+(1-kt)*J.a,this.rgb=j}return this}interpolate(l,z){return l&&(this._rgb=Mot(this._rgb,l._rgb,z)),this}clone(){return new N2(this.rgb)}alpha(l){return this._rgb.a=p1(l),this}clearer(l){const z=this._rgb;return z.a*=1-l,this}greyscale(){const l=this._rgb,z=nw(l.r*.3+l.g*.59+l.b*.11);return l.r=l.g=l.b=z,this}opaquer(l){const z=this._rgb;return z.a*=1+l,this}negate(){const l=this._rgb;return l.r=255-l.r,l.g=255-l.g,l.b=255-l.b,this}lighten(l){return C5(this._rgb,2,l),this}darken(l){return C5(this._rgb,2,-l),this}saturate(l){return C5(this._rgb,1,l),this}desaturate(l){return C5(this._rgb,1,-l),this}rotate(l){return xot(this._rgb,l),this}}/*! + * Chart.js v4.5.1 + * https://www.chartjs.org + * (c) 2025 Chart.js Contributors + * Released under the MIT License + */function $g(){}const Eot=(()=>{let d=0;return()=>d++})();function Rh(d){return d==null}function Xd(d){if(Array.isArray&&Array.isArray(d))return!0;const l=Object.prototype.toString.call(d);return l.slice(0,7)==="[object"&&l.slice(-6)==="Array]"}function Ec(d){return d!==null&&Object.prototype.toString.call(d)==="[object Object]"}function Qp(d){return(typeof d=="number"||d instanceof Number)&&isFinite(+d)}function eg(d,l){return Qp(d)?d:l}function cc(d,l){return typeof d>"u"?l:d}const Cot=(d,l)=>typeof d=="string"&&d.endsWith("%")?parseFloat(d)/100:+d/l,OO=(d,l)=>typeof d=="string"&&d.endsWith("%")?parseFloat(d)/100*l:+d;function Df(d,l,z){if(d&&typeof d.call=="function")return d.apply(z,l)}function Kh(d,l,z,j){let J,mt,kt;if(Xd(d))for(mt=d.length,J=0;Jd,x:d=>d.x,y:d=>d.y};function zot(d){const l=d.split("."),z=[];let j="";for(const J of l)j+=J,j.endsWith("\\")?j=j.slice(0,-1)+".":(z.push(j),j="");return z}function Iot(d){const l=zot(d);return z=>{for(const j of l){if(j==="")break;z=z&&z[j]}return z}}function My(d,l){return(qL[l]||(qL[l]=Iot(l)))(d)}function iM(d){return d.charAt(0).toUpperCase()+d.slice(1)}const U2=d=>typeof d<"u",v1=d=>typeof d=="function",ZL=(d,l)=>{if(d.size!==l.size)return!1;for(const z of d)if(!l.has(z))return!1;return!0};function Oot(d){return d.type==="mouseup"||d.type==="click"||d.type==="contextmenu"}const Jh=Math.PI,od=2*Jh,Dot=od+Jh,d4=Number.POSITIVE_INFINITY,Fot=Jh/180,ap=Jh/2,sy=Jh/4,$L=Jh*2/3,FO=Math.log10,cg=Math.sign;function A2(d,l,z){return Math.abs(d-l)J-mt).pop(),l}function Bot(d){return typeof d=="symbol"||typeof d=="object"&&d!==null&&!(Symbol.toPrimitive in d||"toString"in d||"valueOf"in d)}function V2(d){return!Bot(d)&&!isNaN(parseFloat(d))&&isFinite(d)}function Not(d,l){const z=Math.round(d);return z-l<=d&&z+l>=d}function jot(d,l,z){let j,J,mt;for(j=0,J=d.length;jGt&&re=Math.min(l,z)-j&&d<=Math.max(l,z)+j}function aM(d,l,z){z=z||(kt=>d[kt]1;)mt=J+j>>1,z(mt)?J=mt:j=mt;return{lo:J,hi:j}}const yy=(d,l,z,j)=>aM(d,z,j?J=>{const mt=d[J][l];return mtd[J][l]aM(d,z,j=>d[j][l]>=z);function qot(d,l,z){let j=0,J=d.length;for(;jj&&d[J-1]>z;)J--;return j>0||J{const j="_onData"+iM(z),J=d[z];Object.defineProperty(d,z,{configurable:!0,enumerable:!1,value(...mt){const kt=J.apply(this,mt);return d._chartjs.listeners.forEach(Dt=>{typeof Dt[j]=="function"&&Dt[j](...mt)}),kt}})})}function KL(d,l){const z=d._chartjs;if(!z)return;const j=z.listeners,J=j.indexOf(l);J!==-1&&j.splice(J,1),!(j.length>0)&&(BO.forEach(mt=>{delete d[mt]}),delete d._chartjs)}function NO(d){const l=new Set(d);return l.size===d.length?d:Array.from(l)}const jO=function(){return typeof window>"u"?function(d){return d()}:window.requestAnimationFrame}();function UO(d,l){let z=[],j=!1;return function(...J){z=J,j||(j=!0,jO.call(window,()=>{j=!1,d.apply(l,z)}))}}function $ot(d,l){let z;return function(...j){return l?(clearTimeout(z),z=setTimeout(d,l,j)):d.apply(this,j),l}}const oM=d=>d==="start"?"left":d==="end"?"right":"center",Wp=(d,l,z)=>d==="start"?l:d==="end"?z:(l+z)/2,Got=(d,l,z,j)=>d===(j?"left":"right")?z:d==="center"?(l+z)/2:l;function Yot(d,l,z){const j=l.length;let J=0,mt=j;if(d._sorted){const{iScale:kt,vScale:Dt,_parsed:Gt}=d,re=d.dataset&&d.dataset.options?d.dataset.options.spanGaps:null,pe=kt.axis,{min:Ne,max:or,minDefined:_r,maxDefined:Fr}=kt.getUserBounds();if(_r){if(J=Math.min(yy(Gt,pe,Ne).lo,z?j:yy(l,pe,kt.getPixelForValue(Ne)).lo),re){const zr=Gt.slice(0,J+1).reverse().findIndex(Wr=>!Rh(Wr[Dt.axis]));J-=Math.max(0,zr)}J=Xp(J,0,j-1)}if(Fr){let zr=Math.max(yy(Gt,kt.axis,or,!0).hi+1,z?0:yy(l,pe,kt.getPixelForValue(or),!0).hi+1);if(re){const Wr=Gt.slice(zr-1).findIndex(An=>!Rh(An[Dt.axis]));zr+=Math.max(0,Wr)}mt=Xp(zr,J,j)-J}else mt=j-J}return{start:J,count:mt}}function Kot(d){const{xScale:l,yScale:z,_scaleRanges:j}=d,J={xmin:l.min,xmax:l.max,ymin:z.min,ymax:z.max};if(!j)return d._scaleRanges=J,!0;const mt=j.xmin!==l.min||j.xmax!==l.max||j.ymin!==z.min||j.ymax!==z.max;return Object.assign(j,J),mt}const L5=d=>d===0||d===1,XL=(d,l,z)=>-(Math.pow(2,10*(d-=1))*Math.sin((d-l)*od/z)),JL=(d,l,z)=>Math.pow(2,-10*d)*Math.sin((d-l)*od/z)+1,M2={linear:d=>d,easeInQuad:d=>d*d,easeOutQuad:d=>-d*(d-2),easeInOutQuad:d=>(d/=.5)<1?.5*d*d:-.5*(--d*(d-2)-1),easeInCubic:d=>d*d*d,easeOutCubic:d=>(d-=1)*d*d+1,easeInOutCubic:d=>(d/=.5)<1?.5*d*d*d:.5*((d-=2)*d*d+2),easeInQuart:d=>d*d*d*d,easeOutQuart:d=>-((d-=1)*d*d*d-1),easeInOutQuart:d=>(d/=.5)<1?.5*d*d*d*d:-.5*((d-=2)*d*d*d-2),easeInQuint:d=>d*d*d*d*d,easeOutQuint:d=>(d-=1)*d*d*d*d+1,easeInOutQuint:d=>(d/=.5)<1?.5*d*d*d*d*d:.5*((d-=2)*d*d*d*d+2),easeInSine:d=>-Math.cos(d*ap)+1,easeOutSine:d=>Math.sin(d*ap),easeInOutSine:d=>-.5*(Math.cos(Jh*d)-1),easeInExpo:d=>d===0?0:Math.pow(2,10*(d-1)),easeOutExpo:d=>d===1?1:-Math.pow(2,-10*d)+1,easeInOutExpo:d=>L5(d)?d:d<.5?.5*Math.pow(2,10*(d*2-1)):.5*(-Math.pow(2,-10*(d*2-1))+2),easeInCirc:d=>d>=1?d:-(Math.sqrt(1-d*d)-1),easeOutCirc:d=>Math.sqrt(1-(d-=1)*d),easeInOutCirc:d=>(d/=.5)<1?-.5*(Math.sqrt(1-d*d)-1):.5*(Math.sqrt(1-(d-=2)*d)+1),easeInElastic:d=>L5(d)?d:XL(d,.075,.3),easeOutElastic:d=>L5(d)?d:JL(d,.075,.3),easeInOutElastic(d){return L5(d)?d:d<.5?.5*XL(d*2,.1125,.45):.5+.5*JL(d*2-1,.1125,.45)},easeInBack(d){return d*d*((1.70158+1)*d-1.70158)},easeOutBack(d){return(d-=1)*d*((1.70158+1)*d+1.70158)+1},easeInOutBack(d){let l=1.70158;return(d/=.5)<1?.5*(d*d*(((l*=1.525)+1)*d-l)):.5*((d-=2)*d*(((l*=1.525)+1)*d+l)+2)},easeInBounce:d=>1-M2.easeOutBounce(1-d),easeOutBounce(d){return d<1/2.75?7.5625*d*d:d<2/2.75?7.5625*(d-=1.5/2.75)*d+.75:d<2.5/2.75?7.5625*(d-=2.25/2.75)*d+.9375:7.5625*(d-=2.625/2.75)*d+.984375},easeInOutBounce:d=>d<.5?M2.easeInBounce(d*2)*.5:M2.easeOutBounce(d*2-1)*.5+.5};function sM(d){if(d&&typeof d=="object"){const l=d.toString();return l==="[object CanvasPattern]"||l==="[object CanvasGradient]"}return!1}function QL(d){return sM(d)?d:new N2(d)}function P8(d){return sM(d)?d:new N2(d).saturate(.5).darken(.1).hexString()}const Xot=["x","y","borderWidth","radius","tension"],Jot=["color","borderColor","backgroundColor"];function Qot(d){d.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),d.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:l=>l!=="onProgress"&&l!=="onComplete"&&l!=="fn"}),d.set("animations",{colors:{type:"color",properties:Jot},numbers:{type:"number",properties:Xot}}),d.describe("animations",{_fallback:"animation"}),d.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:l=>l|0}}}})}function tst(d){d.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const tP=new Map;function est(d,l){l=l||{};const z=d+JSON.stringify(l);let j=tP.get(z);return j||(j=new Intl.NumberFormat(d,l),tP.set(z,j)),j}function lM(d,l,z){return est(l,z).format(d)}const rst={values(d){return Xd(d)?d:""+d},numeric(d,l,z){if(d===0)return"0";const j=this.chart.options.locale;let J,mt=d;if(z.length>1){const re=Math.max(Math.abs(z[0].value),Math.abs(z[z.length-1].value));(re<1e-4||re>1e15)&&(J="scientific"),mt=nst(d,z)}const kt=FO(Math.abs(mt)),Dt=isNaN(kt)?1:Math.max(Math.min(-1*Math.floor(kt),20),0),Gt={notation:J,minimumFractionDigits:Dt,maximumFractionDigits:Dt};return Object.assign(Gt,this.options.ticks.format),lM(d,j,Gt)}};function nst(d,l){let z=l.length>3?l[2].value-l[1].value:l[1].value-l[0].value;return Math.abs(z)>=1&&d!==Math.floor(d)&&(z=d-Math.floor(d)),z}var VO={formatters:rst};function ist(d){d.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(l,z)=>z.lineWidth,tickColor:(l,z)=>z.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:VO.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),d.route("scale.ticks","color","","color"),d.route("scale.grid","color","","borderColor"),d.route("scale.border","color","","borderColor"),d.route("scale.title","color","","color"),d.describe("scale",{_fallback:!1,_scriptable:l=>!l.startsWith("before")&&!l.startsWith("after")&&l!=="callback"&&l!=="parser",_indexable:l=>l!=="borderDash"&&l!=="tickBorderDash"&&l!=="dash"}),d.describe("scales",{_fallback:"scale"}),d.describe("scale.ticks",{_scriptable:l=>l!=="backdropPadding"&&l!=="callback",_indexable:l=>l!=="backdropPadding"})}const Sy=Object.create(null),vA=Object.create(null);function S2(d,l){if(!l)return d;const z=l.split(".");for(let j=0,J=z.length;jj.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(j,J)=>P8(J.backgroundColor),this.hoverBorderColor=(j,J)=>P8(J.borderColor),this.hoverColor=(j,J)=>P8(J.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(l),this.apply(z)}set(l,z){return z8(this,l,z)}get(l){return S2(this,l)}describe(l,z){return z8(vA,l,z)}override(l,z){return z8(Sy,l,z)}route(l,z,j,J){const mt=S2(this,l),kt=S2(this,j),Dt="_"+z;Object.defineProperties(mt,{[Dt]:{value:mt[z],writable:!0},[z]:{enumerable:!0,get(){const Gt=this[Dt],re=kt[J];return Ec(Gt)?Object.assign({},re,Gt):cc(Gt,re)},set(Gt){this[Dt]=Gt}}})}apply(l){l.forEach(z=>z(this))}}var Bd=new ast({_scriptable:d=>!d.startsWith("on"),_indexable:d=>d!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Qot,tst,ist]);function ost(d){return!d||Rh(d.size)||Rh(d.family)?null:(d.style?d.style+" ":"")+(d.weight?d.weight+" ":"")+d.size+"px "+d.family}function eP(d,l,z,j,J){let mt=l[J];return mt||(mt=l[J]=d.measureText(J).width,z.push(J)),mt>j&&(j=mt),j}function ly(d,l,z){const j=d.currentDevicePixelRatio,J=z!==0?Math.max(z/2,.5):0;return Math.round((l-J)*j)/j+J}function rP(d,l){!l&&!d||(l=l||d.getContext("2d"),l.save(),l.resetTransform(),l.clearRect(0,0,d.width,d.height),l.restore())}function yA(d,l,z,j){HO(d,l,z,j,null)}function HO(d,l,z,j,J){let mt,kt,Dt,Gt,re,pe,Ne,or;const _r=l.pointStyle,Fr=l.rotation,zr=l.radius;let Wr=(Fr||0)*Fot;if(_r&&typeof _r=="object"&&(mt=_r.toString(),mt==="[object HTMLImageElement]"||mt==="[object HTMLCanvasElement]")){d.save(),d.translate(z,j),d.rotate(Wr),d.drawImage(_r,-_r.width/2,-_r.height/2,_r.width,_r.height),d.restore();return}if(!(isNaN(zr)||zr<=0)){switch(d.beginPath(),_r){default:J?d.ellipse(z,j,J/2,zr,0,0,od):d.arc(z,j,zr,0,od),d.closePath();break;case"triangle":pe=J?J/2:zr,d.moveTo(z+Math.sin(Wr)*pe,j-Math.cos(Wr)*zr),Wr+=$L,d.lineTo(z+Math.sin(Wr)*pe,j-Math.cos(Wr)*zr),Wr+=$L,d.lineTo(z+Math.sin(Wr)*pe,j-Math.cos(Wr)*zr),d.closePath();break;case"rectRounded":re=zr*.516,Gt=zr-re,kt=Math.cos(Wr+sy)*Gt,Ne=Math.cos(Wr+sy)*(J?J/2-re:Gt),Dt=Math.sin(Wr+sy)*Gt,or=Math.sin(Wr+sy)*(J?J/2-re:Gt),d.arc(z-Ne,j-Dt,re,Wr-Jh,Wr-ap),d.arc(z+or,j-kt,re,Wr-ap,Wr),d.arc(z+Ne,j+Dt,re,Wr,Wr+ap),d.arc(z-or,j+kt,re,Wr+ap,Wr+Jh),d.closePath();break;case"rect":if(!Fr){Gt=Math.SQRT1_2*zr,pe=J?J/2:Gt,d.rect(z-pe,j-Gt,2*pe,2*Gt);break}Wr+=sy;case"rectRot":Ne=Math.cos(Wr)*(J?J/2:zr),kt=Math.cos(Wr)*zr,Dt=Math.sin(Wr)*zr,or=Math.sin(Wr)*(J?J/2:zr),d.moveTo(z-Ne,j-Dt),d.lineTo(z+or,j-kt),d.lineTo(z+Ne,j+Dt),d.lineTo(z-or,j+kt),d.closePath();break;case"crossRot":Wr+=sy;case"cross":Ne=Math.cos(Wr)*(J?J/2:zr),kt=Math.cos(Wr)*zr,Dt=Math.sin(Wr)*zr,or=Math.sin(Wr)*(J?J/2:zr),d.moveTo(z-Ne,j-Dt),d.lineTo(z+Ne,j+Dt),d.moveTo(z+or,j-kt),d.lineTo(z-or,j+kt);break;case"star":Ne=Math.cos(Wr)*(J?J/2:zr),kt=Math.cos(Wr)*zr,Dt=Math.sin(Wr)*zr,or=Math.sin(Wr)*(J?J/2:zr),d.moveTo(z-Ne,j-Dt),d.lineTo(z+Ne,j+Dt),d.moveTo(z+or,j-kt),d.lineTo(z-or,j+kt),Wr+=sy,Ne=Math.cos(Wr)*(J?J/2:zr),kt=Math.cos(Wr)*zr,Dt=Math.sin(Wr)*zr,or=Math.sin(Wr)*(J?J/2:zr),d.moveTo(z-Ne,j-Dt),d.lineTo(z+Ne,j+Dt),d.moveTo(z+or,j-kt),d.lineTo(z-or,j+kt);break;case"line":kt=J?J/2:Math.cos(Wr)*zr,Dt=Math.sin(Wr)*zr,d.moveTo(z-kt,j-Dt),d.lineTo(z+kt,j+Dt);break;case"dash":d.moveTo(z,j),d.lineTo(z+Math.cos(Wr)*(J?J/2:zr),j+Math.sin(Wr)*zr);break;case!1:d.closePath();break}d.fill(),l.borderWidth>0&&d.stroke()}}function W2(d,l,z){return z=z||.5,!l||d&&d.x>l.left-z&&d.xl.top-z&&d.y0&&mt.strokeColor!=="";let Gt,re;for(d.save(),d.font=J.string,ust(d,mt),Gt=0;Gt+d||0;function uM(d,l){const z={},j=Ec(l),J=j?Object.keys(l):l,mt=Ec(d)?j?kt=>cc(d[kt],d[l[kt]]):kt=>d[kt]:()=>d;for(const kt of J)z[kt]=mst(mt(kt));return z}function WO(d){return uM(d,{top:"y",right:"x",bottom:"y",left:"x"})}function s_(d){return uM(d,["topLeft","topRight","bottomLeft","bottomRight"])}function fm(d){const l=WO(d);return l.width=l.left+l.right,l.height=l.top+l.bottom,l}function Jp(d,l){d=d||{},l=l||Bd.font;let z=cc(d.size,l.size);typeof z=="string"&&(z=parseInt(z,10));let j=cc(d.style,l.style);j&&!(""+j).match(dst)&&(console.warn('Invalid font style specified: "'+j+'"'),j=void 0);const J={family:cc(d.family,l.family),lineHeight:pst(cc(d.lineHeight,l.lineHeight),z),size:z,style:j,weight:cc(d.weight,l.weight),string:""};return J.string=ost(J),J}function P5(d,l,z,j){let J,mt,kt;for(J=0,mt=d.length;Jz&&Dt===0?0:Dt+Gt;return{min:kt(j,-Math.abs(mt)),max:kt(J,mt)}}function Cy(d,l){return Object.assign(Object.create(d),l)}function cM(d,l=[""],z,j,J=()=>d[0]){const mt=z||d;typeof j>"u"&&(j=GO("_fallback",d));const kt={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:d,_rootScopes:mt,_fallback:j,_getTarget:J,override:Dt=>cM([Dt,...d],l,mt,j)};return new Proxy(kt,{deleteProperty(Dt,Gt){return delete Dt[Gt],delete Dt._keys,delete d[0][Gt],!0},get(Dt,Gt){return ZO(Dt,Gt,()=>Tst(Gt,l,d,Dt))},getOwnPropertyDescriptor(Dt,Gt){return Reflect.getOwnPropertyDescriptor(Dt._scopes[0],Gt)},getPrototypeOf(){return Reflect.getPrototypeOf(d[0])},has(Dt,Gt){return iP(Dt).includes(Gt)},ownKeys(Dt){return iP(Dt)},set(Dt,Gt,re){const pe=Dt._storage||(Dt._storage=J());return Dt[Gt]=pe[Gt]=re,delete Dt._keys,!0}})}function m_(d,l,z,j){const J={_cacheable:!1,_proxy:d,_context:l,_subProxy:z,_stack:new Set,_descriptors:qO(d,j),setContext:mt=>m_(d,mt,z,j),override:mt=>m_(d.override(mt),l,z,j)};return new Proxy(J,{deleteProperty(mt,kt){return delete mt[kt],delete d[kt],!0},get(mt,kt,Dt){return ZO(mt,kt,()=>yst(mt,kt,Dt))},getOwnPropertyDescriptor(mt,kt){return mt._descriptors.allKeys?Reflect.has(d,kt)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(d,kt)},getPrototypeOf(){return Reflect.getPrototypeOf(d)},has(mt,kt){return Reflect.has(d,kt)},ownKeys(){return Reflect.ownKeys(d)},set(mt,kt,Dt){return d[kt]=Dt,delete mt[kt],!0}})}function qO(d,l={scriptable:!0,indexable:!0}){const{_scriptable:z=l.scriptable,_indexable:j=l.indexable,_allKeys:J=l.allKeys}=d;return{allKeys:J,scriptable:z,indexable:j,isScriptable:v1(z)?z:()=>z,isIndexable:v1(j)?j:()=>j}}const vst=(d,l)=>d?d+iM(l):l,hM=(d,l)=>Ec(l)&&d!=="adapters"&&(Object.getPrototypeOf(l)===null||l.constructor===Object);function ZO(d,l,z){if(Object.prototype.hasOwnProperty.call(d,l)||l==="constructor")return d[l];const j=z();return d[l]=j,j}function yst(d,l,z){const{_proxy:j,_context:J,_subProxy:mt,_descriptors:kt}=d;let Dt=j[l];return v1(Dt)&&kt.isScriptable(l)&&(Dt=xst(l,Dt,d,z)),Xd(Dt)&&Dt.length&&(Dt=_st(l,Dt,d,kt.isIndexable)),hM(l,Dt)&&(Dt=m_(Dt,J,mt&&mt[l],kt)),Dt}function xst(d,l,z,j){const{_proxy:J,_context:mt,_subProxy:kt,_stack:Dt}=z;if(Dt.has(d))throw new Error("Recursion detected: "+Array.from(Dt).join("->")+"->"+d);Dt.add(d);let Gt=l(mt,kt||j);return Dt.delete(d),hM(d,Gt)&&(Gt=fM(J._scopes,J,d,Gt)),Gt}function _st(d,l,z,j){const{_proxy:J,_context:mt,_subProxy:kt,_descriptors:Dt}=z;if(typeof mt.index<"u"&&j(d))return l[mt.index%l.length];if(Ec(l[0])){const Gt=l,re=J._scopes.filter(pe=>pe!==Gt);l=[];for(const pe of Gt){const Ne=fM(re,J,d,pe);l.push(m_(Ne,mt,kt&&kt[d],Dt))}}return l}function $O(d,l,z){return v1(d)?d(l,z):d}const bst=(d,l)=>d===!0?l:typeof d=="string"?My(l,d):void 0;function wst(d,l,z,j,J){for(const mt of l){const kt=bst(z,mt);if(kt){d.add(kt);const Dt=$O(kt._fallback,z,J);if(typeof Dt<"u"&&Dt!==z&&Dt!==j)return Dt}else if(kt===!1&&typeof j<"u"&&z!==j)return null}return!1}function fM(d,l,z,j){const J=l._rootScopes,mt=$O(l._fallback,z,j),kt=[...d,...J],Dt=new Set;Dt.add(j);let Gt=nP(Dt,kt,z,mt||z,j);return Gt===null||typeof mt<"u"&&mt!==z&&(Gt=nP(Dt,kt,mt,Gt,j),Gt===null)?!1:cM(Array.from(Dt),[""],J,mt,()=>kst(l,z,j))}function nP(d,l,z,j,J){for(;z;)z=wst(d,l,z,j,J);return z}function kst(d,l,z){const j=d._getTarget();l in j||(j[l]={});const J=j[l];return Xd(J)&&Ec(z)?z:J||{}}function Tst(d,l,z,j){let J;for(const mt of l)if(J=GO(vst(mt,d),z),typeof J<"u")return hM(d,J)?fM(z,j,d,J):J}function GO(d,l){for(const z of l){if(!z)continue;const j=z[d];if(typeof j<"u")return j}}function iP(d){let l=d._keys;return l||(l=d._keys=Ast(d._scopes)),l}function Ast(d){const l=new Set;for(const z of d)for(const j of Object.keys(z).filter(J=>!J.startsWith("_")))l.add(j);return Array.from(l)}const Mst=Number.EPSILON||1e-14,g_=(d,l)=>ld==="x"?"y":"x";function Sst(d,l,z,j){const J=d.skip?l:d,mt=l,kt=z.skip?l:z,Dt=gA(mt,J),Gt=gA(kt,mt);let re=Dt/(Dt+Gt),pe=Gt/(Dt+Gt);re=isNaN(re)?0:re,pe=isNaN(pe)?0:pe;const Ne=j*re,or=j*pe;return{previous:{x:mt.x-Ne*(kt.x-J.x),y:mt.y-Ne*(kt.y-J.y)},next:{x:mt.x+or*(kt.x-J.x),y:mt.y+or*(kt.y-J.y)}}}function Est(d,l,z){const j=d.length;let J,mt,kt,Dt,Gt,re=g_(d,0);for(let pe=0;pe!re.skip)),l.cubicInterpolationMode==="monotone")Lst(d,J);else{let re=j?d[d.length-1]:d[0];for(mt=0,kt=d.length;mtd.ownerDocument.defaultView.getComputedStyle(d,null);function Ist(d,l){return H4(d).getPropertyValue(l)}const Ost=["top","right","bottom","left"];function wy(d,l,z){const j={};z=z?"-"+z:"";for(let J=0;J<4;J++){const mt=Ost[J];j[mt]=parseFloat(d[l+"-"+mt+z])||0}return j.width=j.left+j.right,j.height=j.top+j.bottom,j}const Dst=(d,l,z)=>(d>0||l>0)&&(!z||!z.shadowRoot);function Fst(d,l){const z=d.touches,j=z&&z.length?z[0]:d,{offsetX:J,offsetY:mt}=j;let kt=!1,Dt,Gt;if(Dst(J,mt,d.target))Dt=J,Gt=mt;else{const re=l.getBoundingClientRect();Dt=j.clientX-re.left,Gt=j.clientY-re.top,kt=!0}return{x:Dt,y:Gt,box:kt}}function hy(d,l){if("native"in d)return d;const{canvas:z,currentDevicePixelRatio:j}=l,J=H4(z),mt=J.boxSizing==="border-box",kt=wy(J,"padding"),Dt=wy(J,"border","width"),{x:Gt,y:re,box:pe}=Fst(d,z),Ne=kt.left+(pe&&Dt.left),or=kt.top+(pe&&Dt.top);let{width:_r,height:Fr}=l;return mt&&(_r-=kt.width+Dt.width,Fr-=kt.height+Dt.height),{x:Math.round((Gt-Ne)/_r*z.width/j),y:Math.round((re-or)/Fr*z.height/j)}}function Rst(d,l,z){let j,J;if(l===void 0||z===void 0){const mt=d&&pM(d);if(!mt)l=d.clientWidth,z=d.clientHeight;else{const kt=mt.getBoundingClientRect(),Dt=H4(mt),Gt=wy(Dt,"border","width"),re=wy(Dt,"padding");l=kt.width-re.width-Gt.width,z=kt.height-re.height-Gt.height,j=m4(Dt.maxWidth,mt,"clientWidth"),J=m4(Dt.maxHeight,mt,"clientHeight")}}return{width:l,height:z,maxWidth:j||d4,maxHeight:J||d4}}const c1=d=>Math.round(d*10)/10;function Bst(d,l,z,j){const J=H4(d),mt=wy(J,"margin"),kt=m4(J.maxWidth,d,"clientWidth")||d4,Dt=m4(J.maxHeight,d,"clientHeight")||d4,Gt=Rst(d,l,z);let{width:re,height:pe}=Gt;if(J.boxSizing==="content-box"){const or=wy(J,"border","width"),_r=wy(J,"padding");re-=_r.width+or.width,pe-=_r.height+or.height}return re=Math.max(0,re-mt.width),pe=Math.max(0,j?re/j:pe-mt.height),re=c1(Math.min(re,kt,Gt.maxWidth)),pe=c1(Math.min(pe,Dt,Gt.maxHeight)),re&&!pe&&(pe=c1(re/2)),(l!==void 0||z!==void 0)&&j&&Gt.height&&pe>Gt.height&&(pe=Gt.height,re=c1(Math.floor(pe*j))),{width:re,height:pe}}function aP(d,l,z){const j=l||1,J=c1(d.height*j),mt=c1(d.width*j);d.height=c1(d.height),d.width=c1(d.width);const kt=d.canvas;return kt.style&&(z||!kt.style.height&&!kt.style.width)&&(kt.style.height=`${d.height}px`,kt.style.width=`${d.width}px`),d.currentDevicePixelRatio!==j||kt.height!==J||kt.width!==mt?(d.currentDevicePixelRatio=j,kt.height=J,kt.width=mt,d.ctx.setTransform(j,0,0,j,0,0),!0):!1}const Nst=function(){let d=!1;try{const l={get passive(){return d=!0,!1}};dM()&&(window.addEventListener("test",null,l),window.removeEventListener("test",null,l))}catch{}return d}();function oP(d,l){const z=Ist(d,l),j=z&&z.match(/^(\d+)(\.\d+)?px$/);return j?+j[1]:void 0}function fy(d,l,z,j){return{x:d.x+z*(l.x-d.x),y:d.y+z*(l.y-d.y)}}function jst(d,l,z,j){return{x:d.x+z*(l.x-d.x),y:j==="middle"?z<.5?d.y:l.y:j==="after"?z<1?d.y:l.y:z>0?l.y:d.y}}function Ust(d,l,z,j){const J={x:d.cp2x,y:d.cp2y},mt={x:l.cp1x,y:l.cp1y},kt=fy(d,J,z),Dt=fy(J,mt,z),Gt=fy(mt,l,z),re=fy(kt,Dt,z),pe=fy(Dt,Gt,z);return fy(re,pe,z)}const Vst=function(d,l){return{x(z){return d+d+l-z},setWidth(z){l=z},textAlign(z){return z==="center"?z:z==="right"?"left":"right"},xPlus(z,j){return z-j},leftForLtr(z,j){return z-j}}},Hst=function(){return{x(d){return d},setWidth(d){},textAlign(d){return d},xPlus(d,l){return d+l},leftForLtr(d,l){return d}}};function l_(d,l,z){return d?Vst(l,z):Hst()}function KO(d,l){let z,j;(l==="ltr"||l==="rtl")&&(z=d.canvas.style,j=[z.getPropertyValue("direction"),z.getPropertyPriority("direction")],z.setProperty("direction",l,"important"),d.prevTextDirection=j)}function XO(d,l){l!==void 0&&(delete d.prevTextDirection,d.canvas.style.setProperty("direction",l[0],l[1]))}function JO(d){return d==="angle"?{between:H2,compare:Vot,normalize:q0}:{between:ev,compare:(l,z)=>l-z,normalize:l=>l}}function sP({start:d,end:l,count:z,loop:j,style:J}){return{start:d%z,end:l%z,loop:j&&(l-d+1)%z===0,style:J}}function Wst(d,l,z){const{property:j,start:J,end:mt}=z,{between:kt,normalize:Dt}=JO(j),Gt=l.length;let{start:re,end:pe,loop:Ne}=d,or,_r;if(Ne){for(re+=Gt,pe+=Gt,or=0,_r=Gt;or<_r&&kt(Dt(l[re%Gt][j]),J,mt);++or)re--,pe--;re%=Gt,pe%=Gt}return peGt(J,kn,An)&&Dt(J,kn)!==0,jn=()=>Dt(mt,An)===0||Gt(mt,kn,An),ai=()=>zr||ei(),Qi=()=>!zr||jn();for(let Gi=pe,un=pe;Gi<=Ne;++Gi)Ft=l[Gi%kt],!Ft.skip&&(An=re(Ft[j]),An!==kn&&(zr=Gt(An,J,mt),Wr===null&&ai()&&(Wr=Dt(An,J)===0?Gi:un),Wr!==null&&Qi()&&(Fr.push(sP({start:Wr,end:Gi,loop:or,count:kt,style:_r})),Wr=null),un=Gi,kn=An));return Wr!==null&&Fr.push(sP({start:Wr,end:Ne,loop:or,count:kt,style:_r})),Fr}function tD(d,l){const z=[],j=d.segments;for(let J=0;JJ&&d[mt%l].skip;)mt--;return mt%=l,{start:J,end:mt}}function Zst(d,l,z,j){const J=d.length,mt=[];let kt=l,Dt=d[l],Gt;for(Gt=l+1;Gt<=z;++Gt){const re=d[Gt%J];re.skip||re.stop?Dt.skip||(j=!1,mt.push({start:l%J,end:(Gt-1)%J,loop:j}),l=kt=re.stop?Gt:null):(kt=Gt,Dt.skip&&(l=Gt)),Dt=re}return kt!==null&&mt.push({start:l%J,end:kt%J,loop:j}),mt}function $st(d,l){const z=d.points,j=d.options.spanGaps,J=z.length;if(!J)return[];const mt=!!d._loop,{start:kt,end:Dt}=qst(z,J,mt,j);if(j===!0)return lP(d,[{start:kt,end:Dt,loop:mt}],z,l);const Gt=DtDt({chart:l,initial:z.initial,numSteps:kt,currentStep:Math.min(j-z.start,kt)}))}_refresh(){this._request||(this._running=!0,this._request=jO.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(l=Date.now()){let z=0;this._charts.forEach((j,J)=>{if(!j.running||!j.items.length)return;const mt=j.items;let kt=mt.length-1,Dt=!1,Gt;for(;kt>=0;--kt)Gt=mt[kt],Gt._active?(Gt._total>j.duration&&(j.duration=Gt._total),Gt.tick(l),Dt=!0):(mt[kt]=mt[mt.length-1],mt.pop());Dt&&(J.draw(),this._notify(J,j,l,"progress")),mt.length||(j.running=!1,this._notify(J,j,l,"complete"),j.initial=!1),z+=mt.length}),this._lastDate=l,z===0&&(this._running=!1)}_getAnims(l){const z=this._charts;let j=z.get(l);return j||(j={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},z.set(l,j)),j}listen(l,z,j){this._getAnims(l).listeners[z].push(j)}add(l,z){!z||!z.length||this._getAnims(l).items.push(...z)}has(l){return this._getAnims(l).items.length>0}start(l){const z=this._charts.get(l);z&&(z.running=!0,z.start=Date.now(),z.duration=z.items.reduce((j,J)=>Math.max(j,J._duration),0),this._refresh())}running(l){if(!this._running)return!1;const z=this._charts.get(l);return!(!z||!z.running||!z.items.length)}stop(l){const z=this._charts.get(l);if(!z||!z.items.length)return;const j=z.items;let J=j.length-1;for(;J>=0;--J)j[J].cancel();z.items=[],this._notify(l,z,Date.now(),"complete")}remove(l){return this._charts.delete(l)}}var Gg=new Xst;const cP="transparent",Jst={boolean(d,l,z){return z>.5?l:d},color(d,l,z){const j=QL(d||cP),J=j.valid&&QL(l||cP);return J&&J.valid?J.mix(j,z).hexString():l},number(d,l,z){return d+(l-d)*z}};class Qst{constructor(l,z,j,J){const mt=z[j];J=P5([l.to,J,mt,l.from]);const kt=P5([l.from,mt,J]);this._active=!0,this._fn=l.fn||Jst[l.type||typeof kt],this._easing=M2[l.easing]||M2.linear,this._start=Math.floor(Date.now()+(l.delay||0)),this._duration=this._total=Math.floor(l.duration),this._loop=!!l.loop,this._target=z,this._prop=j,this._from=kt,this._to=J,this._promises=void 0}active(){return this._active}update(l,z,j){if(this._active){this._notify(!1);const J=this._target[this._prop],mt=j-this._start,kt=this._duration-mt;this._start=j,this._duration=Math.floor(Math.max(kt,l.duration)),this._total+=mt,this._loop=!!l.loop,this._to=P5([l.to,z,J,l.from]),this._from=P5([l.from,J,z])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(l){const z=l-this._start,j=this._duration,J=this._prop,mt=this._from,kt=this._loop,Dt=this._to;let Gt;if(this._active=mt!==Dt&&(kt||z1?2-Gt:Gt,Gt=this._easing(Math.min(1,Math.max(0,Gt))),this._target[J]=this._fn(mt,Dt,Gt)}wait(){const l=this._promises||(this._promises=[]);return new Promise((z,j)=>{l.push({res:z,rej:j})})}_notify(l){const z=l?"res":"rej",j=this._promises||[];for(let J=0;J{const mt=l[J];if(!Ec(mt))return;const kt={};for(const Dt of z)kt[Dt]=mt[Dt];(Xd(mt.properties)&&mt.properties||[J]).forEach(Dt=>{(Dt===J||!j.has(Dt))&&j.set(Dt,kt)})})}_animateOptions(l,z){const j=z.options,J=elt(l,j);if(!J)return[];const mt=this._createAnimations(J,j);return j.$shared&&tlt(l.options.$animations,j).then(()=>{l.options=j},()=>{}),mt}_createAnimations(l,z){const j=this._properties,J=[],mt=l.$animations||(l.$animations={}),kt=Object.keys(z),Dt=Date.now();let Gt;for(Gt=kt.length-1;Gt>=0;--Gt){const re=kt[Gt];if(re.charAt(0)==="$")continue;if(re==="options"){J.push(...this._animateOptions(l,z));continue}const pe=z[re];let Ne=mt[re];const or=j.get(re);if(Ne)if(or&&Ne.active()){Ne.update(or,pe,Dt);continue}else Ne.cancel();if(!or||!or.duration){l[re]=pe;continue}mt[re]=Ne=new Qst(or,l,re,pe),J.push(Ne)}return J}update(l,z){if(this._properties.size===0){Object.assign(l,z);return}const j=this._createAnimations(l,z);if(j.length)return Gg.add(this._chart,j),!0}}function tlt(d,l){const z=[],j=Object.keys(l);for(let J=0;J0||!z&&mt<0)return J.index}return null}function pP(d,l){const{chart:z,_cachedMeta:j}=d,J=z._stacks||(z._stacks={}),{iScale:mt,vScale:kt,index:Dt}=j,Gt=mt.axis,re=kt.axis,pe=alt(mt,kt,j),Ne=l.length;let or;for(let _r=0;_rz[j].axis===l).shift()}function llt(d,l){return Cy(d,{active:!1,dataset:void 0,datasetIndex:l,index:l,mode:"default",type:"dataset"})}function ult(d,l,z){return Cy(d,{active:!1,dataIndex:l,parsed:void 0,raw:void 0,element:z,index:l,mode:"default",type:"data"})}function e2(d,l){const z=d.controller.index,j=d.vScale&&d.vScale.axis;if(j){l=l||d._parsed;for(const J of l){const mt=J._stacks;if(!mt||mt[j]===void 0||mt[j][z]===void 0)return;delete mt[j][z],mt[j]._visualValues!==void 0&&mt[j]._visualValues[z]!==void 0&&delete mt[j]._visualValues[z]}}}const D8=d=>d==="reset"||d==="none",mP=(d,l)=>l?d:Object.assign({},d),clt=(d,l,z)=>d&&!l.hidden&&l._stacked&&{keys:nD(z,!0),values:null};class W4{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(l,z){this.chart=l,this._ctx=l.ctx,this.index=z,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const l=this._cachedMeta;this.configure(),this.linkScales(),l._stacked=I8(l.vScale,l),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(l){this.index!==l&&e2(this._cachedMeta),this.index=l}linkScales(){const l=this.chart,z=this._cachedMeta,j=this.getDataset(),J=(Ne,or,_r,Fr)=>Ne==="x"?or:Ne==="r"?Fr:_r,mt=z.xAxisID=cc(j.xAxisID,O8(l,"x")),kt=z.yAxisID=cc(j.yAxisID,O8(l,"y")),Dt=z.rAxisID=cc(j.rAxisID,O8(l,"r")),Gt=z.indexAxis,re=z.iAxisID=J(Gt,mt,kt,Dt),pe=z.vAxisID=J(Gt,kt,mt,Dt);z.xScale=this.getScaleForId(mt),z.yScale=this.getScaleForId(kt),z.rScale=this.getScaleForId(Dt),z.iScale=this.getScaleForId(re),z.vScale=this.getScaleForId(pe)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(l){return this.chart.scales[l]}_getOtherScale(l){const z=this._cachedMeta;return l===z.iScale?z.vScale:z.iScale}reset(){this._update("reset")}_destroy(){const l=this._cachedMeta;this._data&&KL(this._data,this),l._stacked&&e2(l)}_dataCheck(){const l=this.getDataset(),z=l.data||(l.data=[]),j=this._data;if(Ec(z)){const J=this._cachedMeta;this._data=ilt(z,J)}else if(j!==z){if(j){KL(j,this);const J=this._cachedMeta;e2(J),J._parsed=[]}z&&Object.isExtensible(z)&&Zot(z,this),this._syncList=[],this._data=z}}addElements(){const l=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(l.dataset=new this.datasetElementType)}buildOrUpdateElements(l){const z=this._cachedMeta,j=this.getDataset();let J=!1;this._dataCheck();const mt=z._stacked;z._stacked=I8(z.vScale,z),z.stack!==j.stack&&(J=!0,e2(z),z.stack=j.stack),this._resyncElements(l),(J||mt!==z._stacked)&&(pP(this,z._parsed),z._stacked=I8(z.vScale,z))}configure(){const l=this.chart.config,z=l.datasetScopeKeys(this._type),j=l.getOptionScopes(this.getDataset(),z,!0);this.options=l.createResolver(j,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(l,z){const{_cachedMeta:j,_data:J}=this,{iScale:mt,_stacked:kt}=j,Dt=mt.axis;let Gt=l===0&&z===J.length?!0:j._sorted,re=l>0&&j._parsed[l-1],pe,Ne,or;if(this._parsing===!1)j._parsed=J,j._sorted=!0,or=J;else{Xd(J[l])?or=this.parseArrayData(j,J,l,z):Ec(J[l])?or=this.parseObjectData(j,J,l,z):or=this.parsePrimitiveData(j,J,l,z);const _r=()=>Ne[Dt]===null||re&&Ne[Dt]zr||Ne=0;--or)if(!Fr()){this.updateRangeFromParsed(re,l,_r,Gt);break}}return re}getAllParsedValues(l){const z=this._cachedMeta._parsed,j=[];let J,mt,kt;for(J=0,mt=z.length;J=0&&lthis.getContext(j,J,z),zr=re.resolveNamedOptions(or,_r,Fr,Ne);return zr.$shared&&(zr.$shared=Gt,mt[kt]=Object.freeze(mP(zr,Gt))),zr}_resolveAnimations(l,z,j){const J=this.chart,mt=this._cachedDataOpts,kt=`animation-${z}`,Dt=mt[kt];if(Dt)return Dt;let Gt;if(J.options.animation!==!1){const pe=this.chart.config,Ne=pe.datasetAnimationScopeKeys(this._type,z),or=pe.getOptionScopes(this.getDataset(),Ne);Gt=pe.createResolver(or,this.getContext(l,j,z))}const re=new rD(J,Gt&&Gt.animations);return Gt&&Gt._cacheable&&(mt[kt]=Object.freeze(re)),re}getSharedOptions(l){if(l.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},l))}includeOptions(l,z){return!z||D8(l)||this.chart._animationsDisabled}_getSharedOptions(l,z){const j=this.resolveDataElementOptions(l,z),J=this._sharedOptions,mt=this.getSharedOptions(j),kt=this.includeOptions(z,mt)||mt!==J;return this.updateSharedOptions(mt,z,j),{sharedOptions:mt,includeOptions:kt}}updateElement(l,z,j,J){D8(J)?Object.assign(l,j):this._resolveAnimations(z,J).update(l,j)}updateSharedOptions(l,z,j){l&&!D8(z)&&this._resolveAnimations(void 0,z).update(l,j)}_setStyle(l,z,j,J){l.active=J;const mt=this.getStyle(z,J);this._resolveAnimations(z,j,J).update(l,{options:!J&&this.getSharedOptions(mt)||mt})}removeHoverStyle(l,z,j){this._setStyle(l,j,"active",!1)}setHoverStyle(l,z,j){this._setStyle(l,j,"active",!0)}_removeDatasetHoverStyle(){const l=this._cachedMeta.dataset;l&&this._setStyle(l,void 0,"active",!1)}_setDatasetHoverStyle(){const l=this._cachedMeta.dataset;l&&this._setStyle(l,void 0,"active",!0)}_resyncElements(l){const z=this._data,j=this._cachedMeta.data;for(const[Dt,Gt,re]of this._syncList)this[Dt](Gt,re);this._syncList=[];const J=j.length,mt=z.length,kt=Math.min(mt,J);kt&&this.parse(0,kt),mt>J?this._insertElements(J,mt-J,l):mt{for(re.length+=z,Dt=re.length-1;Dt>=kt;Dt--)re[Dt]=re[Dt-z]};for(Gt(mt),Dt=l;DtJ-mt))}return d._cache.$bar}function flt(d){const l=d.iScale,z=hlt(l,d.type);let j=l._length,J,mt,kt,Dt;const Gt=()=>{kt===32767||kt===-32768||(U2(Dt)&&(j=Math.min(j,Math.abs(kt-Dt)||j)),Dt=kt)};for(J=0,mt=z.length;J0?J[d-1]:null,Dt=dMath.abs(Dt)&&(Gt=Dt,re=kt),l[z.axis]=re,l._custom={barStart:Gt,barEnd:re,start:J,end:mt,min:kt,max:Dt}}function iD(d,l,z,j){return Xd(d)?mlt(d,l,z,j):l[z.axis]=z.parse(d,j),l}function gP(d,l,z,j){const J=d.iScale,mt=d.vScale,kt=J.getLabels(),Dt=J===mt,Gt=[];let re,pe,Ne,or;for(re=z,pe=z+j;re=z?1:-1)}function vlt(d){let l,z,j,J,mt;return d.horizontal?(l=d.base>d.x,z="left",j="right"):(l=d.basepe.controller.options.grouped),mt=j.options.stacked,kt=[],Dt=this._cachedMeta.controller.getParsed(z),Gt=Dt&&Dt[j.axis],re=pe=>{const Ne=pe._parsed.find(_r=>_r[j.axis]===Gt),or=Ne&&Ne[pe.vScale.axis];if(Rh(or)||isNaN(or))return!0};for(const pe of J)if(!(z!==void 0&&re(pe))&&((mt===!1||kt.indexOf(pe.stack)===-1||mt===void 0&&pe.stack===void 0)&&kt.push(pe.stack),pe.index===l))break;return kt.length||kt.push(void 0),kt}_getStackCount(l){return this._getStacks(void 0,l).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const l=this.chart.scales,z=this.chart.options.indexAxis;return Object.keys(l).filter(j=>l[j].axis===z).shift()}_getAxis(){const l={},z=this.getFirstScaleIdForIndexAxis();for(const j of this.chart.data.datasets)l[cc(this.chart.options.indexAxis==="x"?j.xAxisID:j.yAxisID,z)]=!0;return Object.keys(l)}_getStackIndex(l,z,j){const J=this._getStacks(l,j),mt=z!==void 0?J.indexOf(z):-1;return mt===-1?J.length-1:mt}_getRuler(){const l=this.options,z=this._cachedMeta,j=z.iScale,J=[];let mt,kt;for(mt=0,kt=z.data.length;mtH2(kn,Dt,Gt,!0)?1:Math.max(ei,ei*z,jn,jn*z),Fr=(kn,ei,jn)=>H2(kn,Dt,Gt,!0)?-1:Math.min(ei,ei*z,jn,jn*z),zr=_r(0,re,Ne),Wr=_r(ap,pe,or),An=Fr(Jh,re,Ne),Ft=Fr(Jh+ap,pe,or);j=(zr-An)/2,J=(Wr-Ft)/2,mt=-(zr+An)/2,kt=-(Wr+Ft)/2}return{ratioX:j,ratioY:J,offsetX:mt,offsetY:kt}}class klt extends W4{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:l=>l!=="spacing",_indexable:l=>l!=="spacing"&&!l.startsWith("borderDash")&&!l.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(l){const z=l.data,{labels:{pointStyle:j,textAlign:J,color:mt,useBorderRadius:kt,borderRadius:Dt}}=l.legend.options;return z.labels.length&&z.datasets.length?z.labels.map((Gt,re)=>{const Ne=l.getDatasetMeta(0).controller.getStyle(re);return{text:Gt,fillStyle:Ne.backgroundColor,fontColor:mt,hidden:!l.getDataVisibility(re),lineDash:Ne.borderDash,lineDashOffset:Ne.borderDashOffset,lineJoin:Ne.borderJoinStyle,lineWidth:Ne.borderWidth,strokeStyle:Ne.borderColor,textAlign:J,pointStyle:j,borderRadius:kt&&(Dt||Ne.borderRadius),index:re}}):[]}},onClick(l,z,j){j.chart.toggleDataVisibility(z.index),j.chart.update()}}}};constructor(l,z){super(l,z),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(l,z){const j=this.getDataset().data,J=this._cachedMeta;if(this._parsing===!1)J._parsed=j;else{let mt=Gt=>+j[Gt];if(Ec(j[l])){const{key:Gt="value"}=this._parsing;mt=re=>+My(j[re],Gt)}let kt,Dt;for(kt=l,Dt=l+z;kt0&&!isNaN(l)?od*(Math.abs(l)/z):0}getLabelAndValue(l){const z=this._cachedMeta,j=this.chart,J=j.data.labels||[],mt=lM(z._parsed[l],j.options.locale);return{label:J[l]||"",value:mt}}getMaxBorderWidth(l){let z=0;const j=this.chart;let J,mt,kt,Dt,Gt;if(!l){for(J=0,mt=j.data.datasets.length;J0&&this.getParsed(z-1);for(let jn=0;jn=Ft){Qi.skip=!0;continue}const Gi=this.getParsed(jn),un=Rh(Gi[_r]),ia=Qi[or]=kt.getPixelForValue(Gi[or],jn),fa=Qi[_r]=mt||un?Dt.getBasePixel():Dt.getPixelForValue(Gt?this.applyStack(Dt,Gi,Gt):Gi[_r],jn);Qi.skip=isNaN(ia)||isNaN(fa)||un,Qi.stop=jn>0&&Math.abs(Gi[or]-ei[or])>Wr,zr&&(Qi.parsed=Gi,Qi.raw=re.data[jn]),Ne&&(Qi.options=pe||this.resolveDataElementOptions(jn,ai.active?"active":J)),An||this.updateElement(ai,jn,Qi,J),ei=Gi}}getMaxOverflow(){const l=this._cachedMeta,z=l.dataset,j=z.options&&z.options.borderWidth||0,J=l.data||[];if(!J.length)return j;const mt=J[0].size(this.resolveDataElementOptions(0)),kt=J[J.length-1].size(this.resolveDataElementOptions(J.length-1));return Math.max(j,mt,kt)/2}draw(){const l=this._cachedMeta;l.dataset.updateControlPoints(this.chart.chartArea,l.iScale.axis),super.draw()}}function uy(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class mM{static override(l){Object.assign(mM.prototype,l)}options;constructor(l){this.options=l||{}}init(){}formats(){return uy()}parse(){return uy()}format(){return uy()}add(){return uy()}diff(){return uy()}startOf(){return uy()}endOf(){return uy()}}var aD={_date:mM};function Alt(d,l,z,j){const{controller:J,data:mt,_sorted:kt}=d,Dt=J._cachedMeta.iScale,Gt=d.dataset&&d.dataset.options?d.dataset.options.spanGaps:null;if(Dt&&l===Dt.axis&&l!=="r"&&kt&&mt.length){const re=Dt._reversePixels?Wot:yy;if(j){if(J._sharedOptions){const pe=mt[0],Ne=typeof pe.getRange=="function"&&pe.getRange(l);if(Ne){const or=re(mt,l,z-Ne),_r=re(mt,l,z+Ne);return{lo:or.lo,hi:_r.hi}}}}else{const pe=re(mt,l,z);if(Gt){const{vScale:Ne}=J._cachedMeta,{_parsed:or}=d,_r=or.slice(0,pe.lo+1).reverse().findIndex(zr=>!Rh(zr[Ne.axis]));pe.lo-=Math.max(0,_r);const Fr=or.slice(pe.hi).findIndex(zr=>!Rh(zr[Ne.axis]));pe.hi+=Math.max(0,Fr)}return pe}}return{lo:0,hi:mt.length-1}}function q4(d,l,z,j,J){const mt=d.getSortedVisibleDatasetMetas(),kt=z[l];for(let Dt=0,Gt=mt.length;Dt{Gt[kt]&&Gt[kt](l[z],J)&&(mt.push({element:Gt,datasetIndex:re,index:pe}),Dt=Dt||Gt.inRange(l.x,l.y,J))}),j&&!Dt?[]:mt}var Clt={modes:{index(d,l,z,j){const J=hy(l,d),mt=z.axis||"x",kt=z.includeInvisible||!1,Dt=z.intersect?R8(d,J,mt,j,kt):B8(d,J,mt,!1,j,kt),Gt=[];return Dt.length?(d.getSortedVisibleDatasetMetas().forEach(re=>{const pe=Dt[0].index,Ne=re.data[pe];Ne&&!Ne.skip&&Gt.push({element:Ne,datasetIndex:re.index,index:pe})}),Gt):[]},dataset(d,l,z,j){const J=hy(l,d),mt=z.axis||"xy",kt=z.includeInvisible||!1;let Dt=z.intersect?R8(d,J,mt,j,kt):B8(d,J,mt,!1,j,kt);if(Dt.length>0){const Gt=Dt[0].datasetIndex,re=d.getDatasetMeta(Gt).data;Dt=[];for(let pe=0;pez.pos===l)}function _P(d,l){return d.filter(z=>oD.indexOf(z.pos)===-1&&z.box.axis===l)}function n2(d,l){return d.sort((z,j)=>{const J=l?j:z,mt=l?z:j;return J.weight===mt.weight?J.index-mt.index:J.weight-mt.weight})}function Llt(d){const l=[];let z,j,J,mt,kt,Dt;for(z=0,j=(d||[]).length;zre.box.fullSize),!0),j=n2(r2(l,"left"),!0),J=n2(r2(l,"right")),mt=n2(r2(l,"top"),!0),kt=n2(r2(l,"bottom")),Dt=_P(l,"x"),Gt=_P(l,"y");return{fullSize:z,leftAndTop:j.concat(mt),rightAndBottom:J.concat(Gt).concat(kt).concat(Dt),chartArea:r2(l,"chartArea"),vertical:j.concat(J).concat(Gt),horizontal:mt.concat(kt).concat(Dt)}}function bP(d,l,z,j){return Math.max(d[z],l[z])+Math.max(d[j],l[j])}function sD(d,l){d.top=Math.max(d.top,l.top),d.left=Math.max(d.left,l.left),d.bottom=Math.max(d.bottom,l.bottom),d.right=Math.max(d.right,l.right)}function Olt(d,l,z,j){const{pos:J,box:mt}=z,kt=d.maxPadding;if(!Ec(J)){z.size&&(d[J]-=z.size);const Ne=j[z.stack]||{size:0,count:1};Ne.size=Math.max(Ne.size,z.horizontal?mt.height:mt.width),z.size=Ne.size/Ne.count,d[J]+=z.size}mt.getPadding&&sD(kt,mt.getPadding());const Dt=Math.max(0,l.outerWidth-bP(kt,d,"left","right")),Gt=Math.max(0,l.outerHeight-bP(kt,d,"top","bottom")),re=Dt!==d.w,pe=Gt!==d.h;return d.w=Dt,d.h=Gt,z.horizontal?{same:re,other:pe}:{same:pe,other:re}}function Dlt(d){const l=d.maxPadding;function z(j){const J=Math.max(l[j]-d[j],0);return d[j]+=J,J}d.y+=z("top"),d.x+=z("left"),z("right"),z("bottom")}function Flt(d,l){const z=l.maxPadding;function j(J){const mt={left:0,top:0,right:0,bottom:0};return J.forEach(kt=>{mt[kt]=Math.max(l[kt],z[kt])}),mt}return j(d?["left","right"]:["top","bottom"])}function f2(d,l,z,j){const J=[];let mt,kt,Dt,Gt,re,pe;for(mt=0,kt=d.length,re=0;mt{typeof zr.beforeLayout=="function"&&zr.beforeLayout()});const pe=Gt.reduce((zr,Wr)=>Wr.box.options&&Wr.box.options.display===!1?zr:zr+1,0)||1,Ne=Object.freeze({outerWidth:l,outerHeight:z,padding:J,availableWidth:mt,availableHeight:kt,vBoxMaxWidth:mt/2/pe,hBoxMaxHeight:kt/2}),or=Object.assign({},J);sD(or,fm(j));const _r=Object.assign({maxPadding:or,w:mt,h:kt,x:J.left,y:J.top},J),Fr=zlt(Gt.concat(re),Ne);f2(Dt.fullSize,_r,Ne,Fr),f2(Gt,_r,Ne,Fr),f2(re,_r,Ne,Fr)&&f2(Gt,_r,Ne,Fr),Dlt(_r),wP(Dt.leftAndTop,_r,Ne,Fr),_r.x+=_r.w,_r.y+=_r.h,wP(Dt.rightAndBottom,_r,Ne,Fr),d.chartArea={left:_r.left,top:_r.top,right:_r.left+_r.w,bottom:_r.top+_r.h,height:_r.h,width:_r.w},Kh(Dt.chartArea,zr=>{const Wr=zr.box;Object.assign(Wr,d.chartArea),Wr.update(_r.w,_r.h,{left:0,top:0,right:0,bottom:0})})}};class lD{acquireContext(l,z){}releaseContext(l){return!1}addEventListener(l,z,j){}removeEventListener(l,z,j){}getDevicePixelRatio(){return 1}getMaximumSize(l,z,j,J){return z=Math.max(0,z||l.width),j=j||l.height,{width:z,height:Math.max(0,J?Math.floor(z/J):j)}}isAttached(l){return!0}updateConfig(l){}}class Rlt extends lD{acquireContext(l){return l&&l.getContext&&l.getContext("2d")||null}updateConfig(l){l.options.animation=!1}}const K5="$chartjs",Blt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},kP=d=>d===null||d==="";function Nlt(d,l){const z=d.style,j=d.getAttribute("height"),J=d.getAttribute("width");if(d[K5]={initial:{height:j,width:J,style:{display:z.display,height:z.height,width:z.width}}},z.display=z.display||"block",z.boxSizing=z.boxSizing||"border-box",kP(J)){const mt=oP(d,"width");mt!==void 0&&(d.width=mt)}if(kP(j))if(d.style.height==="")d.height=d.width/(l||2);else{const mt=oP(d,"height");mt!==void 0&&(d.height=mt)}return d}const uD=Nst?{passive:!0}:!1;function jlt(d,l,z){d&&d.addEventListener(l,z,uD)}function Ult(d,l,z){d&&d.canvas&&d.canvas.removeEventListener(l,z,uD)}function Vlt(d,l){const z=Blt[d.type]||d.type,{x:j,y:J}=hy(d,l);return{type:z,chart:l,native:d,x:j!==void 0?j:null,y:J!==void 0?J:null}}function g4(d,l){for(const z of d)if(z===l||z.contains(l))return!0}function Hlt(d,l,z){const j=d.canvas,J=new MutationObserver(mt=>{let kt=!1;for(const Dt of mt)kt=kt||g4(Dt.addedNodes,j),kt=kt&&!g4(Dt.removedNodes,j);kt&&z()});return J.observe(document,{childList:!0,subtree:!0}),J}function Wlt(d,l,z){const j=d.canvas,J=new MutationObserver(mt=>{let kt=!1;for(const Dt of mt)kt=kt||g4(Dt.removedNodes,j),kt=kt&&!g4(Dt.addedNodes,j);kt&&z()});return J.observe(document,{childList:!0,subtree:!0}),J}const Z2=new Map;let TP=0;function cD(){const d=window.devicePixelRatio;d!==TP&&(TP=d,Z2.forEach((l,z)=>{z.currentDevicePixelRatio!==d&&l()}))}function qlt(d,l){Z2.size||window.addEventListener("resize",cD),Z2.set(d,l)}function Zlt(d){Z2.delete(d),Z2.size||window.removeEventListener("resize",cD)}function $lt(d,l,z){const j=d.canvas,J=j&&pM(j);if(!J)return;const mt=UO((Dt,Gt)=>{const re=J.clientWidth;z(Dt,Gt),re{const Gt=Dt[0],re=Gt.contentRect.width,pe=Gt.contentRect.height;re===0&&pe===0||mt(re,pe)});return kt.observe(J),qlt(d,mt),kt}function N8(d,l,z){z&&z.disconnect(),l==="resize"&&Zlt(d)}function Glt(d,l,z){const j=d.canvas,J=UO(mt=>{d.ctx!==null&&z(Vlt(mt,d))},d);return jlt(j,l,J),J}class Ylt extends lD{acquireContext(l,z){const j=l&&l.getContext&&l.getContext("2d");return j&&j.canvas===l?(Nlt(l,z),j):null}releaseContext(l){const z=l.canvas;if(!z[K5])return!1;const j=z[K5].initial;["height","width"].forEach(mt=>{const kt=j[mt];Rh(kt)?z.removeAttribute(mt):z.setAttribute(mt,kt)});const J=j.style||{};return Object.keys(J).forEach(mt=>{z.style[mt]=J[mt]}),z.width=z.width,delete z[K5],!0}addEventListener(l,z,j){this.removeEventListener(l,z);const J=l.$proxies||(l.$proxies={}),kt={attach:Hlt,detach:Wlt,resize:$lt}[z]||Glt;J[z]=kt(l,z,j)}removeEventListener(l,z){const j=l.$proxies||(l.$proxies={}),J=j[z];if(!J)return;({attach:N8,detach:N8,resize:N8}[z]||Ult)(l,z,J),j[z]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(l,z,j,J){return Bst(l,z,j,J)}isAttached(l){const z=l&&pM(l);return!!(z&&z.isConnected)}}function Klt(d){return!dM()||typeof OffscreenCanvas<"u"&&d instanceof OffscreenCanvas?Rlt:Ylt}let lv=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(l){const{x:z,y:j}=this.getProps(["x","y"],l);return{x:z,y:j}}hasValue(){return V2(this.x)&&V2(this.y)}getProps(l,z){const j=this.$animations;if(!z||!j)return this;const J={};return l.forEach(mt=>{J[mt]=j[mt]&&j[mt].active()?j[mt]._to:this[mt]}),J}};function Xlt(d,l){const z=d.options.ticks,j=Jlt(d),J=Math.min(z.maxTicksLimit||j,j),mt=z.major.enabled?tut(l):[],kt=mt.length,Dt=mt[0],Gt=mt[kt-1],re=[];if(kt>J)return eut(l,re,mt,kt/J),re;const pe=Qlt(mt,l,J);if(kt>0){let Ne,or;const _r=kt>1?Math.round((Gt-Dt)/(kt-1)):null;for(D5(l,re,pe,Rh(_r)?0:Dt-_r,Dt),Ne=0,or=kt-1;NeJ)return Gt}return Math.max(J,1)}function tut(d){const l=[];let z,j;for(z=0,j=d.length;zd==="left"?"right":d==="right"?"left":d,AP=(d,l,z)=>l==="top"||l==="left"?d[l]+z:d[l]-z,MP=(d,l)=>Math.min(l||d,d);function SP(d,l){const z=[],j=d.length/l,J=d.length;let mt=0;for(;mtkt+Dt)))return Gt}function aut(d,l){Kh(d,z=>{const j=z.gc,J=j.length/2;let mt;if(J>l){for(mt=0;mtj?j:z,j=J&&z>j?z:j,{min:eg(z,eg(j,z)),max:eg(j,eg(z,j))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const l=this.chart.data;return this.options.labels||(this.isHorizontal()?l.xLabels:l.yLabels)||l.labels||[]}getLabelItems(l=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(l))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Df(this.options.beforeUpdate,[this])}update(l,z,j){const{beginAtZero:J,grace:mt,ticks:kt}=this.options,Dt=kt.sampleSize;this.beforeUpdate(),this.maxWidth=l,this.maxHeight=z,this._margins=j=Object.assign({left:0,right:0,top:0,bottom:0},j),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+j.left+j.right:this.height+j.top+j.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=gst(this,mt,J),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const Gt=Dt=mt||j<=1||!this.isHorizontal()){this.labelRotation=J;return}const pe=this._getLabelSizes(),Ne=pe.widest.width,or=pe.highest.height,_r=Xp(this.chart.width-Ne,0,this.maxWidth);Dt=l.offset?this.maxWidth/j:_r/(j-1),Ne+6>Dt&&(Dt=_r/(j-(l.offset?.5:1)),Gt=this.maxHeight-i2(l.grid)-z.padding-EP(l.title,this.chart.options.font),re=Math.sqrt(Ne*Ne+or*or),kt=Uot(Math.min(Math.asin(Xp((pe.highest.height+6)/Dt,-1,1)),Math.asin(Xp(Gt/re,-1,1))-Math.asin(Xp(or/re,-1,1)))),kt=Math.max(J,Math.min(mt,kt))),this.labelRotation=kt}afterCalculateLabelRotation(){Df(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Df(this.options.beforeFit,[this])}fit(){const l={width:0,height:0},{chart:z,options:{ticks:j,title:J,grid:mt}}=this,kt=this._isVisible(),Dt=this.isHorizontal();if(kt){const Gt=EP(J,z.options.font);if(Dt?(l.width=this.maxWidth,l.height=i2(mt)+Gt):(l.height=this.maxHeight,l.width=i2(mt)+Gt),j.display&&this.ticks.length){const{first:re,last:pe,widest:Ne,highest:or}=this._getLabelSizes(),_r=j.padding*2,Fr=tv(this.labelRotation),zr=Math.cos(Fr),Wr=Math.sin(Fr);if(Dt){const An=j.mirror?0:Wr*Ne.width+zr*or.height;l.height=Math.min(this.maxHeight,l.height+An+_r)}else{const An=j.mirror?0:zr*Ne.width+Wr*or.height;l.width=Math.min(this.maxWidth,l.width+An+_r)}this._calculatePadding(re,pe,Wr,zr)}}this._handleMargins(),Dt?(this.width=this._length=z.width-this._margins.left-this._margins.right,this.height=l.height):(this.width=l.width,this.height=this._length=z.height-this._margins.top-this._margins.bottom)}_calculatePadding(l,z,j,J){const{ticks:{align:mt,padding:kt},position:Dt}=this.options,Gt=this.labelRotation!==0,re=Dt!=="top"&&this.axis==="x";if(this.isHorizontal()){const pe=this.getPixelForTick(0)-this.left,Ne=this.right-this.getPixelForTick(this.ticks.length-1);let or=0,_r=0;Gt?re?(or=J*l.width,_r=j*z.height):(or=j*l.height,_r=J*z.width):mt==="start"?_r=z.width:mt==="end"?or=l.width:mt!=="inner"&&(or=l.width/2,_r=z.width/2),this.paddingLeft=Math.max((or-pe+kt)*this.width/(this.width-pe),0),this.paddingRight=Math.max((_r-Ne+kt)*this.width/(this.width-Ne),0)}else{let pe=z.height/2,Ne=l.height/2;mt==="start"?(pe=0,Ne=l.height):mt==="end"&&(pe=z.height,Ne=0),this.paddingTop=pe+kt,this.paddingBottom=Ne+kt}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Df(this.options.afterFit,[this])}isHorizontal(){const{axis:l,position:z}=this.options;return z==="top"||z==="bottom"||l==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(l){this.beforeTickToLabelConversion(),this.generateTickLabels(l);let z,j;for(z=0,j=l.length;z({width:kt[un]||0,height:Dt[un]||0});return{first:Gi(0),last:Gi(z-1),widest:Gi(ai),highest:Gi(Qi),widths:kt,heights:Dt}}getLabelForValue(l){return l}getPixelForValue(l,z){return NaN}getValueForPixel(l){}getPixelForTick(l){const z=this.ticks;return l<0||l>z.length-1?null:this.getPixelForValue(z[l].value)}getPixelForDecimal(l){this._reversePixels&&(l=1-l);const z=this._startPixel+l*this._length;return Hot(this._alignToPixels?ly(this.chart,z,0):z)}getDecimalForPixel(l){const z=(l-this._startPixel)/this._length;return this._reversePixels?1-z:z}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:l,max:z}=this;return l<0&&z<0?z:l>0&&z>0?l:0}getContext(l){const z=this.ticks||[];if(l>=0&&lDt*J?Dt/j:Gt/J:Gt*J0}_computeGridLineItems(l){const z=this.axis,j=this.chart,J=this.options,{grid:mt,position:kt,border:Dt}=J,Gt=mt.offset,re=this.isHorizontal(),Ne=this.ticks.length+(Gt?1:0),or=i2(mt),_r=[],Fr=Dt.setContext(this.getContext()),zr=Fr.display?Fr.width:0,Wr=zr/2,An=function(Ni){return ly(j,Ni,zr)};let Ft,kn,ei,jn,ai,Qi,Gi,un,ia,fa,Li,yi;if(kt==="top")Ft=An(this.bottom),Qi=this.bottom-or,un=Ft-Wr,fa=An(l.top)+Wr,yi=l.bottom;else if(kt==="bottom")Ft=An(this.top),fa=l.top,yi=An(l.bottom)-Wr,Qi=Ft+Wr,un=this.top+or;else if(kt==="left")Ft=An(this.right),ai=this.right-or,Gi=Ft-Wr,ia=An(l.left)+Wr,Li=l.right;else if(kt==="right")Ft=An(this.left),ia=l.left,Li=An(l.right)-Wr,ai=Ft+Wr,Gi=this.left+or;else if(z==="x"){if(kt==="center")Ft=An((l.top+l.bottom)/2+.5);else if(Ec(kt)){const Ni=Object.keys(kt)[0],Ei=kt[Ni];Ft=An(this.chart.scales[Ni].getPixelForValue(Ei))}fa=l.top,yi=l.bottom,Qi=Ft+Wr,un=Qi+or}else if(z==="y"){if(kt==="center")Ft=An((l.left+l.right)/2);else if(Ec(kt)){const Ni=Object.keys(kt)[0],Ei=kt[Ni];Ft=An(this.chart.scales[Ni].getPixelForValue(Ei))}ai=Ft-Wr,Gi=ai-or,ia=l.left,Li=l.right}const ra=cc(J.ticks.maxTicksLimit,Ne),Da=Math.max(1,Math.ceil(Ne/ra));for(kn=0;kn0&&(Ta-=qo/2);break}ko={left:Ta,top:fo,width:qo+pl.width,height:fu+pl.height,color:Da.backdropColor}}Wr.push({label:ei,font:un,textOffset:Li,options:{rotation:zr,color:Ei,strokeColor:Va,strokeWidth:ss,textAlign:mo,textBaseline:yi,translation:[jn,ai],backdrop:ko}})}return Wr}_getXAxisLabelAlignment(){const{position:l,ticks:z}=this.options;if(-tv(this.labelRotation))return l==="top"?"left":"right";let J="center";return z.align==="start"?J="left":z.align==="end"?J="right":z.align==="inner"&&(J="inner"),J}_getYAxisLabelAlignment(l){const{position:z,ticks:{crossAlign:j,mirror:J,padding:mt}}=this.options,kt=this._getLabelSizes(),Dt=l+mt,Gt=kt.widest.width;let re,pe;return z==="left"?J?(pe=this.right+mt,j==="near"?re="left":j==="center"?(re="center",pe+=Gt/2):(re="right",pe+=Gt)):(pe=this.right-Dt,j==="near"?re="right":j==="center"?(re="center",pe-=Gt/2):(re="left",pe=this.left)):z==="right"?J?(pe=this.left+mt,j==="near"?re="right":j==="center"?(re="center",pe-=Gt/2):(re="left",pe-=Gt)):(pe=this.left+Dt,j==="near"?re="left":j==="center"?(re="center",pe+=Gt/2):(re="right",pe=this.right)):re="right",{textAlign:re,x:pe}}_computeLabelArea(){if(this.options.ticks.mirror)return;const l=this.chart,z=this.options.position;if(z==="left"||z==="right")return{top:0,left:this.left,bottom:l.height,right:this.right};if(z==="top"||z==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:l.width}}drawBackground(){const{ctx:l,options:{backgroundColor:z},left:j,top:J,width:mt,height:kt}=this;z&&(l.save(),l.fillStyle=z,l.fillRect(j,J,mt,kt),l.restore())}getLineWidthForValue(l){const z=this.options.grid;if(!this._isVisible()||!z.display)return 0;const J=this.ticks.findIndex(mt=>mt.value===l);return J>=0?z.setContext(this.getContext(J)).lineWidth:0}drawGrid(l){const z=this.options.grid,j=this.ctx,J=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(l));let mt,kt;const Dt=(Gt,re,pe)=>{!pe.width||!pe.color||(j.save(),j.lineWidth=pe.width,j.strokeStyle=pe.color,j.setLineDash(pe.borderDash||[]),j.lineDashOffset=pe.borderDashOffset,j.beginPath(),j.moveTo(Gt.x,Gt.y),j.lineTo(re.x,re.y),j.stroke(),j.restore())};if(z.display)for(mt=0,kt=J.length;mt{this.draw(mt)}}]:[{z:j,draw:mt=>{this.drawBackground(),this.drawGrid(mt),this.drawTitle()}},{z:J,draw:()=>{this.drawBorder()}},{z,draw:mt=>{this.drawLabels(mt)}}]}getMatchingVisibleMetas(l){const z=this.chart.getSortedVisibleDatasetMetas(),j=this.axis+"AxisID",J=[];let mt,kt;for(mt=0,kt=z.length;mt{const j=z.split("."),J=j.pop(),mt=[d].concat(j).join("."),kt=l[z].split("."),Dt=kt.pop(),Gt=kt.join(".");Bd.route(mt,J,Gt,Dt)})}function fut(d){return"id"in d&&"defaults"in d}class dut{constructor(){this.controllers=new F5(W4,"datasets",!0),this.elements=new F5(lv,"elements"),this.plugins=new F5(Object,"plugins"),this.scales=new F5(__,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...l){this._each("register",l)}remove(...l){this._each("unregister",l)}addControllers(...l){this._each("register",l,this.controllers)}addElements(...l){this._each("register",l,this.elements)}addPlugins(...l){this._each("register",l,this.plugins)}addScales(...l){this._each("register",l,this.scales)}getController(l){return this._get(l,this.controllers,"controller")}getElement(l){return this._get(l,this.elements,"element")}getPlugin(l){return this._get(l,this.plugins,"plugin")}getScale(l){return this._get(l,this.scales,"scale")}removeControllers(...l){this._each("unregister",l,this.controllers)}removeElements(...l){this._each("unregister",l,this.elements)}removePlugins(...l){this._each("unregister",l,this.plugins)}removeScales(...l){this._each("unregister",l,this.scales)}_each(l,z,j){[...z].forEach(J=>{const mt=j||this._getRegistryForType(J);j||mt.isForType(J)||mt===this.plugins&&J.id?this._exec(l,mt,J):Kh(J,kt=>{const Dt=j||this._getRegistryForType(kt);this._exec(l,Dt,kt)})})}_exec(l,z,j){const J=iM(l);Df(j["before"+J],[],j),z[l](j),Df(j["after"+J],[],j)}_getRegistryForType(l){for(let z=0;zmt.filter(Dt=>!kt.some(Gt=>Dt.plugin.id===Gt.plugin.id));this._notify(J(z,j),l,"stop"),this._notify(J(j,z),l,"start")}}function mut(d){const l={},z=[],j=Object.keys(ag.plugins.items);for(let mt=0;mt1&&CP(d[0].toLowerCase());if(j)return j}throw new Error(`Cannot determine type of '${d}' axis. Please provide 'axis' or 'position' option.`)}function LP(d,l,z){if(z[l+"AxisID"]===d)return{axis:l}}function wut(d,l){if(l.data&&l.data.datasets){const z=l.data.datasets.filter(j=>j.xAxisID===d||j.yAxisID===d);if(z.length)return LP(d,"x",z[0])||LP(d,"y",z[0])}return{}}function kut(d,l){const z=Sy[d.type]||{scales:{}},j=l.scales||{},J=xA(d.type,l),mt=Object.create(null);return Object.keys(j).forEach(kt=>{const Dt=j[kt];if(!Ec(Dt))return console.error(`Invalid scale configuration for scale: ${kt}`);if(Dt._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${kt}`);const Gt=_A(kt,Dt,wut(kt,d),Bd.scales[Dt.type]),re=_ut(Gt,J),pe=z.scales||{};mt[kt]=T2(Object.create(null),[{axis:Gt},Dt,pe[Gt],pe[re]])}),d.data.datasets.forEach(kt=>{const Dt=kt.type||d.type,Gt=kt.indexAxis||xA(Dt,l),pe=(Sy[Dt]||{}).scales||{};Object.keys(pe).forEach(Ne=>{const or=xut(Ne,Gt),_r=kt[or+"AxisID"]||or;mt[_r]=mt[_r]||Object.create(null),T2(mt[_r],[{axis:or},j[_r],pe[Ne]])})}),Object.keys(mt).forEach(kt=>{const Dt=mt[kt];T2(Dt,[Bd.scales[Dt.type],Bd.scale])}),mt}function hD(d){const l=d.options||(d.options={});l.plugins=cc(l.plugins,{}),l.scales=kut(d,l)}function fD(d){return d=d||{},d.datasets=d.datasets||[],d.labels=d.labels||[],d}function Tut(d){return d=d||{},d.data=fD(d.data),hD(d),d}const PP=new Map,dD=new Set;function R5(d,l){let z=PP.get(d);return z||(z=l(),PP.set(d,z),dD.add(z)),z}const a2=(d,l,z)=>{const j=My(l,z);j!==void 0&&d.add(j)};class Aut{constructor(l){this._config=Tut(l),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(l){this._config.type=l}get data(){return this._config.data}set data(l){this._config.data=fD(l)}get options(){return this._config.options}set options(l){this._config.options=l}get plugins(){return this._config.plugins}update(){const l=this._config;this.clearCache(),hD(l)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(l){return R5(l,()=>[[`datasets.${l}`,""]])}datasetAnimationScopeKeys(l,z){return R5(`${l}.transition.${z}`,()=>[[`datasets.${l}.transitions.${z}`,`transitions.${z}`],[`datasets.${l}`,""]])}datasetElementScopeKeys(l,z){return R5(`${l}-${z}`,()=>[[`datasets.${l}.elements.${z}`,`datasets.${l}`,`elements.${z}`,""]])}pluginScopeKeys(l){const z=l.id,j=this.type;return R5(`${j}-plugin-${z}`,()=>[[`plugins.${z}`,...l.additionalOptionScopes||[]]])}_cachedScopes(l,z){const j=this._scopeCache;let J=j.get(l);return(!J||z)&&(J=new Map,j.set(l,J)),J}getOptionScopes(l,z,j){const{options:J,type:mt}=this,kt=this._cachedScopes(l,j),Dt=kt.get(z);if(Dt)return Dt;const Gt=new Set;z.forEach(pe=>{l&&(Gt.add(l),pe.forEach(Ne=>a2(Gt,l,Ne))),pe.forEach(Ne=>a2(Gt,J,Ne)),pe.forEach(Ne=>a2(Gt,Sy[mt]||{},Ne)),pe.forEach(Ne=>a2(Gt,Bd,Ne)),pe.forEach(Ne=>a2(Gt,vA,Ne))});const re=Array.from(Gt);return re.length===0&&re.push(Object.create(null)),dD.has(z)&&kt.set(z,re),re}chartOptionScopes(){const{options:l,type:z}=this;return[l,Sy[z]||{},Bd.datasets[z]||{},{type:z},Bd,vA]}resolveNamedOptions(l,z,j,J=[""]){const mt={$shared:!0},{resolver:kt,subPrefixes:Dt}=zP(this._resolverCache,l,J);let Gt=kt;if(Sut(kt,z)){mt.$shared=!1,j=v1(j)?j():j;const re=this.createResolver(l,j,Dt);Gt=m_(kt,j,re)}for(const re of z)mt[re]=Gt[re];return mt}createResolver(l,z,j=[""],J){const{resolver:mt}=zP(this._resolverCache,l,j);return Ec(z)?m_(mt,z,void 0,J):mt}}function zP(d,l,z){let j=d.get(l);j||(j=new Map,d.set(l,j));const J=z.join();let mt=j.get(J);return mt||(mt={resolver:cM(l,z),subPrefixes:z.filter(Dt=>!Dt.toLowerCase().includes("hover"))},j.set(J,mt)),mt}const Mut=d=>Ec(d)&&Object.getOwnPropertyNames(d).some(l=>v1(d[l]));function Sut(d,l){const{isScriptable:z,isIndexable:j}=qO(d);for(const J of l){const mt=z(J),kt=j(J),Dt=(kt||mt)&&d[J];if(mt&&(v1(Dt)||Mut(Dt))||kt&&Xd(Dt))return!0}return!1}var Eut="4.5.1";const Cut=["top","bottom","left","right","chartArea"];function IP(d,l){return d==="top"||d==="bottom"||Cut.indexOf(d)===-1&&l==="x"}function OP(d,l){return function(z,j){return z[d]===j[d]?z[l]-j[l]:z[d]-j[d]}}function DP(d){const l=d.chart,z=l.options.animation;l.notifyPlugins("afterRender"),Df(z&&z.onComplete,[d],l)}function Lut(d){const l=d.chart,z=l.options.animation;Df(z&&z.onProgress,[d],l)}function pD(d){return dM()&&typeof d=="string"?d=document.getElementById(d):d&&d.length&&(d=d[0]),d&&d.canvas&&(d=d.canvas),d}const X5={},FP=d=>{const l=pD(d);return Object.values(X5).filter(z=>z.canvas===l).pop()};function Put(d,l,z){const j=Object.keys(d);for(const J of j){const mt=+J;if(mt>=l){const kt=d[J];delete d[J],(z>0||mt>l)&&(d[mt+z]=kt)}}}function zut(d,l,z,j){return!z||d.type==="mouseout"?null:j?l:d}class d2{static defaults=Bd;static instances=X5;static overrides=Sy;static registry=ag;static version=Eut;static getChart=FP;static register(...l){ag.add(...l),RP()}static unregister(...l){ag.remove(...l),RP()}constructor(l,z){const j=this.config=new Aut(z),J=pD(l),mt=FP(J);if(mt)throw new Error("Canvas is already in use. Chart with ID '"+mt.id+"' must be destroyed before the canvas with ID '"+mt.canvas.id+"' can be reused.");const kt=j.createResolver(j.chartOptionScopes(),this.getContext());this.platform=new(j.platform||Klt(J)),this.platform.updateConfig(j);const Dt=this.platform.acquireContext(J,kt.aspectRatio),Gt=Dt&&Dt.canvas,re=Gt&&Gt.height,pe=Gt&&Gt.width;if(this.id=Eot(),this.ctx=Dt,this.canvas=Gt,this.width=pe,this.height=re,this._options=kt,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new put,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=$ot(Ne=>this.update(Ne),kt.resizeDelay||0),this._dataChanges=[],X5[this.id]=this,!Dt||!Gt){console.error("Failed to create chart: can't acquire context from the given item");return}Gg.listen(this,"complete",DP),Gg.listen(this,"progress",Lut),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:l,maintainAspectRatio:z},width:j,height:J,_aspectRatio:mt}=this;return Rh(l)?z&&mt?mt:J?j/J:null:l}get data(){return this.config.data}set data(l){this.config.data=l}get options(){return this._options}set options(l){this.config.options=l}get registry(){return ag}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():aP(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return rP(this.canvas,this.ctx),this}stop(){return Gg.stop(this),this}resize(l,z){Gg.running(this)?this._resizeBeforeDraw={width:l,height:z}:this._resize(l,z)}_resize(l,z){const j=this.options,J=this.canvas,mt=j.maintainAspectRatio&&this.aspectRatio,kt=this.platform.getMaximumSize(J,l,z,mt),Dt=j.devicePixelRatio||this.platform.getDevicePixelRatio(),Gt=this.width?"resize":"attach";this.width=kt.width,this.height=kt.height,this._aspectRatio=this.aspectRatio,aP(this,Dt,!0)&&(this.notifyPlugins("resize",{size:kt}),Df(j.onResize,[this,kt],this),this.attached&&this._doResize(Gt)&&this.render())}ensureScalesHaveIDs(){const z=this.options.scales||{};Kh(z,(j,J)=>{j.id=J})}buildOrUpdateScales(){const l=this.options,z=l.scales,j=this.scales,J=Object.keys(j).reduce((kt,Dt)=>(kt[Dt]=!1,kt),{});let mt=[];z&&(mt=mt.concat(Object.keys(z).map(kt=>{const Dt=z[kt],Gt=_A(kt,Dt),re=Gt==="r",pe=Gt==="x";return{options:Dt,dposition:re?"chartArea":pe?"bottom":"left",dtype:re?"radialLinear":pe?"category":"linear"}}))),Kh(mt,kt=>{const Dt=kt.options,Gt=Dt.id,re=_A(Gt,Dt),pe=cc(Dt.type,kt.dtype);(Dt.position===void 0||IP(Dt.position,re)!==IP(kt.dposition))&&(Dt.position=kt.dposition),J[Gt]=!0;let Ne=null;if(Gt in j&&j[Gt].type===pe)Ne=j[Gt];else{const or=ag.getScale(pe);Ne=new or({id:Gt,type:pe,ctx:this.ctx,chart:this}),j[Ne.id]=Ne}Ne.init(Dt,l)}),Kh(J,(kt,Dt)=>{kt||delete j[Dt]}),Kh(j,kt=>{om.configure(this,kt,kt.options),om.addBox(this,kt)})}_updateMetasets(){const l=this._metasets,z=this.data.datasets.length,j=l.length;if(l.sort((J,mt)=>J.index-mt.index),j>z){for(let J=z;Jz.length&&delete this._stacks,l.forEach((j,J)=>{z.filter(mt=>mt===j._dataset).length===0&&this._destroyDatasetMeta(J)})}buildOrUpdateControllers(){const l=[],z=this.data.datasets;let j,J;for(this._removeUnreferencedMetasets(),j=0,J=z.length;j{this.getDatasetMeta(z).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(l){const z=this.config;z.update();const j=this._options=z.createResolver(z.chartOptionScopes(),this.getContext()),J=this._animationsDisabled=!j.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:l,cancelable:!0})===!1)return;const mt=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let kt=0;for(let re=0,pe=this.data.datasets.length;re{re.reset()}),this._updateDatasets(l),this.notifyPlugins("afterUpdate",{mode:l}),this._layers.sort(OP("z","_idx"));const{_active:Dt,_lastEvent:Gt}=this;Gt?this._eventHandler(Gt,!0):Dt.length&&this._updateHoverStyles(Dt,Dt,!0),this.render()}_updateScales(){Kh(this.scales,l=>{om.removeBox(this,l)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const l=this.options,z=new Set(Object.keys(this._listeners)),j=new Set(l.events);(!ZL(z,j)||!!this._responsiveListeners!==l.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:l}=this,z=this._getUniformDataChanges()||[];for(const{method:j,start:J,count:mt}of z){const kt=j==="_removeElements"?-mt:mt;Put(l,J,kt)}}_getUniformDataChanges(){const l=this._dataChanges;if(!l||!l.length)return;this._dataChanges=[];const z=this.data.datasets.length,j=mt=>new Set(l.filter(kt=>kt[0]===mt).map((kt,Dt)=>Dt+","+kt.splice(1).join(","))),J=j(0);for(let mt=1;mtmt.split(",")).map(mt=>({method:mt[1],start:+mt[2],count:+mt[3]}))}_updateLayout(l){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;om.update(this,this.width,this.height,l);const z=this.chartArea,j=z.width<=0||z.height<=0;this._layers=[],Kh(this.boxes,J=>{j&&J.position==="chartArea"||(J.configure&&J.configure(),this._layers.push(...J._layers()))},this),this._layers.forEach((J,mt)=>{J._idx=mt}),this.notifyPlugins("afterLayout")}_updateDatasets(l){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:l,cancelable:!0})!==!1){for(let z=0,j=this.data.datasets.length;z=0;--z)this._drawDataset(l[z]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(l){const z=this.ctx,j={meta:l,index:l.index,cancelable:!0},J=eD(this,l);this.notifyPlugins("beforeDatasetDraw",j)!==!1&&(J&&U4(z,J),l.controller.draw(),J&&V4(z),j.cancelable=!1,this.notifyPlugins("afterDatasetDraw",j))}isPointInArea(l){return W2(l,this.chartArea,this._minPadding)}getElementsAtEventForMode(l,z,j,J){const mt=Clt.modes[z];return typeof mt=="function"?mt(this,l,j,J):[]}getDatasetMeta(l){const z=this.data.datasets[l],j=this._metasets;let J=j.filter(mt=>mt&&mt._dataset===z).pop();return J||(J={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:z&&z.order||0,index:l,_dataset:z,_parsed:[],_sorted:!1},j.push(J)),J}getContext(){return this.$context||(this.$context=Cy(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(l){const z=this.data.datasets[l];if(!z)return!1;const j=this.getDatasetMeta(l);return typeof j.hidden=="boolean"?!j.hidden:!z.hidden}setDatasetVisibility(l,z){const j=this.getDatasetMeta(l);j.hidden=!z}toggleDataVisibility(l){this._hiddenIndices[l]=!this._hiddenIndices[l]}getDataVisibility(l){return!this._hiddenIndices[l]}_updateVisibility(l,z,j){const J=j?"show":"hide",mt=this.getDatasetMeta(l),kt=mt.controller._resolveAnimations(void 0,J);U2(z)?(mt.data[z].hidden=!j,this.update()):(this.setDatasetVisibility(l,j),kt.update(mt,{visible:j}),this.update(Dt=>Dt.datasetIndex===l?J:void 0))}hide(l,z){this._updateVisibility(l,z,!1)}show(l,z){this._updateVisibility(l,z,!0)}_destroyDatasetMeta(l){const z=this._metasets[l];z&&z.controller&&z.controller._destroy(),delete this._metasets[l]}_stop(){let l,z;for(this.stop(),Gg.remove(this),l=0,z=this.data.datasets.length;l{z.addEventListener(this,mt,kt),l[mt]=kt},J=(mt,kt,Dt)=>{mt.offsetX=kt,mt.offsetY=Dt,this._eventHandler(mt)};Kh(this.options.events,mt=>j(mt,J))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const l=this._responsiveListeners,z=this.platform,j=(Gt,re)=>{z.addEventListener(this,Gt,re),l[Gt]=re},J=(Gt,re)=>{l[Gt]&&(z.removeEventListener(this,Gt,re),delete l[Gt])},mt=(Gt,re)=>{this.canvas&&this.resize(Gt,re)};let kt;const Dt=()=>{J("attach",Dt),this.attached=!0,this.resize(),j("resize",mt),j("detach",kt)};kt=()=>{this.attached=!1,J("resize",mt),this._stop(),this._resize(0,0),j("attach",Dt)},z.isAttached(this.canvas)?Dt():kt()}unbindEvents(){Kh(this._listeners,(l,z)=>{this.platform.removeEventListener(this,z,l)}),this._listeners={},Kh(this._responsiveListeners,(l,z)=>{this.platform.removeEventListener(this,z,l)}),this._responsiveListeners=void 0}updateHoverStyle(l,z,j){const J=j?"set":"remove";let mt,kt,Dt,Gt;for(z==="dataset"&&(mt=this.getDatasetMeta(l[0].datasetIndex),mt.controller["_"+J+"DatasetHoverStyle"]()),Dt=0,Gt=l.length;Dt{const Dt=this.getDatasetMeta(mt);if(!Dt)throw new Error("No dataset found at index "+mt);return{datasetIndex:mt,element:Dt.data[kt],index:kt}});!h4(j,z)&&(this._active=j,this._lastEvent=null,this._updateHoverStyles(j,z))}notifyPlugins(l,z,j){return this._plugins.notify(this,l,z,j)}isPluginEnabled(l){return this._plugins._cache.filter(z=>z.plugin.id===l).length===1}_updateHoverStyles(l,z,j){const J=this.options.hover,mt=(Gt,re)=>Gt.filter(pe=>!re.some(Ne=>pe.datasetIndex===Ne.datasetIndex&&pe.index===Ne.index)),kt=mt(z,l),Dt=j?l:mt(l,z);kt.length&&this.updateHoverStyle(kt,J.mode,!1),Dt.length&&J.mode&&this.updateHoverStyle(Dt,J.mode,!0)}_eventHandler(l,z){const j={event:l,replay:z,cancelable:!0,inChartArea:this.isPointInArea(l)},J=kt=>(kt.options.events||this.options.events).includes(l.native.type);if(this.notifyPlugins("beforeEvent",j,J)===!1)return;const mt=this._handleEvent(l,z,j.inChartArea);return j.cancelable=!1,this.notifyPlugins("afterEvent",j,J),(mt||j.changed)&&this.render(),this}_handleEvent(l,z,j){const{_active:J=[],options:mt}=this,kt=z,Dt=this._getActiveElements(l,J,j,kt),Gt=Oot(l),re=zut(l,this._lastEvent,j,Gt);j&&(this._lastEvent=null,Df(mt.onHover,[l,Dt,this],this),Gt&&Df(mt.onClick,[l,Dt,this],this));const pe=!h4(Dt,J);return(pe||z)&&(this._active=Dt,this._updateHoverStyles(Dt,J,z)),this._lastEvent=re,pe}_getActiveElements(l,z,j,J){if(l.type==="mouseout")return[];if(!j)return z;const mt=this.options.hover;return this.getElementsAtEventForMode(l,mt.mode,mt,J)}}function RP(){return Kh(d2.instances,d=>d._plugins.invalidate())}function Iut(d,l,z){const{startAngle:j,x:J,y:mt,outerRadius:kt,innerRadius:Dt,options:Gt}=l,{borderWidth:re,borderJoinStyle:pe}=Gt,Ne=Math.min(re/kt,q0(j-z));if(d.beginPath(),d.arc(J,mt,kt-re/2,j+Ne/2,z-Ne/2),Dt>0){const or=Math.min(re/Dt,q0(j-z));d.arc(J,mt,Dt+re/2,z-or/2,j+or/2,!0)}else{const or=Math.min(re/2,kt*q0(j-z));if(pe==="round")d.arc(J,mt,or,z-Jh/2,j+Jh/2,!0);else if(pe==="bevel"){const _r=2*or*or,Fr=-_r*Math.cos(z+Jh/2)+J,zr=-_r*Math.sin(z+Jh/2)+mt,Wr=_r*Math.cos(j+Jh/2)+J,An=_r*Math.sin(j+Jh/2)+mt;d.lineTo(Fr,zr),d.lineTo(Wr,An)}}d.closePath(),d.moveTo(0,0),d.rect(0,0,d.canvas.width,d.canvas.height),d.clip("evenodd")}function Out(d,l,z){const{startAngle:j,pixelMargin:J,x:mt,y:kt,outerRadius:Dt,innerRadius:Gt}=l;let re=J/Dt;d.beginPath(),d.arc(mt,kt,Dt,j-re,z+re),Gt>J?(re=J/Gt,d.arc(mt,kt,Gt,z+re,j-re,!0)):d.arc(mt,kt,J,z+ap,j-ap),d.closePath(),d.clip()}function Dut(d){return uM(d,["outerStart","outerEnd","innerStart","innerEnd"])}function Fut(d,l,z,j){const J=Dut(d.options.borderRadius),mt=(z-l)/2,kt=Math.min(mt,j*l/2),Dt=Gt=>{const re=(z-Math.min(mt,Gt))*j/2;return Xp(Gt,0,Math.min(mt,re))};return{outerStart:Dt(J.outerStart),outerEnd:Dt(J.outerEnd),innerStart:Xp(J.innerStart,0,kt),innerEnd:Xp(J.innerEnd,0,kt)}}function Jx(d,l,z,j){return{x:z+d*Math.cos(l),y:j+d*Math.sin(l)}}function v4(d,l,z,j,J,mt){const{x:kt,y:Dt,startAngle:Gt,pixelMargin:re,innerRadius:pe}=l,Ne=Math.max(l.outerRadius+j+z-re,0),or=pe>0?pe+j+z+re:0;let _r=0;const Fr=J-Gt;if(j){const Da=pe>0?pe-j:0,Ni=Ne>0?Ne-j:0,Ei=(Da+Ni)/2,Va=Ei!==0?Fr*Ei/(Ei+j):Fr;_r=(Fr-Va)/2}const zr=Math.max(.001,Fr*Ne-z/Jh)/Ne,Wr=(Fr-zr)/2,An=Gt+Wr+_r,Ft=J-Wr-_r,{outerStart:kn,outerEnd:ei,innerStart:jn,innerEnd:ai}=Fut(l,or,Ne,Ft-An),Qi=Ne-kn,Gi=Ne-ei,un=An+kn/Qi,ia=Ft-ei/Gi,fa=or+jn,Li=or+ai,yi=An+jn/fa,ra=Ft-ai/Li;if(d.beginPath(),mt){const Da=(un+ia)/2;if(d.arc(kt,Dt,Ne,un,Da),d.arc(kt,Dt,Ne,Da,ia),ei>0){const ss=Jx(Gi,ia,kt,Dt);d.arc(ss.x,ss.y,ei,ia,Ft+ap)}const Ni=Jx(Li,Ft,kt,Dt);if(d.lineTo(Ni.x,Ni.y),ai>0){const ss=Jx(Li,ra,kt,Dt);d.arc(ss.x,ss.y,ai,Ft+ap,ra+Math.PI)}const Ei=(Ft-ai/or+(An+jn/or))/2;if(d.arc(kt,Dt,or,Ft-ai/or,Ei,!0),d.arc(kt,Dt,or,Ei,An+jn/or,!0),jn>0){const ss=Jx(fa,yi,kt,Dt);d.arc(ss.x,ss.y,jn,yi+Math.PI,An-ap)}const Va=Jx(Qi,An,kt,Dt);if(d.lineTo(Va.x,Va.y),kn>0){const ss=Jx(Qi,un,kt,Dt);d.arc(ss.x,ss.y,kn,An-ap,un)}}else{d.moveTo(kt,Dt);const Da=Math.cos(un)*Ne+kt,Ni=Math.sin(un)*Ne+Dt;d.lineTo(Da,Ni);const Ei=Math.cos(ia)*Ne+kt,Va=Math.sin(ia)*Ne+Dt;d.lineTo(Ei,Va)}d.closePath()}function Rut(d,l,z,j,J){const{fullCircles:mt,startAngle:kt,circumference:Dt}=l;let Gt=l.endAngle;if(mt){v4(d,l,z,j,Gt,J);for(let re=0;re=Jh&&_r===0&&pe!=="miter"&&Iut(d,l,zr),mt||(v4(d,l,z,j,zr,J),d.stroke())}class Nut extends lv{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:l=>l!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(l){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,l&&Object.assign(this,l)}inRange(l,z,j){const J=this.getProps(["x","y"],j),{angle:mt,distance:kt}=RO(J,{x:l,y:z}),{startAngle:Dt,endAngle:Gt,innerRadius:re,outerRadius:pe,circumference:Ne}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],j),or=(this.options.spacing+this.options.borderWidth)/2,_r=cc(Ne,Gt-Dt),Fr=H2(mt,Dt,Gt)&&Dt!==Gt,zr=_r>=od||Fr,Wr=ev(kt,re+or,pe+or);return zr&&Wr}getCenterPoint(l){const{x:z,y:j,startAngle:J,endAngle:mt,innerRadius:kt,outerRadius:Dt}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],l),{offset:Gt,spacing:re}=this.options,pe=(J+mt)/2,Ne=(kt+Dt+re+Gt)/2;return{x:z+Math.cos(pe)*Ne,y:j+Math.sin(pe)*Ne}}tooltipPosition(l){return this.getCenterPoint(l)}draw(l){const{options:z,circumference:j}=this,J=(z.offset||0)/4,mt=(z.spacing||0)/2,kt=z.circular;if(this.pixelMargin=z.borderAlign==="inner"?.33:0,this.fullCircles=j>od?Math.floor(j/od):0,j===0||this.innerRadius<0||this.outerRadius<0)return;l.save();const Dt=(this.startAngle+this.endAngle)/2;l.translate(Math.cos(Dt)*J,Math.sin(Dt)*J);const Gt=1-Math.sin(Math.min(Jh,j||0)),re=J*Gt;l.fillStyle=z.backgroundColor,l.strokeStyle=z.borderColor,Rut(l,this,re,mt,kt),But(l,this,re,mt,kt),l.restore()}}function mD(d,l,z=l){d.lineCap=cc(z.borderCapStyle,l.borderCapStyle),d.setLineDash(cc(z.borderDash,l.borderDash)),d.lineDashOffset=cc(z.borderDashOffset,l.borderDashOffset),d.lineJoin=cc(z.borderJoinStyle,l.borderJoinStyle),d.lineWidth=cc(z.borderWidth,l.borderWidth),d.strokeStyle=cc(z.borderColor,l.borderColor)}function jut(d,l,z){d.lineTo(z.x,z.y)}function Uut(d){return d.stepped?sst:d.tension||d.cubicInterpolationMode==="monotone"?lst:jut}function gD(d,l,z={}){const j=d.length,{start:J=0,end:mt=j-1}=z,{start:kt,end:Dt}=l,Gt=Math.max(J,kt),re=Math.min(mt,Dt),pe=JDt&&mt>Dt;return{count:j,start:Gt,loop:l.loop,ilen:re(kt+(re?Dt-ei:ei))%mt,kn=()=>{zr!==Wr&&(d.lineTo(pe,Wr),d.lineTo(pe,zr),d.lineTo(pe,An))};for(Gt&&(_r=J[Ft(0)],d.moveTo(_r.x,_r.y)),or=0;or<=Dt;++or){if(_r=J[Ft(or)],_r.skip)continue;const ei=_r.x,jn=_r.y,ai=ei|0;ai===Fr?(jnWr&&(Wr=jn),pe=(Ne*pe+ei)/++Ne):(kn(),d.lineTo(ei,jn),Fr=ai,Ne=0,zr=Wr=jn),An=jn}kn()}function bA(d){const l=d.options,z=l.borderDash&&l.borderDash.length;return!d._decimated&&!d._loop&&!l.tension&&l.cubicInterpolationMode!=="monotone"&&!l.stepped&&!z?Hut:Vut}function Wut(d){return d.stepped?jst:d.tension||d.cubicInterpolationMode==="monotone"?Ust:fy}function qut(d,l,z,j){let J=l._path;J||(J=l._path=new Path2D,l.path(J,z,j)&&J.closePath()),mD(d,l.options),d.stroke(J)}function Zut(d,l,z,j){const{segments:J,options:mt}=l,kt=bA(l);for(const Dt of J)mD(d,mt,Dt.style),d.beginPath(),kt(d,l,Dt,{start:z,end:z+j-1})&&d.closePath(),d.stroke()}const $ut=typeof Path2D=="function";function Gut(d,l,z,j){$ut&&!l.options.segment?qut(d,l,z,j):Zut(d,l,z,j)}class Z4 extends lv{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:l=>l!=="borderDash"&&l!=="fill"};constructor(l){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,l&&Object.assign(this,l)}updateControlPoints(l,z){const j=this.options;if((j.tension||j.cubicInterpolationMode==="monotone")&&!j.stepped&&!this._pointsUpdated){const J=j.spanGaps?this._loop:this._fullLoop;zst(this._points,j,l,J,z),this._pointsUpdated=!0}}set points(l){this._points=l,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=$st(this,this.options.segment))}first(){const l=this.segments,z=this.points;return l.length&&z[l[0].start]}last(){const l=this.segments,z=this.points,j=l.length;return j&&z[l[j-1].end]}interpolate(l,z){const j=this.options,J=l[z],mt=this.points,kt=tD(this,{property:z,start:J,end:J});if(!kt.length)return;const Dt=[],Gt=Wut(j);let re,pe;for(re=0,pe=kt.length;re{Dt=$4(kt,Dt,J);const Gt=J[kt],re=J[Dt];j!==null?(mt.push({x:Gt.x,y:j}),mt.push({x:re.x,y:j})):z!==null&&(mt.push({x:z,y:Gt.y}),mt.push({x:z,y:re.y}))}),mt}function $4(d,l,z){for(;l>d;l--){const j=z[l];if(!isNaN(j.x)&&!isNaN(j.y))break}return l}function NP(d,l,z,j){return d&&l?j(d[z],l[z]):d?d[z]:l?l[z]:0}function yD(d,l){let z=[],j=!1;return Xd(d)?(j=!0,z=d):z=nct(d,l),z.length?new Z4({points:z,options:{tension:0},_loop:j,_fullLoop:j}):null}function jP(d){return d&&d.fill!==!1}function ict(d,l,z){let J=d[l].fill;const mt=[l];let kt;if(!z)return J;for(;J!==!1&&mt.indexOf(J)===-1;){if(!Qp(J))return J;if(kt=d[J],!kt)return!1;if(kt.visible)return J;mt.push(J),J=kt.fill}return!1}function act(d,l,z){const j=uct(d);if(Ec(j))return isNaN(j.value)?!1:j;let J=parseFloat(j);return Qp(J)&&Math.floor(J)===J?oct(j[0],l,J,z):["origin","start","end","stack","shape"].indexOf(j)>=0&&j}function oct(d,l,z,j){return(d==="-"||d==="+")&&(z=l+z),z===l||z<0||z>=j?!1:z}function sct(d,l){let z=null;return d==="start"?z=l.bottom:d==="end"?z=l.top:Ec(d)?z=l.getPixelForValue(d.value):l.getBasePixel&&(z=l.getBasePixel()),z}function lct(d,l,z){let j;return d==="start"?j=z:d==="end"?j=l.options.reverse?l.min:l.max:Ec(d)?j=d.value:j=l.getBaseValue(),j}function uct(d){const l=d.options,z=l.fill;let j=cc(z&&z.target,z);return j===void 0&&(j=!!l.backgroundColor),j===!1||j===null?!1:j===!0?"origin":j}function cct(d){const{scale:l,index:z,line:j}=d,J=[],mt=j.segments,kt=j.points,Dt=hct(l,z);Dt.push(yD({x:null,y:l.bottom},j));for(let Gt=0;Gt=0;--kt){const Dt=J[kt].$filler;Dt&&(Dt.line.updateControlPoints(mt,Dt.axis),j&&Dt.fill&&V8(d.ctx,Dt,mt))}},beforeDatasetsDraw(d,l,z){if(z.drawTime!=="beforeDatasetsDraw")return;const j=d.getSortedVisibleDatasetMetas();for(let J=j.length-1;J>=0;--J){const mt=j[J].$filler;jP(mt)&&V8(d.ctx,mt,d.chartArea)}},beforeDatasetDraw(d,l,z){const j=l.meta.$filler;!jP(j)||z.drawTime!=="beforeDatasetDraw"||V8(d.ctx,j,d.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const WP=(d,l)=>{let{boxHeight:z=l,boxWidth:j=l}=d;return d.usePointStyle&&(z=Math.min(z,l),j=d.pointStyleWidth||Math.min(j,l)),{boxWidth:j,boxHeight:z,itemHeight:Math.max(l,z)}},wct=(d,l)=>d!==null&&l!==null&&d.datasetIndex===l.datasetIndex&&d.index===l.index;class qP extends lv{constructor(l){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=l.chart,this.options=l.options,this.ctx=l.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(l,z,j){this.maxWidth=l,this.maxHeight=z,this._margins=j,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const l=this.options.labels||{};let z=Df(l.generateLabels,[this.chart],this)||[];l.filter&&(z=z.filter(j=>l.filter(j,this.chart.data))),l.sort&&(z=z.sort((j,J)=>l.sort(j,J,this.chart.data))),this.options.reverse&&z.reverse(),this.legendItems=z}fit(){const{options:l,ctx:z}=this;if(!l.display){this.width=this.height=0;return}const j=l.labels,J=Jp(j.font),mt=J.size,kt=this._computeTitleHeight(),{boxWidth:Dt,itemHeight:Gt}=WP(j,mt);let re,pe;z.font=J.string,this.isHorizontal()?(re=this.maxWidth,pe=this._fitRows(kt,mt,Dt,Gt)+10):(pe=this.maxHeight,re=this._fitCols(kt,J,Dt,Gt)+10),this.width=Math.min(re,l.maxWidth||this.maxWidth),this.height=Math.min(pe,l.maxHeight||this.maxHeight)}_fitRows(l,z,j,J){const{ctx:mt,maxWidth:kt,options:{labels:{padding:Dt}}}=this,Gt=this.legendHitBoxes=[],re=this.lineWidths=[0],pe=J+Dt;let Ne=l;mt.textAlign="left",mt.textBaseline="middle";let or=-1,_r=-pe;return this.legendItems.forEach((Fr,zr)=>{const Wr=j+z/2+mt.measureText(Fr.text).width;(zr===0||re[re.length-1]+Wr+2*Dt>kt)&&(Ne+=pe,re[re.length-(zr>0?0:1)]=0,_r+=pe,or++),Gt[zr]={left:0,top:_r,row:or,width:Wr,height:J},re[re.length-1]+=Wr+Dt}),Ne}_fitCols(l,z,j,J){const{ctx:mt,maxHeight:kt,options:{labels:{padding:Dt}}}=this,Gt=this.legendHitBoxes=[],re=this.columnSizes=[],pe=kt-l;let Ne=Dt,or=0,_r=0,Fr=0,zr=0;return this.legendItems.forEach((Wr,An)=>{const{itemWidth:Ft,itemHeight:kn}=kct(j,z,mt,Wr,J);An>0&&_r+kn+2*Dt>pe&&(Ne+=or+Dt,re.push({width:or,height:_r}),Fr+=or+Dt,zr++,or=_r=0),Gt[An]={left:Fr,top:_r,col:zr,width:Ft,height:kn},or=Math.max(or,Ft),_r+=kn+Dt}),Ne+=or,re.push({width:or,height:_r}),Ne}adjustHitBoxes(){if(!this.options.display)return;const l=this._computeTitleHeight(),{legendHitBoxes:z,options:{align:j,labels:{padding:J},rtl:mt}}=this,kt=l_(mt,this.left,this.width);if(this.isHorizontal()){let Dt=0,Gt=Wp(j,this.left+J,this.right-this.lineWidths[Dt]);for(const re of z)Dt!==re.row&&(Dt=re.row,Gt=Wp(j,this.left+J,this.right-this.lineWidths[Dt])),re.top+=this.top+l+J,re.left=kt.leftForLtr(kt.x(Gt),re.width),Gt+=re.width+J}else{let Dt=0,Gt=Wp(j,this.top+l+J,this.bottom-this.columnSizes[Dt].height);for(const re of z)re.col!==Dt&&(Dt=re.col,Gt=Wp(j,this.top+l+J,this.bottom-this.columnSizes[Dt].height)),re.top=Gt,re.left+=this.left+J,re.left=kt.leftForLtr(kt.x(re.left),re.width),Gt+=re.height+J}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const l=this.ctx;U4(l,this),this._draw(),V4(l)}}_draw(){const{options:l,columnSizes:z,lineWidths:j,ctx:J}=this,{align:mt,labels:kt}=l,Dt=Bd.color,Gt=l_(l.rtl,this.left,this.width),re=Jp(kt.font),{padding:pe}=kt,Ne=re.size,or=Ne/2;let _r;this.drawTitle(),J.textAlign=Gt.textAlign("left"),J.textBaseline="middle",J.lineWidth=.5,J.font=re.string;const{boxWidth:Fr,boxHeight:zr,itemHeight:Wr}=WP(kt,Ne),An=function(ai,Qi,Gi){if(isNaN(Fr)||Fr<=0||isNaN(zr)||zr<0)return;J.save();const un=cc(Gi.lineWidth,1);if(J.fillStyle=cc(Gi.fillStyle,Dt),J.lineCap=cc(Gi.lineCap,"butt"),J.lineDashOffset=cc(Gi.lineDashOffset,0),J.lineJoin=cc(Gi.lineJoin,"miter"),J.lineWidth=un,J.strokeStyle=cc(Gi.strokeStyle,Dt),J.setLineDash(cc(Gi.lineDash,[])),kt.usePointStyle){const ia={radius:zr*Math.SQRT2/2,pointStyle:Gi.pointStyle,rotation:Gi.rotation,borderWidth:un},fa=Gt.xPlus(ai,Fr/2),Li=Qi+or;HO(J,ia,fa,Li,kt.pointStyleWidth&&Fr)}else{const ia=Qi+Math.max((Ne-zr)/2,0),fa=Gt.leftForLtr(ai,Fr),Li=s_(Gi.borderRadius);J.beginPath(),Object.values(Li).some(yi=>yi!==0)?p4(J,{x:fa,y:ia,w:Fr,h:zr,radius:Li}):J.rect(fa,ia,Fr,zr),J.fill(),un!==0&&J.stroke()}J.restore()},Ft=function(ai,Qi,Gi){q2(J,Gi.text,ai,Qi+Wr/2,re,{strikethrough:Gi.hidden,textAlign:Gt.textAlign(Gi.textAlign)})},kn=this.isHorizontal(),ei=this._computeTitleHeight();kn?_r={x:Wp(mt,this.left+pe,this.right-j[0]),y:this.top+pe+ei,line:0}:_r={x:this.left+pe,y:Wp(mt,this.top+ei+pe,this.bottom-z[0].height),line:0},KO(this.ctx,l.textDirection);const jn=Wr+pe;this.legendItems.forEach((ai,Qi)=>{J.strokeStyle=ai.fontColor,J.fillStyle=ai.fontColor;const Gi=J.measureText(ai.text).width,un=Gt.textAlign(ai.textAlign||(ai.textAlign=kt.textAlign)),ia=Fr+or+Gi;let fa=_r.x,Li=_r.y;Gt.setWidth(this.width),kn?Qi>0&&fa+ia+pe>this.right&&(Li=_r.y+=jn,_r.line++,fa=_r.x=Wp(mt,this.left+pe,this.right-j[_r.line])):Qi>0&&Li+jn>this.bottom&&(fa=_r.x=fa+z[_r.line].width+pe,_r.line++,Li=_r.y=Wp(mt,this.top+ei+pe,this.bottom-z[_r.line].height));const yi=Gt.x(fa);if(An(yi,Li,ai),fa=Got(un,fa+Fr+or,kn?fa+ia:this.right,l.rtl),Ft(Gt.x(fa),Li,ai),kn)_r.x+=ia+pe;else if(typeof ai.text!="string"){const ra=re.lineHeight;_r.y+=_D(ai,ra)+pe}else _r.y+=jn}),XO(this.ctx,l.textDirection)}drawTitle(){const l=this.options,z=l.title,j=Jp(z.font),J=fm(z.padding);if(!z.display)return;const mt=l_(l.rtl,this.left,this.width),kt=this.ctx,Dt=z.position,Gt=j.size/2,re=J.top+Gt;let pe,Ne=this.left,or=this.width;if(this.isHorizontal())or=Math.max(...this.lineWidths),pe=this.top+re,Ne=Wp(l.align,Ne,this.right-or);else{const Fr=this.columnSizes.reduce((zr,Wr)=>Math.max(zr,Wr.height),0);pe=re+Wp(l.align,this.top,this.bottom-Fr-l.labels.padding-this._computeTitleHeight())}const _r=Wp(Dt,Ne,Ne+or);kt.textAlign=mt.textAlign(oM(Dt)),kt.textBaseline="middle",kt.strokeStyle=z.color,kt.fillStyle=z.color,kt.font=j.string,q2(kt,z.text,_r,pe,j)}_computeTitleHeight(){const l=this.options.title,z=Jp(l.font),j=fm(l.padding);return l.display?z.lineHeight+j.height:0}_getLegendItemAt(l,z){let j,J,mt;if(ev(l,this.left,this.right)&&ev(z,this.top,this.bottom)){for(mt=this.legendHitBoxes,j=0;jmt.length>kt.length?mt:kt)),l+z.size/2+j.measureText(J).width}function Act(d,l,z){let j=d;return typeof l.text!="string"&&(j=_D(l,z)),j}function _D(d,l){const z=d.text?d.text.length:0;return l*z}function Mct(d,l){return!!((d==="mousemove"||d==="mouseout")&&(l.onHover||l.onLeave)||l.onClick&&(d==="click"||d==="mouseup"))}var Sct={id:"legend",_element:qP,start(d,l,z){const j=d.legend=new qP({ctx:d.ctx,options:z,chart:d});om.configure(d,j,z),om.addBox(d,j)},stop(d){om.removeBox(d,d.legend),delete d.legend},beforeUpdate(d,l,z){const j=d.legend;om.configure(d,j,z),j.options=z},afterUpdate(d){const l=d.legend;l.buildLabels(),l.adjustHitBoxes()},afterEvent(d,l){l.replay||d.legend.handleEvent(l.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(d,l,z){const j=l.datasetIndex,J=z.chart;J.isDatasetVisible(j)?(J.hide(j),l.hidden=!0):(J.show(j),l.hidden=!1)},onHover:null,onLeave:null,labels:{color:d=>d.chart.options.color,boxWidth:40,padding:10,generateLabels(d){const l=d.data.datasets,{labels:{usePointStyle:z,pointStyle:j,textAlign:J,color:mt,useBorderRadius:kt,borderRadius:Dt}}=d.legend.options;return d._getSortedDatasetMetas().map(Gt=>{const re=Gt.controller.getStyle(z?0:void 0),pe=fm(re.borderWidth);return{text:l[Gt.index].label,fillStyle:re.backgroundColor,fontColor:mt,hidden:!Gt.visible,lineCap:re.borderCapStyle,lineDash:re.borderDash,lineDashOffset:re.borderDashOffset,lineJoin:re.borderJoinStyle,lineWidth:(pe.width+pe.height)/4,strokeStyle:re.borderColor,pointStyle:j||re.pointStyle,rotation:re.rotation,textAlign:J||re.textAlign,borderRadius:kt&&(Dt||re.borderRadius),datasetIndex:Gt.index}},this)}},title:{color:d=>d.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:d=>!d.startsWith("on"),labels:{_scriptable:d=>!["generateLabels","filter","sort"].includes(d)}}};class bD extends lv{constructor(l){super(),this.chart=l.chart,this.options=l.options,this.ctx=l.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(l,z){const j=this.options;if(this.left=0,this.top=0,!j.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=l,this.height=this.bottom=z;const J=Xd(j.text)?j.text.length:1;this._padding=fm(j.padding);const mt=J*Jp(j.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=mt:this.width=mt}isHorizontal(){const l=this.options.position;return l==="top"||l==="bottom"}_drawArgs(l){const{top:z,left:j,bottom:J,right:mt,options:kt}=this,Dt=kt.align;let Gt=0,re,pe,Ne;return this.isHorizontal()?(pe=Wp(Dt,j,mt),Ne=z+l,re=mt-j):(kt.position==="left"?(pe=j+l,Ne=Wp(Dt,J,z),Gt=Jh*-.5):(pe=mt-l,Ne=Wp(Dt,z,J),Gt=Jh*.5),re=J-z),{titleX:pe,titleY:Ne,maxWidth:re,rotation:Gt}}draw(){const l=this.ctx,z=this.options;if(!z.display)return;const j=Jp(z.font),mt=j.lineHeight/2+this._padding.top,{titleX:kt,titleY:Dt,maxWidth:Gt,rotation:re}=this._drawArgs(mt);q2(l,z.text,0,0,j,{color:z.color,maxWidth:Gt,rotation:re,textAlign:oM(z.align),textBaseline:"middle",translation:[kt,Dt]})}}function Ect(d,l){const z=new bD({ctx:d.ctx,options:l,chart:d});om.configure(d,z,l),om.addBox(d,z),d.titleBlock=z}var Cct={id:"title",_element:bD,start(d,l,z){Ect(d,z)},stop(d){const l=d.titleBlock;om.removeBox(d,l),delete d.titleBlock},beforeUpdate(d,l,z){const j=d.titleBlock;om.configure(d,j,z),j.options=z},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const p2={average(d){if(!d.length)return!1;let l,z,j=new Set,J=0,mt=0;for(l=0,z=d.length;lDt+Gt)/j.size,y:J/mt}},nearest(d,l){if(!d.length)return!1;let z=l.x,j=l.y,J=Number.POSITIVE_INFINITY,mt,kt,Dt;for(mt=0,kt=d.length;mt-1?d.split(` +`):d}function Lct(d,l){const{element:z,datasetIndex:j,index:J}=l,mt=d.getDatasetMeta(j).controller,{label:kt,value:Dt}=mt.getLabelAndValue(J);return{chart:d,label:kt,parsed:mt.getParsed(J),raw:d.data.datasets[j].data[J],formattedValue:Dt,dataset:mt.getDataset(),dataIndex:J,datasetIndex:j,element:z}}function ZP(d,l){const z=d.chart.ctx,{body:j,footer:J,title:mt}=d,{boxWidth:kt,boxHeight:Dt}=l,Gt=Jp(l.bodyFont),re=Jp(l.titleFont),pe=Jp(l.footerFont),Ne=mt.length,or=J.length,_r=j.length,Fr=fm(l.padding);let zr=Fr.height,Wr=0,An=j.reduce((ei,jn)=>ei+jn.before.length+jn.lines.length+jn.after.length,0);if(An+=d.beforeBody.length+d.afterBody.length,Ne&&(zr+=Ne*re.lineHeight+(Ne-1)*l.titleSpacing+l.titleMarginBottom),An){const ei=l.displayColors?Math.max(Dt,Gt.lineHeight):Gt.lineHeight;zr+=_r*ei+(An-_r)*Gt.lineHeight+(An-1)*l.bodySpacing}or&&(zr+=l.footerMarginTop+or*pe.lineHeight+(or-1)*l.footerSpacing);let Ft=0;const kn=function(ei){Wr=Math.max(Wr,z.measureText(ei).width+Ft)};return z.save(),z.font=re.string,Kh(d.title,kn),z.font=Gt.string,Kh(d.beforeBody.concat(d.afterBody),kn),Ft=l.displayColors?kt+2+l.boxPadding:0,Kh(j,ei=>{Kh(ei.before,kn),Kh(ei.lines,kn),Kh(ei.after,kn)}),Ft=0,z.font=pe.string,Kh(d.footer,kn),z.restore(),Wr+=Fr.width,{width:Wr,height:zr}}function Pct(d,l){const{y:z,height:j}=l;return zd.height-j/2?"bottom":"center"}function zct(d,l,z,j){const{x:J,width:mt}=j,kt=z.caretSize+z.caretPadding;if(d==="left"&&J+mt+kt>l.width||d==="right"&&J-mt-kt<0)return!0}function Ict(d,l,z,j){const{x:J,width:mt}=z,{width:kt,chartArea:{left:Dt,right:Gt}}=d;let re="center";return j==="center"?re=J<=(Dt+Gt)/2?"left":"right":J<=mt/2?re="left":J>=kt-mt/2&&(re="right"),zct(re,d,l,z)&&(re="center"),re}function $P(d,l,z){const j=z.yAlign||l.yAlign||Pct(d,z);return{xAlign:z.xAlign||l.xAlign||Ict(d,l,z,j),yAlign:j}}function Oct(d,l){let{x:z,width:j}=d;return l==="right"?z-=j:l==="center"&&(z-=j/2),z}function Dct(d,l,z){let{y:j,height:J}=d;return l==="top"?j+=z:l==="bottom"?j-=J+z:j-=J/2,j}function GP(d,l,z,j){const{caretSize:J,caretPadding:mt,cornerRadius:kt}=d,{xAlign:Dt,yAlign:Gt}=z,re=J+mt,{topLeft:pe,topRight:Ne,bottomLeft:or,bottomRight:_r}=s_(kt);let Fr=Oct(l,Dt);const zr=Dct(l,Gt,re);return Gt==="center"?Dt==="left"?Fr+=re:Dt==="right"&&(Fr-=re):Dt==="left"?Fr-=Math.max(pe,or)+J:Dt==="right"&&(Fr+=Math.max(Ne,_r)+J),{x:Xp(Fr,0,j.width-l.width),y:Xp(zr,0,j.height-l.height)}}function B5(d,l,z){const j=fm(z.padding);return l==="center"?d.x+d.width/2:l==="right"?d.x+d.width-j.right:d.x+j.left}function YP(d){return ng([],Yg(d))}function Fct(d,l,z){return Cy(d,{tooltip:l,tooltipItems:z,type:"tooltip"})}function KP(d,l){const z=l&&l.dataset&&l.dataset.tooltip&&l.dataset.tooltip.callbacks;return z?d.override(z):d}const wD={beforeTitle:$g,title(d){if(d.length>0){const l=d[0],z=l.chart.data.labels,j=z?z.length:0;if(this&&this.options&&this.options.mode==="dataset")return l.dataset.label||"";if(l.label)return l.label;if(j>0&&l.dataIndex"u"?wD[l].call(z,j):J}class XP extends lv{static positioners=p2;constructor(l){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=l.chart,this.options=l.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(l){this.options=l,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const l=this._cachedAnimations;if(l)return l;const z=this.chart,j=this.options.setContext(this.getContext()),J=j.enabled&&z.options.animation&&j.animations,mt=new rD(this.chart,J);return J._cacheable&&(this._cachedAnimations=Object.freeze(mt)),mt}getContext(){return this.$context||(this.$context=Fct(this.chart.getContext(),this,this._tooltipItems))}getTitle(l,z){const{callbacks:j}=z,J=A0(j,"beforeTitle",this,l),mt=A0(j,"title",this,l),kt=A0(j,"afterTitle",this,l);let Dt=[];return Dt=ng(Dt,Yg(J)),Dt=ng(Dt,Yg(mt)),Dt=ng(Dt,Yg(kt)),Dt}getBeforeBody(l,z){return YP(A0(z.callbacks,"beforeBody",this,l))}getBody(l,z){const{callbacks:j}=z,J=[];return Kh(l,mt=>{const kt={before:[],lines:[],after:[]},Dt=KP(j,mt);ng(kt.before,Yg(A0(Dt,"beforeLabel",this,mt))),ng(kt.lines,A0(Dt,"label",this,mt)),ng(kt.after,Yg(A0(Dt,"afterLabel",this,mt))),J.push(kt)}),J}getAfterBody(l,z){return YP(A0(z.callbacks,"afterBody",this,l))}getFooter(l,z){const{callbacks:j}=z,J=A0(j,"beforeFooter",this,l),mt=A0(j,"footer",this,l),kt=A0(j,"afterFooter",this,l);let Dt=[];return Dt=ng(Dt,Yg(J)),Dt=ng(Dt,Yg(mt)),Dt=ng(Dt,Yg(kt)),Dt}_createItems(l){const z=this._active,j=this.chart.data,J=[],mt=[],kt=[];let Dt=[],Gt,re;for(Gt=0,re=z.length;Gtl.filter(pe,Ne,or,j))),l.itemSort&&(Dt=Dt.sort((pe,Ne)=>l.itemSort(pe,Ne,j))),Kh(Dt,pe=>{const Ne=KP(l.callbacks,pe);J.push(A0(Ne,"labelColor",this,pe)),mt.push(A0(Ne,"labelPointStyle",this,pe)),kt.push(A0(Ne,"labelTextColor",this,pe))}),this.labelColors=J,this.labelPointStyles=mt,this.labelTextColors=kt,this.dataPoints=Dt,Dt}update(l,z){const j=this.options.setContext(this.getContext()),J=this._active;let mt,kt=[];if(!J.length)this.opacity!==0&&(mt={opacity:0});else{const Dt=p2[j.position].call(this,J,this._eventPosition);kt=this._createItems(j),this.title=this.getTitle(kt,j),this.beforeBody=this.getBeforeBody(kt,j),this.body=this.getBody(kt,j),this.afterBody=this.getAfterBody(kt,j),this.footer=this.getFooter(kt,j);const Gt=this._size=ZP(this,j),re=Object.assign({},Dt,Gt),pe=$P(this.chart,j,re),Ne=GP(j,re,pe,this.chart);this.xAlign=pe.xAlign,this.yAlign=pe.yAlign,mt={opacity:1,x:Ne.x,y:Ne.y,width:Gt.width,height:Gt.height,caretX:Dt.x,caretY:Dt.y}}this._tooltipItems=kt,this.$context=void 0,mt&&this._resolveAnimations().update(this,mt),l&&j.external&&j.external.call(this,{chart:this.chart,tooltip:this,replay:z})}drawCaret(l,z,j,J){const mt=this.getCaretPosition(l,j,J);z.lineTo(mt.x1,mt.y1),z.lineTo(mt.x2,mt.y2),z.lineTo(mt.x3,mt.y3)}getCaretPosition(l,z,j){const{xAlign:J,yAlign:mt}=this,{caretSize:kt,cornerRadius:Dt}=j,{topLeft:Gt,topRight:re,bottomLeft:pe,bottomRight:Ne}=s_(Dt),{x:or,y:_r}=l,{width:Fr,height:zr}=z;let Wr,An,Ft,kn,ei,jn;return mt==="center"?(ei=_r+zr/2,J==="left"?(Wr=or,An=Wr-kt,kn=ei+kt,jn=ei-kt):(Wr=or+Fr,An=Wr+kt,kn=ei-kt,jn=ei+kt),Ft=Wr):(J==="left"?An=or+Math.max(Gt,pe)+kt:J==="right"?An=or+Fr-Math.max(re,Ne)-kt:An=this.caretX,mt==="top"?(kn=_r,ei=kn-kt,Wr=An-kt,Ft=An+kt):(kn=_r+zr,ei=kn+kt,Wr=An+kt,Ft=An-kt),jn=kn),{x1:Wr,x2:An,x3:Ft,y1:kn,y2:ei,y3:jn}}drawTitle(l,z,j){const J=this.title,mt=J.length;let kt,Dt,Gt;if(mt){const re=l_(j.rtl,this.x,this.width);for(l.x=B5(this,j.titleAlign,j),z.textAlign=re.textAlign(j.titleAlign),z.textBaseline="middle",kt=Jp(j.titleFont),Dt=j.titleSpacing,z.fillStyle=j.titleColor,z.font=kt.string,Gt=0;GtFt!==0)?(l.beginPath(),l.fillStyle=mt.multiKeyBackground,p4(l,{x:zr,y:Fr,w:re,h:Gt,radius:An}),l.fill(),l.stroke(),l.fillStyle=kt.backgroundColor,l.beginPath(),p4(l,{x:Wr,y:Fr+1,w:re-2,h:Gt-2,radius:An}),l.fill()):(l.fillStyle=mt.multiKeyBackground,l.fillRect(zr,Fr,re,Gt),l.strokeRect(zr,Fr,re,Gt),l.fillStyle=kt.backgroundColor,l.fillRect(Wr,Fr+1,re-2,Gt-2))}l.fillStyle=this.labelTextColors[j]}drawBody(l,z,j){const{body:J}=this,{bodySpacing:mt,bodyAlign:kt,displayColors:Dt,boxHeight:Gt,boxWidth:re,boxPadding:pe}=j,Ne=Jp(j.bodyFont);let or=Ne.lineHeight,_r=0;const Fr=l_(j.rtl,this.x,this.width),zr=function(Gi){z.fillText(Gi,Fr.x(l.x+_r),l.y+or/2),l.y+=or+mt},Wr=Fr.textAlign(kt);let An,Ft,kn,ei,jn,ai,Qi;for(z.textAlign=kt,z.textBaseline="middle",z.font=Ne.string,l.x=B5(this,Wr,j),z.fillStyle=j.bodyColor,Kh(this.beforeBody,zr),_r=Dt&&Wr!=="right"?kt==="center"?re/2+pe:re+2+pe:0,ei=0,ai=J.length;ei0&&z.stroke()}_updateAnimationTarget(l){const z=this.chart,j=this.$animations,J=j&&j.x,mt=j&&j.y;if(J||mt){const kt=p2[l.position].call(this,this._active,this._eventPosition);if(!kt)return;const Dt=this._size=ZP(this,l),Gt=Object.assign({},kt,this._size),re=$P(z,l,Gt),pe=GP(l,Gt,re,z);(J._to!==pe.x||mt._to!==pe.y)&&(this.xAlign=re.xAlign,this.yAlign=re.yAlign,this.width=Dt.width,this.height=Dt.height,this.caretX=kt.x,this.caretY=kt.y,this._resolveAnimations().update(this,pe))}}_willRender(){return!!this.opacity}draw(l){const z=this.options.setContext(this.getContext());let j=this.opacity;if(!j)return;this._updateAnimationTarget(z);const J={width:this.width,height:this.height},mt={x:this.x,y:this.y};j=Math.abs(j)<.001?0:j;const kt=fm(z.padding),Dt=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;z.enabled&&Dt&&(l.save(),l.globalAlpha=j,this.drawBackground(mt,l,J,z),KO(l,z.textDirection),mt.y+=kt.top,this.drawTitle(mt,l,z),this.drawBody(mt,l,z),this.drawFooter(mt,l,z),XO(l,z.textDirection),l.restore())}getActiveElements(){return this._active||[]}setActiveElements(l,z){const j=this._active,J=l.map(({datasetIndex:Dt,index:Gt})=>{const re=this.chart.getDatasetMeta(Dt);if(!re)throw new Error("Cannot find a dataset at index "+Dt);return{datasetIndex:Dt,element:re.data[Gt],index:Gt}}),mt=!h4(j,J),kt=this._positionChanged(J,z);(mt||kt)&&(this._active=J,this._eventPosition=z,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(l,z,j=!0){if(z&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const J=this.options,mt=this._active||[],kt=this._getActiveElements(l,mt,z,j),Dt=this._positionChanged(kt,l),Gt=z||!h4(kt,mt)||Dt;return Gt&&(this._active=kt,(J.enabled||J.external)&&(this._eventPosition={x:l.x,y:l.y},this.update(!0,z))),Gt}_getActiveElements(l,z,j,J){const mt=this.options;if(l.type==="mouseout")return[];if(!J)return z.filter(Dt=>this.chart.data.datasets[Dt.datasetIndex]&&this.chart.getDatasetMeta(Dt.datasetIndex).controller.getParsed(Dt.index)!==void 0);const kt=this.chart.getElementsAtEventForMode(l,mt.mode,mt,j);return mt.reverse&&kt.reverse(),kt}_positionChanged(l,z){const{caretX:j,caretY:J,options:mt}=this,kt=p2[mt.position].call(this,l,z);return kt!==!1&&(j!==kt.x||J!==kt.y)}}var Rct={id:"tooltip",_element:XP,positioners:p2,afterInit(d,l,z){z&&(d.tooltip=new XP({chart:d,options:z}))},beforeUpdate(d,l,z){d.tooltip&&d.tooltip.initialize(z)},reset(d,l,z){d.tooltip&&d.tooltip.initialize(z)},afterDraw(d){const l=d.tooltip;if(l&&l._willRender()){const z={tooltip:l};if(d.notifyPlugins("beforeTooltipDraw",{...z,cancelable:!0})===!1)return;l.draw(d.ctx),d.notifyPlugins("afterTooltipDraw",z)}},afterEvent(d,l){if(d.tooltip){const z=l.replay;d.tooltip.handleEvent(l.event,z,l.inChartArea)&&(l.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(d,l)=>l.bodyFont.size,boxWidth:(d,l)=>l.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:wD},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:d=>d!=="filter"&&d!=="itemSort"&&d!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Bct=(d,l,z,j)=>(typeof l=="string"?(z=d.push(l)-1,j.unshift({index:z,label:l})):isNaN(l)&&(z=null),z);function Nct(d,l,z,j){const J=d.indexOf(l);if(J===-1)return Bct(d,l,z,j);const mt=d.lastIndexOf(l);return J!==mt?z:J}const jct=(d,l)=>d===null?null:Xp(Math.round(d),0,l);function JP(d){const l=this.getLabels();return d>=0&&dz.length-1?null:this.getPixelForValue(z[l].value)}getValueForPixel(l){return Math.round(this._startValue+this.getDecimalForPixel(l)*this._valueRange)}getBasePixel(){return this.bottom}}function Vct(d,l){const z=[],{bounds:J,step:mt,min:kt,max:Dt,precision:Gt,count:re,maxTicks:pe,maxDigits:Ne,includeBounds:or}=d,_r=mt||1,Fr=pe-1,{min:zr,max:Wr}=l,An=!Rh(kt),Ft=!Rh(Dt),kn=!Rh(re),ei=(Wr-zr)/(Ne+1);let jn=GL((Wr-zr)/Fr/_r)*_r,ai,Qi,Gi,un;if(jn<1e-14&&!An&&!Ft)return[{value:zr},{value:Wr}];un=Math.ceil(Wr/jn)-Math.floor(zr/jn),un>Fr&&(jn=GL(un*jn/Fr/_r)*_r),Rh(Gt)||(ai=Math.pow(10,Gt),jn=Math.ceil(jn*ai)/ai),J==="ticks"?(Qi=Math.floor(zr/jn)*jn,Gi=Math.ceil(Wr/jn)*jn):(Qi=zr,Gi=Wr),An&&Ft&&mt&&Not((Dt-kt)/mt,jn/1e3)?(un=Math.round(Math.min((Dt-kt)/jn,pe)),jn=(Dt-kt)/un,Qi=kt,Gi=Dt):kn?(Qi=An?kt:Qi,Gi=Ft?Dt:Gi,un=re-1,jn=(Gi-Qi)/un):(un=(Gi-Qi)/jn,A2(un,Math.round(un),jn/1e3)?un=Math.round(un):un=Math.ceil(un));const ia=Math.max(YL(jn),YL(Qi));ai=Math.pow(10,Rh(Gt)?ia:Gt),Qi=Math.round(Qi*ai)/ai,Gi=Math.round(Gi*ai)/ai;let fa=0;for(An&&(or&&Qi!==kt?(z.push({value:kt}),QiDt)break;z.push({value:Li})}return Ft&&or&&Gi!==Dt?z.length&&A2(z[z.length-1].value,Dt,QP(Dt,ei,d))?z[z.length-1].value=Dt:z.push({value:Dt}):(!Ft||Gi===Dt)&&z.push({value:Gi}),z}function QP(d,l,{horizontal:z,minRotation:j}){const J=tv(j),mt=(z?Math.sin(J):Math.cos(J))||.001,kt=.75*l*(""+d).length;return Math.min(l/mt,kt)}class Hct extends __{constructor(l){super(l),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(l,z){return Rh(l)||(typeof l=="number"||l instanceof Number)&&!isFinite(+l)?null:+l}handleTickRangeOptions(){const{beginAtZero:l}=this.options,{minDefined:z,maxDefined:j}=this.getUserBounds();let{min:J,max:mt}=this;const kt=Gt=>J=z?J:Gt,Dt=Gt=>mt=j?mt:Gt;if(l){const Gt=cg(J),re=cg(mt);Gt<0&&re<0?Dt(0):Gt>0&&re>0&&kt(0)}if(J===mt){let Gt=mt===0?1:Math.abs(mt*.05);Dt(mt+Gt),l||kt(J-Gt)}this.min=J,this.max=mt}getTickLimit(){const l=this.options.ticks;let{maxTicksLimit:z,stepSize:j}=l,J;return j?(J=Math.ceil(this.max/j)-Math.floor(this.min/j)+1,J>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${j} would result generating up to ${J} ticks. Limiting to 1000.`),J=1e3)):(J=this.computeTickLimit(),z=z||11),z&&(J=Math.min(z,J)),J}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const l=this.options,z=l.ticks;let j=this.getTickLimit();j=Math.max(2,j);const J={maxTicks:j,bounds:l.bounds,min:l.min,max:l.max,precision:z.precision,step:z.stepSize,count:z.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:z.minRotation||0,includeBounds:z.includeBounds!==!1},mt=this._range||this,kt=Vct(J,mt);return l.bounds==="ticks"&&jot(kt,this,"value"),l.reverse?(kt.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),kt}configure(){const l=this.ticks;let z=this.min,j=this.max;if(super.configure(),this.options.offset&&l.length){const J=(j-z)/Math.max(l.length-1,1)/2;z-=J,j+=J}this._startValue=z,this._endValue=j,this._valueRange=j-z}getLabelForValue(l){return lM(l,this.chart.options.locale,this.options.ticks.format)}}class Wct extends Hct{static id="linear";static defaults={ticks:{callback:VO.formatters.numeric}};determineDataLimits(){const{min:l,max:z}=this.getMinMax(!0);this.min=Qp(l)?l:0,this.max=Qp(z)?z:1,this.handleTickRangeOptions()}computeTickLimit(){const l=this.isHorizontal(),z=l?this.width:this.height,j=tv(this.options.ticks.minRotation),J=(l?Math.sin(j):Math.cos(j))||.001,mt=this._resolveTickFontOptions(0);return Math.ceil(z/Math.min(40,mt.lineHeight/J))}getPixelForValue(l){return l===null?NaN:this.getPixelForDecimal((l-this._startValue)/this._valueRange)}getValueForPixel(l){return this._startValue+this.getDecimalForPixel(l)*this._valueRange}}const G4={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},M0=Object.keys(G4);function tz(d,l){return d-l}function ez(d,l){if(Rh(l))return null;const z=d._adapter,{parser:j,round:J,isoWeekday:mt}=d._parseOpts;let kt=l;return typeof j=="function"&&(kt=j(kt)),Qp(kt)||(kt=typeof j=="string"?z.parse(kt,j):z.parse(kt)),kt===null?null:(J&&(kt=J==="week"&&(V2(mt)||mt===!0)?z.startOf(kt,"isoWeek",mt):z.startOf(kt,J)),+kt)}function rz(d,l,z,j){const J=M0.length;for(let mt=M0.indexOf(d);mt=M0.indexOf(z);mt--){const kt=M0[mt];if(G4[kt].common&&d._adapter.diff(J,j,kt)>=l-1)return kt}return M0[z?M0.indexOf(z):0]}function Zct(d){for(let l=M0.indexOf(d)+1,z=M0.length;l=l?z[j]:z[J];d[mt]=!0}}function $ct(d,l,z,j){const J=d._adapter,mt=+J.startOf(l[0].value,j),kt=l[l.length-1].value;let Dt,Gt;for(Dt=mt;Dt<=kt;Dt=+J.add(Dt,1,j))Gt=z[Dt],Gt>=0&&(l[Gt].major=!0);return l}function iz(d,l,z){const j=[],J={},mt=l.length;let kt,Dt;for(kt=0;kt+l.value))}initOffsets(l=[]){let z=0,j=0,J,mt;this.options.offset&&l.length&&(J=this.getDecimalForValue(l[0]),l.length===1?z=1-J:z=(this.getDecimalForValue(l[1])-J)/2,mt=this.getDecimalForValue(l[l.length-1]),l.length===1?j=mt:j=(mt-this.getDecimalForValue(l[l.length-2]))/2);const kt=l.length<3?.5:.25;z=Xp(z,0,kt),j=Xp(j,0,kt),this._offsets={start:z,end:j,factor:1/(z+1+j)}}_generate(){const l=this._adapter,z=this.min,j=this.max,J=this.options,mt=J.time,kt=mt.unit||rz(mt.minUnit,z,j,this._getLabelCapacity(z)),Dt=cc(J.ticks.stepSize,1),Gt=kt==="week"?mt.isoWeekday:!1,re=V2(Gt)||Gt===!0,pe={};let Ne=z,or,_r;if(re&&(Ne=+l.startOf(Ne,"isoWeek",Gt)),Ne=+l.startOf(Ne,re?"day":kt),l.diff(j,z,kt)>1e5*Dt)throw new Error(z+" and "+j+" are too far apart with stepSize of "+Dt+" "+kt);const Fr=J.ticks.source==="data"&&this.getDataTimestamps();for(or=Ne,_r=0;or+zr)}getLabelForValue(l){const z=this._adapter,j=this.options.time;return j.tooltipFormat?z.format(l,j.tooltipFormat):z.format(l,j.displayFormats.datetime)}format(l,z){const J=this.options.time.displayFormats,mt=this._unit,kt=z||J[mt];return this._adapter.format(l,kt)}_tickFormatFunction(l,z,j,J){const mt=this.options,kt=mt.ticks.callback;if(kt)return Df(kt,[l,z,j],this);const Dt=mt.time.displayFormats,Gt=this._unit,re=this._majorUnit,pe=Gt&&Dt[Gt],Ne=re&&Dt[re],or=j[z],_r=re&&Ne&&or&&or.major;return this._adapter.format(l,J||(_r?Ne:pe))}generateTickLabels(l){let z,j,J;for(z=0,j=l.length;z0?Dt:1}getDataTimestamps(){let l=this._cache.data||[],z,j;if(l.length)return l;const J=this.getMatchingVisibleMetas();if(this._normalized&&J.length)return this._cache.data=J[0].controller.getAllParsedValues(this);for(z=0,j=J.length;z=d[j].pos&&l<=d[J].pos&&({lo:j,hi:J}=yy(d,"pos",l)),{pos:mt,time:Dt}=d[j],{pos:kt,time:Gt}=d[J]):(l>=d[j].time&&l<=d[J].time&&({lo:j,hi:J}=yy(d,"time",l)),{time:mt,pos:Dt}=d[j],{time:kt,pos:Gt}=d[J]);const re=kt-mt;return re?Dt+(Gt-Dt)*(l-mt)/re:Dt}class Dvt extends kA{static id="timeseries";static defaults=kA.defaults;constructor(l){super(l),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const l=this._getTimestampsForTable(),z=this._table=this.buildLookupTable(l);this._minPos=N5(z,this.min),this._tableRange=N5(z,this.max)-this._minPos,super.initOffsets(l)}buildLookupTable(l){const{min:z,max:j}=this,J=[],mt=[];let kt,Dt,Gt,re,pe;for(kt=0,Dt=l.length;kt=z&&re<=j&&J.push(re);if(J.length<2)return[{time:z,pos:0},{time:j,pos:1}];for(kt=0,Dt=J.length;ktJ-mt)}_getTimestampsForTable(){let l=this._cache.all||[];if(l.length)return l;const z=this.getDataTimestamps(),j=this.getLabelTimestamps();return z.length&&j.length?l=this.normalize(z.concat(j)):l=z.length?z:j,l=this._cache.all=l,l}getDecimalForValue(l){return(N5(this._table,l)-this._minPos)/this._tableRange}getValueForPixel(l){const z=this._offsets,j=this.getDecimalForPixel(l)/z.factor-z.end;return N5(this._table,j*this._tableRange+this._minPos,!0)}}const kD=6048e5,Gct=864e5,iw=6e4,aw=36e5,Yct=1e3,az=Symbol.for("constructDateFrom");function bd(d,l){return typeof d=="function"?d(l):d&&typeof d=="object"&&az in d?d[az](l):d instanceof Date?new d.constructor(l):new Date(l)}function Vu(d,l){return bd(l||d,d)}function Y4(d,l,z){const j=Vu(d,z?.in);return isNaN(l)?bd(z?.in||d,NaN):(l&&j.setDate(j.getDate()+l),j)}function gM(d,l,z){const j=Vu(d,z?.in);if(isNaN(l))return bd(d,NaN);if(!l)return j;const J=j.getDate(),mt=bd(d,j.getTime());mt.setMonth(j.getMonth()+l+1,0);const kt=mt.getDate();return J>=kt?mt:(j.setFullYear(mt.getFullYear(),mt.getMonth(),J),j)}function vM(d,l,z){return bd(d,+Vu(d)+l)}function Kct(d,l,z){return vM(d,l*aw)}let Xct={};function Ly(){return Xct}function fg(d,l){const z=Ly(),j=l?.weekStartsOn??l?.locale?.options?.weekStartsOn??z.weekStartsOn??z.locale?.options?.weekStartsOn??0,J=Vu(d,l?.in),mt=J.getDay(),kt=(mt=mt.getTime()?j+1:z.getTime()>=Dt.getTime()?j:j-1}function y4(d){const l=Vu(d),z=new Date(Date.UTC(l.getFullYear(),l.getMonth(),l.getDate(),l.getHours(),l.getMinutes(),l.getSeconds(),l.getMilliseconds()));return z.setUTCFullYear(l.getFullYear()),+d-+z}function Py(d,...l){const z=bd.bind(null,l.find(j=>typeof j=="object"));return l.map(z)}function TA(d,l){const z=Vu(d,l?.in);return z.setHours(0,0,0,0),z}function AD(d,l,z){const[j,J]=Py(z?.in,d,l),mt=TA(j),kt=TA(J),Dt=+mt-y4(mt),Gt=+kt-y4(kt);return Math.round((Dt-Gt)/Gct)}function Jct(d,l){const z=TD(d,l),j=bd(d,0);return j.setFullYear(z,0,4),j.setHours(0,0,0,0),v_(j)}function Qct(d,l,z){const j=Vu(d,z?.in);return j.setTime(j.getTime()+l*iw),j}function tht(d,l,z){return gM(d,l*3,z)}function eht(d,l,z){return vM(d,l*1e3)}function rht(d,l,z){return Y4(d,l*7,z)}function nht(d,l,z){return gM(d,l*12,z)}function E2(d,l){const z=+Vu(d)-+Vu(l);return z<0?-1:z>0?1:z}function iht(d){return d instanceof Date||typeof d=="object"&&Object.prototype.toString.call(d)==="[object Date]"}function MD(d){return!(!iht(d)&&typeof d!="number"||isNaN(+Vu(d)))}function aht(d,l,z){const[j,J]=Py(z?.in,d,l),mt=j.getFullYear()-J.getFullYear(),kt=j.getMonth()-J.getMonth();return mt*12+kt}function oht(d,l,z){const[j,J]=Py(z?.in,d,l);return j.getFullYear()-J.getFullYear()}function SD(d,l,z){const[j,J]=Py(z?.in,d,l),mt=oz(j,J),kt=Math.abs(AD(j,J));j.setDate(j.getDate()-mt*kt);const Dt=+(oz(j,J)===-mt),Gt=mt*(kt-Dt);return Gt===0?0:Gt}function oz(d,l){const z=d.getFullYear()-l.getFullYear()||d.getMonth()-l.getMonth()||d.getDate()-l.getDate()||d.getHours()-l.getHours()||d.getMinutes()-l.getMinutes()||d.getSeconds()-l.getSeconds()||d.getMilliseconds()-l.getMilliseconds();return z<0?-1:z>0?1:z}function ow(d){return l=>{const j=(d?Math[d]:Math.trunc)(l);return j===0?0:j}}function sht(d,l,z){const[j,J]=Py(z?.in,d,l),mt=(+j-+J)/aw;return ow(z?.roundingMethod)(mt)}function yM(d,l){return+Vu(d)-+Vu(l)}function lht(d,l,z){const j=yM(d,l)/iw;return ow(z?.roundingMethod)(j)}function ED(d,l){const z=Vu(d,l?.in);return z.setHours(23,59,59,999),z}function CD(d,l){const z=Vu(d,l?.in),j=z.getMonth();return z.setFullYear(z.getFullYear(),j+1,0),z.setHours(23,59,59,999),z}function uht(d,l){const z=Vu(d,l?.in);return+ED(z,l)==+CD(z,l)}function LD(d,l,z){const[j,J,mt]=Py(z?.in,d,d,l),kt=E2(J,mt),Dt=Math.abs(aht(J,mt));if(Dt<1)return 0;J.getMonth()===1&&J.getDate()>27&&J.setDate(30),J.setMonth(J.getMonth()-kt*Dt);let Gt=E2(J,mt)===-kt;uht(j)&&Dt===1&&E2(j,mt)===1&&(Gt=!1);const re=kt*(Dt-+Gt);return re===0?0:re}function cht(d,l,z){const j=LD(d,l,z)/3;return ow(z?.roundingMethod)(j)}function hht(d,l,z){const j=yM(d,l)/1e3;return ow(z?.roundingMethod)(j)}function fht(d,l,z){const j=SD(d,l,z)/7;return ow(z?.roundingMethod)(j)}function dht(d,l,z){const[j,J]=Py(z?.in,d,l),mt=E2(j,J),kt=Math.abs(oht(j,J));j.setFullYear(1584),J.setFullYear(1584);const Dt=E2(j,J)===-mt,Gt=mt*(kt-+Dt);return Gt===0?0:Gt}function pht(d,l){const z=Vu(d,l?.in),j=z.getMonth(),J=j-j%3;return z.setMonth(J,1),z.setHours(0,0,0,0),z}function mht(d,l){const z=Vu(d,l?.in);return z.setDate(1),z.setHours(0,0,0,0),z}function ght(d,l){const z=Vu(d,l?.in),j=z.getFullYear();return z.setFullYear(j+1,0,0),z.setHours(23,59,59,999),z}function PD(d,l){const z=Vu(d,l?.in);return z.setFullYear(z.getFullYear(),0,1),z.setHours(0,0,0,0),z}function vht(d,l){const z=Vu(d,l?.in);return z.setMinutes(59,59,999),z}function yht(d,l){const z=Ly(),j=z.weekStartsOn??z.locale?.options?.weekStartsOn??0,J=Vu(d,l?.in),mt=J.getDay(),kt=(mt{let j;const J=wht[d];return typeof J=="string"?j=J:l===1?j=J.one:j=J.other.replace("{{count}}",l.toString()),z?.addSuffix?z.comparison&&z.comparison>0?"in "+j:j+" ago":j};function W8(d){return(l={})=>{const z=l.width?String(l.width):d.defaultWidth;return d.formats[z]||d.formats[d.defaultWidth]}}const Tht={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Aht={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Mht={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Sht={date:W8({formats:Tht,defaultWidth:"full"}),time:W8({formats:Aht,defaultWidth:"full"}),dateTime:W8({formats:Mht,defaultWidth:"full"})},Eht={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Cht=(d,l,z,j)=>Eht[d];function o2(d){return(l,z)=>{const j=z?.context?String(z.context):"standalone";let J;if(j==="formatting"&&d.formattingValues){const kt=d.defaultFormattingWidth||d.defaultWidth,Dt=z?.width?String(z.width):kt;J=d.formattingValues[Dt]||d.formattingValues[kt]}else{const kt=d.defaultWidth,Dt=z?.width?String(z.width):d.defaultWidth;J=d.values[Dt]||d.values[kt]}const mt=d.argumentCallback?d.argumentCallback(l):l;return J[mt]}}const Lht={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Pht={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},zht={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Iht={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Oht={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Dht={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Fht=(d,l)=>{const z=Number(d),j=z%100;if(j>20||j<10)switch(j%10){case 1:return z+"st";case 2:return z+"nd";case 3:return z+"rd"}return z+"th"},Rht={ordinalNumber:Fht,era:o2({values:Lht,defaultWidth:"wide"}),quarter:o2({values:Pht,defaultWidth:"wide",argumentCallback:d=>d-1}),month:o2({values:zht,defaultWidth:"wide"}),day:o2({values:Iht,defaultWidth:"wide"}),dayPeriod:o2({values:Oht,defaultWidth:"wide",formattingValues:Dht,defaultFormattingWidth:"wide"})};function s2(d){return(l,z={})=>{const j=z.width,J=j&&d.matchPatterns[j]||d.matchPatterns[d.defaultMatchWidth],mt=l.match(J);if(!mt)return null;const kt=mt[0],Dt=j&&d.parsePatterns[j]||d.parsePatterns[d.defaultParseWidth],Gt=Array.isArray(Dt)?Nht(Dt,Ne=>Ne.test(kt)):Bht(Dt,Ne=>Ne.test(kt));let re;re=d.valueCallback?d.valueCallback(Gt):Gt,re=z.valueCallback?z.valueCallback(re):re;const pe=l.slice(kt.length);return{value:re,rest:pe}}}function Bht(d,l){for(const z in d)if(Object.prototype.hasOwnProperty.call(d,z)&&l(d[z]))return z}function Nht(d,l){for(let z=0;z{const j=l.match(d.matchPattern);if(!j)return null;const J=j[0],mt=l.match(d.parsePattern);if(!mt)return null;let kt=d.valueCallback?d.valueCallback(mt[0]):mt[0];kt=z.valueCallback?z.valueCallback(kt):kt;const Dt=l.slice(J.length);return{value:kt,rest:Dt}}}const Uht=/^(\d+)(th|st|nd|rd)?/i,Vht=/\d+/i,Hht={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Wht={any:[/^b/i,/^(a|c)/i]},qht={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Zht={any:[/1/i,/2/i,/3/i,/4/i]},$ht={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ght={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Yht={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Kht={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Xht={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Jht={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Qht={ordinalNumber:jht({matchPattern:Uht,parsePattern:Vht,valueCallback:d=>parseInt(d,10)}),era:s2({matchPatterns:Hht,defaultMatchWidth:"wide",parsePatterns:Wht,defaultParseWidth:"any"}),quarter:s2({matchPatterns:qht,defaultMatchWidth:"wide",parsePatterns:Zht,defaultParseWidth:"any",valueCallback:d=>d+1}),month:s2({matchPatterns:$ht,defaultMatchWidth:"wide",parsePatterns:Ght,defaultParseWidth:"any"}),day:s2({matchPatterns:Yht,defaultMatchWidth:"wide",parsePatterns:Kht,defaultParseWidth:"any"}),dayPeriod:s2({matchPatterns:Xht,defaultMatchWidth:"any",parsePatterns:Jht,defaultParseWidth:"any"})},zD={code:"en-US",formatDistance:kht,formatLong:Sht,formatRelative:Cht,localize:Rht,match:Qht,options:{weekStartsOn:0,firstWeekContainsDate:1}};function tft(d,l){const z=Vu(d,l?.in);return AD(z,PD(z))+1}function ID(d,l){const z=Vu(d,l?.in),j=+v_(z)-+Jct(z);return Math.round(j/kD)+1}function xM(d,l){const z=Vu(d,l?.in),j=z.getFullYear(),J=Ly(),mt=l?.firstWeekContainsDate??l?.locale?.options?.firstWeekContainsDate??J.firstWeekContainsDate??J.locale?.options?.firstWeekContainsDate??1,kt=bd(l?.in||d,0);kt.setFullYear(j+1,0,mt),kt.setHours(0,0,0,0);const Dt=fg(kt,l),Gt=bd(l?.in||d,0);Gt.setFullYear(j,0,mt),Gt.setHours(0,0,0,0);const re=fg(Gt,l);return+z>=+Dt?j+1:+z>=+re?j:j-1}function eft(d,l){const z=Ly(),j=l?.firstWeekContainsDate??l?.locale?.options?.firstWeekContainsDate??z.firstWeekContainsDate??z.locale?.options?.firstWeekContainsDate??1,J=xM(d,l),mt=bd(l?.in||d,0);return mt.setFullYear(J,0,j),mt.setHours(0,0,0,0),fg(mt,l)}function OD(d,l){const z=Vu(d,l?.in),j=+fg(z,l)-+eft(z,l);return Math.round(j/kD)+1}function Yh(d,l){const z=d<0?"-":"",j=Math.abs(d).toString().padStart(l,"0");return z+j}const t1={y(d,l){const z=d.getFullYear(),j=z>0?z:1-z;return Yh(l==="yy"?j%100:j,l.length)},M(d,l){const z=d.getMonth();return l==="M"?String(z+1):Yh(z+1,2)},d(d,l){return Yh(d.getDate(),l.length)},a(d,l){const z=d.getHours()/12>=1?"pm":"am";switch(l){case"a":case"aa":return z.toUpperCase();case"aaa":return z;case"aaaaa":return z[0];case"aaaa":default:return z==="am"?"a.m.":"p.m."}},h(d,l){return Yh(d.getHours()%12||12,l.length)},H(d,l){return Yh(d.getHours(),l.length)},m(d,l){return Yh(d.getMinutes(),l.length)},s(d,l){return Yh(d.getSeconds(),l.length)},S(d,l){const z=l.length,j=d.getMilliseconds(),J=Math.trunc(j*Math.pow(10,z-3));return Yh(J,l.length)}},Qx={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},sz={G:function(d,l,z){const j=d.getFullYear()>0?1:0;switch(l){case"G":case"GG":case"GGG":return z.era(j,{width:"abbreviated"});case"GGGGG":return z.era(j,{width:"narrow"});case"GGGG":default:return z.era(j,{width:"wide"})}},y:function(d,l,z){if(l==="yo"){const j=d.getFullYear(),J=j>0?j:1-j;return z.ordinalNumber(J,{unit:"year"})}return t1.y(d,l)},Y:function(d,l,z,j){const J=xM(d,j),mt=J>0?J:1-J;if(l==="YY"){const kt=mt%100;return Yh(kt,2)}return l==="Yo"?z.ordinalNumber(mt,{unit:"year"}):Yh(mt,l.length)},R:function(d,l){const z=TD(d);return Yh(z,l.length)},u:function(d,l){const z=d.getFullYear();return Yh(z,l.length)},Q:function(d,l,z){const j=Math.ceil((d.getMonth()+1)/3);switch(l){case"Q":return String(j);case"QQ":return Yh(j,2);case"Qo":return z.ordinalNumber(j,{unit:"quarter"});case"QQQ":return z.quarter(j,{width:"abbreviated",context:"formatting"});case"QQQQQ":return z.quarter(j,{width:"narrow",context:"formatting"});case"QQQQ":default:return z.quarter(j,{width:"wide",context:"formatting"})}},q:function(d,l,z){const j=Math.ceil((d.getMonth()+1)/3);switch(l){case"q":return String(j);case"qq":return Yh(j,2);case"qo":return z.ordinalNumber(j,{unit:"quarter"});case"qqq":return z.quarter(j,{width:"abbreviated",context:"standalone"});case"qqqqq":return z.quarter(j,{width:"narrow",context:"standalone"});case"qqqq":default:return z.quarter(j,{width:"wide",context:"standalone"})}},M:function(d,l,z){const j=d.getMonth();switch(l){case"M":case"MM":return t1.M(d,l);case"Mo":return z.ordinalNumber(j+1,{unit:"month"});case"MMM":return z.month(j,{width:"abbreviated",context:"formatting"});case"MMMMM":return z.month(j,{width:"narrow",context:"formatting"});case"MMMM":default:return z.month(j,{width:"wide",context:"formatting"})}},L:function(d,l,z){const j=d.getMonth();switch(l){case"L":return String(j+1);case"LL":return Yh(j+1,2);case"Lo":return z.ordinalNumber(j+1,{unit:"month"});case"LLL":return z.month(j,{width:"abbreviated",context:"standalone"});case"LLLLL":return z.month(j,{width:"narrow",context:"standalone"});case"LLLL":default:return z.month(j,{width:"wide",context:"standalone"})}},w:function(d,l,z,j){const J=OD(d,j);return l==="wo"?z.ordinalNumber(J,{unit:"week"}):Yh(J,l.length)},I:function(d,l,z){const j=ID(d);return l==="Io"?z.ordinalNumber(j,{unit:"week"}):Yh(j,l.length)},d:function(d,l,z){return l==="do"?z.ordinalNumber(d.getDate(),{unit:"date"}):t1.d(d,l)},D:function(d,l,z){const j=tft(d);return l==="Do"?z.ordinalNumber(j,{unit:"dayOfYear"}):Yh(j,l.length)},E:function(d,l,z){const j=d.getDay();switch(l){case"E":case"EE":case"EEE":return z.day(j,{width:"abbreviated",context:"formatting"});case"EEEEE":return z.day(j,{width:"narrow",context:"formatting"});case"EEEEEE":return z.day(j,{width:"short",context:"formatting"});case"EEEE":default:return z.day(j,{width:"wide",context:"formatting"})}},e:function(d,l,z,j){const J=d.getDay(),mt=(J-j.weekStartsOn+8)%7||7;switch(l){case"e":return String(mt);case"ee":return Yh(mt,2);case"eo":return z.ordinalNumber(mt,{unit:"day"});case"eee":return z.day(J,{width:"abbreviated",context:"formatting"});case"eeeee":return z.day(J,{width:"narrow",context:"formatting"});case"eeeeee":return z.day(J,{width:"short",context:"formatting"});case"eeee":default:return z.day(J,{width:"wide",context:"formatting"})}},c:function(d,l,z,j){const J=d.getDay(),mt=(J-j.weekStartsOn+8)%7||7;switch(l){case"c":return String(mt);case"cc":return Yh(mt,l.length);case"co":return z.ordinalNumber(mt,{unit:"day"});case"ccc":return z.day(J,{width:"abbreviated",context:"standalone"});case"ccccc":return z.day(J,{width:"narrow",context:"standalone"});case"cccccc":return z.day(J,{width:"short",context:"standalone"});case"cccc":default:return z.day(J,{width:"wide",context:"standalone"})}},i:function(d,l,z){const j=d.getDay(),J=j===0?7:j;switch(l){case"i":return String(J);case"ii":return Yh(J,l.length);case"io":return z.ordinalNumber(J,{unit:"day"});case"iii":return z.day(j,{width:"abbreviated",context:"formatting"});case"iiiii":return z.day(j,{width:"narrow",context:"formatting"});case"iiiiii":return z.day(j,{width:"short",context:"formatting"});case"iiii":default:return z.day(j,{width:"wide",context:"formatting"})}},a:function(d,l,z){const J=d.getHours()/12>=1?"pm":"am";switch(l){case"a":case"aa":return z.dayPeriod(J,{width:"abbreviated",context:"formatting"});case"aaa":return z.dayPeriod(J,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return z.dayPeriod(J,{width:"narrow",context:"formatting"});case"aaaa":default:return z.dayPeriod(J,{width:"wide",context:"formatting"})}},b:function(d,l,z){const j=d.getHours();let J;switch(j===12?J=Qx.noon:j===0?J=Qx.midnight:J=j/12>=1?"pm":"am",l){case"b":case"bb":return z.dayPeriod(J,{width:"abbreviated",context:"formatting"});case"bbb":return z.dayPeriod(J,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return z.dayPeriod(J,{width:"narrow",context:"formatting"});case"bbbb":default:return z.dayPeriod(J,{width:"wide",context:"formatting"})}},B:function(d,l,z){const j=d.getHours();let J;switch(j>=17?J=Qx.evening:j>=12?J=Qx.afternoon:j>=4?J=Qx.morning:J=Qx.night,l){case"B":case"BB":case"BBB":return z.dayPeriod(J,{width:"abbreviated",context:"formatting"});case"BBBBB":return z.dayPeriod(J,{width:"narrow",context:"formatting"});case"BBBB":default:return z.dayPeriod(J,{width:"wide",context:"formatting"})}},h:function(d,l,z){if(l==="ho"){let j=d.getHours()%12;return j===0&&(j=12),z.ordinalNumber(j,{unit:"hour"})}return t1.h(d,l)},H:function(d,l,z){return l==="Ho"?z.ordinalNumber(d.getHours(),{unit:"hour"}):t1.H(d,l)},K:function(d,l,z){const j=d.getHours()%12;return l==="Ko"?z.ordinalNumber(j,{unit:"hour"}):Yh(j,l.length)},k:function(d,l,z){let j=d.getHours();return j===0&&(j=24),l==="ko"?z.ordinalNumber(j,{unit:"hour"}):Yh(j,l.length)},m:function(d,l,z){return l==="mo"?z.ordinalNumber(d.getMinutes(),{unit:"minute"}):t1.m(d,l)},s:function(d,l,z){return l==="so"?z.ordinalNumber(d.getSeconds(),{unit:"second"}):t1.s(d,l)},S:function(d,l){return t1.S(d,l)},X:function(d,l,z){const j=d.getTimezoneOffset();if(j===0)return"Z";switch(l){case"X":return uz(j);case"XXXX":case"XX":return dy(j);case"XXXXX":case"XXX":default:return dy(j,":")}},x:function(d,l,z){const j=d.getTimezoneOffset();switch(l){case"x":return uz(j);case"xxxx":case"xx":return dy(j);case"xxxxx":case"xxx":default:return dy(j,":")}},O:function(d,l,z){const j=d.getTimezoneOffset();switch(l){case"O":case"OO":case"OOO":return"GMT"+lz(j,":");case"OOOO":default:return"GMT"+dy(j,":")}},z:function(d,l,z){const j=d.getTimezoneOffset();switch(l){case"z":case"zz":case"zzz":return"GMT"+lz(j,":");case"zzzz":default:return"GMT"+dy(j,":")}},t:function(d,l,z){const j=Math.trunc(+d/1e3);return Yh(j,l.length)},T:function(d,l,z){return Yh(+d,l.length)}};function lz(d,l=""){const z=d>0?"-":"+",j=Math.abs(d),J=Math.trunc(j/60),mt=j%60;return mt===0?z+String(J):z+String(J)+l+Yh(mt,2)}function uz(d,l){return d%60===0?(d>0?"-":"+")+Yh(Math.abs(d)/60,2):dy(d,l)}function dy(d,l=""){const z=d>0?"-":"+",j=Math.abs(d),J=Yh(Math.trunc(j/60),2),mt=Yh(j%60,2);return z+J+l+mt}const cz=(d,l)=>{switch(d){case"P":return l.date({width:"short"});case"PP":return l.date({width:"medium"});case"PPP":return l.date({width:"long"});case"PPPP":default:return l.date({width:"full"})}},DD=(d,l)=>{switch(d){case"p":return l.time({width:"short"});case"pp":return l.time({width:"medium"});case"ppp":return l.time({width:"long"});case"pppp":default:return l.time({width:"full"})}},rft=(d,l)=>{const z=d.match(/(P+)(p+)?/)||[],j=z[1],J=z[2];if(!J)return cz(d,l);let mt;switch(j){case"P":mt=l.dateTime({width:"short"});break;case"PP":mt=l.dateTime({width:"medium"});break;case"PPP":mt=l.dateTime({width:"long"});break;case"PPPP":default:mt=l.dateTime({width:"full"});break}return mt.replace("{{date}}",cz(j,l)).replace("{{time}}",DD(J,l))},AA={p:DD,P:rft},nft=/^D+$/,ift=/^Y+$/,aft=["D","DD","YY","YYYY"];function FD(d){return nft.test(d)}function RD(d){return ift.test(d)}function MA(d,l,z){const j=oft(d,l,z);if(console.warn(j),aft.includes(d))throw new RangeError(j)}function oft(d,l,z){const j=d[0]==="Y"?"years":"days of the month";return`Use \`${d.toLowerCase()}\` instead of \`${d}\` (in \`${l}\`) for formatting ${j} to the input \`${z}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const sft=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,lft=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,uft=/^'([^]*?)'?$/,cft=/''/g,hft=/[a-zA-Z]/;function fft(d,l,z){const j=Ly(),J=z?.locale??j.locale??zD,mt=z?.firstWeekContainsDate??z?.locale?.options?.firstWeekContainsDate??j.firstWeekContainsDate??j.locale?.options?.firstWeekContainsDate??1,kt=z?.weekStartsOn??z?.locale?.options?.weekStartsOn??j.weekStartsOn??j.locale?.options?.weekStartsOn??0,Dt=Vu(d,z?.in);if(!MD(Dt))throw new RangeError("Invalid time value");let Gt=l.match(lft).map(pe=>{const Ne=pe[0];if(Ne==="p"||Ne==="P"){const or=AA[Ne];return or(pe,J.formatLong)}return pe}).join("").match(sft).map(pe=>{if(pe==="''")return{isToken:!1,value:"'"};const Ne=pe[0];if(Ne==="'")return{isToken:!1,value:dft(pe)};if(sz[Ne])return{isToken:!0,value:pe};if(Ne.match(hft))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Ne+"`");return{isToken:!1,value:pe}});J.localize.preprocessor&&(Gt=J.localize.preprocessor(Dt,Gt));const re={firstWeekContainsDate:mt,weekStartsOn:kt,locale:J};return Gt.map(pe=>{if(!pe.isToken)return pe.value;const Ne=pe.value;(!z?.useAdditionalWeekYearTokens&&RD(Ne)||!z?.useAdditionalDayOfYearTokens&&FD(Ne))&&MA(Ne,l,String(d));const or=sz[Ne[0]];return or(Dt,Ne,J.localize,re)}).join("")}function dft(d){const l=d.match(uft);return l?l[1].replace(cft,"'"):d}function pft(){return Object.assign({},Ly())}function mft(d,l){const z=Vu(d,l?.in).getDay();return z===0?7:z}function gft(d,l){const z=vft(l)?new l(0):bd(l,0);return z.setFullYear(d.getFullYear(),d.getMonth(),d.getDate()),z.setHours(d.getHours(),d.getMinutes(),d.getSeconds(),d.getMilliseconds()),z}function vft(d){return typeof d=="function"&&d.prototype?.constructor===d}const yft=10;class BD{subPriority=0;validate(l,z){return!0}}class xft extends BD{constructor(l,z,j,J,mt){super(),this.value=l,this.validateValue=z,this.setValue=j,this.priority=J,mt&&(this.subPriority=mt)}validate(l,z){return this.validateValue(l,this.value,z)}set(l,z,j){return this.setValue(l,z,this.value,j)}}class _ft extends BD{priority=yft;subPriority=-1;constructor(l,z){super(),this.context=l||(j=>bd(z,j))}set(l,z){return z.timestampIsSet?l:bd(l,gft(l,this.context))}}class Ah{run(l,z,j,J){const mt=this.parse(l,z,j,J);return mt?{setter:new xft(mt.value,this.validate,this.set,this.priority,this.subPriority),rest:mt.rest}:null}validate(l,z,j){return!0}}class bft extends Ah{priority=140;parse(l,z,j){switch(z){case"G":case"GG":case"GGG":return j.era(l,{width:"abbreviated"})||j.era(l,{width:"narrow"});case"GGGGG":return j.era(l,{width:"narrow"});case"GGGG":default:return j.era(l,{width:"wide"})||j.era(l,{width:"abbreviated"})||j.era(l,{width:"narrow"})}}set(l,z,j){return z.era=j,l.setFullYear(j,0,1),l.setHours(0,0,0,0),l}incompatibleTokens=["R","u","t","T"]}const Nd={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},sg={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function jd(d,l){return d&&{value:l(d.value),rest:d.rest}}function ad(d,l){const z=l.match(d);return z?{value:parseInt(z[0],10),rest:l.slice(z[0].length)}:null}function lg(d,l){const z=l.match(d);if(!z)return null;if(z[0]==="Z")return{value:0,rest:l.slice(1)};const j=z[1]==="+"?1:-1,J=z[2]?parseInt(z[2],10):0,mt=z[3]?parseInt(z[3],10):0,kt=z[5]?parseInt(z[5],10):0;return{value:j*(J*aw+mt*iw+kt*Yct),rest:l.slice(z[0].length)}}function ND(d){return ad(Nd.anyDigitsSigned,d)}function wd(d,l){switch(d){case 1:return ad(Nd.singleDigit,l);case 2:return ad(Nd.twoDigits,l);case 3:return ad(Nd.threeDigits,l);case 4:return ad(Nd.fourDigits,l);default:return ad(new RegExp("^\\d{1,"+d+"}"),l)}}function x4(d,l){switch(d){case 1:return ad(Nd.singleDigitSigned,l);case 2:return ad(Nd.twoDigitsSigned,l);case 3:return ad(Nd.threeDigitsSigned,l);case 4:return ad(Nd.fourDigitsSigned,l);default:return ad(new RegExp("^-?\\d{1,"+d+"}"),l)}}function _M(d){switch(d){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function jD(d,l){const z=l>0,j=z?l:1-l;let J;if(j<=50)J=d||100;else{const mt=j+50,kt=Math.trunc(mt/100)*100,Dt=d>=mt%100;J=d+kt-(Dt?100:0)}return z?J:1-J}function UD(d){return d%400===0||d%4===0&&d%100!==0}class wft extends Ah{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(l,z,j){const J=mt=>({year:mt,isTwoDigitYear:z==="yy"});switch(z){case"y":return jd(wd(4,l),J);case"yo":return jd(j.ordinalNumber(l,{unit:"year"}),J);default:return jd(wd(z.length,l),J)}}validate(l,z){return z.isTwoDigitYear||z.year>0}set(l,z,j){const J=l.getFullYear();if(j.isTwoDigitYear){const kt=jD(j.year,J);return l.setFullYear(kt,0,1),l.setHours(0,0,0,0),l}const mt=!("era"in z)||z.era===1?j.year:1-j.year;return l.setFullYear(mt,0,1),l.setHours(0,0,0,0),l}}class kft extends Ah{priority=130;parse(l,z,j){const J=mt=>({year:mt,isTwoDigitYear:z==="YY"});switch(z){case"Y":return jd(wd(4,l),J);case"Yo":return jd(j.ordinalNumber(l,{unit:"year"}),J);default:return jd(wd(z.length,l),J)}}validate(l,z){return z.isTwoDigitYear||z.year>0}set(l,z,j,J){const mt=xM(l,J);if(j.isTwoDigitYear){const Dt=jD(j.year,mt);return l.setFullYear(Dt,0,J.firstWeekContainsDate),l.setHours(0,0,0,0),fg(l,J)}const kt=!("era"in z)||z.era===1?j.year:1-j.year;return l.setFullYear(kt,0,J.firstWeekContainsDate),l.setHours(0,0,0,0),fg(l,J)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class Tft extends Ah{priority=130;parse(l,z){return x4(z==="R"?4:z.length,l)}set(l,z,j){const J=bd(l,0);return J.setFullYear(j,0,4),J.setHours(0,0,0,0),v_(J)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Aft extends Ah{priority=130;parse(l,z){return x4(z==="u"?4:z.length,l)}set(l,z,j){return l.setFullYear(j,0,1),l.setHours(0,0,0,0),l}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class Mft extends Ah{priority=120;parse(l,z,j){switch(z){case"Q":case"QQ":return wd(z.length,l);case"Qo":return j.ordinalNumber(l,{unit:"quarter"});case"QQQ":return j.quarter(l,{width:"abbreviated",context:"formatting"})||j.quarter(l,{width:"narrow",context:"formatting"});case"QQQQQ":return j.quarter(l,{width:"narrow",context:"formatting"});case"QQQQ":default:return j.quarter(l,{width:"wide",context:"formatting"})||j.quarter(l,{width:"abbreviated",context:"formatting"})||j.quarter(l,{width:"narrow",context:"formatting"})}}validate(l,z){return z>=1&&z<=4}set(l,z,j){return l.setMonth((j-1)*3,1),l.setHours(0,0,0,0),l}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class Sft extends Ah{priority=120;parse(l,z,j){switch(z){case"q":case"qq":return wd(z.length,l);case"qo":return j.ordinalNumber(l,{unit:"quarter"});case"qqq":return j.quarter(l,{width:"abbreviated",context:"standalone"})||j.quarter(l,{width:"narrow",context:"standalone"});case"qqqqq":return j.quarter(l,{width:"narrow",context:"standalone"});case"qqqq":default:return j.quarter(l,{width:"wide",context:"standalone"})||j.quarter(l,{width:"abbreviated",context:"standalone"})||j.quarter(l,{width:"narrow",context:"standalone"})}}validate(l,z){return z>=1&&z<=4}set(l,z,j){return l.setMonth((j-1)*3,1),l.setHours(0,0,0,0),l}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class Eft extends Ah{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(l,z,j){const J=mt=>mt-1;switch(z){case"M":return jd(ad(Nd.month,l),J);case"MM":return jd(wd(2,l),J);case"Mo":return jd(j.ordinalNumber(l,{unit:"month"}),J);case"MMM":return j.month(l,{width:"abbreviated",context:"formatting"})||j.month(l,{width:"narrow",context:"formatting"});case"MMMMM":return j.month(l,{width:"narrow",context:"formatting"});case"MMMM":default:return j.month(l,{width:"wide",context:"formatting"})||j.month(l,{width:"abbreviated",context:"formatting"})||j.month(l,{width:"narrow",context:"formatting"})}}validate(l,z){return z>=0&&z<=11}set(l,z,j){return l.setMonth(j,1),l.setHours(0,0,0,0),l}}class Cft extends Ah{priority=110;parse(l,z,j){const J=mt=>mt-1;switch(z){case"L":return jd(ad(Nd.month,l),J);case"LL":return jd(wd(2,l),J);case"Lo":return jd(j.ordinalNumber(l,{unit:"month"}),J);case"LLL":return j.month(l,{width:"abbreviated",context:"standalone"})||j.month(l,{width:"narrow",context:"standalone"});case"LLLLL":return j.month(l,{width:"narrow",context:"standalone"});case"LLLL":default:return j.month(l,{width:"wide",context:"standalone"})||j.month(l,{width:"abbreviated",context:"standalone"})||j.month(l,{width:"narrow",context:"standalone"})}}validate(l,z){return z>=0&&z<=11}set(l,z,j){return l.setMonth(j,1),l.setHours(0,0,0,0),l}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function Lft(d,l,z){const j=Vu(d,z?.in),J=OD(j,z)-l;return j.setDate(j.getDate()-J*7),Vu(j,z?.in)}class Pft extends Ah{priority=100;parse(l,z,j){switch(z){case"w":return ad(Nd.week,l);case"wo":return j.ordinalNumber(l,{unit:"week"});default:return wd(z.length,l)}}validate(l,z){return z>=1&&z<=53}set(l,z,j,J){return fg(Lft(l,j,J),J)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function zft(d,l,z){const j=Vu(d,z?.in),J=ID(j,z)-l;return j.setDate(j.getDate()-J*7),j}class Ift extends Ah{priority=100;parse(l,z,j){switch(z){case"I":return ad(Nd.week,l);case"Io":return j.ordinalNumber(l,{unit:"week"});default:return wd(z.length,l)}}validate(l,z){return z>=1&&z<=53}set(l,z,j){return v_(zft(l,j))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Oft=[31,28,31,30,31,30,31,31,30,31,30,31],Dft=[31,29,31,30,31,30,31,31,30,31,30,31];class Fft extends Ah{priority=90;subPriority=1;parse(l,z,j){switch(z){case"d":return ad(Nd.date,l);case"do":return j.ordinalNumber(l,{unit:"date"});default:return wd(z.length,l)}}validate(l,z){const j=l.getFullYear(),J=UD(j),mt=l.getMonth();return J?z>=1&&z<=Dft[mt]:z>=1&&z<=Oft[mt]}set(l,z,j){return l.setDate(j),l.setHours(0,0,0,0),l}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class Rft extends Ah{priority=90;subpriority=1;parse(l,z,j){switch(z){case"D":case"DD":return ad(Nd.dayOfYear,l);case"Do":return j.ordinalNumber(l,{unit:"date"});default:return wd(z.length,l)}}validate(l,z){const j=l.getFullYear();return UD(j)?z>=1&&z<=366:z>=1&&z<=365}set(l,z,j){return l.setMonth(0,j),l.setHours(0,0,0,0),l}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function bM(d,l,z){const j=Ly(),J=z?.weekStartsOn??z?.locale?.options?.weekStartsOn??j.weekStartsOn??j.locale?.options?.weekStartsOn??0,mt=Vu(d,z?.in),kt=mt.getDay(),Gt=(l%7+7)%7,re=7-J,pe=l<0||l>6?l-(kt+re)%7:(Gt+re)%7-(kt+re)%7;return Y4(mt,pe,z)}class Bft extends Ah{priority=90;parse(l,z,j){switch(z){case"E":case"EE":case"EEE":return j.day(l,{width:"abbreviated",context:"formatting"})||j.day(l,{width:"short",context:"formatting"})||j.day(l,{width:"narrow",context:"formatting"});case"EEEEE":return j.day(l,{width:"narrow",context:"formatting"});case"EEEEEE":return j.day(l,{width:"short",context:"formatting"})||j.day(l,{width:"narrow",context:"formatting"});case"EEEE":default:return j.day(l,{width:"wide",context:"formatting"})||j.day(l,{width:"abbreviated",context:"formatting"})||j.day(l,{width:"short",context:"formatting"})||j.day(l,{width:"narrow",context:"formatting"})}}validate(l,z){return z>=0&&z<=6}set(l,z,j,J){return l=bM(l,j,J),l.setHours(0,0,0,0),l}incompatibleTokens=["D","i","e","c","t","T"]}class Nft extends Ah{priority=90;parse(l,z,j,J){const mt=kt=>{const Dt=Math.floor((kt-1)/7)*7;return(kt+J.weekStartsOn+6)%7+Dt};switch(z){case"e":case"ee":return jd(wd(z.length,l),mt);case"eo":return jd(j.ordinalNumber(l,{unit:"day"}),mt);case"eee":return j.day(l,{width:"abbreviated",context:"formatting"})||j.day(l,{width:"short",context:"formatting"})||j.day(l,{width:"narrow",context:"formatting"});case"eeeee":return j.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return j.day(l,{width:"short",context:"formatting"})||j.day(l,{width:"narrow",context:"formatting"});case"eeee":default:return j.day(l,{width:"wide",context:"formatting"})||j.day(l,{width:"abbreviated",context:"formatting"})||j.day(l,{width:"short",context:"formatting"})||j.day(l,{width:"narrow",context:"formatting"})}}validate(l,z){return z>=0&&z<=6}set(l,z,j,J){return l=bM(l,j,J),l.setHours(0,0,0,0),l}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class jft extends Ah{priority=90;parse(l,z,j,J){const mt=kt=>{const Dt=Math.floor((kt-1)/7)*7;return(kt+J.weekStartsOn+6)%7+Dt};switch(z){case"c":case"cc":return jd(wd(z.length,l),mt);case"co":return jd(j.ordinalNumber(l,{unit:"day"}),mt);case"ccc":return j.day(l,{width:"abbreviated",context:"standalone"})||j.day(l,{width:"short",context:"standalone"})||j.day(l,{width:"narrow",context:"standalone"});case"ccccc":return j.day(l,{width:"narrow",context:"standalone"});case"cccccc":return j.day(l,{width:"short",context:"standalone"})||j.day(l,{width:"narrow",context:"standalone"});case"cccc":default:return j.day(l,{width:"wide",context:"standalone"})||j.day(l,{width:"abbreviated",context:"standalone"})||j.day(l,{width:"short",context:"standalone"})||j.day(l,{width:"narrow",context:"standalone"})}}validate(l,z){return z>=0&&z<=6}set(l,z,j,J){return l=bM(l,j,J),l.setHours(0,0,0,0),l}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function Uft(d,l,z){const j=Vu(d,z?.in),J=mft(j,z),mt=l-J;return Y4(j,mt,z)}class Vft extends Ah{priority=90;parse(l,z,j){const J=mt=>mt===0?7:mt;switch(z){case"i":case"ii":return wd(z.length,l);case"io":return j.ordinalNumber(l,{unit:"day"});case"iii":return jd(j.day(l,{width:"abbreviated",context:"formatting"})||j.day(l,{width:"short",context:"formatting"})||j.day(l,{width:"narrow",context:"formatting"}),J);case"iiiii":return jd(j.day(l,{width:"narrow",context:"formatting"}),J);case"iiiiii":return jd(j.day(l,{width:"short",context:"formatting"})||j.day(l,{width:"narrow",context:"formatting"}),J);case"iiii":default:return jd(j.day(l,{width:"wide",context:"formatting"})||j.day(l,{width:"abbreviated",context:"formatting"})||j.day(l,{width:"short",context:"formatting"})||j.day(l,{width:"narrow",context:"formatting"}),J)}}validate(l,z){return z>=1&&z<=7}set(l,z,j){return l=Uft(l,j),l.setHours(0,0,0,0),l}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class Hft extends Ah{priority=80;parse(l,z,j){switch(z){case"a":case"aa":case"aaa":return j.dayPeriod(l,{width:"abbreviated",context:"formatting"})||j.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaaa":return j.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return j.dayPeriod(l,{width:"wide",context:"formatting"})||j.dayPeriod(l,{width:"abbreviated",context:"formatting"})||j.dayPeriod(l,{width:"narrow",context:"formatting"})}}set(l,z,j){return l.setHours(_M(j),0,0,0),l}incompatibleTokens=["b","B","H","k","t","T"]}class Wft extends Ah{priority=80;parse(l,z,j){switch(z){case"b":case"bb":case"bbb":return j.dayPeriod(l,{width:"abbreviated",context:"formatting"})||j.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbbb":return j.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return j.dayPeriod(l,{width:"wide",context:"formatting"})||j.dayPeriod(l,{width:"abbreviated",context:"formatting"})||j.dayPeriod(l,{width:"narrow",context:"formatting"})}}set(l,z,j){return l.setHours(_M(j),0,0,0),l}incompatibleTokens=["a","B","H","k","t","T"]}class qft extends Ah{priority=80;parse(l,z,j){switch(z){case"B":case"BB":case"BBB":return j.dayPeriod(l,{width:"abbreviated",context:"formatting"})||j.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBBB":return j.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return j.dayPeriod(l,{width:"wide",context:"formatting"})||j.dayPeriod(l,{width:"abbreviated",context:"formatting"})||j.dayPeriod(l,{width:"narrow",context:"formatting"})}}set(l,z,j){return l.setHours(_M(j),0,0,0),l}incompatibleTokens=["a","b","t","T"]}class Zft extends Ah{priority=70;parse(l,z,j){switch(z){case"h":return ad(Nd.hour12h,l);case"ho":return j.ordinalNumber(l,{unit:"hour"});default:return wd(z.length,l)}}validate(l,z){return z>=1&&z<=12}set(l,z,j){const J=l.getHours()>=12;return J&&j<12?l.setHours(j+12,0,0,0):!J&&j===12?l.setHours(0,0,0,0):l.setHours(j,0,0,0),l}incompatibleTokens=["H","K","k","t","T"]}class $ft extends Ah{priority=70;parse(l,z,j){switch(z){case"H":return ad(Nd.hour23h,l);case"Ho":return j.ordinalNumber(l,{unit:"hour"});default:return wd(z.length,l)}}validate(l,z){return z>=0&&z<=23}set(l,z,j){return l.setHours(j,0,0,0),l}incompatibleTokens=["a","b","h","K","k","t","T"]}class Gft extends Ah{priority=70;parse(l,z,j){switch(z){case"K":return ad(Nd.hour11h,l);case"Ko":return j.ordinalNumber(l,{unit:"hour"});default:return wd(z.length,l)}}validate(l,z){return z>=0&&z<=11}set(l,z,j){return l.getHours()>=12&&j<12?l.setHours(j+12,0,0,0):l.setHours(j,0,0,0),l}incompatibleTokens=["h","H","k","t","T"]}class Yft extends Ah{priority=70;parse(l,z,j){switch(z){case"k":return ad(Nd.hour24h,l);case"ko":return j.ordinalNumber(l,{unit:"hour"});default:return wd(z.length,l)}}validate(l,z){return z>=1&&z<=24}set(l,z,j){const J=j<=24?j%24:j;return l.setHours(J,0,0,0),l}incompatibleTokens=["a","b","h","H","K","t","T"]}class Kft extends Ah{priority=60;parse(l,z,j){switch(z){case"m":return ad(Nd.minute,l);case"mo":return j.ordinalNumber(l,{unit:"minute"});default:return wd(z.length,l)}}validate(l,z){return z>=0&&z<=59}set(l,z,j){return l.setMinutes(j,0,0),l}incompatibleTokens=["t","T"]}class Xft extends Ah{priority=50;parse(l,z,j){switch(z){case"s":return ad(Nd.second,l);case"so":return j.ordinalNumber(l,{unit:"second"});default:return wd(z.length,l)}}validate(l,z){return z>=0&&z<=59}set(l,z,j){return l.setSeconds(j,0),l}incompatibleTokens=["t","T"]}class Jft extends Ah{priority=30;parse(l,z){const j=J=>Math.trunc(J*Math.pow(10,-z.length+3));return jd(wd(z.length,l),j)}set(l,z,j){return l.setMilliseconds(j),l}incompatibleTokens=["t","T"]}class Qft extends Ah{priority=10;parse(l,z){switch(z){case"X":return lg(sg.basicOptionalMinutes,l);case"XX":return lg(sg.basic,l);case"XXXX":return lg(sg.basicOptionalSeconds,l);case"XXXXX":return lg(sg.extendedOptionalSeconds,l);case"XXX":default:return lg(sg.extended,l)}}set(l,z,j){return z.timestampIsSet?l:bd(l,l.getTime()-y4(l)-j)}incompatibleTokens=["t","T","x"]}class tdt extends Ah{priority=10;parse(l,z){switch(z){case"x":return lg(sg.basicOptionalMinutes,l);case"xx":return lg(sg.basic,l);case"xxxx":return lg(sg.basicOptionalSeconds,l);case"xxxxx":return lg(sg.extendedOptionalSeconds,l);case"xxx":default:return lg(sg.extended,l)}}set(l,z,j){return z.timestampIsSet?l:bd(l,l.getTime()-y4(l)-j)}incompatibleTokens=["t","T","X"]}class edt extends Ah{priority=40;parse(l){return ND(l)}set(l,z,j){return[bd(l,j*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class rdt extends Ah{priority=20;parse(l){return ND(l)}set(l,z,j){return[bd(l,j),{timestampIsSet:!0}]}incompatibleTokens="*"}const ndt={G:new bft,y:new wft,Y:new kft,R:new Tft,u:new Aft,Q:new Mft,q:new Sft,M:new Eft,L:new Cft,w:new Pft,I:new Ift,d:new Fft,D:new Rft,E:new Bft,e:new Nft,c:new jft,i:new Vft,a:new Hft,b:new Wft,B:new qft,h:new Zft,H:new $ft,K:new Gft,k:new Yft,m:new Kft,s:new Xft,S:new Jft,X:new Qft,x:new tdt,t:new edt,T:new rdt},idt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,adt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,odt=/^'([^]*?)'?$/,sdt=/''/g,ldt=/\S/,udt=/[a-zA-Z]/;function cdt(d,l,z,j){const J=()=>bd(j?.in||z,NaN),mt=pft(),kt=j?.locale??mt.locale??zD,Dt=j?.firstWeekContainsDate??j?.locale?.options?.firstWeekContainsDate??mt.firstWeekContainsDate??mt.locale?.options?.firstWeekContainsDate??1,Gt=j?.weekStartsOn??j?.locale?.options?.weekStartsOn??mt.weekStartsOn??mt.locale?.options?.weekStartsOn??0;if(!l)return d?J():Vu(z,j?.in);const re={firstWeekContainsDate:Dt,weekStartsOn:Gt,locale:kt},pe=[new _ft(j?.in,z)],Ne=l.match(adt).map(Wr=>{const An=Wr[0];if(An in AA){const Ft=AA[An];return Ft(Wr,kt.formatLong)}return Wr}).join("").match(idt),or=[];for(let Wr of Ne){!j?.useAdditionalWeekYearTokens&&RD(Wr)&&MA(Wr,l,d),!j?.useAdditionalDayOfYearTokens&&FD(Wr)&&MA(Wr,l,d);const An=Wr[0],Ft=ndt[An];if(Ft){const{incompatibleTokens:kn}=Ft;if(Array.isArray(kn)){const jn=or.find(ai=>kn.includes(ai.token)||ai.token===An);if(jn)throw new RangeError(`The format string mustn't contain \`${jn.fullToken}\` and \`${Wr}\` at the same time`)}else if(Ft.incompatibleTokens==="*"&&or.length>0)throw new RangeError(`The format string mustn't contain \`${Wr}\` and any other token at the same time`);or.push({token:An,fullToken:Wr});const ei=Ft.run(d,Wr,kt.match,re);if(!ei)return J();pe.push(ei.setter),d=ei.rest}else{if(An.match(udt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+An+"`");if(Wr==="''"?Wr="'":An==="'"&&(Wr=hdt(Wr)),d.indexOf(Wr)===0)d=d.slice(Wr.length);else return J()}}if(d.length>0&&ldt.test(d))return J();const _r=pe.map(Wr=>Wr.priority).sort((Wr,An)=>An-Wr).filter((Wr,An,Ft)=>Ft.indexOf(Wr)===An).map(Wr=>pe.filter(An=>An.priority===Wr).sort((An,Ft)=>Ft.subPriority-An.subPriority)).map(Wr=>Wr[0]);let Fr=Vu(z,j?.in);if(isNaN(+Fr))return J();const zr={};for(const Wr of _r){if(!Wr.validate(Fr,re))return J();const An=Wr.set(Fr,zr,re);Array.isArray(An)?(Fr=An[0],Object.assign(zr,An[1])):Fr=An}return Fr}function hdt(d){return d.match(odt)[1].replace(sdt,"'")}function fdt(d,l){const z=Vu(d,l?.in);return z.setMinutes(0,0,0),z}function ddt(d,l){const z=Vu(d,l?.in);return z.setSeconds(0,0),z}function pdt(d,l){const z=Vu(d,l?.in);return z.setMilliseconds(0),z}function mdt(d,l){const z=()=>bd(l?.in,NaN),j=l?.additionalDigits??2,J=xdt(d);let mt;if(J.date){const re=_dt(J.date,j);mt=bdt(re.restDateString,re.year)}if(!mt||isNaN(+mt))return z();const kt=+mt;let Dt=0,Gt;if(J.time&&(Dt=wdt(J.time),isNaN(Dt)))return z();if(J.timezone){if(Gt=kdt(J.timezone),isNaN(Gt))return z()}else{const re=new Date(kt+Dt),pe=Vu(0,l?.in);return pe.setFullYear(re.getUTCFullYear(),re.getUTCMonth(),re.getUTCDate()),pe.setHours(re.getUTCHours(),re.getUTCMinutes(),re.getUTCSeconds(),re.getUTCMilliseconds()),pe}return Vu(kt+Dt+Gt,l?.in)}const j5={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},gdt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,vdt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ydt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function xdt(d){const l={},z=d.split(j5.dateTimeDelimiter);let j;if(z.length>2)return l;if(/:/.test(z[0])?j=z[0]:(l.date=z[0],j=z[1],j5.timeZoneDelimiter.test(l.date)&&(l.date=d.split(j5.timeZoneDelimiter)[0],j=d.substr(l.date.length,d.length))),j){const J=j5.timezone.exec(j);J?(l.time=j.replace(J[1],""),l.timezone=J[1]):l.time=j}return l}function _dt(d,l){const z=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+l)+"})|(\\d{2}|[+-]\\d{"+(2+l)+"})$)"),j=d.match(z);if(!j)return{year:NaN,restDateString:""};const J=j[1]?parseInt(j[1]):null,mt=j[2]?parseInt(j[2]):null;return{year:mt===null?J:mt*100,restDateString:d.slice((j[1]||j[2]).length)}}function bdt(d,l){if(l===null)return new Date(NaN);const z=d.match(gdt);if(!z)return new Date(NaN);const j=!!z[4],J=l2(z[1]),mt=l2(z[2])-1,kt=l2(z[3]),Dt=l2(z[4]),Gt=l2(z[5])-1;if(j)return Edt(l,Dt,Gt)?Tdt(l,Dt,Gt):new Date(NaN);{const re=new Date(0);return!Mdt(l,mt,kt)||!Sdt(l,J)?new Date(NaN):(re.setUTCFullYear(l,mt,Math.max(J,kt)),re)}}function l2(d){return d?parseInt(d):1}function wdt(d){const l=d.match(vdt);if(!l)return NaN;const z=q8(l[1]),j=q8(l[2]),J=q8(l[3]);return Cdt(z,j,J)?z*aw+j*iw+J*1e3:NaN}function q8(d){return d&&parseFloat(d.replace(",","."))||0}function kdt(d){if(d==="Z")return 0;const l=d.match(ydt);if(!l)return 0;const z=l[1]==="+"?-1:1,j=parseInt(l[2]),J=l[3]&&parseInt(l[3])||0;return Ldt(j,J)?z*(j*aw+J*iw):NaN}function Tdt(d,l,z){const j=new Date(0);j.setUTCFullYear(d,0,4);const J=j.getUTCDay()||7,mt=(l-1)*7+z+1-J;return j.setUTCDate(j.getUTCDate()+mt),j}const Adt=[31,null,31,30,31,30,31,31,30,31,30,31];function VD(d){return d%400===0||d%4===0&&d%100!==0}function Mdt(d,l,z){return l>=0&&l<=11&&z>=1&&z<=(Adt[l]||(VD(d)?29:28))}function Sdt(d,l){return l>=1&&l<=(VD(d)?366:365)}function Edt(d,l,z){return l>=1&&l<=53&&z>=0&&z<=6}function Cdt(d,l,z){return d===24?l===0&&z===0:z>=0&&z<60&&l>=0&&l<60&&d>=0&&d<25}function Ldt(d,l){return l>=0&&l<=59}/*! + * chartjs-adapter-date-fns v3.0.0 + * https://www.chartjs.org + * (c) 2022 chartjs-adapter-date-fns Contributors + * Released under the MIT license + */const Pdt={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"};aD._date.override({_id:"date-fns",formats:function(){return Pdt},parse:function(d,l){if(d===null||typeof d>"u")return null;const z=typeof d;return z==="number"||d instanceof Date?d=Vu(d):z==="string"&&(typeof l=="string"?d=cdt(d,l,new Date,this.options):d=mdt(d,this.options)),MD(d)?d.getTime():null},format:function(d,l){return fft(d,l,this.options)},add:function(d,l,z){switch(z){case"millisecond":return vM(d,l);case"second":return eht(d,l);case"minute":return Qct(d,l);case"hour":return Kct(d,l);case"day":return Y4(d,l);case"week":return rht(d,l);case"month":return gM(d,l);case"quarter":return tht(d,l);case"year":return nht(d,l);default:return d}},diff:function(d,l,z){switch(z){case"millisecond":return yM(d,l);case"second":return hht(d,l);case"minute":return lht(d,l);case"hour":return sht(d,l);case"day":return SD(d,l);case"week":return fht(d,l);case"month":return LD(d,l);case"quarter":return cht(d,l);case"year":return dht(d,l);default:return 0}},startOf:function(d,l,z){switch(l){case"second":return pdt(d);case"minute":return ddt(d);case"hour":return fdt(d);case"day":return TA(d);case"week":return fg(d);case"isoWeek":return fg(d,{weekStartsOn:+z});case"month":return mht(d);case"quarter":return pht(d);case"year":return PD(d);default:return d}},endOf:function(d,l){switch(l){case"second":return bht(d);case"minute":return xht(d);case"hour":return vht(d);case"day":return ED(d);case"week":return yht(d);case"month":return CD(d);case"quarter":return _ht(d);case"year":return ght(d);default:return d}}});var J5={exports:{}},zdt=J5.exports,hz;function Idt(){return hz||(hz=1,function(d){var l={};(function(z,j){d.exports?d.exports=j():z.moduleName=j()})(typeof self<"u"?self:zdt,()=>{var z=(()=>{var j=Object.create,J=Object.defineProperty,mt=Object.defineProperties,kt=Object.getOwnPropertyDescriptor,Dt=Object.getOwnPropertyDescriptors,Gt=Object.getOwnPropertyNames,re=Object.getOwnPropertySymbols,pe=Object.getPrototypeOf,Ne=Object.prototype.hasOwnProperty,or=Object.prototype.propertyIsEnumerable,_r=(Q,$,c)=>$ in Q?J(Q,$,{enumerable:!0,configurable:!0,writable:!0,value:c}):Q[$]=c,Fr=(Q,$)=>{for(var c in $||($={}))Ne.call($,c)&&_r(Q,c,$[c]);if(re)for(var c of re($))or.call($,c)&&_r(Q,c,$[c]);return Q},zr=(Q,$)=>mt(Q,Dt($)),Wr=(Q,$)=>{var c={};for(var g in Q)Ne.call(Q,g)&&$.indexOf(g)<0&&(c[g]=Q[g]);if(Q!=null&&re)for(var g of re(Q))$.indexOf(g)<0&&or.call(Q,g)&&(c[g]=Q[g]);return c},An=(Q,$)=>()=>(Q&&($=Q(Q=0)),$),Ft=(Q,$)=>()=>($||Q(($={exports:{}}).exports,$),$.exports),kn=(Q,$)=>{for(var c in $)J(Q,c,{get:$[c],enumerable:!0})},ei=(Q,$,c,g)=>{if($&&typeof $=="object"||typeof $=="function")for(let P of Gt($))!Ne.call(Q,P)&&P!==c&&J(Q,P,{get:()=>$[P],enumerable:!(g=kt($,P))||g.enumerable});return Q},jn=(Q,$,c)=>(c=Q!=null?j(pe(Q)):{},ei(J(c,"default",{value:Q,enumerable:!0}),Q)),ai=Q=>ei(J({},"__esModule",{value:!0}),Q),Qi=Ft(Q=>{Q.version="3.2.0"}),Gi=Ft((Q,$)=>{(function(c,g,P){g[c]=g[c]||P(),typeof $<"u"&&$.exports&&($.exports=g[c])})("Promise",typeof window<"u"?window:Q,function(){var c,g,P,S=Object.prototype.toString,t=typeof setImmediate<"u"?function(T){return setImmediate(T)}:setTimeout;try{Object.defineProperty({},"x",{}),c=function(T,u,b,_){return Object.defineProperty(T,u,{value:b,writable:!0,configurable:_!==!1})}}catch{c=function(u,b,_){return u[b]=_,u}}P=function(){var T,u,b;function _(C,M){this.fn=C,this.self=M,this.next=void 0}return{add:function(C,M){b=new _(C,M),u?u.next=b:T=b,u=b,b=void 0},drain:function(){var C=T;for(T=u=g=void 0;C;)C.fn.call(C.self),C=C.next}}}();function e(T,u){P.add(T,u),g||(g=t(P.drain))}function r(T){var u,b=typeof T;return T!=null&&(b=="object"||b=="function")&&(u=T.then),typeof u=="function"?u:!1}function a(){for(var T=0;T0&&e(a,b))}catch(_){i.call(new f(b),_)}}}function i(T){var u=this;u.triggered||(u.triggered=!0,u.def&&(u=u.def),u.msg=T,u.state=2,u.chain.length>0&&e(a,u))}function s(T,u,b,_){for(var C=0;C{(function(){var c={version:"3.8.2"},g=[].slice,P=function(At){return g.call(At)},S=self.document;function t(At){return At&&(At.ownerDocument||At.document||At).documentElement}function e(At){return At&&(At.ownerDocument&&At.ownerDocument.defaultView||At.document&&At||At.defaultView)}if(S)try{P(S.documentElement.childNodes)[0].nodeType}catch{P=function(jt){for(var ue=jt.length,Me=new Array(ue);ue--;)Me[ue]=jt[ue];return Me}}if(Date.now||(Date.now=function(){return+new Date}),S)try{S.createElement("DIV").style.setProperty("opacity",0,"")}catch{var r=this.Element.prototype,a=r.setAttribute,n=r.setAttributeNS,o=this.CSSStyleDeclaration.prototype,i=o.setProperty;r.setAttribute=function(jt,ue){a.call(this,jt,ue+"")},r.setAttributeNS=function(jt,ue,Me){n.call(this,jt,ue,Me+"")},o.setProperty=function(jt,ue,Me){i.call(this,jt,ue+"",Me)}}c.ascending=s;function s(At,jt){return Atjt?1:At>=jt?0:NaN}c.descending=function(At,jt){return jtAt?1:jt>=At?0:NaN},c.min=function(At,jt){var ue=-1,Me=At.length,Le,Be;if(arguments.length===1){for(;++ue=Be){Le=Be;break}for(;++ueBe&&(Le=Be)}else{for(;++ue=Be){Le=Be;break}for(;++ueBe&&(Le=Be)}return Le},c.max=function(At,jt){var ue=-1,Me=At.length,Le,Be;if(arguments.length===1){for(;++ue=Be){Le=Be;break}for(;++ueLe&&(Le=Be)}else{for(;++ue=Be){Le=Be;break}for(;++ueLe&&(Le=Be)}return Le},c.extent=function(At,jt){var ue=-1,Me=At.length,Le,Be,sr;if(arguments.length===1){for(;++ue=Be){Le=sr=Be;break}for(;++ueBe&&(Le=Be),sr=Be){Le=sr=Be;break}for(;++ueBe&&(Le=Be),sr1)return sr/(Mr-1)},c.deviation=function(){var At=c.variance.apply(this,arguments);return At&&Math.sqrt(At)};function y(At){return{left:function(jt,ue,Me,Le){for(arguments.length<3&&(Me=0),arguments.length<4&&(Le=jt.length);Me>>1;At(jt[Be],ue)<0?Me=Be+1:Le=Be}return Me},right:function(jt,ue,Me,Le){for(arguments.length<3&&(Me=0),arguments.length<4&&(Le=jt.length);Me>>1;At(jt[Be],ue)>0?Le=Be:Me=Be+1}return Me}}}var v=y(s);c.bisectLeft=v.left,c.bisect=c.bisectRight=v.right,c.bisector=function(At){return y(At.length===1?function(jt,ue){return s(At(jt),ue)}:At)},c.shuffle=function(At,jt,ue){(Me=arguments.length)<3&&(ue=At.length,Me<2&&(jt=0));for(var Me=ue-jt,Le,Be;Me;)Be=Math.random()*Me--|0,Le=At[Me+jt],At[Me+jt]=At[Be+jt],At[Be+jt]=Le;return At},c.permute=function(At,jt){for(var ue=jt.length,Me=new Array(ue);ue--;)Me[ue]=At[jt[ue]];return Me},c.pairs=function(At){for(var jt=0,ue=At.length-1,Me,Le=At[0],Be=new Array(ue<0?0:ue);jt=0;)for(sr=At[jt],ue=sr.length;--ue>=0;)Be[--Le]=sr[ue];return Be};var u=Math.abs;c.range=function(At,jt,ue){if(arguments.length<3&&(ue=1,arguments.length<2&&(jt=At,At=0)),(jt-At)/ue===1/0)throw new Error("infinite range");var Me=[],Le=b(u(ue)),Be=-1,sr;if(At*=Le,jt*=Le,ue*=Le,ue<0)for(;(sr=At+ue*++Be)>jt;)Me.push(sr/Le);else for(;(sr=At+ue*++Be)=jt.length)return Le?Le.call(At,Mr):Me?Mr.sort(Me):Mr;for(var Xr=-1,vn=Mr.length,In=jt[en++],On,Bi,Un,mi=new C,Ti;++Xr=jt.length)return ir;var en=[],Xr=ue[Mr++];return ir.forEach(function(vn,In){en.push({key:vn,values:sr(In,Mr)})}),Xr?en.sort(function(vn,In){return Xr(vn.key,In.key)}):en}return At.map=function(ir,Mr){return Be(Mr,ir,0)},At.entries=function(ir){return sr(Be(c.map,ir,0),0)},At.key=function(ir){return jt.push(ir),At},At.sortKeys=function(ir){return ue[jt.length-1]=ir,At},At.sortValues=function(ir){return Me=ir,At},At.rollup=function(ir){return Le=ir,At},At},c.set=function(At){var jt=new N;if(At)for(var ue=0,Me=At.length;ue=0&&(Me=At.slice(ue+1),At=At.slice(0,ue)),At)return arguments.length<2?this[At].on(Me):this[At].on(Me,jt);if(arguments.length===2){if(jt==null)for(At in this)this.hasOwnProperty(At)&&this[At].on(Me,null);return this}};function X(At){var jt=[],ue=new C;function Me(){for(var Le=jt,Be=-1,sr=Le.length,ir;++Be=0&&(ue=At.slice(0,jt))!=="xmlns"&&(At=At.slice(jt+1)),wt.hasOwnProperty(ue)?{space:wt[ue],local:At}:At}},it.attr=function(At,jt){if(arguments.length<2){if(typeof At=="string"){var ue=this.node();return At=c.ns.qualify(At),At.local?ue.getAttributeNS(At.space,At.local):ue.getAttribute(At)}for(jt in At)this.each(zt(jt,At[jt]));return this}return this.each(zt(At,jt))};function zt(At,jt){At=c.ns.qualify(At);function ue(){this.removeAttribute(At)}function Me(){this.removeAttributeNS(At.space,At.local)}function Le(){this.setAttribute(At,jt)}function Be(){this.setAttributeNS(At.space,At.local,jt)}function sr(){var Mr=jt.apply(this,arguments);Mr==null?this.removeAttribute(At):this.setAttribute(At,Mr)}function ir(){var Mr=jt.apply(this,arguments);Mr==null?this.removeAttributeNS(At.space,At.local):this.setAttributeNS(At.space,At.local,Mr)}return jt==null?At.local?Me:ue:typeof jt=="function"?At.local?ir:sr:At.local?Be:Le}function Pt(At){return At.trim().replace(/\s+/g," ")}it.classed=function(At,jt){if(arguments.length<2){if(typeof At=="string"){var ue=this.node(),Me=(At=Ht(At)).length,Le=-1;if(jt=ue.classList){for(;++Le=0;)(Be=ue[Me])&&(Le&&Le!==Be.nextSibling&&Le.parentNode.insertBefore(Be,Le),Le=Be);return this},it.sort=function(At){At=te.apply(this,arguments);for(var jt=-1,ue=this.length;++jt=jt&&(jt=Le+1);!(Mr=sr[jt])&&++jt0&&(At=At.slice(0,Le));var sr=cr.get(At);sr&&(At=sr,Be=jr);function ir(){var Xr=this[Me];Xr&&(this.removeEventListener(At,Xr,Xr.$),delete this[Me])}function Mr(){var Xr=Be(jt,P(arguments));ir.call(this),this.addEventListener(At,this[Me]=Xr,Xr.$=ue),Xr._=jt}function en(){var Xr=new RegExp("^__on([^.]+)"+c.requote(At)+"$"),vn;for(var In in this)if(vn=In.match(Xr)){var On=this[In];this.removeEventListener(vn[1],On,On.$),delete this[In]}}return Le?jt?Mr:ir:jt?W:en}var cr=c.map({mouseenter:"mouseover",mouseleave:"mouseout"});S&&cr.forEach(function(At){"on"+At in S&&cr.remove(At)});function ur(At,jt){return function(ue){var Me=c.event;c.event=ue,jt[0]=this.__data__;try{At.apply(this,jt)}finally{c.event=Me}}}function jr(At,jt){var ue=ur(At,jt);return function(Me){var Le=this,Be=Me.relatedTarget;(!Be||Be!==Le&&!(Be.compareDocumentPosition(Le)&8))&&ue.call(Le,Me)}}var Hr,br=0;function Kr(At){var jt=".dragsuppress-"+ ++br,ue="click"+jt,Me=c.select(e(At)).on("touchmove"+jt,lt).on("dragstart"+jt,lt).on("selectstart"+jt,lt);if(Hr==null&&(Hr="onselectstart"in At?!1:F(At.style,"userSelect")),Hr){var Le=t(At).style,Be=Le[Hr];Le[Hr]="none"}return function(sr){if(Me.on(jt,null),Hr&&(Le[Hr]=Be),sr){var ir=function(){Me.on(ue,null)};Me.on(ue,function(){lt(),ir()},!0),setTimeout(ir,0)}}}c.mouse=function(At){return Ce(At,yt())};var rn=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ce(At,jt){jt.changedTouches&&(jt=jt.changedTouches[0]);var ue=At.ownerSVGElement||At;if(ue.createSVGPoint){var Me=ue.createSVGPoint();if(rn<0){var Le=e(At);if(Le.scrollX||Le.scrollY){ue=c.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Be=ue[0][0].getScreenCTM();rn=!(Be.f||Be.e),ue.remove()}}return rn?(Me.x=jt.pageX,Me.y=jt.pageY):(Me.x=jt.clientX,Me.y=jt.clientY),Me=Me.matrixTransform(At.getScreenCTM().inverse()),[Me.x,Me.y]}var sr=At.getBoundingClientRect();return[jt.clientX-sr.left-At.clientLeft,jt.clientY-sr.top-At.clientTop]}c.touch=function(At,jt,ue){if(arguments.length<3&&(ue=jt,jt=yt().changedTouches),jt){for(var Me=0,Le=jt.length,Be;Me1?ee:At<-1?-ee:Math.asin(At)}function ar(At){return((At=Math.exp(At))-1/At)/2}function Ar(At){return((At=Math.exp(At))+1/At)/2}function Tr(At){return((At=Math.exp(2*At))-1)/(At+1)}var pr=Math.SQRT2,Jr=2,Vn=4;c.interpolateZoom=function(At,jt){var ue=At[0],Me=At[1],Le=At[2],Be=jt[0],sr=jt[1],ir=jt[2],Mr=Be-ue,en=sr-Me,Xr=Mr*Mr+en*en,vn,In;if(Xr0&&(_o=_o.transition().duration(sr)),_o.call(Wi.event)}function Fo(){mi&&mi.domain(Un.range().map(function(_o){return(_o-At.x)/At.k}).map(Un.invert)),Ii&&Ii.domain(Ti.range().map(function(_o){return(_o-At.y)/At.k}).map(Ti.invert))}function Uo(_o){ir++||_o({type:"zoomstart"})}function al(_o){Fo(),_o({type:"zoom",scale:At.k,translate:[At.x,At.y]})}function Wo(_o){--ir||(_o({type:"zoomend"}),ue=null)}function ps(){var _o=this,Zs=Bi.of(_o,arguments),rl=0,ou=c.select(e(_o)).on(en,Bl).on(Xr,Ql),Gl=Yn(c.mouse(_o)),rh=Kr(_o);Fi.call(_o),Uo(Zs);function Bl(){rl=1,ro(c.mouse(_o),Gl),al(Zs)}function Ql(){ou.on(en,null).on(Xr,null),rh(rl),Wo(Zs)}}function Tl(){var _o=this,Zs=Bi.of(_o,arguments),rl={},ou=0,Gl,rh=".zoom-"+c.event.changedTouches[0].identifier,Bl="touchmove"+rh,Ql="touchend"+rh,bh=[],_e=c.select(_o),kr=Kr(_o);Dn(),Uo(Zs),_e.on(Mr,null).on(In,Dn);function Lr(){var gn=c.touches(_o);return Gl=At.k,gn.forEach(function(ni){ni.identifier in rl&&(rl[ni.identifier]=Yn(ni))}),gn}function Dn(){var gn=c.event.target;c.select(gn).on(Bl,oi).on(Ql,Jn),bh.push(gn);for(var ni=c.event.changedTouches,Yi=0,Ui=ni.length;Yi1){var Ba=va[0],ta=va[1],wi=Ba[0]-ta[0],hn=Ba[1]-ta[1];ou=wi*wi+hn*hn}}function oi(){var gn=c.touches(_o),ni,Yi,Ui,va;Fi.call(_o);for(var Za=0,Ba=gn.length;Za1?1:jt,ue=ue<0?0:ue>1?1:ue,Le=ue<=.5?ue*(1+jt):ue+jt-ue*jt,Me=2*ue-Le;function Be(ir){return ir>360?ir-=360:ir<0&&(ir+=360),ir<60?Me+(Le-Me)*ir/60:ir<180?Le:ir<240?Me+(Le-Me)*(240-ir)/60:Me}function sr(ir){return Math.round(Be(ir)*255)}return new Pa(sr(At+120),sr(At),sr(At-120))}c.hcl=We;function We(At,jt,ue){return this instanceof We?(this.h=+At,this.c=+jt,void(this.l=+ue)):arguments.length<2?At instanceof We?new We(At.h,At.c,At.l):At instanceof xr?Pi(At.l,At.a,At.b):Pi((At=Br((At=c.rgb(At)).r,At.g,At.b)).l,At.a,At.b):new We(At,jt,ue)}var rr=We.prototype=new ii;rr.brighter=function(At){return new We(this.h,this.c,Math.min(100,this.l+Qr*(arguments.length?At:1)))},rr.darker=function(At){return new We(this.h,this.c,Math.max(0,this.l-Qr*(arguments.length?At:1)))},rr.rgb=function(){return fr(this.h,this.c,this.l).rgb()};function fr(At,jt,ue){return isNaN(At)&&(At=0),isNaN(jt)&&(jt=0),new xr(ue,Math.cos(At*=le)*jt,Math.sin(At)*jt)}c.lab=xr;function xr(At,jt,ue){return this instanceof xr?(this.l=+At,this.a=+jt,void(this.b=+ue)):arguments.length<2?At instanceof xr?new xr(At.l,At.a,At.b):At instanceof We?fr(At.h,At.c,At.l):Br((At=Pa(At)).r,At.g,At.b):new xr(At,jt,ue)}var Qr=18,Cn=.95047,wn=1,Mn=1.08883,ci=xr.prototype=new ii;ci.brighter=function(At){return new xr(Math.min(100,this.l+Qr*(arguments.length?At:1)),this.a,this.b)},ci.darker=function(At){return new xr(Math.max(0,this.l-Qr*(arguments.length?At:1)),this.a,this.b)},ci.rgb=function(){return xi(this.l,this.a,this.b)};function xi(At,jt,ue){var Me=(At+16)/116,Le=Me+jt/500,Be=Me-ue/200;return Le=Di(Le)*Cn,Me=Di(Me)*wn,Be=Di(Be)*Mn,new Pa(ui(3.2404542*Le-1.5371385*Me-.4985314*Be),ui(-.969266*Le+1.8760108*Me+.041556*Be),ui(.0556434*Le-.2040259*Me+1.0572252*Be))}function Pi(At,jt,ue){return At>0?new We(Math.atan2(ue,jt)*we,Math.sqrt(jt*jt+ue*ue),At):new We(NaN,NaN,At)}function Di(At){return At>.206893034?At*At*At:(At-4/29)/7.787037}function Zi(At){return At>.008856?Math.pow(At,1/3):7.787037*At+4/29}function ui(At){return Math.round(255*(At<=.00304?12.92*At:1.055*Math.pow(At,1/2.4)-.055))}c.rgb=Pa;function Pa(At,jt,ue){return this instanceof Pa?(this.r=~~At,this.g=~~jt,void(this.b=~~ue)):arguments.length<2?At instanceof Pa?new Pa(At.r,At.g,At.b):qr(""+At,Pa,Hi):new Pa(At,jt,ue)}function Wa(At){return new Pa(At>>16,At>>8&255,At&255)}function ze(At){return Wa(At)+""}var Pe=Pa.prototype=new ii;Pe.brighter=function(At){At=Math.pow(.7,arguments.length?At:1);var jt=this.r,ue=this.g,Me=this.b,Le=30;return!jt&&!ue&&!Me?new Pa(Le,Le,Le):(jt&&jt>4,Me=Me>>4|Me,Le=Mr&240,Le=Le>>4|Le,Be=Mr&15,Be=Be<<4|Be):At.length===7&&(Me=(Mr&16711680)>>16,Le=(Mr&65280)>>8,Be=Mr&255)),jt(Me,Le,Be))}function $r(At,jt,ue){var Me=Math.min(At/=255,jt/=255,ue/=255),Le=Math.max(At,jt,ue),Be=Le-Me,sr,ir,Mr=(Le+Me)/2;return Be?(ir=Mr<.5?Be/(Le+Me):Be/(2-Le-Me),At==Le?sr=(jt-ue)/Be+(jt0&&Mr<1?0:sr),new qn(sr,ir,Mr)}function Br(At,jt,ue){At=Gr(At),jt=Gr(jt),ue=Gr(ue);var Me=Zi((.4124564*At+.3575761*jt+.1804375*ue)/Cn),Le=Zi((.2126729*At+.7151522*jt+.072175*ue)/wn),Be=Zi((.0193339*At+.119192*jt+.9503041*ue)/Mn);return xr(116*Le-16,500*(Me-Le),200*(Le-Be))}function Gr(At){return(At/=255)<=.04045?At/12.92:Math.pow((At+.055)/1.055,2.4)}function dn(At){var jt=parseFloat(At);return At.charAt(At.length-1)==="%"?Math.round(jt*2.55):jt}var an=c.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});an.forEach(function(At,jt){an.set(At,Wa(jt))});function Ee(At){return typeof At=="function"?At:function(){return At}}c.functor=Ee,c.xhr=dr(V);function dr(At){return function(jt,ue,Me){return arguments.length===2&&typeof ue=="function"&&(Me=ue,ue=null),Vr(jt,ue,At,Me)}}function Vr(At,jt,ue,Me){var Le={},Be=c.dispatch("beforesend","progress","load","error"),sr={},ir=new XMLHttpRequest,Mr=null;self.XDomainRequest&&!("withCredentials"in ir)&&/^(http(s)?:)?\/\//.test(At)&&(ir=new XDomainRequest),"onload"in ir?ir.onload=ir.onerror=en:ir.onreadystatechange=function(){ir.readyState>3&&en()};function en(){var Xr=ir.status,vn;if(!Xr&&Fn(ir)||Xr>=200&&Xr<300||Xr===304){try{vn=ue.call(Le,ir)}catch(In){Be.error.call(Le,In);return}Be.load.call(Le,vn)}else Be.error.call(Le,ir)}return ir.onprogress=function(Xr){var vn=c.event;c.event=Xr;try{Be.progress.call(Le,ir)}finally{c.event=vn}},Le.header=function(Xr,vn){return Xr=(Xr+"").toLowerCase(),arguments.length<2?sr[Xr]:(vn==null?delete sr[Xr]:sr[Xr]=vn+"",Le)},Le.mimeType=function(Xr){return arguments.length?(jt=Xr==null?null:Xr+"",Le):jt},Le.responseType=function(Xr){return arguments.length?(Mr=Xr,Le):Mr},Le.response=function(Xr){return ue=Xr,Le},["get","post"].forEach(function(Xr){Le[Xr]=function(){return Le.send.apply(Le,[Xr].concat(P(arguments)))}}),Le.send=function(Xr,vn,In){if(arguments.length===2&&typeof vn=="function"&&(In=vn,vn=null),ir.open(Xr,At,!0),jt!=null&&!("accept"in sr)&&(sr.accept=jt+",*/*"),ir.setRequestHeader)for(var On in sr)ir.setRequestHeader(On,sr[On]);return jt!=null&&ir.overrideMimeType&&ir.overrideMimeType(jt),Mr!=null&&(ir.responseType=Mr),In!=null&&Le.on("error",In).on("load",function(Bi){In(null,Bi)}),Be.beforesend.call(Le,ir),ir.send(vn??null),Le},Le.abort=function(){return ir.abort(),Le},c.rebind(Le,Be,"on"),Me==null?Le:Le.get(yn(Me))}function yn(At){return At.length===1?function(jt,ue){At(jt==null?ue:null)}:At}function Fn(At){var jt=At.responseType;return jt&&jt!=="text"?At.response:At.responseText}c.dsv=function(At,jt){var ue=new RegExp('["'+At+` +]`),Me=At.charCodeAt(0);function Le(en,Xr,vn){arguments.length<3&&(vn=Xr,Xr=null);var In=Vr(en,jt,Xr==null?Be:sr(Xr),vn);return In.row=function(On){return arguments.length?In.response((Xr=On)==null?Be:sr(On)):Xr},In}function Be(en){return Le.parse(en.responseText)}function sr(en){return function(Xr){return Le.parse(Xr.responseText,en)}}Le.parse=function(en,Xr){var vn;return Le.parseRows(en,function(In,On){if(vn)return vn(In,On-1);var Bi=function(Un){for(var mi={},Ti=In.length,Ii=0;Ii=Bi)return In;if(Ii)return Ii=!1,vn;var ja=Un;if(en.charCodeAt(ja)===34){for(var Ha=ja;Ha++24?(isFinite(jt)&&(clearTimeout(Zn),Zn=setTimeout(Ja,jt)),En=0):(En=1,Ca(Ja))}c.timer.flush=function(){Xa(),Io()};function Xa(){for(var At=Date.now(),jt=Xn;jt;)At>=jt.t&&jt.c(At-jt.t)&&(jt.c=null),jt=jt.n;return At}function Io(){for(var At,jt=Xn,ue=1/0;jt;)jt.c?(jt.t=0;--ir)Un.push(Le[en[vn[ir]][2]]);for(ir=+On;ir1&&Ue(At[ue[Me-2]],At[ue[Me-1]],At[Le])<=0;)--Me;ue[Me++]=Le}return ue.slice(0,Me)}function gs(At,jt){return At[0]-jt[0]||At[1]-jt[1]}c.geom.polygon=function(At){return tt(At,is),At};var is=c.geom.polygon.prototype=[];is.area=function(){for(var At=-1,jt=this.length,ue,Me=this[jt-1],Le=0;++Atne)ir=ir.L;else if(sr=jt-uo(ir,ue),sr>ne){if(!ir.R){Me=ir;break}ir=ir.R}else{Be>-ne?(Me=ir.P,Le=ir):sr>-ne?(Me=ir,Le=ir.N):Me=Le=ir;break}var Mr=kl(At);if(Js.insert(Me,Mr),!(!Me&&!Le)){if(Me===Le){Cl(Me),Le=kl(Me.site),Js.insert(Mr,Le),Mr.edge=Le.edge=nu(Me.site,Mr.site),il(Me),il(Le);return}if(!Le){Mr.edge=nu(Me.site,Mr.site);return}Cl(Me),Cl(Le);var en=Me.site,Xr=en.x,vn=en.y,In=At.x-Xr,On=At.y-vn,Bi=Le.site,Un=Bi.x-Xr,mi=Bi.y-vn,Ti=2*(In*mi-On*Un),Ii=In*In+On*On,Wi=Un*Un+mi*mi,Yn={x:(mi*Ii-On*Wi)/Ti+Xr,y:(In*Wi-Un*Ii)/Ti+vn};Qo(Le.edge,en,Bi,Yn),Mr.edge=nu(en,At,null,Yn),Le.edge=nu(At,Bi,null,Yn),il(Me),il(Le)}}function La(At,jt){var ue=At.site,Me=ue.x,Le=ue.y,Be=Le-jt;if(!Be)return Me;var sr=At.P;if(!sr)return-1/0;ue=sr.site;var ir=ue.x,Mr=ue.y,en=Mr-jt;if(!en)return ir;var Xr=ir-Me,vn=1/Be-1/en,In=Xr/en;return vn?(-In+Math.sqrt(In*In-2*vn*(Xr*Xr/(-2*en)-Mr+en/2+Le-Be/2)))/vn+Me:(Me+ir)/2}function uo(At,jt){var ue=At.N;if(ue)return La(ue,jt);var Me=At.site;return Me.y===jt?Me.x:1/0}function Hs(At){this.site=At,this.edges=[]}Hs.prototype.prepare=function(){for(var At=this.edges,jt=At.length,ue;jt--;)ue=At[jt].edge,(!ue.b||!ue.a)&&At.splice(jt,1);return At.sort(Go),At.length};function Kl(At){for(var jt=At[0][0],ue=At[1][0],Me=At[0][1],Le=At[1][1],Be,sr,ir,Mr,en=ul,Xr=en.length,vn,In,On,Bi,Un,mi;Xr--;)if(vn=en[Xr],!(!vn||!vn.prepare()))for(On=vn.edges,Bi=On.length,In=0;Inne||u(Mr-sr)>ne)&&(On.splice(In,0,new Mu(cl(vn.site,mi,u(ir-jt)ne?{x:jt,y:u(Be-jt)ne?{x:u(sr-Le)ne?{x:ue,y:u(Be-ue)ne?{x:u(sr-Me)=-Ct)){var On=Mr*Mr+en*en,Bi=Xr*Xr+vn*vn,Un=(vn*On-en*Bi)/In,mi=(Mr*Bi-Xr*On)/In,vn=mi+ir,Ti=Co.pop()||new ql;Ti.arc=At,Ti.site=Le,Ti.x=Un+sr,Ti.y=vn+Math.sqrt(Un*Un+mi*mi),Ti.cy=vn,At.circle=Ti;for(var Ii=null,Wi=Cs._;Wi;)if(Ti.y0)){if(Un/=On,On<0){if(Un0){if(Un>In)return;Un>vn&&(vn=Un)}if(Un=ue-ir,!(!On&&Un<0)){if(Un/=On,On<0){if(Un>In)return;Un>vn&&(vn=Un)}else if(On>0){if(Un0)){if(Un/=Bi,Bi<0){if(Un0){if(Un>In)return;Un>vn&&(vn=Un)}if(Un=Me-Mr,!(!Bi&&Un<0)){if(Un/=Bi,Bi<0){if(Un>In)return;Un>vn&&(vn=Un)}else if(Bi>0){if(Un0&&(Le.a={x:ir+vn*On,y:Mr+vn*Bi}),In<1&&(Le.b={x:ir+In*On,y:Mr+In*Bi}),Le}}}}}}function ao(At){for(var jt=as,ue=Fu(At[0][0],At[0][1],At[1][0],At[1][1]),Me=jt.length,Le;Me--;)Le=jt[Me],(!Ts(Le,At)||!ue(Le)||u(Le.a.x-Le.b.x)=Be)return;if(Xr>In){if(!Me)Me={x:Bi,y:sr};else if(Me.y>=ir)return;ue={x:Bi,y:ir}}else{if(!Me)Me={x:Bi,y:ir};else if(Me.y1)if(Xr>In){if(!Me)Me={x:(sr-Ti)/mi,y:sr};else if(Me.y>=ir)return;ue={x:(ir-Ti)/mi,y:ir}}else{if(!Me)Me={x:(ir-Ti)/mi,y:ir};else if(Me.y=Be)return;ue={x:Be,y:mi*Be+Ti}}else{if(!Me)Me={x:Be,y:mi*Be+Ti};else if(Me.x=Xr&&Ti.x<=In&&Ti.y>=vn&&Ti.y<=On?[[Xr,On],[In,On],[In,vn],[Xr,vn]]:[];Ii.point=Mr[Un]}),en}function ir(Mr){return Mr.map(function(en,Xr){return{x:Math.round(Me(en,Xr)/ne)*ne,y:Math.round(Le(en,Xr)/ne)*ne,i:Xr}})}return sr.links=function(Mr){return ac(ir(Mr)).edges.filter(function(en){return en.l&&en.r}).map(function(en){return{source:Mr[en.l.i],target:Mr[en.r.i]}})},sr.triangles=function(Mr){var en=[];return ac(ir(Mr)).cells.forEach(function(Xr,vn){for(var In=Xr.site,On=Xr.edges.sort(Go),Bi=-1,Un=On.length,mi,Ti,Ii=On[Un-1].edge,Wi=Ii.l===In?Ii.r:Ii.l;++BiWi&&(Wi=Xr.x),Xr.y>Yn&&(Yn=Xr.y),On.push(Xr.x),Bi.push(Xr.y);else for(Un=0;UnWi&&(Wi=ja),Ha>Yn&&(Yn=Ha),On.push(ja),Bi.push(Ha)}var ro=Wi-Ti,Lo=Yn-Ii;ro>Lo?Yn=Ii+ro:Wi=Ti+Lo;function Fo(Wo,ps,Tl,Ku,cu,_o,Zs,rl){if(!(isNaN(Tl)||isNaN(Ku)))if(Wo.leaf){var ou=Wo.x,Gl=Wo.y;if(ou!=null)if(u(ou-Tl)+u(Gl-Ku)<.01)Uo(Wo,ps,Tl,Ku,cu,_o,Zs,rl);else{var rh=Wo.point;Wo.x=Wo.y=Wo.point=null,Uo(Wo,rh,ou,Gl,cu,_o,Zs,rl),Uo(Wo,ps,Tl,Ku,cu,_o,Zs,rl)}else Wo.x=Tl,Wo.y=Ku,Wo.point=ps}else Uo(Wo,ps,Tl,Ku,cu,_o,Zs,rl)}function Uo(Wo,ps,Tl,Ku,cu,_o,Zs,rl){var ou=(cu+Zs)*.5,Gl=(_o+rl)*.5,rh=Tl>=ou,Bl=Ku>=Gl,Ql=Bl<<1|rh;Wo.leaf=!1,Wo=Wo.nodes[Ql]||(Wo.nodes[Ql]=Dl()),rh?cu=ou:Zs=ou,Bl?_o=Gl:rl=Gl,Fo(Wo,ps,Tl,Ku,cu,_o,Zs,rl)}var al=Dl();if(al.add=function(Wo){Fo(al,Wo,+vn(Wo,++Un),+In(Wo,Un),Ti,Ii,Wi,Yn)},al.visit=function(Wo){Bc(Wo,al,Ti,Ii,Wi,Yn)},al.find=function(Wo){return jf(al,Wo[0],Wo[1],Ti,Ii,Wi,Yn)},Un=-1,jt==null){for(;++UnBe||In>sr||On=ja,Lo=ue>=Ha,Fo=Lo<<1|ro,Uo=Fo+4;Foue&&(Be=jt.slice(ue,Be),ir[sr]?ir[sr]+=Be:ir[++sr]=Be),(Me=Me[0])===(Le=Le[0])?ir[sr]?ir[sr]+=Le:ir[++sr]=Le:(ir[++sr]=null,Mr.push({i:sr,x:fc(Me,Le)})),ue=sc.lastIndex;return ue=0&&!(Me=c.interpolators[ue](At,jt)););return Me}c.interpolators=[function(At,jt){var ue=typeof jt;return(ue==="string"?an.has(jt.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(jt)?hc:oh:jt instanceof ii?hc:Array.isArray(jt)?Zl:ue==="object"&&isNaN(jt)?oc:fc)(At,jt)}],c.interpolateArray=Zl;function Zl(At,jt){var ue=[],Me=[],Le=At.length,Be=jt.length,sr=Math.min(At.length,jt.length),ir;for(ir=0;ir=0?At.slice(0,jt):At,Me=jt>=0?At.slice(jt+1):"in";return ue=Lc.get(ue)||Mh,Me=jh.get(Me)||V,xu(Me(ue.apply(null,g.call(arguments,1))))};function xu(At){return function(jt){return jt<=0?0:jt>=1?1:At(jt)}}function Cd(At){return function(jt){return 1-At(1-jt)}}function Qs(At){return function(jt){return .5*(jt<.5?At(2*jt):2-At(2-2*jt))}}function Wd(At){return At*At}function Ll(At){return At*At*At}function Jo(At){if(At<=0)return 0;if(At>=1)return 1;var jt=At*At,ue=jt*At;return 4*(At<.5?ue:3*(At-jt)+ue-.75)}function lf(At){return function(jt){return Math.pow(jt,At)}}function sh(At){return 1-Math.cos(At*ee)}function ec(At){return Math.pow(2,10*(At-1))}function Uf(At){return 1-Math.sqrt(1-At*At)}function Uh(At,jt){var ue;return arguments.length<2&&(jt=.45),arguments.length?ue=jt/St*Math.asin(1/At):(At=1,ue=jt/4),function(Me){return 1+At*Math.pow(2,-10*Me)*Math.sin((Me-ue)*St/jt)}}function yf(At){return At||(At=1.70158),function(jt){return jt*jt*((At+1)*jt-At)}}function lc(At){return At<1/2.75?7.5625*At*At:At<2/2.75?7.5625*(At-=1.5/2.75)*At+.75:At<2.5/2.75?7.5625*(At-=2.25/2.75)*At+.9375:7.5625*(At-=2.625/2.75)*At+.984375}c.interpolateHcl=hd;function hd(At,jt){At=c.hcl(At),jt=c.hcl(jt);var ue=At.h,Me=At.c,Le=At.l,Be=jt.h-ue,sr=jt.c-Me,ir=jt.l-Le;return isNaN(sr)&&(sr=0,Me=isNaN(Me)?jt.c:Me),isNaN(Be)?(Be=0,ue=isNaN(ue)?jt.h:ue):Be>180?Be-=360:Be<-180&&(Be+=360),function(Mr){return fr(ue+Be*Mr,Me+sr*Mr,Le+ir*Mr)+""}}c.interpolateHsl=$f;function $f(At,jt){At=c.hsl(At),jt=c.hsl(jt);var ue=At.h,Me=At.s,Le=At.l,Be=jt.h-ue,sr=jt.s-Me,ir=jt.l-Le;return isNaN(sr)&&(sr=0,Me=isNaN(Me)?jt.s:Me),isNaN(Be)?(Be=0,ue=isNaN(ue)?jt.h:ue):Be>180?Be-=360:Be<-180&&(Be+=360),function(Mr){return Hi(ue+Be*Mr,Me+sr*Mr,Le+ir*Mr)+""}}c.interpolateLab=xf;function xf(At,jt){At=c.lab(At),jt=c.lab(jt);var ue=At.l,Me=At.a,Le=At.b,Be=jt.l-ue,sr=jt.a-Me,ir=jt.b-Le;return function(Mr){return xi(ue+Be*Mr,Me+sr*Mr,Le+ir*Mr)+""}}c.interpolateRound=Vh;function Vh(At,jt){return jt-=At,function(ue){return Math.round(At+jt*ue)}}c.transform=function(At){var jt=S.createElementNS(c.ns.prefix.svg,"g");return(c.transform=function(ue){if(ue!=null){jt.setAttribute("transform",ue);var Me=jt.transform.baseVal.consolidate()}return new Vf(Me?Me.matrix:Sh)})(At)};function Vf(At){var jt=[At.a,At.b],ue=[At.c,At.d],Me=lh(jt),Le=Hf(jt,ue),Be=lh(Gf(ue,jt,-Le))||0;jt[0]*ue[1]180?jt+=360:jt-At>180&&(At+=360),Me.push({i:ue.push(mh(ue)+"rotate(",null,")")-2,x:fc(At,jt)})):jt&&ue.push(mh(ue)+"rotate("+jt+")")}function Wf(At,jt,ue,Me){At!==jt?Me.push({i:ue.push(mh(ue)+"skewX(",null,")")-2,x:fc(At,jt)}):jt&&ue.push(mh(ue)+"skewX("+jt+")")}function Jl(At,jt,ue,Me){if(At[0]!==jt[0]||At[1]!==jt[1]){var Le=ue.push(mh(ue)+"scale(",null,",",null,")");Me.push({i:Le-4,x:fc(At[0],jt[0])},{i:Le-2,x:fc(At[1],jt[1])})}else(jt[0]!==1||jt[1]!==1)&&ue.push(mh(ue)+"scale("+jt+")")}function Ef(At,jt){var ue=[],Me=[];return At=c.transform(At),jt=c.transform(jt),uc(At.translate,jt.translate,ue,Me),ef(At.rotate,jt.rotate,ue,Me),Wf(At.skew,jt.skew,ue,Me),Jl(At.scale,jt.scale,ue,Me),At=jt=null,function(Le){for(var Be=-1,sr=Me.length,ir;++Be0?Be=Yn:(ue.c=null,ue.t=NaN,ue=null,jt.end({type:"end",alpha:Be=0})):Yn>0&&(jt.start({type:"start",alpha:Be=Yn}),ue=Ri(At.tick)),At):Be},At.start=function(){var Yn,ja=On.length,Ha=Bi.length,ro=Me[0],Lo=Me[1],Fo,Uo;for(Yn=0;Yn=0;)Be.push(Xr=en[Mr]),Xr.parent=ir,Xr.depth=ir.depth+1;ue&&(ir.value=0),ir.children=en}else ue&&(ir.value=+ue.call(Me,ir,ir.depth)||0),delete ir.children;return gh(Le,function(vn){var In,On;At&&(In=vn.children)&&In.sort(At),ue&&(On=vn.parent)&&(On.value+=vn.value)}),sr}return Me.sort=function(Le){return arguments.length?(At=Le,Me):At},Me.children=function(Le){return arguments.length?(jt=Le,Me):jt},Me.value=function(Le){return arguments.length?(ue=Le,Me):ue},Me.revalue=function(Le){return ue&&(uf(Le,function(Be){Be.children&&(Be.value=0)}),gh(Le,function(Be){var sr;Be.children||(Be.value=+ue.call(Me,Be,Be.depth)||0),(sr=Be.parent)&&(sr.value+=Be.value)})),Le},Me};function _u(At,jt){return c.rebind(At,jt,"sort","children","value"),At.nodes=At,At.links=Qd,At}function uf(At,jt){for(var ue=[At];(At=ue.pop())!=null;)if(jt(At),(Le=At.children)&&(Me=Le.length))for(var Me,Le;--Me>=0;)ue.push(Le[Me])}function gh(At,jt){for(var ue=[At],Me=[];(At=ue.pop())!=null;)if(Me.push(At),(sr=At.children)&&(Be=sr.length))for(var Le=-1,Be,sr;++LeLe&&(Le=ir),Me.push(ir)}for(sr=0;srMe&&(ue=jt,Me=Le);return ue}function Ch(At){return At.reduce(Vc,0)}function Vc(At,jt){return At+jt[1]}c.layout.histogram=function(){var At=!0,jt=Number,ue=bf,Me=fd;function Le(Be,sr){for(var ir=[],Mr=Be.map(jt,this),en=ue.call(this,Mr,sr),Xr=Me.call(this,en,Mr,sr),vn,sr=-1,In=Mr.length,On=Xr.length-1,Bi=At?1:1/In,Un;++sr0)for(sr=-1;++sr=en[0]&&Un<=en[1]&&(vn=ir[c.bisect(Xr,Un,1,On)-1],vn.y+=Bi,vn.push(Be[sr]));return ir}return Le.value=function(Be){return arguments.length?(jt=Be,Le):jt},Le.range=function(Be){return arguments.length?(ue=Ee(Be),Le):ue},Le.bins=function(Be){return arguments.length?(Me=typeof Be=="number"?function(sr){return vu(sr,Be)}:Ee(Be),Le):Me},Le.frequency=function(Be){return arguments.length?(At=!!Be,Le):At},Le};function fd(At,jt){return vu(At,Math.ceil(Math.log(jt.length)/Math.LN2+1))}function vu(At,jt){for(var ue=-1,Me=+At[0],Le=(At[1]-Me)/jt,Be=[];++ue<=jt;)Be[ue]=Le*ue+Me;return Be}function bf(At){return[c.min(At),c.max(At)]}c.layout.pack=function(){var At=c.layout.hierarchy().sort(qh),jt=0,ue=[1,1],Me;function Le(Be,sr){var ir=At.call(this,Be,sr),Mr=ir[0],en=ue[0],Xr=ue[1],vn=Me==null?Math.sqrt:typeof Me=="function"?Me:function(){return Me};if(Mr.x=Mr.y=0,gh(Mr,function(On){On.r=+vn(On.value)}),gh(Mr,wf),jt){var In=jt*(Me?1:Math.max(2*Mr.r/en,2*Mr.r/Xr))/2;gh(Mr,function(On){On.r+=In}),gh(Mr,wf),gh(Mr,function(On){On.r-=In})}return Jf(Mr,en/2,Xr/2,Me?1:1/Math.max(2*Mr.r/en,2*Mr.r/Xr)),ir}return Le.size=function(Be){return arguments.length?(ue=Be,Le):ue},Le.radius=function(Be){return arguments.length?(Me=Be==null||typeof Be=="function"?Be:+Be,Le):Me},Le.padding=function(Be){return arguments.length?(jt=+Be,Le):jt},_u(Le,At)};function qh(At,jt){return At.value-jt.value}function th(At,jt){var ue=At._pack_next;At._pack_next=jt,jt._pack_prev=At,jt._pack_next=ue,ue._pack_prev=jt}function rf(At,jt){At._pack_next=jt,jt._pack_prev=At}function Zh(At,jt){var ue=jt.x-At.x,Me=jt.y-At.y,Le=At.r+jt.r;return .999*Le*Le>ue*ue+Me*Me}function wf(At){if(!(jt=At.children)||!(In=jt.length))return;var jt,ue=1/0,Me=-1/0,Le=1/0,Be=-1/0,sr,ir,Mr,en,Xr,vn,In;function On(Yn){ue=Math.min(Yn.x-Yn.r,ue),Me=Math.max(Yn.x+Yn.r,Me),Le=Math.min(Yn.y-Yn.r,Le),Be=Math.max(Yn.y+Yn.r,Be)}if(jt.forEach(zd),sr=jt[0],sr.x=-sr.r,sr.y=0,On(sr),In>1&&(ir=jt[1],ir.x=ir.r,ir.y=0,On(ir),In>2))for(Mr=jt[2],eh(sr,ir,Mr),On(Mr),th(sr,Mr),sr._pack_prev=Mr,th(Mr,ir),ir=sr._pack_next,en=3;enmi.x&&(mi=ja),ja.depth>Ti.depth&&(Ti=ja)});var Ii=jt(Un,mi)/2-Un.x,Wi=ue[0]/(mi.x+jt(mi,Un)/2+Ii),Yn=ue[1]/(Ti.depth||1);uf(On,function(ja){ja.x=(ja.x+Ii)*Wi,ja.y=ja.depth*Yn})}return In}function Be(Xr){for(var vn={A:null,children:[Xr]},In=[vn],On;(On=In.pop())!=null;)for(var Bi=On.children,Un,mi=0,Ti=Bi.length;mi0&&(eu(df(Un,Xr,In),Xr,ja),Ti+=ja,Ii+=ja),Wi+=Un.m,Ti+=On.m,Yn+=mi.m,Ii+=Bi.m;Un&&!Ru(Bi)&&(Bi.t=Un,Bi.m+=Wi-Ii),On&&!yh(mi)&&(mi.t=On,mi.m+=Ti-Yn,In=Xr)}return In}function en(Xr){Xr.x*=ue[0],Xr.y=Xr.depth*ue[1]}return Le.separation=function(Xr){return arguments.length?(jt=Xr,Le):jt},Le.size=function(Xr){return arguments.length?(Me=(ue=Xr)==null?en:null,Le):Me?null:ue},Le.nodeSize=function(Xr){return arguments.length?(Me=(ue=Xr)==null?null:en,Le):Me?ue:null},_u(Le,At)};function Lh(At,jt){return At.parent==jt.parent?1:2}function yh(At){var jt=At.children;return jt.length?jt[0]:At.t}function Ru(At){var jt=At.children,ue;return(ue=jt.length)?jt[ue-1]:At.t}function eu(At,jt,ue){var Me=ue/(jt.i-At.i);jt.c-=Me,jt.s+=ue,At.c+=Me,jt.z+=ue,jt.m+=ue}function xh(At){for(var jt=0,ue=0,Me=At.children,Le=Me.length,Be;--Le>=0;)Be=Me[Le],Be.z+=jt,Be.m+=jt,jt+=Be.s+(ue+=Be.c)}function df(At,jt,ue){return At.a.parent===jt.parent?At.a:ue}c.layout.cluster=function(){var At=c.layout.hierarchy().sort(null).value(null),jt=Lh,ue=[1,1],Me=!1;function Le(Be,sr){var ir=At.call(this,Be,sr),Mr=ir[0],en,Xr=0;gh(Mr,function(Un){var mi=Un.children;mi&&mi.length?(Un.x=qf(mi),Un.y=_h(mi)):(Un.x=en?Xr+=jt(Un,en):0,Un.y=0,en=Un)});var vn=mr(Mr),In=Ur(Mr),On=vn.x-jt(vn,In)/2,Bi=In.x+jt(In,vn)/2;return gh(Mr,Me?function(Un){Un.x=(Un.x-Mr.x)*ue[0],Un.y=(Mr.y-Un.y)*ue[1]}:function(Un){Un.x=(Un.x-On)/(Bi-On)*ue[0],Un.y=(1-(Mr.y?Un.y/Mr.y:1))*ue[1]}),ir}return Le.separation=function(Be){return arguments.length?(jt=Be,Le):jt},Le.size=function(Be){return arguments.length?(Me=(ue=Be)==null,Le):Me?null:ue},Le.nodeSize=function(Be){return arguments.length?(Me=(ue=Be)!=null,Le):Me?ue:null},_u(Le,At)};function _h(At){return 1+c.max(At,function(jt){return jt.y})}function qf(At){return At.reduce(function(jt,ue){return jt+ue.x},0)/At.length}function mr(At){var jt=At.children;return jt&&jt.length?mr(jt[0]):At}function Ur(At){var jt=At.children,ue;return jt&&(ue=jt.length)?Ur(jt[ue-1]):At}c.layout.treemap=function(){var At=c.layout.hierarchy(),jt=Math.round,ue=[1,1],Me=null,Le=_n,Be=!1,sr,ir="squarify",Mr=.5*(1+Math.sqrt(5));function en(Un,mi){for(var Ti=-1,Ii=Un.length,Wi,Yn;++Ti0;)Ii.push(Yn=Wi[Lo-1]),Ii.area+=Yn.area,ir!=="squarify"||(Ha=In(Ii,ro))<=ja?(Wi.pop(),ja=Ha):(Ii.area-=Ii.pop().area,On(Ii,ro,Ti,!1),ro=Math.min(Ti.dx,Ti.dy),Ii.length=Ii.area=0,ja=1/0);Ii.length&&(On(Ii,ro,Ti,!0),Ii.length=Ii.area=0),mi.forEach(Xr)}}function vn(Un){var mi=Un.children;if(mi&&mi.length){var Ti=Le(Un),Ii=mi.slice(),Wi,Yn=[];for(en(Ii,Ti.dx*Ti.dy/Un.value),Yn.area=0;Wi=Ii.pop();)Yn.push(Wi),Yn.area+=Wi.area,Wi.z!=null&&(On(Yn,Wi.z?Ti.dx:Ti.dy,Ti,!Ii.length),Yn.length=Yn.area=0);mi.forEach(vn)}}function In(Un,mi){for(var Ti=Un.area,Ii,Wi=0,Yn=1/0,ja=-1,Ha=Un.length;++jaWi&&(Wi=Ii));return Ti*=Ti,mi*=mi,Ti?Math.max(mi*Wi*Mr/Ti,Ti/(mi*Yn*Mr)):1/0}function On(Un,mi,Ti,Ii){var Wi=-1,Yn=Un.length,ja=Ti.x,Ha=Ti.y,ro=mi?jt(Un.area/mi):0,Lo;if(mi==Ti.dx){for((Ii||ro>Ti.dy)&&(ro=Ti.dy);++WiTi.dx)&&(ro=Ti.dx);++Wi1);return At+jt*Me*Math.sqrt(-2*Math.log(Be)/Be)}},logNormal:function(){var At=c.random.normal.apply(c,arguments);return function(){return Math.exp(At())}},bates:function(At){var jt=c.random.irwinHall(At);return function(){return jt()/At}},irwinHall:function(At){return function(){for(var jt=0,ue=0;ue2?ua:ea,en=Me?Yf:Ld;return Le=Mr(At,jt,en,ue),Be=Mr(jt,At,en,el),ir}function ir(Mr){return Le(Mr)}return ir.invert=function(Mr){return Be(Mr)},ir.domain=function(Mr){return arguments.length?(At=Mr.map(Number),sr()):At},ir.range=function(Mr){return arguments.length?(jt=Mr,sr()):jt},ir.rangeRound=function(Mr){return ir.range(Mr).interpolate(Vh)},ir.clamp=function(Mr){return arguments.length?(Me=Mr,sr()):Me},ir.interpolate=function(Mr){return arguments.length?(ue=Mr,sr()):ue},ir.ticks=function(Mr){return rs(At,Mr)},ir.tickFormat=function(Mr,en){return d3_scale_linearTickFormat(At,Mr,en)},ir.nice=function(Mr){return Ji(At,Mr),sr()},ir.copy=function(){return za(At,jt,ue,Me)},sr()}function wa(At,jt){return c.rebind(At,jt,"range","rangeRound","interpolate","clamp")}function Ji(At,jt){return ga(At,Ra(eo(At,jt)[2])),ga(At,Ra(eo(At,jt)[2])),At}function eo(At,jt){jt==null&&(jt=10);var ue=Wn(At),Me=ue[1]-ue[0],Le=Math.pow(10,Math.floor(Math.log(Me/jt)/Math.LN10)),Be=jt/Me*Le;return Be<=.15?Le*=10:Be<=.35?Le*=5:Be<=.75&&(Le*=2),ue[0]=Math.ceil(ue[0]/Le)*Le,ue[1]=Math.floor(ue[1]/Le)*Le+Le*.5,ue[2]=Le,ue}function rs(At,jt){return c.range.apply(c,eo(At,jt))}c.scale.log=function(){return Zo(c.scale.linear().domain([0,1]),10,!0,[1,10])};function Zo(At,jt,ue,Me){function Le(ir){return(ue?Math.log(ir<0?0:ir):-Math.log(ir>0?0:-ir))/Math.log(jt)}function Be(ir){return ue?Math.pow(jt,ir):-Math.pow(jt,-ir)}function sr(ir){return At(Le(ir))}return sr.invert=function(ir){return Be(At.invert(ir))},sr.domain=function(ir){return arguments.length?(ue=ir[0]>=0,At.domain((Me=ir.map(Number)).map(Le)),sr):Me},sr.base=function(ir){return arguments.length?(jt=+ir,At.domain(Me.map(Le)),sr):jt},sr.nice=function(){var ir=ga(Me.map(Le),ue?Math:os);return At.domain(ir),Me=ir.map(Be),sr},sr.ticks=function(){var ir=Wn(Me),Mr=[],en=ir[0],Xr=ir[1],vn=Math.floor(Le(en)),In=Math.ceil(Le(Xr)),On=jt%1?2:jt;if(isFinite(In-vn)){if(ue){for(;vn0;Bi--)Mr.push(Be(vn)*Bi);for(vn=0;Mr[vn]Xr;In--);Mr=Mr.slice(vn,In)}return Mr},sr.copy=function(){return Zo(At.copy(),jt,ue,Me)},wa(sr,At)}var os={floor:function(At){return-Math.ceil(-At)},ceil:function(At){return-Math.floor(-At)}};c.scale.pow=function(){return fs(c.scale.linear(),1,[0,1])};function fs(At,jt,ue){var Me=no(jt),Le=no(1/jt);function Be(sr){return At(Me(sr))}return Be.invert=function(sr){return Le(At.invert(sr))},Be.domain=function(sr){return arguments.length?(At.domain((ue=sr.map(Number)).map(Me)),Be):ue},Be.ticks=function(sr){return rs(ue,sr)},Be.tickFormat=function(sr,ir){return d3_scale_linearTickFormat(ue,sr,ir)},Be.nice=function(sr){return Be.domain(Ji(ue,sr))},Be.exponent=function(sr){return arguments.length?(Me=no(jt=sr),Le=no(1/jt),At.domain(ue.map(Me)),Be):jt},Be.copy=function(){return fs(At.copy(),jt,ue)},wa(Be,At)}function no(At){return function(jt){return jt<0?-Math.pow(-jt,At):Math.pow(jt,At)}}c.scale.sqrt=function(){return c.scale.pow().exponent(.5)},c.scale.ordinal=function(){return qa([],{t:"range",a:[[]]})};function qa(At,jt){var ue,Me,Le;function Be(ir){return Me[((ue.get(ir)||(jt.t==="range"?ue.set(ir,At.push(ir)):NaN))-1)%Me.length]}function sr(ir,Mr){return c.range(At.length).map(function(en){return ir+Mr*en})}return Be.domain=function(ir){if(!arguments.length)return At;At=[],ue=new C;for(var Mr=-1,en=ir.length,Xr;++Mr0?ue[Be-1]:At[0],BeIn?0:1;if(Xr=Nt)return Mr(Xr,Bi)+(en?Mr(en,1-Bi):"")+"Z";var Un,mi,Ti,Ii,Wi=0,Yn=0,ja,Ha,ro,Lo,Fo,Uo,al,Wo,ps=[];if((Ii=(+sr.apply(this,arguments)||0)/2)&&(Ti=Me===uu?Math.sqrt(en*en+Xr*Xr):+Me.apply(this,arguments),Bi||(Yn*=-1),Xr&&(Yn=qe(Ti/Xr*Math.sin(Ii))),en&&(Wi=qe(Ti/en*Math.sin(Ii)))),Xr){ja=Xr*Math.cos(vn+Yn),Ha=Xr*Math.sin(vn+Yn),ro=Xr*Math.cos(In-Yn),Lo=Xr*Math.sin(In-Yn);var Tl=Math.abs(In-vn-2*Yn)<=gt?0:1;if(Yn&&Hc(ja,Ha,ro,Lo)===Bi^Tl){var Ku=(vn+In)/2;ja=Xr*Math.cos(Ku),Ha=Xr*Math.sin(Ku),ro=Lo=null}}else ja=Ha=0;if(en){Fo=en*Math.cos(In-Wi),Uo=en*Math.sin(In-Wi),al=en*Math.cos(vn+Wi),Wo=en*Math.sin(vn+Wi);var cu=Math.abs(vn-In+2*Wi)<=gt?0:1;if(Wi&&Hc(Fo,Uo,al,Wo)===1-Bi^cu){var _o=(vn+In)/2;Fo=en*Math.cos(_o),Uo=en*Math.sin(_o),al=Wo=null}}else Fo=Uo=0;if(On>ne&&(Un=Math.min(Math.abs(Xr-en)/2,+ue.apply(this,arguments)))>.001){mi=en0?0:1}function Pc(At,jt,ue,Me,Le){var Be=At[0]-jt[0],sr=At[1]-jt[1],ir=(Le?Me:-Me)/Math.sqrt(Be*Be+sr*sr),Mr=ir*sr,en=-ir*Be,Xr=At[0]+Mr,vn=At[1]+en,In=jt[0]+Mr,On=jt[1]+en,Bi=(Xr+In)/2,Un=(vn+On)/2,mi=In-Xr,Ti=On-vn,Ii=mi*mi+Ti*Ti,Wi=ue-Me,Yn=Xr*On-In*vn,ja=(Ti<0?-1:1)*Math.sqrt(Math.max(0,Wi*Wi*Ii-Yn*Yn)),Ha=(Yn*Ti-mi*ja)/Ii,ro=(-Yn*mi-Ti*ja)/Ii,Lo=(Yn*Ti+mi*ja)/Ii,Fo=(-Yn*mi+Ti*ja)/Ii,Uo=Ha-Bi,al=ro-Un,Wo=Lo-Bi,ps=Fo-Un;return Uo*Uo+al*al>Wo*Wo+ps*ps&&(Ha=Lo,ro=Fo),[[Ha-Mr,ro-en],[Ha*ue/Wi,ro*ue/Wi]]}function Ph(){return!0}function Wc(At){var jt=po,ue=Do,Me=Ph,Le=Iu,Be=Le.key,sr=.7;function ir(Mr){var en=[],Xr=[],vn=-1,In=Mr.length,On,Bi=Ee(jt),Un=Ee(ue);function mi(){en.push("M",Le(At(Xr),sr))}for(;++vn1?At.join("L"):At+"Z"}function Ih(At){return At.join("L")+"Z"}function es(At){for(var jt=0,ue=At.length,Me=At[0],Le=[Me[0],",",Me[1]];++jt1&&Le.push("H",Me[0]),Le.join("")}function zs(At){for(var jt=0,ue=At.length,Me=At[0],Le=[Me[0],",",Me[1]];++jt1){ir=jt[1],Be=At[Mr],Mr++,Me+="C"+(Le[0]+sr[0])+","+(Le[1]+sr[1])+","+(Be[0]-ir[0])+","+(Be[1]-ir[1])+","+Be[0]+","+Be[1];for(var en=2;en9&&(Be=ue*3/Math.sqrt(Be),sr[ir]=Be*Me,sr[ir+1]=Be*Le));for(ir=-1;++ir<=Mr;)Be=(At[Math.min(Mr,ir+1)][0]-At[Math.max(0,ir-1)][0])/(6*(1+sr[ir]*sr[ir])),jt.push([Be||0,sr[ir]*Be||0]);return jt}function ae(At){return At.length<3?Iu(At):At[0]+I(At,Xt(At))}c.svg.line.radial=function(){var At=Wc(xe);return At.radius=At.x,delete At.x,At.angle=At.y,delete At.y,At};function xe(At){for(var jt,ue=-1,Me=At.length,Le,Be;++uegt)+",1 "+vn}function en(Xr,vn,In,On){return"Q 0,0 "+On}return Be.radius=function(Xr){return arguments.length?(ue=Ee(Xr),Be):ue},Be.source=function(Xr){return arguments.length?(At=Ee(Xr),Be):At},Be.target=function(Xr){return arguments.length?(jt=Ee(Xr),Be):jt},Be.startAngle=function(Xr){return arguments.length?(Me=Ee(Xr),Be):Me},Be.endAngle=function(Xr){return arguments.length?(Le=Ee(Xr),Be):Le},Be};function Ze(At){return At.radius}c.svg.diagonal=function(){var At=je,jt=Ie,ue=wr;function Me(Le,Be){var sr=At.call(this,Le,Be),ir=jt.call(this,Le,Be),Mr=(sr.y+ir.y)/2,en=[sr,{x:sr.x,y:Mr},{x:ir.x,y:Mr},ir];return en=en.map(ue),"M"+en[0]+"C"+en[1]+" "+en[2]+" "+en[3]}return Me.source=function(Le){return arguments.length?(At=Ee(Le),Me):At},Me.target=function(Le){return arguments.length?(jt=Ee(Le),Me):jt},Me.projection=function(Le){return arguments.length?(ue=Le,Me):ue},Me};function wr(At){return[At.x,At.y]}c.svg.diagonal.radial=function(){var At=c.svg.diagonal(),jt=wr,ue=At.projection;return At.projection=function(Me){return arguments.length?ue(Ir(jt=Me)):jt},At};function Ir(At){return function(){var jt=At.apply(this,arguments),ue=jt[0],Me=jt[1]-ee;return[ue*Math.cos(Me),ue*Math.sin(Me)]}}c.svg.symbol=function(){var At=tn,jt=Nr;function ue(Me,Le){return(zn.get(At.call(this,Me,Le))||mn)(jt.call(this,Me,Le))}return ue.type=function(Me){return arguments.length?(At=Ee(Me),ue):At},ue.size=function(Me){return arguments.length?(jt=Ee(Me),ue):jt},ue};function Nr(){return 64}function tn(){return"circle"}function mn(At){var jt=Math.sqrt(At/gt);return"M0,"+jt+"A"+jt+","+jt+" 0 1,1 0,"+-jt+"A"+jt+","+jt+" 0 1,1 0,"+jt+"Z"}var zn=c.map({circle:mn,cross:function(At){var jt=Math.sqrt(At/5)/2;return"M"+-3*jt+","+-jt+"H"+-jt+"V"+-3*jt+"H"+jt+"V"+-jt+"H"+3*jt+"V"+jt+"H"+jt+"V"+3*jt+"H"+-jt+"V"+jt+"H"+-3*jt+"Z"},diamond:function(At){var jt=Math.sqrt(At/(2*ri)),ue=jt*ri;return"M0,"+-jt+"L"+ue+",0 0,"+jt+" "+-ue+",0Z"},square:function(At){var jt=Math.sqrt(At)/2;return"M"+-jt+","+-jt+"L"+jt+","+-jt+" "+jt+","+jt+" "+-jt+","+jt+"Z"},"triangle-down":function(At){var jt=Math.sqrt(At/Bn),ue=jt*Bn/2;return"M0,"+ue+"L"+jt+","+-ue+" "+-jt+","+-ue+"Z"},"triangle-up":function(At){var jt=Math.sqrt(At/Bn),ue=jt*Bn/2;return"M0,"+-ue+"L"+jt+","+ue+" "+-jt+","+ue+"Z"}});c.svg.symbolTypes=zn.keys();var Bn=Math.sqrt(3),ri=Math.tan(30*le);it.transition=function(At){for(var jt=Ro||++io,ue=vl(At),Me=[],Le,Be,sr=Mo||{time:Date.now(),ease:Jo,delay:0,duration:250},ir=-1,Mr=this.length;++ir0;)vn[--Ii].call(At,Ti);if(mi>=1)return sr.event&&sr.event.end.call(At,At.__data__,jt),--Be.count?delete Be[Me]:delete At[ue],1}sr||(ir=Le.time,Mr=Ri(In,0,ir),sr=Be[Me]={tween:new C,time:ir,timer:Mr,delay:Le.delay,duration:Le.duration,ease:Le.ease,index:jt},Le=null,++Be.count)}c.svg.axis=function(){var At=c.scale.linear(),jt=bl,ue=6,Me=6,Le=3,Be=[10],sr=null,ir;function Mr(en){en.each(function(){var Xr=c.select(this),vn=this.__chart__||At,In=this.__chart__=At.copy(),On=sr??(In.ticks?In.ticks.apply(In,Be):In.domain()),Bi=ir??(In.tickFormat?In.tickFormat.apply(In,Be):V),Un=Xr.selectAll(".tick").data(On,In),mi=Un.enter().insert("g",".domain").attr("class","tick").style("opacity",ne),Ti=c.transition(Un.exit()).style("opacity",ne).remove(),Ii=c.transition(Un.order()).style("opacity",1),Wi=Math.max(ue,0)+Le,Yn,ja=hi(In),Ha=Xr.selectAll(".domain").data([0]),ro=(Ha.enter().append("path").attr("class","domain"),c.transition(Ha));mi.append("line"),mi.append("text");var Lo=mi.select("line"),Fo=Ii.select("line"),Uo=Un.select("text").text(Bi),al=mi.select("text"),Wo=Ii.select("text"),ps=jt==="top"||jt==="left"?-1:1,Tl,Ku,cu,_o;if(jt==="bottom"||jt==="top"?(Yn=mu,Tl="x",cu="y",Ku="x2",_o="y2",Uo.attr("dy",ps<0?"0em":".71em").style("text-anchor","middle"),ro.attr("d","M"+ja[0]+","+ps*Me+"V0H"+ja[1]+"V"+ps*Me)):(Yn=Ws,Tl="y",cu="x",Ku="y2",_o="x2",Uo.attr("dy",".32em").style("text-anchor",ps<0?"end":"start"),ro.attr("d","M"+ps*Me+","+ja[0]+"H0V"+ja[1]+"H"+ps*Me)),Lo.attr(_o,ps*ue),al.attr(cu,ps*Wi),Fo.attr(Ku,0).attr(_o,ps*ue),Wo.attr(Tl,0).attr(cu,ps*Wi),In.rangeBand){var Zs=In,rl=Zs.rangeBand()/2;vn=In=function(ou){return Zs(ou)+rl}}else vn.rangeBand?vn=In:Ti.call(Yn,In,vn);mi.call(Yn,vn,In),Ii.call(Yn,In,In)})}return Mr.scale=function(en){return arguments.length?(At=en,Mr):At},Mr.orient=function(en){return arguments.length?(jt=en in Su?en+"":bl,Mr):jt},Mr.ticks=function(){return arguments.length?(Be=P(arguments),Mr):Be},Mr.tickValues=function(en){return arguments.length?(sr=en,Mr):sr},Mr.tickFormat=function(en){return arguments.length?(ir=en,Mr):ir},Mr.tickSize=function(en){var Xr=arguments.length;return Xr?(ue=+en,Me=+arguments[Xr-1],Mr):ue},Mr.innerTickSize=function(en){return arguments.length?(ue=+en,Mr):ue},Mr.outerTickSize=function(en){return arguments.length?(Me=+en,Mr):Me},Mr.tickPadding=function(en){return arguments.length?(Le=+en,Mr):Le},Mr.tickSubdivide=function(){return arguments.length&&Mr},Mr};var bl="bottom",Su={top:1,right:1,bottom:1,left:1};function mu(At,jt,ue){At.attr("transform",function(Me){var Le=jt(Me);return"translate("+(isFinite(Le)?Le:ue(Me))+",0)"})}function Ws(At,jt,ue){At.attr("transform",function(Me){var Le=jt(Me);return"translate(0,"+(isFinite(Le)?Le:ue(Me))+")"})}c.svg.brush=function(){var At=pt(Xr,"brushstart","brush","brushend"),jt=null,ue=null,Me=[0,0],Le=[0,0],Be,sr,ir=!0,Mr=!0,en=Yu[0];function Xr(Un){Un.each(function(){var mi=c.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Bi).on("touchstart.brush",Bi),Ti=mi.selectAll(".background").data([0]);Ti.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),mi.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Ii=mi.selectAll(".resize").data(en,V);Ii.exit().remove(),Ii.enter().append("g").attr("class",function(Ha){return"resize "+Ha}).style("cursor",function(Ha){return qs[Ha]}).append("rect").attr("x",function(Ha){return/[ew]$/.test(Ha)?-3:null}).attr("y",function(Ha){return/^[ns]/.test(Ha)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Ii.style("display",Xr.empty()?"none":null);var Wi=c.transition(mi),Yn=c.transition(Ti),ja;jt&&(ja=hi(jt),Yn.attr("x",ja[0]).attr("width",ja[1]-ja[0]),In(Wi)),ue&&(ja=hi(ue),Yn.attr("y",ja[0]).attr("height",ja[1]-ja[0]),On(Wi)),vn(Wi)})}Xr.event=function(Un){Un.each(function(){var mi=At.of(this,arguments),Ti={x:Me,y:Le,i:Be,j:sr},Ii=this.__chart__||Ti;this.__chart__=Ti,Ro?c.select(this).transition().each("start.brush",function(){Be=Ii.i,sr=Ii.j,Me=Ii.x,Le=Ii.y,mi({type:"brushstart"})}).tween("brush:brush",function(){var Wi=Zl(Me,Ti.x),Yn=Zl(Le,Ti.y);return Be=sr=null,function(ja){Me=Ti.x=Wi(ja),Le=Ti.y=Yn(ja),mi({type:"brush",mode:"resize"})}}).each("end.brush",function(){Be=Ti.i,sr=Ti.j,mi({type:"brush",mode:"resize"}),mi({type:"brushend"})}):(mi({type:"brushstart"}),mi({type:"brush",mode:"resize"}),mi({type:"brushend"}))})};function vn(Un){Un.selectAll(".resize").attr("transform",function(mi){return"translate("+Me[+/e$/.test(mi)]+","+Le[+/^s/.test(mi)]+")"})}function In(Un){Un.select(".extent").attr("x",Me[0]),Un.selectAll(".extent,.n>rect,.s>rect").attr("width",Me[1]-Me[0])}function On(Un){Un.select(".extent").attr("y",Le[0]),Un.selectAll(".extent,.e>rect,.w>rect").attr("height",Le[1]-Le[0])}function Bi(){var Un=this,mi=c.select(c.event.target),Ti=At.of(Un,arguments),Ii=c.select(Un),Wi=mi.datum(),Yn=!/^(n|s)$/.test(Wi)&&jt,ja=!/^(e|w)$/.test(Wi)&&ue,Ha=mi.classed("extent"),ro=Kr(Un),Lo,Fo=c.mouse(Un),Uo,al=c.select(e(Un)).on("keydown.brush",Tl).on("keyup.brush",Ku);if(c.event.changedTouches?al.on("touchmove.brush",cu).on("touchend.brush",Zs):al.on("mousemove.brush",cu).on("mouseup.brush",Zs),Ii.interrupt().selectAll("*").interrupt(),Ha)Fo[0]=Me[0]-Fo[0],Fo[1]=Le[0]-Fo[1];else if(Wi){var Wo=+/w$/.test(Wi),ps=+/^n/.test(Wi);Uo=[Me[1-Wo]-Fo[0],Le[1-ps]-Fo[1]],Fo[0]=Me[Wo],Fo[1]=Le[ps]}else c.event.altKey&&(Lo=Fo.slice());Ii.style("pointer-events","none").selectAll(".resize").style("display",null),c.select("body").style("cursor",mi.style("cursor")),Ti({type:"brushstart"}),cu();function Tl(){c.event.keyCode==32&&(Ha||(Lo=null,Fo[0]-=Me[1],Fo[1]-=Le[1],Ha=2),lt())}function Ku(){c.event.keyCode==32&&Ha==2&&(Fo[0]+=Me[1],Fo[1]+=Le[1],Ha=0,lt())}function cu(){var rl=c.mouse(Un),ou=!1;Uo&&(rl[0]+=Uo[0],rl[1]+=Uo[1]),Ha||(c.event.altKey?(Lo||(Lo=[(Me[0]+Me[1])/2,(Le[0]+Le[1])/2]),Fo[0]=Me[+(rl[0]{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g=new Date,P=new Date;function S(Mt,te,ve,oe){function Te(He){return Mt(He=arguments.length===0?new Date:new Date(+He)),He}return Te.floor=function(He){return Mt(He=new Date(+He)),He},Te.ceil=function(He){return Mt(He=new Date(He-1)),te(He,1),Mt(He),He},Te.round=function(He){var Ge=Te(He),cr=Te.ceil(He);return He-Ge0))return ur;do ur.push(jr=new Date(+He)),te(He,cr),Mt(He);while(jr=Ge)for(;Mt(Ge),!He(Ge);)Ge.setTime(Ge-1)},function(Ge,cr){if(Ge>=Ge)if(cr<0)for(;++cr<=0;)for(;te(Ge,-1),!He(Ge););else for(;--cr>=0;)for(;te(Ge,1),!He(Ge););})},ve&&(Te.count=function(He,Ge){return g.setTime(+He),P.setTime(+Ge),Mt(g),Mt(P),Math.floor(ve(g,P))},Te.every=function(He){return He=Math.floor(He),!isFinite(He)||!(He>0)?null:He>1?Te.filter(oe?function(Ge){return oe(Ge)%He===0}:function(Ge){return Te.count(0,Ge)%He===0}):Te}),Te}var t=S(function(){},function(Mt,te){Mt.setTime(+Mt+te)},function(Mt,te){return te-Mt});t.every=function(Mt){return Mt=Math.floor(Mt),!isFinite(Mt)||!(Mt>0)?null:Mt>1?S(function(te){te.setTime(Math.floor(te/Mt)*Mt)},function(te,ve){te.setTime(+te+ve*Mt)},function(te,ve){return(ve-te)/Mt}):t};var e=t.range,r=1e3,a=6e4,n=36e5,o=864e5,i=6048e5,s=S(function(Mt){Mt.setTime(Mt-Mt.getMilliseconds())},function(Mt,te){Mt.setTime(+Mt+te*r)},function(Mt,te){return(te-Mt)/r},function(Mt){return Mt.getUTCSeconds()}),f=s.range,x=S(function(Mt){Mt.setTime(Mt-Mt.getMilliseconds()-Mt.getSeconds()*r)},function(Mt,te){Mt.setTime(+Mt+te*a)},function(Mt,te){return(te-Mt)/a},function(Mt){return Mt.getMinutes()}),y=x.range,v=S(function(Mt){Mt.setTime(Mt-Mt.getMilliseconds()-Mt.getSeconds()*r-Mt.getMinutes()*a)},function(Mt,te){Mt.setTime(+Mt+te*n)},function(Mt,te){return(te-Mt)/n},function(Mt){return Mt.getHours()}),T=v.range,u=S(function(Mt){Mt.setHours(0,0,0,0)},function(Mt,te){Mt.setDate(Mt.getDate()+te)},function(Mt,te){return(te-Mt-(te.getTimezoneOffset()-Mt.getTimezoneOffset())*a)/o},function(Mt){return Mt.getDate()-1}),b=u.range;function _(Mt){return S(function(te){te.setDate(te.getDate()-(te.getDay()+7-Mt)%7),te.setHours(0,0,0,0)},function(te,ve){te.setDate(te.getDate()+ve*7)},function(te,ve){return(ve-te-(ve.getTimezoneOffset()-te.getTimezoneOffset())*a)/i})}var C=_(0),M=_(1),E=_(2),A=_(3),h=_(4),p=_(5),k=_(6),w=C.range,R=M.range,O=E.range,N=A.range,V=h.range,H=p.range,F=k.range,U=S(function(Mt){Mt.setDate(1),Mt.setHours(0,0,0,0)},function(Mt,te){Mt.setMonth(Mt.getMonth()+te)},function(Mt,te){return te.getMonth()-Mt.getMonth()+(te.getFullYear()-Mt.getFullYear())*12},function(Mt){return Mt.getMonth()}),W=U.range,q=S(function(Mt){Mt.setMonth(0,1),Mt.setHours(0,0,0,0)},function(Mt,te){Mt.setFullYear(Mt.getFullYear()+te)},function(Mt,te){return te.getFullYear()-Mt.getFullYear()},function(Mt){return Mt.getFullYear()});q.every=function(Mt){return!isFinite(Mt=Math.floor(Mt))||!(Mt>0)?null:S(function(te){te.setFullYear(Math.floor(te.getFullYear()/Mt)*Mt),te.setMonth(0,1),te.setHours(0,0,0,0)},function(te,ve){te.setFullYear(te.getFullYear()+ve*Mt)})};var X=q.range,lt=S(function(Mt){Mt.setUTCSeconds(0,0)},function(Mt,te){Mt.setTime(+Mt+te*a)},function(Mt,te){return(te-Mt)/a},function(Mt){return Mt.getUTCMinutes()}),yt=lt.range,pt=S(function(Mt){Mt.setUTCMinutes(0,0,0)},function(Mt,te){Mt.setTime(+Mt+te*n)},function(Mt,te){return(te-Mt)/n},function(Mt){return Mt.getUTCHours()}),st=pt.range,tt=S(function(Mt){Mt.setUTCHours(0,0,0,0)},function(Mt,te){Mt.setUTCDate(Mt.getUTCDate()+te)},function(Mt,te){return(te-Mt)/o},function(Mt){return Mt.getUTCDate()-1}),dt=tt.range;function rt(Mt){return S(function(te){te.setUTCDate(te.getUTCDate()-(te.getUTCDay()+7-Mt)%7),te.setUTCHours(0,0,0,0)},function(te,ve){te.setUTCDate(te.getUTCDate()+ve*7)},function(te,ve){return(ve-te)/i})}var at=rt(0),vt=rt(1),it=rt(2),Y=rt(3),ft=rt(4),ut=rt(5),wt=rt(6),zt=at.range,Pt=vt.range,Wt=it.range,Ht=Y.range,Jt=ft.range,ge=ut.range,he=wt.range,de=S(function(Mt){Mt.setUTCDate(1),Mt.setUTCHours(0,0,0,0)},function(Mt,te){Mt.setUTCMonth(Mt.getUTCMonth()+te)},function(Mt,te){return te.getUTCMonth()-Mt.getUTCMonth()+(te.getUTCFullYear()-Mt.getUTCFullYear())*12},function(Mt){return Mt.getUTCMonth()}),se=de.range,Tt=S(function(Mt){Mt.setUTCMonth(0,1),Mt.setUTCHours(0,0,0,0)},function(Mt,te){Mt.setUTCFullYear(Mt.getUTCFullYear()+te)},function(Mt,te){return te.getUTCFullYear()-Mt.getUTCFullYear()},function(Mt){return Mt.getUTCFullYear()});Tt.every=function(Mt){return!isFinite(Mt=Math.floor(Mt))||!(Mt>0)?null:S(function(te){te.setUTCFullYear(Math.floor(te.getUTCFullYear()/Mt)*Mt),te.setUTCMonth(0,1),te.setUTCHours(0,0,0,0)},function(te,ve){te.setUTCFullYear(te.getUTCFullYear()+ve*Mt)})};var Lt=Tt.range;c.timeDay=u,c.timeDays=b,c.timeFriday=p,c.timeFridays=H,c.timeHour=v,c.timeHours=T,c.timeInterval=S,c.timeMillisecond=t,c.timeMilliseconds=e,c.timeMinute=x,c.timeMinutes=y,c.timeMonday=M,c.timeMondays=R,c.timeMonth=U,c.timeMonths=W,c.timeSaturday=k,c.timeSaturdays=F,c.timeSecond=s,c.timeSeconds=f,c.timeSunday=C,c.timeSundays=w,c.timeThursday=h,c.timeThursdays=V,c.timeTuesday=E,c.timeTuesdays=O,c.timeWednesday=A,c.timeWednesdays=N,c.timeWeek=C,c.timeWeeks=w,c.timeYear=q,c.timeYears=X,c.utcDay=tt,c.utcDays=dt,c.utcFriday=ut,c.utcFridays=ge,c.utcHour=pt,c.utcHours=st,c.utcMillisecond=t,c.utcMilliseconds=e,c.utcMinute=lt,c.utcMinutes=yt,c.utcMonday=vt,c.utcMondays=Pt,c.utcMonth=de,c.utcMonths=se,c.utcSaturday=wt,c.utcSaturdays=he,c.utcSecond=s,c.utcSeconds=f,c.utcSunday=at,c.utcSundays=zt,c.utcThursday=ft,c.utcThursdays=Jt,c.utcTuesday=it,c.utcTuesdays=Wt,c.utcWednesday=Y,c.utcWednesdays=Ht,c.utcWeek=at,c.utcWeeks=zt,c.utcYear=Tt,c.utcYears=Lt,Object.defineProperty(c,"__esModule",{value:!0})})}),fa=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q,ia()):(c=c||self,g(c.d3=c.d3||{},c.d3))})(Q,function(c,g){function P($t){if(0<=$t.y&&$t.y<100){var ne=new Date(-1,$t.m,$t.d,$t.H,$t.M,$t.S,$t.L);return ne.setFullYear($t.y),ne}return new Date($t.y,$t.m,$t.d,$t.H,$t.M,$t.S,$t.L)}function S($t){if(0<=$t.y&&$t.y<100){var ne=new Date(Date.UTC(-1,$t.m,$t.d,$t.H,$t.M,$t.S,$t.L));return ne.setUTCFullYear($t.y),ne}return new Date(Date.UTC($t.y,$t.m,$t.d,$t.H,$t.M,$t.S,$t.L))}function t($t,ne,Ct){return{y:$t,m:ne,d:Ct,H:0,M:0,S:0,L:0}}function e($t){var ne=$t.dateTime,Ct=$t.date,gt=$t.time,St=$t.periods,Nt=$t.days,ee=$t.shortDays,le=$t.months,we=$t.shortMonths,Ue=f(St),qe=x(St),ar=f(Nt),Ar=x(Nt),Tr=f(ee),pr=x(ee),Jr=f(le),Vn=x(le),Hn=f(we),Kn=x(we),Ci={a:xi,A:Pi,b:Di,B:Zi,c:null,d:U,e:U,f:yt,H:W,I:q,j:X,L:lt,m:pt,M:st,p:ui,q:Pa,Q:Ge,s:cr,S:tt,u:dt,U:rt,V:at,w:vt,W:it,x:null,X:null,y:Y,Y:ft,Z:ut,"%":He},ii={a:Wa,A:ze,b:Pe,B:Rr,c:null,d:wt,e:wt,f:Jt,H:zt,I:Pt,j:Wt,L:Ht,m:ge,M:he,p:qr,q:$r,Q:Ge,s:cr,S:de,u:se,U:Tt,V:Lt,w:Mt,W:te,x:null,X:null,y:ve,Y:oe,Z:Te,"%":He},qn={a:fr,A:xr,b:Qr,B:Cn,c:wn,d:h,e:h,f:N,H:k,I:k,j:p,L:O,m:A,M:w,p:rr,q:E,Q:H,s:F,S:R,u:v,U:T,V:u,w:y,W:b,x:Mn,X:ci,y:C,Y:_,Z:M,"%":V};Ci.x=oa(Ct,Ci),Ci.X=oa(gt,Ci),Ci.c=oa(ne,Ci),ii.x=oa(Ct,ii),ii.X=oa(gt,ii),ii.c=oa(ne,ii);function oa(Br,Gr){return function(dn){var an=[],Ee=-1,dr=0,Vr=Br.length,yn,Fn,Xn;for(dn instanceof Date||(dn=new Date(+dn));++Ee53)return null;"w"in an||(an.w=1),"Z"in an?(dr=S(t(an.y,0,1)),Vr=dr.getUTCDay(),dr=Vr>4||Vr===0?g.utcMonday.ceil(dr):g.utcMonday(dr),dr=g.utcDay.offset(dr,(an.V-1)*7),an.y=dr.getUTCFullYear(),an.m=dr.getUTCMonth(),an.d=dr.getUTCDate()+(an.w+6)%7):(dr=P(t(an.y,0,1)),Vr=dr.getDay(),dr=Vr>4||Vr===0?g.timeMonday.ceil(dr):g.timeMonday(dr),dr=g.timeDay.offset(dr,(an.V-1)*7),an.y=dr.getFullYear(),an.m=dr.getMonth(),an.d=dr.getDate()+(an.w+6)%7)}else("W"in an||"U"in an)&&("w"in an||(an.w="u"in an?an.u%7:"W"in an?1:0),Vr="Z"in an?S(t(an.y,0,1)).getUTCDay():P(t(an.y,0,1)).getDay(),an.m=0,an.d="W"in an?(an.w+6)%7+an.W*7-(Vr+5)%7:an.w+an.U*7-(Vr+6)%7);return"Z"in an?(an.H+=an.Z/100|0,an.M+=an.Z%100,S(an)):P(an)}}function We(Br,Gr,dn,an){for(var Ee=0,dr=Gr.length,Vr=dn.length,yn,Fn;Ee=Vr)return-1;if(yn=Gr.charCodeAt(Ee++),yn===37){if(yn=Gr.charAt(Ee++),Fn=qn[yn in r?Gr.charAt(Ee++):yn],!Fn||(an=Fn(Br,dn,an))<0)return-1}else if(yn!=dn.charCodeAt(an++))return-1}return an}function rr(Br,Gr,dn){var an=Ue.exec(Gr.slice(dn));return an?(Br.p=qe[an[0].toLowerCase()],dn+an[0].length):-1}function fr(Br,Gr,dn){var an=Tr.exec(Gr.slice(dn));return an?(Br.w=pr[an[0].toLowerCase()],dn+an[0].length):-1}function xr(Br,Gr,dn){var an=ar.exec(Gr.slice(dn));return an?(Br.w=Ar[an[0].toLowerCase()],dn+an[0].length):-1}function Qr(Br,Gr,dn){var an=Hn.exec(Gr.slice(dn));return an?(Br.m=Kn[an[0].toLowerCase()],dn+an[0].length):-1}function Cn(Br,Gr,dn){var an=Jr.exec(Gr.slice(dn));return an?(Br.m=Vn[an[0].toLowerCase()],dn+an[0].length):-1}function wn(Br,Gr,dn){return We(Br,ne,Gr,dn)}function Mn(Br,Gr,dn){return We(Br,Ct,Gr,dn)}function ci(Br,Gr,dn){return We(Br,gt,Gr,dn)}function xi(Br){return ee[Br.getDay()]}function Pi(Br){return Nt[Br.getDay()]}function Di(Br){return we[Br.getMonth()]}function Zi(Br){return le[Br.getMonth()]}function ui(Br){return St[+(Br.getHours()>=12)]}function Pa(Br){return 1+~~(Br.getMonth()/3)}function Wa(Br){return ee[Br.getUTCDay()]}function ze(Br){return Nt[Br.getUTCDay()]}function Pe(Br){return we[Br.getUTCMonth()]}function Rr(Br){return le[Br.getUTCMonth()]}function qr(Br){return St[+(Br.getUTCHours()>=12)]}function $r(Br){return 1+~~(Br.getUTCMonth()/3)}return{format:function(Br){var Gr=oa(Br+="",Ci);return Gr.toString=function(){return Br},Gr},parse:function(Br){var Gr=Hi(Br+="",!1);return Gr.toString=function(){return Br},Gr},utcFormat:function(Br){var Gr=oa(Br+="",ii);return Gr.toString=function(){return Br},Gr},utcParse:function(Br){var Gr=Hi(Br+="",!0);return Gr.toString=function(){return Br},Gr}}}var r={"-":"",_:" ",0:"0"},a=/^\s*\d+/,n=/^%/,o=/[\\^$*+?|[\]().{}]/g;function i($t,ne,Ct){var gt=$t<0?"-":"",St=(gt?-$t:$t)+"",Nt=St.length;return gt+(Nt68?1900:2e3),Ct+gt[0].length):-1}function M($t,ne,Ct){var gt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(ne.slice(Ct,Ct+6));return gt?($t.Z=gt[1]?0:-(gt[2]+(gt[3]||"00")),Ct+gt[0].length):-1}function E($t,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+1));return gt?($t.q=gt[0]*3-3,Ct+gt[0].length):-1}function A($t,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?($t.m=gt[0]-1,Ct+gt[0].length):-1}function h($t,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?($t.d=+gt[0],Ct+gt[0].length):-1}function p($t,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+3));return gt?($t.m=0,$t.d=+gt[0],Ct+gt[0].length):-1}function k($t,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?($t.H=+gt[0],Ct+gt[0].length):-1}function w($t,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?($t.M=+gt[0],Ct+gt[0].length):-1}function R($t,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?($t.S=+gt[0],Ct+gt[0].length):-1}function O($t,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+3));return gt?($t.L=+gt[0],Ct+gt[0].length):-1}function N($t,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+6));return gt?($t.L=Math.floor(gt[0]/1e3),Ct+gt[0].length):-1}function V($t,ne,Ct){var gt=n.exec(ne.slice(Ct,Ct+1));return gt?Ct+gt[0].length:-1}function H($t,ne,Ct){var gt=a.exec(ne.slice(Ct));return gt?($t.Q=+gt[0],Ct+gt[0].length):-1}function F($t,ne,Ct){var gt=a.exec(ne.slice(Ct));return gt?($t.s=+gt[0],Ct+gt[0].length):-1}function U($t,ne){return i($t.getDate(),ne,2)}function W($t,ne){return i($t.getHours(),ne,2)}function q($t,ne){return i($t.getHours()%12||12,ne,2)}function X($t,ne){return i(1+g.timeDay.count(g.timeYear($t),$t),ne,3)}function lt($t,ne){return i($t.getMilliseconds(),ne,3)}function yt($t,ne){return lt($t,ne)+"000"}function pt($t,ne){return i($t.getMonth()+1,ne,2)}function st($t,ne){return i($t.getMinutes(),ne,2)}function tt($t,ne){return i($t.getSeconds(),ne,2)}function dt($t){var ne=$t.getDay();return ne===0?7:ne}function rt($t,ne){return i(g.timeSunday.count(g.timeYear($t)-1,$t),ne,2)}function at($t,ne){var Ct=$t.getDay();return $t=Ct>=4||Ct===0?g.timeThursday($t):g.timeThursday.ceil($t),i(g.timeThursday.count(g.timeYear($t),$t)+(g.timeYear($t).getDay()===4),ne,2)}function vt($t){return $t.getDay()}function it($t,ne){return i(g.timeMonday.count(g.timeYear($t)-1,$t),ne,2)}function Y($t,ne){return i($t.getFullYear()%100,ne,2)}function ft($t,ne){return i($t.getFullYear()%1e4,ne,4)}function ut($t){var ne=$t.getTimezoneOffset();return(ne>0?"-":(ne*=-1,"+"))+i(ne/60|0,"0",2)+i(ne%60,"0",2)}function wt($t,ne){return i($t.getUTCDate(),ne,2)}function zt($t,ne){return i($t.getUTCHours(),ne,2)}function Pt($t,ne){return i($t.getUTCHours()%12||12,ne,2)}function Wt($t,ne){return i(1+g.utcDay.count(g.utcYear($t),$t),ne,3)}function Ht($t,ne){return i($t.getUTCMilliseconds(),ne,3)}function Jt($t,ne){return Ht($t,ne)+"000"}function ge($t,ne){return i($t.getUTCMonth()+1,ne,2)}function he($t,ne){return i($t.getUTCMinutes(),ne,2)}function de($t,ne){return i($t.getUTCSeconds(),ne,2)}function se($t){var ne=$t.getUTCDay();return ne===0?7:ne}function Tt($t,ne){return i(g.utcSunday.count(g.utcYear($t)-1,$t),ne,2)}function Lt($t,ne){var Ct=$t.getUTCDay();return $t=Ct>=4||Ct===0?g.utcThursday($t):g.utcThursday.ceil($t),i(g.utcThursday.count(g.utcYear($t),$t)+(g.utcYear($t).getUTCDay()===4),ne,2)}function Mt($t){return $t.getUTCDay()}function te($t,ne){return i(g.utcMonday.count(g.utcYear($t)-1,$t),ne,2)}function ve($t,ne){return i($t.getUTCFullYear()%100,ne,2)}function oe($t,ne){return i($t.getUTCFullYear()%1e4,ne,4)}function Te(){return"+0000"}function He(){return"%"}function Ge($t){return+$t}function cr($t){return Math.floor(+$t/1e3)}var ur;jr({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function jr($t){return ur=e($t),c.timeFormat=ur.format,c.timeParse=ur.parse,c.utcFormat=ur.utcFormat,c.utcParse=ur.utcParse,ur}var Hr="%Y-%m-%dT%H:%M:%S.%LZ";function br($t){return $t.toISOString()}var Kr=Date.prototype.toISOString?br:c.utcFormat(Hr);function rn($t){var ne=new Date($t);return isNaN(ne)?null:ne}var Ce=+new Date("2000-01-01T00:00:00.000Z")?rn:c.utcParse(Hr);c.isoFormat=Kr,c.isoParse=Ce,c.timeFormatDefaultLocale=jr,c.timeFormatLocale=e,Object.defineProperty(c,"__esModule",{value:!0})})}),Li=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q):(c=typeof globalThis<"u"?globalThis:c||self,g(c.d3=c.d3||{}))})(Q,function(c){function g(A){return Math.abs(A=Math.round(A))>=1e21?A.toLocaleString("en").replace(/,/g,""):A.toString(10)}function P(A,h){if((p=(A=h?A.toExponential(h-1):A.toExponential()).indexOf("e"))<0)return null;var p,k=A.slice(0,p);return[k.length>1?k[0]+k.slice(2):k,+A.slice(p+1)]}function S(A){return A=P(Math.abs(A)),A?A[1]:NaN}function t(A,h){return function(p,k){for(var w=p.length,R=[],O=0,N=A[0],V=0;w>0&&N>0&&(V+N+1>k&&(N=Math.max(1,k-V)),R.push(p.substring(w-=N,w+N)),!((V+=N+1)>k));)N=A[O=(O+1)%A.length];return R.reverse().join(h)}}function e(A){return function(h){return h.replace(/[0-9]/g,function(p){return A[+p]})}}var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function a(A){if(!(h=r.exec(A)))throw new Error("invalid format: "+A);var h;return new n({fill:h[1],align:h[2],sign:h[3],symbol:h[4],zero:h[5],width:h[6],comma:h[7],precision:h[8]&&h[8].slice(1),trim:h[9],type:h[10]})}a.prototype=n.prototype;function n(A){this.fill=A.fill===void 0?" ":A.fill+"",this.align=A.align===void 0?">":A.align+"",this.sign=A.sign===void 0?"-":A.sign+"",this.symbol=A.symbol===void 0?"":A.symbol+"",this.zero=!!A.zero,this.width=A.width===void 0?void 0:+A.width,this.comma=!!A.comma,this.precision=A.precision===void 0?void 0:+A.precision,this.trim=!!A.trim,this.type=A.type===void 0?"":A.type+""}n.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function o(A){t:for(var h=A.length,p=1,k=-1,w;p0&&(k=0);break}return k>0?A.slice(0,k)+A.slice(w+1):A}var i;function s(A,h){var p=P(A,h);if(!p)return A+"";var k=p[0],w=p[1],R=w-(i=Math.max(-8,Math.min(8,Math.floor(w/3)))*3)+1,O=k.length;return R===O?k:R>O?k+new Array(R-O+1).join("0"):R>0?k.slice(0,R)+"."+k.slice(R):"0."+new Array(1-R).join("0")+P(A,Math.max(0,h+R-1))[0]}function f(A,h){var p=P(A,h);if(!p)return A+"";var k=p[0],w=p[1];return w<0?"0."+new Array(-w).join("0")+k:k.length>w+1?k.slice(0,w+1)+"."+k.slice(w+1):k+new Array(w-k.length+2).join("0")}var x={"%":function(A,h){return(A*100).toFixed(h)},b:function(A){return Math.round(A).toString(2)},c:function(A){return A+""},d:g,e:function(A,h){return A.toExponential(h)},f:function(A,h){return A.toFixed(h)},g:function(A,h){return A.toPrecision(h)},o:function(A){return Math.round(A).toString(8)},p:function(A,h){return f(A*100,h)},r:f,s,X:function(A){return Math.round(A).toString(16).toUpperCase()},x:function(A){return Math.round(A).toString(16)}};function y(A){return A}var v=Array.prototype.map,T=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function u(A){var h=A.grouping===void 0||A.thousands===void 0?y:t(v.call(A.grouping,Number),A.thousands+""),p=A.currency===void 0?"":A.currency[0]+"",k=A.currency===void 0?"":A.currency[1]+"",w=A.decimal===void 0?".":A.decimal+"",R=A.numerals===void 0?y:e(v.call(A.numerals,String)),O=A.percent===void 0?"%":A.percent+"",N=A.minus===void 0?"-":A.minus+"",V=A.nan===void 0?"NaN":A.nan+"";function H(U){U=a(U);var W=U.fill,q=U.align,X=U.sign,lt=U.symbol,yt=U.zero,pt=U.width,st=U.comma,tt=U.precision,dt=U.trim,rt=U.type;rt==="n"?(st=!0,rt="g"):x[rt]||(tt===void 0&&(tt=12),dt=!0,rt="g"),(yt||W==="0"&&q==="=")&&(yt=!0,W="0",q="=");var at=lt==="$"?p:lt==="#"&&/[boxX]/.test(rt)?"0"+rt.toLowerCase():"",vt=lt==="$"?k:/[%p]/.test(rt)?O:"",it=x[rt],Y=/[defgprs%]/.test(rt);tt=tt===void 0?6:/[gprs]/.test(rt)?Math.max(1,Math.min(21,tt)):Math.max(0,Math.min(20,tt));function ft(ut){var wt=at,zt=vt,Pt,Wt,Ht;if(rt==="c")zt=it(ut)+zt,ut="";else{ut=+ut;var Jt=ut<0||1/ut<0;if(ut=isNaN(ut)?V:it(Math.abs(ut),tt),dt&&(ut=o(ut)),Jt&&+ut==0&&X!=="+"&&(Jt=!1),wt=(Jt?X==="("?X:N:X==="-"||X==="("?"":X)+wt,zt=(rt==="s"?T[8+i/3]:"")+zt+(Jt&&X==="("?")":""),Y){for(Pt=-1,Wt=ut.length;++PtHt||Ht>57){zt=(Ht===46?w+ut.slice(Pt+1):ut.slice(Pt))+zt,ut=ut.slice(0,Pt);break}}}st&&!yt&&(ut=h(ut,1/0));var ge=wt.length+ut.length+zt.length,he=ge>1)+wt+ut+zt+he.slice(ge);break;default:ut=he+wt+ut+zt;break}return R(ut)}return ft.toString=function(){return U+""},ft}function F(U,W){var q=H((U=a(U),U.type="f",U)),X=Math.max(-8,Math.min(8,Math.floor(S(W)/3)))*3,lt=Math.pow(10,-X),yt=T[8+X/3];return function(pt){return q(lt*pt)+yt}}return{format:H,formatPrefix:F}}var b;_({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function _(A){return b=u(A),c.format=b.format,c.formatPrefix=b.formatPrefix,b}function C(A){return Math.max(0,-S(Math.abs(A)))}function M(A,h){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(S(h)/3)))*3-S(Math.abs(A)))}function E(A,h){return A=Math.abs(A),h=Math.abs(h)-A,Math.max(0,S(h)-S(A))+1}c.FormatSpecifier=n,c.formatDefaultLocale=_,c.formatLocale=u,c.formatSpecifier=a,c.precisionFixed=C,c.precisionPrefix=M,c.precisionRound=E,Object.defineProperty(c,"__esModule",{value:!0})})}),yi=Ft((Q,$)=>{$.exports=function(c){for(var g=c.length,P,S=0;S13)&&P!==32&&P!==133&&P!==160&&P!==5760&&P!==6158&&(P<8192||P>8205)&&P!==8232&&P!==8233&&P!==8239&&P!==8287&&P!==8288&&P!==12288&&P!==65279)return!1;return!0}}),ra=Ft((Q,$)=>{var c=yi();$.exports=function(g){var P=typeof g;if(P==="string"){var S=g;if(g=+g,g===0&&c(S))return!1}else if(P!=="number")return!1;return g-g<1}}),Da=Ft((Q,$)=>{$.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"−"}}),Ni=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q):(c=typeof globalThis<"u"?globalThis:c||self,g(c["base64-arraybuffer"]={}))})(Q,function(c){for(var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",P=typeof Uint8Array>"u"?[]:new Uint8Array(256),S=0;S>2],i+=g[(a[n]&3)<<4|a[n+1]>>4],i+=g[(a[n+1]&15)<<2|a[n+2]>>6],i+=g[a[n+2]&63];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i},e=function(r){var a=r.length*.75,n=r.length,o,i=0,s,f,x,y;r[r.length-1]==="="&&(a--,r[r.length-2]==="="&&a--);var v=new ArrayBuffer(a),T=new Uint8Array(v);for(o=0;o>4,T[i++]=(f&15)<<4|x>>2,T[i++]=(x&3)<<6|y&63;return v};c.decode=e,c.encode=t,Object.defineProperty(c,"__esModule",{value:!0})})}),Ei=Ft((Q,$)=>{$.exports=function(c){return window&&window.process&&window.process.versions?Object.prototype.toString.call(c)==="[object Object]":Object.prototype.toString.call(c)==="[object Object]"&&Object.getPrototypeOf(c).hasOwnProperty("hasOwnProperty")}}),Va=Ft(Q=>{var $=Ni().decode,c=Ei(),g=Array.isArray,P=ArrayBuffer,S=DataView;function t(s){return P.isView(s)&&!(s instanceof S)}Q.isTypedArray=t;function e(s){return g(s)||t(s)}Q.isArrayOrTypedArray=e;function r(s){return!e(s[0])}Q.isArray1D=r,Q.ensureArray=function(s,f){return g(s)||(s=[]),s.length=f,s};var a={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};a.uint8c=a.u1c,a.uint8=a.u1,a.int8=a.i1,a.uint16=a.u2,a.int16=a.i2,a.uint32=a.u4,a.int32=a.i4,a.float32=a.f4,a.float64=a.f8;function n(s){return s.constructor===ArrayBuffer}Q.isArrayBuffer=n,Q.decodeTypedArraySpec=function(s){var f=[],x=o(s),y=x.dtype,v=a[y];if(!v)throw new Error('Error in dtype: "'+y+'"');var T=v.BYTES_PER_ELEMENT,u=x.bdata;n(u)||(u=$(u));var b=x.shape===void 0?[u.byteLength/T]:(""+x.shape).split(",");b.reverse();var _=b.length,C,M,E=+b[0],A=T*E,h=0;if(_===1)f=new v(u);else if(_===2)for(C=+b[1],M=0;M{var c=ra(),g=Va().isArrayOrTypedArray;$.exports=function(i,s){if(c(s))s=String(s);else if(typeof s!="string"||s.substr(s.length-4)==="[-1]")throw"bad property string";var f=s.split("."),x,y,v,T;for(T=0;T{var c=ss(),g=/^\w*$/,P=0,S=1,t=2,e=3,r=4;$.exports=function(a,n,o,i){o=o||"name",i=i||"value";var s,f,x,y={};n&&n.length?(x=c(a,n),f=x.get()):f=a,n=n||"";var v={};if(f)for(s=0;s2)return y[_]=y[_]|t,u.set(b,null);if(T){for(s=_;s{var c=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,g=/^[^\.\[\]]+$/;$.exports=function(P,S){for(;S;){var t=P.match(c);if(t)P=t[1];else if(P.match(g))P="";else throw new Error("bad relativeAttr call:"+[P,S]);if(S.charAt(0)==="^")S=S.slice(1);else break}return P&&S.charAt(0)!=="["?P+"."+S:P+S}}),pl=Ft((Q,$)=>{var c=ra();$.exports=function(g,P){if(g>0)return Math.log(g)/Math.LN10;var S=Math.log(Math.min(P[0],P[1]))/Math.LN10;return c(S)||(S=Math.log(Math.max(P[0],P[1]))/Math.LN10-6),S}}),fu=Ft((Q,$)=>{var c=Va().isArrayOrTypedArray,g=Ei();$.exports=function P(S,t){for(var e in t){var r=t[e],a=S[e];if(a!==r)if(e.charAt(0)==="_"||typeof r=="function"){if(e in S)continue;S[e]=r}else if(c(r)&&c(a)&&g(r[0])){if(e==="customdata"||e==="ids")continue;for(var n=Math.min(r.length,a.length),o=0;o{function c(P,S){var t=P%S;return t<0?t+S:t}function g(P,S){return Math.abs(P)>S/2?P-Math.round(P/S)*S:P}$.exports={mod:c,modHalf:g}}),fo=Ft((Q,$)=>{(function(c){var g=/^\s+/,P=/\s+$/,S=0,t=c.round,e=c.min,r=c.max,a=c.random;function n(Y,ft){if(Y=Y||"",ft=ft||{},Y instanceof n)return Y;if(!(this instanceof n))return new n(Y,ft);var ut=o(Y);this._originalInput=Y,this._r=ut.r,this._g=ut.g,this._b=ut.b,this._a=ut.a,this._roundA=t(100*this._a)/100,this._format=ft.format||ut.format,this._gradientType=ft.gradientType,this._r<1&&(this._r=t(this._r)),this._g<1&&(this._g=t(this._g)),this._b<1&&(this._b=t(this._b)),this._ok=ut.ok,this._tc_id=S++}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var Y=this.toRgb();return(Y.r*299+Y.g*587+Y.b*114)/1e3},getLuminance:function(){var Y=this.toRgb(),ft,ut,wt,zt,Pt,Wt;return ft=Y.r/255,ut=Y.g/255,wt=Y.b/255,ft<=.03928?zt=ft/12.92:zt=c.pow((ft+.055)/1.055,2.4),ut<=.03928?Pt=ut/12.92:Pt=c.pow((ut+.055)/1.055,2.4),wt<=.03928?Wt=wt/12.92:Wt=c.pow((wt+.055)/1.055,2.4),.2126*zt+.7152*Pt+.0722*Wt},setAlpha:function(Y){return this._a=U(Y),this._roundA=t(100*this._a)/100,this},toHsv:function(){var Y=x(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,v:Y.v,a:this._a}},toHsvString:function(){var Y=x(this._r,this._g,this._b),ft=t(Y.h*360),ut=t(Y.s*100),wt=t(Y.v*100);return this._a==1?"hsv("+ft+", "+ut+"%, "+wt+"%)":"hsva("+ft+", "+ut+"%, "+wt+"%, "+this._roundA+")"},toHsl:function(){var Y=s(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,l:Y.l,a:this._a}},toHslString:function(){var Y=s(this._r,this._g,this._b),ft=t(Y.h*360),ut=t(Y.s*100),wt=t(Y.l*100);return this._a==1?"hsl("+ft+", "+ut+"%, "+wt+"%)":"hsla("+ft+", "+ut+"%, "+wt+"%, "+this._roundA+")"},toHex:function(Y){return v(this._r,this._g,this._b,Y)},toHexString:function(Y){return"#"+this.toHex(Y)},toHex8:function(Y){return T(this._r,this._g,this._b,this._a,Y)},toHex8String:function(Y){return"#"+this.toHex8(Y)},toRgb:function(){return{r:t(this._r),g:t(this._g),b:t(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+t(this._r)+", "+t(this._g)+", "+t(this._b)+")":"rgba("+t(this._r)+", "+t(this._g)+", "+t(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:t(W(this._r,255)*100)+"%",g:t(W(this._g,255)*100)+"%",b:t(W(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+t(W(this._r,255)*100)+"%, "+t(W(this._g,255)*100)+"%, "+t(W(this._b,255)*100)+"%)":"rgba("+t(W(this._r,255)*100)+"%, "+t(W(this._g,255)*100)+"%, "+t(W(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:H[v(this._r,this._g,this._b,!0)]||!1},toFilter:function(Y){var ft="#"+u(this._r,this._g,this._b,this._a),ut=ft,wt=this._gradientType?"GradientType = 1, ":"";if(Y){var zt=n(Y);ut="#"+u(zt._r,zt._g,zt._b,zt._a)}return"progid:DXImageTransform.Microsoft.gradient("+wt+"startColorstr="+ft+",endColorstr="+ut+")"},toString:function(Y){var ft=!!Y;Y=Y||this._format;var ut=!1,wt=this._a<1&&this._a>=0,zt=!ft&&wt&&(Y==="hex"||Y==="hex6"||Y==="hex3"||Y==="hex4"||Y==="hex8"||Y==="name");return zt?Y==="name"&&this._a===0?this.toName():this.toRgbString():(Y==="rgb"&&(ut=this.toRgbString()),Y==="prgb"&&(ut=this.toPercentageRgbString()),(Y==="hex"||Y==="hex6")&&(ut=this.toHexString()),Y==="hex3"&&(ut=this.toHexString(!0)),Y==="hex4"&&(ut=this.toHex8String(!0)),Y==="hex8"&&(ut=this.toHex8String()),Y==="name"&&(ut=this.toName()),Y==="hsl"&&(ut=this.toHslString()),Y==="hsv"&&(ut=this.toHsvString()),ut||this.toHexString())},clone:function(){return n(this.toString())},_applyModification:function(Y,ft){var ut=Y.apply(null,[this].concat([].slice.call(ft)));return this._r=ut._r,this._g=ut._g,this._b=ut._b,this.setAlpha(ut._a),this},lighten:function(){return this._applyModification(M,arguments)},brighten:function(){return this._applyModification(E,arguments)},darken:function(){return this._applyModification(A,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(_,arguments)},greyscale:function(){return this._applyModification(C,arguments)},spin:function(){return this._applyModification(h,arguments)},_applyCombination:function(Y,ft){return Y.apply(null,[this].concat([].slice.call(ft)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(p,arguments)},monochromatic:function(){return this._applyCombination(N,arguments)},splitcomplement:function(){return this._applyCombination(R,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},n.fromRatio=function(Y,ft){if(typeof Y=="object"){var ut={};for(var wt in Y)Y.hasOwnProperty(wt)&&(wt==="a"?ut[wt]=Y[wt]:ut[wt]=st(Y[wt]));Y=ut}return n(Y,ft)};function o(Y){var ft={r:0,g:0,b:0},ut=1,wt=null,zt=null,Pt=null,Wt=!1,Ht=!1;return typeof Y=="string"&&(Y=vt(Y)),typeof Y=="object"&&(at(Y.r)&&at(Y.g)&&at(Y.b)?(ft=i(Y.r,Y.g,Y.b),Wt=!0,Ht=String(Y.r).substr(-1)==="%"?"prgb":"rgb"):at(Y.h)&&at(Y.s)&&at(Y.v)?(wt=st(Y.s),zt=st(Y.v),ft=y(Y.h,wt,zt),Wt=!0,Ht="hsv"):at(Y.h)&&at(Y.s)&&at(Y.l)&&(wt=st(Y.s),Pt=st(Y.l),ft=f(Y.h,wt,Pt),Wt=!0,Ht="hsl"),Y.hasOwnProperty("a")&&(ut=Y.a)),ut=U(ut),{ok:Wt,format:Y.format||Ht,r:e(255,r(ft.r,0)),g:e(255,r(ft.g,0)),b:e(255,r(ft.b,0)),a:ut}}function i(Y,ft,ut){return{r:W(Y,255)*255,g:W(ft,255)*255,b:W(ut,255)*255}}function s(Y,ft,ut){Y=W(Y,255),ft=W(ft,255),ut=W(ut,255);var wt=r(Y,ft,ut),zt=e(Y,ft,ut),Pt,Wt,Ht=(wt+zt)/2;if(wt==zt)Pt=Wt=0;else{var Jt=wt-zt;switch(Wt=Ht>.5?Jt/(2-wt-zt):Jt/(wt+zt),wt){case Y:Pt=(ft-ut)/Jt+(ft1&&(de-=1),de<1/6?ge+(he-ge)*6*de:de<1/2?he:de<2/3?ge+(he-ge)*(2/3-de)*6:ge}if(ft===0)wt=zt=Pt=ut;else{var Ht=ut<.5?ut*(1+ft):ut+ft-ut*ft,Jt=2*ut-Ht;wt=Wt(Jt,Ht,Y+1/3),zt=Wt(Jt,Ht,Y),Pt=Wt(Jt,Ht,Y-1/3)}return{r:wt*255,g:zt*255,b:Pt*255}}function x(Y,ft,ut){Y=W(Y,255),ft=W(ft,255),ut=W(ut,255);var wt=r(Y,ft,ut),zt=e(Y,ft,ut),Pt,Wt,Ht=wt,Jt=wt-zt;if(Wt=wt===0?0:Jt/wt,wt==zt)Pt=0;else{switch(wt){case Y:Pt=(ft-ut)/Jt+(ft>1)+720)%360;--ft;)wt.h=(wt.h+zt)%360,Pt.push(n(wt));return Pt}function N(Y,ft){ft=ft||6;for(var ut=n(Y).toHsv(),wt=ut.h,zt=ut.s,Pt=ut.v,Wt=[],Ht=1/ft;ft--;)Wt.push(n({h:wt,s:zt,v:Pt})),Pt=(Pt+Ht)%1;return Wt}n.mix=function(Y,ft,ut){ut=ut===0?0:ut||50;var wt=n(Y).toRgb(),zt=n(ft).toRgb(),Pt=ut/100,Wt={r:(zt.r-wt.r)*Pt+wt.r,g:(zt.g-wt.g)*Pt+wt.g,b:(zt.b-wt.b)*Pt+wt.b,a:(zt.a-wt.a)*Pt+wt.a};return n(Wt)},n.readability=function(Y,ft){var ut=n(Y),wt=n(ft);return(c.max(ut.getLuminance(),wt.getLuminance())+.05)/(c.min(ut.getLuminance(),wt.getLuminance())+.05)},n.isReadable=function(Y,ft,ut){var wt=n.readability(Y,ft),zt,Pt;switch(Pt=!1,zt=it(ut),zt.level+zt.size){case"AAsmall":case"AAAlarge":Pt=wt>=4.5;break;case"AAlarge":Pt=wt>=3;break;case"AAAsmall":Pt=wt>=7;break}return Pt},n.mostReadable=function(Y,ft,ut){var wt=null,zt=0,Pt,Wt,Ht,Jt;ut=ut||{},Wt=ut.includeFallbackColors,Ht=ut.level,Jt=ut.size;for(var ge=0;gezt&&(zt=Pt,wt=n(ft[ge]));return n.isReadable(Y,wt,{level:Ht,size:Jt})||!Wt?wt:(ut.includeFallbackColors=!1,n.mostReadable(Y,["#fff","#000"],ut))};var V=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},H=n.hexNames=F(V);function F(Y){var ft={};for(var ut in Y)Y.hasOwnProperty(ut)&&(ft[Y[ut]]=ut);return ft}function U(Y){return Y=parseFloat(Y),(isNaN(Y)||Y<0||Y>1)&&(Y=1),Y}function W(Y,ft){lt(Y)&&(Y="100%");var ut=yt(Y);return Y=e(ft,r(0,parseFloat(Y))),ut&&(Y=parseInt(Y*ft,10)/100),c.abs(Y-ft)<1e-6?1:Y%ft/parseFloat(ft)}function q(Y){return e(1,r(0,Y))}function X(Y){return parseInt(Y,16)}function lt(Y){return typeof Y=="string"&&Y.indexOf(".")!=-1&&parseFloat(Y)===1}function yt(Y){return typeof Y=="string"&&Y.indexOf("%")!=-1}function pt(Y){return Y.length==1?"0"+Y:""+Y}function st(Y){return Y<=1&&(Y=Y*100+"%"),Y}function tt(Y){return c.round(parseFloat(Y)*255).toString(16)}function dt(Y){return X(Y)/255}var rt=function(){var Y="[-\\+]?\\d+%?",ft="[-\\+]?\\d*\\.\\d+%?",ut="(?:"+ft+")|(?:"+Y+")",wt="[\\s|\\(]+("+ut+")[,|\\s]+("+ut+")[,|\\s]+("+ut+")\\s*\\)?",zt="[\\s|\\(]+("+ut+")[,|\\s]+("+ut+")[,|\\s]+("+ut+")[,|\\s]+("+ut+")\\s*\\)?";return{CSS_UNIT:new RegExp(ut),rgb:new RegExp("rgb"+wt),rgba:new RegExp("rgba"+zt),hsl:new RegExp("hsl"+wt),hsla:new RegExp("hsla"+zt),hsv:new RegExp("hsv"+wt),hsva:new RegExp("hsva"+zt),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function at(Y){return!!rt.CSS_UNIT.exec(Y)}function vt(Y){Y=Y.replace(g,"").replace(P,"").toLowerCase();var ft=!1;if(V[Y])Y=V[Y],ft=!0;else if(Y=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ut;return(ut=rt.rgb.exec(Y))?{r:ut[1],g:ut[2],b:ut[3]}:(ut=rt.rgba.exec(Y))?{r:ut[1],g:ut[2],b:ut[3],a:ut[4]}:(ut=rt.hsl.exec(Y))?{h:ut[1],s:ut[2],l:ut[3]}:(ut=rt.hsla.exec(Y))?{h:ut[1],s:ut[2],l:ut[3],a:ut[4]}:(ut=rt.hsv.exec(Y))?{h:ut[1],s:ut[2],v:ut[3]}:(ut=rt.hsva.exec(Y))?{h:ut[1],s:ut[2],v:ut[3],a:ut[4]}:(ut=rt.hex8.exec(Y))?{r:X(ut[1]),g:X(ut[2]),b:X(ut[3]),a:dt(ut[4]),format:ft?"name":"hex8"}:(ut=rt.hex6.exec(Y))?{r:X(ut[1]),g:X(ut[2]),b:X(ut[3]),format:ft?"name":"hex"}:(ut=rt.hex4.exec(Y))?{r:X(ut[1]+""+ut[1]),g:X(ut[2]+""+ut[2]),b:X(ut[3]+""+ut[3]),a:dt(ut[4]+""+ut[4]),format:ft?"name":"hex8"}:(ut=rt.hex3.exec(Y))?{r:X(ut[1]+""+ut[1]),g:X(ut[2]+""+ut[2]),b:X(ut[3]+""+ut[3]),format:ft?"name":"hex"}:!1}function it(Y){var ft,ut;return Y=Y||{level:"AA",size:"small"},ft=(Y.level||"AA").toUpperCase(),ut=(Y.size||"small").toLowerCase(),ft!=="AA"&&ft!=="AAA"&&(ft="AA"),ut!=="small"&&ut!=="large"&&(ut="small"),{level:ft,size:ut}}typeof $<"u"&&$.exports?$.exports=n:window.tinycolor=n})(Math)}),Ta=Ft(Q=>{var $=Ei(),c=Array.isArray;function g(S,t){var e,r;for(e=0;e{$.exports=function(c){var g=c.variantValues,P=c.editType,S=c.colorEditType;S===void 0&&(S=P);var t={editType:P,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};c.noNumericWeightValues&&(t.valType="enumerated",t.values=t.extras,t.extras=void 0,t.min=void 0,t.max=void 0);var e={family:{valType:"string",noBlank:!0,strict:!0,editType:P},size:{valType:"number",min:1,editType:P},color:{valType:"color",editType:S},weight:t,style:{editType:P,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:c.noFontVariant?void 0:{editType:P,valType:"enumerated",values:g||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:c.noFontTextcase?void 0:{editType:P,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:c.noFontLineposition?void 0:{editType:P,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:c.noFontShadow?void 0:{editType:P,valType:"string",dflt:c.autoShadowDflt?"auto":"none"},editType:P};return c.autoSize&&(e.size.dflt="auto"),c.autoColor&&(e.color.dflt="auto"),c.arrayOk&&(e.family.arrayOk=!0,e.weight.arrayOk=!0,e.style.arrayOk=!0,c.noFontVariant||(e.variant.arrayOk=!0),c.noFontTextcase||(e.textcase.arrayOk=!0),c.noFontLineposition||(e.lineposition.arrayOk=!0),c.noFontShadow||(e.shadow.arrayOk=!0),e.size.arrayOk=!0,e.color.arrayOk=!0),e}}),go=Ft((Q,$)=>{$.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}}),Ao=Ft((Q,$)=>{var c=go(),g=Ea(),P=g({editType:"none"});P.family.dflt=c.HOVERFONT,P.size.dflt=c.HOVERFONTSIZE,$.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:P,grouptitlefont:g({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}}),Ps=Ft((Q,$)=>{var c=Ea(),g=Ao().hoverlabel,P=Ta().extendFlat;$.exports={hoverlabel:{bgcolor:P({},g.bgcolor,{arrayOk:!0}),bordercolor:P({},g.bordercolor,{arrayOk:!0}),font:c({arrayOk:!0,editType:"none"}),align:P({},g.align,{arrayOk:!0}),namelength:P({},g.namelength,{arrayOk:!0}),showarrow:P({},g.showarrow),editType:"none"}}}),$o=Ft((Q,$)=>{var c=Ea(),g=Ps();$.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:c({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:g.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},uirevision:{valType:"any",editType:"none"}}}),gi=Ft((Q,$)=>{var c=fo(),g={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},P=g.RdBu;function S(r,a){if(a||(a=P),!r)return a;function n(){try{r=g[r]||JSON.parse(r)}catch{r=a}}return typeof r=="string"&&(n(),typeof r=="string"&&n()),t(r)?r:a}function t(r){var a=0;if(!Array.isArray(r)||r.length<2||!r[0]||!r[r.length-1]||+r[0][0]!=0||+r[r.length-1][0]!=1)return!1;for(var n=0;n{Q.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Q.defaultLine="#444",Q.lightLine="#eee",Q.background="#fff",Q.borderLine="#BEC8D9",Q.lightFraction=1e3/11}),li=Ft((Q,$)=>{var c=fo(),g=ra(),P=Va().isTypedArray,S=$.exports={},t=bi();S.defaults=t.defaults;var e=S.defaultLine=t.defaultLine;S.lightLine=t.lightLine;var r=S.background=t.background;S.tinyRGB=function(n){var o=n.toRgb();return"rgb("+Math.round(o.r)+", "+Math.round(o.g)+", "+Math.round(o.b)+")"},S.rgb=function(n){return S.tinyRGB(c(n))},S.opacity=function(n){return n?c(n).getAlpha():0},S.addOpacity=function(n,o){var i=c(n).toRgb();return"rgba("+Math.round(i.r)+", "+Math.round(i.g)+", "+Math.round(i.b)+", "+o+")"},S.combine=function(n,o){var i=c(n).toRgb();if(i.a===1)return c(n).toRgbString();var s=c(o||r).toRgb(),f=s.a===1?s:{r:255*(1-s.a)+s.r*s.a,g:255*(1-s.a)+s.g*s.a,b:255*(1-s.a)+s.b*s.a},x={r:f.r*(1-i.a)+i.r*i.a,g:f.g*(1-i.a)+i.g*i.a,b:f.b*(1-i.a)+i.b*i.a};return c(x).toRgbString()},S.interpolate=function(n,o,i){var s=c(n).toRgb(),f=c(o).toRgb(),x={r:i*s.r+(1-i)*f.r,g:i*s.g+(1-i)*f.g,b:i*s.b+(1-i)*f.b};return c(x).toRgbString()},S.contrast=function(n,o,i){var s=c(n);s.getAlpha()!==1&&(s=c(S.combine(n,r)));var f=s.isDark()?o?s.lighten(o):r:i?s.darken(i):e;return f.toString()},S.stroke=function(n,o){var i=c(o);n.style({stroke:S.tinyRGB(i),"stroke-opacity":i.getAlpha()})},S.fill=function(n,o){var i=c(o);n.style({fill:S.tinyRGB(i),"fill-opacity":i.getAlpha()})},S.clean=function(n){if(!(!n||typeof n!="object")){var o=Object.keys(n),i,s,f,x;for(i=0;i=0)))return n;if(x===3)s[x]>1&&(s[x]=1);else if(s[x]>=1)return n}var y=Math.round(s[0]*255)+", "+Math.round(s[1]*255)+", "+Math.round(s[2]*255);return f?"rgba("+y+", "+s[3]+")":"rgb("+y+")"}}),co=Ft((Q,$)=>{$.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}),vo=Ft(Q=>{Q.counter=function($,c,g,P){var S=(c||"")+(g?"":"$"),t=P===!1?"":"^";return $==="xy"?new RegExp(t+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+S):new RegExp(t+$+"([2-9]|[1-9][0-9]+)?"+S)}}),yo=Ft(Q=>{var $=ra(),c=fo(),g=Ta().extendFlat,P=$o(),S=gi(),t=li(),e=co().DESELECTDIM,r=ss(),a=vo().counter,n=qo().modHalf,o=Va().isArrayOrTypedArray,i=Va().isTypedArraySpec,s=Va().decodeTypedArraySpec;Q.valObjectMeta={data_array:{coerceFunction:function(x,y,v){y.set(o(x)?x:i(x)?s(x):v)}},enumerated:{coerceFunction:function(x,y,v,T){T.coerceNumber&&(x=+x),T.values.indexOf(x)===-1?y.set(v):y.set(x)},validateFunction:function(x,y){y.coerceNumber&&(x=+x);for(var v=y.values,T=0;TT.max?y.set(v):y.set(+x)}},integer:{coerceFunction:function(x,y,v,T){if((T.extras||[]).indexOf(x)!==-1){y.set(x);return}i(x)&&(x=s(x)),x%1||!$(x)||T.min!==void 0&&xT.max?y.set(v):y.set(+x)}},string:{coerceFunction:function(x,y,v,T){if(typeof x!="string"){var u=typeof x=="number";T.strict===!0||!u?y.set(v):y.set(String(x))}else T.noBlank&&!x?y.set(v):y.set(x)}},color:{coerceFunction:function(x,y,v){i(x)&&(x=s(x)),c(x).isValid()?y.set(x):y.set(v)}},colorlist:{coerceFunction:function(x,y,v){function T(u){return c(u).isValid()}!Array.isArray(x)||!x.length?y.set(v):x.every(T)?y.set(x):y.set(v)}},colorscale:{coerceFunction:function(x,y,v){y.set(S.get(x,v))}},angle:{coerceFunction:function(x,y,v){i(x)&&(x=s(x)),x==="auto"?y.set("auto"):$(x)?y.set(n(+x,360)):y.set(v)}},subplotid:{coerceFunction:function(x,y,v,T){var u=T.regex||a(v);if(typeof x=="string"&&u.test(x)){y.set(x);return}y.set(v)},validateFunction:function(x,y){var v=y.dflt;return x===v?!0:typeof x!="string"?!1:!!a(v).test(x)}},flaglist:{coerceFunction:function(x,y,v,T){if((T.extras||[]).indexOf(x)!==-1){y.set(x);return}if(typeof x!="string"){y.set(v);return}for(var u=x.split("+"),b=0;b{var c={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},g={};function P(S,t){for(var e in S){var r=S[e];r.valType?t[e]=r.dflt:(t[e]||(t[e]={}),P(r,t[e]))}}P(c,g),$.exports={configAttributes:c,dfltConfig:g}}),ns=Ft((Q,$)=>{var c=un(),g=ra(),P=[];$.exports=function(S,t){if(P.indexOf(S)!==-1)return;P.push(S);var e=1e3;g(t)?e=t:t==="long"&&(e=3e3);var r=c.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var a=r.selectAll(".notifier-note").data(P);function n(o){o.duration(700).style("opacity",0).each("end",function(i){var s=P.indexOf(i);s!==-1&&P.splice(s,1),c.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var i=c.select(this);i.append("button").classed("notifier-close",!0).html("×").on("click",function(){i.transition().call(n)});for(var s=i.append("p"),f=o.split(//g),x=0;x{var c=ms().dfltConfig,g=ns(),P=$.exports={};P.log=function(){var S;if(c.logging>1){var t=["LOG:"];for(S=0;S1){var e=[];for(S=0;S"),"long")}},P.warn=function(){var S;if(c.logging>0){var t=["WARN:"];for(S=0;S0){var e=[];for(S=0;S"),"stick")}},P.error=function(){var S;if(c.logging>0){var t=["ERROR:"];for(S=0;S0){var e=[];for(S=0;S"),"stick")}}}),Oo=Ft((Q,$)=>{$.exports=function(){}}),wl=Ft((Q,$)=>{$.exports=function(c,g){if(g instanceof RegExp){for(var P=g.toString(),S=0;S{$.exports=c;function c(){var g=new Float32Array(16);return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),Il=Ft((Q,$)=>{$.exports=c;function c(g){var P=new Float32Array(16);return P[0]=g[0],P[1]=g[1],P[2]=g[2],P[3]=g[3],P[4]=g[4],P[5]=g[5],P[6]=g[6],P[7]=g[7],P[8]=g[8],P[9]=g[9],P[10]=g[10],P[11]=g[11],P[12]=g[12],P[13]=g[13],P[14]=g[14],P[15]=g[15],P}}),du=Ft((Q,$)=>{$.exports=c;function c(g,P){return g[0]=P[0],g[1]=P[1],g[2]=P[2],g[3]=P[3],g[4]=P[4],g[5]=P[5],g[6]=P[6],g[7]=P[7],g[8]=P[8],g[9]=P[9],g[10]=P[10],g[11]=P[11],g[12]=P[12],g[13]=P[13],g[14]=P[14],g[15]=P[15],g}}),Hu=Ft((Q,$)=>{$.exports=c;function c(g){return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),Fc=Ft((Q,$)=>{$.exports=c;function c(g,P){if(g===P){var S=P[1],t=P[2],e=P[3],r=P[6],a=P[7],n=P[11];g[1]=P[4],g[2]=P[8],g[3]=P[12],g[4]=S,g[6]=P[9],g[7]=P[13],g[8]=t,g[9]=r,g[11]=P[14],g[12]=e,g[13]=a,g[14]=n}else g[0]=P[0],g[1]=P[4],g[2]=P[8],g[3]=P[12],g[4]=P[1],g[5]=P[5],g[6]=P[9],g[7]=P[13],g[8]=P[2],g[9]=P[6],g[10]=P[10],g[11]=P[14],g[12]=P[3],g[13]=P[7],g[14]=P[11],g[15]=P[15];return g}}),kc=Ft((Q,$)=>{$.exports=c;function c(g,P){var S=P[0],t=P[1],e=P[2],r=P[3],a=P[4],n=P[5],o=P[6],i=P[7],s=P[8],f=P[9],x=P[10],y=P[11],v=P[12],T=P[13],u=P[14],b=P[15],_=S*n-t*a,C=S*o-e*a,M=S*i-r*a,E=t*o-e*n,A=t*i-r*n,h=e*i-r*o,p=s*T-f*v,k=s*u-x*v,w=s*b-y*v,R=f*u-x*T,O=f*b-y*T,N=x*b-y*u,V=_*N-C*O+M*R+E*w-A*k+h*p;return V?(V=1/V,g[0]=(n*N-o*O+i*R)*V,g[1]=(e*O-t*N-r*R)*V,g[2]=(T*h-u*A+b*E)*V,g[3]=(x*A-f*h-y*E)*V,g[4]=(o*w-a*N-i*k)*V,g[5]=(S*N-e*w+r*k)*V,g[6]=(u*M-v*h-b*C)*V,g[7]=(s*h-x*M+y*C)*V,g[8]=(a*O-n*w+i*p)*V,g[9]=(t*w-S*O-r*p)*V,g[10]=(v*A-T*M+b*_)*V,g[11]=(f*M-s*A-y*_)*V,g[12]=(n*k-a*R-o*p)*V,g[13]=(S*R-t*k+e*p)*V,g[14]=(T*C-v*E-u*_)*V,g[15]=(s*E-f*C+x*_)*V,g):null}}),Vd=Ft((Q,$)=>{$.exports=c;function c(g,P){var S=P[0],t=P[1],e=P[2],r=P[3],a=P[4],n=P[5],o=P[6],i=P[7],s=P[8],f=P[9],x=P[10],y=P[11],v=P[12],T=P[13],u=P[14],b=P[15];return g[0]=n*(x*b-y*u)-f*(o*b-i*u)+T*(o*y-i*x),g[1]=-(t*(x*b-y*u)-f*(e*b-r*u)+T*(e*y-r*x)),g[2]=t*(o*b-i*u)-n*(e*b-r*u)+T*(e*i-r*o),g[3]=-(t*(o*y-i*x)-n*(e*y-r*x)+f*(e*i-r*o)),g[4]=-(a*(x*b-y*u)-s*(o*b-i*u)+v*(o*y-i*x)),g[5]=S*(x*b-y*u)-s*(e*b-r*u)+v*(e*y-r*x),g[6]=-(S*(o*b-i*u)-a*(e*b-r*u)+v*(e*i-r*o)),g[7]=S*(o*y-i*x)-a*(e*y-r*x)+s*(e*i-r*o),g[8]=a*(f*b-y*T)-s*(n*b-i*T)+v*(n*y-i*f),g[9]=-(S*(f*b-y*T)-s*(t*b-r*T)+v*(t*y-r*f)),g[10]=S*(n*b-i*T)-a*(t*b-r*T)+v*(t*i-r*n),g[11]=-(S*(n*y-i*f)-a*(t*y-r*f)+s*(t*i-r*n)),g[12]=-(a*(f*u-x*T)-s*(n*u-o*T)+v*(n*x-o*f)),g[13]=S*(f*u-x*T)-s*(t*u-e*T)+v*(t*x-e*f),g[14]=-(S*(n*u-o*T)-a*(t*u-e*T)+v*(t*o-e*n)),g[15]=S*(n*x-o*f)-a*(t*x-e*f)+s*(t*o-e*n),g}}),kd=Ft((Q,$)=>{$.exports=c;function c(g){var P=g[0],S=g[1],t=g[2],e=g[3],r=g[4],a=g[5],n=g[6],o=g[7],i=g[8],s=g[9],f=g[10],x=g[11],y=g[12],v=g[13],T=g[14],u=g[15],b=P*a-S*r,_=P*n-t*r,C=P*o-e*r,M=S*n-t*a,E=S*o-e*a,A=t*o-e*n,h=i*v-s*y,p=i*T-f*y,k=i*u-x*y,w=s*T-f*v,R=s*u-x*v,O=f*u-x*T;return b*O-_*R+C*w+M*k-E*p+A*h}}),e0=Ft((Q,$)=>{$.exports=c;function c(g,P,S){var t=P[0],e=P[1],r=P[2],a=P[3],n=P[4],o=P[5],i=P[6],s=P[7],f=P[8],x=P[9],y=P[10],v=P[11],T=P[12],u=P[13],b=P[14],_=P[15],C=S[0],M=S[1],E=S[2],A=S[3];return g[0]=C*t+M*n+E*f+A*T,g[1]=C*e+M*o+E*x+A*u,g[2]=C*r+M*i+E*y+A*b,g[3]=C*a+M*s+E*v+A*_,C=S[4],M=S[5],E=S[6],A=S[7],g[4]=C*t+M*n+E*f+A*T,g[5]=C*e+M*o+E*x+A*u,g[6]=C*r+M*i+E*y+A*b,g[7]=C*a+M*s+E*v+A*_,C=S[8],M=S[9],E=S[10],A=S[11],g[8]=C*t+M*n+E*f+A*T,g[9]=C*e+M*o+E*x+A*u,g[10]=C*r+M*i+E*y+A*b,g[11]=C*a+M*s+E*v+A*_,C=S[12],M=S[13],E=S[14],A=S[15],g[12]=C*t+M*n+E*f+A*T,g[13]=C*e+M*o+E*x+A*u,g[14]=C*r+M*i+E*y+A*b,g[15]=C*a+M*s+E*v+A*_,g}}),d0=Ft((Q,$)=>{$.exports=c;function c(g,P,S){var t=S[0],e=S[1],r=S[2],a,n,o,i,s,f,x,y,v,T,u,b;return P===g?(g[12]=P[0]*t+P[4]*e+P[8]*r+P[12],g[13]=P[1]*t+P[5]*e+P[9]*r+P[13],g[14]=P[2]*t+P[6]*e+P[10]*r+P[14],g[15]=P[3]*t+P[7]*e+P[11]*r+P[15]):(a=P[0],n=P[1],o=P[2],i=P[3],s=P[4],f=P[5],x=P[6],y=P[7],v=P[8],T=P[9],u=P[10],b=P[11],g[0]=a,g[1]=n,g[2]=o,g[3]=i,g[4]=s,g[5]=f,g[6]=x,g[7]=y,g[8]=v,g[9]=T,g[10]=u,g[11]=b,g[12]=a*t+s*e+v*r+P[12],g[13]=n*t+f*e+T*r+P[13],g[14]=o*t+x*e+u*r+P[14],g[15]=i*t+y*e+b*r+P[15]),g}}),Pm=Ft((Q,$)=>{$.exports=c;function c(g,P,S){var t=S[0],e=S[1],r=S[2];return g[0]=P[0]*t,g[1]=P[1]*t,g[2]=P[2]*t,g[3]=P[3]*t,g[4]=P[4]*e,g[5]=P[5]*e,g[6]=P[6]*e,g[7]=P[7]*e,g[8]=P[8]*r,g[9]=P[9]*r,g[10]=P[10]*r,g[11]=P[11]*r,g[12]=P[12],g[13]=P[13],g[14]=P[14],g[15]=P[15],g}}),uv=Ft((Q,$)=>{$.exports=c;function c(g,P,S,t){var e=t[0],r=t[1],a=t[2],n=Math.sqrt(e*e+r*r+a*a),o,i,s,f,x,y,v,T,u,b,_,C,M,E,A,h,p,k,w,R,O,N,V,H;return Math.abs(n)<1e-6?null:(n=1/n,e*=n,r*=n,a*=n,o=Math.sin(S),i=Math.cos(S),s=1-i,f=P[0],x=P[1],y=P[2],v=P[3],T=P[4],u=P[5],b=P[6],_=P[7],C=P[8],M=P[9],E=P[10],A=P[11],h=e*e*s+i,p=r*e*s+a*o,k=a*e*s-r*o,w=e*r*s-a*o,R=r*r*s+i,O=a*r*s+e*o,N=e*a*s+r*o,V=r*a*s-e*o,H=a*a*s+i,g[0]=f*h+T*p+C*k,g[1]=x*h+u*p+M*k,g[2]=y*h+b*p+E*k,g[3]=v*h+_*p+A*k,g[4]=f*w+T*R+C*O,g[5]=x*w+u*R+M*O,g[6]=y*w+b*R+E*O,g[7]=v*w+_*R+A*O,g[8]=f*N+T*V+C*H,g[9]=x*N+u*V+M*H,g[10]=y*N+b*V+E*H,g[11]=v*N+_*V+A*H,P!==g&&(g[12]=P[12],g[13]=P[13],g[14]=P[14],g[15]=P[15]),g)}}),sp=Ft((Q,$)=>{$.exports=c;function c(g,P,S){var t=Math.sin(S),e=Math.cos(S),r=P[4],a=P[5],n=P[6],o=P[7],i=P[8],s=P[9],f=P[10],x=P[11];return P!==g&&(g[0]=P[0],g[1]=P[1],g[2]=P[2],g[3]=P[3],g[12]=P[12],g[13]=P[13],g[14]=P[14],g[15]=P[15]),g[4]=r*e+i*t,g[5]=a*e+s*t,g[6]=n*e+f*t,g[7]=o*e+x*t,g[8]=i*e-r*t,g[9]=s*e-a*t,g[10]=f*e-n*t,g[11]=x*e-o*t,g}}),p0=Ft((Q,$)=>{$.exports=c;function c(g,P,S){var t=Math.sin(S),e=Math.cos(S),r=P[0],a=P[1],n=P[2],o=P[3],i=P[8],s=P[9],f=P[10],x=P[11];return P!==g&&(g[4]=P[4],g[5]=P[5],g[6]=P[6],g[7]=P[7],g[12]=P[12],g[13]=P[13],g[14]=P[14],g[15]=P[15]),g[0]=r*e-i*t,g[1]=a*e-s*t,g[2]=n*e-f*t,g[3]=o*e-x*t,g[8]=r*t+i*e,g[9]=a*t+s*e,g[10]=n*t+f*e,g[11]=o*t+x*e,g}}),zm=Ft((Q,$)=>{$.exports=c;function c(g,P,S){var t=Math.sin(S),e=Math.cos(S),r=P[0],a=P[1],n=P[2],o=P[3],i=P[4],s=P[5],f=P[6],x=P[7];return P!==g&&(g[8]=P[8],g[9]=P[9],g[10]=P[10],g[11]=P[11],g[12]=P[12],g[13]=P[13],g[14]=P[14],g[15]=P[15]),g[0]=r*e+i*t,g[1]=a*e+s*t,g[2]=n*e+f*t,g[3]=o*e+x*t,g[4]=i*e-r*t,g[5]=s*e-a*t,g[6]=f*e-n*t,g[7]=x*e-o*t,g}}),zy=Ft((Q,$)=>{$.exports=c;function c(g,P,S){var t,e,r,a=S[0],n=S[1],o=S[2],i=Math.sqrt(a*a+n*n+o*o);return Math.abs(i)<1e-6?null:(i=1/i,a*=i,n*=i,o*=i,t=Math.sin(P),e=Math.cos(P),r=1-e,g[0]=a*a*r+e,g[1]=n*a*r+o*t,g[2]=o*a*r-n*t,g[3]=0,g[4]=a*n*r-o*t,g[5]=n*n*r+e,g[6]=o*n*r+a*t,g[7]=0,g[8]=a*o*r+n*t,g[9]=n*o*r-a*t,g[10]=o*o*r+e,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g)}}),K4=Ft((Q,$)=>{$.exports=c;function c(g,P,S){var t=P[0],e=P[1],r=P[2],a=P[3],n=t+t,o=e+e,i=r+r,s=t*n,f=t*o,x=t*i,y=e*o,v=e*i,T=r*i,u=a*n,b=a*o,_=a*i;return g[0]=1-(y+T),g[1]=f+_,g[2]=x-b,g[3]=0,g[4]=f-_,g[5]=1-(s+T),g[6]=v+u,g[7]=0,g[8]=x+b,g[9]=v-u,g[10]=1-(s+y),g[11]=0,g[12]=S[0],g[13]=S[1],g[14]=S[2],g[15]=1,g}}),sw=Ft((Q,$)=>{$.exports=c;function c(g,P){return g[0]=P[0],g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=P[1],g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=P[2],g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),lw=Ft((Q,$)=>{$.exports=c;function c(g,P){return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=P[0],g[13]=P[1],g[14]=P[2],g[15]=1,g}}),uw=Ft((Q,$)=>{$.exports=c;function c(g,P){var S=Math.sin(P),t=Math.cos(P);return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=t,g[6]=S,g[7]=0,g[8]=0,g[9]=-S,g[10]=t,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),X4=Ft((Q,$)=>{$.exports=c;function c(g,P){var S=Math.sin(P),t=Math.cos(P);return g[0]=t,g[1]=0,g[2]=-S,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=S,g[9]=0,g[10]=t,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),J4=Ft((Q,$)=>{$.exports=c;function c(g,P){var S=Math.sin(P),t=Math.cos(P);return g[0]=t,g[1]=S,g[2]=0,g[3]=0,g[4]=-S,g[5]=t,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),Q4=Ft((Q,$)=>{$.exports=c;function c(g,P){var S=P[0],t=P[1],e=P[2],r=P[3],a=S+S,n=t+t,o=e+e,i=S*a,s=t*a,f=t*n,x=e*a,y=e*n,v=e*o,T=r*a,u=r*n,b=r*o;return g[0]=1-f-v,g[1]=s+b,g[2]=x-u,g[3]=0,g[4]=s-b,g[5]=1-i-v,g[6]=y+T,g[7]=0,g[8]=x+u,g[9]=y-T,g[10]=1-i-f,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),t6=Ft((Q,$)=>{$.exports=c;function c(g,P,S,t,e,r,a){var n=1/(S-P),o=1/(e-t),i=1/(r-a);return g[0]=r*2*n,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=r*2*o,g[6]=0,g[7]=0,g[8]=(S+P)*n,g[9]=(e+t)*o,g[10]=(a+r)*i,g[11]=-1,g[12]=0,g[13]=0,g[14]=a*r*2*i,g[15]=0,g}}),e6=Ft((Q,$)=>{$.exports=c;function c(g,P,S,t,e){var r=1/Math.tan(P/2),a=1/(t-e);return g[0]=r/S,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=r,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=(e+t)*a,g[11]=-1,g[12]=0,g[13]=0,g[14]=2*e*t*a,g[15]=0,g}}),r6=Ft((Q,$)=>{$.exports=c;function c(g,P,S,t){var e=Math.tan(P.upDegrees*Math.PI/180),r=Math.tan(P.downDegrees*Math.PI/180),a=Math.tan(P.leftDegrees*Math.PI/180),n=Math.tan(P.rightDegrees*Math.PI/180),o=2/(a+n),i=2/(e+r);return g[0]=o,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=i,g[6]=0,g[7]=0,g[8]=-((a-n)*o*.5),g[9]=(e-r)*i*.5,g[10]=t/(S-t),g[11]=-1,g[12]=0,g[13]=0,g[14]=t*S/(S-t),g[15]=0,g}}),b_=Ft((Q,$)=>{$.exports=c;function c(g,P,S,t,e,r,a){var n=1/(P-S),o=1/(t-e),i=1/(r-a);return g[0]=-2*n,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=-2*o,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=2*i,g[11]=0,g[12]=(P+S)*n,g[13]=(e+t)*o,g[14]=(a+r)*i,g[15]=1,g}}),n6=Ft((Q,$)=>{var c=Hu();$.exports=g;function g(P,S,t,e){var r,a,n,o,i,s,f,x,y,v,T=S[0],u=S[1],b=S[2],_=e[0],C=e[1],M=e[2],E=t[0],A=t[1],h=t[2];return Math.abs(T-E)<1e-6&&Math.abs(u-A)<1e-6&&Math.abs(b-h)<1e-6?c(P):(f=T-E,x=u-A,y=b-h,v=1/Math.sqrt(f*f+x*x+y*y),f*=v,x*=v,y*=v,r=C*y-M*x,a=M*f-_*y,n=_*x-C*f,v=Math.sqrt(r*r+a*a+n*n),v?(v=1/v,r*=v,a*=v,n*=v):(r=0,a=0,n=0),o=x*n-y*a,i=y*r-f*n,s=f*a-x*r,v=Math.sqrt(o*o+i*i+s*s),v?(v=1/v,o*=v,i*=v,s*=v):(o=0,i=0,s=0),P[0]=r,P[1]=o,P[2]=f,P[3]=0,P[4]=a,P[5]=i,P[6]=x,P[7]=0,P[8]=n,P[9]=s,P[10]=y,P[11]=0,P[12]=-(r*T+a*u+n*b),P[13]=-(o*T+i*u+s*b),P[14]=-(f*T+x*u+y*b),P[15]=1,P)}}),i6=Ft((Q,$)=>{$.exports=c;function c(g){return"mat4("+g[0]+", "+g[1]+", "+g[2]+", "+g[3]+", "+g[4]+", "+g[5]+", "+g[6]+", "+g[7]+", "+g[8]+", "+g[9]+", "+g[10]+", "+g[11]+", "+g[12]+", "+g[13]+", "+g[14]+", "+g[15]+")"}}),cw=Ft((Q,$)=>{$.exports={create:ws(),clone:Il(),copy:du(),identity:Hu(),transpose:Fc(),invert:kc(),adjoint:Vd(),determinant:kd(),multiply:e0(),translate:d0(),scale:Pm(),rotate:uv(),rotateX:sp(),rotateY:p0(),rotateZ:zm(),fromRotation:zy(),fromRotationTranslation:K4(),fromScaling:sw(),fromTranslation:lw(),fromXRotation:uw(),fromYRotation:X4(),fromZRotation:J4(),fromQuat:Q4(),frustum:t6(),perspective:e6(),perspectiveFromFieldOfView:r6(),ortho:b_(),lookAt:n6(),str:i6()}}),w_=Ft(Q=>{var $=cw();Q.init2dArray=function(c,g){for(var P=new Array(c),S=0;S{var c=un(),g=Ko(),P=w_(),S=cw();function t(T){var u;if(typeof T=="string"){if(u=document.getElementById(T),u===null)throw new Error("No DOM element with id '"+T+"' exists on the page.");return u}else if(T==null)throw new Error("DOM element provided is null or undefined");return T}function e(T){var u=c.select(T);return u.node()instanceof HTMLElement&&u.size()&&u.classed("js-plotly-plot")}function r(T){var u=T&&T.parentNode;u&&u.removeChild(T)}function a(T,u){n("global",T,u)}function n(T,u,b){var _="plotly.js-style-"+T,C=document.getElementById(_);if(!(C&&C.matches(".no-inline-styles"))){C||(C=document.createElement("style"),C.setAttribute("id",_),C.appendChild(document.createTextNode("")),document.head.appendChild(C));var M=C.sheet;M?M.insertRule?M.insertRule(u+"{"+b+"}",0):M.addRule?M.addRule(u,b,0):g.warn("addStyleRule failed"):g.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function o(T){var u="plotly.js-style-"+T,b=document.getElementById(u);b&&r(b)}function i(T,u,b,_,C,M){var E=_.split(":"),A=C.split(":"),h="data-btn-style-event-added";M||(M=document),M.querySelectorAll(T).forEach(function(p){p.getAttribute(h)||(p.addEventListener("mouseenter",function(){var k=this.querySelector(b);k&&(k.style[E[0]]=E[1])}),p.addEventListener("mouseleave",function(){var k=this.querySelector(b);k&&(u&&this.matches(u)?k.style[E[0]]=E[1]:k.style[A[0]]=A[1])}),p.setAttribute(h,!0))})}function s(T){var u=x(T),b=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return u.forEach(function(_){var C=f(_);if(C){var M=P.convertCssMatrix(C);b=S.multiply(b,b,M)}}),b}function f(T){var u=window.getComputedStyle(T,null),b=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("-moz-transform")||u.getPropertyValue("-ms-transform")||u.getPropertyValue("-o-transform")||u.getPropertyValue("transform");return b==="none"?null:b.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(_){return+_})}function x(T){for(var u=[];y(T);)u.push(T),T=T.parentNode,typeof ShadowRoot=="function"&&T instanceof ShadowRoot&&(T=T.host);return u}function y(T){return T&&(T instanceof Element||T instanceof HTMLElement)}function v(T,u){return T&&u&&T.top===u.top&&T.left===u.left&&T.right===u.right&&T.bottom===u.bottom}$.exports={getGraphDiv:t,isPlotDiv:e,removeElement:r,addStyleRule:a,addRelatedStyleRule:n,deleteRelatedStyleRule:o,setStyleOnHover:i,getFullTransformMatrix:s,getElementTransformMatrix:f,getElementAndAncestors:x,equalDomRects:v}}),El=Ft((Q,$)=>{$.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}}),Yc=Ft((Q,$)=>{var c=Ta().extendFlat,g=Ei(),P={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},S={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},t=P.flags.slice().concat(["fullReplot"]),e=S.flags.slice().concat("layoutReplot");$.exports={traces:P,layout:S,traceFlags:function(){return r(t)},layoutFlags:function(){return r(e)},update:function(o,i){var s=i.editType;if(s&&s!=="none")for(var f=s.split("+"),x=0;x{Q.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},Q.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},path:{valType:"string",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}}),k_=Ft((Q,$)=>{$.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}}),$u=Ft(Q=>{var{DATE_FORMAT_LINK:$,FORMAT_LINK:c}=k_(),g=["Variables that can't be found will be replaced with the specifier.",'For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing.',"Variables with an undefined value will be replaced with the fallback value."].join(" ");function P({supportOther:S}={}){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(S?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,c,"for details on the formatting syntax.",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".`,$,"for details on the date formatting syntax.",g].join(" ")}Q.templateFormatStringDescription=P,Q.hovertemplateAttrs=({editType:S="none",arrayOk:t}={},e={})=>Fr({valType:"string",dflt:"",editType:S},t!==!1?{arrayOk:!0}:{}),Q.texttemplateAttrs=({editType:S="calc",arrayOk:t}={},e={})=>Fr({valType:"string",dflt:"",editType:S},t!==!1?{arrayOk:!0}:{}),Q.shapeTexttemplateAttrs=({editType:S="arraydraw",newshape:t}={},e={})=>({valType:"string",dflt:"",editType:S}),Q.templatefallbackAttrs=({editType:S="none"}={})=>({valType:"any",dflt:"-",editType:S})}),y1=Ft((Q,$)=>{function c(b,_){return _?_.d2l(b):b}function g(b,_){return _?_.l2d(b):b}function P(b){return b.x0}function S(b){return b.x1}function t(b){return b.y0}function e(b){return b.y1}function r(b){return b.x0shift||0}function a(b){return b.x1shift||0}function n(b){return b.y0shift||0}function o(b){return b.y1shift||0}function i(b,_){return c(b.x1,_)+a(b)-c(b.x0,_)-r(b)}function s(b,_,C){return c(b.y1,C)+o(b)-c(b.y0,C)-n(b)}function f(b,_){return Math.abs(i(b,_))}function x(b,_,C){return Math.abs(s(b,_,C))}function y(b,_,C){return b.type!=="line"?void 0:Math.sqrt(Math.pow(i(b,_),2)+Math.pow(s(b,_,C),2))}function v(b,_){return g((c(b.x1,_)+a(b)+c(b.x0,_)+r(b))/2,_)}function T(b,_,C){return g((c(b.y1,C)+o(b)+c(b.y0,C)+n(b))/2,C)}function u(b,_,C){return b.type!=="line"?void 0:s(b,_,C)/i(b,_)}$.exports={x0:P,x1:S,y0:t,y1:e,slope:u,dx:i,dy:s,width:f,height:x,length:y,xcenter:v,ycenter:T}}),hw=Ft((Q,$)=>{var c=Yc().overrideAll,g=$o(),P=Ea(),S=Td().dash,t=Ta().extendFlat,{shapeTexttemplateAttrs:e,templatefallbackAttrs:r}=$u(),a=y1();$.exports=c({newshape:{visible:t({},g.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:t({},g.legend,{}),legendgroup:t({},g.legendgroup,{}),legendgrouptitle:{text:t({},g.legendgrouptitle.text,{}),font:P({})},legendrank:t({},g.legendrank,{}),legendwidth:t({},g.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:t({},S,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:t({},g.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:e({newshape:!0},{keys:Object.keys(a)}),texttemplatefallback:r({editType:"arraydraw"}),font:P({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}),cv=Ft((Q,$)=>{var c=Td().dash,g=Ta().extendFlat;$.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:g({},c,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}),Iy=Ft((Q,$)=>{$.exports=function(c){var g=c.editType;return{t:{valType:"number",dflt:0,editType:g},r:{valType:"number",dflt:0,editType:g},b:{valType:"number",dflt:0,editType:g},l:{valType:"number",dflt:0,editType:g},editType:g}}}),x1=Ft((Q,$)=>{var c=Ea(),g=El(),P=bi(),S=hw(),t=cv(),e=Iy(),r=Ta().extendFlat,a=c({editType:"calc"});a.family.dflt='"Open Sans", verdana, arial, sans-serif',a.size.dflt=12,a.color.dflt=P.defaultLine,$.exports={font:a,title:{text:{valType:"string",editType:"layoutstyle"},font:c({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:c({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:r(e({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:P.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:P.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:P.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:S.newshape,activeshape:S.activeshape,newselection:t.newselection,activeselection:t.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:r({},g.transition,{editType:"none"})}}),a6=Ft(()=>{(function(){if(!document.getElementById("8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc")){var Q=document.createElement("style");Q.id="8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc",Q.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(Q)}})()}),Xo=Ft(Q=>{var $=Ko(),c=Oo(),g=wl(),P=Ei(),S=r0().addStyleRule,t=Ta(),e=$o(),r=x1(),a=t.extendFlat,n=t.extendDeepAll;Q.modules={},Q.allCategories={},Q.allTypes=[],Q.subplotsRegistry={},Q.componentsRegistry={},Q.layoutArrayContainers=[],Q.layoutArrayRegexes=[],Q.traceLayoutAttributes={},Q.localeRegistry={},Q.apiMethodRegistry={},Q.collectableSubplotTypes=null,Q.register=function(b){if(Q.collectableSubplotTypes=null,b)b&&!Array.isArray(b)&&(b=[b]);else throw new Error("No argument passed to Plotly.register.");for(var _=0;_{var $=fa().timeFormat,c=ra(),g=Ko(),P=qo().mod,S=Da(),t=S.BADNUM,e=S.ONEDAY,r=S.ONEHOUR,a=S.ONEMIN,n=S.ONESEC,o=S.EPOCHJD,i=Xo(),s=fa().utcFormat,f=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,x=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,y=new Date().getFullYear()-70;function v(V){return V&&i.componentsRegistry.calendars&&typeof V=="string"&&V!=="gregorian"}Q.dateTick0=function(V,H){var F=T(V,!!H);if(H<2)return F;var U=Q.dateTime2ms(F,V);return U+=e*(H-1),Q.ms2DateTime(U,0,V)};function T(V,H){return v(V)?H?i.getComponentMethod("calendars","CANONICAL_SUNDAY")[V]:i.getComponentMethod("calendars","CANONICAL_TICK")[V]:H?"2000-01-02":"2000-01-01"}Q.dfltRange=function(V){return v(V)?i.getComponentMethod("calendars","DFLTRANGE")[V]:["2000-01-01","2001-01-01"]},Q.isJSDate=function(V){return typeof V=="object"&&V!==null&&typeof V.getTime=="function"};var u,b;Q.dateTime2ms=function(V,H){if(Q.isJSDate(V)){var F=V.getTimezoneOffset()*a,U=(V.getUTCMinutes()-V.getMinutes())*a+(V.getUTCSeconds()-V.getSeconds())*n+(V.getUTCMilliseconds()-V.getMilliseconds());if(U){var W=3*a;F=F-W/2+P(U-F+W/2,W)}return V=Number(V)-F,V>=u&&V<=b?V:t}if(typeof V!="string"&&typeof V!="number")return t;V=String(V);var q=v(H),X=V.charAt(0);q&&(X==="G"||X==="g")&&(V=V.substr(1),H="");var lt=q&&H.substr(0,7)==="chinese",yt=V.match(lt?x:f);if(!yt)return t;var pt=yt[1],st=yt[3]||"1",tt=Number(yt[5]||1),dt=Number(yt[7]||0),rt=Number(yt[9]||0),at=Number(yt[11]||0);if(q){if(pt.length===2)return t;pt=Number(pt);var vt;try{var it=i.getComponentMethod("calendars","getCal")(H);if(lt){var Y=st.charAt(st.length-1)==="i";st=parseInt(st,10),vt=it.newDate(pt,it.toMonthIndex(pt,st,Y),tt)}else vt=it.newDate(pt,Number(st),tt)}catch{return t}return vt?(vt.toJD()-o)*e+dt*r+rt*a+at*n:t}pt.length===2?pt=(Number(pt)+2e3-y)%100+y:pt=Number(pt),st-=1;var ft=new Date(Date.UTC(2e3,st,tt,dt,rt));return ft.setUTCFullYear(pt),ft.getUTCMonth()!==st||ft.getUTCDate()!==tt?t:ft.getTime()+at*n},u=Q.MIN_MS=Q.dateTime2ms("-9999"),b=Q.MAX_MS=Q.dateTime2ms("9999-12-31 23:59:59.9999"),Q.isDateTime=function(V,H){return Q.dateTime2ms(V,H)!==t};function _(V,H){return String(V+Math.pow(10,H)).substr(1)}var C=90*e,M=3*r,E=5*a;Q.ms2DateTime=function(V,H,F){if(typeof V!="number"||!(V>=u&&V<=b))return t;H||(H=0);var U=Math.floor(P(V+.05,1)*10),W=Math.round(V-U/10),q,X,lt,yt,pt,st;if(v(F)){var tt=Math.floor(W/e)+o,dt=Math.floor(P(V,e));try{q=i.getComponentMethod("calendars","getCal")(F).fromJD(tt).formatDate("yyyy-mm-dd")}catch{q=s("G%Y-%m-%d")(new Date(W))}if(q.charAt(0)==="-")for(;q.length<11;)q="-0"+q.substr(1);else for(;q.length<10;)q="0"+q;X=H=u+e&&V<=b-e))return t;var H=Math.floor(P(V+.05,1)*10),F=new Date(Math.round(V-H/10)),U=$("%Y-%m-%d")(F),W=F.getHours(),q=F.getMinutes(),X=F.getSeconds(),lt=F.getUTCMilliseconds()*10+H;return A(U,W,q,X,lt)};function A(V,H,F,U,W){if((H||F||U||W)&&(V+=" "+_(H,2)+":"+_(F,2),(U||W)&&(V+=":"+_(U,2),W))){for(var q=4;W%10===0;)q-=1,W/=10;V+="."+_(W,q)}return V}Q.cleanDate=function(V,H,F){if(V===t)return H;if(Q.isJSDate(V)||typeof V=="number"&&isFinite(V)){if(v(F))return g.error("JS Dates and milliseconds are incompatible with world calendars",V),H;if(V=Q.ms2DateTimeLocal(+V),!V&&H!==void 0)return H}else if(!Q.isDateTime(V,F))return g.error("unrecognized date",V),H;return V};var h=/%\d?f/g,p=/%h/g,k={1:"1",2:"1",3:"2",4:"2"};function w(V,H,F,U){V=V.replace(h,function(q){var X=Math.min(+q.charAt(1)||6,6),lt=(H/1e3%1+2).toFixed(X).substr(2).replace(/0+$/,"")||"0";return lt});var W=new Date(Math.floor(H+.05));if(V=V.replace(p,function(){return k[F("%q")(W)]}),v(U))try{V=i.getComponentMethod("calendars","worldCalFmt")(V,H,U)}catch{return"Invalid"}return F(V)(W)}var R=[59,59.9,59.99,59.999,59.9999];function O(V,H){var F=P(V+.05,e),U=_(Math.floor(F/r),2)+":"+_(P(Math.floor(F/a),60),2);if(H!=="M"){c(H)||(H=0);var W=Math.min(P(V/n,60),R[H]),q=(100+W).toFixed(H).substr(1);H>0&&(q=q.replace(/0+$/,"").replace(/[\.]$/,"")),U+=":"+q}return U}Q.formatDate=function(V,H,F,U,W,q){if(W=v(W)&&W,!H)if(F==="y")H=q.year;else if(F==="m")H=q.month;else if(F==="d")H=q.dayMonth+` +`+q.year;else return O(V,F)+` +`+w(q.dayMonthYear,V,U,W);return w(H,V,U,W)};var N=3*e;Q.incrementMonth=function(V,H,F){F=v(F)&&F;var U=P(V,e);if(V=Math.round(V-U),F)try{var W=Math.round(V/e)+o,q=i.getComponentMethod("calendars","getCal")(F),X=q.fromJD(W);return H%12?q.add(X,H,"m"):q.add(X,H/12,"y"),(X.toJD()-o)*e+U}catch{g.error("invalid ms "+V+" in calendar "+F)}var lt=new Date(V+N);return lt.setUTCMonth(lt.getUTCMonth()+H)+U-N},Q.findExactDates=function(V,H){for(var F=0,U=0,W=0,q=0,X,lt,yt=v(H)&&i.getComponentMethod("calendars","getCal")(H),pt=0;pt{$.exports=function(c){return c}}),T_=Ft(Q=>{var $=ra(),c=Ko(),g=_1(),P=Da().BADNUM,S=1e-9;Q.findBin=function(n,o,i){if($(o.start))return i?Math.ceil((n-o.start)/o.size-S)-1:Math.floor((n-o.start)/o.size+S);var s=0,f=o.length,x=0,y=f>1?(o[f-1]-o[0])/(f-1):1,v,T;for(y>=0?T=i?t:e:T=i?a:r,n+=y*S*(i?-1:1)*(y>=0?1:-1);s90&&c.log("Long binary search..."),s-1};function t(n,o){return no}function a(n,o){return n>=o}Q.sorterAsc=function(n,o){return n-o},Q.sorterDes=function(n,o){return o-n},Q.distinctVals=function(n){var o=n.slice();o.sort(Q.sorterAsc);var i;for(i=o.length-1;i>-1&&o[i]===P;i--);for(var s=o[i]-o[0]||1,f=s/(i||1)/1e4,x=[],y,v=0;v<=i;v++){var T=o[v],u=T-y;y===void 0?(x.push(T),y=T):u>f&&(s=Math.min(s,u),x.push(T),y=T)}return{vals:x,minDiff:s}},Q.roundUp=function(n,o,i){for(var s=0,f=o.length-1,x,y=0,v=i?0:1,T=i?1:0,u=i?Math.ceil:Math.floor;s0&&(s=1),i&&s)return n.sort(o)}return s?n:n.reverse()},Q.findIndexOfMin=function(n,o){o=o||g;for(var i=1/0,s,f=0;f{$.exports=function(c){return Object.keys(c).sort()}}),s6=Ft(Q=>{var $=ra(),c=Va().isArrayOrTypedArray;Q.aggNums=function(g,P,S,t){var e,r;if((!t||t>S.length)&&(t=S.length),$(P)||(P=!1),c(S[0])){for(r=new Array(t),e=0;eg.length-1)return g[g.length-1];var S=P%1;return S*g[Math.ceil(P)]+(1-S)*g[Math.floor(P)]}}),l6=Ft((Q,$)=>{var c=qo(),g=c.mod,P=c.modHalf,S=Math.PI,t=2*S;function e(T){return T/180*S}function r(T){return T/S*180}function a(T){return Math.abs(T[1]-T[0])>t-1e-14}function n(T,u){return P(u-T,t)}function o(T,u){return Math.abs(n(T,u))}function i(T,u){if(a(u))return!0;var b,_;u[0]_&&(_+=t);var C=g(T,t),M=C+t;return C>=b&&C<=_||M>=b&&M<=_}function s(T,u,b,_){if(!i(u,_))return!1;var C,M;return b[0]=C&&T<=M}function f(T,u,b,_,C,M,E){C=C||0,M=M||0;var A=a([b,_]),h,p,k,w,R;A?(h=0,p=S,k=t):b<_?(h=b,k=_):(h=_,k=b),T{Q.isLeftAnchor=function($){return $.xanchor==="left"||$.xanchor==="auto"&&$.x<=1/3},Q.isCenterAnchor=function($){return $.xanchor==="center"||$.xanchor==="auto"&&$.x>1/3&&$.x<2/3},Q.isRightAnchor=function($){return $.xanchor==="right"||$.xanchor==="auto"&&$.x>=2/3},Q.isTopAnchor=function($){return $.yanchor==="top"||$.yanchor==="auto"&&$.y>=2/3},Q.isMiddleAnchor=function($){return $.yanchor==="middle"||$.yanchor==="auto"&&$.y>1/3&&$.y<2/3},Q.isBottomAnchor=function($){return $.yanchor==="bottom"||$.yanchor==="auto"&&$.y<=1/3}}),c6=Ft(Q=>{var $=qo().mod;Q.segmentsIntersect=c;function c(e,r,a,n,o,i,s,f){var x=a-e,y=o-e,v=s-o,T=n-r,u=i-r,b=f-i,_=x*b-v*T;if(_===0)return null;var C=(y*b-v*u)/_,M=(y*T-x*u)/_;return M<0||M>1||C<0||C>1?null:{x:e+x*C,y:r+T*C}}Q.segmentDistance=function(e,r,a,n,o,i,s,f){if(c(e,r,a,n,o,i,s,f))return 0;var x=a-e,y=n-r,v=s-o,T=f-i,u=x*x+y*y,b=v*v+T*T,_=Math.min(g(x,y,u,o-e,i-r),g(x,y,u,s-e,f-r),g(v,T,b,e-o,r-i),g(v,T,b,a-o,n-i));return Math.sqrt(_)};function g(e,r,a,n,o){var i=n*e+o*r;if(i<0)return n*n+o*o;if(i>a){var s=n-e,f=o-r;return s*s+f*f}else{var x=n*r-o*e;return x*x/a}}var P,S,t;Q.getTextLocation=function(e,r,a,n){if((e!==S||n!==t)&&(P={},S=e,t=n),P[a])return P[a];var o=e.getPointAtLength($(a-n/2,r)),i=e.getPointAtLength($(a+n/2,r)),s=Math.atan((i.y-o.y)/(i.x-o.x)),f=e.getPointAtLength($(a,r)),x=(f.x*4+o.x+i.x)/6,y=(f.y*4+o.y+i.y)/6,v={x,y,theta:s};return P[a]=v,v},Q.clearLocationCache=function(){S=null},Q.getVisibleSegment=function(e,r,a){var n=r.left,o=r.right,i=r.top,s=r.bottom,f=0,x=e.getTotalLength(),y=x,v,T;function u(_){var C=e.getPointAtLength(_);_===0?v=C:_===x&&(T=C);var M=C.xo?C.x-o:0,E=C.ys?C.y-s:0;return Math.sqrt(M*M+E*E)}for(var b=u(f);b;){if(f+=b+a,f>y)return;b=u(f)}for(b=u(y);b;){if(y-=b+a,f>y)return;b=u(y)}return{min:f,max:y,len:y-f,total:x,isClosed:f===0&&y===x&&Math.abs(v.x-T.x)<.1&&Math.abs(v.y-T.y)<.1}},Q.findPointOnPath=function(e,r,a,n){n=n||{};for(var o=n.pathLength||e.getTotalLength(),i=n.tolerance||.001,s=n.iterationLimit||30,f=e.getPointAtLength(0)[a]>e.getPointAtLength(o)[a]?-1:1,x=0,y=0,v=o,T,u,b;x0?v=T:y=T,x++}return u}}),A_=Ft(Q=>{var $={};Q.throttle=function(g,P,S){var t=$[g],e=Date.now();if(!t){for(var r in $)$[r].tst.ts+P){a();return}t.timer=setTimeout(function(){a(),t.timer=null},P)},Q.done=function(g){var P=$[g];return!P||!P.timer?Promise.resolve():new Promise(function(S){var t=P.onDone;P.onDone=function(){t&&t(),S(),P.onDone=null}})},Q.clear=function(g){if(g)c($[g]),delete $[g];else for(var P in $)Q.clear(P)};function c(g){g&&g.timer!==null&&(clearTimeout(g.timer),g.timer=null)}}),M_=Ft((Q,$)=>{$.exports=function(c){c._responsiveChartHandler&&(window.removeEventListener("resize",c._responsiveChartHandler),delete c._responsiveChartHandler)}}),b1=Ft((Q,$)=>{$.exports=S,$.exports.isMobile=S,$.exports.default=S;var c=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,g=/CrOS/,P=/android|ipad|playbook|silk/i;function S(t){t||(t={});let e=t.ua;if(!e&&typeof navigator<"u"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string")return!1;let r=c.test(e)&&!g.test(e)||!!t.tablet&&P.test(e);return!r&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.indexOf("Macintosh")!==-1&&e.indexOf("Safari")!==-1&&(r=!0),r}}),fw=Ft((Q,$)=>{var c=ra(),g=b1();$.exports=function(S){var t;if(S&&S.hasOwnProperty("userAgent")?t=S.userAgent:t=P(),typeof t!="string")return!0;var e=g({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!e)for(var r=t.split(" "),a=1;a-1;o--){var i=r[o];if(i.substr(0,8)==="Version/"){var s=i.substr(8).split(".")[0];if(c(s)&&(s=+s),s>=13)return!0}}}return e};function P(){var S;return typeof navigator<"u"&&(S=navigator.userAgent),S&&S.headers&&typeof S.headers["user-agent"]=="string"&&(S=S.headers["user-agent"]),S}}),dw=Ft((Q,$)=>{var c=un();$.exports=function(g,P,S){var t=g.selectAll("g."+S.replace(/\s/g,".")).data(P,function(r){return r[0].trace.uid});t.exit().remove(),t.enter().append("g").attr("class",S),t.order();var e=g.classed("rangeplot")?"nodeRangePlot3":"node3";return t.each(function(r){r[0][e]=c.select(this)}),t}}),w1=Ft((Q,$)=>{var c=Xo();$.exports=function(g,P){for(var S=g._context.locale,t=0;t<2;t++){for(var e=g._context.locales,r=0;r<2;r++){var a=(e[S]||{}).dictionary;if(a){var n=a[P];if(n)return n}e=c.localeRegistry}var o=S.split("-")[0];if(o===S)break;S=o}return P}}),Cc=Ft((Q,$)=>{$.exports=function(c){for(var g={},P=[],S=0,t=0;t{$.exports=function(S){for(var t=P(S)?g:c,e=[],r=0;r{$.exports=function(c,g){if(!g)return c;var P=1/Math.abs(g),S=P>1?(P*c+P*g)/P:c+g,t=String(S).length;if(t>16){var e=String(g).length,r=String(c).length;if(t>=r+e){var a=parseFloat(S).toPrecision(12);a.indexOf("e+")===-1&&(S=+a)}}return S}}),hv=Ft((Q,$)=>{var c=ra(),g=Da().BADNUM,P=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;$.exports=function(S){return typeof S=="string"&&(S=S.replace(P,"")),c(S)?Number(S):g}}),bn=Ft((Q,$)=>{var c=un(),g=fa().utcFormat,P=Li().format,S=ra(),t=Da(),e=t.FP_SAFE,r=-e,a=t.BADNUM,n=$.exports={};n.adjustFormat=function(it){return!it||/^\d[.]\df/.test(it)||/[.]\d%/.test(it)?it:it==="0.f"?"~f":/^\d%/.test(it)?"~%":/^\ds/.test(it)?"~s":!/^[~,.0$]/.test(it)&&/[&fps]/.test(it)?"~"+it:it};var o={};n.warnBadFormat=function(it){var Y=String(it);o[Y]||(o[Y]=1,n.warn('encountered bad format: "'+Y+'"'))},n.noFormat=function(it){return String(it)},n.numberFormat=function(it){var Y;try{Y=P(n.adjustFormat(it))}catch{return n.warnBadFormat(it),n.noFormat}return Y},n.nestedProperty=ss(),n.keyedContainer=mo(),n.relativeAttr=ko(),n.isPlainObject=Ei(),n.toLogRange=pl(),n.relinkPrivateKeys=fu();var i=Va();n.isArrayBuffer=i.isArrayBuffer,n.isTypedArray=i.isTypedArray,n.isArrayOrTypedArray=i.isArrayOrTypedArray,n.isArray1D=i.isArray1D,n.ensureArray=i.ensureArray,n.concat=i.concat,n.maxRowLength=i.maxRowLength,n.minRowLength=i.minRowLength;var s=qo();n.mod=s.mod,n.modHalf=s.modHalf;var f=yo();n.valObjectMeta=f.valObjectMeta,n.coerce=f.coerce,n.coerce2=f.coerce2,n.coerceFont=f.coerceFont,n.coercePattern=f.coercePattern,n.coerceHoverinfo=f.coerceHoverinfo,n.coerceSelectionMarkerOpacity=f.coerceSelectionMarkerOpacity,n.validate=f.validate;var x=o6();n.dateTime2ms=x.dateTime2ms,n.isDateTime=x.isDateTime,n.ms2DateTime=x.ms2DateTime,n.ms2DateTimeLocal=x.ms2DateTimeLocal,n.cleanDate=x.cleanDate,n.isJSDate=x.isJSDate,n.formatDate=x.formatDate,n.incrementMonth=x.incrementMonth,n.dateTick0=x.dateTick0,n.dfltRange=x.dfltRange,n.findExactDates=x.findExactDates,n.MIN_MS=x.MIN_MS,n.MAX_MS=x.MAX_MS;var y=T_();n.findBin=y.findBin,n.sorterAsc=y.sorterAsc,n.sorterDes=y.sorterDes,n.distinctVals=y.distinctVals,n.roundUp=y.roundUp,n.sort=y.sort,n.findIndexOfMin=y.findIndexOfMin,n.sortObjectKeys=G0();var v=s6();n.aggNums=v.aggNums,n.len=v.len,n.mean=v.mean,n.geometricMean=v.geometricMean,n.median=v.median,n.midRange=v.midRange,n.variance=v.variance,n.stdev=v.stdev,n.interp=v.interp;var T=w_();n.init2dArray=T.init2dArray,n.transposeRagged=T.transposeRagged,n.dot=T.dot,n.translationMatrix=T.translationMatrix,n.rotationMatrix=T.rotationMatrix,n.rotationXYMatrix=T.rotationXYMatrix,n.apply3DTransform=T.apply3DTransform,n.apply2DTransform=T.apply2DTransform,n.apply2DTransform2=T.apply2DTransform2,n.convertCssMatrix=T.convertCssMatrix,n.inverseTransformMatrix=T.inverseTransformMatrix;var u=l6();n.deg2rad=u.deg2rad,n.rad2deg=u.rad2deg,n.angleDelta=u.angleDelta,n.angleDist=u.angleDist,n.isFullCircle=u.isFullCircle,n.isAngleInsideSector=u.isAngleInsideSector,n.isPtInsideSector=u.isPtInsideSector,n.pathArc=u.pathArc,n.pathSector=u.pathSector,n.pathAnnulus=u.pathAnnulus;var b=u6();n.isLeftAnchor=b.isLeftAnchor,n.isCenterAnchor=b.isCenterAnchor,n.isRightAnchor=b.isRightAnchor,n.isTopAnchor=b.isTopAnchor,n.isMiddleAnchor=b.isMiddleAnchor,n.isBottomAnchor=b.isBottomAnchor;var _=c6();n.segmentsIntersect=_.segmentsIntersect,n.segmentDistance=_.segmentDistance,n.getTextLocation=_.getTextLocation,n.clearLocationCache=_.clearLocationCache,n.getVisibleSegment=_.getVisibleSegment,n.findPointOnPath=_.findPointOnPath;var C=Ta();n.extendFlat=C.extendFlat,n.extendDeep=C.extendDeep,n.extendDeepAll=C.extendDeepAll,n.extendDeepNoArrays=C.extendDeepNoArrays;var M=Ko();n.log=M.log,n.warn=M.warn,n.error=M.error;var E=vo();n.counterRegex=E.counter;var A=A_();n.throttle=A.throttle,n.throttleDone=A.done,n.clearThrottle=A.clear;var h=r0();n.getGraphDiv=h.getGraphDiv,n.isPlotDiv=h.isPlotDiv,n.removeElement=h.removeElement,n.addStyleRule=h.addStyleRule,n.addRelatedStyleRule=h.addRelatedStyleRule,n.deleteRelatedStyleRule=h.deleteRelatedStyleRule,n.setStyleOnHover=h.setStyleOnHover,n.getFullTransformMatrix=h.getFullTransformMatrix,n.getElementTransformMatrix=h.getElementTransformMatrix,n.getElementAndAncestors=h.getElementAndAncestors,n.equalDomRects=h.equalDomRects,n.clearResponsive=M_(),n.preserveDrawingBuffer=fw(),n.makeTraceGroups=dw(),n._=w1(),n.notifier=ns(),n.filterUnique=Cc(),n.filterVisible=Tf(),n.pushUnique=wl(),n.increment=Oy(),n.cleanNumber=hv(),n.ensureNumber=function(it){return S(it)?(it=Number(it),it>e||it=Y?!1:S(it)&&it>=0&&it%1===0},n.noop=Oo(),n.identity=_1(),n.repeat=function(it,Y){for(var ft=new Array(Y),ut=0;utft?Math.max(ft,Math.min(Y,it)):Math.max(Y,Math.min(ft,it))},n.bBoxIntersect=function(it,Y,ft){return ft=ft||0,it.left<=Y.right+ft&&Y.left<=it.right+ft&&it.top<=Y.bottom+ft&&Y.top<=it.bottom+ft},n.simpleMap=function(it,Y,ft,ut,wt){for(var zt=it.length,Pt=new Array(zt),Wt=0;Wt=Math.pow(2,ft)?wt>10?(n.warn("randstr failed uniqueness"),Pt):it(Y,ft,ut,(wt||0)+1):Pt},n.OptionControl=function(it,Y){it||(it={}),Y||(Y="opt");var ft={};return ft.optionList=[],ft._newoption=function(ut){ut[Y]=it,ft[ut.name]=ut,ft.optionList.push(ut)},ft["_"+Y]=it,ft},n.smooth=function(it,Y){if(Y=Math.round(Y)||0,Y<2)return it;var ft=it.length,ut=2*ft,wt=2*Y-1,zt=new Array(wt),Pt=new Array(ft),Wt,Ht,Jt,ge;for(Wt=0;Wt=ut&&(Jt-=ut*Math.floor(Jt/ut)),Jt<0?Jt=-1-Jt:Jt>=ft&&(Jt=ut-1-Jt),ge+=it[Jt]*zt[Ht];Pt[Wt]=ge}return Pt},n.syncOrAsync=function(it,Y,ft){var ut,wt;function zt(){return n.syncOrAsync(it,Y,ft)}for(;it.length;)if(wt=it.splice(0,1)[0],ut=wt(Y),ut&&ut.then)return ut.then(zt);return ft&&ft(Y)},n.stripTrailingSlash=function(it){return it.substr(-1)==="/"?it.substr(0,it.length-1):it},n.noneOrAll=function(it,Y,ft){if(it){var ut=!1,wt=!0,zt,Pt;for(zt=0;zt0?wt:0})},n.fillArray=function(it,Y,ft,ut){if(ut=ut||n.identity,n.isArrayOrTypedArray(it))for(var wt=0;wtO.test(window.navigator.userAgent);var N=/Firefox\/(\d+)\.\d+/;n.getFirefoxVersion=function(){var it=N.exec(window.navigator.userAgent);if(it&&it.length===2){var Y=parseInt(it[1]);if(!isNaN(Y))return Y}return null},n.isD3Selection=function(it){return it instanceof c.selection},n.ensureSingle=function(it,Y,ft,ut){var wt=it.select(Y+(ft?"."+ft:""));if(wt.size())return wt;var zt=it.append(Y);return ft&&zt.classed(ft,!0),ut&&zt.call(ut),zt},n.ensureSingleById=function(it,Y,ft,ut){var wt=it.select(Y+"#"+ft);if(wt.size())return wt;var zt=it.append(Y).attr("id",ft);return ut&&zt.call(ut),zt},n.objectFromPath=function(it,Y){for(var ft=it.split("."),ut,wt=ut={},zt=0;zt1?wt+Pt[1]:"";if(zt&&(Pt.length>1||Wt.length>4||ft))for(;ut.test(Wt);)Wt=Wt.replace(ut,"$1"+zt+"$2");return Wt+Ht},n.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var U=/^\w*$/;n.templateString=function(it,Y){var ft={};return it.replace(n.TEMPLATE_STRING_REGEX,function(ut,wt){var zt;return U.test(wt)?zt=Y[wt]:(ft[wt]=ft[wt]||n.nestedProperty(Y,wt).get,zt=ft[wt](!0)),zt!==void 0?zt:""})};var W={max:10,count:0,name:"hovertemplate"};n.hovertemplateString=it=>st(zr(Fr({},it),{opts:W}));var q={max:10,count:0,name:"texttemplate"};n.texttemplateString=it=>st(zr(Fr({},it),{opts:q}));var X=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function lt(it){var Y=it.match(X);return Y?{key:Y[1],op:Y[2],number:Number(Y[3])}:{key:it,op:null,number:null}}var yt={max:10,count:0,name:"texttemplate",parseMultDiv:!0};n.texttemplateStringForShapes=it=>st(zr(Fr({},it),{opts:yt}));var pt=/^[:|\|]/;function st({data:it=[],locale:Y,fallback:ft,labels:ut={},opts:wt,template:zt}){return zt.replace(n.TEMPLATE_STRING_REGEX,(Pt,Wt,Ht)=>{let Jt=["xother","yother"].includes(Wt),ge=["_xother","_yother"].includes(Wt),he=["_xother_","_yother_"].includes(Wt),de=["xother_","yother_"].includes(Wt),se=Jt||ge||de||he;(ge||he)&&(Wt=Wt.substring(1)),(de||he)&&(Wt=Wt.substring(0,Wt.length-1));let Tt=null,Lt=null;if(wt.parseMultDiv){var Mt=lt(Wt);Wt=Mt.key,Tt=Mt.op,Lt=Mt.number}let te;if(se){if(ut[Wt]===void 0)return"";te=ut[Wt]}else for(let He of it)if(He){if(He.hasOwnProperty(Wt)){te=He[Wt];break}if(U.test(Wt)||(te=n.nestedProperty(He,Wt).get(!0)),te!==void 0)break}if(te===void 0){let{count:He,max:Ge,name:cr}=wt,ur=ft===!1?Pt:ft;return He=tt&&Pt<=dt,Jt=Wt>=tt&&Wt<=dt;if(Ht&&(ut=10*ut+Pt-tt),Jt&&(wt=10*wt+Wt-tt),!Ht||!Jt){if(ut!==wt)return ut-wt;if(Pt!==Wt)return Pt-Wt}}return wt-ut};var rt=2e9;n.seedPseudoRandom=function(){rt=2e9},n.pseudoRandom=function(){var it=rt;return rt=(69069*rt+1)%4294967296,Math.abs(rt-it)<429496729?n.pseudoRandom():rt/4294967296},n.fillText=function(it,Y,ft){var ut=Array.isArray(ft)?function(Pt){ft.push(Pt)}:function(Pt){ft.text=Pt},wt=n.extractOption(it,Y,"htx","hovertext");if(n.isValidTextValue(wt))return ut(wt);var zt=n.extractOption(it,Y,"tx","text");if(n.isValidTextValue(zt))return ut(zt)},n.isValidTextValue=function(it){return it||it===0},n.formatPercent=function(it,Y){Y=Y||0;for(var ft=(Math.round(100*it*Math.pow(10,Y))*Math.pow(.1,Y)).toFixed(Y)+"%",ut=0;ut1&&(Jt=1):Jt=0,n.strTranslate(wt-Jt*(ft+Pt),zt-Jt*(ut+Wt))+n.strScale(Jt)+(Ht?"rotate("+Ht+(Y?"":" "+ft+" "+ut)+")":"")},n.setTransormAndDisplay=function(it,Y){it.attr("transform",n.getTextTransform(Y)),it.style("display",Y.scale?null:"none")},n.ensureUniformFontSize=function(it,Y){var ft=n.extendFlat({},Y);return ft.size=Math.max(Y.size,it._fullLayout.uniformtext.minsize||0),ft},n.join2=function(it,Y,ft){var ut=it.length;return ut>1?it.slice(0,-1).join(Y)+ft+it[ut-1]:it.join(Y)},n.bigFont=function(it){return Math.round(1.2*it)};var at=n.getFirefoxVersion(),vt=at!==null&&at<86;n.getPositionFromD3Event=function(){return vt?[c.event.layerX,c.event.layerY]:[c.event.offsetX,c.event.offsetY]}}),S_=Ft(()=>{var Q=bn(),$={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(g in $)c=g.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Q.addStyleRule(c,$[g]);var c,g}),Wu=Ft((Q,$)=>{$.exports=!0}),Rf=Ft((Q,$)=>{var c=Wu(),g;typeof window.matchMedia=="function"?g=!window.matchMedia("(hover: none)").matches:g=c,$.exports=g}),Im=Ft((Q,$)=>{var c=typeof Reflect=="object"?Reflect:null,g=c&&typeof c.apply=="function"?c.apply:function(C,M,E){return Function.prototype.apply.call(C,M,E)},P;c&&typeof c.ownKeys=="function"?P=c.ownKeys:Object.getOwnPropertySymbols?P=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:P=function(C){return Object.getOwnPropertyNames(C)};function S(C){console&&console.warn&&console.warn(C)}var t=Number.isNaN||function(C){return C!==C};function e(){e.init.call(this)}$.exports=e,$.exports.once=u,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._eventsCount=0,e.prototype._maxListeners=void 0;var r=10;function a(C){if(typeof C!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof C)}Object.defineProperty(e,"defaultMaxListeners",{enumerable:!0,get:function(){return r},set:function(C){if(typeof C!="number"||C<0||t(C))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+C+".");r=C}}),e.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},e.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||t(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function n(C){return C._maxListeners===void 0?e.defaultMaxListeners:C._maxListeners}e.prototype.getMaxListeners=function(){return n(this)},e.prototype.emit=function(C){for(var M=[],E=1;E0&&(p=M[0]),p instanceof Error)throw p;var k=new Error("Unhandled error."+(p?" ("+p.message+")":""));throw k.context=p,k}var w=h[C];if(w===void 0)return!1;if(typeof w=="function")g(w,this,M);else for(var R=w.length,O=y(w,R),E=0;E0&&k.length>h&&!k.warned){k.warned=!0;var w=new Error("Possible EventEmitter memory leak detected. "+k.length+" "+String(M)+" listeners added. Use emitter.setMaxListeners() to increase limit");w.name="MaxListenersExceededWarning",w.emitter=C,w.type=M,w.count=k.length,S(w)}return C}e.prototype.addListener=function(C,M){return o(this,C,M,!1)},e.prototype.on=e.prototype.addListener,e.prototype.prependListener=function(C,M){return o(this,C,M,!0)};function i(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function s(C,M,E){var A={fired:!1,wrapFn:void 0,target:C,type:M,listener:E},h=i.bind(A);return h.listener=E,A.wrapFn=h,h}e.prototype.once=function(C,M){return a(M),this.on(C,s(this,C,M)),this},e.prototype.prependOnceListener=function(C,M){return a(M),this.prependListener(C,s(this,C,M)),this},e.prototype.removeListener=function(C,M){var E,A,h,p,k;if(a(M),A=this._events,A===void 0)return this;if(E=A[C],E===void 0)return this;if(E===M||E.listener===M)--this._eventsCount===0?this._events=Object.create(null):(delete A[C],A.removeListener&&this.emit("removeListener",C,E.listener||M));else if(typeof E!="function"){for(h=-1,p=E.length-1;p>=0;p--)if(E[p]===M||E[p].listener===M){k=E[p].listener,h=p;break}if(h<0)return this;h===0?E.shift():v(E,h),E.length===1&&(A[C]=E[0]),A.removeListener!==void 0&&this.emit("removeListener",C,k||M)}return this},e.prototype.off=e.prototype.removeListener,e.prototype.removeAllListeners=function(C){var M,E,A;if(E=this._events,E===void 0)return this;if(E.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):E[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete E[C]),this;if(arguments.length===0){var h=Object.keys(E),p;for(A=0;A=0;A--)this.removeListener(C,M[A]);return this};function f(C,M,E){var A=C._events;if(A===void 0)return[];var h=A[M];return h===void 0?[]:typeof h=="function"?E?[h.listener||h]:[h]:E?T(h):y(h,h.length)}e.prototype.listeners=function(C){return f(this,C,!0)},e.prototype.rawListeners=function(C){return f(this,C,!1)},e.listenerCount=function(C,M){return typeof C.listenerCount=="function"?C.listenerCount(M):x.call(C,M)},e.prototype.listenerCount=x;function x(C){var M=this._events;if(M!==void 0){var E=M[C];if(typeof E=="function")return 1;if(E!==void 0)return E.length}return 0}e.prototype.eventNames=function(){return this._eventsCount>0?P(this._events):[]};function y(C,M){for(var E=new Array(M),A=0;A{var c=Im().EventEmitter,g={init:function(P){if(P._ev instanceof c)return P;var S=new c,t=new c;return P._ev=S,P._internalEv=t,P.on=S.on.bind(S),P.once=S.once.bind(S),P.removeListener=S.removeListener.bind(S),P.removeAllListeners=S.removeAllListeners.bind(S),P._internalOn=t.on.bind(t),P._internalOnce=t.once.bind(t),P._removeInternalListener=t.removeListener.bind(t),P._removeAllInternalListeners=t.removeAllListeners.bind(t),P.emit=function(e,r){S.emit(e,r),t.emit(e,r)},typeof P.addEventListener=="function"&&P.addEventListener("wheel",()=>{},{passive:!0}),P},triggerHandler:function(P,S,t){var e,r=P._ev;if(!r)return;var a=r._events[S];if(!a)return;function n(i){if(i.listener){if(r.removeListener(S,i.listener),!i.fired)return i.fired=!0,i.listener.apply(r,[t])}else return i.apply(r,[t])}a=Array.isArray(a)?a:[a];var o;for(o=0;o{var c=bn(),g=ms().dfltConfig;function P(t,e){for(var r=[],a,n=0;ng.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)},S.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},S.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},S.undo=function(t){var e,r;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r{$.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}}),Dm=Ft(Q=>{var $=Xo(),c=bn(),g=$o(),P=x1(),S=pw(),t=El(),e=ms().configAttributes,r=Yc(),a=c.extendDeepAll,n=c.isPlainObject,o=c.isArrayOrTypedArray,i=c.nestedProperty,s=c.valObjectMeta,f="_isSubplotObj",x="_isLinkedToArray",y="_arrayAttrRegexps",v="_deprecated",T=[f,x,y,v];Q.IS_SUBPLOT_OBJ=f,Q.IS_LINKED_TO_ARRAY=x,Q.DEPRECATED=v,Q.UNDERSCORE_ATTRS=T,Q.get=function(){var O={};return $.allTypes.forEach(function(N){O[N]=C(N)}),{defs:{valObjects:s,metaKeys:T.concat(["description","role","editType","impliedEdits"]),editType:{traces:r.traces,layout:r.layout},impliedEdits:{}},traces:O,layout:M(),frames:E(),animation:A(t),config:A(e)}},Q.crawl=function(O,N,V,H){var F=V||0;H=H||"",Object.keys(O).forEach(function(U){var W=O[U];if(T.indexOf(U)===-1){var q=(H?H+".":"")+U;N(W,U,O,F,q),!Q.isValObject(W)&&n(W)&&U!=="impliedEdits"&&Q.crawl(W,N,F+1,q)}})},Q.isValObject=function(O){return O&&O.valType!==void 0},Q.findArrayAttributes=function(O){var N=[],V=[],H=[],F,U;function W(X,lt,yt,pt){V=V.slice(0,pt).concat([lt]),H=H.slice(0,pt).concat([X&&X._isLinkedToArray]);var st=X&&(X.valType==="data_array"||X.arrayOk===!0)&&!(V[pt-1]==="colorbar"&&(lt==="ticktext"||lt==="tickvals"));st&&q(F,0,"")}function q(X,lt,yt){var pt=X[V[lt]],st=yt+V[lt];if(lt===V.length-1)o(pt)&&N.push(U+st);else if(H[lt]){if(Array.isArray(pt))for(var tt=0;tt=U.length)return!1;if(O.dimensions===2){if(V++,N.length===V)return O;var W=N[V];if(!_(W))return!1;O=U[F][W]}else O=U[F]}else O=U}}return O}function _(O){return O===Math.round(O)&&O>=0}function C(O){var N,V;N=$.modules[O]._module,V=N.basePlotModule;var H={};H.type=null;var F=a({},g),U=a({},N.attributes);Q.crawl(U,function(X,lt,yt,pt,st){i(F,st).set(void 0),X===void 0&&i(U,st).set(void 0)}),a(H,F),$.traceIs(O,"noOpacity")&&delete H.opacity,$.traceIs(O,"showLegend")||(delete H.showlegend,delete H.legendgroup),$.traceIs(O,"noHover")&&(delete H.hoverinfo,delete H.hoverlabel),N.selectPoints||delete H.selectedpoints,a(H,U),V.attributes&&a(H,V.attributes),H.type=O;var W={meta:N.meta||{},categories:N.categories||{},animatable:!!N.animatable,type:O,attributes:A(H)};if(N.layoutAttributes){var q={};a(q,N.layoutAttributes),W.layoutAttributes=A(q)}return N.animatable||Q.crawl(W,function(X){Q.isValObject(X)&&"anim"in X&&delete X.anim}),W}function M(){var O={},N,V;a(O,P);for(N in $.subplotsRegistry)if(V=$.subplotsRegistry[N],!!V.layoutAttributes)if(Array.isArray(V.attr))for(var H=0;H{var $=bn(),c=$o(),g="templateitemname",P={name:{valType:"string",editType:"none"}};P[g]={valType:"string",editType:"calc"},Q.templatedArray=function(e,r){return r._isLinkedToArray=e,r.name=P.name,r[g]=P[g],r},Q.traceTemplater=function(e){var r={},a,n;for(a in e)n=e[a],Array.isArray(n)&&n.length&&(r[a]=0);function o(i){a=$.coerce(i,{},c,"type");var s={type:a,_template:null};if(a in r){n=e[a];var f=r[a]%n.length;r[a]++,s._template=n[f]}return s}return{newTrace:o}},Q.newContainer=function(e,r,a){var n=e._template,o=n&&(n[r]||a&&n[a]);$.isPlainObject(o)||(o=null);var i=e[r]={_template:o};return i},Q.arrayTemplater=function(e,r,a){var n=e._template,o=n&&n[t(r)],i=n&&n[r];(!Array.isArray(i)||!i.length)&&(i=[]);var s={};function f(y){var v={name:y.name,_input:y},T=v[g]=y[g];if(!S(T))return v._template=o,v;for(var u=0;u=n&&(a._input||{})._templateitemname;i&&(o=n);var s=r+"["+o+"]",f;function x(){f={},i&&(f[s]={},f[s][g]=i)}x();function y(b,_){f[b]=_}function v(b,_){i?$.nestedProperty(f[s],b).set(_):f[s+"."+b]=_}function T(){var b=f;return x(),b}function u(b,_){b&&v(b,_);var C=T();for(var M in C)$.nestedProperty(e,M).set(C[M])}return{modifyBase:y,modifyItem:v,getUpdateObj:T,applyUpdate:u}}}),ic=Ft((Q,$)=>{var c=vo().counter;$.exports={idRegex:{x:c("x","( domain)?"),y:c("y","( domain)?")},attrRegex:c("[xy]axis"),xAxisMatch:c("xaxis"),yAxisMatch:c("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}}),Rc=Ft(Q=>{var $=Xo(),c=ic();Q.id2name=function(P){if(!(typeof P!="string"||!P.match(c.AX_ID_PATTERN))){var S=P.split(" ")[0].substr(1);return S==="1"&&(S=""),P.charAt(0)+"axis"+S}},Q.name2id=function(P){if(P.match(c.AX_NAME_PATTERN)){var S=P.substr(5);return S==="1"&&(S=""),P.charAt(0)+S}},Q.cleanId=function(P,S,t){var e=/( domain)$/.test(P);if(!(typeof P!="string"||!P.match(c.AX_ID_PATTERN))&&!(S&&P.charAt(0)!==S)&&!(e&&!t)){var r=P.split(" ")[0].substr(1).replace(/^0+/,"");return r==="1"&&(r=""),P.charAt(0)+r+(e&&t?" domain":"")}},Q.list=function(P,S,t){var e=P._fullLayout;if(!e)return[];var r=Q.listIds(P,S),a=new Array(r.length),n;for(n=0;ne?1:-1:+(P.substr(1)||1)-+(S.substr(1)||1)},Q.ref2id=function(P){return/^[xyz]/.test(P)?P.split(" ")[0]:!1};function g(P,S){if(S&&S.length){for(var t=0;t{function c(P){var S=P._fullLayout._zoomlayer;S&&S.selectAll(".outline-controllers").remove()}function g(P){var S=P._fullLayout._zoomlayer;S&&S.selectAll(".select-outline").remove(),P._fullLayout._outlining=!1}$.exports={clearOutlineControllers:c,clearOutline:g}}),pg=Ft((Q,$)=>{$.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}}),ud=Ft(Q=>{var $=Xo();ic().SUBPLOT_PATTERN,Q.getSubplotCalcData=function(c,g,P){var S=$.subplotsRegistry[g];if(!S)return[];for(var t=S.attr,e=[],r=0;r{var $=Xo(),c=bn();Q.manageCommandObserver=function(r,a,n,o){var i={},s=!0;a&&a._commandObserver&&(i=a._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var f=Q.hasSimpleAPICommandBindings(r,n,i.lookupTable);if(a&&a._commandObserver){if(f)return i;if(a._commandObserver.remove)return a._commandObserver.remove(),a._commandObserver=null,i}if(f){g(r,f,i.cache),i.check=function(){if(s){var v=g(r,f,i.cache);return v.changed&&o&&i.lookupTable[v.value]!==void 0&&(i.disable(),Promise.resolve(o({value:v.value,type:f.type,prop:f.prop,traces:f.traces,index:i.lookupTable[v.value]})).then(i.enable,i.enable)),v.changed}};for(var x=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],y=0;y0?".":"")+i;c.isPlainObject(s)?e(s,a,f,o+1):a(f,i,s)}})}}),Kc=Ft((Q,$)=>{var c=un(),g=fa().timeFormatLocale,P=Li().formatLocale,S=ra(),t=Ni(),e=Xo(),r=Dm(),a=pu(),n=bn(),o=li(),i=Da().BADNUM,s=Rc(),f=C0().clearOutline,x=pg(),y=El(),v=pw(),T=ud().getModuleCalcData,u=n.relinkPrivateKeys,b=n._,_=$.exports={};n.extendFlat(_,e),_.attributes=$o(),_.attributes.type.values=_.allTypes,_.fontAttrs=Ea(),_.layoutAttributes=x1();var C=k1();_.executeAPICommand=C.executeAPICommand,_.computeAPICommandBindings=C.computeAPICommandBindings,_.manageCommandObserver=C.manageCommandObserver,_.hasSimpleAPICommandBindings=C.hasSimpleAPICommandBindings,_.redrawText=function(tt){return tt=n.getGraphDiv(tt),new Promise(function(dt){setTimeout(function(){tt._fullLayout&&(e.getComponentMethod("annotations","draw")(tt),e.getComponentMethod("legend","draw")(tt),e.getComponentMethod("colorbar","draw")(tt),dt(_.previousPromises(tt)))},300)})},_.resize=function(tt){tt=n.getGraphDiv(tt);var dt,rt=new Promise(function(at,vt){(!tt||n.isHidden(tt))&&vt(new Error("Resize must be passed a displayed plot div element.")),tt._redrawTimer&&clearTimeout(tt._redrawTimer),tt._resolveResize&&(dt=tt._resolveResize),tt._resolveResize=at,tt._redrawTimer=setTimeout(function(){if(!tt.layout||tt.layout.width&&tt.layout.height||n.isHidden(tt)){at(tt);return}delete tt.layout.width,delete tt.layout.height;var it=tt.changed;tt.autoplay=!0,e.call("relayout",tt,{autosize:!0}).then(function(){tt.changed=it,tt._resolveResize===at&&(delete tt._resolveResize,at(tt))})},100)});return dt&&dt(rt),rt},_.previousPromises=function(tt){if((tt._promises||[]).length)return Promise.all(tt._promises).then(function(){tt._promises=[]})},_.addLinks=function(tt){if(!(!tt._context.showLink&&!tt._context.showSources)){var dt=tt._fullLayout,rt=n.ensureSingle(dt._paper,"text","js-plot-link-container",function(ut){ut.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:o.defaultLine,"pointer-events":"all"}).each(function(){var wt=c.select(this);wt.append("tspan").classed("js-link-to-tool",!0),wt.append("tspan").classed("js-link-spacer",!0),wt.append("tspan").classed("js-sourcelinks",!0)})}),at=rt.node(),vt={y:dt._paper.attr("height")-9};document.body.contains(at)&&at.getComputedTextLength()>=dt.width-20?(vt["text-anchor"]="start",vt.x=5):(vt["text-anchor"]="end",vt.x=dt._paper.attr("width")-7),rt.attr(vt);var it=rt.select(".js-link-to-tool"),Y=rt.select(".js-link-spacer"),ft=rt.select(".js-sourcelinks");tt._context.showSources&&tt._context.showSources(tt),tt._context.showLink&&M(tt,it),Y.text(it.text()&&ft.text()?" - ":"")}};function M(tt,dt){dt.text("");var rt=dt.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(tt._context.linkText+" »");if(tt._context.sendData)rt.on("click",function(){_.sendDataToCloud(tt)});else{var at=window.location.pathname.split("/"),vt=window.location.search;rt.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+at[2].split(".")[0]+"/"+at[1]+vt})}}_.sendDataToCloud=function(tt){var dt=(window.PLOTLYENV||{}).BASE_URL||tt._context.plotlyServerURL;if(dt){tt.emit("plotly_beforeexport");var rt=c.select(tt).append("div").attr("id","hiddenform").style("display","none"),at=rt.append("form").attr({action:dt+"/external",method:"post",target:"_blank"}),vt=at.append("input").attr({type:"text",name:"data"});return vt.node().value=_.graphJson(tt,!1,"keepdata"),at.node().submit(),rt.remove(),tt.emit("plotly_afterexport"),!1}};var E=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],A=["year","month","dayMonth","dayMonthYear"];_.supplyDefaults=function(tt,dt){var rt=dt&&dt.skipUpdateCalc,at=tt._fullLayout||{};if(at._skipDefaults){delete at._skipDefaults;return}var vt=tt._fullLayout={},it=tt.layout||{},Y=tt._fullData||[],ft=tt._fullData=[],ut=tt.data||[],wt=tt.calcdata||[],zt=tt._context||{},Pt;tt._transitionData||_.createTransitionData(tt),vt._dfltTitle={plot:b(tt,"Click to enter Plot title"),subtitle:b(tt,"Click to enter Plot subtitle"),x:b(tt,"Click to enter X axis title"),y:b(tt,"Click to enter Y axis title"),colorbar:b(tt,"Click to enter Colorscale title"),annotation:b(tt,"new text")},vt._traceWord=b(tt,"trace");var Wt=k(tt,E);if(vt._mapboxAccessToken=zt.mapboxAccessToken,at._initialAutoSizeIsDone){var Ht=at.width,Jt=at.height;_.supplyLayoutGlobalDefaults(it,vt,Wt),it.width||(vt.width=Ht),it.height||(vt.height=Jt),_.sanitizeMargins(vt)}else{_.supplyLayoutGlobalDefaults(it,vt,Wt);var ge=!it.width||!it.height,he=vt.autosize,de=zt.autosizable,se=ge&&(he||de);se?_.plotAutoSize(tt,it,vt):ge&&_.sanitizeMargins(vt),!he&&ge&&(it.width=vt.width,it.height=vt.height)}vt._d3locale=w(Wt,vt.separators),vt._extraFormat=k(tt,A),vt._initialAutoSizeIsDone=!0,vt._dataLength=ut.length,vt._modules=[],vt._visibleModules=[],vt._basePlotModules=[];var Tt=vt._subplots=p(),Lt=vt._splomAxes={x:{},y:{}},Mt=vt._splomSubplots={};vt._splomGridDflt={},vt._scatterStackOpts={},vt._firstScatter={},vt._alignmentOpts={},vt._colorAxes={},vt._requestRangeslider={},vt._traceUids=h(Y,ut),_.supplyDataDefaults(ut,ft,it,vt);var te=Object.keys(Lt.x),ve=Object.keys(Lt.y);if(te.length>1&&ve.length>1){for(e.getComponentMethod("grid","sizeDefaults")(it,vt),Pt=0;Pt15&&ve.length>15&&vt.shapes.length===0&&vt.images.length===0,_.linkSubplots(ft,vt,Y,at),_.cleanPlot(ft,vt,Y,at);var cr=!!(at._has&&at._has("cartesian")),ur=!!(vt._has&&vt._has("cartesian")),jr=cr,Hr=ur;jr&&!Hr?at._bgLayer.remove():Hr&&!jr&&(vt._shouldCreateBgLayer=!0),at._zoomlayer&&!tt._dragging&&f({_fullLayout:at}),R(ft,vt),u(vt,at),e.getComponentMethod("colorscale","crossTraceDefaults")(ft,vt),vt._preGUI||(vt._preGUI={}),vt._tracePreGUI||(vt._tracePreGUI={});var br=vt._tracePreGUI,Kr={},rn;for(rn in br)Kr[rn]="old";for(Pt=0;Pt0){var wt=1-2*vt;it=Math.round(wt*it),Y=Math.round(wt*Y)}}var zt=_.layoutAttributes.width.min,Pt=_.layoutAttributes.height.min;it1,Ht=!dt.height&&Math.abs(rt.height-Y)>1;(Ht||Wt)&&(Wt&&(rt.width=it),Ht&&(rt.height=Y)),tt._initialAutoSize||(tt._initialAutoSize={width:it,height:Y}),_.sanitizeMargins(rt)},_.supplyLayoutModuleDefaults=function(tt,dt,rt,at){var vt=e.componentsRegistry,it=dt._basePlotModules,Y,ft,ut,wt=e.subplotsRegistry.cartesian;for(Y in vt)ut=vt[Y],ut.includeBasePlot&&ut.includeBasePlot(tt,dt);it.length||it.push(wt),dt._has("cartesian")&&(e.getComponentMethod("grid","contentDefaults")(tt,dt),wt.finalizeSubplots(tt,dt));for(var zt in dt._subplots)dt._subplots[zt].sort(n.subplotSort);for(ft=0;ft1&&(rt.l/=he,rt.r/=he)}if(Wt){var de=(rt.t+rt.b)/Wt;de>1&&(rt.t/=de,rt.b/=de)}var se=rt.xl!==void 0?rt.xl:rt.x,Tt=rt.xr!==void 0?rt.xr:rt.x,Lt=rt.yt!==void 0?rt.yt:rt.y,Mt=rt.yb!==void 0?rt.yb:rt.y;Ht[dt]={l:{val:se,size:rt.l+ge},r:{val:Tt,size:rt.r+ge},b:{val:Mt,size:rt.b+ge},t:{val:Lt,size:rt.t+ge}},Jt[dt]=1}if(!at._replotting)return _.doAutoMargin(tt)}};function U(tt){if("_redrawFromAutoMarginCount"in tt._fullLayout)return!1;var dt=s.list(tt,"",!0);for(var rt in dt)if(dt[rt].autoshift||dt[rt].shift)return!0;return!1}_.doAutoMargin=function(tt){var dt=tt._fullLayout,rt=dt.width,at=dt.height;dt._size||(dt._size={}),V(dt);var vt=dt._size,it=dt.margin,Y={t:0,b:0,l:0,r:0},ft=n.extendFlat({},vt),ut=it.l,wt=it.r,zt=it.t,Pt=it.b,Wt=dt._pushmargin,Ht=dt._pushmarginIds,Jt=dt.minreducedwidth,ge=dt.minreducedheight;if(it.autoexpand!==!1){for(var he in Wt)Ht[he]||delete Wt[he];var de=tt._fullLayout._reservedMargin;for(var se in de)for(var Tt in de[se]){var Lt=de[se][Tt];Y[Tt]=Math.max(Y[Tt],Lt)}Wt.base={l:{val:0,size:ut},r:{val:1,size:wt},t:{val:1,size:zt},b:{val:0,size:Pt}};for(var Mt in Y){var te=0;for(var ve in Wt)ve!=="base"&&S(Wt[ve][Mt].size)&&(te=Wt[ve][Mt].size>te?Wt[ve][Mt].size:te);var oe=Math.max(0,it[Mt]-te);Y[Mt]=Math.max(0,Y[Mt]-oe)}for(var Te in Wt){var He=Wt[Te].l||{},Ge=Wt[Te].b||{},cr=He.val,ur=He.size,jr=Ge.val,Hr=Ge.size,br=rt-Y.r-Y.l,Kr=at-Y.t-Y.b;for(var rn in Wt){if(S(ur)&&Wt[rn].r){var Ce=Wt[rn].r.val,$t=Wt[rn].r.size;if(Ce>cr){var ne=(ur*Ce+($t-br)*cr)/(Ce-cr),Ct=($t*(1-cr)+(ur-br)*(1-Ce))/(Ce-cr);ne+Ct>ut+wt&&(ut=ne,wt=Ct)}}if(S(Hr)&&Wt[rn].t){var gt=Wt[rn].t.val,St=Wt[rn].t.size;if(gt>jr){var Nt=(Hr*gt+(St-Kr)*jr)/(gt-jr),ee=(St*(1-jr)+(Hr-Kr)*(1-gt))/(gt-jr);Nt+ee>Pt+zt&&(Pt=Nt,zt=ee)}}}}}var le=n.constrain(rt-it.l-it.r,H,Jt),we=n.constrain(at-it.t-it.b,F,ge),Ue=Math.max(0,rt-le),qe=Math.max(0,at-we);if(Ue){var ar=(ut+wt)/Ue;ar>1&&(ut/=ar,wt/=ar)}if(qe){var Ar=(Pt+zt)/qe;Ar>1&&(Pt/=Ar,zt/=Ar)}if(vt.l=Math.round(ut)+Y.l,vt.r=Math.round(wt)+Y.r,vt.t=Math.round(zt)+Y.t,vt.b=Math.round(Pt)+Y.b,vt.p=Math.round(it.pad),vt.w=Math.round(rt)-vt.l-vt.r,vt.h=Math.round(at)-vt.t-vt.b,!dt._replotting&&(_.didMarginChange(ft,vt)||U(tt))){"_redrawFromAutoMarginCount"in dt?dt._redrawFromAutoMarginCount++:dt._redrawFromAutoMarginCount=1;var Tr=3*(1+Object.keys(Ht).length);if(dt._redrawFromAutoMarginCount1)return!0}return!1},_.graphJson=function(tt,dt,rt,at,vt,it){(vt&&dt&&!tt._fullData||vt&&!dt&&!tt._fullLayout)&&_.supplyDefaults(tt);var Y=vt?tt._fullData:tt.data,ft=vt?tt._fullLayout:tt.layout,ut=(tt._transitionData||{})._frames;function wt(Wt,Ht){if(typeof Wt=="function")return Ht?"_function_":null;if(n.isPlainObject(Wt)){var Jt={},ge;return Object.keys(Wt).sort().forEach(function(Tt){if(["_","["].indexOf(Tt.charAt(0))===-1){if(typeof Wt[Tt]=="function"){Ht&&(Jt[Tt]="_function");return}if(rt==="keepdata"){if(Tt.substr(Tt.length-3)==="src")return}else if(rt==="keepstream"){if(ge=Wt[Tt+"src"],typeof ge=="string"&&ge.indexOf(":")>0&&!n.isPlainObject(Wt.stream))return}else if(rt!=="keepall"&&(ge=Wt[Tt+"src"],typeof ge=="string"&&ge.indexOf(":")>0))return;Jt[Tt]=wt(Wt[Tt],Ht)}}),Jt}var he=Array.isArray(Wt),de=n.isTypedArray(Wt);if((he||de)&&Wt.dtype&&Wt.shape){var se=Wt.bdata;return wt({dtype:Wt.dtype,shape:Wt.shape,bdata:n.isArrayBuffer(se)?t.encode(se):se},Ht)}return he?Wt.map(function(Tt){return wt(Tt,Ht)}):de?n.simpleMap(Wt,n.identity):n.isJSDate(Wt)?n.ms2DateTimeLocal(+Wt):Wt}var zt={data:(Y||[]).map(function(Wt){var Ht=wt(Wt);return dt&&delete Ht.fit,Ht})};if(!dt&&(zt.layout=wt(ft),vt)){var Pt=ft._size;zt.layout.computed={margin:{b:Pt.b,l:Pt.l,r:Pt.r,t:Pt.t}}}return ut&&(zt.frames=wt(ut)),it&&(zt.config=wt(tt._context,!0)),at==="object"?zt:JSON.stringify(zt)},_.modifyFrames=function(tt,dt){var rt,at,vt,it=tt._transitionData._frames,Y=tt._transitionData._frameHash;for(rt=0;rt0&&(tt._transitioningWithDuration=!0),tt._transitionData._interruptCallbacks.push(function(){at=!0}),rt.redraw&&tt._transitionData._interruptCallbacks.push(function(){return e.call("redraw",tt)}),tt._transitionData._interruptCallbacks.push(function(){tt.emit("plotly_transitioninterrupted",[])});var Wt=0,Ht=0;function Jt(){return Wt++,function(){Ht++,!at&&Ht===Wt&&ft(Pt)}}rt.runFn(Jt),setTimeout(Jt())})}function ft(Pt){if(tt._transitionData)return it(tt._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(rt.redraw)return e.call("redraw",tt)}).then(function(){tt._transitioning=!1,tt._transitioningWithDuration=!1,tt.emit("plotly_transitioned",[])}).then(Pt)}function ut(){if(tt._transitionData)return tt._transitioning=!1,vt(tt._transitionData._interruptCallbacks)}var wt=[_.previousPromises,ut,rt.prepareFn,_.rehover,_.reselect,Y],zt=n.syncOrAsync(wt,tt);return(!zt||!zt.then)&&(zt=Promise.resolve()),zt.then(function(){return tt})}_.doCalcdata=function(tt,dt){var rt=s.list(tt),at=tt._fullData,vt=tt._fullLayout,it,Y,ft,ut,wt=new Array(at.length),zt=(tt.calcdata||[]).slice();for(tt.calcdata=wt,vt._numBoxes=0,vt._numViolins=0,vt._violinScaleGroupStats={},tt._hmpixcount=0,tt._hmlumcount=0,vt._piecolormap={},vt._sunburstcolormap={},vt._treemapcolormap={},vt._iciclecolormap={},vt._funnelareacolormap={},ft=0;ft=0;ut--)if(Mt[ut].enabled){it._indexToPoints=Mt[ut]._indexToPoints;break}Y&&Y.calc&&(Lt=Y.calc(tt,it))}(!Array.isArray(Lt)||!Lt[0])&&(Lt=[{x:i,y:i}]),Lt[0].t||(Lt[0].t={}),Lt[0].trace=it,wt[se]=Lt}}for(pt(rt,at,vt),ft=0;ft{Q.xmlns="http://www.w3.org/2000/xmlns/",Q.svg="http://www.w3.org/2000/svg",Q.xlink="http://www.w3.org/1999/xlink",Q.svgAttrs={xmlns:Q.svg,"xmlns:xlink":Q.xlink}}),Af=Ft((Q,$)=>{$.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}}),tc=Ft(Q=>{var $=un(),c=bn(),g=c.strTranslate,P=Op(),S=Af().LINE_SPACING,t=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;Q.convertToTspans=function(F,U,W){var q=F.text(),X=!F.attr("data-notex")&&U&&U._context.typesetMath&&typeof MathJax<"u"&&q.match(t),lt=$.select(F.node().parentNode);if(lt.empty())return;var yt=F.attr("class")?F.attr("class").split(" ")[0]:"text";yt+="-math",lt.selectAll("svg."+yt).remove(),lt.selectAll("g."+yt+"-group").remove(),F.style("display",null).attr({"data-unformatted":q,"data-math":"N"});function pt(){lt.empty()||(yt=F.attr("class")+"-math",lt.select("svg."+yt).remove()),F.text("").style("white-space","pre");var st=O(F.node(),q);st&&F.style("pointer-events","all"),Q.positionText(F),W&&W.call(F)}return X?(U&&U._promises||[]).push(new Promise(function(st){F.style("display","none");var tt=parseInt(F.node().style.fontSize,10),dt={fontSize:tt};o(X[2],dt,function(rt,at,vt){lt.selectAll("svg."+yt).remove(),lt.selectAll("g."+yt+"-group").remove();var it=rt&&rt.select("svg");if(!it||!it.node()){pt(),st();return}var Y=lt.append("g").classed(yt+"-group",!0).attr({"pointer-events":"none","data-unformatted":q,"data-math":"Y"});Y.node().appendChild(it.node()),at&&at.node()&&it.node().insertBefore(at.node().cloneNode(!0),it.node().firstChild);var ft=vt.width,ut=vt.height;it.attr({class:yt,height:ut,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var wt=F.node().style.fill||"black",zt=it.select("g");zt.attr({fill:wt,stroke:wt});var Pt=zt.node().getBoundingClientRect(),Wt=Pt.width,Ht=Pt.height;(Wt>ft||Ht>ut)&&(it.style("overflow","hidden"),Pt=it.node().getBoundingClientRect(),Wt=Pt.width,Ht=Pt.height);var Jt=+F.attr("x"),ge=+F.attr("y"),he=tt||F.node().getBoundingClientRect().height,de=-he/4;if(yt[0]==="y")Y.attr({transform:"rotate("+[-90,Jt,ge]+")"+g(-Wt/2,de-Ht/2)});else if(yt[0]==="l")ge=de-Ht/2;else if(yt[0]==="a"&&yt.indexOf("atitle")!==0)Jt=0,ge=de;else{var se=F.attr("text-anchor");Jt=Jt-Wt*(se==="middle"?.5:se==="end"?1:0),ge=ge+de-Ht/2}it.attr({x:Jt,y:ge}),W&&W.call(F,Y),st(Y)})})):pt(),F};var e=/(<|<|<)/g,r=/(>|>|>)/g;function a(F){return F.replace(e,"\\lt ").replace(r,"\\gt ")}var n=[["$","$"],["\\(","\\)"]];function o(F,U,W){var q=parseInt((MathJax.version||"").split(".")[0]);if(q!==2&&q!==3){c.warn("No MathJax version:",MathJax.version);return}var X,lt,yt,pt,st=function(){return lt=c.extendDeepAll({},MathJax.Hub.config),yt=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:n},displayAlign:"left"})},tt=function(){lt=c.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=n},dt=function(){if(X=MathJax.Hub.config.menuSettings.renderer,X!=="SVG")return MathJax.Hub.setRenderer("SVG")},rt=function(){X=MathJax.config.startup.output,X!=="svg"&&(MathJax.config.startup.output="svg")},at=function(){var wt="math-output-"+c.randstr({},64);pt=$.select("body").append("div").attr({id:wt}).style({visibility:"hidden",position:"absolute","font-size":U.fontSize+"px"}).text(a(F));var zt=pt.node();return q===2?MathJax.Hub.Typeset(zt):MathJax.typeset([zt])},vt=function(){var wt=pt.select(q===2?".MathJax_SVG":".MathJax"),zt=!wt.empty()&&pt.select("svg").node();if(!zt)c.log("There was an error in the tex syntax.",F),W();else{var Pt=zt.getBoundingClientRect(),Wt;q===2?Wt=$.select("body").select("#MathJax_SVG_glyphs"):Wt=wt.select("defs"),W(wt,Wt,Pt)}pt.remove()},it=function(){if(X!=="SVG")return MathJax.Hub.setRenderer(X)},Y=function(){X!=="svg"&&(MathJax.config.startup.output=X)},ft=function(){return yt!==void 0&&(MathJax.Hub.processSectionDelay=yt),MathJax.Hub.Config(lt)},ut=function(){MathJax.config=lt};q===2?MathJax.Hub.Queue(st,dt,at,vt,it,ft):q===3&&(tt(),rt(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){at(),vt(),Y(),ut()}))}var i={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},s={sub:"0.3em",sup:"-0.6em"},f={sub:"-0.21em",sup:"0.42em"},x="​",y=["http:","https:","mailto:","",void 0,":"],v=Q.NEWLINES=/(\r\n?|\n)/g,T=/(<[^<>]*>)/,u=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=//i;Q.BR_TAG_ALL=//gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,C=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,M=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,E=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function A(F,U){if(!F)return null;var W=F.match(U),q=W&&(W[3]||W[4]);return q&&w(q)}var h=/(^|;)\s*color:/;Q.plainText=function(F,U){U=U||{};for(var W=U.len!==void 0&&U.len!==-1?U.len:1/0,q=U.allowedTags!==void 0?U.allowedTags:["br"],X="...",lt=X.length,yt=F.split(T),pt=[],st="",tt=0,dt=0;dtlt?pt.push(rt.substr(0,Y-lt)+X):pt.push(rt.substr(0,Y));break}st=""}}return pt.join("")};var p={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},k=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function w(F){return F.replace(k,function(U,W){var q;return W.charAt(0)==="#"?q=R(W.charAt(1)==="x"?parseInt(W.substr(2),16):parseInt(W.substr(1),10)):q=p[W],q||U})}Q.convertEntities=w;function R(F){if(!(F>1114111)){var U=String.fromCodePoint;if(U)return U(F);var W=String.fromCharCode;return F<=65535?W(F):W((F>>10)+55232,F%1024+56320)}}function O(F,U){U=U.replace(v," ");var W=!1,q=[],X,lt=-1;function yt(){lt++;var Ht=document.createElementNS(P.svg,"tspan");$.select(Ht).attr({class:"line",dy:lt*S+"em"}),F.appendChild(Ht),X=Ht;var Jt=q;if(q=[{node:Ht}],Jt.length>1)for(var ge=1;ge.",U);return}var Jt=q.pop();Ht!==Jt.type&&c.log("Start tag <"+Jt.type+"> doesnt match end tag <"+Ht+">. Pretending it did match.",U),X=q[q.length-1].node}var dt=b.test(U);dt?yt():(X=F,q=[{node:F}]);for(var rt=U.split(T),at=0;at{var c=un(),g=fo(),P=ra(),S=bn(),t=li(),e=gi().isValid;function r(v,T,u){var b=T?S.nestedProperty(v,T).get()||{}:v,_=b[u||"color"];_&&_._inputArray&&(_=_._inputArray);var C=!1;if(S.isArrayOrTypedArray(_)){for(var M=0;M<_.length;M++)if(P(_[M])){C=!0;break}}return S.isPlainObject(b)&&(C||b.showscale===!0||P(b.cmin)&&P(b.cmax)||e(b.colorscale)||S.isPlainObject(b.colorbar))}var a=["showscale","autocolorscale","colorscale","reversescale","colorbar"],n=["min","max","mid","auto"];function o(v){var T=v._colorAx,u=T||v,b={},_,C,M;for(C=0;C=0;b--,_++){var C=v[b];u[_]=[1-C[0],C[1]]}return u}function f(v,T){T=T||{};for(var u=v.domain,b=v.range,_=b.length,C=new Array(_),M=0;M<_;M++){var E=g(b[M]).toRgb();C[M]=[E.r,E.g,E.b,E.a]}var A=c.scale.linear().domain(u).range(C).clamp(!0),h=T.noNumericCheck,p=T.returnArray,k;return h&&p?k=A:h?k=function(w){return y(A(w))}:p?k=function(w){return P(w)?A(w):g(w).isValid()?w:t.defaultLine}:k=function(w){return P(w)?y(A(w)):g(w).isValid()?w:t.defaultLine},k.domain=A.domain,k.range=function(){return b},k}function x(v,T){return f(i(v),T)}function y(v){var T={r:v[0],g:v[1],b:v[2],a:v[3]};return g(T).toRgbString()}$.exports={hasColorscale:r,extractOpts:o,extractScale:i,flipScale:s,makeColorScaleFunc:f,makeColorScaleFuncFromTrace:x}}),fh=Ft((Q,$)=>{var c=k_(),g=c.FORMAT_LINK,P=c.DATE_FORMAT_LINK;function S(r,a){return{valType:"string",dflt:"",editType:"none",description:(a?t:e)("hover text",r)+["By default the values are formatted using "+(a?"generic number format":"`"+r+"axis.hoverformat`")+"."].join(" ")}}function t(r,a){return["Sets the "+r+" formatting rule"+(a?"for `"+a+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+g+"."].join(" ")}function e(r,a){return t(r,a)+[" And for dates see: "+P+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}$.exports={axisHoverFormat:S,descriptionOnlyNumbers:t,descriptionWithDates:e}}),Ad=Ft((Q,$)=>{var c=Ea(),g=bi(),P=Td().dash,S=Ta().extendFlat,t=pu().templatedArray;$u().templateFormatStringDescription;var e=fh().descriptionWithDates,r=Da().ONEDAY,a=ic(),n=a.HOUR_PATTERN,o=a.WEEKDAY_PATTERN,i={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},s=S({},i,{values:i.values.slice().concat(["sync"])});function f(h){return{valType:"integer",min:0,dflt:h?5:0,editType:"ticks"}}var x={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},y={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},v={valType:"data_array",editType:"ticks"},T={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function u(h){var p={valType:"number",min:0,editType:"ticks"};return h||(p.dflt=5),p}function b(h){var p={valType:"number",min:0,editType:"ticks"};return h||(p.dflt=1),p}var _={valType:"color",dflt:g.defaultLine,editType:"ticks"},C={valType:"color",dflt:g.lightLine,editType:"ticks"};function M(h){var p={valType:"number",min:0,editType:"ticks"};return h||(p.dflt=1),p}var E=S({},P,{editType:"ticks"}),A={valType:"boolean",editType:"ticks"};$.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:g.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:c({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[a.idRegex.x.toString(),a.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"calc"},rangebreaks:t("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[o,n,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:r},editType:"calc"}),tickmode:s,nticks:f(),tick0:x,dtick:y,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:v,ticktext:{valType:"data_array",editType:"ticks"},ticks:T,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks"},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks"},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:u(),tickwidth:b(),tickcolor:_,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:S({},P,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:c({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:e("tick label")},tickformatstops:t("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:e("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:g.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:A,gridcolor:C,gridwidth:M(),griddash:E,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:g.defaultLine,editType:"ticks"},zerolinelayer:{valType:"enumerated",values:["above traces","below traces"],dflt:"below traces",editType:"plot"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:g.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"plot"},minor:{tickmode:i,nticks:f("minor"),tick0:x,dtick:y,tickvals:v,ticks:T,ticklen:u("minor"),tickwidth:b("minor"),tickcolor:_,gridcolor:C,gridwidth:M("minor"),griddash:E,showgrid:A,editType:"ticks"},minorloglabels:{valType:"enumerated",values:["small digits","complete","none"],dflt:"small digits",editType:"calc"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}),T1=Ft((Q,$)=>{var c=Ad(),g=Ea(),P=Ta().extendFlat,S=Yc().overrideAll;$.exports=S({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:c.linecolor,outlinewidth:c.linewidth,bordercolor:c.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:c.minor.tickmode,nticks:c.nticks,tick0:c.tick0,dtick:c.dtick,tickvals:c.tickvals,ticktext:c.ticktext,ticks:P({},c.ticks,{dflt:""}),ticklabeloverflow:P({},c.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:c.ticklen,tickwidth:c.tickwidth,tickcolor:c.tickcolor,ticklabelstep:c.ticklabelstep,showticklabels:c.showticklabels,labelalias:c.labelalias,tickfont:g({}),tickangle:c.tickangle,tickformat:c.tickformat,tickformatstops:c.tickformatstops,tickprefix:c.tickprefix,showtickprefix:c.showtickprefix,ticksuffix:c.ticksuffix,showticksuffix:c.showticksuffix,separatethousands:c.separatethousands,exponentformat:c.exponentformat,minexponent:c.minexponent,showexponent:c.showexponent,title:{text:{valType:"string"},font:g({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")}),Tc=Ft((Q,$)=>{var c=T1(),g=vo().counter,P=G0(),S=gi().scales;P(S);function t(e){return"`"+e+"`"}$.exports=function(e,r){e=e||"",r=r||{};var a=r.cLetter||"c";"onlyIfNumerical"in r&&r.onlyIfNumerical;var n="noScale"in r?r.noScale:e==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:a==="z",i=typeof r.colorscaleDflt=="string"?S[r.colorscaleDflt]:null,s=r.editTypeOverride||"",f=e?e+".":"",x;"colorAttr"in r?(x=r.colorAttr,r.colorAttr):(x={z:"z",c:"color"}[a],""+t(f+x));var y=a+"auto",v=a+"min",T=a+"max",u=a+"mid",b={};b[v]=b[T]=void 0;var _={};_[y]=!1;var C={};return x==="color"&&(C.color={valType:"color",arrayOk:!0,editType:s||"style"},r.anim&&(C.color.anim=!0)),C[y]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:b},C[v]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:_},C[T]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:_},C[u]={valType:"number",dflt:null,editType:"calc",impliedEdits:b},C.colorscale={valType:"colorscale",editType:"calc",dflt:i,impliedEdits:{autocolorscale:!1}},C.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},C.reversescale={valType:"boolean",dflt:!1,editType:"plot"},n||(C.showscale={valType:"boolean",dflt:o,editType:"calc"},C.colorbar=c),r.noColorAxis||(C.coloraxis={valType:"subplotid",regex:g("coloraxis"),dflt:null,editType:"calc"}),C}}),Pu=Ft((Q,$)=>{var c=Ta().extendFlat,g=Tc(),P=gi().scales;$.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:P.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:P.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:P.RdBu,editType:"calc"}},coloraxis:c({_isSubplotObj:!0,editType:"calc"},g("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}}),L0=Ft((Q,$)=>{var c=bn();$.exports=function(g){return c.isPlainObject(g.colorbar)}}),Bh=Ft(Q=>{var $=ra(),c=bn(),g=Da(),P=g.ONEDAY,S=g.ONEWEEK;Q.dtick=function(t,e){var r=e==="log",a=e==="date",n=e==="category",o=a?P:1;if(!t)return o;if($(t))return t=Number(t),t<=0?o:n?Math.max(1,Math.round(t)):a?Math.max(.1,t):t;if(typeof t!="string"||!(a||r))return o;var i=t.charAt(0),s=t.substr(1);return s=$(s)?Number(s):0,s<=0||!(a&&i==="M"&&s===Math.round(s)||r&&i==="L"||r&&i==="D"&&(s===1||s===2))?o:t},Q.tick0=function(t,e,r,a){if(e==="date")return c.cleanDate(t,c.dateTick0(r,a%S===0?1:0));if(!(a==="D1"||a==="D2"))return $(t)?Number(t):0}}),mg=Ft((Q,$)=>{var c=Bh(),g=bn().isArrayOrTypedArray,P=Va().isTypedArraySpec,S=Va().decodeTypedArraySpec;$.exports=function(t,e,r,a,n){n||(n={});var o=n.isMinor,i=o?t.minor||{}:t,s=o?e.minor:e,f=o?"minor.":"";function x(M){var E=i[M];return P(E)&&(E=S(E)),E!==void 0?E:(s._template||{})[M]}var y=x("tick0"),v=x("dtick"),T=x("tickvals"),u=g(T)?"array":v?"linear":"auto",b=r(f+"tickmode",u);if(b==="auto"||b==="sync")r(f+"nticks");else if(b==="linear"){var _=s.dtick=c.dtick(v,a);s.tick0=c.tick0(y,a,e.calendar,_)}else if(a!=="multicategory"){var C=r(f+"tickvals");C===void 0?s.tickmode="auto":o||r("ticktext")}}}),gg=Ft((Q,$)=>{var c=bn(),g=Ad();$.exports=function(P,S,t,e){var r=e.isMinor,a=r?P.minor||{}:P,n=r?S.minor:S,o=r?g.minor:g,i=r?"minor.":"",s=c.coerce2(a,n,o,"ticklen",r?(S.ticklen||5)*.6:void 0),f=c.coerce2(a,n,o,"tickwidth",r?S.tickwidth||1:void 0),x=c.coerce2(a,n,o,"tickcolor",(r?S.tickcolor:void 0)||n.color),y=t(i+"ticks",!r&&e.outerTicks||s||f||x?"outside":"");y||(delete n.ticklen,delete n.tickwidth,delete n.tickcolor)}}),Dy=Ft((Q,$)=>{$.exports=function(c){var g=["showexponent","showtickprefix","showticksuffix"],P=g.filter(function(t){return c[t]!==void 0}),S=function(t){return c[t]===c[P[0]]};if(P.every(S)||P.length===1)return c[P[0]]}}),Md=Ft((Q,$)=>{var c=bn(),g=pu();$.exports=function(P,S,t){var e=t.name,r=t.inclusionAttr||"visible",a=S[e],n=c.isArrayOrTypedArray(P[e])?P[e]:[],o=S[e]=[],i=g.arrayTemplater(S,e,r),s,f;for(s=0;s{var c=bn(),g=li().contrast,P=Ad(),S=Dy(),t=Md();$.exports=function(r,a,n,o,i){i||(i={});var s=n("labelalias");c.isPlainObject(s)||delete a.labelalias;var f=S(r),x=n("showticklabels");if(x){i.noTicklabelshift||n("ticklabelshift"),i.noTicklabelstandoff||n("ticklabelstandoff");var y=i.font||{},v=a.color,T=a.ticklabelposition||"",u=T.indexOf("inside")!==-1?g(i.bgColor):v&&v!==P.color.dflt?v:y.color;if(c.coerceFont(n,"tickfont",y,{overrideDflt:{color:u}}),!i.noTicklabelstep&&o!=="multicategory"&&o!=="log"&&n("ticklabelstep"),!i.noAng){var b=n("tickangle");!i.noAutotickangles&&b==="auto"&&n("autotickangles")}if(o!=="category"){var _=n("tickformat");t(r,a,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:e}),a.tickformatstops.length||delete a.tickformatstops,!i.noExp&&!_&&o!=="date"&&(n("showexponent",f),n("exponentformat"),n("minexponent"),n("separatethousands"))}!i.noMinorloglabels&&o==="log"&&n("minorloglabels")}};function e(r,a){function n(i,s){return c.coerce(r,a,P.tickformatstops,i,s)}var o=n("enabled");o&&(n("dtickrange"),n("value"))}}),dm=Ft((Q,$)=>{var c=Dy();$.exports=function(g,P,S,t,e){e||(e={});var r=e.tickSuffixDflt,a=c(g),n=S("tickprefix");n&&S("showtickprefix",a);var o=S("ticksuffix",r);o&&S("showticksuffix",a)}}),fv=Ft((Q,$)=>{var c=bn(),g=pu(),P=mg(),S=gg(),t=n0(),e=dm(),r=T1();$.exports=function(a,n,o){var i=g.newContainer(n,"colorbar"),s=a.colorbar||{};function f(F,U){return c.coerce(s,i,r,F,U)}var x=o.margin||{t:0,b:0,l:0,r:0},y=o.width-x.l-x.r,v=o.height-x.t-x.b,T=f("orientation"),u=T==="v",b=f("thicknessmode");f("thickness",b==="fraction"?30/(u?y:v):30);var _=f("lenmode");f("len",_==="fraction"?1:u?v:y);var C=f("yref"),M=f("xref"),E=C==="paper",A=M==="paper",h,p,k,w="left";u?(k="middle",w=A?"left":"right",h=A?1.02:1,p=.5):(k=E?"bottom":"top",w="center",h=.5,p=E?1.02:1),c.coerce(s,i,{x:{valType:"number",min:A?-2:0,max:A?3:1,dflt:h}},"x"),c.coerce(s,i,{y:{valType:"number",min:E?-2:0,max:E?3:1,dflt:p}},"y"),f("xanchor",w),f("xpad"),f("yanchor",k),f("ypad"),c.noneOrAll(s,i,["x","y"]),f("outlinecolor"),f("outlinewidth"),f("bordercolor"),f("borderwidth"),f("bgcolor");var R=c.coerce(s,i,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:u?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");f("ticklabeloverflow",R.indexOf("inside")!==-1?"hide past domain":"hide past div"),P(s,i,f,"linear");var O=o.font,N={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:O};R.indexOf("inside")!==-1&&(N.bgColor="black"),e(s,i,f,"linear",N),t(s,i,f,"linear",N),S(s,i,f,"linear",N),f("title.text",o._dfltTitle.colorbar);var V=i.showticklabels?i.tickfont:O,H=c.extendFlat({},O,{family:V.family,size:c.bigFont(V.size)});c.coerceFont(f,"title.font",H),f("title.side",u?"top":"right")}}),mc=Ft((Q,$)=>{var c=ra(),g=bn(),P=L0(),S=fv(),t=gi().isValid,e=Xo().traceIs;function r(a,n){var o=n.slice(0,n.length-1);return n?g.nestedProperty(a,o).get()||{}:a}$.exports=function a(n,o,i,s,f){var x=f.prefix,y=f.cLetter,v="_module"in o,T=r(n,x),u=r(o,x),b=r(o._template||{},x)||{},_=function(){return delete n.coloraxis,delete o.coloraxis,a(n,o,i,s,f)};if(v){var C=i._colorAxes||{},M=s(x+"coloraxis");if(M){var E=e(o,"contour")&&g.nestedProperty(o,"contours.coloring").get()||"heatmap",A=C[M];A?(A[2].push(_),A[0]!==E&&(A[0]=!1,g.warn(["Ignoring coloraxis:",M,"setting","as it is linked to incompatible colorscales."].join(" ")))):C[M]=[E,o,[_]];return}}var h=T[y+"min"],p=T[y+"max"],k=c(h)&&c(p)&&h{var c=bn(),g=pu(),P=Pu(),S=mc();$.exports=function(t,e){function r(y,v){return c.coerce(t,e,P,y,v)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var a=e._colorAxes,n,o;function i(y,v){return c.coerce(n,o,P.coloraxis,y,v)}for(var s in a){var f=a[s];if(f[0])n=t[s]||{},o=g.newContainer(e,s,"coloraxis"),o._name=s,S(n,o,e,i,{prefix:"",cLetter:"c"});else{for(var x=0;x{var c=bn(),g=Hd().hasColorscale,P=Hd().extractOpts;$.exports=function(S,t){function e(f,x){var y=f["_"+x];y!==void 0&&(f[x]=y)}function r(f,x){var y=x.container?c.nestedProperty(f,x.container).get():f;if(y)if(y.coloraxis)y._colorAx=t[y.coloraxis];else{var v=P(y),T=v.auto;(T||v.min===void 0)&&e(y,x.min),(T||v.max===void 0)&&e(y,x.max),v.autocolorscale&&e(y,"colorscale")}}for(var a=0;a{var c=ra(),g=bn(),P=Hd().extractOpts;$.exports=function(S,t,e){var r=S._fullLayout,a=e.vals,n=e.containerStr,o=n?g.nestedProperty(t,n).get():t,i=P(o),s=i.auto!==!1,f=i.min,x=i.max,y=i.mid,v=function(){return g.aggNums(Math.min,null,a)},T=function(){return g.aggNums(Math.max,null,a)};if(f===void 0?f=v():s&&(o._colorAx&&c(f)?f=Math.min(f,v()):f=v()),x===void 0?x=T():s&&(o._colorAx&&c(x)?x=Math.max(x,T()):x=T()),s&&y!==void 0&&(x-y>y-f?f=y-(x-y):x-y=0?u=r.colorscale.sequential:u=r.colorscale.sequentialminus,i._sync("colorscale",u)}}}),Xc=Ft((Q,$)=>{var c=gi(),g=Hd();$.exports={moduleType:"component",name:"colorscale",attributes:Tc(),layoutAttributes:Pu(),supplyLayoutDefaults:vg(),handleDefaults:mc(),crossTraceDefaults:mw(),calc:Jd(),scales:c.scales,defaultScale:c.defaultScale,getScale:c.get,isValidScale:c.isValid,hasColorscale:g.hasColorscale,extractOpts:g.extractOpts,extractScale:g.extractScale,flipScale:g.flipScale,makeColorScaleFunc:g.makeColorScaleFunc,makeColorScaleFuncFromTrace:g.makeColorScaleFuncFromTrace}}),Ac=Ft((Q,$)=>{var c=bn(),g=Va().isTypedArraySpec;$.exports={hasLines:function(P){return P.visible&&P.mode&&P.mode.indexOf("lines")!==-1},hasMarkers:function(P){return P.visible&&(P.mode&&P.mode.indexOf("markers")!==-1||P.type==="splom")},hasText:function(P){return P.visible&&P.mode&&P.mode.indexOf("text")!==-1},isBubble:function(P){var S=P.marker;return c.isPlainObject(S)&&(c.isArrayOrTypedArray(S.size)||g(S.size))}}}),yg=Ft((Q,$)=>{var c=ra();$.exports=function(g,P){P||(P=2);var S=g.marker,t=S.sizeref||1,e=S.sizemin||0,r=S.sizemode==="area"?function(a){return Math.sqrt(a/t)}:function(a){return a/t};return function(a){var n=r(a/P);return c(n)&&n>0?Math.max(n,e):0}}}),Dp=Ft(Q=>{var $=bn();Q.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},Q.isTraceInSubplots=function(e,r){if(e.type==="splom"){for(var a=e.xaxes||[],n=e.yaxes||[],o=0;o=0&&a.index{$.exports=P;var c={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},g=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function P(e){var r=[];return e.replace(g,function(a,n,o){var i=n.toLowerCase();for(o=t(o),i=="m"&&o.length>2&&(r.push([n].concat(o.splice(0,2))),i="l",n=n=="m"?"l":"L");;){if(o.length==c[i])return o.unshift(n),r.push(o);if(o.length{var c=A1(),g=function(y,v){return v?Math.round(y*(v=Math.pow(10,v)))/v:Math.round(y)},P="M0,0Z",S=Math.sqrt(2),t=Math.sqrt(3),e=Math.PI,r=Math.cos,a=Math.sin;$.exports={circle:{n:0,f:function(y,v,T){if(n(v))return P;var u=g(y,2),b="M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z";return T?x(v,T,b):b}},square:{n:1,f:function(y,v,T){if(n(v))return P;var u=g(y,2);return x(v,T,"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")}},diamond:{n:2,f:function(y,v,T){if(n(v))return P;var u=g(y*1.3,2);return x(v,T,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"Z")}},cross:{n:3,f:function(y,v,T){if(n(v))return P;var u=g(y*.4,2),b=g(y*1.2,2);return x(v,T,"M"+b+","+u+"H"+u+"V"+b+"H-"+u+"V"+u+"H-"+b+"V-"+u+"H-"+u+"V-"+b+"H"+u+"V-"+u+"H"+b+"Z")}},x:{n:4,f:function(y,v,T){if(n(v))return P;var u=g(y*.8/S,2),b="l"+u+","+u,_="l"+u+",-"+u,C="l-"+u+",-"+u,M="l-"+u+","+u;return x(v,T,"M0,"+u+b+_+C+_+C+M+C+M+b+M+b+"Z")}},"triangle-up":{n:5,f:function(y,v,T){if(n(v))return P;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M-"+u+","+b+"H"+u+"L0,-"+_+"Z")}},"triangle-down":{n:6,f:function(y,v,T){if(n(v))return P;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M-"+u+",-"+b+"H"+u+"L0,"+_+"Z")}},"triangle-left":{n:7,f:function(y,v,T){if(n(v))return P;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M"+b+",-"+u+"V"+u+"L-"+_+",0Z")}},"triangle-right":{n:8,f:function(y,v,T){if(n(v))return P;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M-"+b+",-"+u+"V"+u+"L"+_+",0Z")}},"triangle-ne":{n:9,f:function(y,v,T){if(n(v))return P;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M-"+b+",-"+u+"H"+u+"V"+b+"Z")}},"triangle-se":{n:10,f:function(y,v,T){if(n(v))return P;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M"+u+",-"+b+"V"+u+"H-"+b+"Z")}},"triangle-sw":{n:11,f:function(y,v,T){if(n(v))return P;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M"+b+","+u+"H-"+u+"V-"+b+"Z")}},"triangle-nw":{n:12,f:function(y,v,T){if(n(v))return P;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M-"+u+","+b+"V-"+u+"H"+b+"Z")}},pentagon:{n:13,f:function(y,v,T){if(n(v))return P;var u=g(y*.951,2),b=g(y*.588,2),_=g(-y,2),C=g(y*-.309,2),M=g(y*.809,2);return x(v,T,"M"+u+","+C+"L"+b+","+M+"H-"+b+"L-"+u+","+C+"L0,"+_+"Z")}},hexagon:{n:14,f:function(y,v,T){if(n(v))return P;var u=g(y,2),b=g(y/2,2),_=g(y*t/2,2);return x(v,T,"M"+_+",-"+b+"V"+b+"L0,"+u+"L-"+_+","+b+"V-"+b+"L0,-"+u+"Z")}},hexagon2:{n:15,f:function(y,v,T){if(n(v))return P;var u=g(y,2),b=g(y/2,2),_=g(y*t/2,2);return x(v,T,"M-"+b+","+_+"H"+b+"L"+u+",0L"+b+",-"+_+"H-"+b+"L-"+u+",0Z")}},octagon:{n:16,f:function(y,v,T){if(n(v))return P;var u=g(y*.924,2),b=g(y*.383,2);return x(v,T,"M-"+b+",-"+u+"H"+b+"L"+u+",-"+b+"V"+b+"L"+b+","+u+"H-"+b+"L-"+u+","+b+"V-"+b+"Z")}},star:{n:17,f:function(y,v,T){if(n(v))return P;var u=y*1.4,b=g(u*.225,2),_=g(u*.951,2),C=g(u*.363,2),M=g(u*.588,2),E=g(-u,2),A=g(u*-.309,2),h=g(u*.118,2),p=g(u*.809,2),k=g(u*.382,2);return x(v,T,"M"+b+","+A+"H"+_+"L"+C+","+h+"L"+M+","+p+"L0,"+k+"L-"+M+","+p+"L-"+C+","+h+"L-"+_+","+A+"H-"+b+"L0,"+E+"Z")}},hexagram:{n:18,f:function(y,v,T){if(n(v))return P;var u=g(y*.66,2),b=g(y*.38,2),_=g(y*.76,2);return x(v,T,"M-"+_+",0l-"+b+",-"+u+"h"+_+"l"+b+",-"+u+"l"+b+","+u+"h"+_+"l-"+b+","+u+"l"+b+","+u+"h-"+_+"l-"+b+","+u+"l-"+b+",-"+u+"h-"+_+"Z")}},"star-triangle-up":{n:19,f:function(y,v,T){if(n(v))return P;var u=g(y*t*.8,2),b=g(y*.8,2),_=g(y*1.6,2),C=g(y*4,2),M="A "+C+","+C+" 0 0 1 ";return x(v,T,"M-"+u+","+b+M+u+","+b+M+"0,-"+_+M+"-"+u+","+b+"Z")}},"star-triangle-down":{n:20,f:function(y,v,T){if(n(v))return P;var u=g(y*t*.8,2),b=g(y*.8,2),_=g(y*1.6,2),C=g(y*4,2),M="A "+C+","+C+" 0 0 1 ";return x(v,T,"M"+u+",-"+b+M+"-"+u+",-"+b+M+"0,"+_+M+u+",-"+b+"Z")}},"star-square":{n:21,f:function(y,v,T){if(n(v))return P;var u=g(y*1.1,2),b=g(y*2,2),_="A "+b+","+b+" 0 0 1 ";return x(v,T,"M-"+u+",-"+u+_+"-"+u+","+u+_+u+","+u+_+u+",-"+u+_+"-"+u+",-"+u+"Z")}},"star-diamond":{n:22,f:function(y,v,T){if(n(v))return P;var u=g(y*1.4,2),b=g(y*1.9,2),_="A "+b+","+b+" 0 0 1 ";return x(v,T,"M-"+u+",0"+_+"0,"+u+_+u+",0"+_+"0,-"+u+_+"-"+u+",0Z")}},"diamond-tall":{n:23,f:function(y,v,T){if(n(v))return P;var u=g(y*.7,2),b=g(y*1.4,2);return x(v,T,"M0,"+b+"L"+u+",0L0,-"+b+"L-"+u+",0Z")}},"diamond-wide":{n:24,f:function(y,v,T){if(n(v))return P;var u=g(y*1.4,2),b=g(y*.7,2);return x(v,T,"M0,"+b+"L"+u+",0L0,-"+b+"L-"+u+",0Z")}},hourglass:{n:25,f:function(y,v,T){if(n(v))return P;var u=g(y,2);return x(v,T,"M"+u+","+u+"H-"+u+"L"+u+",-"+u+"H-"+u+"Z")},noDot:!0},bowtie:{n:26,f:function(y,v,T){if(n(v))return P;var u=g(y,2);return x(v,T,"M"+u+","+u+"V-"+u+"L-"+u+","+u+"V-"+u+"Z")},noDot:!0},"circle-cross":{n:27,f:function(y,v,T){if(n(v))return P;var u=g(y,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(y,v,T){if(n(v))return P;var u=g(y,2),b=g(y/S,2);return x(v,T,"M"+b+","+b+"L-"+b+",-"+b+"M"+b+",-"+b+"L-"+b+","+b+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(y,v,T){if(n(v))return P;var u=g(y,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(y,v,T){if(n(v))return P;var u=g(y,2);return x(v,T,"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(y,v,T){if(n(v))return P;var u=g(y*1.3,2);return x(v,T,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM0,-"+u+"V"+u+"M-"+u+",0H"+u)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(y,v,T){if(n(v))return P;var u=g(y*1.3,2),b=g(y*.65,2);return x(v,T,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM-"+b+",-"+b+"L"+b+","+b+"M-"+b+","+b+"L"+b+",-"+b)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(y,v,T){if(n(v))return P;var u=g(y*1.4,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(y,v,T){if(n(v))return P;var u=g(y,2);return x(v,T,"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(y,v,T){if(n(v))return P;var u=g(y*1.2,2),b=g(y*.85,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+b+","+b+"L-"+b+",-"+b+"M"+b+",-"+b+"L-"+b+","+b)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(y,v,T){if(n(v))return P;var u=g(y/2,2),b=g(y,2);return x(v,T,"M"+u+","+b+"V-"+b+"M"+(u-b)+",-"+b+"V"+b+"M"+b+","+u+"H-"+b+"M-"+b+","+(u-b)+"H"+b)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(y,v,T){if(n(v))return P;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M-"+u+","+_+"L0,0M"+u+","+_+"L0,0M0,-"+b+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(y,v,T){if(n(v))return P;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M-"+u+",-"+_+"L0,0M"+u+",-"+_+"L0,0M0,"+b+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(y,v,T){if(n(v))return P;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M"+_+","+u+"L0,0M"+_+",-"+u+"L0,0M-"+b+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(y,v,T){if(n(v))return P;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M-"+_+","+u+"L0,0M-"+_+",-"+u+"L0,0M"+b+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(y,v,T){if(n(v))return P;var u=g(y*1.4,2);return x(v,T,"M"+u+",0H-"+u)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(y,v,T){if(n(v))return P;var u=g(y*1.4,2);return x(v,T,"M0,"+u+"V-"+u)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(y,v,T){if(n(v))return P;var u=g(y,2);return x(v,T,"M"+u+",-"+u+"L-"+u+","+u)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(y,v,T){if(n(v))return P;var u=g(y,2);return x(v,T,"M"+u+","+u+"L-"+u+",-"+u)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(y,v,T){if(n(v))return P;var u=g(y,2),b=g(y*2,2);return x(v,T,"M0,0L-"+u+","+b+"H"+u+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(y,v,T){if(n(v))return P;var u=g(y,2),b=g(y*2,2);return x(v,T,"M0,0L-"+u+",-"+b+"H"+u+"Z")},noDot:!0},"arrow-left":{n:47,f:function(y,v,T){if(n(v))return P;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,0L"+u+",-"+b+"V"+b+"Z")},noDot:!0},"arrow-right":{n:48,f:function(y,v,T){if(n(v))return P;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,0L-"+u+",-"+b+"V"+b+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(y,v,T){if(n(v))return P;var u=g(y,2),b=g(y*2,2);return x(v,T,"M-"+u+",0H"+u+"M0,0L-"+u+","+b+"H"+u+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(y,v,T){if(n(v))return P;var u=g(y,2),b=g(y*2,2);return x(v,T,"M-"+u+",0H"+u+"M0,0L-"+u+",-"+b+"H"+u+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(y,v,T){if(n(v))return P;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,-"+b+"V"+b+"M0,0L"+u+",-"+b+"V"+b+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(y,v,T){if(n(v))return P;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,-"+b+"V"+b+"M0,0L-"+u+",-"+b+"V"+b+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(y,v,T){if(n(v))return P;var u=e/2.5,b=2*y*r(u),_=2*y*a(u);return x(v,T,"M0,0L"+-b+","+_+"L"+b+","+_+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(y,v,T){if(n(v))return P;var u=e/4,b=2*y*r(u),_=2*y*a(u);return x(v,T,"M0,0L"+-b+","+_+"A "+2*y+","+2*y+" 0 0 1 "+b+","+_+"Z")},backoff:.4,noDot:!0}};function n(y){return y===null}var o,i,s,f;function x(y,v,T){if((!y||y%360===0)&&!v)return T;if(s===y&&f===v&&o===T)return i;s=y,f=v,o=T;function u(N,V){var H=r(N),F=a(N),U=V[0],W=V[1]+(v||0);return[U*H-W*F,U*F+W*H]}for(var b=y/180*e,_=0,C=0,M=c(T),E="",A=0;A{var c=un(),g=bn(),P=g.numberFormat,S=ra(),t=fo(),e=Xo(),r=li(),a=Xc(),n=g.strTranslate,o=tc(),i=Op(),s=Af(),f=s.LINE_SPACING,x=co().DESELECTDIM,y=Ac(),v=yg(),T=Dp().appendArrayPointValue,u=$.exports={};u.font=function(Tt,Lt){var Mt=Lt.variant,te=Lt.style,ve=Lt.weight,oe=Lt.color,Te=Lt.size,He=Lt.family,Ge=Lt.shadow,cr=Lt.lineposition,ur=Lt.textcase;He&&Tt.style("font-family",He),Te+1&&Tt.style("font-size",Te+"px"),oe&&Tt.call(r.fill,oe),ve&&Tt.style("font-weight",ve),te&&Tt.style("font-style",te),Mt&&Tt.style("font-variant",Mt),ur&&Tt.style("text-transform",b(C(ur))),Ge&&Tt.style("text-shadow",Ge==="auto"?o.makeTextShadow(r.contrast(oe)):b(Ge)),cr&&Tt.style("text-decoration-line",b(M(cr)))};function b(Tt){return Tt==="none"?void 0:Tt}var _={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function C(Tt){return _[Tt]}function M(Tt){return Tt.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}u.setPosition=function(Tt,Lt,Mt){Tt.attr("x",Lt).attr("y",Mt)},u.setSize=function(Tt,Lt,Mt){Tt.attr("width",Lt).attr("height",Mt)},u.setRect=function(Tt,Lt,Mt,te,ve){Tt.call(u.setPosition,Lt,Mt).call(u.setSize,te,ve)},u.translatePoint=function(Tt,Lt,Mt,te){var ve=Mt.c2p(Tt.x),oe=te.c2p(Tt.y);if(S(ve)&&S(oe)&&Lt.node())Lt.node().nodeName==="text"?Lt.attr("x",ve).attr("y",oe):Lt.attr("transform",n(ve,oe));else return!1;return!0},u.translatePoints=function(Tt,Lt,Mt){Tt.each(function(te){var ve=c.select(this);u.translatePoint(te,ve,Lt,Mt)})},u.hideOutsideRangePoint=function(Tt,Lt,Mt,te,ve,oe){Lt.attr("display",Mt.isPtWithinRange(Tt,ve)&&te.isPtWithinRange(Tt,oe)?null:"none")},u.hideOutsideRangePoints=function(Tt,Lt){if(Lt._hasClipOnAxisFalse){var Mt=Lt.xaxis,te=Lt.yaxis;Tt.each(function(ve){var oe=ve[0].trace,Te=oe.xcalendar,He=oe.ycalendar,Ge=e.traceIs(oe,"bar-like")?".bartext":".point,.textpoint";Tt.selectAll(Ge).each(function(cr){u.hideOutsideRangePoint(cr,c.select(this),Mt,te,Te,He)})})}},u.crispRound=function(Tt,Lt,Mt){return!Lt||!S(Lt)?Mt||0:Tt._context.staticPlot?Lt:Lt<1?1:Math.round(Lt)},u.singleLineStyle=function(Tt,Lt,Mt,te,ve){Lt.style("fill","none");var oe=(((Tt||[])[0]||{}).trace||{}).line||{},Te=Mt||oe.width||0,He=ve||oe.dash||"";r.stroke(Lt,te||oe.color),u.dashLine(Lt,He,Te)},u.lineGroupStyle=function(Tt,Lt,Mt,te){Tt.style("fill","none").each(function(ve){var oe=(((ve||[])[0]||{}).trace||{}).line||{},Te=Lt||oe.width||0,He=te||oe.dash||"";c.select(this).call(r.stroke,Mt||oe.color).call(u.dashLine,He,Te)})},u.dashLine=function(Tt,Lt,Mt){Mt=+Mt||0,Lt=u.dashStyle(Lt,Mt),Tt.style({"stroke-dasharray":Lt,"stroke-width":Mt+"px"})},u.dashStyle=function(Tt,Lt){Lt=+Lt||1;var Mt=Math.max(Lt,3);return Tt==="solid"?Tt="":Tt==="dot"?Tt=Mt+"px,"+Mt+"px":Tt==="dash"?Tt=3*Mt+"px,"+3*Mt+"px":Tt==="longdash"?Tt=5*Mt+"px,"+5*Mt+"px":Tt==="dashdot"?Tt=3*Mt+"px,"+Mt+"px,"+Mt+"px,"+Mt+"px":Tt==="longdashdot"&&(Tt=5*Mt+"px,"+2*Mt+"px,"+Mt+"px,"+2*Mt+"px"),Tt};function E(Tt,Lt,Mt,te){var ve=Lt.fillpattern,oe=Lt.fillgradient,Te=u.getPatternAttr,He=ve&&(Te(ve.shape,0,"")||Te(ve.path,0,""));if(He){var Ge=Te(ve.bgcolor,0,null),cr=Te(ve.fgcolor,0,null),ur=ve.fgopacity,jr=Te(ve.size,0,8),Hr=Te(ve.solidity,0,.3),br=Lt.uid;u.pattern(Tt,"point",Mt,br,He,jr,Hr,void 0,ve.fillmode,Ge,cr,ur)}else if(oe&&oe.type!=="none"){var Kr=oe.type,rn="scatterfill-"+Lt.uid;if(te&&(rn="legendfill-"+Lt.uid),!te&&(oe.start!==void 0||oe.stop!==void 0)){var Ce,$t;Kr==="horizontal"?(Ce={x:oe.start,y:0},$t={x:oe.stop,y:0}):Kr==="vertical"&&(Ce={x:0,y:oe.start},$t={x:0,y:oe.stop}),Ce.x=Lt._xA.c2p(Ce.x===void 0?Lt._extremes.x.min[0].val:Ce.x,!0),Ce.y=Lt._yA.c2p(Ce.y===void 0?Lt._extremes.y.min[0].val:Ce.y,!0),$t.x=Lt._xA.c2p($t.x===void 0?Lt._extremes.x.max[0].val:$t.x,!0),$t.y=Lt._yA.c2p($t.y===void 0?Lt._extremes.y.max[0].val:$t.y,!0),Tt.call(O,Mt,rn,"linear",oe.colorscale,"fill",Ce,$t,!0,!1)}else Kr==="horizontal"&&(Kr=Kr+"reversed"),Tt.call(u.gradient,Mt,rn,Kr,oe.colorscale,"fill")}else Lt.fillcolor&&Tt.call(r.fill,Lt.fillcolor)}u.singleFillStyle=function(Tt,Lt){var Mt=c.select(Tt.node()),te=Mt.data(),ve=((te[0]||[])[0]||{}).trace||{};E(Tt,ve,Lt,!1)},u.fillGroupStyle=function(Tt,Lt,Mt){Tt.style("stroke-width",0).each(function(te){var ve=c.select(this);te[0].trace&&E(ve,te[0].trace,Lt,Mt)})};var A=Mc();u.symbolNames=[],u.symbolFuncs=[],u.symbolBackOffs=[],u.symbolNeedLines={},u.symbolNoDot={},u.symbolNoFill={},u.symbolList=[],Object.keys(A).forEach(function(Tt){var Lt=A[Tt],Mt=Lt.n;u.symbolList.push(Mt,String(Mt),Tt,Mt+100,String(Mt+100),Tt+"-open"),u.symbolNames[Mt]=Tt,u.symbolFuncs[Mt]=Lt.f,u.symbolBackOffs[Mt]=Lt.backoff||0,Lt.needLine&&(u.symbolNeedLines[Mt]=!0),Lt.noDot?u.symbolNoDot[Mt]=!0:u.symbolList.push(Mt+200,String(Mt+200),Tt+"-dot",Mt+300,String(Mt+300),Tt+"-open-dot"),Lt.noFill&&(u.symbolNoFill[Mt]=!0)});var h=u.symbolNames.length,p="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";u.symbolNumber=function(Tt){if(S(Tt))Tt=+Tt;else if(typeof Tt=="string"){var Lt=0;Tt.indexOf("-open")>0&&(Lt=100,Tt=Tt.replace("-open","")),Tt.indexOf("-dot")>0&&(Lt+=200,Tt=Tt.replace("-dot","")),Tt=u.symbolNames.indexOf(Tt),Tt>=0&&(Tt+=Lt)}return Tt%100>=h||Tt>=400?0:Math.floor(Math.max(Tt,0))};function k(Tt,Lt,Mt,te){var ve=Tt%100;return u.symbolFuncs[ve](Lt,Mt,te)+(Tt>=200?p:"")}var w=P("~f"),R={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};u.gradient=function(Tt,Lt,Mt,te,ve,oe){var Te=R[te];return O(Tt,Lt,Mt,Te.type,ve,oe,Te.start,Te.stop,!1,Te.reversed)};function O(Tt,Lt,Mt,te,ve,oe,Te,He,Ge,cr){var ur=ve.length,jr;te==="linear"?jr={node:"linearGradient",attrs:{x1:Te.x,y1:Te.y,x2:He.x,y2:He.y,gradientUnits:Ge?"userSpaceOnUse":"objectBoundingBox"},reversed:cr}:te==="radial"&&(jr={node:"radialGradient",reversed:cr});for(var Hr=new Array(ur),br=0;br=0&&Tt.i===void 0&&(Tt.i=oe.i),Lt.style("opacity",te.selectedOpacityFn?te.selectedOpacityFn(Tt):Tt.mo===void 0?Te.opacity:Tt.mo),te.ms2mrc){var Ge;Tt.ms==="various"||Te.size==="various"?Ge=3:Ge=te.ms2mrc(Tt.ms),Tt.mrc=Ge,te.selectedSizeFn&&(Ge=Tt.mrc=te.selectedSizeFn(Tt));var cr=u.symbolNumber(Tt.mx||Te.symbol)||0;Tt.om=cr%200>=100;var ur=se(Tt,Mt),jr=ft(Tt,Mt);Lt.attr("d",k(cr,Ge,ur,jr))}var Hr=!1,br,Kr,rn;if(Tt.so)rn=He.outlierwidth,Kr=He.outliercolor,br=Te.outliercolor;else{var Ce=(He||{}).width;rn=(Tt.mlw+1||Ce+1||(Tt.trace?(Tt.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in Tt?Kr=Tt.mlcc=te.lineScale(Tt.mlc):g.isArrayOrTypedArray(He.color)?Kr=r.defaultLine:Kr=He.color,g.isArrayOrTypedArray(Te.color)&&(br=r.defaultLine,Hr=!0),"mc"in Tt?br=Tt.mcc=te.markerScale(Tt.mc):br=Te.color||Te.colors||"rgba(0,0,0,0)",te.selectedColorFn&&(br=te.selectedColorFn(Tt))}if(Tt.om)Lt.call(r.stroke,br).style({"stroke-width":(rn||1)+"px",fill:"none"});else{Lt.style("stroke-width",(Tt.isBlank?0:rn)+"px");var $t=Te.gradient,ne=Tt.mgt;ne?Hr=!0:ne=$t&&$t.type,g.isArrayOrTypedArray(ne)&&(ne=ne[0],R[ne]||(ne=0));var Ct=Te.pattern,gt=u.getPatternAttr,St=Ct&&(gt(Ct.shape,Tt.i,"")||gt(Ct.path,Tt.i,""));if(ne&&ne!=="none"){var Nt=Tt.mgc;Nt?Hr=!0:Nt=$t.color;var ee=Mt.uid;Hr&&(ee+="-"+Tt.i),u.gradient(Lt,ve,ee,ne,[[0,Nt],[1,br]],"fill")}else if(St){var le=!1,we=Ct.fgcolor;!we&&oe&&oe.color&&(we=oe.color,le=!0);var Ue=gt(we,Tt.i,oe&&oe.color||null),qe=gt(Ct.bgcolor,Tt.i,null),ar=Ct.fgopacity,Ar=gt(Ct.size,Tt.i,8),Tr=gt(Ct.solidity,Tt.i,.3);le=le||Tt.mcc||g.isArrayOrTypedArray(Ct.shape)||g.isArrayOrTypedArray(Ct.path)||g.isArrayOrTypedArray(Ct.bgcolor)||g.isArrayOrTypedArray(Ct.fgcolor)||g.isArrayOrTypedArray(Ct.size)||g.isArrayOrTypedArray(Ct.solidity);var pr=Mt.uid;le&&(pr+="-"+Tt.i),u.pattern(Lt,"point",ve,pr,St,Ar,Tr,Tt.mcc,Ct.fillmode,qe,Ue,ar)}else g.isArrayOrTypedArray(br)?r.fill(Lt,br[Tt.i]):r.fill(Lt,br);rn&&r.stroke(Lt,Kr)}},u.makePointStyleFns=function(Tt){var Lt={},Mt=Tt.marker;return Lt.markerScale=u.tryColorscale(Mt,""),Lt.lineScale=u.tryColorscale(Mt,"line"),e.traceIs(Tt,"symbols")&&(Lt.ms2mrc=y.isBubble(Tt)?v(Tt):function(){return(Mt.size||6)/2}),Tt.selectedpoints&&g.extendFlat(Lt,u.makeSelectedPointStyleFns(Tt)),Lt},u.makeSelectedPointStyleFns=function(Tt){var Lt={},Mt=Tt.selected||{},te=Tt.unselected||{},ve=Tt.marker||{},oe=Mt.marker||{},Te=te.marker||{},He=ve.opacity,Ge=oe.opacity,cr=Te.opacity,ur=Ge!==void 0,jr=cr!==void 0;(g.isArrayOrTypedArray(He)||ur||jr)&&(Lt.selectedOpacityFn=function(gt){var St=gt.mo===void 0?ve.opacity:gt.mo;return gt.selected?ur?Ge:St:jr?cr:x*St});var Hr=ve.color,br=oe.color,Kr=Te.color;(br||Kr)&&(Lt.selectedColorFn=function(gt){var St=gt.mcc||Hr;return gt.selected?br||St:Kr||St});var rn=ve.size,Ce=oe.size,$t=Te.size,ne=Ce!==void 0,Ct=$t!==void 0;return e.traceIs(Tt,"symbols")&&(ne||Ct)&&(Lt.selectedSizeFn=function(gt){var St=gt.mrc||rn/2;return gt.selected?ne?Ce/2:St:Ct?$t/2:St}),Lt},u.makeSelectedTextStyleFns=function(Tt){var Lt={},Mt=Tt.selected||{},te=Tt.unselected||{},ve=Tt.textfont||{},oe=Mt.textfont||{},Te=te.textfont||{},He=ve.color,Ge=oe.color,cr=Te.color;return Lt.selectedTextColorFn=function(ur){var jr=ur.tc||He;return ur.selected?Ge||jr:cr||(Ge?jr:r.addOpacity(jr,x))},Lt},u.selectedPointStyle=function(Tt,Lt){if(!(!Tt.size()||!Lt.selectedpoints)){var Mt=u.makeSelectedPointStyleFns(Lt),te=Lt.marker||{},ve=[];Mt.selectedOpacityFn&&ve.push(function(oe,Te){oe.style("opacity",Mt.selectedOpacityFn(Te))}),Mt.selectedColorFn&&ve.push(function(oe,Te){r.fill(oe,Mt.selectedColorFn(Te))}),Mt.selectedSizeFn&&ve.push(function(oe,Te){var He=Te.mx||te.symbol||0,Ge=Mt.selectedSizeFn(Te);oe.attr("d",k(u.symbolNumber(He),Ge,se(Te,Lt),ft(Te,Lt))),Te.mrc2=Ge}),ve.length&&Tt.each(function(oe){for(var Te=c.select(this),He=0;He0?Mt:0}u.textPointStyle=function(Tt,Lt,Mt){if(Tt.size()){var te;if(Lt.selectedpoints){var ve=u.makeSelectedTextStyleFns(Lt);te=ve.selectedTextColorFn}var oe=Lt.texttemplate,Te=Mt._fullLayout;Tt.each(function(He){var Ge=c.select(this),cr=oe?g.extractOption(He,Lt,"txt","texttemplate"):g.extractOption(He,Lt,"tx","text");if(!cr&&cr!==0){Ge.remove();return}if(oe){var ur=Lt._module.formatLabels,jr=ur?ur(He,Lt,Te):{},Hr={};T(Hr,Lt,He.i),cr=g.texttemplateString({data:[Hr,He,Lt._meta],fallback:Lt.texttemplatefallback,labels:jr,locale:Te._d3locale,template:cr})}var br=He.tp||Lt.textposition,Kr=H(He,Lt),rn=te?te(He):He.tc||Lt.textfont.color;Ge.call(u.font,{family:He.tf||Lt.textfont.family,weight:He.tw||Lt.textfont.weight,style:He.ty||Lt.textfont.style,variant:He.tv||Lt.textfont.variant,textcase:He.tC||Lt.textfont.textcase,lineposition:He.tE||Lt.textfont.lineposition,shadow:He.tS||Lt.textfont.shadow,size:Kr,color:rn}).text(cr).call(o.convertToTspans,Mt).call(V,br,Kr,He.mrc)})}},u.selectedTextStyle=function(Tt,Lt){if(!(!Tt.size()||!Lt.selectedpoints)){var Mt=u.makeSelectedTextStyleFns(Lt);Tt.each(function(te){var ve=c.select(this),oe=Mt.selectedTextColorFn(te),Te=te.tp||Lt.textposition,He=H(te,Lt);r.fill(ve,oe);var Ge=e.traceIs(Lt,"bar-like");V(ve,Te,He,te.mrc2||te.mrc,Ge)})}};var F=.5;u.smoothopen=function(Tt,Lt){if(Tt.length<3)return"M"+Tt.join("L");var Mt="M"+Tt[0],te=[],ve;for(ve=1;ve=Ge||gt>=ur&><=Ge)&&(St<=jr&&St>=cr||St>=jr&&St<=cr)&&(Tt=[gt,St])}return Tt}u.applyBackoff=tt,u.makeTester=function(){var Tt=g.ensureSingleById(c.select("body"),"svg","js-plotly-tester",function(Mt){Mt.attr(i.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),Lt=g.ensureSingle(Tt,"path","js-reference-point",function(Mt){Mt.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});u.tester=Tt,u.testref=Lt},u.savedBBoxes={};var dt=0,rt=1e4;u.bBox=function(Tt,Lt,Mt){Mt||(Mt=at(Tt));var te;if(Mt){if(te=u.savedBBoxes[Mt],te)return g.extendFlat({},te)}else if(Tt.childNodes.length===1){var ve=Tt.childNodes[0];if(Mt=at(ve),Mt){var oe=+ve.getAttribute("x")||0,Te=+ve.getAttribute("y")||0,He=ve.getAttribute("transform");if(!He){var Ge=u.bBox(ve,!1,Mt);return oe&&(Ge.left+=oe,Ge.right+=oe),Te&&(Ge.top+=Te,Ge.bottom+=Te),Ge}if(Mt+="~"+oe+"~"+Te+"~"+He,te=u.savedBBoxes[Mt],te)return g.extendFlat({},te)}}var cr,ur;Lt?cr=Tt:(ur=u.tester.node(),cr=Tt.cloneNode(!0),ur.appendChild(cr)),c.select(cr).attr("transform",null).call(o.positionText,0,0);var jr=cr.getBoundingClientRect(),Hr=u.testref.node().getBoundingClientRect();Lt||ur.removeChild(cr);var br={height:jr.height,width:jr.width,left:jr.left-Hr.left,top:jr.top-Hr.top,right:jr.right-Hr.left,bottom:jr.bottom-Hr.top};return dt>=rt&&(u.savedBBoxes={},dt=0),Mt&&(u.savedBBoxes[Mt]=br),dt++,g.extendFlat({},br)};function at(Tt){var Lt=Tt.getAttribute("data-unformatted");if(Lt!==null)return Lt+Tt.getAttribute("data-math")+Tt.getAttribute("text-anchor")+Tt.getAttribute("style")}u.setClipUrl=function(Tt,Lt,Mt){Tt.attr("clip-path",vt(Lt,Mt))};function vt(Tt,Lt){if(!Tt)return null;var Mt=Lt._context,te=Mt._exportedPlot?"":Mt._baseUrl||"";return te?"url('"+te+"#"+Tt+"')":"url(#"+Tt+")"}u.getTranslate=function(Tt){var Lt=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,Mt=Tt.attr?"attr":"getAttribute",te=Tt[Mt]("transform")||"",ve=te.replace(Lt,function(oe,Te,He){return[Te,He].join(" ")}).split(" ");return{x:+ve[0]||0,y:+ve[1]||0}},u.setTranslate=function(Tt,Lt,Mt){var te=/(\btranslate\(.*?\);?)/,ve=Tt.attr?"attr":"getAttribute",oe=Tt.attr?"attr":"setAttribute",Te=Tt[ve]("transform")||"";return Lt=Lt||0,Mt=Mt||0,Te=Te.replace(te,"").trim(),Te+=n(Lt,Mt),Te=Te.trim(),Tt[oe]("transform",Te),Te},u.getScale=function(Tt){var Lt=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,Mt=Tt.attr?"attr":"getAttribute",te=Tt[Mt]("transform")||"",ve=te.replace(Lt,function(oe,Te,He){return[Te,He].join(" ")}).split(" ");return{x:+ve[0]||1,y:+ve[1]||1}},u.setScale=function(Tt,Lt,Mt){var te=/(\bscale\(.*?\);?)/,ve=Tt.attr?"attr":"getAttribute",oe=Tt.attr?"attr":"setAttribute",Te=Tt[ve]("transform")||"";return Lt=Lt||1,Mt=Mt||1,Te=Te.replace(te,"").trim(),Te+="scale("+Lt+","+Mt+")",Te=Te.trim(),Tt[oe]("transform",Te),Te};var it=/\s*sc.*/;u.setPointGroupScale=function(Tt,Lt,Mt){if(Lt=Lt||1,Mt=Mt||1,!!Tt){var te=Lt===1&&Mt===1?"":"scale("+Lt+","+Mt+")";Tt.each(function(){var ve=(this.getAttribute("transform")||"").replace(it,"");ve+=te,ve=ve.trim(),this.setAttribute("transform",ve)})}};var Y=/translate\([^)]*\)\s*$/;u.setTextPointsScale=function(Tt,Lt,Mt){Tt&&Tt.each(function(){var te,ve=c.select(this),oe=ve.select("text");if(oe.node()){var Te=parseFloat(oe.attr("x")||0),He=parseFloat(oe.attr("y")||0),Ge=(ve.attr("transform")||"").match(Y);Lt===1&&Mt===1?te=[]:te=[n(Te,He),"scale("+Lt+","+Mt+")",n(-Te,-He)],Ge&&te.push(Ge),ve.attr("transform",te.join(""))}})};function ft(Tt,Lt){var Mt;return Tt&&(Mt=Tt.mf),Mt===void 0&&(Mt=Lt.marker&&Lt.marker.standoff||0),!Lt._geo&&!Lt._xA?-Mt:Mt}u.getMarkerStandoff=ft;var ut=Math.atan2,wt=Math.cos,zt=Math.sin;function Pt(Tt,Lt){var Mt=Lt[0],te=Lt[1];return[Mt*wt(Tt)-te*zt(Tt),Mt*zt(Tt)+te*wt(Tt)]}var Wt,Ht,Jt,ge,he,de;function se(Tt,Lt){var Mt=Tt.ma;Mt===void 0&&(Mt=Lt.marker.angle,(!Mt||g.isArrayOrTypedArray(Mt))&&(Mt=0));var te,ve,oe=Lt.marker.angleref;if(oe==="previous"||oe==="north"){if(Lt._geo){var Te=Lt._geo.project(Tt.lonlat);te=Te[0],ve=Te[1]}else{var He=Lt._xA,Ge=Lt._yA;if(He&&Ge)te=He.c2p(Tt.x),ve=Ge.c2p(Tt.y);else return 90}if(Lt._geo){var cr=Tt.lonlat[0],ur=Tt.lonlat[1],jr=Lt._geo.project([cr,ur+1e-5]),Hr=Lt._geo.project([cr+1e-5,ur]),br=ut(Hr[1]-ve,Hr[0]-te),Kr=ut(jr[1]-ve,jr[0]-te),rn;if(oe==="north")rn=Mt/180*Math.PI;else if(oe==="previous"){var Ce=cr/180*Math.PI,$t=ur/180*Math.PI,ne=Wt/180*Math.PI,Ct=Ht/180*Math.PI,gt=ne-Ce,St=wt(Ct)*zt(gt),Nt=zt(Ct)*wt($t)-wt(Ct)*zt($t)*wt(gt);rn=-ut(St,Nt)-Math.PI,Wt=cr,Ht=ur}var ee=Pt(br,[wt(rn),0]),le=Pt(Kr,[zt(rn),0]);Mt=ut(ee[1]+le[1],ee[0]+le[0])/Math.PI*180,oe==="previous"&&!(de===Lt.uid&&Tt.i===he+1)&&(Mt=null)}if(oe==="previous"&&!Lt._geo)if(de===Lt.uid&&Tt.i===he+1&&S(te)&&S(ve)){var we=te-Jt,Ue=ve-ge,qe=Lt.line&&Lt.line.shape||"",ar=qe.slice(qe.length-1);ar==="h"&&(Ue=0),ar==="v"&&(we=0),Mt+=ut(Ue,we)/Math.PI*180+90}else Mt=null}return Jt=te,ge=ve,he=Tt.i,de=Lt.uid,Mt}u.getMarkerAngle=se}),lp=Ft((Q,$)=>{var c=un(),g=ra(),P=Kc(),S=Xo(),t=bn(),e=t.strTranslate,r=js(),a=li(),n=tc(),o=co(),i=Af().OPPOSITE_SIDE,s=/ [XY][0-9]* /,f=1.6,x=1.6;function y(v,T,u){var b=v._fullLayout,_=u.propContainer,C=u.propName,M=u.placeholder,E=u.traceIndex,A=u.avoid||{},h=u.attributes,p=u.transform,k=u.containerGroup,w=1,R=_.title,O=(R&&R.text?R.text:"").trim(),N=!1,V=R&&R.font?R.font:{},H=V.family,F=V.size,U=V.color,W=V.weight,q=V.style,X=V.variant,lt=V.textcase,yt=V.lineposition,pt=V.shadow,st=u.subtitlePropName,tt=!!st,dt=u.subtitlePlaceholder,rt=(_.title||{}).subtitle||{text:"",font:{}},at=(rt.text||"").trim(),vt=!1,it=1,Y=rt.font,ft=Y.family,ut=Y.size,wt=Y.color,zt=Y.weight,Pt=Y.style,Wt=Y.variant,Ht=Y.textcase,Jt=Y.lineposition,ge=Y.shadow,he;C==="title.text"?he="titleText":C.indexOf("axis")!==-1?he="axisTitleText":C.indexOf("colorbar")!==-1&&(he="colorbarTitleText");var de=v._context.edits[he];function se(Hr,br){return Hr===void 0||br===void 0?!1:Hr.replace(s," % ")===br.replace(s," % ")}O===""?w=0:se(O,M)&&(de||(O=""),w=.2,N=!0),tt&&(at===""?it=0:se(at,dt)&&(de||(at=""),it=.2,vt=!0)),u._meta?O=t.templateString(O,u._meta):b._meta&&(O=t.templateString(O,b._meta));var Tt=O||at||de,Lt;k||(k=t.ensureSingle(b._infolayer,"g","g-"+T),Lt=b._hColorbarMoveTitle);var Mt=k.selectAll("text."+T).data(Tt?[0]:[]);Mt.enter().append("text"),Mt.text(O).attr("class",T),Mt.exit().remove();var te=null,ve=T+"-subtitle",oe=at||de;if(tt&&(te=k.selectAll("text."+ve).data(oe?[0]:[]),te.enter().append("text"),te.text(at).attr("class",ve),te.exit().remove()),!Tt)return k;function Te(Hr,br){t.syncOrAsync([He,Ge],{title:Hr,subtitle:br})}function He(Hr){var br=Hr.title,Kr=Hr.subtitle,rn;!p&&Lt&&(p={}),p?(rn="",p.rotate&&(rn+="rotate("+[p.rotate,h.x,h.y]+")"),(p.offset||Lt)&&(rn+=e(0,(p.offset||0)-(Lt||0)))):rn=null,br.attr("transform",rn);function Ce(Nt){if(Nt){var ee=c.select(Nt.node().parentNode).select("."+ve);if(!ee.empty()){var le=Nt.node().getBBox();if(le.height){var we=le.y+le.height+f*ut;ee.attr("y",we)}}}}if(br.style("opacity",w*a.opacity(U)).call(r.font,{color:a.rgb(U),size:c.round(F,2),family:H,weight:W,style:q,variant:X,textcase:lt,shadow:pt,lineposition:yt}).attr(h).call(n.convertToTspans,v,Ce),Kr&&!Kr.empty()){var $t=k.select("."+T+"-math-group"),ne=br.node().getBBox(),Ct=$t.node()?$t.node().getBBox():void 0,gt=Ct?Ct.y+Ct.height+f*ut:ne.y+ne.height+x*ut,St=t.extendFlat({},h,{y:gt});Kr.attr("transform",rn),Kr.style("opacity",it*a.opacity(wt)).call(r.font,{color:a.rgb(wt),size:c.round(ut,2),family:ft,weight:zt,style:Pt,variant:Wt,textcase:Ht,shadow:ge,lineposition:Jt}).attr(St).call(n.convertToTspans,v)}return P.previousPromises(v)}function Ge(Hr){var br=Hr.title,Kr=c.select(br.node().parentNode);if(A&&A.selection&&A.side&&O){Kr.attr("transform",null);var rn=i[A.side],Ce=A.side==="left"||A.side==="top"?-1:1,$t=g(A.pad)?A.pad:2,ne=r.bBox(Kr.node()),Ct={t:0,b:0,l:0,r:0},gt=v._fullLayout._reservedMargin;for(var St in gt)for(var Nt in gt[St]){var ee=gt[St][Nt];Ct[Nt]=Math.max(Ct[Nt],ee)}var le={left:Ct.l,top:Ct.t,right:b.width-Ct.r,bottom:b.height-Ct.b},we=A.maxShift||Ce*(le[A.side]-ne[A.side]),Ue=0;if(we<0)Ue=we;else{var qe=A.offsetLeft||0,ar=A.offsetTop||0;ne.left-=qe,ne.right-=qe,ne.top-=ar,ne.bottom-=ar,A.selection.each(function(){var Tr=r.bBox(this);t.bBoxIntersect(ne,Tr,$t)&&(Ue=Math.max(Ue,Ce*(Tr[A.side]-ne[rn])+$t))}),Ue=Math.min(we,Ue),_._titleScoot=Math.abs(Ue)}if(Ue>0||we<0){var Ar={left:[-Ue,0],right:[Ue,0],top:[0,-Ue],bottom:[0,Ue]}[A.side];Kr.attr("transform",e(Ar[0],Ar[1]))}}}Mt.call(Te,te);function cr(Hr,br){Hr.text(br).on("mouseover.opacity",function(){c.select(this).transition().duration(o.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){c.select(this).transition().duration(o.HIDE_PLACEHOLDER).style("opacity",0)})}if(de&&(O?Mt.on(".opacity",null):(cr(Mt,M),N=!0),Mt.call(n.makeEditable,{gd:v}).on("edit",function(Hr){E!==void 0?S.call("_guiRestyle",v,C,Hr,E):S.call("_guiRelayout",v,C,Hr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Te)}).on("input",function(Hr){this.text(Hr||" ").call(n.positionText,h.x,h.y)}),tt)){if(tt&&!O){var ur=Mt.node().getBBox(),jr=ur.y+ur.height+x*ut;te.attr("y",jr)}at?te.on(".opacity",null):(cr(te,dt),vt=!0),te.call(n.makeEditable,{gd:v}).on("edit",function(Hr){S.call("_guiRelayout",v,"title.subtitle.text",Hr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Te)}).on("input",function(Hr){this.text(Hr||" ").call(n.positionText,te.attr("x"),te.attr("y"))})}return Mt.classed("js-placeholder",N),te&&!te.empty()&&te.classed("js-placeholder",vt),k}$.exports={draw:y,SUBTITLE_PADDING_EM:x,SUBTITLE_PADDING_MATHJAX_EM:f}}),i0=Ft((Q,$)=>{var c=un(),g=fa().utcFormat,P=bn(),S=P.numberFormat,t=ra(),e=P.cleanNumber,r=P.ms2DateTime,a=P.dateTime2ms,n=P.ensureNumber,o=P.isArrayOrTypedArray,i=Da(),s=i.FP_SAFE,f=i.BADNUM,x=i.LOG_CLIP,y=i.ONEWEEK,v=i.ONEDAY,T=i.ONEHOUR,u=i.ONEMIN,b=i.ONESEC,_=Rc(),C=ic(),M=C.HOUR_PATTERN,E=C.WEEKDAY_PATTERN;function A(p){return Math.pow(10,p)}function h(p){return p!=null}$.exports=function(p,k){k=k||{};var w=p._id||"x",R=w.charAt(0);function O(rt,at){if(rt>0)return Math.log(rt)/Math.LN10;if(rt<=0&&at&&p.range&&p.range.length===2){var vt=p.range[0],it=p.range[1];return .5*(vt+it-2*x*Math.abs(vt-it))}else return f}function N(rt,at,vt,it){if((it||{}).msUTC&&t(rt))return+rt;var Y=a(rt,vt||p.calendar);if(Y===f)if(t(rt)){rt=+rt;var ft=Math.floor(P.mod(rt+.05,1)*10),ut=Math.round(rt-ft/10);Y=a(new Date(ut))+ft/10}else return f;return Y}function V(rt,at,vt){return r(rt,at,vt||p.calendar)}function H(rt){return p._categories[Math.round(rt)]}function F(rt){if(h(rt)){if(p._categoriesMap===void 0&&(p._categoriesMap={}),p._categoriesMap[rt]!==void 0)return p._categoriesMap[rt];p._categories.push(typeof rt=="number"?String(rt):rt);var at=p._categories.length-1;return p._categoriesMap[rt]=at,at}return f}function U(rt,at){for(var vt=new Array(at),it=0;itp.range[1]&&(vt=!vt);for(var it=vt?-1:1,Y=it*rt,ft=0,ut=0;utzt)ft=ut+1;else{ft=Y<(wt+zt)/2?ut:ut+1;break}}var Pt=p._B[ft]||0;return isFinite(Pt)?lt(rt,p._m2,Pt):0},st=function(rt){var at=p._rangebreaks.length;if(!at)return yt(rt,p._m,p._b);for(var vt=0,it=0;itp._rangebreaks[it].pmax&&(vt=it+1);return yt(rt,p._m2,p._B[vt])}}p.c2l=p.type==="log"?O:n,p.l2c=p.type==="log"?A:n,p.l2p=pt,p.p2l=st,p.c2p=p.type==="log"?function(rt,at){return pt(O(rt,at))}:pt,p.p2c=p.type==="log"?function(rt){return A(st(rt))}:st,["linear","-"].indexOf(p.type)!==-1?(p.d2r=p.r2d=p.d2c=p.r2c=p.d2l=p.r2l=e,p.c2d=p.c2r=p.l2d=p.l2r=n,p.d2p=p.r2p=function(rt){return p.l2p(e(rt))},p.p2d=p.p2r=st,p.cleanPos=n):p.type==="log"?(p.d2r=p.d2l=function(rt,at){return O(e(rt),at)},p.r2d=p.r2c=function(rt){return A(e(rt))},p.d2c=p.r2l=e,p.c2d=p.l2r=n,p.c2r=O,p.l2d=A,p.d2p=function(rt,at){return p.l2p(p.d2r(rt,at))},p.p2d=function(rt){return A(st(rt))},p.r2p=function(rt){return p.l2p(e(rt))},p.p2r=st,p.cleanPos=n):p.type==="date"?(p.d2r=p.r2d=P.identity,p.d2c=p.r2c=p.d2l=p.r2l=N,p.c2d=p.c2r=p.l2d=p.l2r=V,p.d2p=p.r2p=function(rt,at,vt){return p.l2p(N(rt,0,vt))},p.p2d=p.p2r=function(rt,at,vt){return V(st(rt),at,vt)},p.cleanPos=function(rt){return P.cleanDate(rt,f,p.calendar)}):p.type==="category"?(p.d2c=p.d2l=F,p.r2d=p.c2d=p.l2d=H,p.d2r=p.d2l_noadd=q,p.r2c=function(rt){var at=X(rt);return at!==void 0?at:p.fraction2r(.5)},p.l2r=p.c2r=n,p.r2l=X,p.d2p=function(rt){return p.l2p(p.r2c(rt))},p.p2d=function(rt){return H(st(rt))},p.r2p=p.d2p,p.p2r=st,p.cleanPos=function(rt){return typeof rt=="string"&&rt!==""?rt:n(rt)}):p.type==="multicategory"&&(p.r2d=p.c2d=p.l2d=H,p.d2r=p.d2l_noadd=q,p.r2c=function(rt){var at=q(rt);return at!==void 0?at:p.fraction2r(.5)},p.r2c_just_indices=W,p.l2r=p.c2r=n,p.r2l=q,p.d2p=function(rt){return p.l2p(p.r2c(rt))},p.p2d=function(rt){return H(st(rt))},p.r2p=p.d2p,p.p2r=st,p.cleanPos=function(rt){return Array.isArray(rt)||typeof rt=="string"&&rt!==""?rt:n(rt)},p.setupMultiCategory=function(rt){var at=p._traceIndices,vt,it,Y=p._matchGroup;if(Y&&p._categories.length===0){for(var ft in Y)if(ft!==w){var ut=k[_.id2name(ft)];at=at.concat(ut._traceIndices)}}var wt=[[0,{}],[0,{}]],zt=[];for(vt=0;vtut[1]&&(it[ft?0:1]=vt),it[0]===it[1]){var wt=p.l2r(at),zt=p.l2r(vt);if(at!==void 0){var Pt=wt+1;vt!==void 0&&(Pt=Math.min(Pt,zt)),it[ft?1:0]=Pt}if(vt!==void 0){var Wt=zt+1;at!==void 0&&(Wt=Math.max(Wt,wt)),it[ft?0:1]=Wt}}}},p.cleanRange=function(rt,at){p._cleanRange(rt,at),p.limitRange(rt)},p._cleanRange=function(rt,at){at||(at={}),rt||(rt="range");var vt=P.nestedProperty(p,rt).get(),it,Y;if(p.type==="date"?Y=P.dfltRange(p.calendar):R==="y"?Y=C.DFLTRANGEY:p._name==="realaxis"?Y=[0,1]:Y=at.dfltRange||C.DFLTRANGEX,Y=Y.slice(),(p.rangemode==="tozero"||p.rangemode==="nonnegative")&&(Y[0]=0),!vt||vt.length!==2){P.nestedProperty(p,rt).set(Y);return}var ft=vt[0]===null,ut=vt[1]===null;for(p.type==="date"&&!p.autorange&&(vt[0]=P.cleanDate(vt[0],f,p.calendar),vt[1]=P.cleanDate(vt[1],f,p.calendar)),it=0;it<2;it++)if(p.type==="date"){if(!P.isDateTime(vt[it],p.calendar)){p[rt]=Y;break}if(p.r2l(vt[0])===p.r2l(vt[1])){var wt=P.constrain(p.r2l(vt[0]),P.MIN_MS+1e3,P.MAX_MS-1e3);vt[0]=p.l2r(wt-1e3),vt[1]=p.l2r(wt+1e3);break}}else{if(!t(vt[it]))if(!(ft||ut)&&t(vt[1-it]))vt[it]=vt[1-it]*(it?10:.1);else{p[rt]=Y;break}if(vt[it]<-s?vt[it]=-s:vt[it]>s&&(vt[it]=s),vt[0]===vt[1]){var zt=Math.max(1,Math.abs(vt[0]*1e-6));vt[0]-=zt,vt[1]+=zt}}},p.setScale=function(rt){var at=k._size;if(p.overlaying){var vt=_.getFromId({_fullLayout:k},p.overlaying);p.domain=vt.domain}var it=rt&&p._r?"_r":"range",Y=p.calendar;p.cleanRange(it);var ft=p.r2l(p[it][0],Y),ut=p.r2l(p[it][1],Y),wt=R==="y";if(wt?(p._offset=at.t+(1-p.domain[1])*at.h,p._length=at.h*(p.domain[1]-p.domain[0]),p._m=p._length/(ft-ut),p._b=-p._m*ut):(p._offset=at.l+p.domain[0]*at.w,p._length=at.w*(p.domain[1]-p.domain[0]),p._m=p._length/(ut-ft),p._b=-p._m*ft),p._rangebreaks=[],p._lBreaks=0,p._m2=0,p._B=[],p.rangebreaks){var zt,Pt;if(p._rangebreaks=p.locateBreaks(Math.min(ft,ut),Math.max(ft,ut)),p._rangebreaks.length){for(zt=0;ztut&&(Wt=!Wt),Wt&&p._rangebreaks.reverse();var Ht=Wt?-1:1;for(p._m2=Ht*p._length/(Math.abs(ut-ft)-p._lBreaks),p._B.push(-p._m2*(wt?ut:ft)),zt=0;ztY&&(Y+=7,ftY&&(Y+=24,ft=it&&ft=it&&rt=oe.min&&(Ltoe.max&&(oe.max=Mt),te=!1)}te&&ut.push({min:Lt,max:Mt})}};for(vt=0;vt{var c=ra(),g=bn(),P=Da().BADNUM,S=g.isArrayOrTypedArray,t=g.isDateTime,e=g.cleanNumber,r=Math.round;$.exports=function(x,y,v){var T=x,u=v.noMultiCategory;if(S(T)&&!T.length)return"-";if(!u&&f(T))return"multicategory";if(u&&Array.isArray(T[0])){for(var b=[],_=0;_b*2}function i(x){return Math.max(1,(x-1)/1e3)}function s(x,y){for(var v=x.length,T=i(v),u=0,b=0,_={},C=0;Cu*2}function f(x){return S(x[0])&&S(x[1])}}),Y0=Ft((Q,$)=>{var c=un(),g=ra(),P=bn(),S=Da().FP_SAFE,t=Xo(),e=js(),r=Rc(),a=r.getFromId,n=r.isLinked;$.exports={applyAutorangeOptions:k,getAutoRange:o,makePadFn:s,doAutoRange:v,findExtremes:T,concatExtremes:y};function o(w,R){var O,N,V=[],H=w._fullLayout,F=s(H,R,0),U=s(H,R,1),W=y(w,R),q=W.min,X=W.max;if(q.length===0||X.length===0)return P.simpleMap(R.range,R.r2l);var lt=q[0].val,yt=X[0].val;for(O=1;O0&&(Pt=vt-F(ft)-U(ut),Pt>it?Wt/Pt>Y&&(wt=ft,zt=ut,Y=Wt/Pt):Wt/vt>Y&&(wt={val:ft.val,nopad:1},zt={val:ut.val,nopad:1},Y=Wt/vt));function Ht(se,Tt){return Math.max(se,U(Tt))}if(lt===yt){var Jt=lt-1,ge=lt+1;if(rt)if(lt===0)V=[0,1];else{var he=(lt>0?X:q).reduce(Ht,0),de=lt/(1-Math.min(.5,he/vt));V=lt>0?[0,de]:[de,0]}else at?V=[Math.max(0,Jt),Math.max(1,ge)]:V=[Jt,ge]}else rt?(wt.val>=0&&(wt={val:0,nopad:1}),zt.val<=0&&(zt={val:0,nopad:1})):at&&(wt.val-Y*F(wt)<0&&(wt={val:0,nopad:1}),zt.val<=0&&(zt={val:1,nopad:1})),Y=(zt.val-wt.val-i(R,ft.val,ut.val))/(vt-F(wt)-U(zt)),V=[wt.val-Y*F(wt),zt.val+Y*U(zt)];return V=k(V,R),R.limitRange&&R.limitRange(),st&&V.reverse(),P.simpleMap(V,R.l2r||Number)}function i(w,R,O){var N=0;if(w.rangebreaks)for(var V=w.locateBreaks(R,O),H=0;H0?O.ppadplus:O.ppadminus)||O.ppad||0),ft=it((w._m>0?O.ppadminus:O.ppadplus)||O.ppad||0),ut=it(O.vpadplus||O.vpad),wt=it(O.vpadminus||O.vpad);if(!q){if(at=1/0,vt=-1/0,W)for(lt=0;lt0&&(at=yt),yt>vt&&yt-S&&(at=yt),yt>vt&&yt=Wt;lt--)Pt(lt);return{min:N,max:V,opts:O}}function u(w,R,O,N){_(w,R,O,N,M)}function b(w,R,O,N){_(w,R,O,N,E)}function _(w,R,O,N,V){for(var H=N.tozero,F=N.extrapad,U=!0,W=0;W=O&&(q.extrapad||!F)){U=!1;break}else V(R,q.val)&&q.pad<=O&&(F||!q.extrapad)&&(w.splice(W,1),W--)}if(U){var X=H&&R===0;w.push({val:R,pad:X?0:O,extrapad:X?!1:F})}}function C(w){return g(w)&&Math.abs(w)=R}function A(w,R){var O=R.autorangeoptions;return O&&O.minallowed!==void 0&&p(R,O.minallowed,O.maxallowed)?O.minallowed:O&&O.clipmin!==void 0&&p(R,O.clipmin,O.clipmax)?Math.max(w,R.d2l(O.clipmin)):w}function h(w,R){var O=R.autorangeoptions;return O&&O.maxallowed!==void 0&&p(R,O.minallowed,O.maxallowed)?O.maxallowed:O&&O.clipmax!==void 0&&p(R,O.clipmin,O.clipmax)?Math.min(w,R.d2l(O.clipmax)):w}function p(w,R,O){return R!==void 0&&O!==void 0?(R=w.d2l(R),O=w.d2l(O),R=W&&(H=W,O=W),F<=W&&(F=W,N=W)}}return O=A(O,R),N=h(N,R),[O,N]}}),Es=Ft((Q,$)=>{var c=un(),g=ra(),P=Kc(),S=Xo(),t=bn(),e=t.strTranslate,r=tc(),a=lp(),n=li(),o=js(),i=Ad(),s=Bh(),f=Da(),x=f.ONEMAXYEAR,y=f.ONEAVGYEAR,v=f.ONEMINYEAR,T=f.ONEMAXQUARTER,u=f.ONEAVGQUARTER,b=f.ONEMINQUARTER,_=f.ONEMAXMONTH,C=f.ONEAVGMONTH,M=f.ONEMINMONTH,E=f.ONEWEEK,A=f.ONEDAY,h=A/2,p=f.ONEHOUR,k=f.ONEMIN,w=f.ONESEC,R=f.ONEMILLI,O=f.ONEMICROSEC,N=f.MINUS_SIGN,V=f.BADNUM,H={K:"zeroline"},F={K:"gridline",L:"path"},U={K:"minor-gridline",L:"path"},W={K:"tick",L:"path"},q={K:"tick",L:"text"},X={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},lt=Af(),yt=lt.MID_SHIFT,pt=lt.CAP_SHIFT,st=lt.LINE_SPACING,tt=lt.OPPOSITE_SIDE,dt=3,rt=$.exports={};rt.setConvert=i0();var at=dv(),vt=Rc(),it=vt.idSort,Y=vt.isLinked;rt.id2name=vt.id2name,rt.name2id=vt.name2id,rt.cleanId=vt.cleanId,rt.list=vt.list,rt.listIds=vt.listIds,rt.getFromId=vt.getFromId,rt.getFromTrace=vt.getFromTrace;var ft=Y0();rt.getAutoRange=ft.getAutoRange,rt.findExtremes=ft.findExtremes;var ut=1e-4;function wt(ze){var Pe=(ze[1]-ze[0])*ut;return[ze[0]-Pe,ze[1]+Pe]}rt.coerceRef=function(ze,Pe,Rr,qr,$r,Br){var Gr=qr.charAt(qr.length-1),dn=Rr._fullLayout._subplots[Gr+"axis"],an=qr+"ref",Ee={};return $r||($r=dn[0]||(typeof Br=="string"?Br:Br[0])),Br||(Br=$r),dn=dn.concat(dn.map(function(dr){return dr+" domain"})),Ee[an]={valType:"enumerated",values:dn.concat(Br?typeof Br=="string"?[Br]:Br:[]),dflt:$r},t.coerce(ze,Pe,Ee,an)},rt.getRefType=function(ze){return ze===void 0?ze:ze==="paper"?"paper":ze==="pixel"?"pixel":/( domain)$/.test(ze)?"domain":"range"},rt.coercePosition=function(ze,Pe,Rr,qr,$r,Br){var Gr,dn,an=rt.getRefType(qr);if(an!=="range")Gr=t.ensureNumber,dn=Rr($r,Br);else{var Ee=rt.getFromId(Pe,qr);Br=Ee.fraction2r(Br),dn=Rr($r,Br),Gr=Ee.cleanPos}ze[$r]=Gr(dn)},rt.cleanPosition=function(ze,Pe,Rr){var qr=Rr==="paper"||Rr==="pixel"?t.ensureNumber:rt.getFromId(Pe,Rr).cleanPos;return qr(ze)},rt.redrawComponents=function(ze,Pe){Pe=Pe||rt.listIds(ze);var Rr=ze._fullLayout;function qr($r,Br,Gr,dn){for(var an=S.getComponentMethod($r,Br),Ee={},dr=0;dr2e-6||((Rr-ze._forceTick0)/ze._minDtick%1+1.000001)%1>2e-6)&&(ze._minDtick=0))},rt.saveRangeInitial=function(ze,Pe){for(var Rr=rt.list(ze,"",!0),qr=!1,$r=0;$rVr*.3||Ee(qr)||Ee($r))){var yn=Rr.dtick/2;ze+=ze+ynGr){var dn=Number(Rr.substr(1));Br.exactYears>Gr&&dn%12===0?ze=rt.tickIncrement(ze,"M6","reverse")+A*1.5:Br.exactMonths>Gr?ze=rt.tickIncrement(ze,"M1","reverse")+A*15.5:ze-=h;var an=rt.tickIncrement(ze,Rr);if(an<=qr)return an}return ze}rt.prepMinorTicks=function(ze,Pe,Rr){if(!Pe.minor.dtick){delete ze.dtick;var qr=Pe.dtick&&g(Pe._tmin),$r;if(qr){var Br=rt.tickIncrement(Pe._tmin,Pe.dtick,!0);$r=[Pe._tmin,Br*.99+Pe._tmin*.01]}else{var Gr=t.simpleMap(Pe.range,Pe.r2l);$r=[Gr[0],.8*Gr[0]+.2*Gr[1]]}if(ze.range=t.simpleMap($r,Pe.l2r),ze._isMinor=!0,rt.prepTicks(ze,Rr),qr){var dn=g(Pe.dtick),an=g(ze.dtick),Ee=dn?Pe.dtick:+Pe.dtick.substring(1),dr=an?ze.dtick:+ze.dtick.substring(1);dn&&an?ge(Ee,dr)?Ee===2*E&&dr===2*A&&(ze.dtick=E):Ee===2*E&&dr===3*A?ze.dtick=E:Ee===E&&!(Pe._input.minor||{}).nticks?ze.dtick=A:he(Ee/dr,2.5)?ze.dtick=Ee/2:ze.dtick=Ee:String(Pe.dtick).charAt(0)==="M"?an?ze.dtick="M1":ge(Ee,dr)?Ee>=12&&dr===2&&(ze.dtick="M3"):ze.dtick=Pe.dtick:String(ze.dtick).charAt(0)==="L"?String(Pe.dtick).charAt(0)==="L"?ge(Ee,dr)||(ze.dtick=he(Ee/dr,2.5)?Pe.dtick/2:Pe.dtick):ze.dtick="D1":ze.dtick==="D2"&&+Pe.dtick>1&&(ze.dtick=1)}ze.range=Pe.range}Pe.minor._tick0Init===void 0&&(ze.tick0=Pe.tick0)};function ge(ze,Pe){return Math.abs((ze/Pe+.5)%1-.5)<.001}function he(ze,Pe){return Math.abs(ze/Pe-1)<.001}rt.prepTicks=function(ze,Pe){var Rr=t.simpleMap(ze.range,ze.r2l,void 0,void 0,Pe);if(ze.tickmode==="auto"||!ze.dtick){var qr=ze.nticks,$r;qr||(ze.type==="category"||ze.type==="multicategory"?($r=ze.tickfont?t.bigFont(ze.tickfont.size||12):15,qr=ze._length/$r):($r=ze._id.charAt(0)==="y"?40:80,qr=t.constrain(ze._length/$r,4,9)+1),ze._name==="radialaxis"&&(qr*=2)),ze.minor&&ze.minor.tickmode!=="array"||ze.tickmode==="array"&&(qr*=100),ze._roughDTick=Math.abs(Rr[1]-Rr[0])/qr,rt.autoTicks(ze,ze._roughDTick),ze._minDtick>0&&ze.dtick0?(Br=qr-1,Gr=qr):(Br=qr,Gr=qr);var dn=ze[Br].value,an=ze[Gr].value,Ee=Math.abs(an-dn),dr=Rr||Ee,Vr=0;dr>=v?Ee>=v&&Ee<=x?Vr=Ee:Vr=y:Rr===u&&dr>=b?Ee>=b&&Ee<=T?Vr=Ee:Vr=u:dr>=M?Ee>=M&&Ee<=_?Vr=Ee:Vr=C:Rr===E&&dr>=E?Vr=E:dr>=A?Vr=A:Rr===h&&dr>=h?Vr=h:Rr===p&&dr>=p&&(Vr=p);var yn;Vr>=Ee&&(Vr=Ee,yn=!0);var Fn=$r+Vr;if(Pe.rangebreaks&&Vr>0){for(var Xn=84,Pn=0,En=0;EnE&&(Vr=Ee)}(Vr>0||qr===0)&&(ze[qr].periodX=$r+Vr/2)}}rt.calcTicks=function(ze,Pe){for(var Rr=ze.type,qr=ze.calendar,$r=ze.ticklabelstep,Br=ze.ticklabelmode==="period",Gr=ze.range[0]>ze.range[1],dn=!ze.ticklabelindex||t.isArrayOrTypedArray(ze.ticklabelindex)?ze.ticklabelindex:[ze.ticklabelindex],an=t.simpleMap(ze.range,ze.r2l,void 0,void 0,Pe),Ee=an[1]=(Ca?0:1);Ri--){var Ja=!Ri;Ri?(ze._dtickInit=ze.dtick,ze._tick0Init=ze.tick0):(ze.minor._dtickInit=ze.minor.dtick,ze.minor._tick0Init=ze.minor.tick0);var Xa=Ri?ze:t.extendFlat({},ze,ze.minor);if(Ja?rt.prepMinorTicks(Xa,ze,Pe):rt.prepTicks(Xa,Pe),Xa.tickmode==="array"){Ri?(Pn=[],Fn=te(ze,!Ja)):(En=[],Xn=te(ze,!Ja));continue}if(Xa.tickmode==="sync"){Pn=[],Fn=Mt(ze);continue}var Io=wt(an),po=Io[0],Do=Io[1],Ia=g(Xa.dtick),gs=Rr==="log"&&!(Ia||Xa.dtick.charAt(0)==="L"),is=rt.tickFirst(Xa,Pe);if(Ri){if(ze._tmin=is,is=Do:Ho<=Do;Ho=rt.tickIncrement(Ho,ul,Ee,qr)){if(Ri&&Gs++,Xa.rangebreaks&&!Ee){if(Ho=Vr)break}if(Pn.length>yn||Ho===ll)break;ll=Ho;var Js={value:Ho};Ri?(gs&&Ho!==(Ho|0)&&(Js.simpleLabel=!0),$r>1&&Gs%$r&&(Js.skipLabel=!0),Pn.push(Js)):(Js.minor=!0,En.push(Js))}}if(!En||En.length<2)dn=!1;else{var Rl=(En[1].value-En[0].value)*(Gr?-1:1);Wa(Rl,ze.tickformat)||(dn=!1)}if(!dn)Zn=Pn;else{var ls=Pn.concat(En);Br&&Pn.length&&(ls=ls.slice(1)),ls=ls.sort(function(cl,Qo){return cl.value-Qo.value}).filter(function(cl,Qo,Mu){return Qo===0||cl.value!==Mu[Qo-1].value});var Cs=ls.map(function(cl,Qo){return cl.minor===void 0&&!cl.skipLabel?Qo:null}).filter(function(cl){return cl!==null});Cs.forEach(function(cl){dn.map(function(Qo){var Mu=cl+Qo;Mu>=0&&Mu-1;Hs--){if(Pn[Hs].drop){Pn.splice(Hs,1);continue}Pn[Hs].value=Pi(Pn[Hs].value,ze);var il=ze.c2p(Pn[Hs].value);(Kl?ql>il-Go:qlVr||GuVr&&(Mu.periodX=Vr),Gu$r&&yny)Pe/=y,qr=$r(10),ze.dtick="M"+12*jr(Pe,qr,ve);else if(Br>C)Pe/=C,ze.dtick="M"+jr(Pe,1,oe);else if(Br>A){if(ze.dtick=jr(Pe,A,ze._hasDayOfWeekBreaks?[1,2,7,14]:He),!Rr){var Gr=rt.getTickFormat(ze),dn=ze.ticklabelmode==="period";dn&&(ze._rawTick0=ze.tick0),/%[uVW]/.test(Gr)?ze.tick0=t.dateTick0(ze.calendar,2):ze.tick0=t.dateTick0(ze.calendar,1),dn&&(ze._dowTick0=ze.tick0)}}else Br>p?ze.dtick=jr(Pe,p,oe):Br>k?ze.dtick=jr(Pe,k,Te):Br>w?ze.dtick=jr(Pe,w,Te):(qr=$r(10),ze.dtick=jr(Pe,qr,ve))}else if(ze.type==="log"){ze.tick0=0;var an=t.simpleMap(ze.range,ze.r2l);if(ze._isMinor&&(Pe*=1.5),Pe>.7)ze.dtick=Math.ceil(Pe);else if(Math.abs(an[1]-an[0])<1){var Ee=1.5*Math.abs((an[1]-an[0])/Pe);Pe=Math.abs(Math.pow(10,an[1])-Math.pow(10,an[0]))/Ee,qr=$r(10),ze.dtick="L"+jr(Pe,qr,ve)}else ze.dtick=Pe>.3?"D2":"D1"}else ze.type==="category"||ze.type==="multicategory"?(ze.tick0=0,ze.dtick=Math.ceil(Math.max(Pe,1))):xi(ze)?(ze.tick0=0,qr=1,ze.dtick=jr(Pe,qr,ur)):(ze.tick0=0,qr=$r(10),ze.dtick=jr(Pe,qr,ve));if(ze.dtick===0&&(ze.dtick=1),!g(ze.dtick)&&typeof ze.dtick!="string"){var dr=ze.dtick;throw ze.dtick=1,"ax.dtick error: "+String(dr)}};function Hr(ze){var Pe=ze.dtick;if(ze._tickexponent=0,!g(Pe)&&typeof Pe!="string"&&(Pe=1),(ze.type==="category"||ze.type==="multicategory")&&(ze._tickround=null),ze.type==="date"){var Rr=ze.r2l(ze.tick0),qr=ze.l2r(Rr).replace(/(^-|i)/g,""),$r=qr.length;if(String(Pe).charAt(0)==="M")$r>10||qr.substr(5)!=="01-01"?ze._tickround="d":ze._tickround=+Pe.substr(1)%12===0?"y":"m";else if(Pe>=A&&$r<=10||Pe>=A*15)ze._tickround="d";else if(Pe>=k&&$r<=16||Pe>=p)ze._tickround="M";else if(Pe>=w&&$r<=19||Pe>=k)ze._tickround="S";else{var Br=ze.l2r(Rr+Pe).replace(/^-/,"").length;ze._tickround=Math.max($r,Br)-20,ze._tickround<0&&(ze._tickround=4)}}else if(g(Pe)||Pe.charAt(0)==="L"){var Gr=ze.range.map(ze.r2d||Number);g(Pe)||(Pe=Number(Pe.substr(1))),ze._tickround=2-Math.floor(Math.log(Pe)/Math.LN10+.01);var dn=Math.max(Math.abs(Gr[0]),Math.abs(Gr[1])),an=Math.floor(Math.log(dn)/Math.LN10+.01),Ee=ze.minexponent===void 0?3:ze.minexponent;Math.abs(an)>Ee&&(ee(ze.exponentformat)&&ze.exponentformat!=="SI extended"&&!le(an)||ee(ze.exponentformat)&&ze.exponentformat==="SI extended"&&!we(an)?ze._tickexponent=3*Math.round((an-1)/3):ze._tickexponent=an)}else ze._tickround=null}rt.tickIncrement=function(ze,Pe,Rr,qr){var $r=Rr?-1:1;if(g(Pe))return t.increment(ze,$r*Pe);var Br=Pe.charAt(0),Gr=$r*Number(Pe.substr(1));if(Br==="M")return t.incrementMonth(ze,Gr,qr);if(Br==="L")return Math.log(Math.pow(10,ze)+Gr)/Math.LN10;if(Br==="D"){var dn=Pe==="D2"?cr:Ge,an=ze+$r*.01,Ee=t.roundUp(t.mod(an,1),dn,Rr);return Math.floor(an)+Math.log(c.round(Math.pow(10,Ee),1))/Math.LN10}throw"unrecognized dtick "+String(Pe)},rt.tickFirst=function(ze,Pe){var Rr=ze.r2l||Number,qr=t.simpleMap(ze.range,Rr,void 0,void 0,Pe),$r=qr[1]=0&&Zn<=ze._length?En:null};if(Br&&t.isArrayOrTypedArray(ze.ticktext)){var Vr=t.simpleMap(ze.range,ze.r2l),yn=(Math.abs(Vr[1]-Vr[0])-(ze._lBreaks||0))/1e4;for(Ee=0;Ee"+dn;else{var Ee=Di(ze),dr=ze._trueSide||ze.side;(!Ee&&dr==="top"||Ee&&dr==="bottom")&&(Gr+="
")}Pe.text=Gr}function rn(ze,Pe,Rr,qr,$r){var Br=ze.dtick,Gr=Pe.x,dn=ze.tickformat,an=typeof Br=="string"&&Br.charAt(0);if($r==="never"&&($r=""),qr&&an!=="L"&&(Br="L3",an="L"),dn||an==="L")Pe.text=qe(Math.pow(10,Gr),ze,$r,qr);else if(g(Br)||an==="D"&&(ze.minorloglabels==="complete"||t.mod(Gr+.01,1)<.1)){ze.minorloglabels==="complete"&&!(t.mod(Gr+.01,1)<.1)&&(Pe.fontSize*=.75);var Ee=Math.pow(10,Gr).toExponential(0),dr=Ee.split("e"),Vr=+dr[1],yn=Math.abs(Vr),Fn=ze.exponentformat;Fn==="power"||ee(Fn)&&Fn!=="SI extended"&&le(Vr)||ee(Fn)&&Fn==="SI extended"&&we(Vr)?(Pe.text=dr[0],yn>0&&(Pe.text+="x10"),Pe.text==="1x10"&&(Pe.text="10"),Vr!==0&&Vr!==1&&(Pe.text+=""+(Vr>0?"":N)+yn+""),Pe.fontSize*=1.25):(Fn==="e"||Fn==="E")&&yn>2?Pe.text=dr[0]+Fn+(Vr>0?"+":N)+yn:(Pe.text=qe(Math.pow(10,Gr),ze,"","fakehover"),Br==="D1"&&ze._id.charAt(0)==="y"&&(Pe.dy-=Pe.fontSize/6))}else if(an==="D")Pe.text=ze.minorloglabels==="none"?"":String(Math.round(Math.pow(10,t.mod(Gr,1)))),Pe.fontSize*=.75;else throw"unrecognized dtick "+String(Br);if(ze.dtick==="D1"){var Xn=String(Pe.text).charAt(0);(Xn==="0"||Xn==="1")&&(ze._id.charAt(0)==="y"?Pe.dx-=Pe.fontSize/4:(Pe.dy+=Pe.fontSize/2,Pe.dx+=(ze.range[1]>ze.range[0]?1:-1)*Pe.fontSize*(Gr<0?.5:.25)))}}function Ce(ze,Pe){var Rr=ze._categories[Math.round(Pe.x)];Rr===void 0&&(Rr=""),Pe.text=String(Rr)}function $t(ze,Pe,Rr){var qr=Math.round(Pe.x),$r=ze._categories[qr]||[],Br=$r[1]===void 0?"":String($r[1]),Gr=$r[0]===void 0?"":String($r[0]);Rr?Pe.text=Gr+" - "+Br:(Pe.text=Br,Pe.text2=Gr)}function ne(ze,Pe,Rr,qr,$r){$r==="never"?$r="":ze.showexponent==="all"&&Math.abs(Pe.x/ze.dtick)<1e-6&&($r="hide"),Pe.text=qe(Pe.x,ze,$r,qr)}function Ct(ze,Pe,Rr,qr,$r){if(ze.thetaunit==="radians"&&!Rr){var Br=Pe.x/180;if(Br===0)Pe.text="0";else{var Gr=gt(Br);if(Gr[1]>=100)Pe.text=qe(t.deg2rad(Pe.x),ze,$r,qr);else{var dn=Pe.x<0;Gr[1]===1?Gr[0]===1?Pe.text="π":Pe.text=Gr[0]+"π":Pe.text=["",Gr[0],"","⁄","",Gr[1],"","π"].join(""),dn&&(Pe.text=N+Pe.text)}}}else Pe.text=qe(Pe.x,ze,$r,qr)}function gt(ze){function Pe(dn,an){return Math.abs(dn-an)<=1e-6}function Rr(dn,an){return Pe(an,0)?dn:Rr(an,dn%an)}function qr(dn){for(var an=1;!Pe(Math.round(dn*an)/an,dn);)an*=10;return an}var $r=qr(ze),Br=ze*$r,Gr=Math.abs(Rr(Br,$r));return[Math.round(Br/Gr),Math.round($r/Gr)]}var St=["f","p","n","μ","m","","k","M","G","T"],Nt=["q","r","y","z","a",...St,"P","E","Z","Y","R","Q"],ee=ze=>["SI","SI extended","B"].includes(ze);function le(ze){return ze>14||ze<-15}function we(ze){return ze>32||ze<-30}function Ue(ze,Pe){return ee(Pe)?!!(Pe==="SI extended"&&we(ze)||Pe!=="SI extended"&&le(ze)):!1}function qe(ze,Pe,Rr,qr){var $r=ze<0,Br=Pe._tickround,Gr=Rr||Pe.exponentformat||"B",dn=Pe._tickexponent,an=rt.getTickFormat(Pe),Ee=Pe.separatethousands;if(qr){var dr={exponentformat:Gr,minexponent:Pe.minexponent,dtick:Pe.showexponent==="none"?Pe.dtick:g(ze)&&Math.abs(ze)||1,range:Pe.showexponent==="none"?Pe.range.map(Pe.r2d):[0,ze||1]};Hr(dr),Br=(Number(dr._tickround)||0)+4,dn=dr._tickexponent,Pe.hoverformat&&(an=Pe.hoverformat)}if(an)return Pe._numFormat(an)(ze).replace(/-/g,N);var Vr=Math.pow(10,-Br)/2;if(Gr==="none"&&(dn=0),ze=Math.abs(ze),ze"+Xn+"":Gr==="B"&&dn===9?ze+="B":ee(Gr)&&(ze+=Gr==="SI extended"?Nt[dn/3+10]:St[dn/3+5])}return $r?N+ze:ze}rt.getTickFormat=function(ze){var Pe;function Rr(an){return typeof an!="string"?an:Number(an.replace("M",""))*C}function qr(an,Ee){var dr=["L","D"];if(typeof an==typeof Ee){if(typeof an=="number")return an-Ee;var Vr=dr.indexOf(an.charAt(0)),yn=dr.indexOf(Ee.charAt(0));return Vr===yn?Number(an.replace(/(L|D)/g,""))-Number(Ee.replace(/(L|D)/g,"")):Vr-yn}else return typeof an=="number"?1:-1}function $r(an,Ee,dr){var Vr=dr||function(Xn){return Xn},yn=Ee[0],Fn=Ee[1];return(!yn&&typeof yn!="number"||Vr(yn)<=Vr(an))&&(!Fn&&typeof Fn!="number"||Vr(Fn)>=Vr(an))}function Br(an,Ee){var dr=Ee[0]===null,Vr=Ee[1]===null,yn=qr(an,Ee[0])>=0,Fn=qr(an,Ee[1])<=0;return(dr||yn)&&(Vr||Fn)}var Gr,dn;if(ze.tickformatstops&&ze.tickformatstops.length>0)switch(ze.type){case"date":case"linear":{for(Pe=0;Pe=0&&$r.unshift($r.splice(dr,1).shift())}});var dn={false:{left:0,right:0}};return t.syncOrAsync($r.map(function(an){return function(){if(an){var Ee=rt.getFromId(ze,an);Rr||(Rr={}),Rr.axShifts=dn,Rr.overlayingShiftedAx=Gr;var dr=rt.drawOne(ze,Ee,Rr);return Ee._shiftPusher&&ui(Ee,Ee._fullDepth||0,dn,!0),Ee._r=Ee.range.slice(),Ee._rl=t.simpleMap(Ee._r,Ee.r2l),dr}}}))},rt.drawOne=function(ze,Pe,Rr){Rr=Rr||{};var qr=Rr.axShifts||{},$r=Rr.overlayingShiftedAx||[],Br,Gr,dn;Pe.setScale();var an=ze._fullLayout,Ee=Pe._id,dr=Ee.charAt(0),Vr=rt.counterLetter(Ee),yn=an._plots[Pe._mainSubplot],Fn=Pe.zerolinelayer==="above traces";if(!yn)return;if(Pe._shiftPusher=Pe.autoshift||$r.indexOf(Pe._id)!==-1||$r.indexOf(Pe.overlaying)!==-1,Pe._shiftPusher&Pe.anchor==="free"){var Xn=Pe.linewidth/2||0;Pe.ticks==="inside"&&(Xn+=Pe.ticklen),ui(Pe,Xn,qr,!0),ui(Pe,Pe.shift||0,qr,!1)}(Rr.skipTitle!==!0||Pe._shift===void 0)&&(Pe._shift=Pa(Pe,qr));var Pn=yn[dr+"axislayer"],En=Pe._mainLinePosition,Zn=En+=Pe._shift,Ca=Pe._mainMirrorPosition,Ri=Pe._vals=rt.calcTicks(Pe),Ja=[Pe.mirror,Zn,Ca].join("_");for(Br=0;Br0?_l.bottom-Mu:0,Gu))));var ac=0,ph=0;if(Pe._shiftPusher&&(ac=Math.max(Gu,_l.height>0?cl==="l"?Mu-_l.left:_l.right-Mu:0),Pe.title.text!==an._dfltTitle[dr]&&(ph=(Pe._titleStandoff||0)+(Pe._titleScoot||0),cl==="l"&&(ph+=ii(Pe))),Pe._fullDepth=Math.max(ac,ph)),Pe.automargin){Ol={x:0,y:0,r:0,l:0,t:0,b:0};var Jc=[0,1],ah=typeof Pe._shift=="number"?Pe._shift:0;if(dr==="x"){if(cl==="b"?Ol[cl]=Pe._depth:(Ol[cl]=Pe._depth=Math.max(_l.width>0?Mu-_l.top:0,Gu),Jc.reverse()),_l.width>0){var Nf=_l.right-(Pe._offset+Pe._length);Nf>0&&(Ol.xr=1,Ol.r=Nf);var Sf=Pe._offset-_l.left;Sf>0&&(Ol.xl=0,Ol.l=Sf)}}else if(cl==="l"?(Pe._depth=Math.max(_l.height>0?Mu-_l.left:0,Gu),Ol[cl]=Pe._depth-ah):(Pe._depth=Math.max(_l.height>0?_l.right-Mu:0,Gu),Ol[cl]=Pe._depth+ah,Jc.reverse()),_l.height>0){var Dl=_l.bottom-(Pe._offset+Pe._length);Dl>0&&(Ol.yb=0,Ol.b=Dl);var Bc=Pe._offset-_l.top;Bc>0&&(Ol.yt=1,Ol.t=Bc)}Ol[Vr]=Pe.anchor==="free"?Pe.position:Pe._anchorAxis.domain[Jc[0]],Pe.title.text!==an._dfltTitle[dr]&&(Ol[cl]+=ii(Pe)+(Pe.title.standoff||0)),Pe.mirror&&Pe.anchor!=="free"&&(Xl={x:0,y:0,r:0,l:0,t:0,b:0},Xl[Qo]=Pe.linewidth,Pe.mirror&&Pe.mirror!==!0&&(Xl[Qo]+=Gu),Pe.mirror===!0||Pe.mirror==="ticks"?Xl[Vr]=Pe._anchorAxis.domain[Jc[1]]:(Pe.mirror==="all"||Pe.mirror==="allticks")&&(Xl[Vr]=[Pe._counterDomainMin,Pe._counterDomainMax][Jc[1]]))}nu&&(tu=S.getComponentMethod("rangeslider","autoMarginOpts")(ze,Pe)),typeof Pe.automargin=="string"&&(ar(Ol,Pe.automargin),ar(Xl,Pe.automargin)),P.autoMargin(ze,fr(Pe),Ol),P.autoMargin(ze,xr(Pe),Xl),P.autoMargin(ze,Qr(Pe),tu)}),t.syncOrAsync(Ts)}};function ar(ze,Pe){if(ze){var Rr=Object.keys(X).reduce(function(qr,$r){return Pe.indexOf($r)!==-1&&X[$r].forEach(function(Br){qr[Br]=1}),qr},{});Object.keys(ze).forEach(function(qr){Rr[qr]||(qr.length===1?ze[qr]=0:delete ze[qr])})}}function Ar(ze,Pe){var Rr=[],qr,$r=function(Br,Gr){var dn=Br.xbnd[Gr];dn!==null&&Rr.push(t.extendFlat({},Br,{x:dn}))};if(Pe.length){for(qr=0;qrze.range[1],dn=ze.ticklabelposition&&ze.ticklabelposition.indexOf("inside")!==-1,an=!dn;if(Rr){var Ee=Gr?-1:1;Rr=Rr*Ee}if(qr){var dr=ze.side,Vr=dn&&(dr==="top"||dr==="left")||an&&(dr==="bottom"||dr==="right")?1:-1;qr=qr*Vr}return ze._id.charAt(0)==="x"?function(yn){return e($r+ze._offset+ze.l2p(Vn(yn))+Rr,Br+qr)}:function(yn){return e(Br+qr,$r+ze._offset+ze.l2p(Vn(yn))+Rr)}};function Vn(ze){return ze.periodX!==void 0?ze.periodX:ze.x}function Hn(ze){var Pe=ze.ticklabelposition||"",Rr=ze.tickson||"",qr=function(Xn){return Pe.indexOf(Xn)!==-1},$r=qr("top"),Br=qr("left"),Gr=qr("right"),dn=qr("bottom"),an=qr("inside"),Ee=Rr!=="boundaries"&&(dn||Br||$r||Gr);if(!Ee&&!an)return[0,0];var dr=ze.side,Vr=Ee?(ze.tickwidth||0)/2:0,yn=dt,Fn=ze.tickfont?ze.tickfont.size:12;return(dn||$r)&&(Vr+=Fn*pt,yn+=(ze.linewidth||0)/2),(Br||Gr)&&(Vr+=(ze.linewidth||0)/2,yn+=dt),an&&dr==="top"&&(yn-=Fn*(1-pt)),(Br||$r)&&(Vr=-Vr),(dr==="bottom"||dr==="right")&&(yn=-yn),[Ee?Vr:0,an?yn:0]}rt.makeTickPath=function(ze,Pe,Rr,qr){qr||(qr={});var $r=qr.minor;if($r&&!ze.minor)return"";var Br=qr.len!==void 0?qr.len:$r?ze.minor.ticklen:ze.ticklen,Gr=ze._id.charAt(0),dn=(ze.linewidth||1)/2;return Gr==="x"?"M0,"+(Pe+dn*Rr)+"v"+Br*Rr:"M"+(Pe+dn*Rr)+",0h"+Br*Rr},rt.makeLabelFns=function(ze,Pe,Rr){var qr=ze.ticklabelposition||"",$r=ze.tickson||"",Br=function(Ho){return qr.indexOf(Ho)!==-1},Gr=Br("top"),dn=Br("left"),an=Br("right"),Ee=Br("bottom"),dr=$r!=="boundaries"&&(Ee||dn||Gr||an),Vr=Br("inside"),yn=qr==="inside"&&ze.ticks==="inside"||!Vr&&ze.ticks==="outside"&&$r!=="boundaries",Fn=0,Xn=0,Pn=yn?ze.ticklen:0;if(Vr?Pn*=-1:dr&&(Pn=0),yn&&(Fn+=Pn,Rr)){var En=t.deg2rad(Rr);Fn=Pn*Math.cos(En)+1,Xn=Pn*Math.sin(En)}ze.showticklabels&&(yn||ze.showline)&&(Fn+=.2*ze.tickfont.size),Fn+=(ze.linewidth||1)/2*(Vr?-1:1);var Zn={labelStandoff:Fn,labelShift:Xn},Ca,Ri,Ja,Xa,Io=0,po=ze.side,Do=ze._id.charAt(0),Ia=ze.tickangle,gs;if(Do==="x")gs=!Vr&&po==="bottom"||Vr&&po==="top",Xa=gs?1:-1,Vr&&(Xa*=-1),Ca=Xn*Xa,Ri=Pe+Fn*Xa,Ja=gs?1:-.2,Math.abs(Ia)===90&&(Vr?Ja+=yt:Ia===-90&&po==="bottom"?Ja=pt:Ia===90&&po==="top"?Ja=yt:Ja=.5,Io=yt/2*(Ia/90)),Zn.xFn=function(Ho){return Ho.dx+Ca+Io*Ho.fontSize},Zn.yFn=function(Ho){return Ho.dy+Ri+Ho.fontSize*Ja},Zn.anchorFn=function(Ho,Gs){if(dr){if(dn)return"end";if(an)return"start"}return!g(Gs)||Gs===0||Gs===180?"middle":Gs*Xa<0!==Vr?"end":"start"},Zn.heightFn=function(Ho,Gs,as){return Gs<-60||Gs>60?-.5*as:ze.side==="top"!==Vr?-as:0};else if(Do==="y"){if(gs=!Vr&&po==="left"||Vr&&po==="right",Xa=gs?1:-1,Vr&&(Xa*=-1),Ca=Fn,Ri=Xn*Xa,Ja=0,!Vr&&Math.abs(Ia)===90&&(Ia===-90&&po==="left"||Ia===90&&po==="right"?Ja=pt:Ja=.5),Vr){var is=g(Ia)?+Ia:0;if(is!==0){var ll=t.deg2rad(is);Io=Math.abs(Math.sin(ll))*pt*Xa,Ja=0}}Zn.xFn=function(Ho){return Ho.dx+Pe-(Ca+Ho.fontSize*Ja)*Xa+Io*Ho.fontSize},Zn.yFn=function(Ho){return Ho.dy+Ri+Ho.fontSize*yt},Zn.anchorFn=function(Ho,Gs){return g(Gs)&&Math.abs(Gs)===90?"middle":gs?"end":"start"},Zn.heightFn=function(Ho,Gs,as){return ze.side==="right"&&(Gs*=-1),Gs<-30?-as:Gs<30?-.5*as:0}}return Zn};function Kn(ze){return[ze.text,ze.x,ze.axInfo,ze.font,ze.fontSize,ze.fontColor].join("_")}rt.drawTicks=function(ze,Pe,Rr){Rr=Rr||{};var qr=Pe._id+"tick",$r=[].concat(Pe.minor&&Pe.minor.ticks?Rr.vals.filter(function(Gr){return Gr.minor&&!Gr.noTick}):[]).concat(Pe.ticks?Rr.vals.filter(function(Gr){return!Gr.minor&&!Gr.noTick}):[]),Br=Rr.layer.selectAll("path."+qr).data($r,Kn);Br.exit().remove(),Br.enter().append("path").classed(qr,1).classed("ticks",1).classed("crisp",Rr.crisp!==!1).each(function(Gr){return n.stroke(c.select(this),Gr.minor?Pe.minor.tickcolor:Pe.tickcolor)}).style("stroke-width",function(Gr){return o.crispRound(ze,Gr.minor?Pe.minor.tickwidth:Pe.tickwidth,1)+"px"}).attr("d",Rr.path).style("display",null),Zi(Pe,[W]),Br.attr("transform",Rr.transFn)},rt.drawGrid=function(ze,Pe,Rr){if(Rr=Rr||{},Pe.tickmode!=="sync"){var qr=Pe._id+"grid",$r=Pe.minor&&Pe.minor.showgrid,Br=$r?Rr.vals.filter(function(Zn){return Zn.minor}):[],Gr=Pe.showgrid?Rr.vals.filter(function(Zn){return!Zn.minor}):[],dn=Rr.counterAxis;if(dn&&rt.shouldShowZeroLine(ze,Pe,dn))for(var an=Pe.tickmode==="array",Ee=0;Ee=0;Xn--){var Pn=Xn?yn:Fn;if(Pn){var En=Pn.selectAll("path."+qr).data(Xn?Gr:Br,Kn);En.exit().remove(),En.enter().append("path").classed(qr,1).classed("crisp",Rr.crisp!==!1),En.attr("transform",Rr.transFn).attr("d",Rr.path).each(function(Zn){return n.stroke(c.select(this),Zn.minor?Pe.minor.gridcolor:Pe.gridcolor||"#ddd")}).style("stroke-dasharray",function(Zn){return o.dashStyle(Zn.minor?Pe.minor.griddash:Pe.griddash,Zn.minor?Pe.minor.gridwidth:Pe.gridwidth)}).style("stroke-width",function(Zn){return(Zn.minor?Vr:Pe._gw)+"px"}).style("display",null),typeof Rr.path=="function"&&En.attr("d",Rr.path)}}Zi(Pe,[F,U])}},rt.drawZeroLine=function(ze,Pe,Rr){Rr=Rr||Rr;var qr=Pe._id+"zl",$r=rt.shouldShowZeroLine(ze,Pe,Rr.counterAxis),Br=Rr.layer.selectAll("path."+qr).data($r?[{x:0,id:Pe._id}]:[]);Br.exit().remove(),Br.enter().append("path").classed(qr,1).classed("zl",1).classed("crisp",Rr.crisp!==!1).each(function(){Rr.layer.selectAll("path").sort(function(Gr,dn){return it(Gr.id,dn.id)})}),Br.attr("transform",Rr.transFn).attr("d",Rr.path).call(n.stroke,Pe.zerolinecolor||n.defaultLine).style("stroke-width",o.crispRound(ze,Pe.zerolinewidth,Pe._gw||1)+"px").style("display",null),Zi(Pe,[H])},rt.drawLabels=function(ze,Pe,Rr){Rr=Rr||{};var qr=ze._fullLayout,$r=Pe._id,Br=Pe.zerolinelayer==="above traces",Gr=Rr.cls||$r+"tick",dn=Rr.vals.filter(function(ls){return ls.text}),an=Rr.labelFns,Ee=Rr.secondary?0:Pe.tickangle,dr=(Pe._prevTickAngles||{})[Gr],Vr=Rr.layer.selectAll("g."+Gr).data(Pe.showticklabels?dn:[],Kn),yn=[];Vr.enter().append("g").classed(Gr,1).append("text").attr("text-anchor","middle").each(function(ls){var Cs=c.select(this),Co=ze._promises.length;Cs.call(r.positionText,an.xFn(ls),an.yFn(ls)).call(o.font,{family:ls.font,size:ls.fontSize,color:ls.fontColor,weight:ls.fontWeight,style:ls.fontStyle,variant:ls.fontVariant,textcase:ls.fontTextcase,lineposition:ls.fontLineposition,shadow:ls.fontShadow}).text(ls.text).call(r.convertToTspans,ze),ze._promises[Co]?yn.push(ze._promises.pop().then(function(){Fn(Cs,Ee)})):Fn(Cs,Ee)}),Zi(Pe,[q]),Vr.exit().remove(),Rr.repositionOnUpdate&&Vr.each(function(ls){c.select(this).select("text").call(r.positionText,an.xFn(ls),an.yFn(ls))});function Fn(ls,Cs){ls.each(function(Co){var ks=c.select(this),kl=ks.select(".text-math-group"),Vl=an.anchorFn(Co,Cs),Yl=Rr.transFn.call(ks.node(),Co)+(g(Cs)&&+Cs!=0?" rotate("+Cs+","+an.xFn(Co)+","+(an.yFn(Co)-Co.fontSize/2)+")":""),Ns=r.lineCount(ks),La=st*Co.fontSize,uo=an.heightFn(Co,g(Cs)?+Cs:0,(Ns-1)*La);if(uo&&(Yl+=e(0,uo)),kl.empty()){var Hs=ks.select("text");Hs.attr({transform:Yl,"text-anchor":Vl}),Hs.style("display",null),Pe._adjustTickLabelsOverflow&&Pe._adjustTickLabelsOverflow()}else{var Kl=o.bBox(kl.node()).width,Go=Kl*{end:-.5,start:.5}[Vl];kl.attr("transform",Yl+e(Go,0))}})}Pe._adjustTickLabelsOverflow=function(){var ls=Pe.ticklabeloverflow;if(!(!ls||ls==="allow")){var Cs=ls.indexOf("hide")!==-1,Co=Pe._id.charAt(0)==="x",ks=0,kl=Co?ze._fullLayout.width:ze._fullLayout.height;if(ls.indexOf("domain")!==-1){var Vl=t.simpleMap(Pe.range,Pe.r2l);ks=Pe.l2p(Vl[0])+Pe._offset,kl=Pe.l2p(Vl[1])+Pe._offset}var Yl=Math.min(ks,kl),Ns=Math.max(ks,kl),La=Pe.side,uo=1/0,Hs=-1/0;Vr.each(function(il){var Cl=c.select(this),Fu=Cl.select(".text-math-group");if(Fu.empty()){var ao=o.bBox(Cl.node()),Ts=0;Co?(ao.right>Ns||ao.leftNs||ao.top+(Pe.tickangle?0:il.fontSize/4)Pe["_visibleLabelMin_"+Vl._id]?Cl.style("display","none"):Ns.K==="tick"&&!Yl&&Cl.node().style.display!=="none"&&Cl.style("display",null)})})})})},Fn(Vr,dr+1?dr:Ee);function Xn(){return yn.length&&Promise.all(yn)}var Pn=null;function En(){if(Fn(Vr,Ee),dn.length&&Pe.autotickangles&&(Pe.type!=="log"||String(Pe.dtick).charAt(0)!=="D")){Pn=Pe.autotickangles[0];var ls=0,Cs=[],Co,ks=1;Vr.each(function(Ol){ls=Math.max(ls,Ol.fontSize);var Xl=Pe.l2p(Ol.x),tu=rr(this),ac=o.bBox(tu.node());ks=Math.max(ks,r.lineCount(tu)),Cs.push({top:0,bottom:10,height:10,left:Xl-ac.width/2,right:Xl+ac.width/2+2,width:ac.width+2})});var kl=(Pe.tickson==="boundaries"||Pe.showdividers)&&!Rr.secondary,Vl=dn.length,Yl=Math.abs((dn[Vl-1].x-dn[0].x)*Pe._m)/(Vl-1),Ns=kl?Yl/2:Yl,La=kl?Pe.ticklen:ls*1.25*ks,uo=Math.sqrt(Math.pow(Ns,2)+Math.pow(La,2)),Hs=Ns/uo,Kl=Pe.autotickangles.map(function(Ol){return Ol*Math.PI/180}),Go=Kl.find(function(Ol){return Math.abs(Math.cos(Ol))<=Hs});Go===void 0&&(Go=Kl.reduce(function(Ol,Xl){return Math.abs(Math.cos(Ol))ul*as&&(ll=as,Ia[Do]=gs[Do]=Ho[Do])}var Js=Math.abs(ll-is);Js-Xa>0?(Js-=Xa,Xa*=1+Xa/Js):Xa=0,Pe._id.charAt(0)!=="y"&&(Xa=-Xa),Ia[po]=Ri.p2r(Ri.r2p(gs[po])+Io*Xa),Ri.autorange==="min"||Ri.autorange==="max reversed"?(Ia[0]=null,Ri._rangeInitial0=void 0,Ri._rangeInitial1=void 0):(Ri.autorange==="max"||Ri.autorange==="min reversed")&&(Ia[1]=null,Ri._rangeInitial0=void 0,Ri._rangeInitial1=void 0),qr._insideTickLabelsUpdaterange[Ri._name+".range"]=Ia}var Rl=t.syncOrAsync(Zn);return Rl&&Rl.then&&ze._promises.push(Rl),Rl};function Ci(ze,Pe,Rr){var qr=Pe._id+"divider",$r=Rr.vals,Br=Rr.layer.selectAll("path."+qr).data($r,Kn);Br.exit().remove(),Br.enter().insert("path",":first-child").classed(qr,1).classed("crisp",1).call(n.stroke,Pe.dividercolor).style("stroke-width",o.crispRound(ze,Pe.dividerwidth,1)+"px"),Br.attr("transform",Rr.transFn).attr("d",Rr.path)}rt.getPxPosition=function(ze,Pe){var Rr=ze._fullLayout._size,qr=Pe._id.charAt(0),$r=Pe.side,Br;if(Pe.anchor!=="free"?Br=Pe._anchorAxis:qr==="x"?Br={_offset:Rr.t+(1-(Pe.position||0))*Rr.h,_length:0}:qr==="y"&&(Br={_offset:Rr.l+(Pe.position||0)*Rr.w+Pe._shift,_length:0}),$r==="top"||$r==="left")return Br._offset;if($r==="bottom"||$r==="right")return Br._offset+Br._length};function ii(ze){var Pe=ze.title.font.size,Rr=(ze.title.text.match(r.BR_TAG_ALL)||[]).length;return ze.title.hasOwnProperty("standoff")?Pe*(pt+Rr*st):Rr?Pe*(Rr+1)*st:Pe}function qn(ze,Pe){var Rr=ze._fullLayout,qr=Pe._id,$r=qr.charAt(0),Br=Pe.title.font.size,Gr,dn=(Pe.title.text.match(r.BR_TAG_ALL)||[]).length;if(Pe.title.hasOwnProperty("standoff"))Pe.side==="bottom"||Pe.side==="right"?Gr=Pe._depth+Pe.title.standoff+Br*pt:(Pe.side==="top"||Pe.side==="left")&&(Gr=Pe._depth+Pe.title.standoff+Br*(yt+dn*st));else{var an=Di(Pe);if(Pe.type==="multicategory")Gr=Pe._depth;else{var Ee=1.5*Br;an&&(Ee=.5*Br,Pe.ticks==="outside"&&(Ee+=Pe.ticklen)),Gr=10+Ee+(Pe.linewidth?Pe.linewidth-1:0)}an||($r==="x"?Gr+=Pe.side==="top"?Br*(Pe.showticklabels?1:0):Br*(Pe.showticklabels?1.5:.5):Gr+=Pe.side==="right"?Br*(Pe.showticklabels?1:.5):Br*(Pe.showticklabels?.5:0))}var dr=rt.getPxPosition(ze,Pe),Vr,yn,Fn;$r==="x"?(yn=Pe._offset+Pe._length/2,Fn=Pe.side==="top"?dr-Gr:dr+Gr):(Fn=Pe._offset+Pe._length/2,yn=Pe.side==="right"?dr+Gr:dr-Gr,Vr={rotate:"-90",offset:0});var Xn;if(Pe.type!=="multicategory"){var Pn=Pe._selections[Pe._id+"tick"];if(Xn={selection:Pn,side:Pe.side},Pn&&Pn.node()&&Pn.node().parentNode){var En=o.getTranslate(Pn.node().parentNode);Xn.offsetLeft=En.x,Xn.offsetTop=En.y}Pe.title.hasOwnProperty("standoff")&&(Xn.pad=0)}return Pe._titleStandoff=Gr,a.draw(ze,qr+"title",{propContainer:Pe,propName:Pe._name+".title.text",placeholder:Rr._dfltTitle[$r],avoid:Xn,transform:Vr,attributes:{x:yn,y:Fn,"text-anchor":"middle"}})}rt.shouldShowZeroLine=function(ze,Pe,Rr){var qr=t.simpleMap(Pe.range,Pe.r2l);return qr[0]*qr[1]<=0&&Pe.zeroline&&(Pe.type==="linear"||Pe.type==="-")&&!(Pe.rangebreaks&&Pe.maskBreaks(0)===V)&&(oa(Pe,0)||!Hi(ze,Pe,Rr,qr)||We(ze,Pe))},rt.clipEnds=function(ze,Pe){return Pe.filter(function(Rr){return oa(ze,Rr.x)})};function oa(ze,Pe){var Rr=ze.l2p(Pe);return Rr>1&&Rr1)for($r=1;$r=$r.min&&ze<$r.max)return $r.max}return ze}function Di(ze){return(ze.ticklabelposition||"").indexOf("inside")!==-1}function Zi(ze,Pe){Di(ze._anchorAxis||{})&&ze._hideCounterAxisInsideTickLabels&&ze._hideCounterAxisInsideTickLabels(Pe)}function ui(ze,Pe,Rr,qr){var $r=ze.anchor!=="free"&&(ze.overlaying===void 0||ze.overlaying===!1)?ze._id:ze.overlaying,Br;qr?Br=ze.side==="right"?Pe:-Pe:Br=Pe,$r in Rr||(Rr[$r]={}),ze.side in Rr[$r]||(Rr[$r][ze.side]=0),Rr[$r][ze.side]+=Br}function Pa(ze,Pe){return ze.autoshift?Pe[ze.overlaying][ze.side]:ze.shift||0}function Wa(ze,Pe){return/%f/.test(Pe)?ze>=O:/%L/.test(Pe)?ze>=R:/%[SX]/.test(Pe)?ze>=w:/%M/.test(Pe)?ze>=k:/%[HI]/.test(Pe)?ze>=p:/%p/.test(Pe)?ze>=h:/%[Aadejuwx]/.test(Pe)?ze>=A:/%[UVW]/.test(Pe)?ze>=E:/%[Bbm]/.test(Pe)?ze>=M:/%[q]/.test(Pe)?ze>=b:/%[Yy]/.test(Pe)?ze>=v:!0}}),gw=Ft((Q,$)=>{$.exports=function(c,g,P){var S,t;if(P){var e=g==="reversed"||g==="min reversed"||g==="max reversed";S=P[e?1:0],t=P[e?0:1]}var r=c("autorangeoptions.minallowed",t===null?S:void 0),a=c("autorangeoptions.maxallowed",S===null?t:void 0);r===void 0&&c("autorangeoptions.clipmin"),a===void 0&&c("autorangeoptions.clipmax"),c("autorangeoptions.include")}}),E_=Ft((Q,$)=>{var c=gw();$.exports=function(g,P,S,t){var e=P._template||{},r=P.type||e.type||"-";S("minallowed"),S("maxallowed");var a=S("range");if(!a){var n;!t.noInsiderange&&r!=="log"&&(n=S("insiderange"),n&&(n[0]===null||n[1]===null)&&(P.insiderange=!1,n=void 0),n&&(a=S("range",n)))}var o=P.getAutorangeDflt(a,t),i=S("autorange",o),s;a&&(a[0]===null&&a[1]===null||(a[0]===null||a[1]===null)&&(i==="reversed"||i===!0)||a[0]!==null&&(i==="min"||i==="max reversed")||a[1]!==null&&(i==="max"||i==="min reversed"))&&(a=void 0,delete P.range,P.autorange=!0,s=!0),s||(o=P.getAutorangeDflt(a,t),i=S("autorange",o)),i&&(c(S,i,a),(r==="linear"||r==="-")&&S("rangemode")),P.cleanRange()}}),h6=Ft((Q,$)=>{var c={left:0,top:0};$.exports=g;function g(S,t,e){t=t||S.currentTarget||S.srcElement,Array.isArray(e)||(e=[0,0]);var r=S.clientX||0,a=S.clientY||0,n=P(t);return e[0]=r-n.left,e[1]=a-n.top,e}function P(S){return S===window||S===document||S===document.body?c:S.getBoundingClientRect()}}),C_=Ft((Q,$)=>{var c=Wu();function g(){var P=!1;try{var S=Object.defineProperty({},"passive",{get:function(){P=!0}});window.addEventListener("test",null,S),window.removeEventListener("test",null,S)}catch{P=!1}return P}$.exports=c&&g()}),L_=Ft((Q,$)=>{$.exports=function(c,g,P,S,t){var e=(c-P)/(S-P),r=e+g/(S-P),a=(e+r)/2;return t==="left"||t==="bottom"?e:t==="center"||t==="middle"?a:t==="right"||t==="top"?r:e<2/3-a?e:r>4/3-a?r:a}}),f6=Ft((Q,$)=>{var c=bn(),g=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];$.exports=function(P,S,t,e){return t==="left"?P=0:t==="center"?P=1:t==="right"?P=2:P=c.constrain(Math.floor(P*3),0,2),e==="bottom"?S=0:e==="middle"?S=1:e==="top"?S=2:S=c.constrain(Math.floor(S*3),0,2),g[S][P]}}),K0=Ft((Q,$)=>{var c=Om(),g=A_(),P=r0().getGraphDiv,S=go(),t=$.exports={};t.wrapped=function(e,r,a){e=P(e),e._fullLayout&&g.clear(e._fullLayout._uid+S.HOVERID),t.raw(e,r,a)},t.raw=function(e,r){var a=e._fullLayout,n=e._hoverdata;r||(r={}),!(r.target&&!e._dragged&&c.triggerHandler(e,"plotly_beforehover",r)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,r.target&&n&&e.emit("plotly_unhover",{event:r,points:n}))}}),up=Ft((Q,$)=>{var c=h6(),g=Rf(),P=C_(),S=bn().removeElement,t=ic(),e=$.exports={};e.align=L_(),e.getCursor=f6();var r=K0();e.unhover=r.wrapped,e.unhoverRaw=r.raw,e.init=function(o){var i=o.gd,s=1,f=i._context.doubleClickDelay,x=o.element,y,v,T,u,b,_,C,M;i._mouseDownTime||(i._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=h,P?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=h,x.addEventListener("touchstart",h,{passive:!1})):x.ontouchstart=h;function E(w,R,O){return Math.abs(w)"u"&&typeof w.clientY>"u"&&(w.clientX=y,w.clientY=v),T=new Date().getTime(),T-i._mouseDownTimef&&(s=Math.max(s-1,1)),i._dragged)o.doneFn&&o.doneFn();else{var R;_.target===C?R=_:(R={target:C,srcElement:C,toElement:C},Object.keys(_).concat(Object.keys(_.__proto__)).forEach(O=>{var N=_[O];!R[O]&&typeof N!="function"&&(R[O]=N)})),o.clickFn&&o.clickFn(s,R),M||C.dispatchEvent(new MouseEvent("click",w))}i._dragging=!1,i._dragged=!1}};function a(){var o=document.createElement("div");o.className="dragcover";var i=o.style;return i.position="fixed",i.left=0,i.right=0,i.top=0,i.bottom=0,i.zIndex=999999999,i.background="none",document.body.appendChild(o),o}e.coverSlip=a;function n(o){return c(o.changedTouches?o.changedTouches[0]:o,document.body)}}),P0=Ft((Q,$)=>{$.exports=function(c,g){(c.attr("class")||"").split(" ").forEach(function(P){P.indexOf("cursor-")===0&&c.classed(P,!1)}),g&&c.classed("cursor-"+g,!0)}}),Fm=Ft((Q,$)=>{var c=P0(),g="data-savedcursor",P="!!";$.exports=function(S,t){var e=S.attr(g);if(t){if(!e){for(var r=(S.attr("class")||"").split(" "),a=0;a{var c=Ea(),g=bi();$.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:g.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:c({editType:"legend"}),grouptitlefont:c({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:c({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}}),Fy=Ft(Q=>{Q.isGrouped=function($){return($.traceorder||"").indexOf("grouped")!==-1},Q.isVertical=function($){return $.orientation!=="h"},Q.isReversed=function($){return($.traceorder||"").indexOf("reversed")!==-1}}),Ry=Ft((Q,$)=>{var c=Xo(),g=bn(),P=pu(),S=$o(),t=P_(),e=x1(),r=Fy();function a(n,o,i,s){var f=o[n]||{},x=P.newContainer(i,n);function y(st,tt){return g.coerce(f,x,t,st,tt)}var v=g.coerceFont(y,"font",i.font);y("bgcolor",i.paper_bgcolor),y("bordercolor");var T=y("visible");if(T){for(var u,b=function(st,tt){var dt=u._input,rt=u;return g.coerce(dt,rt,S,st,tt)},_=i.font||{},C=g.coerceFont(y,"grouptitlefont",_,{overrideDflt:{size:Math.round(_.size*1.1)}}),M=0,E=!1,A="normal",h=(i.shapes||[]).filter(function(st){return st.showlegend}),p=s.concat(h).filter(function(st){return n===(st.legend||"legend")}),k=0;k(n==="legend"?1:0));if(R===!1&&(i[n]=void 0),!(R===!1&&!f.uirevision)&&(y("uirevision",i.uirevision),R!==!1)){y("borderwidth");var O=y("orientation"),N=y("yref"),V=y("xref"),H=O==="h",F=N==="paper",U=V==="paper",W,q,X,lt="left";H?(W=0,c.getComponentMethod("rangeslider","isVisible")(o.xaxis)?F?(q=1.1,X="bottom"):(q=1,X="top"):F?(q=-.1,X="top"):(q=0,X="bottom")):(q=1,X="auto",U?W=1.02:(W=1,lt="right")),g.coerce(f,x,{x:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:W}},"x"),g.coerce(f,x,{y:{valType:"number",editType:"legend",min:F?-2:0,max:F?3:1,dflt:q}},"y"),y("traceorder",A),r.isGrouped(i[n])&&y("tracegroupgap"),y("entrywidth"),y("entrywidthmode"),y("indentation"),y("itemsizing"),y("itemwidth"),y("itemclick"),y("itemdoubleclick"),y("groupclick"),y("xanchor",lt),y("yanchor",X),y("maxheight"),y("valign"),g.noneOrAll(f,x,["x","y"]);var yt=y("title.text");if(yt){y("title.side",H?"left":"top");var pt=g.extendFlat({},v,{size:g.bigFont(v.size)});g.coerceFont(y,"title.font",pt)}}}}$.exports=function(n,o,i){var s,f=i.slice(),x=o.shapes;if(x)for(s=0;s{var c=Xo(),g=bn(),P=g.pushUnique,S=!0;$.exports=function(t,e,r){var a=e._fullLayout;if(e._dragged||e._editing)return;var n=a.legend.itemclick,o=a.legend.itemdoubleclick,i=a.legend.groupclick;r===1&&n==="toggle"&&o==="toggleothers"&&S&&e.data&&e._context.showTips&&g.notifier(g._(e,"Double-click on legend to isolate one trace"),"long"),S=!1;var s;if(r===1?s=n:r===2&&(s=o),!s)return;var f=i==="togglegroup",x=a.hiddenlabels?a.hiddenlabels.slice():[],y=t.data()[0][0];if(y.groupTitle&&y.noClick)return;var v=e._fullData,T=(a.shapes||[]).filter(function(se){return se.showlegend}),u=v.concat(T),b=y.trace;b._isShape&&(b=b._fullInput);var _=b.legendgroup,C,M,E,A,h,p,k={},w=[],R=[],O=[];function N(se,Tt){var Lt=w.indexOf(se),Mt=k.visible;return Mt||(Mt=k.visible=[]),w.indexOf(se)===-1&&(w.push(se),Lt=w.length-1),Mt[Lt]=Tt,Lt}var V=(a.shapes||[]).map(function(se){return se._input}),H=!1;function F(se,Tt){V[se].visible=Tt,H=!0}function U(se,Tt){if(!(y.groupTitle&&!f)){var Lt=se._fullInput||se,Mt=Lt._isShape,te=Lt.index;te===void 0&&(te=Lt._index);var ve=Lt.visible===!1?!1:Tt;Mt?F(te,ve):N(te,ve)}}var W=b.legend,q=b._fullInput,X=q&&q._isShape;if(!X&&c.traceIs(b,"pie-like")){var lt=y.label,yt=x.indexOf(lt);if(s==="toggle")yt===-1?x.push(lt):x.splice(yt,1);else if(s==="toggleothers"){var pt=yt!==-1,st=[];for(C=0;C{$.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}}),vw=Ft((Q,$)=>{var c=Xo(),g=Fy();$.exports=function(P,S,t){var e=S._inHover,r=g.isGrouped(S),a=g.isReversed(S),n={},o=[],i=!1,s={},f=0,x=0,y,v;function T(U,W,q){if(S.visible!==!1&&!(t&&U!==S._id))if(W===""||!g.isGrouped(S)){var X="~~i"+f;o.push(X),n[X]=[q],f++}else o.indexOf(W)===-1?(o.push(W),i=!0,n[W]=[q]):n[W].push(q)}for(y=0;yw&&(k=w)}h[y][0]._groupMinRank=k,h[y][0]._preGroupSort=y}var R=function(U,W){return U[0]._groupMinRank-W[0]._groupMinRank||U[0]._preGroupSort-W[0]._preGroupSort},O=function(U,W){return U.trace.legendrank-W.trace.legendrank||U._preSort-W._preSort};for(h.forEach(function(U,W){U[0]._preGroupSort=W}),h.sort(R),y=0;y{var $=bn();function c(g){return g.indexOf("e")!==-1?g.replace(/[.]?0+e/,"e"):g.indexOf(".")!==-1?g.replace(/[.]?0+$/,""):g}Q.formatPiePercent=function(g,P){var S=c((g*100).toPrecision(3));return $.numSeparate(S,P)+"%"},Q.formatPieValue=function(g,P){var S=c(g.toPrecision(10));return $.numSeparate(S,P)},Q.getFirstFilled=function(g,P){if($.isArrayOrTypedArray(g))for(var S=0;S{var c=js(),g=li();$.exports=function(P,S,t,e){var r=t.marker.pattern;r&&r.shape?c.pointStyle(P,t,e,S):g.fill(P,S.color)}}),_g=Ft((Q,$)=>{var c=li(),g=xg().castOption,P=p6();$.exports=function(S,t,e,r){var a=e.marker.line,n=g(a.color,t.pts)||c.defaultLine,o=g(a.width,t.pts)||0;S.call(P,t,e,r).style("stroke-width",o).call(c.stroke,n)}}),yw=Ft((Q,$)=>{var c=un(),g=Xo(),P=bn(),S=P.strTranslate,t=js(),e=li(),r=Hd().extractOpts,a=Ac(),n=_g(),o=xg().castOption,i=z_(),s=12,f=5,x=2,y=10,v=5;$.exports=function(_,C,M){var E=C._fullLayout;M||(M=E.legend);var A=M.itemsizing==="constant",h=M.itemwidth,p=(h+i.itemGap*2)/2,k=S(p,0),w=function(st,tt,dt,rt){var at;if(st+1)at=st;else if(tt&&tt.width>0)at=tt.width;else return 0;return A?rt:Math.min(at,dt)};_.each(function(st){var tt=c.select(this),dt=P.ensureSingle(tt,"g","layers");dt.style("opacity",st[0].trace.opacity);var rt=M.indentation,at=M.valign,vt=st[0].lineHeight,it=st[0].height;if(at==="middle"&&rt===0||!vt||!it)dt.attr("transform",null);else{var Y={top:1,bottom:-1}[at],ft=Y*(.5*(vt-it+3))||0,ut=M.indentation;dt.attr("transform",S(ut,ft))}var wt=dt.selectAll("g.legendfill").data([st]);wt.enter().append("g").classed("legendfill",!0);var zt=dt.selectAll("g.legendlines").data([st]);zt.enter().append("g").classed("legendlines",!0);var Pt=dt.selectAll("g.legendsymbols").data([st]);Pt.enter().append("g").classed("legendsymbols",!0),Pt.selectAll("g.legendpoints").data([st]).enter().append("g").classed("legendpoints",!0)}).each(pt).each(N).each(H).each(V).each(U).each(lt).each(X).each(R).each(O).each(W).each(q);function R(st){var tt=u(st),dt=tt.showFill,rt=tt.showLine,at=tt.showGradientLine,vt=tt.showGradientFill,it=tt.anyFill,Y=tt.anyLine,ft=st[0],ut=ft.trace,wt,zt,Pt=r(ut),Wt=Pt.colorscale,Ht=Pt.reversescale,Jt=function(Mt){if(Mt.size())if(dt)t.fillGroupStyle(Mt,C,!0);else{var te="legendfill-"+ut.uid;t.gradient(Mt,C,te,T(Ht),Wt,"fill")}},ge=function(Mt){if(Mt.size()){var te="legendline-"+ut.uid;t.lineGroupStyle(Mt),t.gradient(Mt,C,te,T(Ht),Wt,"stroke")}},he=a.hasMarkers(ut)||!it?"M5,0":Y?"M5,-2":"M5,-3",de=c.select(this),se=de.select(".legendfill").selectAll("path").data(dt||vt?[st]:[]);if(se.enter().append("path").classed("js-fill",!0),se.exit().remove(),se.attr("d",he+"h"+h+"v6h-"+h+"z").call(Jt),rt||at){var Tt=w(void 0,ut.line,y,f);zt=P.minExtend(ut,{line:{width:Tt}}),wt=[P.minExtend(ft,{trace:zt})]}var Lt=de.select(".legendlines").selectAll("path").data(rt||at?[wt]:[]);Lt.enter().append("path").classed("js-line",!0),Lt.exit().remove(),Lt.attr("d",he+(at?"l"+h+",0.0001":"h"+h)).call(rt?t.lineGroupStyle:ge)}function O(st){var tt=u(st),dt=tt.anyFill,rt=tt.anyLine,at=tt.showLine,vt=tt.showMarker,it=st[0],Y=it.trace,ft=!vt&&!rt&&!dt&&a.hasText(Y),ut,wt;function zt(se,Tt,Lt,Mt){var te=P.nestedProperty(Y,se).get(),ve=P.isArrayOrTypedArray(te)&&Tt?Tt(te):te;if(A&&ve&&Mt!==void 0&&(ve=Mt),Lt){if(veLt[1])return Lt[1]}return ve}function Pt(se){return it._distinct&&it.index&&se[it.index]?se[it.index]:se[0]}if(vt||ft||at){var Wt={},Ht={};if(vt){Wt.mc=zt("marker.color",Pt),Wt.mx=zt("marker.symbol",Pt),Wt.mo=zt("marker.opacity",P.mean,[.2,1]),Wt.mlc=zt("marker.line.color",Pt),Wt.mlw=zt("marker.line.width",P.mean,[0,5],x),Ht.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Jt=zt("marker.size",P.mean,[2,16],s);Wt.ms=Jt,Ht.marker.size=Jt}at&&(Ht.line={width:zt("line.width",Pt,[0,10],f)}),ft&&(Wt.tx="Aa",Wt.tp=zt("textposition",Pt),Wt.ts=10,Wt.tc=zt("textfont.color",Pt),Wt.tf=zt("textfont.family",Pt),Wt.tw=zt("textfont.weight",Pt),Wt.ty=zt("textfont.style",Pt),Wt.tv=zt("textfont.variant",Pt),Wt.tC=zt("textfont.textcase",Pt),Wt.tE=zt("textfont.lineposition",Pt),Wt.tS=zt("textfont.shadow",Pt)),ut=[P.minExtend(it,Wt)],wt=P.minExtend(Y,Ht),wt.selectedpoints=null,wt.texttemplate=null}var ge=c.select(this).select("g.legendpoints"),he=ge.selectAll("path.scatterpts").data(vt?ut:[]);he.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",k),he.exit().remove(),he.call(t.pointStyle,wt,C),vt&&(ut[0].mrc=3);var de=ge.selectAll("g.pointtext").data(ft?ut:[]);de.enter().append("g").classed("pointtext",!0).append("text").attr("transform",k),de.exit().remove(),de.selectAll("text").call(t.textPointStyle,wt,C)}function N(st){var tt=st[0].trace,dt=tt.type==="waterfall";if(st[0]._distinct&&dt){var rt=st[0].trace[st[0].dir].marker;return st[0].mc=rt.color,st[0].mlw=rt.line.width,st[0].mlc=rt.line.color,F(st,this,"waterfall")}var at=[];tt.visible&&dt&&(at=st[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var vt=c.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(at);vt.enter().append("path").classed("legendwaterfall",!0).attr("transform",k).style("stroke-miterlimit",1),vt.exit().remove(),vt.each(function(it){var Y=c.select(this),ft=tt[it[0]].marker,ut=w(void 0,ft.line,v,x);Y.attr("d",it[1]).style("stroke-width",ut+"px").call(e.fill,ft.color),ut&&Y.call(e.stroke,ft.line.color)})}function V(st){F(st,this)}function H(st){F(st,this,"funnel")}function F(st,tt,dt){var rt=st[0].trace,at=rt.marker||{},vt=at.line||{},it=at.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",Y=dt?rt.visible&&rt.type===dt:g.traceIs(rt,"bar"),ft=c.select(tt).select("g.legendpoints").selectAll("path.legend"+dt).data(Y?[st]:[]);ft.enter().append("path").classed("legend"+dt,!0).attr("d",it).attr("transform",k),ft.exit().remove(),ft.each(function(ut){var wt=c.select(this),zt=ut[0],Pt=w(zt.mlw,at.line,v,x);wt.style("stroke-width",Pt+"px");var Wt=zt.mcc;if(!M._inHover&&"mc"in zt){var Ht=r(at),Jt=Ht.mid;Jt===void 0&&(Jt=(Ht.max+Ht.min)/2),Wt=t.tryColorscale(at,"")(Jt)}var ge=Wt||zt.mc||at.color,he=at.pattern,de=t.getPatternAttr,se=he&&(de(he.shape,0,"")||de(he.path,0,""));if(se){var Tt=de(he.bgcolor,0,null),Lt=de(he.fgcolor,0,null),Mt=he.fgopacity,te=b(he.size,8,10),ve=b(he.solidity,.5,1),oe="legend-"+rt.uid;wt.call(t.pattern,"legend",C,oe,se,te,ve,Wt,he.fillmode,Tt,Lt,Mt)}else wt.call(e.fill,ge);Pt&&e.stroke(wt,zt.mlc||vt.color)})}function U(st){var tt=st[0].trace,dt=c.select(this).select("g.legendpoints").selectAll("path.legendbox").data(tt.visible&&g.traceIs(tt,"box-violin")?[st]:[]);dt.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",k),dt.exit().remove(),dt.each(function(){var rt=c.select(this);if((tt.boxpoints==="all"||tt.points==="all")&&e.opacity(tt.fillcolor)===0&&e.opacity((tt.line||{}).color)===0){var at=P.minExtend(tt,{marker:{size:A?s:P.constrain(tt.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});dt.call(t.pointStyle,at,C)}else{var vt=w(void 0,tt.line,v,x);rt.style("stroke-width",vt+"px").call(e.fill,tt.fillcolor),vt&&e.stroke(rt,tt.line.color)}})}function W(st){var tt=st[0].trace,dt=c.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(tt.visible&&tt.type==="candlestick"?[st,st]:[]);dt.enter().append("path").classed("legendcandle",!0).attr("d",function(rt,at){return at?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",k).style("stroke-miterlimit",1),dt.exit().remove(),dt.each(function(rt,at){var vt=c.select(this),it=tt[at?"increasing":"decreasing"],Y=w(void 0,it.line,v,x);vt.style("stroke-width",Y+"px").call(e.fill,it.fillcolor),Y&&e.stroke(vt,it.line.color)})}function q(st){var tt=st[0].trace,dt=c.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(tt.visible&&tt.type==="ohlc"?[st,st]:[]);dt.enter().append("path").classed("legendohlc",!0).attr("d",function(rt,at){return at?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",k).style("stroke-miterlimit",1),dt.exit().remove(),dt.each(function(rt,at){var vt=c.select(this),it=tt[at?"increasing":"decreasing"],Y=w(void 0,it.line,v,x);vt.style("fill","none").call(t.dashLine,it.line.dash,Y),Y&&e.stroke(vt,it.line.color)})}function X(st){yt(st,this,"pie")}function lt(st){yt(st,this,"funnelarea")}function yt(st,tt,dt){var rt=st[0],at=rt.trace,vt=dt?at.visible&&at.type===dt:g.traceIs(at,dt),it=c.select(tt).select("g.legendpoints").selectAll("path.legend"+dt).data(vt?[st]:[]);if(it.enter().append("path").classed("legend"+dt,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",k),it.exit().remove(),it.size()){var Y=at.marker||{},ft=w(o(Y.line.width,rt.pts),Y.line,v,x),ut="pieLike",wt=P.minExtend(at,{marker:{line:{width:ft}}},ut),zt=P.minExtend(rt,{trace:wt},ut);n(it,zt,wt,C)}}function pt(st){var tt=st[0].trace,dt,rt=[];if(tt.visible)switch(tt.type){case"histogram2d":case"heatmap":rt=[["M-15,-2V4H15V-2Z"]],dt=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":rt=[["M-6,-6V6H6V-6Z"]],dt=!0;break;case"densitymapbox":case"densitymap":rt=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],dt="radial";break;case"cone":rt=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],dt=!1;break;case"streamtube":rt=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],dt=!1;break;case"surface":rt=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],dt=!0;break;case"mesh3d":rt=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],dt=!1;break;case"volume":rt=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],dt=!0;break;case"isosurface":rt=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],dt=!1;break}var at=c.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(rt);at.enter().append("path").classed("legend3dandfriends",!0).attr("transform",k).style("stroke-miterlimit",1),at.exit().remove(),at.each(function(vt,it){var Y=c.select(this),ft=r(tt),ut=ft.colorscale,wt=ft.reversescale,zt=function(Jt){if(Jt.size()){var ge="legendfill-"+tt.uid;t.gradient(Jt,C,ge,T(wt,dt==="radial"),ut,"fill")}},Pt;if(ut){if(!dt){var Wt=ut.length;Pt=it===0?ut[wt?Wt-1:0][1]:it===1?ut[wt?0:Wt-1][1]:ut[Math.floor((Wt-1)/2)][1]}}else{var Ht=tt.vertexcolor||tt.facecolor||tt.color;Pt=P.isArrayOrTypedArray(Ht)?Ht[it]||Ht[0]:Ht}Y.attr("d",vt[0]),Pt?Y.call(e.fill,Pt):Y.call(zt)})}};function T(_,C){var M=C?"radial":"horizontal";return M+(_?"":"reversed")}function u(_){var C=_[0].trace,M=C.contours,E=a.hasLines(C),A=a.hasMarkers(C),h=C.visible&&C.fill&&C.fill!=="none",p=!1,k=!1;if(M){var w=M.coloring;w==="lines"?p=!0:E=w==="none"||w==="heatmap"||M.showlines,M.type==="constraint"?h=M._operation!=="=":(w==="fill"||w==="heatmap")&&(k=!0)}return{showMarker:A,showLine:E,showFill:h,showGradientLine:p,showGradientFill:k,anyLine:E||p,anyFill:h||k}}function b(_,C,M){return _&&P.isArrayOrTypedArray(_)?C:_>M?M:_}}),I_=Ft((Q,$)=>{var c=un(),g=bn(),P=Kc(),S=Xo(),t=Om(),e=up(),r=js(),a=li(),n=tc(),o=d6(),i=z_(),s=Af(),f=s.LINE_SPACING,x=s.FROM_TL,y=s.FROM_BR,v=vw(),T=yw(),u=Fy(),b=1,_=/^legend[0-9]*$/;$.exports=function(W,q){if(q)M(W,q);else{var X=W._fullLayout,lt=X._legends,yt=X._infolayer.selectAll('[class^="legend"]');yt.each(function(){var dt=c.select(this),rt=dt.attr("class"),at=rt.split(" ")[0];at.match(_)&<.indexOf(at)===-1&&dt.remove()});for(var pt=0;pt1)}var ft=lt.hiddenlabels||[];if(!tt&&(!lt.showlegend||!dt.length))return st.selectAll("."+yt).remove(),lt._topdefs.select("#"+pt).remove(),P.autoMargin(W,yt);var ut=g.ensureSingle(st,"g",yt,function(de){tt||de.attr("pointer-events","all")}),wt=g.ensureSingleById(lt._topdefs,"clipPath",pt,function(de){de.append("rect")}),zt=g.ensureSingle(ut,"rect","bg",function(de){de.attr("shape-rendering","crispEdges")});zt.call(a.stroke,X.bordercolor).call(a.fill,X.bgcolor).style("stroke-width",X.borderwidth+"px");var Pt=g.ensureSingle(ut,"g","scrollbox"),Wt=X.title;X._titleWidth=0,X._titleHeight=0;var Ht;Wt.text?(Ht=g.ensureSingle(Pt,"text",yt+"titletext"),Ht.attr("text-anchor","start").call(r.font,Wt.font).text(Wt.text),w(Ht,Pt,W,X,b)):Pt.selectAll("."+yt+"titletext").remove();var Jt=g.ensureSingle(ut,"rect","scrollbar",function(de){de.attr(i.scrollBarEnterAttrs).call(a.fill,i.scrollBarColor)}),ge=Pt.selectAll("g.groups").data(dt);ge.enter().append("g").attr("class","groups"),ge.exit().remove();var he=ge.selectAll("g.traces").data(g.identity);he.enter().append("g").attr("class","traces"),he.exit().remove(),he.style("opacity",function(de){var se=de[0].trace;return S.traceIs(se,"pie-like")?ft.indexOf(de[0].label)!==-1?.5:1:se.visible==="legendonly"?.5:1}).each(function(){c.select(this).call(h,W,X)}).call(T,W,X).each(function(){tt||c.select(this).call(k,W,yt)}),g.syncOrAsync([P.previousPromises,function(){return N(W,ge,he,X)},function(){var de=lt._size,se=X.borderwidth,Tt=X.xref==="paper",Lt=X.yref==="paper";if(Wt.text&&C(Ht,X,se),!tt){var Mt,te;Tt?Mt=de.l+de.w*X.x-x[H(X)]*X._width:Mt=lt.width*X.x-x[H(X)]*X._width,Lt?te=de.t+de.h*(1-X.y)-x[F(X)]*X._effHeight:te=lt.height*(1-X.y)-x[F(X)]*X._effHeight;var ve=V(W,yt,Mt,te);if(ve)return;if(lt.margin.autoexpand){var oe=Mt,Te=te;Mt=Tt?g.constrain(Mt,0,lt.width-X._width):oe,te=Lt?g.constrain(te,0,lt.height-X._effHeight):Te,Mt!==oe&&g.log("Constrain "+yt+".x to make legend fit inside graph"),te!==Te&&g.log("Constrain "+yt+".y to make legend fit inside graph")}r.setTranslate(ut,Mt,te)}if(Jt.on(".drag",null),ut.on("wheel",null),tt||X._height<=X._maxHeight||W._context.staticPlot){var He=X._effHeight;tt&&(He=X._height),zt.attr({width:X._width-se,height:He-se,x:se/2,y:se/2}),r.setTranslate(Pt,0,0),wt.select("rect").attr({width:X._width-2*se,height:He-2*se,x:se,y:se}),r.setClipUrl(Pt,pt,W),r.setRect(Jt,0,0,0,0),delete X._scrollY}else{var Ge=Math.max(i.scrollBarMinHeight,X._effHeight*X._effHeight/X._height),cr=X._effHeight-Ge-2*i.scrollBarMargin,ur=X._height-X._effHeight,jr=cr/ur,Hr=Math.min(X._scrollY||0,ur);zt.attr({width:X._width-2*se+i.scrollBarWidth+i.scrollBarMargin,height:X._effHeight-se,x:se/2,y:se/2}),wt.select("rect").attr({width:X._width-2*se+i.scrollBarWidth+i.scrollBarMargin,height:X._effHeight-2*se,x:se,y:se+Hr}),r.setClipUrl(Pt,pt,W),gt(Hr,Ge,jr),ut.on("wheel",function(){Hr=g.constrain(X._scrollY+c.event.deltaY/ur*cr,0,ur),gt(Hr,Ge,jr),Hr!==0&&Hr!==ur&&c.event.preventDefault()});var br,Kr,rn,Ce=function(we,Ue,qe){var ar=(qe-Ue)/jr+we;return g.constrain(ar,0,ur)},$t=function(we,Ue,qe){var ar=(Ue-qe)/jr+we;return g.constrain(ar,0,ur)},ne=c.behavior.drag().on("dragstart",function(){var we=c.event.sourceEvent;we.type==="touchstart"?br=we.changedTouches[0].clientY:br=we.clientY,rn=Hr}).on("drag",function(){var we=c.event.sourceEvent;we.buttons===2||we.ctrlKey||(we.type==="touchmove"?Kr=we.changedTouches[0].clientY:Kr=we.clientY,Hr=Ce(rn,br,Kr),gt(Hr,Ge,jr))});Jt.call(ne);var Ct=c.behavior.drag().on("dragstart",function(){var we=c.event.sourceEvent;we.type==="touchstart"&&(br=we.changedTouches[0].clientY,rn=Hr)}).on("drag",function(){var we=c.event.sourceEvent;we.type==="touchmove"&&(Kr=we.changedTouches[0].clientY,Hr=$t(rn,br,Kr),gt(Hr,Ge,jr))});Pt.call(Ct)}function gt(we,Ue,qe){X._scrollY=W._fullLayout[yt]._scrollY=we,r.setTranslate(Pt,0,-we),r.setRect(Jt,X._width,i.scrollBarMargin+we*qe,i.scrollBarWidth,Ue),wt.select("rect").attr("y",se+we)}if(W._context.edits.legendPosition){var St,Nt,ee,le;ut.classed("cursor-move",!0),e.init({element:ut.node(),gd:W,prepFn:function(we){if(we.target!==Jt.node()){var Ue=r.getTranslate(ut);ee=Ue.x,le=Ue.y}},moveFn:function(we,Ue){if(ee!==void 0&&le!==void 0){var qe=ee+we,ar=le+Ue;r.setTranslate(ut,qe,ar),St=e.align(qe,X._width,de.l,de.l+de.w,X.xanchor),Nt=e.align(ar+X._height,-X._height,de.t+de.h,de.t,X.yanchor)}},doneFn:function(){if(St!==void 0&&Nt!==void 0){var we={};we[yt+".x"]=St,we[yt+".y"]=Nt,S.call("_guiRelayout",W,we)}},clickFn:function(we,Ue){var qe=st.selectAll("g.traces").filter(function(){var ar=this.getBoundingClientRect();return Ue.clientX>=ar.left&&Ue.clientX<=ar.right&&Ue.clientY>=ar.top&&Ue.clientY<=ar.bottom});qe.size()>0&&A(W,ut,qe,we,Ue)}})}}],W)}}function E(W,q,X){var lt=W[0],yt=lt.width,pt=q.entrywidthmode,st=lt.trace.legendwidth||q.entrywidth;return pt==="fraction"?q._maxWidth*st:X+(st||yt)}function A(W,q,X,lt,yt){var pt=X.data()[0][0].trace,st={event:yt,node:X.node(),curveNumber:pt.index,expandedIndex:pt.index,data:W.data,layout:W.layout,frames:W._transitionData._frames,config:W._context,fullData:W._fullData,fullLayout:W._fullLayout};pt._group&&(st.group=pt._group),S.traceIs(pt,"pie-like")&&(st.label=X.datum()[0].label);var tt=t.triggerHandler(W,"plotly_legendclick",st);if(lt===1){if(tt===!1)return;q._clickTimeout=setTimeout(function(){W._fullLayout&&o(X,W,lt)},W._context.doubleClickDelay)}else if(lt===2){q._clickTimeout&&clearTimeout(q._clickTimeout),W._legendMouseDownTime=0;var dt=t.triggerHandler(W,"plotly_legenddoubleclick",st);dt!==!1&&tt!==!1&&o(X,W,lt)}}function h(W,q,X){var lt=U(X),yt=W.data()[0][0],pt=yt.trace,st=S.traceIs(pt,"pie-like"),tt=!X._inHover&&q._context.edits.legendText&&!st,dt=X._maxNameLength,rt,at;yt.groupTitle?(rt=yt.groupTitle.text,at=yt.groupTitle.font):(at=X.font,X.entries?rt=yt.text:(rt=st?yt.label:pt.name,pt._meta&&(rt=g.templateString(rt,pt._meta))));var vt=g.ensureSingle(W,"text",lt+"text");vt.attr("text-anchor","start").call(r.font,at).text(tt?p(rt,dt):rt);var it=X.indentation+X.itemwidth+i.itemGap*2;n.positionText(vt,it,0),tt?vt.call(n.makeEditable,{gd:q,text:rt}).call(w,W,q,X).on("edit",function(Y){this.text(p(Y,dt)).call(w,W,q,X);var ft=yt.trace._fullInput||{},ut={};return ut.name=Y,ft._isShape?S.call("_guiRelayout",q,"shapes["+pt.index+"].name",ut.name):S.call("_guiRestyle",q,ut,pt.index)}):w(vt,W,q,X)}function p(W,q){var X=Math.max(4,q);if(W&&W.trim().length>=X/2)return W;W=W||"";for(var lt=X-W.length;lt>0;lt--)W+=" ";return W}function k(W,q,X){var lt=q._context.doubleClickDelay,yt,pt=1,st=g.ensureSingle(W,"rect",X+"toggle",function(tt){q._context.staticPlot||tt.style("cursor","pointer").attr("pointer-events","all"),tt.call(a.fill,"rgba(0,0,0,0)")});q._context.staticPlot||(st.on("mousedown",function(){yt=new Date().getTime(),yt-q._legendMouseDownTimelt&&(pt=Math.max(pt-1,1)),A(q,tt,W,pt,c.event)}}))}function w(W,q,X,lt,yt){lt._inHover&&W.attr("data-notex",!0),n.convertToTspans(W,X,function(){R(q,X,lt,yt)})}function R(W,q,X,lt){var yt=W.data()[0][0];if(!X._inHover&&yt&&!yt.trace.showlegend){W.remove();return}var pt=W.select("g[class*=math-group]"),st=pt.node(),tt=U(X);X||(X=q._fullLayout[tt]);var dt=X.borderwidth,rt;lt===b?rt=X.title.font:yt.groupTitle?rt=yt.groupTitle.font:rt=X.font;var at=rt.size*f,vt,it;if(st){var Y=r.bBox(st);vt=Y.height,it=Y.width,lt===b?r.setTranslate(pt,dt,dt+vt*.75):r.setTranslate(pt,0,vt*.25)}else{var ft="."+tt+(lt===b?"title":"")+"text",ut=W.select(ft),wt=n.lineCount(ut),zt=ut.node();if(vt=at*wt,it=zt?r.bBox(zt).width:0,lt===b)X.title.side==="left"&&(it+=i.itemGap*2),n.positionText(ut,dt+i.titlePad,dt+at);else{var Pt=i.itemGap*2+X.indentation+X.itemwidth;yt.groupTitle&&(Pt=i.itemGap,it-=X.indentation+X.itemwidth),n.positionText(ut,Pt,-at*((wt-1)/2-.3))}}lt===b?(X._titleWidth=it,X._titleHeight=vt):(yt.lineHeight=at,yt.height=Math.max(vt,16)+3,yt.width=it)}function O(W){var q=0,X=0,lt=W.title.side;return lt&&(lt.indexOf("left")!==-1&&(q=W._titleWidth),lt.indexOf("top")!==-1&&(X=W._titleHeight)),[q,X]}function N(W,q,X,lt){var yt=W._fullLayout,pt=U(lt);lt||(lt=yt[pt]);var st=yt._size,tt=u.isVertical(lt),dt=u.isGrouped(lt),rt=lt.entrywidthmode==="fraction",at=lt.borderwidth,vt=2*at,it=i.itemGap,Y=lt.indentation+lt.itemwidth+it*2,ft=2*(at+it),ut=F(lt),wt=lt.y<0||lt.y===0&&ut==="top",zt=lt.y>1||lt.y===1&&ut==="bottom",Pt=lt.tracegroupgap,Wt={};let{orientation:Ht,yref:Jt}=lt,{maxheight:ge}=lt,he=wt||zt||Ht!=="v"||Jt!=="paper";ge||(ge=he?.5:1);let de=he?yt.height:st.h;lt._maxHeight=Math.max(ge>1?ge:ge*de,30);var se=0;lt._width=0,lt._height=0;var Tt=O(lt);if(tt)X.each(function(gt){var St=gt[0].height;r.setTranslate(this,at+Tt[0],at+Tt[1]+lt._height+St/2+it),lt._height+=St,lt._width=Math.max(lt._width,gt[0].width)}),se=Y+lt._width,lt._width+=it+Y+vt,lt._height+=ft,dt&&(q.each(function(gt,St){r.setTranslate(this,0,St*lt.tracegroupgap)}),lt._height+=(lt._lgroupsLength-1)*lt.tracegroupgap);else{var Lt=H(lt),Mt=lt.x<0||lt.x===0&&Lt==="right",te=lt.x>1||lt.x===1&&Lt==="left",ve=zt||wt,oe=yt.width/2;lt._maxWidth=Math.max(Mt?ve&&Lt==="left"?st.l+st.w:oe:te?ve&&Lt==="right"?st.r+st.w:oe:st.w,2*Y);var Te=0,He=0;X.each(function(gt){var St=E(gt,lt,Y);Te=Math.max(Te,St),He+=St}),se=null;var Ge=0;if(dt){var cr=0,ur=0,jr=0;q.each(function(){var gt=0,St=0;c.select(this).selectAll("g.traces").each(function(ee){var le=E(ee,lt,Y),we=ee[0].height;r.setTranslate(this,Tt[0],Tt[1]+at+it+we/2+St),St+=we,gt=Math.max(gt,le),Wt[ee[0].trace.legendgroup]=gt});var Nt=gt+it;ur>0&&Nt+at+ur>lt._maxWidth?(Ge=Math.max(Ge,ur),ur=0,jr+=cr+Pt,cr=St):cr=Math.max(cr,St),r.setTranslate(this,ur,jr),ur+=Nt}),lt._width=Math.max(Ge,ur)+at,lt._height=jr+cr+ft}else{var Hr=X.size(),br=He+vt+(Hr-1)*it=lt._maxWidth&&(Ge=Math.max(Ge,$t),rn=0,Ce+=Kr,lt._height+=Kr,Kr=0),r.setTranslate(this,Tt[0]+at+rn,Tt[1]+at+Ce+St/2+it),$t=rn+Nt+it,rn+=ee,Kr=Math.max(Kr,St)}),br?(lt._width=rn+vt,lt._height=Kr+ft):(lt._width=Math.max(Ge,$t)+vt,lt._height+=Kr+ft)}}lt._width=Math.ceil(Math.max(lt._width+Tt[0],lt._titleWidth+2*(at+i.titlePad))),lt._height=Math.ceil(Math.max(lt._height+Tt[1],lt._titleHeight+2*(at+i.itemGap))),lt._effHeight=Math.min(lt._height,lt._maxHeight);var ne=W._context.edits,Ct=ne.legendText||ne.legendPosition;X.each(function(gt){var St=c.select(this).select("."+pt+"toggle"),Nt=gt[0].height,ee=gt[0].trace.legendgroup,le=E(gt,lt,Y);dt&&ee!==""&&(le=Wt[ee]);var we=Ct?Y:se||le;!tt&&!rt&&(we+=it/2),r.setRect(St,0,-Nt/2,we,Nt)})}function V(W,q,X,lt){var yt=W._fullLayout,pt=yt[q],st=H(pt),tt=F(pt),dt=pt.xref==="paper",rt=pt.yref==="paper";W._fullLayout._reservedMargin[q]={};var at=pt.y<.5?"b":"t",vt=pt.x<.5?"l":"r",it={r:yt.width-X,l:X+pt._width,b:yt.height-lt,t:lt+pt._effHeight};if(dt&&rt)return P.autoMargin(W,q,{x:pt.x,y:pt.y,l:pt._width*x[st],r:pt._width*y[st],b:pt._effHeight*y[tt],t:pt._effHeight*x[tt]});dt?W._fullLayout._reservedMargin[q][at]=it[at]:rt||pt.orientation==="v"?W._fullLayout._reservedMargin[q][vt]=it[vt]:W._fullLayout._reservedMargin[q][at]=it[at]}function H(W){return g.isRightAnchor(W)?"right":g.isCenterAnchor(W)?"center":"left"}function F(W){return g.isBottomAnchor(W)?"bottom":g.isMiddleAnchor(W)?"middle":"top"}function U(W){return W._id||"legend"}}),O_=Ft(Q=>{var $=un(),c=ra(),g=fo(),P=bn(),S=P.pushUnique,t=P.strTranslate,e=P.strRotate,r=Om(),a=tc(),n=Fm(),o=js(),i=li(),s=up(),f=Es(),x=ic().zindexSeparator,y=Xo(),v=Dp(),T=go(),u=Ry(),b=I_(),_=T.YANGLE,C=Math.PI*_/180,M=1/Math.sin(C),E=Math.cos(C),A=Math.sin(C),h=T.HOVERARROWSIZE,p=T.HOVERTEXTPAD,k={box:!0,ohlc:!0,violin:!0,candlestick:!0},w={scatter:!0,scattergl:!0,splom:!0};function R(Y,ft){return Y.distance-ft.distance}Q.hover=function(Y,ft,ut,wt){Y=P.getGraphDiv(Y);var zt=ft.target;P.throttle(Y._fullLayout._uid+T.HOVERID,T.HOVERMINTIME,function(){O(Y,ft,ut,wt,zt)})},Q.loneHover=function(Y,ft){var ut=!0;Array.isArray(Y)||(ut=!1,Y=[Y]);var wt=ft.gd,zt=at(wt),Pt=vt(wt),Wt=Y.map(function(Mt){var te=Mt._x0||Mt.x0||Mt.x||0,ve=Mt._x1||Mt.x1||Mt.x||0,oe=Mt._y0||Mt.y0||Mt.y||0,Te=Mt._y1||Mt.y1||Mt.y||0,He=Mt.eventData;if(He){var Ge=Math.min(te,ve),cr=Math.max(te,ve),ur=Math.min(oe,Te),jr=Math.max(oe,Te),Hr=Mt.trace;if(y.traceIs(Hr,"gl3d")){var br=wt._fullLayout[Hr.scene]._scene.container,Kr=br.offsetLeft,rn=br.offsetTop;Ge+=Kr,cr+=Kr,ur+=rn,jr+=rn}He.bbox={x0:Ge+Pt,x1:cr+Pt,y0:ur+zt,y1:jr+zt},ft.inOut_bbox&&ft.inOut_bbox.push(He.bbox)}else He=!1;return{color:Mt.color||i.defaultLine,x0:Mt.x0||Mt.x||0,x1:Mt.x1||Mt.x||0,y0:Mt.y0||Mt.y||0,y1:Mt.y1||Mt.y||0,xLabel:Mt.xLabel,yLabel:Mt.yLabel,zLabel:Mt.zLabel,text:Mt.text,name:Mt.name,idealAlign:Mt.idealAlign,borderColor:Mt.borderColor,fontFamily:Mt.fontFamily,fontSize:Mt.fontSize,fontColor:Mt.fontColor,fontWeight:Mt.fontWeight,fontStyle:Mt.fontStyle,fontVariant:Mt.fontVariant,nameLength:Mt.nameLength,textAlign:Mt.textAlign,trace:Mt.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Mt.hovertemplate||!1,hovertemplateLabels:Mt.hovertemplateLabels||!1,eventData:He}}),Ht=!1,Jt=H(Wt,{gd:wt,hovermode:"closest",rotateLabels:Ht,bgColor:ft.bgColor||i.background,container:$.select(ft.container),outerContainer:ft.outerContainer||ft.container}),ge=Jt.hoverLabels,he=5,de=0,se=0;ge.sort(function(Mt,te){return Mt.y0-te.y0}).each(function(Mt,te){var ve=Mt.y0-Mt.by/2;ve-heur[0]._length||ii<0||ii>jr[0]._length)return s.unhoverRaw(Y,ft)}if(ft.pointerX=Ci+ur[0]._offset,ft.pointerY=ii+jr[0]._offset,"xval"in ft?Ct=v.flat(Pt,ft.xval):Ct=v.p2c(ur,Ci),"yval"in ft?gt=v.flat(Pt,ft.yval):gt=v.p2c(jr,ii),!c(Ct[0])||!c(gt[0]))return P.warn("Fx.hover failed",ft,Y),s.unhoverRaw(Y,ft)}var Hi=1/0;function We(Ia,gs){for(Nt=0;Ntpr&&($t.splice(0,pr),Hi=$t[0].distance),de&&Ce!==0&&$t.length===0){Tr.distance=Ce,Tr.index=!1;var as=le._module.hoverPoints(Tr,ar,Ar,"closest",{hoverLayer:Ht._hoverlayer});if(as&&(as=as.filter(function(Co){return Co.spikeDistance<=Ce})),as&&as.length){var ul,Js=as.filter(function(Co){return Co.xa.showspikes&&Co.xa.spikesnap!=="hovered data"});if(Js.length){var Rl=Js[0];c(Rl.x0)&&c(Rl.y0)&&(ul=fr(Rl),(!Jr.vLinePoint||Jr.vLinePoint.spikeDistance>ul.spikeDistance)&&(Jr.vLinePoint=ul))}var ls=as.filter(function(Co){return Co.ya.showspikes&&Co.ya.spikesnap!=="hovered data"});if(ls.length){var Cs=ls[0];c(Cs.x0)&&c(Cs.y0)&&(ul=fr(Cs),(!Jr.hLinePoint||Jr.hLinePoint.spikeDistance>ul.spikeDistance)&&(Jr.hLinePoint=ul))}}}}}We();function rr(Ia,gs,is){for(var ll=null,Ho=1/0,Gs,as=0;asIa.trace.index===ui.trace.index):$t=[ui];var Pa=$t.length,Wa=rt("x",ui,Ht),ze=rt("y",ui,Ht);We(Wa,ze);var Pe=[],Rr={},qr=0,$r=function(Ia){var gs=k[Ia.trace.type]?N(Ia):Ia.trace.index;if(!Rr[gs])qr++,Rr[gs]=qr,Pe.push(Ia);else{var is=Rr[gs]-1,ll=Pe[is];is>0&&Math.abs(Ia.distance)Pa-1;Br--)$r($t[Br]);$t=Pe,Cn()}var Gr=Y._hoverdata,dn=[],an=at(Y),Ee=vt(Y);for(let Ia of $t){var dr=v.makeEventData(Ia,Ia.trace,Ia.cd);if(Ia.hovertemplate!==!1){var Vr=!1;Ia.cd[Ia.index]&&Ia.cd[Ia.index].ht&&(Vr=Ia.cd[Ia.index].ht),Ia.hovertemplate=Vr||Ia.trace.hovertemplate||!1}if(Ia.xa&&Ia.ya){var yn=Ia.x0+Ia.xa._offset,Fn=Ia.x1+Ia.xa._offset,Xn=Ia.y0+Ia.ya._offset,Pn=Ia.y1+Ia.ya._offset,En=Math.min(yn,Fn),Zn=Math.max(yn,Fn),Ca=Math.min(Xn,Pn),Ri=Math.max(Xn,Pn);dr.bbox={x0:En+Ee,x1:Zn+Ee,y0:Ca+an,y1:Ri+an}}Ia.eventData=[dr],dn.push(dr)}Y._hoverdata=dn;var Ja=se==="y"&&(ne.length>1||$t.length>1)||se==="closest"&&Vn&&$t.length>1,Xa=i.combine(Ht.plot_bgcolor||i.background,Ht.paper_bgcolor),Io=H($t,{gd:Y,hovermode:se,rotateLabels:Ja,bgColor:Xa,container:Ht._hoverlayer,outerContainer:Ht._paper.node(),commonLabelOpts:Ht.hoverlabel,hoverdistance:Ht.hoverdistance}),po=Io.hoverLabels;if(v.isUnifiedHover(se)||(U(po,Ja,Ht,Io.commonLabelBoundingBox),X(po,Ja,Ht._invScaleX,Ht._invScaleY)),zt&&zt.tagName){var Do=y.getComponentMethod("annotations","hasClickToShow")(Y,dn);n($.select(zt),Do?"pointer":"")}!zt||wt||!pt(Y,ft,Gr)||(Gr&&Y.emit("plotly_unhover",{event:ft,points:Gr}),Y.emit("plotly_hover",{event:ft,points:Y._hoverdata,xaxes:ur,yaxes:jr,xvals:Ct,yvals:gt}))}function N(Y){return[Y.trace.index,Y.index,Y.x0,Y.y0,Y.name,Y.attr,Y.xa?Y.xa._id:"",Y.ya?Y.ya._id:""].join(",")}var V=/([\s\S]*)<\/extra>/;function H(Y,ft){var ut=ft.gd,wt=ut._fullLayout,zt=ft.hovermode,Pt=ft.rotateLabels,Wt=ft.bgColor,Ht=ft.container,Jt=ft.outerContainer,ge=ft.commonLabelOpts||{};if(Y.length===0)return[[]];var he=ft.fontFamily||T.HOVERFONT,de=ft.fontSize||T.HOVERFONTSIZE,se=ft.fontWeight||wt.font.weight,Tt=ft.fontStyle||wt.font.style,Lt=ft.fontVariant||wt.font.variant,Mt=ft.fontTextcase||wt.font.textcase,te=ft.fontLineposition||wt.font.lineposition,ve=ft.fontShadow||wt.font.shadow,oe=Y[0],Te=oe.xa,He=oe.ya,Ge=zt.charAt(0),cr=Ge+"Label",ur=oe[cr];if(ur===void 0&&Te.type==="multicategory")for(var jr=0;jrwt.width-Ee&&(dr=wt.width-Ee),Pa.attr("d","M"+(Gr-dr)+",0L"+(Gr-dr+h)+","+an+h+"H"+Ee+"v"+an+(p*2+Br.height)+"H"+-Ee+"V"+an+h+"H"+(Gr-dr-h)+"Z"),Gr=dr,Nt.minX=Gr-Ee,Nt.maxX=Gr+Ee,Te.side==="top"?(Nt.minY=dn-(p*2+Br.height),Nt.maxY=dn-p):(Nt.minY=dn+p,Nt.maxY=dn+(p*2+Br.height))}else{var Vr,yn,Fn;He.side==="right"?(Vr="start",yn=1,Fn="",Gr=Te._offset+Te._length):(Vr="end",yn=-1,Fn="-",Gr=Te._offset),dn=He._offset+(oe.y0+oe.y1)/2,Wa.attr("text-anchor",Vr),Pa.attr("d","M0,0L"+Fn+h+","+h+"V"+(p+Br.height/2)+"h"+Fn+(p*2+Br.width)+"V-"+(p+Br.height/2)+"H"+Fn+h+"V-"+h+"Z"),Nt.minY=dn-(p+Br.height/2),Nt.maxY=dn+(p+Br.height/2),He.side==="right"?(Nt.minX=Gr+h,Nt.maxX=Gr+h+(p*2+Br.width)):(Nt.minX=Gr-h-(p*2+Br.width),Nt.maxX=Gr-h);var Xn=Br.height/2,Pn=br-Br.top-Xn,En="clip"+wt._uid+"commonlabel"+He._id,Zn;if(GrPa.hoverinfo!=="none");if(ui.length===0)return[];var ee=wt.hoverlabel,le=ee.font,we=ui[0],Ue=((zt==="x unified"?we.xa:we.ya).unifiedhovertitle||{}).text,qe=Ue?P.hovertemplateString({data:zt==="x unified"?[{xa:we.xa,x:we.xVal}]:[{ya:we.ya,y:we.yVal}],fallback:we.trace.hovertemplatefallback,locale:wt._d3locale,template:Ue}):ur,ar={showlegend:!0,legend:{title:{text:qe,font:le},font:le,bgcolor:ee.bgcolor,bordercolor:ee.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:wt.legend?wt.legend.traceorder:void 0,orientation:"v"}},Ar={font:le};u(ar,Ar,ut._fullData);var Tr=Ar.legend;Tr.entries=[];for(var pr=0;pr=0?Pi=wn:Mn+oa=0?Pi=Mn:ci+oa=0?Di=Qr:Cn+Hi=0?Di=Cn:xi+Hi=0,(ui.idealAlign==="top"||!Ja)&&Xa?(Fn-=Pn/2,ui.anchor="end"):Ja?(Fn+=Pn/2,ui.anchor="start"):ui.anchor="middle",ui.crossPos=Fn;else{if(ui.pos=Fn,Ja=yn+Xn/2+Ri<=Kr,Xa=yn-Xn/2-Ri>=0,(ui.idealAlign==="left"||!Ja)&&Xa)yn-=Xn/2,ui.anchor="end";else if(Ja)yn+=Xn/2,ui.anchor="start";else{ui.anchor="middle";var Io=Ri/2,po=yn+Io-Kr,Do=yn-Io;po>0&&(yn-=po),Do<0&&(yn+=-Do)}ui.crossPos=yn}dn.attr("text-anchor",ui.anchor),Ee&&an.attr("text-anchor",ui.anchor),Pa.attr("transform",t(yn,Fn)+(Pt?e(_):""))}),{hoverLabels:Zi,commonLabelBoundingBox:Nt}}function F(Y,ft,ut,wt,zt,Pt){var Wt="",Ht="";Y.nameOverride!==void 0&&(Y.name=Y.nameOverride),Y.name&&(Y.trace._meta&&(Y.name=P.templateString(Y.name,Y.trace._meta)),Wt=tt(Y.name,Y.nameLength));var Jt=ut.charAt(0),ge=Jt==="x"?"y":"x";Y.zLabel!==void 0?(Y.xLabel!==void 0&&(Ht+="x: "+Y.xLabel+"
"),Y.yLabel!==void 0&&(Ht+="y: "+Y.yLabel+"
"),Y.trace.type!=="choropleth"&&Y.trace.type!=="choroplethmapbox"&&Y.trace.type!=="choroplethmap"&&(Ht+=(Ht?"z: ":"")+Y.zLabel)):ft&&Y[Jt+"Label"]===zt?Ht=Y[ge+"Label"]||"":Y.xLabel===void 0?Y.yLabel!==void 0&&Y.trace.type!=="scattercarpet"&&(Ht=Y.yLabel):Y.yLabel===void 0?Ht=Y.xLabel:Ht="("+Y.xLabel+", "+Y.yLabel+")",(Y.text||Y.text===0)&&!Array.isArray(Y.text)&&(Ht+=(Ht?"
":"")+Y.text),Y.extraText!==void 0&&(Ht+=(Ht?"
":"")+Y.extraText),Pt&&Ht===""&&!Y.hovertemplate&&(Wt===""&&Pt.remove(),Ht=Wt);let{hovertemplate:he=!1}=Y;if(he){let de=Y.hovertemplateLabels||Y;Y[Jt+"Label"]!==zt&&(de[Jt+"other"]=de[Jt+"Val"],de[Jt+"otherLabel"]=de[Jt+"Label"]),Ht=P.hovertemplateString({data:[Y.eventData[0]||{},Y.trace._meta],fallback:Y.trace.hovertemplatefallback,labels:de,locale:wt._d3locale,template:he}),Ht=Ht.replace(V,(se,Tt)=>(Wt=tt(Tt,Y.nameLength),""))}return[Ht,Wt]}function U(Y,ft,ut,wt){var zt=ft?"xa":"ya",Pt=ft?"ya":"xa",Wt=0,Ht=1,Jt=Y.size(),ge=new Array(Jt),he=0,de=wt.minX,se=wt.maxX,Tt=wt.minY,Lt=wt.maxY,Mt=function(Ct){return Ct*ut._invScaleX},te=function(Ct){return Ct*ut._invScaleY};Y.each(function(Ct){var gt=Ct[zt],St=Ct[Pt],Nt=gt._id.charAt(0)==="x",ee=gt.range;he===0&&ee&&ee[0]>ee[1]!==Nt&&(Ht=-1);var le=0,we=Nt?ut.width:ut.height;if(ut.hovermode==="x"||ut.hovermode==="y"){var Ue=W(Ct,ft),qe=Ct.anchor,ar=qe==="end"?-1:1,Ar,Tr;if(qe==="middle")Ar=Ct.crossPos+(Nt?te(Ue.y-Ct.by/2):Mt(Ct.bx/2+Ct.tx2width/2)),Tr=Ar+(Nt?te(Ct.by):Mt(Ct.bx));else if(Nt)Ar=Ct.crossPos+te(h+Ue.y)-te(Ct.by/2-h),Tr=Ar+te(Ct.by);else{var pr=Mt(ar*h+Ue.x),Jr=pr+Mt(ar*Ct.bx);Ar=Ct.crossPos+Math.min(pr,Jr),Tr=Ct.crossPos+Math.max(pr,Jr)}Nt?Tt!==void 0&&Lt!==void 0&&Math.min(Tr,Lt)-Math.max(Ar,Tt)>1&&(St.side==="left"?(le=St._mainLinePosition,we=ut.width):we=St._mainLinePosition):de!==void 0&&se!==void 0&&Math.min(Tr,se)-Math.max(Ar,de)>1&&(St.side==="top"?(le=St._mainLinePosition,we=ut.height):we=St._mainLinePosition)}ge[he++]=[{datum:Ct,traceIndex:Ct.trace.index,dp:0,pos:Ct.pos,posref:Ct.posref,size:Ct.by*(Nt?M:1)/2,pmin:le,pmax:we}]}),ge.sort(function(Ct,gt){return Ct[0].posref-gt[0].posref||Ht*(gt[0].traceIndex-Ct[0].traceIndex)});var ve,oe,Te,He,Ge,cr,ur;function jr(Ct){var gt=Ct[0],St=Ct[Ct.length-1];if(oe=gt.pmin-gt.pos-gt.dp+gt.size,Te=St.pos+St.dp+St.size-gt.pmax,oe>.01){for(Ge=Ct.length-1;Ge>=0;Ge--)Ct[Ge].dp+=oe;ve=!1}if(!(Te<.01)){if(oe<-.01){for(Ge=Ct.length-1;Ge>=0;Ge--)Ct[Ge].dp-=Te;ve=!1}if(ve){var Nt=0;for(He=0;Hegt.pmax&&Nt++;for(He=Ct.length-1;He>=0&&!(Nt<=0);He--)cr=Ct[He],cr.pos>gt.pmax-1&&(cr.del=!0,Nt--);for(He=0;He=0;Ge--)Ct[Ge].dp-=Te;for(He=Ct.length-1;He>=0&&!(Nt<=0);He--)cr=Ct[He],cr.pos+cr.dp+cr.size>gt.pmax&&(cr.del=!0,Nt--)}}}for(;!ve&&Wt<=Jt;){for(Wt++,ve=!0,He=0;He.01){for(Ge=br.length-1;Ge>=0;Ge--)br[Ge].dp+=oe;for(Hr.push.apply(Hr,br),ge.splice(He+1,1),ur=0,Ge=Hr.length-1;Ge>=0;Ge--)ur+=Hr[Ge].dp;for(Te=ur/Hr.length,Ge=Hr.length-1;Ge>=0;Ge--)Hr[Ge].dp-=Te;ve=!1}else He++}ge.forEach(jr)}for(He=ge.length-1;He>=0;He--){var Ce=ge[He];for(Ge=Ce.length-1;Ge>=0;Ge--){var $t=Ce[Ge],ne=$t.datum;ne.offset=$t.dp,ne.del=$t.del}}}function W(Y,ft){var ut=0,wt=Y.offset;return ft&&(wt*=-A,ut=Y.offset*E),{x:ut,y:wt}}function q(Y){var ft={start:1,end:-1,middle:0}[Y.anchor],ut=ft*(h+p),wt=ut+ft*(Y.txwidth+p),zt=Y.anchor==="middle";return zt&&(ut-=Y.tx2width/2,wt+=Y.txwidth/2+p),{alignShift:ft,textShiftX:ut,text2ShiftX:wt}}function X(Y,ft,ut,wt){var zt=function(Wt){return Wt*ut},Pt=function(Wt){return Wt*wt};Y.each(function(Wt){var Ht=$.select(this);if(Wt.del)return Ht.remove();var Jt=Ht.select("text.nums"),ge=Wt.anchor,he=ge==="end"?-1:1,de=q(Wt),se=W(Wt,ft),Tt=se.x,Lt=se.y,Mt=ge==="middle",te="hoverlabel"in Wt.trace?Wt.trace.hoverlabel.showarrow:!0,ve;Mt?ve="M-"+zt(Wt.bx/2+Wt.tx2width/2)+","+Pt(Lt-Wt.by/2)+"h"+zt(Wt.bx)+"v"+Pt(Wt.by)+"h-"+zt(Wt.bx)+"Z":te?ve="M0,0L"+zt(he*h+Tt)+","+Pt(h+Lt)+"v"+Pt(Wt.by/2-h)+"h"+zt(he*Wt.bx)+"v-"+Pt(Wt.by)+"H"+zt(he*h+Tt)+"V"+Pt(Lt-h)+"Z":ve="M"+zt(he*h+Tt)+","+Pt(Lt-Wt.by/2)+"h"+zt(he*Wt.bx)+"v"+Pt(Wt.by)+"h"+zt(-he*Wt.bx)+"Z",Ht.select("path").attr("d",ve);var oe=Tt+de.textShiftX,Te=Lt+Wt.ty0-Wt.by/2+p,He=Wt.textAlign||"auto";He!=="auto"&&(He==="left"&&ge!=="start"?(Jt.attr("text-anchor","start"),oe=Mt?-Wt.bx/2-Wt.tx2width/2+p:-Wt.bx-p):He==="right"&&ge!=="end"&&(Jt.attr("text-anchor","end"),oe=Mt?Wt.bx/2-Wt.tx2width/2-p:Wt.bx+p)),Jt.call(a.positionText,zt(oe),Pt(Te)),Wt.tx2width&&(Ht.select("text.name").call(a.positionText,zt(de.text2ShiftX+de.alignShift*p+Tt),Pt(Lt+Wt.ty0-Wt.by/2+p)),Ht.select("rect").call(o.setRect,zt(de.text2ShiftX+(de.alignShift-1)*Wt.tx2width/2+Tt),Pt(Lt-Wt.by/2-1),zt(Wt.tx2width),Pt(Wt.by+2)))})}function lt(Y,ft){var ut=Y.index,wt=Y.trace||{},zt=Y.cd[0],Pt=Y.cd[ut]||{};function Wt(se){return se||c(se)&&se===0}var Ht=Array.isArray(ut)?function(se,Tt){var Lt=P.castOption(zt,ut,se);return Wt(Lt)?Lt:P.extractOption({},wt,"",Tt)}:function(se,Tt){return P.extractOption(Pt,wt,se,Tt)};function Jt(se,Tt,Lt){var Mt=Ht(Tt,Lt);Wt(Mt)&&(Y[se]=Mt)}if(Jt("hoverinfo","hi","hoverinfo"),Jt("bgcolor","hbg","hoverlabel.bgcolor"),Jt("borderColor","hbc","hoverlabel.bordercolor"),Jt("fontFamily","htf","hoverlabel.font.family"),Jt("fontSize","hts","hoverlabel.font.size"),Jt("fontColor","htc","hoverlabel.font.color"),Jt("fontWeight","htw","hoverlabel.font.weight"),Jt("fontStyle","hty","hoverlabel.font.style"),Jt("fontVariant","htv","hoverlabel.font.variant"),Jt("nameLength","hnl","hoverlabel.namelength"),Jt("textAlign","hta","hoverlabel.align"),Y.posref=ft==="y"||ft==="closest"&&wt.orientation==="h"?Y.xa._offset+(Y.x0+Y.x1)/2:Y.ya._offset+(Y.y0+Y.y1)/2,Y.x0=P.constrain(Y.x0,0,Y.xa._length),Y.x1=P.constrain(Y.x1,0,Y.xa._length),Y.y0=P.constrain(Y.y0,0,Y.ya._length),Y.y1=P.constrain(Y.y1,0,Y.ya._length),Y.xLabelVal!==void 0&&(Y.xLabel="xLabel"in Y?Y.xLabel:f.hoverLabelText(Y.xa,Y.xLabelVal,wt.xhoverformat),Y.xVal=Y.xa.c2d(Y.xLabelVal)),Y.yLabelVal!==void 0&&(Y.yLabel="yLabel"in Y?Y.yLabel:f.hoverLabelText(Y.ya,Y.yLabelVal,wt.yhoverformat),Y.yVal=Y.ya.c2d(Y.yLabelVal)),Y.zLabelVal!==void 0&&Y.zLabel===void 0&&(Y.zLabel=String(Y.zLabelVal)),!isNaN(Y.xerr)&&!(Y.xa.type==="log"&&Y.xerr<=0)){var ge=f.tickText(Y.xa,Y.xa.c2l(Y.xerr),"hover").text;Y.xerrneg!==void 0?Y.xLabel+=" +"+ge+" / -"+f.tickText(Y.xa,Y.xa.c2l(Y.xerrneg),"hover").text:Y.xLabel+=" ± "+ge,ft==="x"&&(Y.distance+=1)}if(!isNaN(Y.yerr)&&!(Y.ya.type==="log"&&Y.yerr<=0)){var he=f.tickText(Y.ya,Y.ya.c2l(Y.yerr),"hover").text;Y.yerrneg!==void 0?Y.yLabel+=" +"+he+" / -"+f.tickText(Y.ya,Y.ya.c2l(Y.yerrneg),"hover").text:Y.yLabel+=" ± "+he,ft==="y"&&(Y.distance+=1)}var de=Y.hoverinfo||Y.trace.hoverinfo;return de&&de!=="all"&&(de=Array.isArray(de)?de:de.split("+"),de.indexOf("x")===-1&&(Y.xLabel=void 0),de.indexOf("y")===-1&&(Y.yLabel=void 0),de.indexOf("z")===-1&&(Y.zLabel=void 0),de.indexOf("text")===-1&&(Y.text=void 0),de.indexOf("name")===-1&&(Y.name=void 0)),Y}function yt(Y,ft,ut){var wt=ut.container,zt=ut.fullLayout,Pt=zt._size,Wt=ut.event,Ht=!!ft.hLinePoint,Jt=!!ft.vLinePoint,ge,he;if(wt.selectAll(".spikeline").remove(),!!(Jt||Ht)){var de=i.combine(zt.plot_bgcolor,zt.paper_bgcolor);if(Ht){var se=ft.hLinePoint,Tt,Lt;ge=se&&se.xa,he=se&&se.ya;var Mt=he.spikesnap;Mt==="cursor"?(Tt=Wt.pointerX,Lt=Wt.pointerY):(Tt=ge._offset+se.x,Lt=he._offset+se.y);var te=g.readability(se.color,de)<1.5?i.contrast(de):se.color,ve=he.spikemode,oe=he.spikethickness,Te=he.spikecolor||te,He=f.getPxPosition(Y,he),Ge,cr;if(ve.indexOf("toaxis")!==-1||ve.indexOf("across")!==-1){if(ve.indexOf("toaxis")!==-1&&(Ge=He,cr=Tt),ve.indexOf("across")!==-1){var ur=he._counterDomainMin,jr=he._counterDomainMax;he.anchor==="free"&&(ur=Math.min(ur,he.position),jr=Math.max(jr,he.position)),Ge=Pt.l+ur*Pt.w,cr=Pt.l+jr*Pt.w}wt.insert("line",":first-child").attr({x1:Ge,x2:cr,y1:Lt,y2:Lt,"stroke-width":oe,stroke:Te,"stroke-dasharray":o.dashStyle(he.spikedash,oe)}).classed("spikeline",!0).classed("crisp",!0),wt.insert("line",":first-child").attr({x1:Ge,x2:cr,y1:Lt,y2:Lt,"stroke-width":oe+2,stroke:de}).classed("spikeline",!0).classed("crisp",!0)}ve.indexOf("marker")!==-1&&wt.insert("circle",":first-child").attr({cx:He+(he.side!=="right"?oe:-oe),cy:Lt,r:oe,fill:Te}).classed("spikeline",!0)}if(Jt){var Hr=ft.vLinePoint,br,Kr;ge=Hr&&Hr.xa,he=Hr&&Hr.ya;var rn=ge.spikesnap;rn==="cursor"?(br=Wt.pointerX,Kr=Wt.pointerY):(br=ge._offset+Hr.x,Kr=he._offset+Hr.y);var Ce=g.readability(Hr.color,de)<1.5?i.contrast(de):Hr.color,$t=ge.spikemode,ne=ge.spikethickness,Ct=ge.spikecolor||Ce,gt=f.getPxPosition(Y,ge),St,Nt;if($t.indexOf("toaxis")!==-1||$t.indexOf("across")!==-1){if($t.indexOf("toaxis")!==-1&&(St=gt,Nt=Kr),$t.indexOf("across")!==-1){var ee=ge._counterDomainMin,le=ge._counterDomainMax;ge.anchor==="free"&&(ee=Math.min(ee,ge.position),le=Math.max(le,ge.position)),St=Pt.t+(1-le)*Pt.h,Nt=Pt.t+(1-ee)*Pt.h}wt.insert("line",":first-child").attr({x1:br,x2:br,y1:St,y2:Nt,"stroke-width":ne,stroke:Ct,"stroke-dasharray":o.dashStyle(ge.spikedash,ne)}).classed("spikeline",!0).classed("crisp",!0),wt.insert("line",":first-child").attr({x1:br,x2:br,y1:St,y2:Nt,"stroke-width":ne+2,stroke:de}).classed("spikeline",!0).classed("crisp",!0)}$t.indexOf("marker")!==-1&&wt.insert("circle",":first-child").attr({cx:br,cy:gt-(ge.side!=="top"?ne:-ne),r:ne,fill:Ct}).classed("spikeline",!0)}}}function pt(Y,ft,ut){if(!ut||ut.length!==Y._hoverdata.length)return!0;for(var wt=ut.length-1;wt>=0;wt--){var zt=ut[wt],Pt=Y._hoverdata[wt];if(zt.curveNumber!==Pt.curveNumber||String(zt.pointNumber)!==String(Pt.pointNumber)||String(zt.pointNumbers)!==String(Pt.pointNumbers)||zt.binNumber!==Pt.binNumber)return!0}return!1}function st(Y,ft){return!0}function tt(Y,ft){return a.plainText(Y||"",{len:ft,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function dt(Y,ft){for(var ut=ft.charAt(0),wt=[],zt=[],Pt=[],Wt=0;WtY.offsetTop+Y.clientTop,vt=Y=>Y.offsetLeft+Y.clientLeft;function it(Y,ft){var ut=Y._fullLayout,wt=ft.getBoundingClientRect(),zt=wt.left,Pt=wt.top,Wt=zt+wt.width,Ht=Pt+wt.height,Jt=P.apply3DTransform(ut._invTransform)(zt,Pt),ge=P.apply3DTransform(ut._invTransform)(Wt,Ht),he=Jt[0],de=Jt[1],se=ge[0],Tt=ge[1];return{x:he,y:de,width:se-he,height:Tt-de,top:Math.min(de,Tt),left:Math.min(he,se),right:Math.max(he,se),bottom:Math.max(de,Tt)}}}),bg=Ft((Q,$)=>{var c=bn(),g=li(),P=Dp().isUnifiedHover;$.exports=function(S,t,e,r){r=r||{};var a=t.legend;function n(o){r.font[o]||(r.font[o]=a?t.legend.font[o]:t.font[o])}t&&P(t.hovermode)&&(r.font||(r.font={}),n("size"),n("family"),n("color"),n("weight"),n("style"),n("variant"),a?(r.bgcolor||(r.bgcolor=g.combine(t.legend.bgcolor,t.paper_bgcolor)),r.bordercolor||(r.bordercolor=t.legend.bordercolor)):r.bgcolor||(r.bgcolor=t.paper_bgcolor)),e("hoverlabel.bgcolor",r.bgcolor),e("hoverlabel.bordercolor",r.bordercolor),e("hoverlabel.namelength",r.namelength),e("hoverlabel.showarrow",r.showarrow),c.coerceFont(e,"hoverlabel.font",r.font),e("hoverlabel.align",r.align)}}),wg=Ft((Q,$)=>{var c=bn(),g=bg(),P=Ao();$.exports=function(S,t){function e(r,a){return c.coerce(S,t,P,r,a)}g(S,t,e)}}),m6=Ft((Q,$)=>{var c=bn(),g=Ps(),P=bg();$.exports=function(S,t,e,r){function a(o,i){return c.coerce(S,t,g,o,i)}var n=c.extendFlat({},r.hoverlabel);t.hovertemplate&&(n.namelength=-1),P(S,t,a,n)}}),pv=Ft((Q,$)=>{var c=bn(),g=Ao();$.exports=function(P,S){function t(e,r){return S[e]!==void 0?S[e]:c.coerce(P,S,g,e,r)}return t("clickmode"),t("hoversubplots"),t("hovermode")}}),g0=Ft((Q,$)=>{var c=bn(),g=Ao(),P=pv(),S=bg();$.exports=function(t,e){function r(x,y){return c.coerce(t,e,g,x,y)}var a=P(t,e);a&&(r("hoverdistance"),r("spikedistance"));var n=r("dragmode");n==="select"&&r("selectdirection");var o=e._has("mapbox"),i=e._has("map"),s=e._has("geo"),f=e._basePlotModules.length;e.dragmode==="zoom"&&((o||i||s)&&f===1||(o||i)&&s&&f===2)&&(e.dragmode="pan"),S(t,e,r),c.coerceFont(r,"hoverlabel.grouptitlefont",e.hoverlabel.font)}}),xw=Ft((Q,$)=>{var c=bn(),g=Xo();$.exports=function(S){var t=S.calcdata,e=S._fullLayout;function r(s){return function(f){return c.coerceHoverinfo({hoverinfo:f},{_module:s._module},e)}}for(var a=0;a{var c=Xo(),g=O_().hover;$.exports=function(P,S,t){var e=c.getComponentMethod("annotations","onClick")(P,P._hoverdata);t!==void 0&&g(P,S,t,!0);function r(){P.emit("plotly_click",{points:P._hoverdata,event:S})}P._hoverdata&&S&&S.target&&(e&&e.then?e.then(r):r(),S.stopImmediatePropagation&&S.stopImmediatePropagation())}}),Qh=Ft((Q,$)=>{var c=un(),g=bn(),P=up(),S=Dp(),t=Ao(),e=O_();$.exports={moduleType:"component",name:"fx",constants:go(),schema:{layout:t},attributes:Ps(),layoutAttributes:t,supplyLayoutGlobalDefaults:wg(),supplyDefaults:m6(),supplyLayoutDefaults:g0(),calc:xw(),getDistanceFunction:S.getDistanceFunction,getClosest:S.getClosest,inbox:S.inbox,quadrature:S.quadrature,appendArrayPointValue:S.appendArrayPointValue,castHoverOption:a,castHoverinfo:n,hover:e.hover,unhover:P.unhover,loneHover:e.loneHover,loneUnhover:r,click:_w()};function r(o){var i=g.isD3Selection(o)?o:c.select(o);i.selectAll("g.hovertext").remove(),i.selectAll(".spikeline").remove()}function a(o,i,s){return g.castOption(o,i,"hoverlabel."+s)}function n(o,i,s){function f(x){return g.coerceHoverinfo({hoverinfo:x},{_module:o._module},i)}return g.castOption(o,s,"hoverinfo",f)}}),v0=Ft(Q=>{Q.selectMode=function($){return $==="lasso"||$==="select"},Q.drawMode=function($){return $==="drawclosedpath"||$==="drawopenpath"||$==="drawline"||$==="drawrect"||$==="drawcircle"},Q.openMode=function($){return $==="drawline"||$==="drawopenpath"},Q.rectMode=function($){return $==="select"||$==="drawline"||$==="drawrect"||$==="drawcircle"},Q.freeMode=function($){return $==="lasso"||$==="drawclosedpath"||$==="drawopenpath"},Q.selectingOrDrawing=function($){return Q.freeMode($)||Q.rectMode($)}}),mv=Ft((Q,$)=>{$.exports=function(c){var g=c._fullLayout;g._glcanvas&&g._glcanvas.size()&&g._glcanvas.each(function(P){P.regl&&P.regl.clear({color:!0,depth:!0})})}}),D_=Ft((Q,$)=>{$.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:[""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}),F_=Ft((Q,$)=>{var c=32;$.exports={CIRCLE_SIDES:c,i000:0,i090:c/4,i180:c/2,i270:c/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}),By=Ft((Q,$)=>{var c=bn().strTranslate;function g(e,r){switch(e.type){case"log":return e.p2d(r);case"date":return e.p2r(r,0,e.calendar);default:return e.p2r(r)}}function P(e,r){switch(e.type){case"log":return e.d2p(r);case"date":return e.r2p(r,0,e.calendar);default:return e.r2p(r)}}function S(e){var r=e._id.charAt(0)==="y"?1:0;return function(a){return g(e,a[r])}}function t(e){return c(e.xaxis._offset,e.yaxis._offset)}$.exports={p2r:g,r2p:P,axValue:S,getTransform:t}}),kg=Ft(Q=>{var $=A1(),c=F_(),g=c.CIRCLE_SIDES,P=c.SQRT2,S=By(),t=S.p2r,e=S.r2p,r=[0,3,4,5,6,1,2],a=[0,3,4,1,2];Q.writePaths=function(i){var s=i.length;if(!s)return"M0,0Z";for(var f="",x=0;x0&&b{var c=Rc(),g=v0(),P=g.drawMode,S=g.openMode,t=F_(),e=t.i000,r=t.i090,a=t.i180,n=t.i270,o=t.cos45,i=t.sin45,s=By(),f=s.p2r,x=s.r2p,y=C0(),v=y.clearOutline,T=kg(),u=T.readPaths,b=T.writePaths,_=T.ellipseOver,C=T.fixDatesForPaths;function M(A,h){if(A.length){var p=A[0][0];if(p){var k=h.gd,w=h.isActiveShape,R=h.dragmode,O=(k.layout||{}).shapes||[];if(!P(R)&&w!==void 0){var N=k._fullLayout._activeShapeIndex;if(N{var c=v0(),g=c.selectMode,P=C0(),S=P.clearOutline,t=kg(),e=t.readPaths,r=t.writePaths,a=t.fixDatesForPaths;$.exports=function(n,o){if(n.length){var i=n[0][0];if(i){var s=i.getAttribute("d"),f=o.gd,x=f._fullLayout.newselection,y=o.plotinfo,v=y.xaxis,T=y.yaxis,u=o.isActiveSelection,b=o.dragmode,_=(f.layout||{}).selections||[];if(!g(b)&&u!==void 0){var C=f._fullLayout._activeSelectionIndex;if(C<_.length)switch(f._fullLayout.selections[C].type){case"rect":b="select";break;case"path":b="lasso";break}}var M=e(s,f,y,u),E={xref:v._id,yref:T._id,opacity:x.opacity,line:{color:x.line.color,width:x.line.width,dash:x.line.dash}},A;M.length===1&&(A=M[0]),A&&A.length===5&&b==="select"?(E.type="rect",E.x0=A[0][1],E.y0=A[0][2],E.x1=A[2][1],E.y1=A[2][2]):(E.type="path",v&&T&&a(M,v,T),E.path=r(M),A=null),S(f);for(var h=o.editHelpers,p=(h||{}).modifyItem,k=[],w=0;w<_.length;w++){var R=f._fullLayout.selections[w];if(!R){k[w]=R;continue}if(k[w]=R._input,u!==void 0&&w===f._fullLayout._activeSelectionIndex){var O=E;switch(R.type){case"rect":p("x0",O.x0),p("x1",O.x1),p("y0",O.y0),p("y1",O.y1);break;case"path":p("path",O.path);break}}}return u===void 0?(k.push(E),k):h?h.getUpdateObj():{}}}}}),Ny=Ft((Q,$)=>{$.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}}),bp=Ft(Q=>{var $=Ny(),c=bn(),g=Es();Q.rangeToShapePosition=function(t){return t.type==="log"?t.r2d:function(e){return e}},Q.shapePositionToRange=function(t){return t.type==="log"?t.d2r:function(e){return e}},Q.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},Q.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},Q.extractPathCoords=function(t,e,r){var a=[],n=t.match($.segmentRE);return n.forEach(function(o){var i=e[o.charAt(0)].drawn;if(i!==void 0){var s=o.substr(1).match($.paramRE);if(!(!s||s.lengthu&&(_="X"),_});return x>u&&(b=b.replace(/[\s,]*X.*/,""),c.log("Ignoring extra params in segment "+f)),y+b})}function S(t,e){e=e||0;var r=0;return e&&t&&(t.type==="category"||t.type==="multicategory")&&(r=(t.r2p(1)-t.r2p(0))*e),r}}),bw=Ft((Q,$)=>{var c=bn(),g=Es(),P=tc(),S=js(),t=kg().readPaths,e=bp(),r=e.getPathString,a=y1(),n=Af().FROM_TL;$.exports=function(s,f,x,y){if(y.selectAll(".shape-label").remove(),!!(x.label.text||x.label.texttemplate)){var v;if(x.label.texttemplate){var T={};if(x.type!=="path"){var u=g.getFromId(s,x.xref),b=g.getFromId(s,x.yref);for(var _ in a){var C=a[_](x,u,b);C!==void 0&&(T[_]=C)}}v=c.texttemplateStringForShapes({data:[T],fallback:x.label.texttemplatefallback,locale:s._fullLayout._d3locale,template:x.label.texttemplate})}else v=x.label.text;var M={"data-index":f},E=x.label.font,A={"data-notex":1},h=y.append("g").attr(M).classed("shape-label",!0),p=h.append("text").attr(A).classed("shape-label-text",!0).text(v),k,w,R,O;if(x.path){var N=r(s,x),V=t(N,s);k=1/0,R=1/0,w=-1/0,O=-1/0;for(var H=0;H=s?v=f-y:v=y-f,-180/Math.PI*Math.atan2(v,T)}function i(s,f,x,y,v,T,u){var b=v.label.textposition,_=v.label.textangle,C=v.label.padding,M=v.type,E=Math.PI/180*T,A=Math.sin(E),h=Math.cos(E),p=v.label.xanchor,k=v.label.yanchor,w,R,O,N;if(M==="line"){b==="start"?(w=s,R=f):b==="end"?(w=x,R=y):(w=(s+x)/2,R=(f+y)/2),p==="auto"&&(b==="start"?_==="auto"?x>s?p="left":xs?p="right":xs?p="right":xs?p="left":x{var c=bn(),g=c.strTranslate,P=up(),S=v0(),t=S.drawMode,e=S.selectMode,r=Xo(),a=li(),n=F_(),o=n.i000,i=n.i090,s=n.i180,f=n.i270,x=C0(),y=x.clearOutlineControllers,v=kg(),T=v.pointsOnRectangle,u=v.pointsOnEllipse,b=v.writePaths,_=a0().newShapes,C=a0().createShapeObj,M=Tg(),E=bw();$.exports=function k(w,R,O,N){N||(N=0);var V=O.gd;function H(){k(w,R,O,N++),(u(w[0])||O.hasText)&&F({redrawing:!0})}function F(de){var se={};O.isActiveShape!==void 0&&(O.isActiveShape=!1,se=_(R,O)),O.isActiveSelection!==void 0&&(O.isActiveSelection=!1,se=M(R,O),V._fullLayout._reselect=!0),Object.keys(se).length&&r.call((de||{}).redrawing?"relayout":"_guiRelayout",V,se)}var U=V._fullLayout,W=U._zoomlayer,q=O.dragmode,X=t(q),lt=e(q);(X||lt)&&(V._fullLayout._outlining=!0),y(V),R.attr("d",b(w));var yt,pt,st,tt,dt;if(!N&&(O.isActiveShape||O.isActiveSelection)){dt=A([],w);var rt=W.append("g").attr("class","outline-controllers");zt(rt),he()}if(X&&O.hasText){var at=W.select(".label-temp"),vt=C(R,O,O.dragmode);E(V,"label-temp",vt,at)}function it(de){st=+de.srcElement.getAttribute("data-i"),tt=+de.srcElement.getAttribute("data-j"),yt[st][tt].moveFn=Y}function Y(de,se){if(w.length){var Tt=dt[st][tt][1],Lt=dt[st][tt][2],Mt=w[st],te=Mt.length;if(T(Mt)){var ve=de,oe=se;if(O.isActiveSelection){var Te=h(Mt,tt);Te[1]===Mt[tt][1]?oe=0:ve=0}for(var He=0;He1&&!(de.length===2&&de[1][0]==="Z")&&(tt===0&&(de[0][0]="M"),w[st]=de,H(),F())}}function wt(de,se){if(de===2){st=+se.srcElement.getAttribute("data-i"),tt=+se.srcElement.getAttribute("data-j");var Tt=w[st];!T(Tt)&&!u(Tt)&&ut()}}function zt(de){yt=[];for(var se=0;se{var c=un(),g=Xo(),P=bn(),S=Es(),t=kg().readPaths,e=Rm(),r=bw(),a=C0().clearOutlineControllers,n=li(),o=js(),i=pu().arrayEditor,s=up(),f=P0(),x=Ny(),y=bp(),v=y.getPathString;$.exports={draw:T,drawOne:_,eraseActiveShape:p,drawLabel:r};function T(k){var w=k._fullLayout;w._shapeUpperLayer.selectAll("path").remove(),w._shapeLowerLayer.selectAll("path").remove(),w._shapeUpperLayer.selectAll("text").remove(),w._shapeLowerLayer.selectAll("text").remove();for(var R in w._plots){var O=w._plots[R].shapelayer;O&&(O.selectAll("path").remove(),O.selectAll("text").remove())}for(var N=0;NH&&ee>F&&!gt.shiftKey?s.getCursor(le/Nt,1-we/ee):"move";f(w,Ue),Ge=Ue.split("-")[0]}}function Hr(gt){u(k)||(U&&(dt=Mt(R.xanchor)),W&&(rt=te(R.yanchor)),R.type==="path"?Pt=R.path:(yt=U?R.x0:Mt(R.x0),pt=W?R.y0:te(R.y0),st=U?R.x1:Mt(R.x1),tt=W?R.y1:te(R.y1)),yttt?(at=pt,ft="y0",vt=tt,ut="y1"):(at=tt,ft="y1",vt=pt,ut="y0"),jr(gt),$t(N,R),Ct(w,R,k),He.moveFn=Ge==="move"?rn:Ce,He.altKey=gt.altKey)}function br(){u(k)||(f(w),ne(N),C(w,k,R),g.call("_guiRelayout",k,V.getUpdateObj()))}function Kr(){u(k)||ne(N)}function rn(gt,St){if(R.type==="path"){var Nt=function(we){return we},ee=Nt,le=Nt;U?lt("xanchor",R.xanchor=ve(dt+gt)):(ee=function(we){return ve(Mt(we)+gt)},Ht&&Ht.type==="date"&&(ee=y.encodeDate(ee))),W?lt("yanchor",R.yanchor=oe(rt+St)):(le=function(we){return oe(te(we)+St)},ge&&ge.type==="date"&&(le=y.encodeDate(le))),lt("path",R.path=E(Pt,ee,le))}else U?lt("xanchor",R.xanchor=ve(dt+gt)):(lt("x0",R.x0=ve(yt+gt)),lt("x1",R.x1=ve(st+gt))),W?lt("yanchor",R.yanchor=oe(rt+St)):(lt("y0",R.y0=oe(pt+St)),lt("y1",R.y1=oe(tt+St)));w.attr("d",v(k,R)),$t(N,R),r(k,O,R,Wt)}function Ce(gt,St){if(X){var Nt=function(qn){return qn},ee=Nt,le=Nt;U?lt("xanchor",R.xanchor=ve(dt+gt)):(ee=function(qn){return ve(Mt(qn)+gt)},Ht&&Ht.type==="date"&&(ee=y.encodeDate(ee))),W?lt("yanchor",R.yanchor=oe(rt+St)):(le=function(qn){return oe(te(qn)+St)},ge&&ge.type==="date"&&(le=y.encodeDate(le))),lt("path",R.path=E(Pt,ee,le))}else if(q){if(Ge==="resize-over-start-point"){var we=yt+gt,Ue=W?pt-St:pt+St;lt("x0",R.x0=U?we:ve(we)),lt("y0",R.y0=W?Ue:oe(Ue))}else if(Ge==="resize-over-end-point"){var qe=st+gt,ar=W?tt-St:tt+St;lt("x1",R.x1=U?qe:ve(qe)),lt("y1",R.y1=W?ar:oe(ar))}}else{var Ar=function(qn){return Ge.indexOf(qn)!==-1},Tr=Ar("n"),pr=Ar("s"),Jr=Ar("w"),Vn=Ar("e"),Hn=Tr?at+St:at,Kn=pr?vt+St:vt,Ci=Jr?it+gt:it,ii=Vn?Y+gt:Y;W&&(Tr&&(Hn=at-St),pr&&(Kn=vt-St)),(!W&&Kn-Hn>F||W&&Hn-Kn>F)&&(lt(ft,R[ft]=W?Hn:oe(Hn)),lt(ut,R[ut]=W?Kn:oe(Kn))),ii-Ci>H&&(lt(wt,R[wt]=U?Ci:ve(Ci)),lt(zt,R[zt]=U?ii:ve(ii)))}w.attr("d",v(k,R)),$t(N,R),r(k,O,R,Wt)}function $t(gt,St){(U||W)&&Nt();function Nt(){var ee=St.type!=="path",le=gt.selectAll(".visual-cue").data([0]),we=1;le.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":we}).classed("visual-cue",!0);var Ue=Mt(U?St.xanchor:P.midRange(ee?[St.x0,St.x1]:y.extractPathCoords(St.path,x.paramIsX))),qe=te(W?St.yanchor:P.midRange(ee?[St.y0,St.y1]:y.extractPathCoords(St.path,x.paramIsY)));if(Ue=y.roundPositionForSharpStrokeRendering(Ue,we),qe=y.roundPositionForSharpStrokeRendering(qe,we),U&&W){var ar="M"+(Ue-1-we)+","+(qe-1-we)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";le.attr("d",ar)}else if(U){var Ar="M"+(Ue-1-we)+","+(qe-9-we)+"v18 h2 v-18 Z";le.attr("d",Ar)}else{var Tr="M"+(Ue-9-we)+","+(qe-1-we)+"h18 v2 h-18 Z";le.attr("d",Tr)}}}function ne(gt){gt.selectAll(".visual-cue").remove()}function Ct(gt,St,Nt){var ee=St.xref,le=St.yref,we=S.getFromId(Nt,ee),Ue=S.getFromId(Nt,le),qe="";ee!=="paper"&&!we.autorange&&(qe+=ee),le!=="paper"&&!Ue.autorange&&(qe+=le),o.setClipUrl(gt,qe?"clip"+Nt._fullLayout._uid+qe:null,Nt)}}function E(k,w,R){return k.replace(x.segmentRE,function(O){var N=0,V=O.charAt(0),H=x.paramIsX[V],F=x.paramIsY[V],U=x.numParams[V],W=O.substr(1).replace(x.paramRE,function(q){return N>=U||(H[N]?q=w(q):F[N]&&(q=R(q)),N++),q});return V+W})}function A(k,w){if(b(k)){var R=w.node(),O=+R.getAttribute("data-index");if(O>=0){if(O===k._fullLayout._activeShapeIndex){h(k);return}k._fullLayout._activeShapeIndex=O,k._fullLayout._deactivateShape=h,T(k)}}}function h(k){if(b(k)){var w=k._fullLayout._activeShapeIndex;w>=0&&(a(k),delete k._fullLayout._activeShapeIndex,T(k))}}function p(k){if(b(k)){a(k);var w=k._fullLayout._activeShapeIndex,R=(k.layout||{}).shapes||[];if(w{var c=Xo(),g=Kc(),P=Rc(),S=D_(),t=R_().eraseActiveShape,e=bn(),r=e._,a=$.exports={};a.toImage={name:"toImage",title:function(M){var E=M._context.toImageButtonOptions||{},A=E.format||"png";return A==="png"?r(M,"Download plot as a PNG"):r(M,"Download plot")},icon:S.camera,click:function(M){var E=M._context.toImageButtonOptions,A={format:E.format||"png"};e.notifier(r(M,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(h){h in E&&(A[h]=E[h])}),c.call("downloadImage",M,A).then(function(h){e.notifier(r(M,"Snapshot succeeded")+" - "+h,"long")}).catch(function(){e.notifier(r(M,"Sorry, there was a problem downloading your snapshot!"),"long")})}},a.sendDataToCloud={name:"sendDataToCloud",title:function(M){return r(M,"Edit in Chart Studio")},icon:S.disk,click:function(M){g.sendDataToCloud(M)}},a.editInChartStudio={name:"editInChartStudio",title:function(M){return r(M,"Edit in Chart Studio")},icon:S.pencil,click:function(M){g.sendDataToCloud(M)}},a.zoom2d={name:"zoom2d",_cat:"zoom",title:function(M){return r(M,"Zoom")},attr:"dragmode",val:"zoom",icon:S.zoombox,click:n},a.pan2d={name:"pan2d",_cat:"pan",title:function(M){return r(M,"Pan")},attr:"dragmode",val:"pan",icon:S.pan,click:n},a.select2d={name:"select2d",_cat:"select",title:function(M){return r(M,"Box Select")},attr:"dragmode",val:"select",icon:S.selectbox,click:n},a.lasso2d={name:"lasso2d",_cat:"lasso",title:function(M){return r(M,"Lasso Select")},attr:"dragmode",val:"lasso",icon:S.lasso,click:n},a.drawclosedpath={name:"drawclosedpath",title:function(M){return r(M,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:S.drawclosedpath,click:n},a.drawopenpath={name:"drawopenpath",title:function(M){return r(M,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:S.drawopenpath,click:n},a.drawline={name:"drawline",title:function(M){return r(M,"Draw line")},attr:"dragmode",val:"drawline",icon:S.drawline,click:n},a.drawrect={name:"drawrect",title:function(M){return r(M,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:S.drawrect,click:n},a.drawcircle={name:"drawcircle",title:function(M){return r(M,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:S.drawcircle,click:n},a.eraseshape={name:"eraseshape",title:function(M){return r(M,"Erase active shape")},icon:S.eraseshape,click:t},a.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(M){return r(M,"Zoom in")},attr:"zoom",val:"in",icon:S.zoom_plus,click:n},a.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(M){return r(M,"Zoom out")},attr:"zoom",val:"out",icon:S.zoom_minus,click:n},a.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(M){return r(M,"Autoscale")},attr:"zoom",val:"auto",icon:S.autoscale,click:n},a.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(M){return r(M,"Reset axes")},attr:"zoom",val:"reset",icon:S.home,click:n},a.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(M){return r(M,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:S.tooltip_basic,gravity:"ne",click:n},a.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(M){return r(M,"Compare data on hover")},attr:"hovermode",val:function(M){return M._fullLayout._isHoriz?"y":"x"},icon:S.tooltip_compare,gravity:"ne",click:n};function n(M,E){var A=E.currentTarget,h=A.getAttribute("data-attr"),p=A.getAttribute("data-val")||!0,k=M._fullLayout,w={},R=P.list(M,null,!0),O=k._cartesianSpikesEnabled,N,V;if(h==="zoom"){var H=p==="in"?.5:2,F=(1+H)/2,U=(1-H)/2,W,q;for(V=0;V{var c=gv(),g=Object.keys(c),P=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],S=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(P),t=[],e=function(r){if(S.indexOf(r._cat||r.name)===-1){var a=r.name,n=(r._cat||r.name).toLowerCase();t.indexOf(a)===-1&&t.push(a),t.indexOf(n)===-1&&t.push(n)}};g.forEach(function(r){e(c[r])}),t.sort(),$.exports={DRAW_MODES:P,backButtons:S,foreButtons:t}}),M1=Ft((Q,$)=>{B_(),$.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}}),g6=Ft((Q,$)=>{var c=bn(),g=li(),P=pu(),S=M1();$.exports=function(t,e){var r=t.modebar||{},a=P.newContainer(e,"modebar");function n(i,s){return c.coerce(r,a,S,i,s)}n("orientation"),n("bgcolor",g.addOpacity(e.paper_bgcolor,.5));var o=g.contrast(g.rgb(e.modebar.bgcolor));n("color",g.addOpacity(o,.3)),n("activecolor",g.addOpacity(o,.7)),n("uirevision",e.uirevision),n("add"),n("remove")}}),Bm=Ft((Q,$)=>{var c=un(),g=ra(),P=bn(),S=D_(),t=Qi().version,e=new DOMParser;function r(i){this.container=i.container,this.element=document.createElement("div"),this.update(i.graphInfo,i.buttons),this.container.appendChild(this.element)}var a=r.prototype;a.update=function(i,s){this.graphInfo=i;var f=this.graphInfo._context,x=this.graphInfo._fullLayout,y="modebar-"+x._uid;this.element.setAttribute("id",y),this.element.setAttribute("role","toolbar"),this._uid=y,this.element.className="modebar modebar--custom",f.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),x.modebar.orientation==="v"&&(this.element.className+=" vertical",s=s.reverse());var v=x.modebar,T="#"+y+" .modebar-group";document.querySelectorAll(T).forEach(function(M){M.style.backgroundColor=v.bgcolor});var u=!this.hasButtons(s),b=this.hasLogo!==f.displaylogo,_=this.locale!==f.locale;if(this.locale=f.locale,(u||b||_)&&(this.removeAllButtons(),this.updateButtons(s),f.watermark||f.displaylogo)){var C=this.getLogo();f.watermark&&(C.className=C.className+" watermark"),x.modebar.orientation==="v"?this.element.insertBefore(C,this.element.childNodes[0]):this.element.appendChild(C),this.hasLogo=!0}this.updateActiveButton(),P.setStyleOnHover("#"+y+" .modebar-btn",".active",".icon path","fill: "+v.activecolor,"fill: "+v.color,this.element)},a.updateButtons=function(i){var s=this;this.buttons=i,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(f){var x=s.createGroup();f.forEach(function(y){var v=y.name;if(!v)throw new Error("must provide button 'name' in button config");if(s.buttonsNames.indexOf(v)!==-1)throw new Error("button name '"+v+"' is taken");s.buttonsNames.push(v);var T=s.createButton(y);s.buttonElements.push(T),x.appendChild(T)}),s.element.appendChild(x)})},a.createGroup=function(){var i=document.createElement("div");i.className="modebar-group";var s=this.graphInfo._fullLayout.modebar;return i.style.backgroundColor=s.bgcolor,i},a.createButton=function(i){var s=this,f=document.createElement("button");f.setAttribute("type","button"),f.setAttribute("rel","tooltip"),f.className="modebar-btn";var x=i.title;x===void 0?x=i.name:typeof x=="function"&&(x=x(this.graphInfo)),(x||x===0)&&(f.setAttribute("data-title",x),f.setAttribute("aria-label",x)),i.attr!==void 0&&f.setAttribute("data-attr",i.attr);var y=i.val;y!==void 0&&(typeof y=="function"&&(y=y(this.graphInfo)),f.setAttribute("data-val",y));var v=i.click;if(typeof v!="function")throw new Error("must provide button 'click' function in button config");f.addEventListener("click",function(u){i.click(s.graphInfo,u),s.updateActiveButton(u.currentTarget)}),f.setAttribute("data-toggle",i.toggle||!1),i.toggle&&c.select(f).classed("active",!0);var T=i.icon;return typeof T=="function"?f.appendChild(T()):f.appendChild(this.createIcon(T||S.question)),f.setAttribute("data-gravity",i.gravity||"n"),f},a.createIcon=function(i){var s=g(i.height)?Number(i.height):i.ascent-i.descent,f="http://www.w3.org/2000/svg",x;if(i.path){x=document.createElementNS(f,"svg"),x.setAttribute("viewBox",[0,0,i.width,s].join(" ")),x.setAttribute("class","icon");var y=document.createElementNS(f,"path");y.setAttribute("d",i.path),i.transform?y.setAttribute("transform",i.transform):i.ascent!==void 0&&y.setAttribute("transform","matrix(1 0 0 -1 0 "+i.ascent+")"),x.appendChild(y)}if(i.svg){var v=e.parseFromString(i.svg,"application/xml");x=v.childNodes[0]}return x.setAttribute("height","1em"),x.setAttribute("width","1em"),x},a.updateActiveButton=function(i){var s=this.graphInfo._fullLayout,f=i!==void 0?i.getAttribute("data-attr"):null;this.buttonElements.forEach(function(x){var y=x.getAttribute("data-val")||!0,v=x.getAttribute("data-attr"),T=x.getAttribute("data-toggle")==="true",u=c.select(x),b=function(M,E){var A=s.modebar,h=M.querySelector(".icon path");h&&(E||M.matches(":hover")?h.style.fill=A.activecolor:h.style.fill=A.color)};if(T){if(v===f){var _=!u.classed("active");u.classed("active",_),b(x,_)}}else{var C=v===null?v:P.nestedProperty(s,v).get();u.classed("active",C===y),b(x,C===y)}})},a.hasButtons=function(i){var s=this.buttons;if(!s||i.length!==s.length)return!1;for(var f=0;f{var c=Rc(),g=Ac(),P=Xo(),S=Dp().isUnifiedHover,t=Bm(),e=gv(),r=B_().DRAW_MODES,a=bn().extendDeep;$.exports=function(y){var v=y._fullLayout,T=y._context,u=v._modeBar;if(!T.displayModeBar&&!T.watermark){u&&(u.destroy(),delete v._modeBar);return}if(!Array.isArray(T.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(T.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var b=T.modeBarButtons,_;Array.isArray(b)&&b.length?_=x(b):!T.displayModeBar&&T.watermark?_=[]:_=n(y),u?u.update(y,_):v._modeBar=t(y,_)};function n(y){var v=y._fullLayout,T=y._fullData,u=y._context;function b(Y,ft){if(typeof ft=="string"){if(ft.toLowerCase()===Y.toLowerCase())return!0}else{var ut=ft.name,wt=ft._cat||ft.name;if(ut===Y||wt===Y.toLowerCase())return!0}return!1}var _=v.modebar.add;typeof _=="string"&&(_=[_]);var C=v.modebar.remove;typeof C=="string"&&(C=[C]);var M=u.modeBarButtonsToAdd.concat(_.filter(function(Y){for(var ft=0;ft1?(pt=["toggleHover"],st=["resetViews"]):p?(yt=["zoomInGeo","zoomOutGeo"],pt=["hoverClosestGeo"],st=["resetGeo"]):h?(pt=["hoverClosest3d"],st=["resetCameraDefault3d","resetCameraLastSave3d"]):O?(yt=["zoomInMapbox","zoomOutMapbox"],pt=["toggleHover"],st=["resetViewMapbox"]):N?(yt=["zoomInMap","zoomOutMap"],pt=["toggleHover"],st=["resetViewMap"]):k?pt=["hoverClosestPie"]:F?(pt=["hoverClosestCartesian","hoverCompareCartesian"],st=["resetViewSankey"]):pt=["toggleHover"],A&&pt.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(T)||W)&&(pt=[]),A&&!U&&(yt=["zoomIn2d","zoomOut2d","autoScale2d"],st[0]!=="resetViews"&&(st=["resetScale2d"])),h?tt=["zoom3d","pan3d","orbitRotation","tableRotation"]:A&&!U||R?tt=["zoom2d","pan2d"]:O||N||p?tt=["pan2d"]:V&&(tt=["zoom2d"]),i(T)&&tt.push("select2d","lasso2d");var dt=[],rt=function(Y){dt.indexOf(Y)===-1&&pt.indexOf(Y)!==-1&&dt.push(Y)};if(Array.isArray(M)){for(var at=[],vt=0;vt{$.exports={moduleType:"component",name:"modebar",layoutAttributes:M1(),supplyLayoutDefaults:g6(),manage:jy()}}),Uy=Ft((Q,$)=>{var c=Af().FROM_BL;$.exports=function(g,P,S){S===void 0&&(S=c[g.constraintoward||"center"]);var t=[g.r2l(g.range[0]),g.r2l(g.range[1])],e=t[0]+(t[1]-t[0])*S;g.range=g._input.range=[g.l2r(e+(t[0]-e)*P),g.l2r(e+(t[1]-e)*P)],g.setScale()}}),vv=Ft(Q=>{var $=bn(),c=Y0(),g=Rc().id2name,P=Ad(),S=Uy(),t=i0(),e=Da().ALMOST_EQUAL,r=Af().FROM_BL;Q.handleDefaults=function(y,v,T){var u=T.axIds,b=T.axHasImage,_=v._axisConstraintGroups=[],C=v._axisMatchGroups=[],M,E,A,h,p,k,w,R;for(M=0;M_?T.substr(_):u.substr(b))+C}function f(y,v){for(var T=v._size,u=T.h/T.w,b={},_=Object.keys(y),C=0;C<_.length;C++){var M=_[C],E=y[M];if(typeof E=="string"){var A=E.match(/^[xy]*/)[0],h=A.length;E=+E.substr(h);for(var p=A.charAt(0)==="y"?u:1/u,k=0;ke*w&&!V)){for(b=0;bst&&ftyt&&(yt=ft);var wt=(yt-lt)/(2*pt);h/=wt,lt=M.l2r(lt),yt=M.l2r(yt),M.range=M._input.range=W{var $=un(),c=Xo(),g=Kc(),P=bn(),S=tc(),t=mv(),e=li(),r=js(),a=lp(),n=ww(),o=Es(),i=Af(),s=vv(),f=s.enforce,x=s.clean,y=Y0().doAutoRange,v="start",T="middle",u="end",b=ic().zindexSeparator;Q.layoutStyles=function(F){return P.syncOrAsync([g.doAutoMargin,C],F)};function _(F,U,W){for(var q=0;q=F[1]||X[1]<=F[0])&<[0]U[0])return!0}return!1}function C(F){var U=F._fullLayout,W=U._size,q=W.p,X=o.list(F,"",!0),lt,yt,pt,st,tt,dt;if(U._paperdiv.style({width:F._context.responsive&&U.autosize&&!F._context._hasZeroWidth&&!F.layout.width?"100%":U.width+"px",height:F._context.responsive&&U.autosize&&!F._context._hasZeroHeight&&!F.layout.height?"100%":U.height+"px"}).selectAll(".main-svg").call(r.setSize,U.width,U.height),F._context.setBackground(F,U.paper_bgcolor),Q.drawMainTitle(F),n.manage(F),!U._has("cartesian"))return g.previousPromises(F);function rt(Ct,gt,St){var Nt=Ct._lw/2;if(Ct._id.charAt(0)==="x"){if(gt){if(St==="top")return gt._offset-q-Nt}else return W.t+W.h*(1-(Ct.position||0))+Nt%1;return gt._offset+gt._length+q+Nt}if(gt){if(St==="right")return gt._offset+gt._length+q+Nt}else return W.l+W.w*(Ct.position||0)+Nt%1;return gt._offset-q-Nt}for(lt=0;lt0){w(F,lt,tt,st),pt.attr({x:yt,y:lt,"text-anchor":q,dy:N(U.yanchor)}).call(S.positionText,yt,lt);var dt=(U.text.match(S.BR_TAG_ALL)||[]).length;if(dt){var rt=i.LINE_SPACING*dt+i.MID_SHIFT;U.y===0&&(rt=-rt),pt.selectAll(".line").each(function(){var ft=+this.getAttribute("dy").slice(0,-2)-rt+"em";this.setAttribute("dy",ft)})}var at=$.select(F).selectAll(".gtitle-subtitle");if(at.node()){var vt=pt.node().getBBox(),it=vt.y+vt.height,Y=it+a.SUBTITLE_PADDING_EM*U.subtitle.font.size;at.attr({x:yt,y:Y,"text-anchor":q,dy:N(U.yanchor)}).call(S.positionText,yt,Y)}}}};function h(F,U,W,q,X){var lt=U.yref==="paper"?F._fullLayout._size.h:F._fullLayout.height,yt=P.isTopAnchor(U)?q:q-X,pt=W==="b"?lt-yt:yt;return P.isTopAnchor(U)&&W==="t"||P.isBottomAnchor(U)&&W==="b"?!1:pt.5?"t":"b",yt=F._fullLayout.margin[lt],pt=0;return U.yref==="paper"?pt=W+U.pad.t+U.pad.b:U.yref==="container"&&(pt=p(lt,q,X,F._fullLayout.height,W)+U.pad.t+U.pad.b),pt>yt?pt:0}function w(F,U,W,q){var X="title.automargin",lt=F._fullLayout.title,yt=lt.y>.5?"t":"b",pt={x:lt.x,y:lt.y,t:0,b:0},st={};lt.yref==="paper"&&h(F,lt,yt,U,q)?pt[yt]=W:lt.yref==="container"&&(st[yt]=W,F._fullLayout._reservedMargin[X]=st),g.allowAutoMargin(F,X),g.autoMargin(F,X,pt)}function R(F,U){var W=F.title,q=F._size,X=0;switch(U===v?X=W.pad.l:U===u&&(X=-W.pad.r),W.xref){case"paper":return q.l+q.w*W.x+X;case"container":default:return F.width*W.x+X}}function O(F,U){var W=F.title,q=F._size,X=0;if(U==="0em"||!U?X=-W.pad.b:U===i.CAP_SHIFT+"em"&&(X=W.pad.t),W.y==="auto")return q.t/2;switch(W.yref){case"paper":return q.t+q.h-q.h*W.y+X;case"container":default:return F.height-F.height*W.y+X}}function N(F){return F==="top"?i.CAP_SHIFT+.3+"em":F==="bottom"?"-0.3em":i.MID_SHIFT+"em"}function V(F){var U=F.title,W=T;return P.isRightAnchor(U)?W=u:P.isLeftAnchor(U)&&(W=v),W}function H(F){var U=F.title,W="0em";return P.isTopAnchor(U)?W=i.CAP_SHIFT+"em":P.isMiddleAnchor(U)&&(W=i.MID_SHIFT+"em"),W}Q.doTraceStyle=function(F){var U=F.calcdata,W=[],q;for(q=0;q{var c=kg().readPaths,g=Rm(),P=C0().clearOutlineControllers,S=li(),t=js(),e=pu().arrayEditor,r=bp(),a=r.getPathString;$.exports={draw:n,drawOne:i,activateLastSelection:x};function n(v){var T=v._fullLayout;P(v),T._selectionLayer.selectAll("path").remove();for(var u in T._plots){var b=T._plots[u].selectionLayer;b&&b.selectAll("path").remove()}for(var _=0;_=0;V--){var H=M.append("path").attr(A).style("opacity",V?.1:h).call(S.stroke,k).call(S.fill,p).call(t.dashLine,V?"solid":R,V?4+w:w);if(s(H,v,b),O){var F=e(v.layout,"selections",b);H.style({cursor:"move"});var U={element:H.node(),plotinfo:_,gd:v,editHelpers:F,isActiveSelection:!0},W=c(E,v);g(W,H,U)}else H.style("pointer-events",V?"all":"none");N[V]=H}var q=N[0],X=N[1];X.node().addEventListener("click",function(){return f(v,q)})}}function s(v,T,u){var b=u.xref+u.yref;t.setClipUrl(v,"clip"+T._fullLayout._uid+b,T)}function f(v,T){if(o(v)){var u=T.node(),b=+u.getAttribute("data-index");if(b>=0){if(b===v._fullLayout._activeSelectionIndex){y(v);return}v._fullLayout._activeSelectionIndex=b,v._fullLayout._deactivateSelection=y,n(v)}}}function x(v){if(o(v)){var T=v._fullLayout.selections.length-1;v._fullLayout._activeSelectionIndex=T,v._fullLayout._deactivateSelection=y,n(v)}}function y(v){if(o(v)){var T=v._fullLayout._activeSelectionIndex;T>=0&&(P(v),delete v._fullLayout._activeSelectionIndex,n(v))}}}),yv=Ft((Q,$)=>{function c(){var g,P=0,S=!1;function t(e,r){return g.list.push({type:e,data:r?JSON.parse(JSON.stringify(r)):void 0}),g}return g={list:[],segmentId:function(){return P++},checkIntersection:function(e,r){return t("check",{seg1:e,seg2:r})},segmentChop:function(e,r){return t("div_seg",{seg:e,pt:r}),t("chop",{seg:e,pt:r})},statusRemove:function(e){return t("pop_seg",{seg:e})},segmentUpdate:function(e){return t("seg_update",{seg:e})},segmentNew:function(e,r){return t("new_seg",{seg:e,primary:r})},segmentRemove:function(e){return t("rem_seg",{seg:e})},tempStatus:function(e,r,a){return t("temp_status",{seg:e,above:r,below:a})},rewind:function(e){return t("rewind",{seg:e})},status:function(e,r,a){return t("status",{seg:e,above:r,below:a})},vert:function(e){return e===S?g:(S=e,t("vert",{x:e}))},log:function(e){return typeof e!="string"&&(e=JSON.stringify(e,!1," ")),t("log",{txt:e})},reset:function(){return t("reset")},selected:function(e){return t("selected",{segs:e})},chainStart:function(e){return t("chain_start",{seg:e})},chainRemoveHead:function(e,r){return t("chain_rem_head",{index:e,pt:r})},chainRemoveTail:function(e,r){return t("chain_rem_tail",{index:e,pt:r})},chainNew:function(e,r){return t("chain_new",{pt1:e,pt2:r})},chainMatch:function(e){return t("chain_match",{index:e})},chainClose:function(e){return t("chain_close",{index:e})},chainAddHead:function(e,r){return t("chain_add_head",{index:e,pt:r})},chainAddTail:function(e,r){return t("chain_add_tail",{index:e,pt:r})},chainConnect:function(e,r){return t("chain_con",{index1:e,index2:r})},chainReverse:function(e){return t("chain_rev",{index:e})},chainJoin:function(e,r){return t("chain_join",{index1:e,index2:r})},done:function(){return t("done")}},g}$.exports=c}),v6=Ft((Q,$)=>{function c(g){typeof g!="number"&&(g=1e-10);var P={epsilon:function(S){return typeof S=="number"&&(g=S),g},pointAboveOrOnLine:function(S,t,e){var r=t[0],a=t[1],n=e[0],o=e[1],i=S[0],s=S[1];return(n-r)*(s-a)-(o-a)*(i-r)>=-g},pointBetween:function(S,t,e){var r=S[1]-t[1],a=e[0]-t[0],n=S[0]-t[0],o=e[1]-t[1],i=n*a+r*o;if(i-g)},pointsSameX:function(S,t){return Math.abs(S[0]-t[0])g!=n-r>g&&(a-s)*(r-f)/(n-f)+s-e>g&&(o=!o),a=s,n=f}return o}};return P}$.exports=c}),pm=Ft((Q,$)=>{var c={create:function(){var g={root:{root:!0,next:null},exists:function(P){return!(P===null||P===g.root)},isEmpty:function(){return g.root.next===null},getHead:function(){return g.root.next},insertBefore:function(P,S){for(var t=g.root,e=g.root.next;e!==null;){if(S(e)){P.prev=e.prev,P.next=e,e.prev.next=P,e.prev=P;return}t=e,e=e.next}t.next=P,P.prev=t,P.next=null},findTransition:function(P){for(var S=g.root,t=g.root.next;t!==null&&!P(t);)S=t,t=t.next;return{before:S===g.root?null:S,after:t,insert:function(e){return e.prev=S,e.next=t,S.next=e,t!==null&&(t.prev=e),e}}}};return g},node:function(g){return g.prev=null,g.next=null,g.remove=function(){g.prev.next=g.next,g.next&&(g.next.prev=g.prev),g.prev=null,g.next=null},g}};$.exports=c}),Vy=Ft((Q,$)=>{var c=pm();function g(P,S,t){function e(T,u){return{id:t?t.segmentId():-1,start:T,end:u,myFill:{above:null,below:null},otherFill:null}}function r(T,u,b){return{id:t?t.segmentId():-1,start:T,end:u,myFill:{above:b.myFill.above,below:b.myFill.below},otherFill:null}}var a=c.create();function n(T,u,b,_,C,M){var E=S.pointsCompare(u,C);return E!==0?E:S.pointsSame(b,M)?0:T!==_?T?1:-1:S.pointAboveOrOnLine(b,_?C:M,_?M:C)?1:-1}function o(T,u){a.insertBefore(T,function(b){var _=n(T.isStart,T.pt,u,b.isStart,b.pt,b.other.pt);return _<0})}function i(T,u){var b=c.node({isStart:!0,pt:T.start,seg:T,primary:u,other:null,status:null});return o(b,T.end),b}function s(T,u,b){var _=c.node({isStart:!1,pt:u.end,seg:u,primary:b,other:T,status:null});T.other=_,o(_,T.pt)}function f(T,u){var b=i(T,u);return s(b,T,u),b}function x(T,u){t&&t.segmentChop(T.seg,u),T.other.remove(),T.seg.end=u,T.other.pt=u,o(T.other,T.pt)}function y(T,u){var b=r(u,T.seg.end,T.seg);return x(T,u),f(b,T.primary)}function v(T,u){var b=c.create();function _(H,F){var U=H.seg.start,W=H.seg.end,q=F.seg.start,X=F.seg.end;return S.pointsCollinear(U,q,X)?S.pointsCollinear(W,q,X)||S.pointAboveOrOnLine(W,q,X)?1:-1:S.pointAboveOrOnLine(U,q,X)?1:-1}function C(H){return b.findTransition(function(F){var U=_(H,F.ev);return U>0})}function M(H,F){var U=H.seg,W=F.seg,q=U.start,X=U.end,lt=W.start,yt=W.end;t&&t.checkIntersection(U,W);var pt=S.linesIntersect(q,X,lt,yt);if(pt===!1){if(!S.pointsCollinear(q,X,lt)||S.pointsSame(q,yt)||S.pointsSame(X,lt))return!1;var st=S.pointsSame(q,lt),tt=S.pointsSame(X,yt);if(st&&tt)return F;var dt=!st&&S.pointBetween(q,lt,yt),rt=!tt&&S.pointBetween(X,lt,yt);if(st)return rt?y(F,X):y(H,yt),F;dt&&(tt||(rt?y(F,X):y(H,yt)),y(F,q))}else pt.alongA===0&&(pt.alongB===-1?y(H,lt):pt.alongB===0?y(H,pt.pt):pt.alongB===1&&y(H,yt)),pt.alongB===0&&(pt.alongA===-1?y(F,q):pt.alongA===0?y(F,pt.pt):pt.alongA===1&&y(F,X));return!1}for(var E=[];!a.isEmpty();){var A=a.getHead();if(t&&t.vert(A.pt[0]),A.isStart){let H=function(){if(p){var F=M(A,p);if(F)return F}return k?M(A,k):!1};t&&t.segmentNew(A.seg,A.primary);var h=C(A),p=h.before?h.before.ev:null,k=h.after?h.after.ev:null;t&&t.tempStatus(A.seg,p?p.seg:!1,k?k.seg:!1);var w=H();if(w){if(P){var R;A.seg.myFill.below===null?R=!0:R=A.seg.myFill.above!==A.seg.myFill.below,R&&(w.seg.myFill.above=!w.seg.myFill.above)}else w.seg.otherFill=A.seg.myFill;t&&t.segmentUpdate(w.seg),A.other.remove(),A.remove()}if(a.getHead()!==A){t&&t.rewind(A.seg);continue}if(P){var R;A.seg.myFill.below===null?R=!0:R=A.seg.myFill.above!==A.seg.myFill.below,k?A.seg.myFill.below=k.seg.myFill.above:A.seg.myFill.below=T,R?A.seg.myFill.above=!A.seg.myFill.below:A.seg.myFill.above=A.seg.myFill.below}else if(A.seg.otherFill===null){var O;k?A.primary===k.primary?O=k.seg.otherFill.above:O=k.seg.myFill.above:O=A.primary?u:T,A.seg.otherFill={above:O,below:O}}t&&t.status(A.seg,p?p.seg:!1,k?k.seg:!1),A.other.status=h.insert(c.node({ev:A}))}else{var N=A.status;if(N===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(b.exists(N.prev)&&b.exists(N.next)&&M(N.prev.ev,N.next.ev),t&&t.statusRemove(N.ev.seg),N.remove(),!A.primary){var V=A.seg.myFill;A.seg.myFill=A.seg.otherFill,A.seg.otherFill=V}E.push(A.seg)}a.getHead().remove()}return t&&t.done(),E}return P?{addRegion:function(T){for(var u,b=T[T.length-1],_=0;_{function c(g,P,S){var t=[],e=[];return g.forEach(function(r){var a=r.start,n=r.end;if(P.pointsSame(a,n)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}S&&S.chainStart(r);var o={index:0,matches_head:!1,matches_pt1:!1},i={index:0,matches_head:!1,matches_pt1:!1},s=o;function f(O,N,V){return s.index=O,s.matches_head=N,s.matches_pt1=V,s===o?(s=i,!1):(s=null,!0)}for(var x=0;x{function c(P,S,t){var e=[];return P.forEach(function(r){var a=(r.myFill.above?8:0)+(r.myFill.below?4:0)+(r.otherFill&&r.otherFill.above?2:0)+(r.otherFill&&r.otherFill.below?1:0);S[a]!==0&&e.push({id:t?t.segmentId():-1,start:r.start,end:r.end,myFill:{above:S[a]===1,below:S[a]===2},otherFill:null})}),t&&t.selected(e),e}var g={union:function(P,S){return c(P,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],S)},intersect:function(P,S){return c(P,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],S)},difference:function(P,S){return c(P,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],S)},differenceRev:function(P,S){return c(P,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],S)},xor:function(P,S){return c(P,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],S)}};$.exports=g}),Hy=Ft((Q,$)=>{var c={toPolygon:function(g,P){function S(r){if(r.length<=0)return g.segments({inverted:!1,regions:[]});function a(i){var s=i.slice(0,i.length-1);return g.segments({inverted:!1,regions:[s]})}for(var n=a(r[0]),o=1;o{var c=yv(),g=v6(),P=Vy(),S=Tw(),t=N_(),e=Hy(),r=!1,a=g(),n;n={buildLog:function(i){return i===!0?r=c():i===!1&&(r=!1),r===!1?!1:r.list},epsilon:function(i){return a.epsilon(i)},segments:function(i){var s=P(!0,a,r);return i.regions.forEach(s.addRegion),{segments:s.calculate(i.inverted),inverted:i.inverted}},combine:function(i,s){var f=P(!1,a,r);return{combined:f.calculate(i.segments,i.inverted,s.segments,s.inverted),inverted1:i.inverted,inverted2:s.inverted}},selectUnion:function(i){return{segments:t.union(i.combined,r),inverted:i.inverted1||i.inverted2}},selectIntersect:function(i){return{segments:t.intersect(i.combined,r),inverted:i.inverted1&&i.inverted2}},selectDifference:function(i){return{segments:t.difference(i.combined,r),inverted:i.inverted1&&!i.inverted2}},selectDifferenceRev:function(i){return{segments:t.differenceRev(i.combined,r),inverted:!i.inverted1&&i.inverted2}},selectXor:function(i){return{segments:t.xor(i.combined,r),inverted:i.inverted1!==i.inverted2}},polygon:function(i){return{regions:S(i.segments,a,r),inverted:i.inverted}},polygonFromGeoJSON:function(i){return e.toPolygon(n,i)},polygonToGeoJSON:function(i){return e.fromPolygon(n,a,i)},union:function(i,s){return o(i,s,n.selectUnion)},intersect:function(i,s){return o(i,s,n.selectIntersect)},difference:function(i,s){return o(i,s,n.selectDifference)},differenceRev:function(i,s){return o(i,s,n.selectDifferenceRev)},xor:function(i,s){return o(i,s,n.selectXor)}};function o(i,s,f){var x=n.segments(i),y=n.segments(s),v=n.combine(x,y),T=f(v);return n.polygon(T)}typeof window=="object"&&(window.PolyBool=n),$.exports=n}),Wy=Ft((Q,$)=>{$.exports=function(c,g,P,S){var t=c[0],e=c[1],r=!1;P===void 0&&(P=0),S===void 0&&(S=g.length);for(var a=S-P,n=0,o=a-1;ne!=x>e&&t<(f-i)*(e-s)/(x-s)+i;y&&(r=!r)}return r}}),mm=Ft((Q,$)=>{var c=w_().dot,g=Da().BADNUM,P=$.exports={};P.tester=function(S){var t=S.slice(),e=t[0][0],r=e,a=t[0][1],n=a,o;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),o=1;or||_===g||_n||u&&s(T))}function x(T,u){var b=T[0],_=T[1];if(b===g||br||_===g||_n)return!1;var C=t.length,M=t[0][0],E=t[0][1],A=0,h,p,k,w,R;for(h=1;hMath.max(p,M)||_>Math.max(k,E)))if(_o||Math.abs(c(x,s))>r)return!0;return!1},P.filter=function(S,t){var e=[S[0]],r=0,a=0;function n(i){S.push(i);var s=e.length,f=r;e.splice(a+1);for(var x=f+1;x1){var o=S.pop();n(o)}return{addPt:n,raw:S,filtered:e}}}),qy=Ft((Q,$)=>{$.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}),U_=Ft((Q,$)=>{var c=j_(),g=Wy(),P=Xo(),S=js().dashStyle,t=li(),e=Qh(),r=Dp().makeEventData,a=v0(),n=a.freeMode,o=a.rectMode,i=a.drawMode,s=a.openMode,f=a.selectMode,x=bp(),y=Ny(),v=Rm(),T=C0().clearOutline,u=kg(),b=u.handleEllipse,_=u.readPaths,C=a0().newShapes,M=Tg(),E=kw().activateLastSelection,A=bn(),h=A.sorterAsc,p=mm(),k=A_(),w=Rc().getFromId,R=mv(),O=y0().redrawReglTraces,N=qy(),V=N.MINSELECT,H=p.filter,F=p.tester,U=By(),W=U.p2r,q=U.axValue,X=U.getTransform;function lt($t){return $t.subplot!==void 0}function yt($t,ne,Ct,gt,St){var Nt=!lt(gt),ee=n(St),le=o(St),we=s(St),Ue=i(St),qe=f(St),ar=St==="drawline",Ar=St==="drawcircle",Tr=ar||Ar,pr=gt.gd,Jr=pr._fullLayout,Vn=qe&&Jr.newselection.mode==="immediate"&&Nt,Hn=Jr._zoomlayer,Kn=gt.element.getBoundingClientRect(),Ci=gt.plotinfo,ii=X(Ci),qn=ne-Kn.left,oa=Ct-Kn.top;Jr._calcInverseTransform(pr);var Hi=A.apply3DTransform(Jr._invTransform)(qn,oa);qn=Hi[0],oa=Hi[1];var We=Jr._invScaleX,rr=Jr._invScaleY,fr=qn,xr=oa,Qr="M"+qn+","+oa,Cn=gt.xaxes[0],wn=gt.yaxes[0],Mn=Cn._length,ci=wn._length,xi=$t.altKey&&!(i(St)&&we),Pi,Di,Zi,ui,Pa,Wa,ze;at($t,pr,gt),ee&&(Pi=H([[qn,oa]],N.BENDPX));var Pe=Hn.selectAll("path.select-outline-"+Ci.id).data([1]),Rr=Ue?Jr.newshape:Jr.newselection;Ue&&(gt.hasText=Rr.label.text||Rr.label.texttemplate);var qr=Ue&&!we?Rr.fillcolor:"rgba(0,0,0,0)",$r=Rr.line.color||(Nt?t.contrast(pr._fullLayout.plot_bgcolor):"#7f7f7f");Pe.enter().append("path").attr("class","select-outline select-outline-"+Ci.id).style({opacity:Ue?Rr.opacity/2:1,"stroke-dasharray":S(Rr.line.dash,Rr.line.width),"stroke-width":Rr.line.width+"px","shape-rendering":"crispEdges"}).call(t.stroke,$r).call(t.fill,qr).attr("fill-rule","evenodd").classed("cursor-move",!!Ue).attr("transform",ii).attr("d",Qr+"Z");var Br=Hn.append("path").attr("class","zoombox-corners").style({fill:t.background,stroke:t.defaultLine,"stroke-width":1}).attr("transform",ii).attr("d","M0,0Z");if(Ue&>.hasText){var Gr=Hn.select(".label-temp");Gr.empty()&&(Gr=Hn.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var dn=Jr._uid+N.SELECTID,an=[],Ee=ut(pr,gt.xaxes,gt.yaxes,gt.subplot);Vn&&!$t.shiftKey&&(gt._clearSubplotSelections=function(){if(Nt){var Vr=Cn._id,yn=wn._id;oe(pr,Vr,yn,Ee);for(var Fn=(pr.layout||{}).selections||[],Xn=[],Pn=!1,En=0;En=0){pr._fullLayout._deactivateShape(pr);return}if(!Ue){var Fn=Jr.clickmode;k.done(dn).then(function(){if(k.clear(dn),Vr===2){for(Pe.remove(),Pa=0;Pa-1&&pt(yn,pr,gt.xaxes,gt.yaxes,gt.subplot,gt,Pe),Fn==="event"&&rn(pr,void 0);e.click(pr,yn,Ci.id)}).catch(A.error)}},gt.doneFn=function(){Br.remove(),k.done(dn).then(function(){k.clear(dn),!Vn&&ui&>.selectionDefs&&(ui.subtract=xi,gt.selectionDefs.push(ui),gt.mergedPolygons.length=0,[].push.apply(gt.mergedPolygons,Zi)),(Vn||Ue)&&Y(gt,Vn),gt.doneFnCompleted&>.doneFnCompleted(an),qe&&rn(pr,ze)}).catch(A.error)}}function pt($t,ne,Ct,gt,St,Nt,ee){var le=ne._hoverdata,we=ne._fullLayout,Ue=we.clickmode,qe=Ue.indexOf("event")>-1,ar=[],Ar,Tr,pr,Jr,Vn,Hn,Kn,Ci,ii,qn;if(zt(le)){at($t,ne,Nt),Ar=ut(ne,Ct,gt,St);var oa=Pt(le,Ar),Hi=oa.pointNumbers.length>0;if(Hi?Ht(Ar,oa):Jt(Ar)&&(Kn=Wt(oa))){for(ee&&ee.remove(),qn=0;qn=0}function it($t){return $t._fullLayout._activeSelectionIndex>=0}function Y($t,ne){var Ct=$t.dragmode,gt=$t.plotinfo,St=$t.gd;vt(St)&&St._fullLayout._deactivateShape(St),it(St)&&St._fullLayout._deactivateSelection(St);var Nt=St._fullLayout,ee=Nt._zoomlayer,le=i(Ct),we=f(Ct);if(le||we){var Ue=ee.selectAll(".select-outline-"+gt.id);if(Ue&&St._fullLayout._outlining){var qe;le&&(qe=C(Ue,$t)),qe&&P.call("_guiRelayout",St,{shapes:qe});var ar;we&&!lt($t)&&(ar=M(Ue,$t)),ar&&(St._fullLayout._noEmitSelectedAtStart=!0,P.call("_guiRelayout",St,{selections:ar}).then(function(){ne&&E(St)})),St._fullLayout._outlining=!1}}gt.selection={},gt.selection.selectionDefs=$t.selectionDefs=[],gt.selection.mergedPolygons=$t.mergedPolygons=[]}function ft($t){return $t._id}function ut($t,ne,Ct,gt){if(!$t.calcdata)return[];var St=[],Nt=ne.map(ft),ee=Ct.map(ft),le,we,Ue;for(Ue=0;Ue<$t.calcdata.length;Ue++)if(le=$t.calcdata[Ue],we=le[0].trace,!(we.visible!==!0||!we._module||!we._module.selectPoints))if(lt({subplot:gt})&&(we.subplot===gt||we.geo===gt))St.push(wt(we._module,le,ne[0],Ct[0]));else if(we.type==="splom"){if(we._xaxes[Nt[0]]&&we._yaxes[ee[0]]){var qe=wt(we._module,le,ne[0],Ct[0]);qe.scene=$t._fullLayout._splomScenes[we.uid],St.push(qe)}}else if(we.type==="sankey"){var ar=wt(we._module,le,ne[0],Ct[0]);St.push(ar)}else{if(Nt.indexOf(we.xaxis)===-1&&(!we._xA||!we._xA.overlaying)||ee.indexOf(we.yaxis)===-1&&(!we._yA||!we._yA.overlaying))continue;St.push(wt(we._module,le,w($t,we.xaxis),w($t,we.yaxis)))}return St}function wt($t,ne,Ct,gt){return{_module:$t,cd:ne,xaxis:Ct,yaxis:gt}}function zt($t){return $t&&Array.isArray($t)&&$t[0].hoverOnBox!==!0}function Pt($t,ne){var Ct=$t[0],gt=-1,St=[],Nt,ee;for(ee=0;ee0,Nt=St?gt[0]:Ct;return ne.selectedpoints?ne.selectedpoints.indexOf(Nt)>-1:!1}function Ht($t,ne){var Ct=[],gt,St,Nt,ee;for(ee=0;ee<$t.length;ee++)gt=$t[ee],gt.cd[0].trace.selectedpoints&>.cd[0].trace.selectedpoints.length>0&&Ct.push(gt);if(Ct.length===1&&(Nt=Ct[0]===ne.searchInfo,Nt&&(St=ne.searchInfo.cd[0].trace,St.selectedpoints.length===ne.pointNumbers.length))){for(ee=0;ee1||(ne+=gt.selectedpoints.length,ne>1)))return!1;return ne===1}function ge($t,ne,Ct){var gt;for(gt=0;gt-1&≠if(!ee&&ne){var Vr=He($t,!0);if(Vr.length){var yn=Vr[0].xref,Fn=Vr[0].yref;if(yn&&Fn){var Xn=ur(Vr),Pn=Hr([w($t,yn,"x"),w($t,Fn,"y")]);Pn(an,Xn)}}$t._fullLayout._noEmitSelectedAtStart?$t._fullLayout._noEmitSelectedAtStart=!1:dr&&rn($t,an),Ar._reselect=!1}if(!ee&&Ar._deselect){var En=Ar._deselect;le=En.xref,we=En.yref,ve(le,we,qe)||oe($t,le,we,gt),dr&&(an.points.length?rn($t,an):Ce($t)),Ar._deselect=!1}return{eventData:an,selectionTesters:Ct}}function te($t){var ne=$t.calcdata;if(ne)for(var Ct=0;Ct{$.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]}),Zy=Ft((Q,$)=>{$.exports={axisRefDescription:function(c,g,P){return["If set to a",c,"axis id (e.g. *"+c+"* or","*"+c+"2*), the `"+c+"` position refers to a",c,"coordinate. If set to *paper*, the `"+c+"`","position refers to the distance from the",g,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",g,"("+P+"). If set to a",c,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",g,"of the domain of that axis: e.g.,","*"+c+"2 domain* refers to the domain of the second",c," axis and a",c,"position of 0.5 refers to the","point between the",g,"and the",P,"of the domain of the","second",c,"axis."].join(" ")}}}),gm=Ft((Q,$)=>{var c=V_(),g=Ea(),P=ic(),S=pu().templatedArray;Zy(),$.exports=S("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:g({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:c.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:c.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",P.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",P.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",P.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",P.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:g({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})}),vm=Ft((Q,$)=>{$.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}}),z0=Ft((Q,$)=>{$.exports=function(c){return{valType:"color",editType:"style",anim:!0}}}),tf=Ft((Q,$)=>{var c=fh().axisHoverFormat,{hovertemplateAttrs:g,texttemplateAttrs:P,templatefallbackAttrs:S}=$u(),t=Tc(),e=Ea(),r=Td().dash,a=Td().pattern,n=js(),o=vm(),i=Ta().extendFlat,s=z0();function f(v){return{valType:"any",dflt:0,editType:"calc"}}function x(v){return{valType:"any",editType:"calc"}}function y(v){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}$.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:f(),yperiod:f(),xperiod0:x(),yperiod0:x(),xperiodalignment:y(),yperiodalignment:y(),xhoverformat:c("x"),yhoverformat:c("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:P(),texttemplatefallback:S({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:g({},{keys:o.eventDataKeys}),hovertemplatefallback:S(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:i({},r,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:s(!0),fillgradient:i({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:a,marker:i({symbol:{valType:"enumerated",values:n.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:i({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},t("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},t("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:e({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}}),H_=Ft((Q,$)=>{var c=gm(),g=tf().line,P=Td().dash,S=Ta().extendFlat,t=Yc().overrideAll,e=pu().templatedArray;Zy(),$.exports=t(e("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:S({},c.xref,{}),yref:S({},c.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:g.color,width:S({},g.width,{min:1,dflt:1}),dash:S({},P,{dflt:"dot"})}}),"arraydraw","from-root")}),y6=Ft((Q,$)=>{var c=bn(),g=Es(),P=Md(),S=H_(),t=bp();$.exports=function(r,a){P(r,a,{name:"selections",handleItemDefaults:e});for(var n=a.selections,o=0;o{$.exports=function(c,g,P){P("newselection.mode");var S=P("newselection.line.width");S&&(P("newselection.line.color"),P("newselection.line.dash")),P("activeselection.fillcolor"),P("activeselection.opacity")}}),Ag=Ft((Q,$)=>{var c=Xo(),g=bn(),P=Rc();$.exports=function(S){return function(t,e){var r=t[S];if(Array.isArray(r))for(var a=c.subplotsRegistry.cartesian,n=a.idRegex,o=e._subplots,i=o.xaxis,s=o.yaxis,f=o.cartesian,x=e._has("cartesian"),y=0;y{var c=kw(),g=U_();$.exports={moduleType:"component",name:"selections",layoutAttributes:H_(),supplyLayoutDefaults:y6(),supplyDrawNewSelectionDefaults:X0(),includeBasePlot:Ag()("selections"),draw:c.draw,drawOne:c.drawOne,reselect:g.reselect,prepSelect:g.prepSelect,clearOutline:g.clearOutline,clearSelectionsCache:g.clearSelectionsCache,selectOnClick:g.selectOnClick}}),S1=Ft((Q,$)=>{var c=un(),g=bn(),P=g.numberFormat,S=fo(),t=C_(),e=Xo(),r=g.strTranslate,a=tc(),n=li(),o=js(),i=Qh(),s=Es(),f=P0(),x=up(),y=v0(),v=y.selectingOrDrawing,T=y.freeMode,u=Af().FROM_TL,b=mv(),_=y0().redrawReglTraces,C=Kc(),M=Rc().getFromId,E=vf().prepSelect,A=vf().clearOutline,h=vf().selectOnClick,p=Uy(),k=ic(),w=k.MINDRAG,R=k.MINZOOM,O=!0;function N(wt,zt,Pt,Wt,Ht,Jt,ge,he){var de=wt._fullLayout._zoomlayer,se=ge+he==="nsew",Tt=(ge+he).length===1,Lt,Mt,te,ve,oe,Te,He,Ge,cr,ur,jr,Hr,br,Kr,rn,Ce,$t,ne,Ct,gt,St,Nt,ee;Pt+=zt.yaxis._shift;function le(){if(Lt=zt.xaxis,Mt=zt.yaxis,cr=Lt._length,ur=Mt._length,He=Lt._offset,Ge=Mt._offset,te={},te[Lt._id]=Lt,ve={},ve[Mt._id]=Mt,ge&&he)for(var Pe=zt.overlays,Rr=0;Rr=0){qr._fullLayout._deactivateShape(qr);return}var $r=qr._fullLayout.clickmode;if(dt(qr),Pe===2&&!Tt&&Di(),se)$r.indexOf("select")>-1&&h(Rr,qr,oe,Te,zt.id,qe),$r.indexOf("event")>-1&&i.click(qr,Rr,zt.id);else if(Pe===1&&Tt){var Br=ge?Mt:Lt,Gr=ge==="s"||he==="w"?0:1,dn=Br._name+".range["+Gr+"]",an=U(Br,Gr),Ee="left",dr="middle";if(Br.fixedrange)return;ge?(dr=ge==="n"?"top":"bottom",Br.side==="right"&&(Ee="right")):he==="e"&&(Ee="right"),qr._context.showAxisRangeEntryBoxes&&c.select(Ue).call(a.makeEditable,{gd:qr,immediate:!0,background:qr._fullLayout.paper_bgcolor,text:String(an),fill:Br.tickfont?Br.tickfont.color:"#444",horizontalAlign:Ee,verticalAlign:dr}).on("edit",function(Vr){var yn=Br.d2r(Vr);yn!==void 0&&e.call("_guiRelayout",qr,dn,yn)})}}x.init(qe);var Tr,pr,Jr,Vn,Hn,Kn,Ci,ii,qn,oa;function Hi(Pe,Rr,qr){var $r=Ue.getBoundingClientRect();Tr=Rr-$r.left,pr=qr-$r.top,wt._fullLayout._calcInverseTransform(wt);var Br=g.apply3DTransform(wt._fullLayout._invTransform)(Tr,pr);Tr=Br[0],pr=Br[1],Jr={l:Tr,r:Tr,w:0,t:pr,b:pr,h:0},Vn=wt._hmpixcount?wt._hmlumcount/wt._hmpixcount:S(wt._fullLayout.plot_bgcolor).getLuminance(),Hn="M0,0H"+cr+"V"+ur+"H0V0",Kn=!1,Ci="xy",oa=!1,ii=yt(de,Vn,He,Ge,Hn),qn=pt(de,He,Ge)}function We(Pe,Rr){if(wt._transitioningWithDuration)return!1;var qr=Math.max(0,Math.min(cr,Nt*Pe+Tr)),$r=Math.max(0,Math.min(ur,ee*Rr+pr)),Br=Math.abs(qr-Tr),Gr=Math.abs($r-pr);Jr.l=Math.min(Tr,qr),Jr.r=Math.max(Tr,qr),Jr.t=Math.min(pr,$r),Jr.b=Math.max(pr,$r);function dn(){Ci="",Jr.r=Jr.l,Jr.t=Jr.b,qn.attr("d","M0,0Z")}if(jr.isSubplotConstrained)Br>R||Gr>R?(Ci="xy",Br/cr>Gr/ur?(Gr=Br*ur/cr,pr>$r?Jr.t=pr-Gr:Jr.b=pr+Gr):(Br=Gr*cr/ur,Tr>qr?Jr.l=Tr-Br:Jr.r=Tr+Br),qn.attr("d",it(Jr))):dn();else if(Hr.isSubplotConstrained)if(Br>R||Gr>R){Ci="xy";var an=Math.min(Jr.l/cr,(ur-Jr.b)/ur),Ee=Math.max(Jr.r/cr,(ur-Jr.t)/ur);Jr.l=an*cr,Jr.r=Ee*cr,Jr.b=(1-an)*ur,Jr.t=(1-Ee)*ur,qn.attr("d",it(Jr))}else dn();else!Kr||Gr0){var Vr;if(Hr.isSubplotConstrained||!br&&Kr.length===1){for(Vr=0;Vr1&&(dn.maxallowed!==void 0&&Ce===(dn.range[0]1&&(an.maxallowed!==void 0&&$t===(an.range[0]=0?Math.min(wt,.9):1/(1/Math.max(wt,-.3)+3.222))}function lt(wt,zt,Pt){return wt?wt==="nsew"?Pt?"":zt==="pan"?"move":"crosshair":wt.toLowerCase()+"-resize":"pointer"}function yt(wt,zt,Pt,Wt,Ht){return wt.append("path").attr("class","zoombox").style({fill:zt>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",r(Pt,Wt)).attr("d",Ht+"Z")}function pt(wt,zt,Pt){return wt.append("path").attr("class","zoombox-corners").style({fill:n.background,stroke:n.defaultLine,"stroke-width":1,opacity:0}).attr("transform",r(zt,Pt)).attr("d","M0,0Z")}function st(wt,zt,Pt,Wt,Ht,Jt){wt.attr("d",Wt+"M"+Pt.l+","+Pt.t+"v"+Pt.h+"h"+Pt.w+"v-"+Pt.h+"h-"+Pt.w+"Z"),tt(wt,zt,Ht,Jt)}function tt(wt,zt,Pt,Wt){Pt||(wt.transition().style("fill",Wt>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),zt.transition().style("opacity",1).duration(200))}function dt(wt){c.select(wt).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function rt(wt){O&&wt.data&&wt._context.showTips&&(g.notifier(g._(wt,"Double-click to zoom back out"),"long"),O=!1)}function at(wt,zt){return"M"+(wt.l-.5)+","+(zt-R-.5)+"h-3v"+(2*R+1)+"h3ZM"+(wt.r+.5)+","+(zt-R-.5)+"h3v"+(2*R+1)+"h-3Z"}function vt(wt,zt){return"M"+(zt-R-.5)+","+(wt.t-.5)+"v-3h"+(2*R+1)+"v3ZM"+(zt-R-.5)+","+(wt.b+.5)+"v3h"+(2*R+1)+"v-3Z"}function it(wt){var zt=Math.floor(Math.min(wt.b-wt.t,wt.r-wt.l,R)/2);return"M"+(wt.l-3.5)+","+(wt.t-.5+zt)+"h3v"+-zt+"h"+zt+"v-3h-"+(zt+3)+"ZM"+(wt.r+3.5)+","+(wt.t-.5+zt)+"h-3v"+-zt+"h"+-zt+"v-3h"+(zt+3)+"ZM"+(wt.r+3.5)+","+(wt.b+.5-zt)+"h-3v"+zt+"h"+-zt+"v3h"+(zt+3)+"ZM"+(wt.l-3.5)+","+(wt.b+.5-zt)+"h3v"+zt+"h"+zt+"v3h-"+(zt+3)+"Z"}function Y(wt,zt,Pt,Wt,Ht){for(var Jt=!1,ge={},he={},de,se,Tt,Lt,Mt=(Ht||{}).xaHash,te=(Ht||{}).yaHash,ve=0;ve{var $=un(),c=Qh(),g=up(),P=P0(),S=S1().makeDragBox,t=ic().DRAGGERSIZE;Q.initInteractions=function(e){var r=e._fullLayout;if(e._context.staticPlot){$.select(e).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var a=Object.keys(r._plots||{}).sort(function(o,i){if((r._plots[o].mainplot&&!0)===(r._plots[i].mainplot&&!0)){var s=o.split("y"),f=i.split("y");return s[0]===f[0]?Number(s[1]||1)-Number(f[1]||1):Number(s[0]||1)-Number(f[0]||1)}return r._plots[o].mainplot?1:-1});a.forEach(function(o){var i=r._plots[o],s=i.xaxis,f=i.yaxis;if(!i.mainplot){var x=S(e,i,s._offset,f._offset,s._length,f._length,"ns","ew");x.onmousemove=function(T){e._fullLayout._rehover=function(){e._fullLayout._hoversubplot===o&&e._fullLayout._plots[o]&&c.hover(e,T,o)},c.hover(e,T,o),e._fullLayout._lasthover=x,e._fullLayout._hoversubplot=o},x.onmouseout=function(T){e._dragging||(e._fullLayout._hoversubplot=null,g.unhover(e,T))},e._context.showAxisDragHandles&&(S(e,i,s._offset-t,f._offset-t,t,t,"n","w"),S(e,i,s._offset+s._length,f._offset-t,t,t,"n","e"),S(e,i,s._offset-t,f._offset+f._length,t,t,"s","w"),S(e,i,s._offset+s._length,f._offset+f._length,t,t,"s","e"))}if(e._context.showAxisDragHandles){if(o===s._mainSubplot){var y=s._mainLinePosition;s.side==="top"&&(y-=t),S(e,i,s._offset+s._length*.1,y,s._length*.8,t,"","ew"),S(e,i,s._offset,y,s._length*.1,t,"","w"),S(e,i,s._offset+s._length*.9,y,s._length*.1,t,"","e")}if(o===f._mainSubplot){var v=f._mainLinePosition;f.side!=="right"&&(v-=t),S(e,i,v,f._offset+f._length*.1,t,f._length*.8,"ns",""),S(e,i,v,f._offset+f._length*.9,t,f._length*.1,"s",""),S(e,i,v,f._offset,t,f._length*.1,"n","")}}});var n=r._hoverlayer.node();n.onmousemove=function(o){o.target=e._fullLayout._lasthover,c.hover(e,o,r._hoversubplot)},n.onclick=function(o){o.target=e._fullLayout._lasthover,c.click(e,o)},n.onmousedown=function(o){e._fullLayout._lasthover.onmousedown(o)},Q.updateFx(e)}},Q.updateFx=function(e){var r=e._fullLayout,a=r.dragmode==="pan"?"move":"crosshair";P(r._draggers,a)}}),Mw=Ft((Q,$)=>{var c=Xo();$.exports=function(g){for(var P=c.layoutArrayContainers,S=c.layoutArrayRegexes,t=g.split("[")[0],e,r,a=0;a{var $=Ei(),c=Oo(),g=Ko(),P=T_().sorterAsc,S=Xo();Q.containerArrayMatch=Mw();var t=Q.isAddVal=function(r){return r==="add"||$(r)},e=Q.isRemoveVal=function(r){return r===null||r==="remove"};Q.applyContainerArrayChanges=function(r,a,n,o,i){var s=a.astr,f=S.getComponentMethod(s,"supplyLayoutDefaults"),x=S.getComponentMethod(s,"draw"),y=S.getComponentMethod(s,"drawOne"),v=o.replot||o.recalc||f===c||x===c,T=r.layout,u=r._fullLayout;if(n[""]){Object.keys(n).length>1&&g.warn("Full array edits are incompatible with other edits",s);var b=n[""][""];if(e(b))a.set(null);else if(Array.isArray(b))a.set(b);else return g.warn("Unrecognized full array edit value",s,b),!0;return v?!1:(f(T,u),x(r),!0)}var _=Object.keys(n).map(Number).sort(P),C=a.get(),M=C||[],E=i(u,s).get(),A=[],h=-1,p=M.length,k,w,R,O,N,V,H,F;for(k=0;k<_.length;k++){if(R=_[k],O=n[R],N=Object.keys(O),V=O[""],H=t(V),R<0||R>M.length-(H?0:1)){g.warn("index out of range",s,R);continue}if(V!==void 0)N.length>1&&g.warn("Insertion & removal are incompatible with edits to the same index.",s,R),e(V)?A.push(R):H?(V==="add"&&(V={}),M.splice(R,0,V),E&&E.splice(R,0,{})):g.warn("Unrecognized full object edit value",s,R,V),h===-1&&(h=R);else for(w=0;w=0;k--)M.splice(A[k],1),E&&E.splice(A[k],1);if(M.length?C||a.set(M):a.set(null),v)return!1;if(f(T,u),y!==c){var U;if(h===-1)U=_;else{for(p=Math.max(M.length,p),U=[],k=0;k<_.length&&(R=_[k],!(R>=h));k++)U.push(R);for(k=h;k{var $=ra(),c=Xo(),g=bn(),P=Kc(),S=Rc(),t=li(),e=S.cleanId,r=S.getFromTrace,a=c.traceIs,n=["x","y","z"];Q.clearPromiseQueue=function(u){Array.isArray(u._promises)&&u._promises.length>0&&g.log("Clearing previous rejected promises from queue."),u._promises=[]},Q.cleanLayout=function(u){var b;u||(u={}),u.xaxis1&&(u.xaxis||(u.xaxis=u.xaxis1),delete u.xaxis1),u.yaxis1&&(u.yaxis||(u.yaxis=u.yaxis1),delete u.yaxis1),u.scene1&&(u.scene||(u.scene=u.scene1),delete u.scene1);var _=(P.subplotsRegistry.cartesian||{}).attrRegex;(P.subplotsRegistry.polar||{}).attrRegex,(P.subplotsRegistry.ternary||{}).attrRegex,(P.subplotsRegistry.gl3d||{}).attrRegex;var C=Object.keys(u);for(b=0;b3?(O.x=1.02,O.xanchor="left"):O.x<-2&&(O.x=-.02,O.xanchor="right"),O.y>3?(O.y=1.02,O.yanchor="bottom"):O.y<-2&&(O.y=-.02,O.yanchor="top")),u.dragmode==="rotate"&&(u.dragmode="orbit"),t.clean(u),u.template&&u.template.layout&&Q.cleanLayout(u.template.layout),u};function o(u,b){var _=u[b],C=b.charAt(0);_&&_!=="paper"&&(u[b]=e(_,C,!0))}Q.cleanData=function(u){for(var b=0;b0)return u.substr(0,b)}Q.hasParent=function(u,b){for(var _=v(b);_;){if(_ in u)return!0;_=v(_)}return!1},Q.clearAxisTypes=function(u,b,_){for(var C=0;C{let _=(...C)=>C.every(M=>g.isPlainObject(M))||C.every(M=>Array.isArray(M));if([u,b].every(C=>Array.isArray(C))){if(u.length!==b.length)return!1;for(let C=0;Cg.isPlainObject(C))){if(Object.keys(u).length!==Object.keys(b).length)return!1;for(let C in u){if(C.startsWith("_"))continue;let M=u[C],E=b[C];if(M!==E&&!(_(M,E)&&T(M,E)))return!1}return!0}return!1};Q.collectionsAreEqual=T}),W_=Ft(Q=>{var $=un(),c=ra(),g=Rf(),P=bn(),S=P.nestedProperty,t=Om(),e=m0(),r=Xo(),a=Dm(),n=Kc(),o=Es(),i=E_(),s=Ad(),f=js(),x=li(),y=Aw().initInteractions,v=Op(),T=vf().clearOutline,u=ms().dfltConfig,b=x6(),_=E1(),C=y0(),M=Yc(),E=ic().AX_NAME_PATTERN,A=0,h=5;function p(Ct,gt,St,Nt){var ee;if(Ct=P.getGraphDiv(Ct),t.init(Ct),P.isPlainObject(gt)){var le=gt;gt=le.data,St=le.layout,Nt=le.config,ee=le.frames}var we=t.triggerHandler(Ct,"plotly_beforeplot",[gt,St,Nt]);if(we===!1)return Promise.reject();!gt&&!St&&!P.isPlotDiv(Ct)&&P.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",Ct);function Ue(){if(ee)return Q.addFrames(Ct,ee)}N(Ct,Nt),St||(St={}),$.select(Ct).classed("js-plotly-plot",!0),f.makeTester(),Array.isArray(Ct._promises)||(Ct._promises=[]);var qe=(Ct.data||[]).length===0&&Array.isArray(gt);Array.isArray(gt)&&(_.cleanData(gt),qe?Ct.data=gt:Ct.data.push.apply(Ct.data,gt),Ct.empty=!1),(!Ct.layout||qe)&&(Ct.layout=_.cleanLayout(St)),n.supplyDefaults(Ct);var ar=Ct._fullLayout,Ar=ar._has("cartesian");ar._replotting=!0,(qe||ar._shouldCreateBgLayer)&&(ne(Ct),ar._shouldCreateBgLayer&&delete ar._shouldCreateBgLayer),f.initGradients(Ct),f.initPatterns(Ct),qe&&o.saveShowSpikeInitial(Ct);var Tr=!Ct.calcdata||Ct.calcdata.length!==(Ct._fullData||[]).length;Tr&&n.doCalcdata(Ct);for(var pr=0;pr=Ct.data.length||ee<-Ct.data.length)throw new Error(St+" must be valid indices for gd.data.");if(gt.indexOf(ee,Nt+1)>-1||ee>=0&>.indexOf(-Ct.data.length+ee)>-1||ee<0&>.indexOf(Ct.data.length+ee)>-1)throw new Error("each index in "+St+" must be unique.")}}function W(Ct,gt,St){if(!Array.isArray(Ct.data))throw new Error("gd.data must be an array.");if(typeof gt>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(gt)||(gt=[gt]),U(Ct,gt,"currentIndices"),typeof St<"u"&&!Array.isArray(St)&&(St=[St]),typeof St<"u"&&U(Ct,St,"newIndices"),typeof St<"u"&>.length!==St.length)throw new Error("current and new indices must be of equal length.")}function q(Ct,gt,St){var Nt,ee;if(!Array.isArray(Ct.data))throw new Error("gd.data must be an array.");if(typeof gt>"u")throw new Error("traces must be defined.");for(Array.isArray(gt)||(gt=[gt]),Nt=0;Nt"u")throw new Error("indices must be an integer or array of integers");U(Ct,St,"indices");for(var le in gt){if(!Array.isArray(gt[le])||gt[le].length!==St.length)throw new Error("attribute "+le+" must be an array of length equal to indices array length");if(ee&&(!(le in Nt)||!Array.isArray(Nt[le])||Nt[le].length!==gt[le].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}}function lt(Ct,gt,St,Nt){var ee=P.isPlainObject(Nt),le=[],we,Ue,qe,ar,Ar;Array.isArray(St)||(St=[St]),St=F(St,Ct.data.length-1);for(var Tr in gt)for(var pr=0;pr=0&&Ar=0&&Ar"u")return ar=Q.redraw(Ct),e.add(Ct,ee,we,le,Ue),ar;Array.isArray(St)||(St=[St]);try{W(Ct,Nt,St)}catch(Ar){throw Ct.data.splice(Ct.data.length-gt.length,gt.length),Ar}return e.startSequence(Ct),e.add(Ct,ee,we,le,Ue),ar=Q.moveTraces(Ct,Nt,St),e.stopSequence(Ct),ar}function rt(Ct,gt){Ct=P.getGraphDiv(Ct);var St=[],Nt=Q.addTraces,ee=rt,le=[Ct,St,gt],we=[Ct,gt],Ue,qe;if(typeof gt>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(gt)||(gt=[gt]),U(Ct,gt,"indices"),gt=F(gt,Ct.data.length-1),gt.sort(P.sorterDes),Ue=0;Ue"u")for(St=[],ar=0;ar0&&typeof fr.parts[Cn]!="string";)Cn--;var wn=fr.parts[Cn],Mn=fr.parts[Cn-1]+"."+wn,ci=fr.parts.slice(0,Cn).join("."),xi=S(Ct.layout,ci).get(),Pi=S(Nt,ci).get(),Di=fr.get();if(xr!==void 0){Ci[rr]=xr,ii[rr]=wn==="reverse"?xr:it(Di);var Zi=a.getLayoutValObject(Nt,fr.parts);if(Zi&&Zi.impliedEdits&&xr!==null)for(var ui in Zi.impliedEdits)qn(P.relativeAttr(rr,ui),Zi.impliedEdits[ui]);if(["width","height"].indexOf(rr)!==-1)if(xr){qn("autosize",null);var Pa=rr==="height"?"width":"height";qn(Pa,Nt[Pa])}else Nt[rr]=Ct._initialAutoSize[rr];else if(rr==="autosize")qn("width",xr?null:Nt.width),qn("height",xr?null:Nt.height);else if(Mn.match(Ht))We(Mn),S(Nt,ci+"._inputRange").set(null);else if(Mn.match(Jt)){We(Mn),S(Nt,ci+"._inputRange").set(null);var Wa=S(Nt,ci).get();Wa._inputDomain&&(Wa._input.domain=Wa._inputDomain.slice())}else Mn.match(ge)&&S(Nt,ci+"._inputDomain").set(null);if(wn==="type"){Hi=xi;var ze=Pi.type==="linear"&&xr==="log",Pe=Pi.type==="log"&&xr==="linear";if(ze||Pe){if(!Hi||!Hi.range)qn(ci+".autorange",!0);else if(Pi.autorange)ze&&(Hi.range=Hi.range[1]>Hi.range[0]?[1,2]:[2,1]);else{var Rr=Hi.range[0],qr=Hi.range[1];ze?(Rr<=0&&qr<=0&&qn(ci+".autorange",!0),Rr<=0?Rr=qr/1e6:qr<=0&&(qr=Rr/1e6),qn(ci+".range[0]",Math.log(Rr)/Math.LN10),qn(ci+".range[1]",Math.log(qr)/Math.LN10)):(qn(ci+".range[0]",Math.pow(10,Rr)),qn(ci+".range[1]",Math.pow(10,qr)))}Array.isArray(Nt._subplots.polar)&&Nt._subplots.polar.length&&Nt[fr.parts[0]]&&fr.parts[1]==="radialaxis"&&delete Nt[fr.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(Ct,Pi,xr,qn),r.getComponentMethod("images","convertCoords")(Ct,Pi,xr,qn)}else qn(ci+".autorange",!0),qn(ci+".range",null);S(Nt,ci+"._inputRange").set(null)}else if(wn.match(E)){var $r=S(Nt,rr).get(),Br=(xr||{}).type;(!Br||Br==="-")&&(Br="linear"),r.getComponentMethod("annotations","convertCoords")(Ct,$r,Br,qn),r.getComponentMethod("images","convertCoords")(Ct,$r,Br,qn)}var Gr=b.containerArrayMatch(rr);if(Gr){Ar=Gr.array,Tr=Gr.index;var dn=Gr.property,an=Zi||{editType:"calc"};Tr!==""&&dn===""&&(b.isAddVal(xr)?ii[rr]=null:b.isRemoveVal(xr)?ii[rr]=(S(St,Ar).get()||[])[Tr]:P.warn("unrecognized full object value",gt)),M.update(Kn,an),ar[Ar]||(ar[Ar]={});var Ee=ar[Ar][Tr];Ee||(Ee=ar[Ar][Tr]={}),Ee[dn]=xr,delete gt[rr]}else wn==="reverse"?(xi.range?xi.range.reverse():(qn(ci+".autorange",!0),xi.range=[1,0]),Pi.autorange?Kn.calc=!0:Kn.plot=!0):(rr==="dragmode"&&(xr===!1&&Di!==!1||xr!==!1&&Di===!1)||Nt._has("scatter-like")&&Nt._has("regl")&&rr==="dragmode"&&(xr==="lasso"||xr==="select")&&!(Di==="lasso"||Di==="select")?Kn.plot=!0:Zi?M.update(Kn,Zi):Kn.calc=!0,fr.set(xr))}}for(Ar in ar){var dr=b.applyContainerArrayChanges(Ct,le(St,Ar),ar[Ar],Kn,le);dr||(Kn.plot=!0)}for(var Vr in oa){Hi=o.getFromId(Ct,Vr);var yn=Hi&&Hi._constraintGroup;if(yn){Kn.calc=!0;for(var Fn in yn)oa[Fn]||(o.getFromId(Ct,Fn)._constraintShrinkable=!0)}}(de(Ct)||gt.height||gt.width)&&(Kn.plot=!0);var Xn=Nt.shapes;for(Tr=0;Tr1;)if(Nt.pop(),St=S(gt,Nt.join(".")+".uirevision").get(),St!==void 0)return St;return gt.uirevision}function oe(Ct,gt){for(var St=0;St[ci,Ct._ev.listeners(ci)]);le=Q.newPlot(Ct,gt,St,Nt).then(()=>{for(let[ci,xi]of Mn)xi.forEach(Pi=>Ct.on(ci,Pi));return Q.react(Ct,gt,St,Nt)})}else{Ct.data=gt||[],_.cleanData(Ct.data),Ct.layout=St||{},_.cleanLayout(Ct.layout),Ge(Ct.data,Ct.layout,Ue,qe),n.supplyDefaults(Ct,{skipUpdateCalc:!0});var Tr=Ct._fullData,pr=Ct._fullLayout,Jr=pr.datarevision===void 0,Vn=pr.transition,Hn=jr(Ct,qe,pr,Jr,Vn),Kn=Hn.newDataRevision,Ci=ur(Ct,Ue,Tr,Jr,Vn,Kn);if(de(Ct)&&(Hn.layoutReplot=!0),Ci.calc||Hn.calc){Ct.calcdata=void 0;for(var ii=Object.getOwnPropertyNames(pr),qn=0;qn(Ar||Ct.emit("plotly_react",{config:Nt,data:gt,layout:St}),Ct))}function ur(Ct,gt,St,Nt,ee,le){var we=gt.length===St.length;if(!ee&&!we)return{fullReplot:!0,calc:!0};var Ue=M.traceFlags();Ue.arrays={},Ue.nChanges=0,Ue.nChangesAnim=0;var qe,ar;function Ar(Jr){var Vn=a.getTraceValObject(ar,Jr);return!ar._module.animatable&&Vn.anim&&(Vn.anim=!1),Vn}var Tr={getValObject:Ar,flags:Ue,immutable:Nt,transition:ee,newDataRevision:le,gd:Ct},pr={};for(qe=0;qe=ee.length?ee[0]:ee[ar]:ee}function Ue(ar){return Array.isArray(le)?ar>=le.length?le[0]:le[ar]:le}function qe(ar,Ar){var Tr=0;return function(){if(ar&&++Tr===Ar)return ar()}}return new Promise(function(ar,Ar){function Tr(){if(Nt._frameQueue.length!==0){for(;Nt._frameQueue.length;){var wn=Nt._frameQueue.pop();wn.onInterrupt&&wn.onInterrupt()}Ct.emit("plotly_animationinterrupted",[])}}function pr(wn){if(wn.length!==0){for(var Mn=0;MnNt._timeToNext&&Vn()};wn()}var Kn=0;function Ci(wn){return Array.isArray(ee)?Kn>=ee.length?wn.transitionOpts=ee[Kn]:wn.transitionOpts=ee[0]:wn.transitionOpts=ee,Kn++,wn}var ii,qn,oa=[],Hi=gt==null,We=Array.isArray(gt),rr=!Hi&&!We&&P.isPlainObject(gt);if(rr)oa.push({type:"object",data:Ci(P.extendFlat({},gt))});else if(Hi||["string","number"].indexOf(typeof gt)!==-1)for(ii=0;ii0&&QrQr)&&Cn.push(qn);oa=Cn}}oa.length>0?pr(oa):(Ct.emit("plotly_animated"),ar())})}function Kr(Ct,gt,St){if(Ct=P.getGraphDiv(Ct),gt==null)return Promise.resolve();if(!P.isPlotDiv(Ct))throw new Error("This element is not a Plotly plot: "+Ct+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Nt,ee,le,we,Ue=Ct._transitionData._frames,qe=Ct._transitionData._frameHash;if(!Array.isArray(gt))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+gt);var ar=Ue.length+gt.length*2,Ar=[],Tr={};for(Nt=gt.length-1;Nt>=0;Nt--)if(P.isPlainObject(gt[Nt])){var pr=gt[Nt].name,Jr=(qe[pr]||Tr[pr]||{}).name,Vn=gt[Nt].name,Hn=qe[Jr]||Tr[Jr];Jr&&Vn&&typeof Vn=="number"&&Hn&&Afr.index?-1:rr.index=0;Nt--){if(ee=Ar[Nt].frame,typeof ee.name=="number"&&P.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!ee.name)for(;qe[ee.name="frame "+Ct._transitionData._counter++];);if(qe[ee.name]){for(le=0;le=0;St--)Nt=gt[St],le.push({type:"delete",index:Nt}),we.unshift({type:"insert",index:Nt,value:ee[Nt]});var Ue=n.modifyFrames,qe=n.modifyFrames,ar=[Ct,we],Ar=[Ct,le];return e&&e.add(Ct,Ue,ar,qe,Ar),n.modifyFrames(Ct,le)}function Ce(Ct){Ct=P.getGraphDiv(Ct);var gt=Ct._fullLayout||{},St=Ct._fullData||[];return n.cleanPlot([],{},St,gt),n.purge(Ct),t.purge(Ct),gt._container&>._container.remove(),delete Ct._context,Ct}function $t(Ct){var gt=Ct._fullLayout,St=Ct.getBoundingClientRect();if(!P.equalDomRects(St,gt._lastBBox)){var Nt=gt._invTransform=P.inverseTransformMatrix(P.getFullTransformMatrix(Ct));gt._invScaleX=Math.sqrt(Nt[0][0]*Nt[0][0]+Nt[0][1]*Nt[0][1]+Nt[0][2]*Nt[0][2]),gt._invScaleY=Math.sqrt(Nt[1][0]*Nt[1][0]+Nt[1][1]*Nt[1][1]+Nt[1][2]*Nt[1][2]),gt._lastBBox=St}}function ne(Ct){var gt=$.select(Ct),St=Ct._fullLayout;if(St._calcInverseTransform=$t,St._calcInverseTransform(Ct),St._container=gt.selectAll(".plot-container").data([0]),St._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),St._paperdiv=St._container.selectAll(".svg-container").data([0]),St._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),St._glcontainer=St._paperdiv.selectAll(".gl-container").data([{}]),St._glcontainer.enter().append("div").classed("gl-container",!0),St._paperdiv.selectAll(".main-svg").remove(),St._paperdiv.select(".modebar-container").remove(),St._paper=St._paperdiv.insert("svg",":first-child").classed("main-svg",!0),St._toppaper=St._paperdiv.append("svg").classed("main-svg",!0),St._modebardiv=St._paperdiv.append("div"),delete St._modeBar,St._hoverpaper=St._paperdiv.append("svg").classed("main-svg",!0),!St._uid){var Nt={};$.selectAll("defs").each(function(){this.id&&(Nt[this.id.split("-")[1]]=1)}),St._uid=P.randstr(Nt)}St._paperdiv.selectAll(".main-svg").attr(v.svgAttrs),St._defs=St._paper.append("defs").attr("id","defs-"+St._uid),St._clips=St._defs.append("g").classed("clips",!0),St._topdefs=St._toppaper.append("defs").attr("id","topdefs-"+St._uid),St._topclips=St._topdefs.append("g").classed("clips",!0),St._bgLayer=St._paper.append("g").classed("bglayer",!0),St._draggers=St._paper.append("g").classed("draglayer",!0);var ee=St._paper.append("g").classed("layer-below",!0);St._imageLowerLayer=ee.append("g").classed("imagelayer",!0),St._shapeLowerLayer=ee.append("g").classed("shapelayer",!0),St._cartesianlayer=St._paper.append("g").classed("cartesianlayer",!0),St._polarlayer=St._paper.append("g").classed("polarlayer",!0),St._smithlayer=St._paper.append("g").classed("smithlayer",!0),St._ternarylayer=St._paper.append("g").classed("ternarylayer",!0),St._geolayer=St._paper.append("g").classed("geolayer",!0),St._funnelarealayer=St._paper.append("g").classed("funnelarealayer",!0),St._pielayer=St._paper.append("g").classed("pielayer",!0),St._iciclelayer=St._paper.append("g").classed("iciclelayer",!0),St._treemaplayer=St._paper.append("g").classed("treemaplayer",!0),St._sunburstlayer=St._paper.append("g").classed("sunburstlayer",!0),St._indicatorlayer=St._toppaper.append("g").classed("indicatorlayer",!0),St._glimages=St._paper.append("g").classed("glimages",!0);var le=St._toppaper.append("g").classed("layer-above",!0);St._imageUpperLayer=le.append("g").classed("imagelayer",!0),St._shapeUpperLayer=le.append("g").classed("shapelayer",!0),St._selectionLayer=St._toppaper.append("g").classed("selectionlayer",!0),St._infolayer=St._toppaper.append("g").classed("infolayer",!0),St._menulayer=St._toppaper.append("g").classed("menulayer",!0),St._zoomlayer=St._toppaper.append("g").classed("zoomlayer",!0),St._hoverlayer=St._hoverpaper.append("g").classed("hoverlayer",!0),St._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Ct.emit("plotly_framework")}Q.animate=br,Q.addFrames=Kr,Q.deleteFrames=rn,Q.addTraces=dt,Q.deleteTraces=rt,Q.extendTraces=st,Q.moveTraces=at,Q.prependTraces=tt,Q.newPlot=H,Q._doPlot=p,Q.purge=Ce,Q.react=cr,Q.redraw=V,Q.relayout=zt,Q.restyle=vt,Q.setPlotConfig=w,Q.update=se,Q._guiRelayout=Tt(zt),Q._guiRestyle=Tt(vt),Q._guiUpdate=Tt(se),Q._storeDirectGUIEdit=ut}),o0=Ft(Q=>{var $=Xo();Q.getDelay=function(P){return P._has&&(P._has("gl3d")||P._has("mapbox")||P._has("map"))?500:0},Q.getRedrawFunc=function(P){return function(){$.getComponentMethod("colorbar","draw")(P)}},Q.encodeSVG=function(P){return"data:image/svg+xml,"+encodeURIComponent(P)},Q.encodeJSON=function(P){return"data:application/json,"+encodeURIComponent(P)};var c=window.URL||window.webkitURL;Q.createObjectURL=function(P){return c.createObjectURL(P)},Q.revokeObjectURL=function(P){return c.revokeObjectURL(P)},Q.createBlob=function(P,S){if(S==="svg")return new window.Blob([P],{type:"image/svg+xml;charset=utf-8"});if(S==="full-json")return new window.Blob([P],{type:"application/json;charset=utf-8"});var t=g(window.atob(P));return new window.Blob([t],{type:"image/"+S})},Q.octetStream=function(P){document.location.href="data:application/octet-stream"+P};function g(P){for(var S=P.length,t=new ArrayBuffer(S),e=new Uint8Array(t),r=0;r{var c=un();bn();var g=js(),P=li();Op();var S=/"/g,t="TOBESTRIPPED",e=new RegExp('("'+t+")|("+t+'")',"g");function r(n){var o=c.select("body").append("div").style({display:"none"}).html(""),i=n.replace(/(&[^;]*;)/gi,function(s){return s==="<"?"<":s==="&rt;"?">":s.indexOf("<")!==-1||s.indexOf(">")!==-1?"":o.html(s).text()});return o.remove(),i}function a(n){return n.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}$.exports=function(n,o,i){var s=n._fullLayout,f=s._paper,x=s._toppaper,y=s.width,v=s.height,T;f.insert("rect",":first-child").call(g.setRect,0,0,y,v).call(P.fill,s.paper_bgcolor);var u=s._basePlotModules||[];for(T=0;T{var c=bn(),g=Im().EventEmitter,P=o0();function S(t){var e=t.emitter||new g,r=new Promise(function(a,n){var o=window.Image,i=t.svg,s=t.format||"png",f=t.canvas,x=t.scale||1,y=t.width||300,v=t.height||150,T=x*y,u=x*v,b=f.getContext("2d",{willReadFrequently:!0}),_=new o,C,M;s==="svg"||c.isSafari()?M=P.encodeSVG(i):(C=P.createBlob(i,"svg"),M=P.createObjectURL(C)),f.width=T,f.height=u,_.onload=function(){var E;switch(C=null,P.revokeObjectURL(M),s!=="svg"&&b.drawImage(_,0,0,T,u),s){case"jpeg":E=f.toDataURL("image/jpeg");break;case"png":E=f.toDataURL("image/png");break;case"webp":E=f.toDataURL("image/webp");break;case"svg":E=M;break;default:var A="Image format is not jpeg, png, svg or webp.";if(n(new Error(A)),!t.promise)return e.emit("error",A)}a(E),t.promise||e.emit("success",E)},_.onerror=function(E){if(C=null,P.revokeObjectURL(M),n(E),!t.promise)return e.emit("error",E)},_.src=M});return t.promise?r:e}$.exports=S}),Sw=Ft((Q,$)=>{var c=ra(),g=W_(),P=Kc(),S=bn(),t=o0(),e=$y(),r=Gy(),a=Qi().version,n={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};function o(i,s){s=s||{};var f,x,y,v;S.isPlainObject(i)?(f=i.data||[],x=i.layout||{},y=i.config||{},v={}):(i=S.getGraphDiv(i),f=S.extendDeep([],i.data),x=S.extendDeep({},i.layout),y=i._context,v=i._fullLayout||{});function T(H){return!(H in s)||S.validate(s[H],n[H])}if(!T("width")&&s.width!==null||!T("height")&&s.height!==null)throw new Error("Height and width should be pixel values.");if(!T("format"))throw new Error("Export format is not "+S.join2(n.format.values,", "," or ")+".");var u={};function b(H,F){return S.coerce(s,u,n,H,F)}var _=b("format"),C=b("width"),M=b("height"),E=b("scale"),A=b("setBackground"),h=b("imageDataOnly"),p=document.createElement("div");p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var k=S.extendFlat({},x);C?k.width=C:s.width===null&&c(v.width)&&(k.width=v.width),M?k.height=M:s.height===null&&c(v.height)&&(k.height=v.height);var w=S.extendFlat({},y,{_exportedPlot:!0,staticPlot:!0,setBackground:A}),R=t.getRedrawFunc(p);function O(){return new Promise(function(H){setTimeout(H,t.getDelay(p._fullLayout))})}function N(){return new Promise(function(H,F){var U=e(p,_,E),W=p._fullLayout.width,q=p._fullLayout.height;function X(){g.purge(p),document.body.removeChild(p)}if(_==="full-json"){var lt=P.graphJson(p,!1,"keepdata","object",!0,!0);return lt.version=a,lt=JSON.stringify(lt),X(),H(h?lt:t.encodeJSON(lt))}if(X(),_==="svg")return H(h?U:t.encodeSVG(U));var yt=document.createElement("canvas");yt.id=S.randstr(),r({format:_,width:W,height:q,scale:E,canvas:yt,svg:U,promise:!0}).then(H).catch(F)})}function V(H){return h?H.replace(t.IMAGE_URL_PREFIX,""):H}return new Promise(function(H,F){g.newPlot(p,f,k,w).then(R).then(O).then(N).then(function(U){H(V(U))}).catch(function(U){F(U)})})}$.exports=o}),ym=Ft((Q,$)=>{var c=bn(),g=Kc(),P=Dm(),S=ms().dfltConfig,t=c.isPlainObject,e=Array.isArray,r=c.isArrayOrTypedArray;$.exports=function(u,b){u===void 0&&(u=[]),b===void 0&&(b={});var _=P.get(),C=[],M={_context:c.extendFlat({},S)},E,A;e(u)?(M.data=c.extendDeep([],u),E=u):(M.data=[],E=[],C.push(s("array","data"))),t(b)?(M.layout=c.extendDeep({},b),A=b):(M.layout={},A={},arguments.length>1&&C.push(s("object","layout"))),g.supplyDefaults(M);for(var h=M._fullData,p=E.length,k=0;kR.length&&C.push(s("unused",M,k.concat(R.length)));var U=R.length,W=Array.isArray(F);W&&(U=Math.min(U,F.length));var q,X,lt,yt,pt;if(O.dimensions===2)for(X=0;XR[X].length&&C.push(s("unused",M,k.concat(X,R[X].length)));var st=R[X].length;for(q=0;q<(W?Math.min(st,F[X].length):st);q++)lt=W?F[X][q]:F,yt=w[X][q],pt=R[X][q],c.validate(yt,lt)?pt!==yt&&pt!==+yt&&C.push(s("dynamic",M,k.concat(X,q),yt,pt)):C.push(s("value",M,k.concat(X,q),yt))}else C.push(s("array",M,k.concat(X),w[X]));else for(X=0;X{var c=bn(),g=o0();function P(S,t,e){var r=document.createElement("a"),a="download"in r,n=new Promise(function(o,i){var s,f;if(a)return s=g.createBlob(S,e),f=g.createObjectURL(s),r.href=f,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),g.revokeObjectURL(f),s=null,o(t);if(c.isSafari()){var x=e==="svg"?",":";base64,";return g.octetStream(x+encodeURIComponent(S)),o(t)}i(new Error("download error"))});return n}$.exports=P}),q_=Ft((Q,$)=>{var c=bn(),g=Sw(),P=Ew();o0();function S(t,e){var r;return c.isPlainObject(t)||(r=c.getGraphDiv(t)),e=e||{},e.format=e.format||"png",e.width=e.width||null,e.height=e.height||null,e.imageDataOnly=!0,new Promise(function(a,n){r&&r._snapshotInProgress&&n(new Error("Snapshotting already in progress.")),r&&(r._snapshotInProgress=!0);var o=g(t,e),i=e.filename||t.fn||"newplot";i+="."+e.format.replace("-","."),o.then(function(s){return r&&(r._snapshotInProgress=!1),P(s,i,e.format)}).then(function(s){a(s)}).catch(function(s){r&&(r._snapshotInProgress=!1),n(s)})})}$.exports=S}),C1=Ft(Q=>{var $=bn(),c=$.isPlainObject,g=Dm(),P=Kc(),S=$o(),t=pu(),e=ms().dfltConfig;Q.makeTemplate=function(y){y=$.isPlainObject(y)?y:$.getGraphDiv(y),y=$.extendDeep({_context:e},{data:y.data,layout:y.layout}),P.supplyDefaults(y);var v=y.data||[],T=y.layout||{};T._basePlotModules=y._fullLayout._basePlotModules,T._modules=y._fullLayout._modules;var u={data:{},layout:{}};v.forEach(function(w){var R={};n(w,R,i.bind(null,w));var O=$.coerce(w,{},S,"type"),N=u.data[O];N||(N=u.data[O]=[]),N.push(R)}),n(T,u.layout,o.bind(null,T)),delete u.layout.template;var b=T.template;if(c(b)){var _=b.layout,C,M,E,A,h,p;c(_)&&r(_,u.layout);var k=b.data;if(c(k)){for(M in u.data)if(E=k[M],Array.isArray(E)){for(h=u.data[M],p=h.length,A=E.length,C=0;CV?C.push({code:"unused",traceType:w,templateCount:N,dataCount:V}):V>N&&C.push({code:"reused",traceType:w,templateCount:N,dataCount:V})}}function H(F,U){for(var W in F)if(W.charAt(0)!=="_"){var q=F[W],X=s(F,W,U);c(q)?(Array.isArray(F)&&q._template===!1&&q.templateitemname&&C.push({code:"missing",path:X,templateitemname:q.templateitemname}),H(q,X)):Array.isArray(q)&&f(q)&&H(q,X)}}if(H({data:E,layout:M},""),C.length)return C.map(x)};function f(y){for(var v=0;v{var $=W_();Q._doPlot=$._doPlot,Q.newPlot=$.newPlot,Q.restyle=$.restyle,Q.relayout=$.relayout,Q.redraw=$.redraw,Q.update=$.update,Q._guiRestyle=$._guiRestyle,Q._guiRelayout=$._guiRelayout,Q._guiUpdate=$._guiUpdate,Q._storeDirectGUIEdit=$._storeDirectGUIEdit,Q.react=$.react,Q.extendTraces=$.extendTraces,Q.prependTraces=$.prependTraces,Q.addTraces=$.addTraces,Q.deleteTraces=$.deleteTraces,Q.moveTraces=$.moveTraces,Q.purge=$.purge,Q.addFrames=$.addFrames,Q.deleteFrames=$.deleteFrames,Q.animate=$.animate,Q.setPlotConfig=$.setPlotConfig;var c=r0().getGraphDiv,g=R_().eraseActiveShape;Q.deleteActiveShape=function(S){return g(c(S))},Q.toImage=Sw(),Q.validate=ym(),Q.downloadImage=q_();var P=C1();Q.makeTemplate=P.makeTemplate,Q.validateTemplate=P.validateTemplate}),Nm=Ft((Q,$)=>{var c=bn(),g=Xo();$.exports=function(P,S,t,e){var r=e("x"),a=e("y"),n,o=g.getComponentMethod("calendars","handleTraceDefaults");if(o(P,S,["x","y"],t),r){var i=c.minRowLength(r);a?n=Math.min(i,c.minRowLength(a)):(n=i,e("y0"),e("dy"))}else{if(!a)return 0;n=c.minRowLength(a),e("x0"),e("dx")}return S._length=n,n}}),Fp=Ft((Q,$)=>{var c=bn().dateTick0,g=Da(),P=g.ONEWEEK;function S(t,e){return t%P===0?c(e,1):c(e,0)}$.exports=function(t,e,r,a,n){if(n||(n={x:!0,y:!0}),n.x){var o=a("xperiod");o&&(a("xperiod0",S(o,e.xcalendar)),a("xperiodalignment"))}if(n.y){var i=a("yperiod");i&&(a("yperiod0",S(i,e.ycalendar)),a("yperiodalignment"))}}}),Cw=Ft((Q,$)=>{var c=["orientation","groupnorm","stackgaps"];$.exports=function(g,P,S,t){var e=S._scatterStackOpts,r=t("stackgroup");if(r){var a=P.xaxis+P.yaxis,n=e[a];n||(n=e[a]={});var o=n[r],i=!1;o?o.traces.push(P):(o=n[r]={traceIndices:[],traces:[P]},i=!0);for(var s={orientation:P.x&&!P.y?"h":"v"},f=0;f{var c=li(),g=Hd().hasColorscale,P=mc(),S=Ac();$.exports=function(t,e,r,a,n,o){var i=S.isBubble(t),s=(t.line||{}).color,f;if(o=o||{},s&&(r=s),n("marker.symbol"),n("marker.opacity",i?.7:1),n("marker.size"),o.noAngle||(n("marker.angle"),o.noAngleRef||n("marker.angleref"),o.noStandOff||n("marker.standoff")),n("marker.color",r),g(t,"marker")&&P(t,e,a,n,{prefix:"marker.",cLetter:"c"}),o.noSelect||(n("selected.marker.color"),n("unselected.marker.color"),n("selected.marker.size"),n("unselected.marker.size")),o.noLine||(s&&!Array.isArray(s)&&e.marker.color!==s?f=s:i?f=c.background:f=c.defaultLine,n("marker.line.color",f),g(t,"marker.line")&&P(t,e,a,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width",i?1:0)),i&&(n("marker.sizeref"),n("marker.sizemin"),n("marker.sizemode")),o.gradient){var x=n("marker.gradient.type");x!=="none"&&n("marker.gradient.color")}}}),I0=Ft((Q,$)=>{var c=bn().isArrayOrTypedArray,g=Hd().hasColorscale,P=mc();$.exports=function(S,t,e,r,a,n){n||(n={});var o=(S.marker||{}).color;if(o&&o._inputArray&&(o=o._inputArray),a("line.color",e),g(S,"line"))P(S,t,r,a,{prefix:"line.",cLetter:"c"});else{var i=(c(o)?!1:o)||e;a("line.color",i)}a("line.width"),n.noDash||a("line.dash"),n.backoff&&a("line.backoff")}}),xv=Ft((Q,$)=>{$.exports=function(c,g,P){var S=P("line.shape");S==="spline"&&P("line.smoothing")}}),x0=Ft((Q,$)=>{var c=bn();$.exports=function(g,P,S,t,e){e=e||{},t("textposition"),c.coerceFont(t,"textfont",e.font||S.font,e),e.noSelect||(t("selected.textfont.color"),t("unselected.textfont.color"))}}),O0=Ft((Q,$)=>{var c=li(),g=bn().isArrayOrTypedArray;function P(S){for(var t=c.interpolate(S[0][1],S[1][1],.5),e=2;e{var c=bn(),g=Xo(),P=tf(),S=vm(),t=Ac(),e=Nm(),r=Fp(),a=Cw(),n=s0(),o=I0(),i=xv(),s=x0(),f=O0(),x=bn().coercePattern;$.exports=function(y,v,T,u){function b(k,w){return c.coerce(y,v,P,k,w)}var _=e(y,v,u,b);if(_||(v.visible=!1),!!v.visible){r(y,v,u,b),b("xhoverformat"),b("yhoverformat"),b("zorder");var C=a(y,v,u,b);u.scattermode==="group"&&v.orientation===void 0&&b("orientation","v");var M=!C&&_{var c=vv().getAxisGroup;$.exports=function(g,P,S,t,e){var r=P.orientation,a=P[{v:"x",h:"y"}[r]+"axis"],n=c(S,a)+r,o=S._alignmentOpts||{},i=t("alignmentgroup"),s=o[n];s||(s=o[n]={});var f=s[i];f?f.traces.push(P):f=s[i]={traces:[P],alignmentIndex:Object.keys(s).length,offsetGroups:{}};var x=t("offsetgroup")||"",y=f.offsetGroups,v=y[x];P._offsetIndex=0,(e!=="group"||x)&&(v||(v=y[x]={offsetIndex:Object.keys(y).length}),P._offsetIndex=v.offsetIndex)}}),Pw=Ft((Q,$)=>{var c=bn(),g=Mg(),P=tf();$.exports=function(S,t){var e,r,a,n=t.scattermode;function o(y){return c.coerce(r._input,r,P,y)}if(t.scattermode==="group")for(a=0;a=0;f--){var x=S[f];if(x.type==="scatter"&&x.xaxis===i.xaxis&&x.yaxis===i.yaxis){x.opacity=void 0;break}}}}}}),zw=Ft((Q,$)=>{var c=bn(),g=pg();$.exports=function(P,S){function t(r,a){return c.coerce(P,S,g,r,a)}var e=S.barmode==="group";S.scattermode==="group"&&t("scattergap",e?S.bargap:.2)}}),D0=Ft((Q,$)=>{var c=ra(),g=bn(),P=g.dateTime2ms,S=g.incrementMonth,t=Da(),e=t.ONEAVGMONTH;$.exports=function(r,a,n,o){if(a.type!=="date")return{vals:o};var i=r[n+"periodalignment"];if(!i)return{vals:o};var s=r[n+"period"],f;if(c(s)){if(s=+s,s<=0)return{vals:o}}else if(typeof s=="string"&&s.charAt(0)==="M"){var x=+s.substring(1);if(x>0&&Math.round(x)===x)f=x;else return{vals:o}}for(var y=a.calendar,v=i==="start",T=i==="end",u=r[n+"period0"],b=P(u,y)||0,_=[],C=[],M=[],E=o.length,A=0;Ah;)w=S(w,-f,y);for(;w<=h;)w=S(w,f,y);k=S(w,-f,y)}else{for(p=Math.round((h-b)/s),w=b+p*s;w>h;)w-=s;for(;w<=h;)w+=s;k=w-s}_[A]=v?k:T?w:(k+w)/2,C[A]=k,M[A]=w}return{vals:_,starts:C,ends:M}}}),F0=Ft((Q,$)=>{var c=Hd().hasColorscale,g=Jd(),P=Ac();$.exports=function(S,t){P.hasLines(t)&&c(t,"line")&&g(S,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),P.hasMarkers(t)&&(c(t,"marker")&&g(S,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),c(t,"marker.line")&&g(S,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}),ct=Ft((Q,$)=>{var c=bn();$.exports=function(g,P){for(var S=0;S{var c=bn();$.exports=function(g,P){c.isArrayOrTypedArray(P.selectedpoints)&&c.tagSelected(g,P)}}),me=Ft((Q,$)=>{var c=ra(),g=bn(),P=Es(),S=D0(),t=Da().BADNUM,e=Ac(),r=F0(),a=ct(),n=Bt();function o(v,T){var u=v._fullLayout,b=T._xA=P.getFromId(v,T.xaxis||"x","x"),_=T._yA=P.getFromId(v,T.yaxis||"y","y"),C=b.makeCalcdata(T,"x"),M=_.makeCalcdata(T,"y"),E=S(T,b,"x",C),A=S(T,_,"y",M),h=E.vals,p=A.vals,k=T._length,w=new Array(k),R=T.ids,O=y(T,u,b,_),N=!1,V,H,F,U,W,q;f(u,T);var X="x",lt="y",yt;if(O)g.pushUnique(O.traceIndices,T.index),V=O.orientation==="v",V?(lt="s",yt="x"):(X="s",yt="y"),W=O.stackgaps==="interpolate";else{var pt=s(T,k);i(v,T,b,_,h,p,pt)}var st=!!T.xperiodalignment,tt=!!T.yperiodalignment;for(H=0;HH&&w[U].gap;)U--;for(q=w[U].s,F=w.length-1;F>U;F--)w[F].s=q;for(;H{$.exports=g;var c=bn().distinctVals;function g(P,S){this.traces=P,this.sepNegVal=S.sepNegVal,this.overlapNoMerge=S.overlapNoMerge;for(var t=1/0,e=S.posAxis._id.charAt(0),r=[],a=0;a{var c=ra(),g=bn().isArrayOrTypedArray,P=Da().BADNUM,S=Xo(),t=Es(),e=vv().getAxisGroup,r=Qe();function a(w,R){for(var O=R.xaxis,N=R.yaxis,V=w._fullLayout,H=w._fullData,F=w.calcdata,U=[],W=[],q=0;qW+F||!c(U))}for(var X=0;X{var c=me(),g=Pr().setGroupPositions;function P(e,r){for(var a=r.xaxis,n=r.yaxis,o=e._fullLayout,i=e._fullData,s=e.calcdata,f=[],x=[],y=0;yO[y]&&y{var c=js(),g=Da(),P=g.BADNUM,S=g.LOG_CLIP,t=S+.5,e=S-.5,r=bn(),a=r.segmentsIntersect,n=r.constrain,o=vm();$.exports=function(i,s){var f=s.trace||{},x=s.xaxis,y=s.yaxis,v=x.type==="log",T=y.type==="log",u=x._length,b=y._length,_=s.backoff,C=f.marker,M=s.connectGaps,E=s.baseTolerance,A=s.shape,h=A==="linear",p=f.fill&&f.fill!=="none",k=[],w=o.minTolerance,R=i.length,O=new Array(R),N=0,V,H,F,U,W,q,X,lt,yt,pt,st,tt,dt,rt,at,vt;function it(we){var Ue=i[we];if(!Ue)return!1;var qe=s.linearized?x.l2p(Ue.x):x.c2p(Ue.x),ar=s.linearized?y.l2p(Ue.y):y.c2p(Ue.y);if(qe===P){if(v&&(qe=x.c2p(Ue.x,!0)),qe===P)return!1;T&&ar===P&&(qe*=Math.abs(x._m*b*(x._m>0?t:e)/(y._m*u*(y._m>0?t:e)))),qe*=1e3}if(ar===P){if(T&&(ar=y.c2p(Ue.y,!0)),ar===P)return!1;ar*=1e3}return[qe,ar]}function Y(we,Ue,qe,ar){var Ar=qe-we,Tr=ar-Ue,pr=.5-we,Jr=.5-Ue,Vn=Ar*Ar+Tr*Tr,Hn=Ar*pr+Tr*Jr;if(Hn>0&&Hn1||Math.abs(pr.y-qe[0][1])>1)&&(pr=[pr.x,pr.y],ar&&zt(pr,we)Ht||we[1]ge)return[n(we[0],Wt,Ht),n(we[1],Jt,ge)]}function Te(we,Ue){if(we[0]===Ue[0]&&(we[0]===Wt||we[0]===Ht)||we[1]===Ue[1]&&(we[1]===Jt||we[1]===ge))return!0}function He(we,Ue){var qe=[],ar=oe(we),Ar=oe(Ue);return ar&&Ar&&Te(ar,Ar)||(ar&&qe.push(ar),Ar&&qe.push(Ar)),qe}function Ge(we,Ue,qe){return function(ar,Ar){var Tr=oe(ar),pr=oe(Ar),Jr=[];if(Tr&&pr&&Te(Tr,pr))return Jr;Tr&&Jr.push(Tr),pr&&Jr.push(pr);var Vn=2*r.constrain((ar[we]+Ar[we])/2,Ue,qe)-((Tr||ar)[we]+(pr||Ar)[we]);if(Vn){var Hn;Tr&&pr?Hn=Vn>0==Tr[we]>pr[we]?Tr:pr:Hn=Tr||pr,Hn[we]+=Vn}return Jr}}var cr;A==="linear"||A==="spline"?cr=ve:A==="hv"||A==="vh"?cr=He:A==="hvh"?cr=Ge(0,Wt,Ht):A==="vhv"&&(cr=Ge(1,Jt,ge));function ur(we,Ue){var qe=Ue[0]-we[0],ar=(Ue[1]-we[1])/qe,Ar=(we[1]*Ue[0]-Ue[1]*we[0])/qe;return Ar>0?[ar>0?Wt:Ht,ge]:[ar>0?Ht:Wt,Jt]}function jr(we){var Ue=we[0],qe=we[1],ar=Ue===O[N-1][0],Ar=qe===O[N-1][1];if(!(ar&&Ar))if(N>1){var Tr=Ue===O[N-2][0],pr=qe===O[N-2][1];ar&&(Ue===Wt||Ue===Ht)&&Tr?pr?N--:O[N-1]=we:Ar&&(qe===Jt||qe===ge)&&pr?Tr?N--:O[N-1]=we:O[N++]=we}else O[N++]=we}function Hr(we){O[N-1][0]!==we[0]&&O[N-1][1]!==we[1]&&jr([Tt,Lt]),jr(we),Mt=null,Tt=Lt=0}var br=r.isArrayOrTypedArray(C);function Kr(we){if(we&&_&&(we.i=V,we.d=i,we.trace=f,we.marker=br?C[we.i]:C,we.backoff=_),ft=we[0]/u,ut=we[1]/b,de=we[0]Ht?Ht:0,se=we[1]ge?ge:0,de||se){if(!N)O[N++]=[de||we[0],se||we[1]];else if(Mt){var Ue=cr(Mt,we);Ue.length>1&&(Hr(Ue[0]),O[N++]=Ue[1])}else te=cr(O[N-1],we)[0],O[N++]=te;var qe=O[N-1];de&&se&&(qe[0]!==de||qe[1]!==se)?(Mt&&(Tt!==de&&Lt!==se?jr(Tt&&Lt?ur(Mt,we):[Tt||de,Lt||se]):Tt&&Lt&&jr([Tt,Lt])),jr([de,se])):Tt-de&&Lt-se&&jr([de||Tt,se||Lt]),Mt=we,Tt=de,Lt=se}else Mt&&Hr(cr(Mt,we)[0]),O[N++]=we}for(V=0;Vwt(q,rn))break;F=q,dt=yt[0]*lt[0]+yt[1]*lt[1],dt>st?(st=dt,U=q,X=!1):dt=i.length||!q)break;Kr(q),H=q}}Mt&&jr([Tt||Mt[0],Lt||Mt[1]]),k.push(O.slice(0,N))}var Ce=A.slice(A.length-1);if(_&&Ce!=="h"&&Ce!=="v"){for(var $t=!1,ne=-1,Ct=[],gt=0;gt{var c={tonextx:1,tonexty:1,tonext:1};$.exports=function(g,P,S){var t,e,r,a,n,o={},i=!1,s=-1,f=0,x=-1;for(e=0;e=0?n=x:(n=x=f,f++),n{var c=un(),g=Xo(),P=bn(),S=P.ensureSingle,t=P.identity,e=js(),r=Ac(),a=ji(),n=Na(),o=mm().tester;$.exports=function(x,y,v,T,u,b){var _,C,M=!u,E=!!u&&u.duration>0,A=n(x,y,v);if(_=T.selectAll("g.trace").data(A,function(p){return p[0].trace.uid}),_.enter().append("g").attr("class",function(p){return"trace scatter trace"+p[0].trace.uid}).style("stroke-miterlimit",2),_.order(),i(x,_,y),E){b&&(C=b());var h=c.transition().duration(u.duration).ease(u.easing).each("end",function(){C&&C()}).each("interrupt",function(){C&&C()});h.each(function(){T.selectAll("g.trace").each(function(p,k){s(x,k,y,p,A,this,u)})})}else _.each(function(p,k){s(x,k,y,p,A,this,u)});M&&_.exit().remove(),T.selectAll("path:not([d])").remove()};function i(x,y,v){y.each(function(T){var u=S(c.select(this),"g","fills");e.setClipUrl(u,v.layerClipId,x);var b=T[0].trace,_=[];b._ownfill&&_.push("_ownFill"),b._nexttrace&&_.push("_nextFill");var C=u.selectAll("g").data(_,t);C.enter().append("g"),C.exit().each(function(M){b[M]=null}).remove(),C.order().each(function(M){b[M]=S(c.select(this),"path","js-fill")})})}function s(x,y,v,T,u,b,_){var C=x._context.staticPlot,M;f(x,y,v,T,u);var E=!!_&&_.duration>0;function A(Hr){return E?Hr.transition():Hr}var h=v.xaxis,p=v.yaxis,k=T[0].trace,w=k.line,R=c.select(b),O=S(R,"g","errorbars"),N=S(R,"g","lines"),V=S(R,"g","points"),H=S(R,"g","text");if(g.getComponentMethod("errorbars","plot")(x,O,v,_),k.visible!==!0)return;A(R).style("opacity",k.opacity);var F,U,W=k.fill.charAt(k.fill.length-1);W!=="x"&&W!=="y"&&(W="");var q,X;W==="y"?(q=1,X=p.c2p(0,!0)):W==="x"&&(q=0,X=h.c2p(0,!0)),T[0][v.isRangePlot?"nodeRangePlot3":"node3"]=R;var lt="",yt=[],pt=k._prevtrace,st=null,tt=null;pt&&(lt=pt._prevRevpath||"",U=pt._nextFill,yt=pt._ownPolygons,st=pt._fillsegments,tt=pt._fillElement);var dt,rt,at="",vt="",it,Y,ft,ut,wt,zt,Pt=[];k._polygons=[];var Wt=[],Ht=[],Jt=P.noop;if(F=k._ownFill,r.hasLines(k)||k.fill!=="none"){U&&U.datum(T),["hv","vh","hvh","vhv"].indexOf(w.shape)!==-1?(it=e.steps(w.shape),Y=e.steps(w.shape.split("").reverse().join(""))):w.shape==="spline"?it=Y=function(Hr){var br=Hr[Hr.length-1];return Hr.length>1&&Hr[0][0]===br[0]&&Hr[0][1]===br[1]?e.smoothclosed(Hr.slice(1),w.smoothing):e.smoothopen(Hr,w.smoothing)}:it=Y=function(Hr){return"M"+Hr.join("L")},ft=function(Hr){return Y(Hr.reverse())},Ht=a(T,{xaxis:h,yaxis:p,trace:k,connectGaps:k.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,backoff:w.backoff,simplify:w.simplify,fill:k.fill}),Wt=new Array(Ht.length);var ge=0;for(M=0;M=C[0]&&R.x<=C[1]&&R.y>=M[0]&&R.y<=M[1]}),p=Math.ceil(h.length/A),k=0;u.forEach(function(R,O){var N=R[0].trace;r.hasMarkers(N)&&N.marker.maxdisplayed>0&&O{$.exports={container:"marker",min:"cmin",max:"cmax"}}),Vs=Ft((Q,$)=>{var c=Es();$.exports=function(g,P,S){var t={},e={_fullLayout:S},r=c.getFromTrace(e,P,"x"),a=c.getFromTrace(e,P,"y"),n=g.orig_x;n===void 0&&(n=g.x);var o=g.orig_y;return o===void 0&&(o=g.y),t.xLabel=c.tickText(r,r.c2l(n),!0).text,t.yLabel=c.tickText(a,a.c2l(o),!0).text,t}}),xl=Ft((Q,$)=>{var c=un(),g=js(),P=Xo();function S(a){var n=c.select(a).selectAll("g.trace.scatter");n.style("opacity",function(o){return o[0].trace.opacity}),n.selectAll("g.points").each(function(o){var i=c.select(this),s=o.trace||o[0].trace;t(i,s,a)}),n.selectAll("g.text").each(function(o){var i=c.select(this),s=o.trace||o[0].trace;e(i,s,a)}),n.selectAll("g.trace path.js-line").call(g.lineGroupStyle),n.selectAll("g.trace path.js-fill").call(g.fillGroupStyle,a,!1),P.getComponentMethod("errorbars","style")(n)}function t(a,n,o){g.pointStyle(a.selectAll("path.point"),n,o)}function e(a,n,o){g.textPointStyle(a.selectAll("text"),n,o)}function r(a,n,o){var i=n[0].trace;i.selectedpoints?(g.selectedPointStyle(o.selectAll("path.point"),i),g.selectedTextStyle(o.selectAll("text"),i)):(t(o,i,a),e(o,i,a))}$.exports={style:S,stylePoints:t,styleText:e,styleOnSelect:r}}),Du=Ft((Q,$)=>{var c=li(),g=Ac();$.exports=function(P,S){var t,e;if(P.mode==="lines")return t=P.line.color,t&&c.opacity(t)?t:P.fillcolor;if(P.mode==="none")return P.fill?P.fillcolor:"";var r=S.mcc||(P.marker||{}).color,a=S.mlcc||((P.marker||{}).line||{}).color;return e=r&&c.opacity(r)?r:a&&c.opacity(a)&&(S.mlw||((P.marker||{}).line||{}).width)?a:"",e?c.opacity(e)<.3?c.addOpacity(e,.3):e:(t=(P.line||{}).color,t&&c.opacity(t)&&g.hasLines(P)&&P.line.width?t:P.fillcolor)}}),Sd=Ft((Q,$)=>{var c=bn(),g=Qh(),P=Xo(),S=Du(),t=li(),e=c.fillText;$.exports=function(r,a,n,o){var i=r.cd,s=i[0].trace,f=r.xa,x=r.ya,y=f.c2p(a),v=x.c2p(n),T=[y,v],u=s.hoveron||"",b=s.mode.indexOf("markers")!==-1?3:.5,_=!!s.xperiodalignment,C=!!s.yperiodalignment;if(u.indexOf("points")!==-1){var M=function(lt){if(_){var yt=f.c2p(lt.xStart),pt=f.c2p(lt.xEnd);return y>=Math.min(yt,pt)&&y<=Math.max(yt,pt)?0:1/0}var st=Math.max(3,lt.mrc||0),tt=1-1/st,dt=Math.abs(f.c2p(lt.x)-y);return dt=Math.min(yt,pt)&&v<=Math.max(yt,pt)?0:1/0}var st=Math.max(3,lt.mrc||0),tt=1-1/st,dt=Math.abs(x.c2p(lt.y)-v);return dtat!=Pt>=at&&(ut=Y[it-1][0],wt=Y[it][0],Pt-zt&&(ft=ut+(wt-ut)*(at-zt)/(Pt-zt),st=Math.min(st,ft),tt=Math.max(tt,ft)));return st=Math.max(st,0),tt=Math.min(tt,f._length),{x0:st,x1:tt,y0:at,y1:at}}if(u.indexOf("fills")!==-1&&s._fillElement){var W=F(s._fillElement)&&!F(s._fillExclusionElement);if(W){var q=U(s._polygons);q===null&&(q={x0:T[0],x1:T[0],y0:T[1],y1:T[1]});var X=t.defaultLine;return t.opacity(s.fillcolor)?X=s.fillcolor:t.opacity((s.line||{}).color)&&(X=s.line.color),c.extendFlat(r,{distance:r.maxHoverDistance,x0:q.x0,x1:q.x1,y0:q.y0,y1:q.y1,color:X,hovertemplate:!1}),delete r.index,s.text&&!c.isArrayOrTypedArray(s.text)?r.text=String(s.text):r.text=s.name,[r]}}}}),Bf=Ft((Q,$)=>{var c=Ac();$.exports=function(g,P){var S=g.cd,t=g.xaxis,e=g.yaxis,r=[],a=S[0].trace,n,o,i,s,f=!c.hasMarkers(a)&&!c.hasText(a);if(f)return[];if(P===!1)for(n=0;n{$.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}}),wp=Ft((Q,$)=>{var c=Xo().traceIs,g=dv();$.exports=function(r,a,n,o){n("autotypenumbers",o.autotypenumbersDflt);var i=n("type",(o.splomStash||{}).type);i==="-"&&(P(a,o.data),a.type==="-"?a.type="linear":r.type=a.type)};function P(r,a){if(r.type==="-"){var n=r._id,o=n.charAt(0),i;n.indexOf("scene")!==-1&&(n=o);var s=S(a,n,o);if(s){if(s.type==="histogram"&&o==={v:"y",h:"x"}[s.orientation||"v"]){r.type="linear";return}var f=o+"calendar",x=s[f],y={noMultiCategory:!c(s,"cartesian")||c(s,"noMultiCategory")};if(s.type==="box"&&s._hasPreCompStats&&o==={h:"x",v:"y"}[s.orientation||"v"]&&(y.noMultiCategory=!0),y.autotypenumbers=r.autotypenumbers,e(s,o)){var v=t(s),T=[];for(i=0;i0&&(i["_"+n+"axes"]||{})[a]||(i[n+"axis"]||n)===a&&(e(i,n)||(i[n]||[]).length||i[n+"0"]))return i}}function t(r){return{v:"x",h:"y"}[r.orientation||"v"]}function e(r,a){var n=t(r),o=c(r,"box-violin"),i=c(r._fullInput||{},"candlestick");return o&&!i&&a===n&&r[n]===void 0&&r[n+"0"]===void 0}}),jm=Ft((Q,$)=>{var c=Va().isTypedArraySpec;function g(P,S){var t=S.dataAttr||P._id.charAt(0),e={},r,a,n;if(S.axData)r=S.axData;else for(r=[],a=0;a0||c(r),n;a&&(n="array");var o=t("categoryorder",n),i;o==="array"&&(i=t("categoryarray")),!a&&o==="array"&&(o=S.categoryorder="trace"),o==="trace"?S._initialCategories=[]:o==="array"?S._initialCategories=i.slice():(i=g(S,e).sort(),o==="category ascending"?S._initialCategories=i:o==="category descending"&&(S._initialCategories=i.reverse()))}}}),Yy=Ft((Q,$)=>{var c=fo().mix,g=bi(),P=bn();$.exports=function(S,t,e,r){r=r||{};var a=r.dfltColor;function n(p,k){return P.coerce2(S,t,r.attributes,p,k)}var o=n("linecolor",a),i=n("linewidth"),s=e("showline",r.showLine||!!o||!!i);s||(delete t.linecolor,delete t.linewidth);var f=c(a,r.bgColor,r.blend||g.lightFraction).toRgbString(),x=n("gridcolor",f),y=n("gridwidth"),v=n("griddash"),T=e("showgrid",r.showGrid||!!x||!!y||!!v);if(T||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),r.hasMinor){var u=c(t.gridcolor,r.bgColor,67).toRgbString(),b=n("minor.gridcolor",u),_=n("minor.gridwidth",t.gridwidth||1),C=n("minor.griddash",t.griddash||"solid"),M=e("minor.showgrid",!!b||!!_||!!C);M||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!r.noZeroLine){n("zerolinelayer");var E=n("zerolinecolor",a),A=n("zerolinewidth"),h=e("zeroline",r.showGrid||!!E||!!A);h||(delete t.zerolinelayer,delete t.zerolinecolor,delete t.zerolinewidth)}}}),Ky=Ft((Q,$)=>{var c=ra(),g=Xo(),P=bn(),S=pu(),t=Md(),e=Ad(),r=mg(),a=gg(),n=n0(),o=dm(),i=jm(),s=Yy(),f=E_(),x=i0(),y=ic().WEEKDAY_PATTERN,v=ic().HOUR_PATTERN;$.exports=function(_,C,M,E,A){var h=E.letter,p=E.font||{},k=E.splomStash||{},w=M("visible",!E.visibleDflt),R=C._template||{},O=C.type||R.type||"-",N;if(O==="date"){var V=g.getComponentMethod("calendars","handleDefaults");V(_,C,"calendar",E.calendar),E.noTicklabelmode||(N=M("ticklabelmode"))}!E.noTicklabelindex&&(O==="date"||O==="linear")&&M("ticklabelindex");var H="";(!E.noTicklabelposition||O==="multicategory")&&(H=P.coerce(_,C,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:N==="period"?["outside","inside"]:h==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),E.noTicklabeloverflow||M("ticklabeloverflow",H.indexOf("inside")!==-1?"hide past domain":O==="category"||O==="multicategory"?"allow":"hide past div"),x(C,A),f(_,C,M,E),i(_,C,M,E),E.noHover||(O!=="category"&&M("hoverformat"),E.noUnifiedhovertitle||M("unifiedhovertitle.text"));var F=M("color"),U=F!==e.color.dflt?F:p.color,W=k.label||A._dfltTitle[h];if(o(_,C,M,O,E),!w)return C;M("title.text",W),P.coerceFont(M,"title.font",p,{overrideDflt:{size:P.bigFont(p.size),color:U}}),r(_,C,M,O);var q=E.hasMinor;if(q&&(S.newContainer(C,"minor"),r(_,C,M,O,{isMinor:!0})),n(_,C,M,O,E),a(_,C,M,E),q){var X=E.isMinor;E.isMinor=!0,a(_,C,M,E),E.isMinor=X}s(_,C,M,{dfltColor:F,bgColor:E.bgColor,showGrid:E.showGrid,hasMinor:q,attributes:e}),q&&!C.minor.ticks&&!C.minor.showgrid&&delete C.minor,(C.showline||C.ticks)&&M("mirror");var lt=O==="multicategory";if(!E.noTickson&&(O==="category"||lt)&&(C.ticks||C.showgrid)&&(lt?(M("tickson","boundaries"),delete C.ticklabelposition):M("tickson")),lt){var yt=M("showdividers");yt&&(M("dividercolor"),M("dividerwidth"))}if(O==="date")if(t(_,C,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:T}),!C.rangebreaks.length)delete C.rangebreaks;else{for(var pt=0;pt=2){var p="",k,w;if(h.length===2){for(k=0;k<2;k++)if(w=b(h[k]),w){p=y;break}}var R=E("pattern",p);if(R===y)for(k=0;k<2;k++)w=b(h[k]),w&&(C.bounds[k]=h[k]=w-1);if(R)for(k=0;k<2;k++)switch(w=h[k],R){case y:if(!c(w)){C.enabled=!1;return}if(w=+w,w!==Math.floor(w)||w<0||w>=7){C.enabled=!1;return}C.bounds[k]=h[k]=w;break;case v:if(!c(w)){C.enabled=!1;return}if(w=+w,w<0||w>24){C.enabled=!1;return}C.bounds[k]=h[k]=w;break}if(M.autorange===!1){var O=M.range;if(O[0]O[1]){C.enabled=!1;return}}else if(h[0]>O[0]&&h[1]{var c=ra(),g=bn();$.exports=function(P,S,t,e){var r=e.counterAxes||[],a=e.overlayableAxes||[],n=e.letter,o=e.grid,i=e.overlayingDomain,s,f,x,y,v,T;o&&(f=o._domains[n][o._axisMap[S._id]],s=o._anchors[S._id],f&&(x=o[n+"side"].split(" ")[0],y=o.domain[n][x==="right"||x==="top"?1:0])),f=f||[0,1],s=s||(c(P.position)?"free":r[0]||"free"),x=x||(n==="x"?"bottom":"left"),y=y||0,v=0,T=!1;var u=g.coerce(P,S,{anchor:{valType:"enumerated",values:["free"].concat(r),dflt:s}},"anchor"),b=g.coerce(P,S,{side:{valType:"enumerated",values:n==="x"?["bottom","top"]:["left","right"],dflt:x}},"side");if(u==="free"){if(n==="y"){var _=t("autoshift");_&&(y=b==="left"?i[0]:i[1],T=S.automargin?S.automargin:!0,v=b==="left"?-3:3),t("shift",v)}t("position",y)}t("automargin",T);var C=!1;if(a.length&&(C=g.coerce(P,S,{overlaying:{valType:"enumerated",values:[!1].concat(a),dflt:!1}},"overlaying")),!C){var M=t("domain",f);M[0]>M[1]-1/4096&&(S.domain=f),g.noneOrAll(P.domain,S.domain,f),S.tickmode==="sync"&&(S.tickmode="auto")}return t("layer"),S}}),Iw=Ft((Q,$)=>{var c=bn(),g=li(),P=Dp().isUnifiedHover,S=pv(),t=pu(),e=x1(),r=Ad(),a=wp(),n=Ky(),o=vv(),i=Z_(),s=Rc(),f=s.id2name,x=s.name2id,y=ic().AX_ID_PATTERN,v=Xo(),T=v.traceIs,u=v.getComponentMethod;function b(_,C,M){Array.isArray(_[C])?_[C].push(M):_[C]=[M]}$.exports=function(_,C,M){var E=C.autotypenumbers,A={},h={},p={},k={},w={},R={},O={},N={},V={},H={},F,U;for(F=0;F{var c=un(),g=Xo(),P=bn(),S=js(),t=Es();$.exports=function(e,r,a,n){var o=e._fullLayout;if(r.length===0){t.redrawComponents(e);return}function i(C){var M=C.xaxis,E=C.yaxis;o._defs.select("#"+C.clipId+"> rect").call(S.setTranslate,0,0).call(S.setScale,1,1),C.plot.call(S.setTranslate,M._offset,E._offset).call(S.setScale,1,1);var A=C.plot.selectAll(".scatterlayer .trace");A.selectAll(".point").call(S.setPointGroupScale,1,1),A.selectAll(".textpoint").call(S.setTextPointsScale,1,1),A.call(S.hideOutsideRangePoints,C)}function s(C,M){var E=C.plotinfo,A=E.xaxis,h=E.yaxis,p=A._length,k=h._length,w=!!C.xr1,R=!!C.yr1,O=[];if(w){var N=P.simpleMap(C.xr0,A.r2l),V=P.simpleMap(C.xr1,A.r2l),H=N[1]-N[0],F=V[1]-V[0];O[0]=(N[0]*(1-M)+M*V[0]-N[0])/(N[1]-N[0])*p,O[2]=p*(1-M+M*F/H),A.range[0]=A.l2r(N[0]*(1-M)+M*V[0]),A.range[1]=A.l2r(N[1]*(1-M)+M*V[1])}else O[0]=0,O[2]=p;if(R){var U=P.simpleMap(C.yr0,h.r2l),W=P.simpleMap(C.yr1,h.r2l),q=U[1]-U[0],X=W[1]-W[0];O[1]=(U[1]*(1-M)+M*W[1]-U[1])/(U[0]-U[1])*k,O[3]=k*(1-M+M*X/q),h.range[0]=A.l2r(U[0]*(1-M)+M*W[0]),h.range[1]=h.l2r(U[1]*(1-M)+M*W[1])}else O[1]=0,O[3]=k;t.drawOne(e,A,{skipTitle:!0}),t.drawOne(e,h,{skipTitle:!0}),t.redrawComponents(e,[A._id,h._id]);var lt=w?p/O[2]:1,yt=R?k/O[3]:1,pt=w?O[0]:0,st=R?O[1]:0,tt=w?O[0]/O[2]*p:0,dt=R?O[1]/O[3]*k:0,rt=A._offset-tt,at=h._offset-dt;E.clipRect.call(S.setTranslate,pt,st).call(S.setScale,1/lt,1/yt),E.plot.call(S.setTranslate,rt,at).call(S.setScale,lt,yt),S.setPointGroupScale(E.zoomScalePts,1/lt,1/yt),S.setTextPointsScale(E.zoomScaleTxt,1/lt,1/yt)}var f;n&&(f=n());function x(){for(var C={},M=0;Ma.duration?(x(),u=window.cancelAnimationFrame(_)):u=window.requestAnimationFrame(_)}return v=Date.now(),u=window.requestAnimationFrame(_),Promise.resolve()}}),Mf=Ft(Q=>{var $=un(),c=Xo(),g=bn(),P=Kc(),S=js(),t=ud().getModuleCalcData,e=Rc(),r=ic(),a=Op(),n=g.ensureSingle;function o(T,u,b){return g.ensureSingle(T,u,b,function(_){_.datum(b)})}var i=r.zindexSeparator;Q.name="cartesian",Q.attr=["xaxis","yaxis"],Q.idRoot=["x","y"],Q.idRegex=r.idRegex,Q.attrRegex=r.attrRegex,Q.attributes=_0(),Q.layoutAttributes=Ad(),Q.supplyLayoutDefaults=Iw(),Q.transitionAxes=b6(),Q.finalizeSubplots=function(T,u){var b=u._subplots,_=b.xaxis,C=b.yaxis,M=b.cartesian,E=M,A={},h={},p,k,w;for(p=0;p0){var O=R.id;if(O.indexOf(i)!==-1)continue;O+=i+(p+1),R=g.extendFlat({},R,{id:O,plot:C._cartesianlayer.selectAll(".subplot").select("."+O)})}for(var N=[],V,H=0;H1&&(X+=i+q),W.push(A+X),E=0;E1,w=u.mainplotinfo;if(!u.mainplot||k)if(p)u.xlines=n(_,"path","xlines-above"),u.ylines=n(_,"path","ylines-above"),u.xaxislayer=n(_,"g","xaxislayer-above"),u.yaxislayer=n(_,"g","yaxislayer-above");else{if(!E){var R=n(_,"g","layer-subplot");u.shapelayer=n(R,"g","shapelayer"),u.imagelayer=n(R,"g","imagelayer"),w&&k?(u.minorGridlayer=w.minorGridlayer,u.gridlayer=w.gridlayer,u.zerolinelayer=w.zerolinelayer):(u.minorGridlayer=n(_,"g","minor-gridlayer"),u.gridlayer=n(_,"g","gridlayer"),u.zerolinelayer=n(_,"g","zerolinelayer"));var O=n(_,"g","layer-between");u.shapelayerBetween=n(O,"g","shapelayer"),u.imagelayerBetween=n(O,"g","imagelayer"),n(_,"path","xlines-below"),n(_,"path","ylines-below"),u.overlinesBelow=n(_,"g","overlines-below"),n(_,"g","xaxislayer-below"),n(_,"g","yaxislayer-below"),u.overaxesBelow=n(_,"g","overaxes-below")}u.overplot=n(_,"g","overplot"),u.plot=n(u.overplot,"g",C),w&&k?u.zerolinelayerAbove=w.zerolinelayerAbove:u.zerolinelayerAbove=n(_,"g","zerolinelayer-above"),E||(u.xlines=n(_,"path","xlines-above"),u.ylines=n(_,"path","ylines-above"),u.overlinesAbove=n(_,"g","overlines-above"),n(_,"g","xaxislayer-above"),n(_,"g","yaxislayer-above"),u.overaxesAbove=n(_,"g","overaxes-above"),u.xlines=_.select(".xlines-"+A),u.ylines=_.select(".ylines-"+h),u.xaxislayer=_.select(".xaxislayer-"+A),u.yaxislayer=_.select(".yaxislayer-"+h))}else{var N=w.plotgroup,V=C+"-x",H=C+"-y";u.minorGridlayer=w.minorGridlayer,u.gridlayer=w.gridlayer,u.zerolinelayer=w.zerolinelayer,u.zerolinelayerAbove=w.zerolinelayerAbove,n(w.overlinesBelow,"path",V),n(w.overlinesBelow,"path",H),n(w.overaxesBelow,"g",V),n(w.overaxesBelow,"g",H),u.plot=n(w.overplot,"g",C),n(w.overlinesAbove,"path",V),n(w.overlinesAbove,"path",H),n(w.overaxesAbove,"g",V),n(w.overaxesAbove,"g",H),u.xlines=N.select(".overlines-"+A).select("."+V),u.ylines=N.select(".overlines-"+h).select("."+H),u.xaxislayer=N.select(".overaxes-"+A).select("."+V),u.yaxislayer=N.select(".overaxes-"+h).select("."+H)}E||(p||(o(u.minorGridlayer,"g",u.xaxis._id),o(u.minorGridlayer,"g",u.yaxis._id),u.minorGridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort),o(u.gridlayer,"g",u.xaxis._id),o(u.gridlayer,"g",u.yaxis._id),u.gridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort)),u.xlines.style("fill","none").classed("crisp",!0),u.ylines.style("fill","none").classed("crisp",!0))}function y(T,u){if(T){var b={};T.each(function(h){var p=h[0],k=$.select(this);k.remove(),v(p,u),b[p]=!0});for(var _ in u._plots)for(var C=u._plots[_],M=C.overlays||[],E=0;E{var c=Ac();$.exports={hasLines:c.hasLines,hasMarkers:c.hasMarkers,hasText:c.hasText,isBubble:c.isBubble,attributes:tf(),layoutAttributes:pg(),supplyDefaults:Lw(),crossTraceDefaults:Pw(),supplyLayoutDefaults:zw(),calc:me().calc,crossTraceCalc:Tn(),arraysToCalcdata:ct(),plot:Ya(),colorbar:xo(),formatLabels:Vs(),style:xl().style,styleOnSelect:xl().styleOnSelect,hoverPoints:Sd(),selectPoints:Bf(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Mf(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}}),Xy=Ft((Q,$)=>{var c=un(),g=li(),P=V_(),S=bn(),t=S.strScale,e=S.strRotate,r=S.strTranslate;$.exports=function(a,n,o){var i=a.node(),s=P[o.arrowhead||0],f=P[o.startarrowhead||0],x=(o.arrowwidth||1)*(o.arrowsize||1),y=(o.arrowwidth||1)*(o.startarrowsize||1),v=n.indexOf("start")>=0,T=n.indexOf("end")>=0,u=s.backoff*x+o.standoff,b=f.backoff*y+o.startstandoff,_,C,M,E;if(i.nodeName==="line"){_={x:+a.attr("x1"),y:+a.attr("y1")},C={x:+a.attr("x2"),y:+a.attr("y2")};var A=_.x-C.x,h=_.y-C.y;if(M=Math.atan2(h,A),E=M+Math.PI,u&&b&&u+b>Math.sqrt(A*A+h*h)){q();return}if(u){if(u*u>A*A+h*h){q();return}var p=u*Math.cos(M),k=u*Math.sin(M);C.x+=p,C.y+=k,a.attr({x2:C.x,y2:C.y})}if(b){if(b*b>A*A+h*h){q();return}var w=b*Math.cos(M),R=b*Math.sin(M);_.x-=w,_.y-=R,a.attr({x1:_.x,y1:_.y})}}else if(i.nodeName==="path"){var O=i.getTotalLength(),N="";if(O{var c=un(),g=Xo(),P=Kc(),S=bn(),t=S.strTranslate,e=Es(),r=li(),a=js(),n=Qh(),o=tc(),i=P0(),s=up(),f=pu().arrayEditor,x=Xy();$.exports={draw:y,drawOne:v,drawRaw:u};function y(b){var _=b._fullLayout;_._infolayer.selectAll(".annotation").remove();for(var C=0;C<_.annotations.length;C++)_.annotations[C].visible&&v(b,C);return P.previousPromises(b)}function v(b,_){var C=b._fullLayout,M=C.annotations[_]||{},E=e.getFromId(b,M.xref),A=e.getFromId(b,M.yref);E&&E.setScale(),A&&A.setScale(),u(b,M,_,!1,E,A)}function T(b,_,C,M,E){var A=E[C],h=E[C+"ref"],p=C.indexOf("y")!==-1,k=e.getRefType(h)==="domain",w=p?M.h:M.w;return b?k?A+(p?-_:_)/b._length:b.p2r(b.r2p(A)+_):A+(p?-_:_)/w}function u(b,_,C,M,E,A){var h=b._fullLayout,p=b._fullLayout._size,k=b._context.edits,w,R;M?(w="annotation-"+M,R=M+".annotations"):(w="annotation",R="annotations");var O=f(b.layout,R,_),N=O.modifyBase,V=O.modifyItem,H=O.getUpdateObj;h._infolayer.selectAll("."+w+'[data-index="'+C+'"]').remove();var F="clip"+h._uid+"_ann"+C;if(!_._input||_.visible===!1){c.selectAll("#"+F).remove();return}var U={x:{},y:{}},W=+_.textangle||0,q=h._infolayer.append("g").classed(w,!0).attr("data-index",String(C)).style("opacity",_.opacity),X=q.append("g").classed("annotation-text-g",!0),lt=k[_.showarrow?"annotationTail":"annotationPosition"],yt=_.captureevents||k.annotationText||lt;function pt(Pt){var Wt={index:C,annotation:_._input,fullAnnotation:_,event:Pt};return M&&(Wt.subplotId=M),Wt}var st=X.append("g").style("pointer-events",yt?"all":null).call(i,"pointer").on("click",function(){b._dragging=!1,b.emit("plotly_clickannotation",pt(c.event))});_.hovertext&&st.on("mouseover",function(){var Pt=_.hoverlabel,Wt=Pt.font,Ht=this.getBoundingClientRect(),Jt=b.getBoundingClientRect();n.loneHover({x0:Ht.left-Jt.left,x1:Ht.right-Jt.left,y:(Ht.top+Ht.bottom)/2-Jt.top,text:_.hovertext,color:Pt.bgcolor,borderColor:Pt.bordercolor,fontFamily:Wt.family,fontSize:Wt.size,fontColor:Wt.color,fontWeight:Wt.weight,fontStyle:Wt.style,fontVariant:Wt.variant,fontShadow:Wt.fontShadow,fontLineposition:Wt.fontLineposition,fontTextcase:Wt.fontTextcase},{container:h._hoverlayer.node(),outerContainer:h._paper.node(),gd:b})}).on("mouseout",function(){n.loneUnhover(h._hoverlayer.node())});var tt=_.borderwidth,dt=_.borderpad,rt=tt+dt,at=st.append("rect").attr("class","bg").style("stroke-width",tt+"px").call(r.stroke,_.bordercolor).call(r.fill,_.bgcolor),vt=_.width||_.height,it=h._topclips.selectAll("#"+F).data(vt?[0]:[]);it.enter().append("clipPath").classed("annclip",!0).attr("id",F).append("rect"),it.exit().remove();var Y=_.font,ft=h._meta?S.templateString(_.text,h._meta):_.text,ut=st.append("text").classed("annotation-text",!0).text(ft);function wt(Pt){return Pt.call(a.font,Y).attr({"text-anchor":{left:"start",right:"end"}[_.align]||"middle"}),o.convertToTspans(Pt,b,zt),Pt}function zt(){var Pt=ut.selectAll("a");if(Pt.size()===1&&Pt.text()===ut.text()){var Wt=st.insert("a",":first-child").attr({"xlink:xlink:href":Pt.attr("xlink:href"),"xlink:xlink:show":Pt.attr("xlink:show")}).style({cursor:"pointer"});Wt.node().appendChild(at.node())}var Ht=st.select(".annotation-text-math-group"),Jt=!Ht.empty(),ge=a.bBox((Jt?Ht:ut).node()),he=ge.width,de=ge.height,se=_.width||he,Tt=_.height||de,Lt=Math.round(se+2*rt),Mt=Math.round(Tt+2*rt);function te(ii,qn){return qn==="auto"&&(ii<1/3?qn="left":ii>2/3?qn="right":qn="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[qn]}for(var ve=!1,oe=["x","y"],Te=0;Te1)&&(cr===Ge?(le=ur.r2fraction(_["a"+He]),(le<0||le>1)&&(ve=!0)):ve=!0),ne=ur._offset+ur.r2p(_[He]),St=.5}else{var we=ee==="domain";He==="x"?(gt=_[He],ne=we?ur._offset+ur._length*gt:ne=p.l+p.w*gt):(gt=1-_[He],ne=we?ur._offset+ur._length*gt:ne=p.t+p.h*gt),St=_.showarrow?.5:gt}if(_.showarrow){$t.head=ne;var Ue=_["a"+He];if(Nt=Hr*te(.5,_.xanchor)-br*te(.5,_.yanchor),cr===Ge){var qe=e.getRefType(cr);qe==="domain"?(He==="y"&&(Ue=1-Ue),$t.tail=ur._offset+ur._length*Ue):qe==="paper"?He==="y"?(Ue=1-Ue,$t.tail=p.t+p.h*Ue):$t.tail=p.l+p.w*Ue:$t.tail=ur._offset+ur.r2p(Ue),Ct=Nt}else $t.tail=ne+Ue,Ct=Nt+Ue;$t.text=$t.tail+Nt;var ar=h[He==="x"?"width":"height"];if(Ge==="paper"&&($t.head=S.constrain($t.head,1,ar-1)),cr==="pixel"){var Ar=-Math.max($t.tail-3,$t.text),Tr=Math.min($t.tail+3,$t.text)-ar;Ar>0?($t.tail+=Ar,$t.text+=Ar):Tr>0&&($t.tail-=Tr,$t.text-=Tr)}$t.tail+=Ce,$t.head+=Ce}else Nt=Kr*te(St,rn),Ct=Nt,$t.text=ne+Nt;$t.text+=Ce,Nt+=Ce,Ct+=Ce,_["_"+He+"padplus"]=Kr/2+Ct,_["_"+He+"padminus"]=Kr/2-Ct,_["_"+He+"size"]=Kr,_["_"+He+"shift"]=Nt}if(ve){st.remove();return}var pr=0,Jr=0;if(_.align!=="left"&&(pr=(se-he)*(_.align==="center"?.5:1)),_.valign!=="top"&&(Jr=(Tt-de)*(_.valign==="middle"?.5:1)),Jt)Ht.select("svg").attr({x:rt+pr-1,y:rt+Jr}).call(a.setClipUrl,vt?F:null,b);else{var Vn=rt+Jr-ge.top,Hn=rt+pr-ge.left;ut.call(o.positionText,Hn,Vn).call(a.setClipUrl,vt?F:null,b)}it.select("rect").call(a.setRect,rt,rt,se,Tt),at.call(a.setRect,tt/2,tt/2,Lt-tt,Mt-tt),st.call(a.setTranslate,Math.round(U.x.text-Lt/2),Math.round(U.y.text-Mt/2)),X.attr({transform:"rotate("+W+","+U.x.text+","+U.y.text+")"});var Kn=function(ii,qn){q.selectAll(".annotation-arrow-g").remove();var oa=U.x.head,Hi=U.y.head,We=U.x.tail+ii,rr=U.y.tail+qn,fr=U.x.text+ii,xr=U.y.text+qn,Qr=S.rotationXYMatrix(W,fr,xr),Cn=S.apply2DTransform(Qr),wn=S.apply2DTransform2(Qr),Mn=+at.attr("width"),ci=+at.attr("height"),xi=fr-.5*Mn,Pi=xi+Mn,Di=xr-.5*ci,Zi=Di+ci,ui=[[xi,Di,xi,Zi],[xi,Zi,Pi,Zi],[Pi,Zi,Pi,Di],[Pi,Di,xi,Di]].map(wn);if(!ui.reduce(function(Ee,dr){return Ee^!!S.segmentsIntersect(oa,Hi,oa+1e6,Hi+1e6,dr[0],dr[1],dr[2],dr[3])},!1)){ui.forEach(function(Ee){var dr=S.segmentsIntersect(We,rr,oa,Hi,Ee[0],Ee[1],Ee[2],Ee[3]);dr&&(We=dr.x,rr=dr.y)});var Pa=_.arrowwidth,Wa=_.arrowcolor,ze=_.arrowside,Pe=q.append("g").style({opacity:r.opacity(Wa)}).classed("annotation-arrow-g",!0),Rr=Pe.append("path").attr("d","M"+We+","+rr+"L"+oa+","+Hi).style("stroke-width",Pa+"px").call(r.stroke,r.rgb(Wa));if(x(Rr,ze,_),k.annotationPosition&&Rr.node().parentNode&&!M){var qr=oa,$r=Hi;if(_.standoff){var Br=Math.sqrt(Math.pow(oa-We,2)+Math.pow(Hi-rr,2));qr+=_.standoff*(We-oa)/Br,$r+=_.standoff*(rr-Hi)/Br}var Gr=Pe.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(We-qr)+","+(rr-$r),transform:t(qr,$r)}).style("stroke-width",Pa+6+"px").call(r.stroke,"rgba(0,0,0,0)").call(r.fill,"rgba(0,0,0,0)"),dn,an;s.init({element:Gr.node(),gd:b,prepFn:function(){var Ee=a.getTranslate(st);dn=Ee.x,an=Ee.y,E&&E.autorange&&N(E._name+".autorange",!0),A&&A.autorange&&N(A._name+".autorange",!0)},moveFn:function(Ee,dr){var Vr=Cn(dn,an),yn=Vr[0]+Ee,Fn=Vr[1]+dr;st.call(a.setTranslate,yn,Fn),V("x",T(E,Ee,"x",p,_)),V("y",T(A,dr,"y",p,_)),_.axref===_.xref&&V("ax",T(E,Ee,"ax",p,_)),_.ayref===_.yref&&V("ay",T(A,dr,"ay",p,_)),Pe.attr("transform",t(Ee,dr)),X.attr({transform:"rotate("+W+","+yn+","+Fn+")"})},doneFn:function(){g.call("_guiRelayout",b,H());var Ee=document.querySelector(".js-notes-box-panel");Ee&&Ee.redraw(Ee.selectedObj)}})}}};if(_.showarrow&&Kn(0,0),lt){var Ci;s.init({element:st.node(),gd:b,prepFn:function(){Ci=X.attr("transform")},moveFn:function(ii,qn){var oa="pointer";if(_.showarrow)_.axref===_.xref?V("ax",T(E,ii,"ax",p,_)):V("ax",_.ax+ii),_.ayref===_.yref?V("ay",T(A,qn,"ay",p.w,_)):V("ay",_.ay+qn),Kn(ii,qn);else{if(M)return;var Hi,We;if(E)Hi=T(E,ii,"x",p,_);else{var rr=_._xsize/p.w,fr=_.x+(_._xshift-_.xshift)/p.w-rr/2;Hi=s.align(fr+ii/p.w,rr,0,1,_.xanchor)}if(A)We=T(A,qn,"y",p,_);else{var xr=_._ysize/p.h,Qr=_.y-(_._yshift+_.yshift)/p.h-xr/2;We=s.align(Qr-qn/p.h,xr,0,1,_.yanchor)}V("x",Hi),V("y",We),(!E||!A)&&(oa=s.getCursor(E?.5:Hi,A?.5:We,_.xanchor,_.yanchor))}X.attr({transform:t(ii,qn)+Ci}),i(st,oa)},clickFn:function(ii,qn){_.captureevents&&b.emit("plotly_clickannotation",pt(qn))},doneFn:function(){i(st),g.call("_guiRelayout",b,H());var ii=document.querySelector(".js-notes-box-panel");ii&&ii.redraw(ii.selectedObj)}})}}k.annotationText?ut.call(o.makeEditable,{delegate:st,gd:b}).call(wt).on("edit",function(Pt){_.text=Pt,this.call(wt),V("text",Pt),E&&E.autorange&&N(E._name+".autorange",!0),A&&A.autorange&&N(A._name+".autorange",!0),g.call("_guiRelayout",b,H())}):ut.call(wt)}}),w6=Ft((Q,$)=>{var c=bn(),g=Xo(),P=pu().arrayEditor;$.exports={hasClickToShow:S,onClick:t};function S(a,n){var o=e(a,n);return o.on.length>0||o.explicitOff.length>0}function t(a,n){var o=e(a,n),i=o.on,s=o.off.concat(o.explicitOff),f={},x=a._fullLayout.annotations,y,v;if(i.length||s.length){for(y=0;y{var c=bn(),g=li();$.exports=function(P,S,t,e){e("opacity");var r=e("bgcolor"),a=e("bordercolor"),n=g.opacity(a);e("borderpad");var o=e("borderwidth"),i=e("showarrow");e("text",i?" ":t._dfltTitle.annotation),e("textangle"),c.coerceFont(e,"font",t.font),e("width"),e("align");var s=e("height");if(s&&e("valign"),i){var f=e("arrowside"),x,y;f.indexOf("end")!==-1&&(x=e("arrowhead"),y=e("arrowsize")),f.indexOf("start")!==-1&&(e("startarrowhead",x),e("startarrowsize",y)),e("arrowcolor",n?S.bordercolor:g.defaultLine),e("arrowwidth",(n&&o||1)*2),e("standoff"),e("startstandoff")}var v=e("hovertext"),T=t.hoverlabel||{};if(v){var u=e("hoverlabel.bgcolor",T.bgcolor||(g.opacity(r)?g.rgb(r):g.defaultLine)),b=e("hoverlabel.bordercolor",T.bordercolor||g.contrast(u)),_=c.extendFlat({},T.font);_.color||(_.color=b),c.coerceFont(e,"hoverlabel.font",_)}e("captureevents",!!v)}}),G_=Ft((Q,$)=>{var c=bn(),g=Es(),P=Md(),S=Ow(),t=gm();$.exports=function(r,a){P(r,a,{name:"annotations",handleItemDefaults:e})};function e(r,a,n){function o(p,k){return c.coerce(r,a,t,p,k)}var i=o("visible"),s=o("clicktoshow");if(i||s){S(r,a,n,o);for(var f=a.showarrow,x=["x","y"],y=[-10,-30],v={_fullLayout:n},T=0;T<2;T++){var u=x[T],b=g.coerceRef(r,a,v,u,"","paper");if(b!=="paper"){var _=g.getFromId(v,b);_._annIndices.push(a._index)}if(g.coercePosition(a,v,o,b,u,.5),f){var C="a"+u,M=g.coerceRef(r,a,v,C,"pixel",["pixel","paper"]);M!=="pixel"&&M!==b&&(M=a[C]="pixel");var E=M==="pixel"?y[T]:.4;g.coercePosition(a,v,o,M,C,E)}o(u+"anchor"),o(u+"shift")}if(c.noneOrAll(r,a,["x","y"]),f&&c.noneOrAll(r,a,["ax","ay"]),s){var A=o("xclick"),h=o("yclick");a._xclick=A===void 0?a.x:g.cleanPosition(A,v,a.xref),a._yclick=h===void 0?a.y:g.cleanPosition(h,v,a.yref)}}}}),Dw=Ft((Q,$)=>{var c=bn(),g=Es(),P=$_().draw;$.exports=function(e){var r=e._fullLayout,a=c.filterVisible(r.annotations);if(a.length&&e._fullData.length)return c.syncOrAsync([P,S],e)};function S(e){var r=e._fullLayout;c.filterVisible(r.annotations).forEach(function(a){var n=g.getFromId(e,a.xref),o=g.getFromId(e,a.yref),i=g.getRefType(a.xref),s=g.getRefType(a.yref);a._extremes={},i==="range"&&t(a,n),s==="range"&&t(a,o)})}function t(e,r){var a=r._id,n=a.charAt(0),o=e[n],i=e["a"+n],s=e[n+"ref"],f=e["a"+n+"ref"],x=e["_"+n+"padplus"],y=e["_"+n+"padminus"],v={x:1,y:-1}[n]*e[n+"shift"],T=3*e.arrowsize*e.arrowwidth||0,u=T+v,b=T-v,_=3*e.startarrowsize*e.arrowwidth||0,C=_+v,M=_-v,E;if(f===s){var A=g.findExtremes(r,[r.r2c(o)],{ppadplus:u,ppadminus:b}),h=g.findExtremes(r,[r.r2c(i)],{ppadplus:Math.max(x,C),ppadminus:Math.max(y,M)});E={min:[A.min[0],h.min[0]],max:[A.max[0],h.max[0]]}}else C=i?C+i:C,M=i?M-i:M,E=g.findExtremes(r,[r.r2c(o)],{ppadplus:Math.max(x,u,C),ppadminus:Math.max(y,b,M)});e._extremes[a]=E}}),k6=Ft((Q,$)=>{var c=ra(),g=pl();$.exports=function(P,S,t,e){S=S||{};var r=t==="log"&&S.type==="linear",a=t==="linear"&&S.type==="log";if(!(r||a))return;var n=P._fullLayout.annotations,o=S._id.charAt(0),i,s;function f(y){var v=i[y],T=null;r?T=g(v,S.range):T=Math.pow(10,v),c(T)||(T=null),e(s+y,T)}for(var x=0;x{var c=$_(),g=w6();$.exports={moduleType:"component",name:"annotations",layoutAttributes:gm(),supplyLayoutDefaults:G_(),includeBasePlot:Ag()("annotations"),calcAutorange:Dw(),draw:c.draw,drawOne:c.drawOne,drawRaw:c.drawRaw,hasClickToShow:g.hasClickToShow,onClick:g.onClick,convertCoords:k6()}}),T6=Ft((Q,$)=>{var c=gm(),g=Yc().overrideAll,P=pu().templatedArray;$.exports=g(P("annotation",{visible:c.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:c.xanchor,xshift:c.xshift,yanchor:c.yanchor,yshift:c.yshift,text:c.text,textangle:c.textangle,font:c.font,width:c.width,height:c.height,opacity:c.opacity,align:c.align,valign:c.valign,bgcolor:c.bgcolor,bordercolor:c.bordercolor,borderpad:c.borderpad,borderwidth:c.borderwidth,showarrow:c.showarrow,arrowcolor:c.arrowcolor,arrowhead:c.arrowhead,startarrowhead:c.startarrowhead,arrowside:c.arrowside,arrowsize:c.arrowsize,startarrowsize:c.startarrowsize,arrowwidth:c.arrowwidth,standoff:c.standoff,startstandoff:c.startstandoff,hovertext:c.hovertext,hoverlabel:c.hoverlabel,captureevents:c.captureevents}),"calc","from-root")}),ZD=Ft((Q,$)=>{var c=bn(),g=Es(),P=Md(),S=Ow(),t=T6();$.exports=function(r,a,n){P(r,a,{name:"annotations",handleItemDefaults:e,fullLayout:n.fullLayout})};function e(r,a,n,o){function i(x,y){return c.coerce(r,a,t,x,y)}function s(x){var y=x+"axis",v={_fullLayout:{}};return v._fullLayout[y]=n[y],g.coercePosition(a,v,i,x,x,.5)}var f=i("visible");f&&(S(r,a,o.fullLayout,i),s("x"),s("y"),s("z"),c.noneOrAll(r,a,["x","y","z"]),a.xref="x",a.yref="y",a.zref="z",i("xanchor"),i("yanchor"),i("xshift"),i("yshift"),a.showarrow&&(a.axref="pixel",a.ayref="pixel",i("ax",-10),i("ay",-30),c.noneOrAll(r,a,["ax","ay"])))}}),$D=Ft((Q,$)=>{var c=bn(),g=Es();$.exports=function(S){for(var t=S.fullSceneLayout,e=t.annotations,r=0;r{function c(P,S){var t=[0,0,0,0],e,r;for(e=0;e<4;++e)for(r=0;r<4;++r)t[r]+=P[4*e+r]*S[e];return t}function g(P,S){var t=c(P.projection,c(P.view,c(P.model,[S[0],S[1],S[2],1])));return t}$.exports=g}),GD=Ft((Q,$)=>{var c=$_().drawRaw,g=kM(),P=["x","y","z"];$.exports=function(S){for(var t=S.fullSceneLayout,e=S.dataScale,r=t.annotations,a=0;a1){o=!0;break}}o?S.fullLayout._infolayer.select(".annotation-"+S.id+'[data-index="'+a+'"]').remove():(n._pdata=g(S.glplot.cameraParams,[t.xaxis.r2l(n.x)*e[0],t.yaxis.r2l(n.y)*e[1],t.zaxis.r2l(n.z)*e[2]]),c(S.graphDiv,n,a,S.id,n._xa,n._ya))}}}),YD=Ft((Q,$)=>{var c=Xo(),g=bn();$.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:T6()}}},layoutAttributes:T6(),handleDefaults:ZD(),includeBasePlot:P,convert:$D(),draw:GD()};function P(S,t){var e=c.subplotsRegistry.gl3d;if(e)for(var r=e.attrRegex,a=Object.keys(S),n=0;n{var c=gm(),g=Ea(),P=tf().line,S=Td().dash,t=Ta().extendFlat,e=pu().templatedArray;Zy();var r=$o(),{shapeTexttemplateAttrs:a,templatefallbackAttrs:n}=$u(),o=y1();$.exports=e("shape",{visible:t({},r.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:t({},r.legend,{editType:"calc+arraydraw"}),legendgroup:t({},r.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:t({},r.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:g({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:t({},r.legendrank,{editType:"calc+arraydraw"}),legendwidth:t({},r.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:t({},c.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:t({},c.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:t({},P.color,{editType:"arraydraw"}),width:t({},P.width,{editType:"calc+arraydraw"}),dash:t({},S,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:a({},{keys:Object.keys(o)}),texttemplatefallback:n({editType:"arraydraw"}),font:g({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})}),KD=Ft((Q,$)=>{var c=bn(),g=Es(),P=Md(),S=TM(),t=bp();$.exports=function(a,n){P(a,n,{name:"shapes",handleItemDefaults:r})};function e(a,n){return a?"bottom":n.indexOf("top")!==-1?"top":n.indexOf("bottom")!==-1?"bottom":"middle"}function r(a,n,o){function i(tt,dt){return c.coerce(a,n,S,tt,dt)}n._isShape=!0;var s=i("visible");if(s){var f=i("showlegend");f&&(i("legend"),i("legendwidth"),i("legendgroup"),i("legendgrouptitle.text"),c.coerceFont(i,"legendgrouptitle.font"),i("legendrank"));var x=i("path"),y=x?"path":"rect",v=i("type",y),T=v!=="path";T&&delete n.path,i("editable"),i("layer"),i("opacity"),i("fillcolor"),i("fillrule");var u=i("line.width");u&&(i("line.color"),i("line.dash"));for(var b=i("xsizemode"),_=i("ysizemode"),C=["x","y"],M=0;M<2;M++){var E=C[M],A=E+"anchor",h=E==="x"?b:_,p={_fullLayout:o},k,w,R,O=g.coerceRef(a,n,p,E,void 0,"paper"),N=g.getRefType(O);if(N==="range"?(k=g.getFromId(p,O),k._shapeIndices.push(n._index),R=t.rangeToShapePosition(k),w=t.shapePositionToRange(k),(k.type==="category"||k.type==="multicategory")&&(i(E+"0shift"),i(E+"1shift"))):w=R=c.identity,T){var V=.25,H=.75,F=E+"0",U=E+"1",W=a[F],q=a[U];a[F]=w(a[F],!0),a[U]=w(a[U],!0),h==="pixel"?(i(F,0),i(U,10)):(g.coercePosition(n,p,i,O,F,V),g.coercePosition(n,p,i,O,U,H)),n[F]=R(n[F]),n[U]=R(n[U]),a[F]=W,a[U]=q}if(h==="pixel"){var X=a[A];a[A]=w(a[A],!0),g.coercePosition(n,p,i,O,A,.25),n[A]=R(n[A]),a[A]=X}}T&&c.noneOrAll(a,n,["x0","x1","y0","y1"]);var lt=v==="line",yt,pt;if(T&&(yt=i("label.texttemplate"),i("label.texttemplatefallback")),yt||(pt=i("label.text")),pt||yt){i("label.textangle");var st=i("label.textposition",lt?"middle":"middle center");i("label.xanchor"),i("label.yanchor",e(lt,st)),i("label.padding"),c.coerceFont(i,"label.font",o.font)}}}}),XD=Ft((Q,$)=>{var c=li(),g=bn();function P(S,t){return S?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}$.exports=function(S,t,e){e("newshape.visible"),e("newshape.name"),e("newshape.showlegend"),e("newshape.legend"),e("newshape.legendwidth"),e("newshape.legendgroup"),e("newshape.legendgrouptitle.text"),g.coerceFont(e,"newshape.legendgrouptitle.font"),e("newshape.legendrank"),e("newshape.drawdirection"),e("newshape.layer"),e("newshape.fillcolor"),e("newshape.fillrule"),e("newshape.opacity");var r=e("newshape.line.width");if(r){var a=(S||{}).plot_bgcolor||"#FFF";e("newshape.line.color",c.contrast(a)),e("newshape.line.dash")}var n=S.dragmode==="drawline",o=e("newshape.label.text"),i=e("newshape.label.texttemplate");if(e("newshape.label.texttemplatefallback"),o||i){e("newshape.label.textangle");var s=e("newshape.label.textposition",n?"middle":"middle center");e("newshape.label.xanchor"),e("newshape.label.yanchor",P(n,s)),e("newshape.label.padding"),g.coerceFont(e,"newshape.label.font",t.font)}e("activeshape.fillcolor"),e("activeshape.opacity")}}),JD=Ft((Q,$)=>{var c=bn(),g=Es(),P=Ny(),S=bp();$.exports=function(n){var o=n._fullLayout,i=c.filterVisible(o.shapes);if(!(!i.length||!n._fullData.length))for(var s=0;s0?u+y:y;return{ppad:y,ppadplus:v?_:C,ppadminus:v?C:_}}else return{ppad:y}}function a(n,o,i){var s=n._id.charAt(0)==="x"?"x":"y",f=n.type==="category"||n.type==="multicategory",x,y,v=0,T=0,u=f?n.r2c:n.d2c,b=o[s+"sizemode"]==="scaled";if(b?(x=o[s+"0"],y=o[s+"1"],f&&(v=o[s+"0shift"],T=o[s+"1shift"])):(x=o[s+"anchor"],y=o[s+"anchor"]),x!==void 0)return[u(x)+v,u(y)+T];if(o.path){var _=1/0,C=-1/0,M=o.path.match(P.segmentRE),E,A,h,p,k;for(n.type==="date"&&(u=S.decodeDate(u)),E=0;EC&&(C=k)));if(C>=_)return[_,C]}}}),QD=Ft((Q,$)=>{var c=R_();$.exports={moduleType:"component",name:"shapes",layoutAttributes:TM(),supplyLayoutDefaults:KD(),supplyDrawNewShapeDefaults:XD(),includeBasePlot:Ag()("shapes"),calcAutorange:JD(),draw:c.draw,drawOne:c.drawOne}}),AM=Ft((Q,$)=>{var c=ic(),g=pu().templatedArray;Zy(),$.exports=g("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",c.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",c.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}),tF=Ft((Q,$)=>{var c=bn(),g=Es(),P=Md(),S=AM(),t="images";$.exports=function(r,a){var n={name:t,handleItemDefaults:e};P(r,a,n)};function e(r,a,n){function o(b,_){return c.coerce(r,a,S,b,_)}var i=o("source"),s=o("visible",!!i);if(!s)return a;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var f={_fullLayout:n},x=["x","y"],y=0;y<2;y++){var v=x[y],T=g.coerceRef(r,a,f,v,"paper",void 0);if(T!=="paper"){var u=g.getFromId(f,T);u._imgIndices.push(a._index)}g.coercePosition(a,f,o,T,v,0)}return a}}),eF=Ft((Q,$)=>{var c=un(),g=js(),P=Es(),S=Rc(),t=Op();$.exports=function(e){var r=e._fullLayout,a=[],n={},o=[],i,s;for(s=0;s{var c=ra(),g=pl();$.exports=function(P,S,t,e){S=S||{};var r=t==="log"&&S.type==="linear",a=t==="linear"&&S.type==="log";if(r||a){for(var n=P._fullLayout.images,o=S._id.charAt(0),i,s,f=0;f{$.exports={moduleType:"component",name:"images",layoutAttributes:AM(),supplyLayoutDefaults:tF(),includeBasePlot:Ag()("images"),draw:eF(),convertCoords:rF()}}),A6=Ft((Q,$)=>{$.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}}),MM=Ft((Q,$)=>{var c=Ea(),g=bi(),P=Ta().extendFlat,S=Yc().overrideAll,t=Iy(),e=pu().templatedArray,r=e("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});$.exports=S(e("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:r,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:P(t({editType:"arraydraw"}),{}),font:c({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:g.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")}),iF=Ft((Q,$)=>{var c=bn(),g=Md(),P=MM(),S=A6(),t=S.name,e=P.buttons;$.exports=function(n,o){var i={name:t,handleItemDefaults:r};g(n,o,i)};function r(n,o,i){function s(y,v){return c.coerce(n,o,P,y,v)}var f=g(n,o,{name:"buttons",handleItemDefaults:a}),x=s("visible",f.length>0);x&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),c.noneOrAll(n,o,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),c.coerceFont(s,"font",i.font),s("bgcolor",i.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function a(n,o){function i(f,x){return c.coerce(n,o,e,f,x)}var s=i("visible",n.method==="skip"||Array.isArray(n.args));s&&(i("method"),i("args"),i("args2"),i("label"),i("execute"))}}),aF=Ft((Q,$)=>{$.exports=t;var c=un(),g=li(),P=js(),S=bn();function t(e,r,a){this.gd=e,this.container=r,this.id=a,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}t.barWidth=2,t.barLength=20,t.barRadius=2,t.barPad=1,t.barColor="#808BA4",t.prototype.enable=function(e,r,a){var n=this.gd._fullLayout,o=n.width,i=n.height;this.position=e;var s=this.position.l,f=this.position.w,x=this.position.t,y=this.position.h,v=this.position.direction,T=v==="down",u=v==="left",b=v==="right",_=v==="up",C=f,M=y,E,A,h,p;!T&&!u&&!b&&!_&&(this.position.direction="down",T=!0);var k=T||_;k?(E=s,A=E+C,T?(h=x,p=Math.min(h+M,i),M=p-h):(p=x+M,h=Math.max(p-M,0),M=p-h)):(h=x,p=h+M,u?(A=s+C,E=Math.max(A-C,0),C=A-E):(E=s,A=Math.min(E+C,o),C=A-E)),this._box={l:E,t:h,w:C,h:M};var w=f>C,R=t.barLength+2*t.barPad,O=t.barWidth+2*t.barPad,N=s,V=x+y;V+O>i&&(V=i-O);var H=this.container.selectAll("rect.scrollbar-horizontal").data(w?[0]:[]);H.exit().on(".drag",null).remove(),H.enter().append("rect").classed("scrollbar-horizontal",!0).call(g.fill,t.barColor),w?(this.hbar=H.attr({rx:t.barRadius,ry:t.barRadius,x:N,y:V,width:R,height:O}),this._hbarXMin=N+R/2,this._hbarTranslateMax=C-R):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var F=y>M,U=t.barWidth+2*t.barPad,W=t.barLength+2*t.barPad,q=s+f,X=x;q+U>o&&(q=o-U);var lt=this.container.selectAll("rect.scrollbar-vertical").data(F?[0]:[]);lt.exit().on(".drag",null).remove(),lt.enter().append("rect").classed("scrollbar-vertical",!0).call(g.fill,t.barColor),F?(this.vbar=lt.attr({rx:t.barRadius,ry:t.barRadius,x:q,y:X,width:U,height:W}),this._vbarYMin=X+W/2,this._vbarTranslateMax=M-W):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var yt=this.id,pt=E-.5,st=F?A+U+.5:A+.5,tt=h-.5,dt=w?p+O+.5:p+.5,rt=n._topdefs.selectAll("#"+yt).data(w||F?[0]:[]);if(rt.exit().remove(),rt.enter().append("clipPath").attr("id",yt).append("rect"),w||F?(this._clipRect=rt.select("rect").attr({x:Math.floor(pt),y:Math.floor(tt),width:Math.ceil(st)-Math.floor(pt),height:Math.ceil(dt)-Math.floor(tt)}),this.container.call(P.setClipUrl,yt,this.gd),this.bg.attr({x:s,y:x,width:f,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(P.setClipUrl,null),delete this._clipRect),w||F){var at=c.behavior.drag().on("dragstart",function(){c.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(at);var vt=c.behavior.drag().on("dragstart",function(){c.event.sourceEvent.preventDefault(),c.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));w&&this.hbar.on(".drag",null).call(vt),F&&this.vbar.on(".drag",null).call(vt)}this.setTranslate(r,a)},t.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(P.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},t.prototype._onBoxDrag=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e-=c.event.dx),this.vbar&&(r-=c.event.dy),this.setTranslate(e,r)},t.prototype._onBoxWheel=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e+=c.event.deltaY),this.vbar&&(r+=c.event.deltaY),this.setTranslate(e,r)},t.prototype._onBarDrag=function(){var e=this.translateX,r=this.translateY;if(this.hbar){var a=e+this._hbarXMin,n=a+this._hbarTranslateMax,o=S.constrain(c.event.x,a,n),i=(o-a)/(n-a),s=this.position.w-this._box.w;e=i*s}if(this.vbar){var f=r+this._vbarYMin,x=f+this._vbarTranslateMax,y=S.constrain(c.event.y,f,x),v=(y-f)/(x-f),T=this.position.h-this._box.h;r=v*T}this.setTranslate(e,r)},t.prototype.setTranslate=function(e,r){var a=this.position.w-this._box.w,n=this.position.h-this._box.h;if(e=S.constrain(e||0,0,a),r=S.constrain(r||0,0,n),this.translateX=e,this.translateY=r,this.container.call(P.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var o=e/a;this.hbar.call(P.setTranslate,e+o*this._hbarTranslateMax,r)}if(this.vbar){var i=r/n;this.vbar.call(P.setTranslate,e,r+i*this._vbarTranslateMax)}}}),oF=Ft((Q,$)=>{var c=un(),g=Kc(),P=li(),S=js(),t=bn(),e=tc(),r=pu().arrayEditor,a=Af().LINE_SPACING,n=A6(),o=aF();$.exports=function(R){var O=R._fullLayout,N=t.filterVisible(O[n.name]);function V(yt){g.autoMargin(R,p(yt))}var H=O._menulayer.selectAll("g."+n.containerClassName).data(N.length>0?[0]:[]);if(H.enter().append("g").classed(n.containerClassName,!0).style("cursor","pointer"),H.exit().each(function(){c.select(this).selectAll("g."+n.headerGroupClassName).each(V)}).remove(),N.length!==0){var F=H.selectAll("g."+n.headerGroupClassName).data(N,i);F.enter().append("g").classed(n.headerGroupClassName,!0);for(var U=t.ensureSingle(H,"g",n.dropdownButtonGroupClassName,function(yt){yt.style("pointer-events","all")}),W=0;W{var c=A6();$.exports={moduleType:"component",name:c.name,layoutAttributes:MM(),supplyLayoutDefaults:iF(),draw:oF()}}),Fw=Ft((Q,$)=>{$.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}}),SM=Ft((Q,$)=>{var c=Ea(),g=Iy(),P=Ta().extendDeepAll,S=Yc().overrideAll,t=El(),e=pu().templatedArray,r=Fw(),a=e("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});$.exports=S(e("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:a,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:P(g({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:t.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:c({})},font:c({}),activebgcolor:{valType:"color",dflt:r.gripBgActiveColor},bgcolor:{valType:"color",dflt:r.railBgColor},bordercolor:{valType:"color",dflt:r.railBorderColor},borderwidth:{valType:"number",min:0,dflt:r.railBorderWidth},ticklen:{valType:"number",min:0,dflt:r.tickLength},tickcolor:{valType:"color",dflt:r.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:r.minorTickLength}}),"arraydraw","from-root")}),lF=Ft((Q,$)=>{var c=bn(),g=Md(),P=SM(),S=Fw(),t=S.name,e=P.steps;$.exports=function(n,o){g(n,o,{name:t,handleItemDefaults:r})};function r(n,o,i){function s(_,C){return c.coerce(n,o,P,_,C)}for(var f=g(n,o,{name:"steps",handleItemDefaults:a}),x=0,y=0;y{var c=un(),g=Kc(),P=li(),S=js(),t=bn(),e=t.strTranslate,r=tc(),a=pu().arrayEditor,n=Fw(),o=Af(),i=o.LINE_SPACING,s=o.FROM_TL,f=o.FROM_BR;$.exports=function(H){var F=H._context.staticPlot,U=H._fullLayout,W=y(U,H),q=U._infolayer.selectAll("g."+n.containerClassName).data(W.length>0?[0]:[]);q.enter().append("g").classed(n.containerClassName,!0).style("cursor",F?null:"ew-resize");function X(st){st._commandObserver&&(st._commandObserver.remove(),delete st._commandObserver),g.autoMargin(H,x(st))}if(q.exit().each(function(){c.select(this).selectAll("g."+n.groupClassName).each(X)}).remove(),W.length!==0){var lt=q.selectAll("g."+n.groupClassName).data(W,v);lt.enter().append("g").classed(n.groupClassName,!0),lt.exit().each(X).remove();for(var yt=0;yt0&&(yt=yt.transition().duration(F.transition.duration).ease(F.transition.easing)),yt.attr("transform",e(lt-n.gripWidth*.5,F._dims.currentValueTotalHeight))}}function R(H,F){var U=H._dims;return U.inputAreaStart+n.stepInset+(U.inputAreaLength-2*n.stepInset)*Math.min(1,Math.max(0,F))}function O(H,F){var U=H._dims;return Math.min(1,Math.max(0,(F-n.stepInset-U.inputAreaStart)/(U.inputAreaLength-2*n.stepInset-2*U.inputAreaStart)))}function N(H,F,U){var W=U._dims,q=t.ensureSingle(H,"rect",n.railTouchRectClass,function(X){X.call(h,F,H,U).style("pointer-events","all")});q.attr({width:W.inputAreaLength,height:Math.max(W.inputAreaWidth,n.tickOffset+U.ticklen+W.labelHeight)}).call(P.fill,U.bgcolor).attr("opacity",0),S.setTranslate(q,0,W.currentValueTotalHeight)}function V(H,F){var U=F._dims,W=U.inputAreaLength-n.railInset*2,q=t.ensureSingle(H,"rect",n.railRectClass);q.attr({width:W,height:n.railWidth,rx:n.railRadius,ry:n.railRadius,"shape-rendering":"crispEdges"}).call(P.stroke,F.bordercolor).call(P.fill,F.bgcolor).style("stroke-width",F.borderwidth+"px"),S.setTranslate(q,n.railInset,(U.inputAreaWidth-n.railWidth)*.5+U.currentValueTotalHeight)}}),cF=Ft((Q,$)=>{var c=Fw();$.exports={moduleType:"component",name:c.name,layoutAttributes:SM(),supplyLayoutDefaults:lF(),draw:uF()}}),M6=Ft((Q,$)=>{var c=bi();$.exports={bgcolor:{valType:"color",dflt:c.background,editType:"plot"},bordercolor:{valType:"color",dflt:c.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}}),EM=Ft((Q,$)=>{$.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}}),S6=Ft((Q,$)=>{$.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}}),hF=Ft(Q=>{var $=Rc(),c=tc(),g=S6(),P=Af().LINE_SPACING,S=g.name;function t(e){var r=e&&e[S];return r&&r.visible}Q.isVisible=t,Q.makeData=function(e){for(var r=$.list({_fullLayout:e},"x",!0),a=e.margin,n=[],o=0;o{var c=bn(),g=pu(),P=Rc(),S=M6(),t=EM();$.exports=function(e,r,a){var n=e[a],o=r[a];if(!(n.rangeslider||r._requestRangeslider[o._id]))return;c.isPlainObject(n.rangeslider)||(n.rangeslider={});var i=n.rangeslider,s=g.newContainer(o,"rangeslider");function f(p,k){return c.coerce(i,s,S,p,k)}var x,y;function v(p,k){return c.coerce(x,y,t,p,k)}var T=f("visible");if(T){f("bgcolor",r.plot_bgcolor),f("bordercolor"),f("borderwidth"),f("thickness"),f("autorange",!o.isValidRange(i.range)),f("range");var u=r._subplots;if(u)for(var b=u.cartesian.filter(function(p){return p.substr(0,p.indexOf("y"))===P.name2id(a)}).map(function(p){return p.substr(p.indexOf("y"),p.length)}),_=c.simpleMap(b,P.id2name),C=0;C<_.length;C++){var M=_[C];x=i[M]||{},y=g.newContainer(s,M,"yaxis");var E=r[M],A;x.range&&E.isValidRange(x.range)&&(A="fixed");var h=v("rangemode",A);h!=="match"&&v("range",E.range.slice())}s._input=i}}}),dF=Ft((Q,$)=>{var c=Rc().list,g=Y0().getAutoRange,P=S6();$.exports=function(S){for(var t=c(S,"x",!0),e=0;e{var c=un(),g=Xo(),P=Kc(),S=bn(),t=S.strTranslate,e=js(),r=li(),a=lp(),n=Mf(),o=Rc(),i=up(),s=P0(),f=S6();$.exports=function(h){for(var p=h._fullLayout,k=p._rangeSliderData,w=0;w=he.max)Jt=wt[ge+1];else if(Ht=he.pmax)Jt=wt[ge+1];else if(Ht0?h.touches[0].clientX:0}function y(h,p,k,w){if(p._context.staticPlot)return;var R=h.select("rect."+f.slideBoxClassName).node(),O=h.select("rect."+f.grabAreaMinClassName).node(),N=h.select("rect."+f.grabAreaMaxClassName).node();function V(){var H=c.event,F=H.target,U=x(H),W=U-h.node().getBoundingClientRect().left,q=w.d2p(k._rl[0]),X=w.d2p(k._rl[1]),lt=i.coverSlip();this.addEventListener("touchmove",yt),this.addEventListener("touchend",pt),lt.addEventListener("mousemove",yt),lt.addEventListener("mouseup",pt);function yt(st){var tt=x(st),dt=+tt-U,rt,at,vt;switch(F){case R:if(vt="ew-resize",q+dt>k._length||X+dt<0)return;rt=q+dt,at=X+dt;break;case O:if(vt="col-resize",q+dt>k._length)return;rt=q+dt,at=X;break;case N:if(vt="col-resize",X+dt<0)return;rt=q,at=X+dt;break;default:vt="ew-resize",rt=W,at=W+dt;break}if(at{var c=bn(),g=M6(),P=EM(),S=hF();$.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:c.extendFlat({},g,{yaxis:P})}}},layoutAttributes:M6(),handleDefaults:fF(),calcAutorange:dF(),draw:pF(),isVisible:S.isVisible,makeData:S.makeData,autoMarginOpts:S.autoMarginOpts}}),E6=Ft((Q,$)=>{var c=Ea(),g=bi(),P=pu().templatedArray,S=P("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});$.exports={visible:{valType:"boolean",editType:"plot"},buttons:S,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:c({editType:"plot"}),bgcolor:{valType:"color",dflt:g.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:g.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}}),CM=Ft((Q,$)=>{$.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}}),gF=Ft((Q,$)=>{var c=bn(),g=li(),P=pu(),S=Md(),t=E6(),e=CM();$.exports=function(n,o,i,s,f){var x=n.rangeselector||{},y=P.newContainer(o,"rangeselector");function v(C,M){return c.coerce(x,y,t,C,M)}var T=S(x,y,{name:"buttons",handleItemDefaults:r,calendar:f}),u=v("visible",T.length>0);if(u){var b=a(o,i,s);v("x",b[0]),v("y",b[1]),c.noneOrAll(n,o,["x","y"]),v("xanchor"),v("yanchor"),c.coerceFont(v,"font",i.font);var _=v("bgcolor");v("activecolor",g.contrast(_,e.lightAmount,e.darkAmount)),v("bordercolor"),v("borderwidth")}};function r(n,o,i,s){var f=s.calendar;function x(T,u){return c.coerce(n,o,t.buttons,T,u)}var y=x("visible");if(y){var v=x("step");v!=="all"&&(f&&f!=="gregorian"&&(v==="month"||v==="year")?o.stepmode="backward":x("stepmode"),x("count")),x("label")}}function a(n,o,i){for(var s=i.filter(function(v){return o[v].anchor===n._id}),f=0,x=0;x{var c=ia(),g=bn().titleCase;$.exports=function(S,t){var e=S._name,r={};if(t.step==="all")r[e+".autorange"]=!0;else{var a=P(S,t);r[e+".range[0]"]=a[0],r[e+".range[1]"]=a[1]}return r};function P(S,t){var e=S.range,r=new Date(S.r2l(e[1])),a=t.step,n=c["utc"+g(a)],o=t.count,i;switch(t.stepmode){case"backward":i=S.l2r(+n.offset(r,-o));break;case"todate":var s=n.offset(r,-o);i=S.l2r(+n.ceil(s));break}var f=e[1];return[i,f]}}),yF=Ft((Q,$)=>{var c=un(),g=Xo(),P=Kc(),S=li(),t=js(),e=bn(),r=e.strTranslate,a=tc(),n=Rc(),o=Af(),i=o.LINE_SPACING,s=o.FROM_TL,f=o.FROM_BR,x=CM(),y=vF();$.exports=function(A){var h=A._fullLayout,p=h._infolayer.selectAll(".rangeselector").data(v(A),T);p.enter().append("g").classed("rangeselector",!0),p.exit().remove(),p.style({cursor:"pointer","pointer-events":"all"}),p.each(function(k){var w=c.select(this),R=k,O=R.rangeselector,N=w.selectAll("g.button").data(e.filterVisible(O.buttons));N.enter().append("g").classed("button",!0),N.exit().remove(),N.each(function(V){var H=c.select(this),F=y(R,V);V._isActive=u(R,V,F),H.call(b,O,V),H.call(C,O,V,A),H.on("click",function(){A._dragged||g.call("_guiRelayout",A,F)}),H.on("mouseover",function(){V._isHovered=!0,H.call(b,O,V)}),H.on("mouseout",function(){V._isHovered=!1,H.call(b,O,V)})}),E(A,N,O,R._name,w)})};function v(A){for(var h=n.list(A,"x",!0),p=[],k=0;k{$.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:E6()}}},layoutAttributes:E6(),handleDefaults:gF(),draw:yF()}}),Nh=Ft(Q=>{var $=Ta().extendFlat;Q.attributes=function(c,g){c=c||{},g=g||{};var P={valType:"info_array",editType:c.editType,items:[{valType:"number",min:0,max:1,editType:c.editType},{valType:"number",min:0,max:1,editType:c.editType}],dflt:[0,1]};c.name&&c.name+"",c.trace,g.description&&""+g.description;var S={x:$({},P,{}),y:$({},P,{}),editType:c.editType};return c.noGridCell||(S.row={valType:"integer",min:0,dflt:0,editType:c.editType},S.column={valType:"integer",min:0,dflt:0,editType:c.editType}),S},Q.defaults=function(c,g,P,S){var t=S&&S.x||[0,1],e=S&&S.y||[0,1],r=g.grid;if(r){var a=P("domain.column");a!==void 0&&(a{var c=bn(),g=vo().counter,P=Nh().attributes,S=ic().idRegex,t=pu(),e={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[g("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[S.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[S.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:P({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function r(s,f,x){var y=f[x+"axes"],v=Object.keys((s._splomAxes||{})[x]||{});if(Array.isArray(y))return y;if(v.length)return v}function a(s,f){var x=s.grid||{},y=r(f,x,"x"),v=r(f,x,"y");if(!s.grid&&!y&&!v)return;var T=Array.isArray(x.subplots)&&Array.isArray(x.subplots[0]),u=Array.isArray(y),b=Array.isArray(v),_=u&&y!==x.xaxes&&b&&v!==x.yaxes,C,M;T?(C=x.subplots.length,M=x.subplots[0].length):(b&&(C=v.length),u&&(M=y.length));var E=t.newContainer(f,"grid");function A(F,U){return c.coerce(x,E,e,F,U)}var h=A("rows",C),p=A("columns",M);if(!(h*p>1)){delete f.grid;return}if(!T&&!u&&!b){var k=A("pattern")==="independent";k&&(T=!0)}E._hasSubplotGrid=T;var w=A("roworder"),R=w==="top to bottom",O=T?.2:.1,N=T?.3:.1,V,H;_&&f._splomGridDflt&&(V=f._splomGridDflt.xside,H=f._splomGridDflt.yside),E._domains={x:n("x",A,O,V,p),y:n("y",A,N,H,h,R)}}function n(s,f,x,y,v,T){var u=f(s+"gap",x),b=f("domain."+s);f(s+"side",y);for(var _=new Array(v),C=b[0],M=(b[1]-C)/(v-u),E=M*(1-u),A=0;A{$.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc"}}),_F=Ft((Q,$)=>{var c=ra(),g=Xo(),P=bn(),S=pu(),t=PM();$.exports=function(e,r,a,n){var o="error_"+n.axis,i=S.newContainer(r,o),s=e[o]||{};function f(_,C){return P.coerce(s,i,t,_,C)}var x=s.array!==void 0||s.value!==void 0||s.type==="sqrt",y=f("visible",x);if(y!==!1){var v=f("type","array"in s?"data":"percent"),T=!0;v!=="sqrt"&&(T=f("symmetric",!((v==="data"?"arrayminus":"valueminus")in s))),v==="data"?(f("array"),f("traceref"),T||(f("arrayminus"),f("tracerefminus"))):(v==="percent"||v==="constant")&&(f("value"),T||f("valueminus"));var u="copy_"+n.inherit+"style";if(n.inherit){var b=r["error_"+n.inherit];(b||{}).visible&&f(u,!(s.color||c(s.thickness)||c(s.width)))}(!n.inherit||!i[u])&&(f("color",a),f("thickness"),f("width",g.traceIs(r,"gl3d")?0:4))}}}),zM=Ft((Q,$)=>{$.exports=function(g){var P=g.type,S=g.symmetric;if(P==="data"){var t=g.array||[];if(S)return function(n,o){var i=+t[o];return[i,i]};var e=g.arrayminus||[];return function(n,o){var i=+t[o],s=+e[o];return!isNaN(i)||!isNaN(s)?[s||0,i||0]:[NaN,NaN]}}else{var r=c(P,g.value),a=c(P,g.valueminus);return S||g.valueminus===void 0?function(n){var o=r(n);return[o,o]}:function(n){return[a(n),r(n)]}}};function c(g,P){if(g==="percent")return function(S){return Math.abs(S*P/100)};if(g==="constant")return function(){return Math.abs(P)};if(g==="sqrt")return function(S){return Math.sqrt(Math.abs(S))}}}),bF=Ft((Q,$)=>{var c=ra(),g=Xo(),P=Es(),S=bn(),t=zM();$.exports=function(r){for(var a=r.calcdata,n=0;n{var c=un(),g=ra(),P=js(),S=Ac();$.exports=function(e,r,a,n){var o,i=a.xaxis,s=a.yaxis,f=n&&n.duration>0,x=e._context.staticPlot;r.each(function(y){var v=y[0].trace,T=v.error_x||{},u=v.error_y||{},b;v.ids&&(b=function(E){return E.id});var _=S.hasMarkers(v)&&v.marker.maxdisplayed>0;!u.visible&&!T.visible&&(y=[]);var C=c.select(this).selectAll("g.errorbar").data(y,b);if(C.exit().remove(),!!y.length){T.visible||C.selectAll("path.xerror").remove(),u.visible||C.selectAll("path.yerror").remove(),C.style("opacity",1);var M=C.enter().append("g").classed("errorbar",!0);f&&M.style("opacity",0).transition().duration(n.duration).style("opacity",1),P.setClipUrl(C,a.layerClipId,e),C.each(function(E){var A=c.select(this),h=t(E,i,s);if(!(_&&!E.vis)){var p,k=A.select("path.yerror");if(u.visible&&g(h.x)&&g(h.yh)&&g(h.ys)){var w=u.width;p="M"+(h.x-w)+","+h.yh+"h"+2*w+"m-"+w+",0V"+h.ys,h.noYS||(p+="m-"+w+",0h"+2*w),o=!k.size(),o?k=A.append("path").style("vector-effect",x?"none":"non-scaling-stroke").classed("yerror",!0):f&&(k=k.transition().duration(n.duration).ease(n.easing)),k.attr("d",p)}else k.remove();var R=A.select("path.xerror");if(T.visible&&g(h.y)&&g(h.xh)&&g(h.xs)){var O=(T.copy_ystyle?u:T).width;p="M"+h.xh+","+(h.y-O)+"v"+2*O+"m0,-"+O+"H"+h.xs,h.noXS||(p+="m0,-"+O+"v"+2*O),o=!R.size(),o?R=A.append("path").style("vector-effect",x?"none":"non-scaling-stroke").classed("xerror",!0):f&&(R=R.transition().duration(n.duration).ease(n.easing)),R.attr("d",p)}else R.remove()}})}})};function t(e,r,a){var n={x:r.c2p(e.x),y:a.c2p(e.y)};return e.yh!==void 0&&(n.yh=a.c2p(e.yh),n.ys=a.c2p(e.ys),g(n.ys)||(n.noYS=!0,n.ys=a.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=r.c2p(e.xh),n.xs=r.c2p(e.xs),g(n.xs)||(n.noXS=!0,n.xs=r.c2p(e.xs,!0))),n}}),kF=Ft((Q,$)=>{var c=un(),g=li();$.exports=function(P){P.each(function(S){var t=S[0].trace,e=t.error_y||{},r=t.error_x||{},a=c.select(this);a.selectAll("path.yerror").style("stroke-width",e.thickness+"px").call(g.stroke,e.color),r.copy_ystyle&&(r=e),a.selectAll("path.xerror").style("stroke-width",r.thickness+"px").call(g.stroke,r.color)})}}),TF=Ft((Q,$)=>{var c=bn(),g=Yc().overrideAll,P=PM(),S={error_x:c.extendFlat({},P),error_y:c.extendFlat({},P)};delete S.error_x.copy_zstyle,delete S.error_y.copy_zstyle,delete S.error_y.copy_ystyle;var t={error_x:c.extendFlat({},P),error_y:c.extendFlat({},P),error_z:c.extendFlat({},P)};delete t.error_x.copy_ystyle,delete t.error_y.copy_ystyle,delete t.error_z.copy_ystyle,delete t.error_z.copy_zstyle,$.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:S,bar:S,histogram:S,scatter3d:g(t,"calc","nested"),scattergl:g(S,"calc","nested")}},supplyDefaults:_F(),calc:bF(),makeComputeError:zM(),plot:wF(),style:kF(),hoverInfo:e};function e(r,a,n){(a.error_y||{}).visible&&(n.yerr=r.yh-r.y,a.error_y.symmetric||(n.yerrneg=r.y-r.ys)),(a.error_x||{}).visible&&(n.xerr=r.xh-r.x,a.error_x.symmetric||(n.xerrneg=r.x-r.xs))}}),AF=Ft((Q,$)=>{$.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}}),MF=Ft((Q,$)=>{var c=un(),g=fo(),P=Kc(),S=Xo(),t=Es(),e=up(),r=bn(),a=r.strTranslate,n=Ta().extendFlat,o=P0(),i=js(),s=li(),f=lp(),x=tc(),y=Hd().flipScale,v=Ky(),T=Z_(),u=Ad(),b=Af(),_=b.LINE_SPACING,C=b.FROM_TL,M=b.FROM_BR,E=AF().cn;function A(O){var N=O._fullLayout,V=N._infolayer.selectAll("g."+E.colorbar).data(h(O),function(H){return H._id});V.enter().append("g").attr("class",function(H){return H._id}).classed(E.colorbar,!0),V.each(function(H){var F=c.select(this);r.ensureSingle(F,"rect",E.cbbg),r.ensureSingle(F,"g",E.cbfills),r.ensureSingle(F,"g",E.cblines),r.ensureSingle(F,"g",E.cbaxis,function(W){W.classed(E.crisp,!0)}),r.ensureSingle(F,"g",E.cbtitleunshift,function(W){W.append("g").classed(E.cbtitle,!0)}),r.ensureSingle(F,"rect",E.cboutline);var U=p(F,H,O);U&&U.then&&(O._promises||[]).push(U),O._context.edits.colorbarPosition&&k(F,H,O)}),V.exit().each(function(H){P.autoMargin(O,H._id)}).remove(),V.order()}function h(O){var N=O._fullLayout,V=O.calcdata,H=[],F,U,W,q;function X(Y){return n(Y,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function lt(){typeof q.calc=="function"?q.calc(O,W,F):(F._fillgradient=U.reversescale?y(U.colorscale):U.colorscale,F._zrange=[U[q.min],U[q.max]])}for(var yt=0;yt1){var $t=Math.pow(10,Math.floor(Math.log(Ce)/Math.LN10));Kr*=$t*r.roundUp(Ce/$t,[2,5,10]),(Math.abs(ge.start)/ge.size+1e-6)%1<2e-6&&(Hr.tick0=0)}Hr.dtick=Kr}Hr.domain=H?[ur+dt/ft.h,ur+te-dt/ft.h]:[ur+tt/ft.w,ur+te-tt/ft.w],Hr.setScale(),O.attr("transform",a(Math.round(ft.l),Math.round(ft.t)));var ne=O.select("."+E.cbtitleunshift).attr("transform",a(-Math.round(ft.l),-Math.round(ft.t))),Ct=Hr.ticklabelposition,gt=Hr.title.font.size,St=O.select("."+E.cbaxis),Nt,ee=0,le=0;function we(Tr,pr){var Jr={propContainer:Hr,propName:N._propPrefix+"title.text",traceIndex:N._traceIndex,_meta:N._meta,placeholder:Y._dfltTitle.colorbar,containerGroup:O.select("."+E.cbtitle)},Vn=Tr.charAt(0)==="h"?Tr.substr(1):"h"+Tr;O.selectAll("."+Vn+",."+Vn+"-math-group").remove(),f.draw(V,Tr,n(Jr,pr||{}))}function Ue(){if(H&&br||!H&&!br){var Tr,pr;Pt==="top"&&(Tr=tt+ft.l+ve*rt,pr=dt+ft.t+oe*(1-ur-te)+3+gt*.75),Pt==="bottom"&&(Tr=tt+ft.l+ve*rt,pr=dt+ft.t+oe*(1-ur)-3-gt*.25),Pt==="right"&&(pr=dt+ft.t+oe*at+3+gt*.75,Tr=tt+ft.l+ve*ur),we(Hr._id+"title",{attributes:{x:Tr,y:pr,"text-anchor":H?"start":"middle"}})}}function qe(){if(H&&!br||!H&&br){var Tr=Hr.position||0,pr=Hr._offset+Hr._length/2,Jr,Vn;if(Pt==="right")Vn=pr,Jr=ft.l+ve*Tr+10+gt*(Hr.showticklabels?1:.5);else if(Jr=pr,Pt==="bottom"&&(Vn=ft.t+oe*Tr+10+(Ct.indexOf("inside")===-1?Hr.tickfont.size:0)+(Hr.ticks!=="inside"&&N.ticklen||0)),Pt==="top"){var Hn=zt.text.split("
").length;Vn=ft.t+oe*Tr+10-Tt-_*gt*Hn}we((H?"h":"v")+Hr._id+"title",{avoid:{selection:c.select(V).selectAll("g."+Hr._id+"tick"),side:Pt,offsetTop:H?0:ft.t,offsetLeft:H?ft.l:0,maxShift:H?Y.width:Y.height},attributes:{x:Jr,y:Vn,"text-anchor":"middle"},transform:{rotate:H?-90:0,offset:0}})}}function ar(){if(!H&&!br||H&&br){var Tr=O.select("."+E.cbtitle),pr=Tr.select("text"),Jr=[-X/2,X/2],Vn=Tr.select(".h"+Hr._id+"title-math-group").node(),Hn=15.6;pr.node()&&(Hn=parseInt(pr.node().style.fontSize,10)*_);var Kn;if(Vn?(Kn=i.bBox(Vn),le=Kn.width,ee=Kn.height,ee>Hn&&(Jr[1]-=(ee-Hn)/2)):pr.node()&&!pr.classed(E.jsPlaceholder)&&(Kn=i.bBox(pr.node()),le=Kn.width,ee=Kn.height),H){if(ee){if(ee+=5,Pt==="top")Hr.domain[1]-=ee/ft.h,Jr[1]*=-1;else{Hr.domain[0]+=ee/ft.h;var Ci=x.lineCount(pr);Jr[1]+=(1-Ci)*Hn}Tr.attr("transform",a(Jr[0],Jr[1])),Hr.setScale()}}else le&&(Pt==="right"&&(Hr.domain[0]+=(le+gt/2)/ft.w),Tr.attr("transform",a(Jr[0],Jr[1])),Hr.setScale())}O.selectAll("."+E.cbfills+",."+E.cblines).attr("transform",H?a(0,Math.round(ft.h*(1-Hr.domain[1]))):a(Math.round(ft.w*Hr.domain[0]),0)),St.attr("transform",H?a(0,Math.round(-ft.t)):a(Math.round(-ft.l),0));var ii=O.select("."+E.cbfills).selectAll("rect."+E.cbfill).attr("style","").data(de);ii.enter().append("rect").classed(E.cbfill,!0).attr("style",""),ii.exit().remove();var qn=Wt.map(Hr.c2p).map(Math.round).sort(function(fr,xr){return fr-xr});ii.each(function(fr,xr){var Qr=[xr===0?Wt[0]:(de[xr]+de[xr-1])/2,xr===de.length-1?Wt[1]:(de[xr]+de[xr+1])/2].map(Hr.c2p).map(Math.round);H&&(Qr[1]=r.constrain(Qr[1]+(Qr[1]>Qr[0])?1:-1,qn[0],qn[1]));var Cn=c.select(this).attr(H?"x":"y",Te).attr(H?"y":"x",c.min(Qr)).attr(H?"width":"height",Math.max(Tt,2)).attr(H?"height":"width",Math.max(c.max(Qr)-c.min(Qr),2));if(N._fillgradient)i.gradient(Cn,V,N._id,H?"vertical":"horizontalreversed",N._fillgradient,"fill");else{var wn=Jt(fr).replace("e-","");Cn.attr("fill",g(wn).toHexString())}});var oa=O.select("."+E.cblines).selectAll("path."+E.cbline).data(wt.color&&wt.width?se:[]);oa.enter().append("path").classed(E.cbline,!0),oa.exit().remove(),oa.each(function(fr){var xr=Te,Qr=Math.round(Hr.c2p(fr))+wt.width/2%1;c.select(this).attr("d","M"+(H?xr+","+Qr:Qr+","+xr)+(H?"h":"v")+Tt).call(i.lineGroupStyle,wt.width,Ht(fr),wt.dash)}),St.selectAll("g."+Hr._id+"tick,path").remove();var Hi=Te+Tt+(X||0)/2-(N.ticks==="outside"?1:0),We=t.calcTicks(Hr),rr=t.getTickSigns(Hr)[2];return t.drawTicks(V,Hr,{vals:Hr.ticks==="inside"?t.clipEnds(Hr,We):We,layer:St,path:t.makeTickPath(Hr,Hi,rr),transFn:t.makeTransTickFn(Hr)}),t.drawLabels(V,Hr,{vals:We,layer:St,transFn:t.makeTransTickLabelFn(Hr),labelFns:t.makeLabelFns(Hr,Hi)})}function Ar(){var Tr,pr=Tt+X/2;Ct.indexOf("inside")===-1&&(Tr=i.bBox(St.node()),pr+=H?Tr.width:Tr.height),Nt=ne.select("text");var Jr=0,Vn=H&&Pt==="top",Hn=!H&&Pt==="right",Kn=0;if(Nt.node()&&!Nt.classed(E.jsPlaceholder)){var Ci,ii=ne.select(".h"+Hr._id+"title-math-group").node();ii&&(H&&br||!H&&!br)?(Tr=i.bBox(ii),Jr=Tr.width,Ci=Tr.height):(Tr=i.bBox(ne.node()),Jr=Tr.right-ft.l-(H?Te:jr),Ci=Tr.bottom-ft.t-(H?jr:Te),!H&&Pt==="top"&&(pr+=Tr.height,Kn=Tr.height)),Hn&&(Nt.attr("transform",a(Jr/2+gt/2,0)),Jr*=2),pr=Math.max(pr,H?Jr:Ci)}var qn=(H?tt:dt)*2+pr+lt+X/2,oa=0;!H&&zt.text&&st==="bottom"&&at<=0&&(oa=qn/2,qn+=oa,Kn+=oa),Y._hColorbarMoveTitle=oa,Y._hColorbarMoveCBTitle=Kn;var Hi=lt+X,We=(H?Te:jr)-Hi/2-(H?tt:0),rr=(H?jr:Te)-(H?Mt:dt+Kn-oa);O.select("."+E.cbbg).attr("x",We).attr("y",rr).attr(H?"width":"height",Math.max(qn-oa,2)).attr(H?"height":"width",Math.max(Mt+Hi,2)).call(s.fill,yt).call(s.stroke,N.bordercolor).style("stroke-width",lt);var fr=Hn?Math.max(Jr-10,0):0;O.selectAll("."+E.cboutline).attr("x",(H?Te:jr+tt)+fr).attr("y",(H?jr+dt-Mt:Te)+(Vn?ee:0)).attr(H?"width":"height",Math.max(Tt,2)).attr(H?"height":"width",Math.max(Mt-(H?2*dt+ee:2*tt+fr),2)).call(s.stroke,N.outlinecolor).style({fill:"none","stroke-width":X});var xr=H?He*qn:0,Qr=H?0:(1-Ge)*qn-Kn;if(xr=it?ft.l-xr:-xr,Qr=vt?ft.t-Qr:-Qr,O.attr("transform",a(xr,Qr)),!H&&(lt||g(yt).getAlpha()&&!g.equals(Y.paper_bgcolor,yt))){var Cn=St.selectAll("text"),wn=Cn[0].length,Mn=O.select("."+E.cbbg).node(),ci=i.bBox(Mn),xi=i.getTranslate(O),Pi=2;Cn.each(function($r,Br){var Gr=0,dn=wn-1;if(Br===Gr||Br===dn){var an=i.bBox(this),Ee=i.getTranslate(this),dr;if(Br===dn){var Vr=an.right+Ee.x,yn=ci.right+xi.x+jr-lt-Pi+rt;dr=yn-Vr,dr>0&&(dr=0)}else if(Br===Gr){var Fn=an.left+Ee.x,Xn=ci.left+xi.x+jr+lt+Pi;dr=Xn-Fn,dr<0&&(dr=0)}dr&&(wn<3?this.setAttribute("transform","translate("+dr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Di={},Zi=C[pt],ui=M[pt],Pa=C[st],Wa=M[st],ze=qn-Tt;H?(U==="pixels"?(Di.y=at,Di.t=Mt*Pa,Di.b=Mt*Wa):(Di.t=Di.b=0,Di.yt=at+F*Pa,Di.yb=at-F*Wa),q==="pixels"?(Di.x=rt,Di.l=qn*Zi,Di.r=qn*ui):(Di.l=ze*Zi,Di.r=ze*ui,Di.xl=rt-W*Zi,Di.xr=rt+W*ui)):(U==="pixels"?(Di.x=rt,Di.l=Mt*Zi,Di.r=Mt*ui):(Di.l=Di.r=0,Di.xl=rt+F*Zi,Di.xr=rt-F*ui),q==="pixels"?(Di.y=1-at,Di.t=qn*Pa,Di.b=qn*Wa):(Di.t=ze*Pa,Di.b=ze*Wa,Di.yt=at-W*Pa,Di.yb=at+W*Wa));var Pe=N.y<.5?"b":"t",Rr=N.x<.5?"l":"r";V._fullLayout._reservedMargin[N._id]={};var qr={r:Y.width-We-xr,l:We+Di.r,b:Y.height-rr-Qr,t:rr+Di.b};it&&vt?P.autoMargin(V,N._id,Di):it?V._fullLayout._reservedMargin[N._id][Pe]=qr[Pe]:vt||H?V._fullLayout._reservedMargin[N._id][Rr]=qr[Rr]:V._fullLayout._reservedMargin[N._id][Pe]=qr[Pe]}return r.syncOrAsync([P.previousPromises,Ue,ar,qe,P.previousPromises,Ar],V)}function k(O,N,V){var H=N.orientation==="v",F=V._fullLayout,U=F._size,W,q,X;e.init({element:O.node(),gd:V,prepFn:function(){W=O.attr("transform"),o(O)},moveFn:function(lt,yt){O.attr("transform",W+a(lt,yt)),q=e.align((H?N._uFrac:N._vFrac)+lt/U.w,H?N._thickFrac:N._lenFrac,0,1,N.xanchor),X=e.align((H?N._vFrac:1-N._uFrac)-yt/U.h,H?N._lenFrac:N._thickFrac,0,1,N.yanchor);var pt=e.getCursor(q,X,N.xanchor,N.yanchor);o(O,pt)},doneFn:function(){if(o(O),q!==void 0&&X!==void 0){var lt={};lt[N._propPrefix+"x"]=q,lt[N._propPrefix+"y"]=X,N._traceIndex!==void 0?S.call("_guiRestyle",V,lt,N._traceIndex):S.call("_guiRelayout",V,lt)}}})}function w(O,N,V){var H=N._levels,F=[],U=[],W,q,X=H.end+H.size/100,lt=H.size,yt=1.001*V[0]-.001*V[1],pt=1.001*V[1]-.001*V[0];for(q=0;q<1e5&&(W=H.start+q*lt,!(lt>0?W>=X:W<=X));q++)W>yt&&W0?W>=X:W<=X));q++)W>V[0]&&W{$.exports={moduleType:"component",name:"colorbar",attributes:T1(),supplyDefaults:fv(),draw:MF().draw,hasColorbar:L0()}}),EF=Ft((Q,$)=>{$.exports={moduleType:"component",name:"legend",layoutAttributes:P_(),supplyLayoutDefaults:Ry(),draw:I_(),style:yw()}}),CF=Ft((Q,$)=>{$.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}}),LF=Ft((Q,$)=>{$.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}}),IM=Ft((Q,$)=>{var c=Xo(),g=bn(),P=g.extendFlat,S=g.extendDeep;function t(r){var a;switch(r){case"themes__thumb":a={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":a={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:a={}}return a}function e(r){var a=["xaxis","yaxis","zaxis"];return a.indexOf(r.slice(0,5))>-1}$.exports=function(r,a){var n,o=r.data,i=r.layout,s=S([],o),f=S({},i,t(a.tileClass)),x=r._context||{};if(a.width&&(f.width=a.width),a.height&&(f.height=a.height),a.tileClass==="thumbnail"||a.tileClass==="themes__thumb"){f.annotations=[];var y=Object.keys(f);for(n=0;n{var c=Im().EventEmitter,g=Xo(),P=bn(),S=o0(),t=IM(),e=$y(),r=Gy();function a(n,o){var i=new c,s=t(n,{format:"png"}),f=s.gd;f.style.position="absolute",f.style.left="-5000px",document.body.appendChild(f);function x(){var v=S.getDelay(f._fullLayout);setTimeout(function(){var T=e(f),u=document.createElement("canvas");u.id=P.randstr(),i=r({format:o.format,width:f._fullLayout.width,height:f._fullLayout.height,canvas:u,emitter:i,svg:T}),i.clean=function(){f&&document.body.removeChild(f)}},v)}var y=S.getRedrawFunc(f);return g.call("_doPlot",f,s.data,s.layout,s.config).then(y).then(x).catch(function(v){i.emit("error",v)}),i}$.exports=a}),zF=Ft((Q,$)=>{var c=o0(),g={getDelay:c.getDelay,getRedrawFunc:c.getRedrawFunc,clone:IM(),toSVG:$y(),svgToImg:Gy(),toImage:PF(),downloadImage:q_()};$.exports=g}),IF=Ft(Q=>{Q.version=Qi().version,Gi(),S_();var $=Xo(),c=Q.register=$.register,g=_6(),P=Object.keys(g);for(t=0;t{$.exports=IF()}),Jy=Ft((Q,$)=>{$.exports={TEXTPAD:3,eventDataKeys:["value","label"]}}),Sg=Ft((Q,$)=>{var c=tf(),g=fh().axisHoverFormat,{hovertemplateAttrs:P,texttemplateAttrs:S,templatefallbackAttrs:t}=$u(),e=Tc(),r=Ea(),a=Jy(),n=Td().pattern,o=Ta().extendFlat,i=r({editType:"calc",arrayOk:!0,colorEditType:"style"}),s=c.marker,f=s.line,x=o({},f.width,{dflt:0}),y=o({width:x,editType:"calc"},e("marker.line")),v=o({line:y,editType:"calc"},e("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:n,cornerradius:{valType:"any",editType:"calc"}});$.exports={x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:c.xperiod0,yperiod0:c.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,xhoverformat:g("x"),yhoverformat:g("y"),text:c.text,texttemplate:S({editType:"plot"},{keys:a.eventDataKeys}),texttemplatefallback:t({editType:"plot"}),hovertext:c.hovertext,hovertemplate:P({},{keys:a.eventDataKeys}),hovertemplatefallback:t(),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:o({},i,{}),insidetextfont:o({},i,{}),outsidetextfont:o({},i,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:o({},c.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:v,offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,selected:{marker:{opacity:c.selected.marker.opacity,color:c.selected.marker.color,editType:"style"},textfont:c.selected.textfont,editType:"style"},unselected:{marker:{opacity:c.unselected.marker.opacity,color:c.unselected.marker.color,editType:"style"},textfont:c.unselected.textfont,editType:"style"},zorder:c.zorder}}),C6=Ft((Q,$)=>{$.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}}),L6=Ft((Q,$)=>{var c=li(),g=Hd().hasColorscale,P=mc(),S=bn().coercePattern;$.exports=function(t,e,r,a,n){var o=r("marker.color",a),i=g(t,"marker");i&&P(t,e,n,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",c.defaultLine),g(t,"marker.line")&&P(t,e,n,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),S(r,"marker.pattern",o,i),r("selected.marker.color"),r("unselected.marker.color")}}),J0=Ft((Q,$)=>{var c=ra(),g=bn(),P=li(),S=Xo(),t=Nm(),e=Fp(),r=L6(),a=Mg(),n=Sg(),o=g.coerceFont;function i(y,v,T,u){function b(A,h){return g.coerce(y,v,n,A,h)}var _=t(y,v,u,b);if(!_){v.visible=!1;return}e(y,v,u,b),b("xhoverformat"),b("yhoverformat"),b("zorder"),b("orientation",v.x&&!v.y?"h":"v"),b("base"),b("offset"),b("width"),b("text"),b("hovertext"),b("hovertemplate"),b("hovertemplatefallback");var C=b("textposition");x(y,v,u,b,C,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),r(y,v,b,T,u);var M=(v.marker.line||{}).color,E=S.getComponentMethod("errorbars","supplyDefaults");E(y,v,M||P.defaultLine,{axis:"y"}),E(y,v,M||P.defaultLine,{axis:"x",inherit:"y"}),g.coerceSelectionMarkerOpacity(v,b)}function s(y,v){var T,u;function b(M,E){return g.coerce(u._input,u,n,M,E)}for(var _=0;_=0)return y}else if(typeof y=="string"&&(y=y.trim(),y.slice(-1)==="%"&&c(y.slice(0,-1))&&(y=+y.slice(0,-1),y>=0)))return y+"%"}function x(y,v,T,u,b,_){_=_||{};var C=_.moduleHasSelected!==!1,M=_.moduleHasUnselected!==!1,E=_.moduleHasConstrain!==!1,A=_.moduleHasCliponaxis!==!1,h=_.moduleHasTextangle!==!1,p=_.moduleHasInsideanchor!==!1,k=!!_.hasPathbar,w=Array.isArray(b)||b==="auto",R=w||b==="inside",O=w||b==="outside";if(R||O){var N=o(u,"textfont",T.font),V=g.extendFlat({},N),H=y.textfont&&y.textfont.color,F=!H;if(F&&delete V.color,o(u,"insidetextfont",V),k){var U=g.extendFlat({},N);F&&delete U.color,o(u,"pathbar.textfont",U)}O&&o(u,"outsidetextfont",N),C&&u("selected.textfont.color"),M&&u("unselected.textfont.color"),E&&u("constraintext"),A&&u("cliponaxis"),h&&u("textangle"),u("texttemplate"),u("texttemplatefallback")}R&&p&&u("insidetextanchor")}$.exports={supplyDefaults:i,crossTraceDefaults:s,handleText:x,validateCornerradius:f}}),OM=Ft((Q,$)=>{var c=Xo(),g=Es(),P=bn(),S=C6(),t=J0().validateCornerradius;$.exports=function(e,r,a){function n(C,M){return P.coerce(e,r,S,C,M)}for(var o=!1,i=!1,s=!1,f={},x=n("barmode"),y=x==="group",v=0;v0&&!f[u]&&(s=!0),f[u]=!0),T.visible&&T.type==="histogram"){var b=g.getFromId({_fullLayout:r},T[T.orientation==="v"?"xaxis":"yaxis"]);b.type!=="category"&&(i=!0)}}if(!o){delete r.barmode;return}x!=="overlay"&&n("barnorm"),n("bargap",i&&!s?0:.2),n("bargroupgap");var _=n("barcornerradius");r.barcornerradius=t(_)}}),Rw=Ft((Q,$)=>{var c=bn();$.exports=function(g,P){for(var S=0;S{var c=Es(),g=D0(),P=Hd().hasColorscale,S=Jd(),t=Rw(),e=Bt();$.exports=function(r,a){var n=c.getFromId(r,a.xaxis||"x"),o=c.getFromId(r,a.yaxis||"y"),i,s,f,x,y,v,T={msUTC:!!(a.base||a.base===0)};a.orientation==="h"?(i=n.makeCalcdata(a,"x",T),f=o.makeCalcdata(a,"y"),x=g(a,o,"y",f),y=!!a.yperiodalignment,v="y"):(i=o.makeCalcdata(a,"y",T),f=n.makeCalcdata(a,"x"),x=g(a,n,"x",f),y=!!a.xperiodalignment,v="x"),s=x.vals;for(var u=Math.min(s.length,i.length),b=new Array(u),_=0;_{var c=un(),g=bn();function P(r,a,n){var o=r._fullLayout,i=o["_"+n+"Text_minsize"];if(i){var s=o.uniformtext.mode==="hide",f;switch(n){case"funnelarea":case"pie":case"sunburst":f="g.slice";break;case"treemap":case"icicle":f="g.slice, g.pathbar";break;default:f="g.points > g.point"}a.selectAll(f).each(function(x){var y=x.transform;if(y){y.scale=s&&y.hide?0:i/y.fontSize;var v=c.select(this).select("text");g.setTransormAndDisplay(v,y)}})}}function S(r,a,n){if(n.uniformtext.mode){var o=e(r),i=n.uniformtext.minsize,s=a.scale*a.fontSize;a.hide=s{var $=ra(),c=fo(),g=bn().isArrayOrTypedArray;Q.coerceString=function(P,S,t){if(typeof S=="string"){if(S||!P.noBlank)return S}else if((typeof S=="number"||S===!0)&&!P.strict)return String(S);return t!==void 0?t:P.dflt},Q.coerceNumber=function(P,S,t){if($(S)){S=+S;var e=P.min,r=P.max,a=e!==void 0&&Sr;if(!a)return S}return t!==void 0?t:P.dflt},Q.coerceColor=function(P,S,t){return c(S).isValid()?S:t!==void 0?t:P.dflt},Q.coerceEnumerated=function(P,S,t){return P.coerceNumber&&(S=+S),P.values.indexOf(S)!==-1?S:t!==void 0?t:P.dflt},Q.getValue=function(P,S){var t;return g(P)?S{var c=un(),g=li(),P=js(),S=bn(),t=Xo(),e=Rp().resizeText,r=Sg(),a=r.textfont,n=r.insidetextfont,o=r.outsidetextfont,i=P6();function s(A){var h=c.select(A).selectAll('g[class^="barlayer"]').selectAll("g.trace");e(A,h,"bar");var p=h.size(),k=A._fullLayout;h.style("opacity",function(w){return w[0].trace.opacity}).each(function(w){(k.barmode==="stack"&&p>1||k.bargap===0&&k.bargroupgap===0&&!w[0].trace.marker.line.width)&&c.select(this).attr("shape-rendering","crispEdges")}),h.selectAll("g.points").each(function(w){var R=c.select(this),O=w[0].trace;f(R,O,A)}),t.getComponentMethod("errorbars","style")(h)}function f(A,h,p){P.pointStyle(A.selectAll("path"),h,p),x(A,h,p)}function x(A,h,p){A.selectAll("text").each(function(k){var w=c.select(this),R=S.ensureUniformFontSize(p,u(w,k,h,p));P.font(w,R)})}function y(A,h,p){var k=h[0].trace;k.selectedpoints?v(p,k,A):(f(p,k,A),t.getComponentMethod("errorbars","style")(p))}function v(A,h,p){P.selectedPointStyle(A.selectAll("path"),h),T(A.selectAll("text"),h,p)}function T(A,h,p){A.each(function(k){var w=c.select(this),R;if(k.selected){R=S.ensureUniformFontSize(p,u(w,k,h,p));var O=h.selected.textfont&&h.selected.textfont.color;O&&(R.color=O),P.font(w,R)}else P.selectedTextStyle(w,h)})}function u(A,h,p,k){var w=k._fullLayout.font,R=p.textfont;if(A.classed("bartext-inside")){var O=E(h,p);R=_(p,h.i,w,O)}else A.classed("bartext-outside")&&(R=C(p,h.i,w));return R}function b(A,h,p){return M(a,A.textfont,h,p)}function _(A,h,p,k){var w=b(A,h,p),R=A._input.textfont===void 0||A._input.textfont.color===void 0||Array.isArray(A.textfont.color)&&A.textfont.color[h]===void 0;return R&&(w={color:g.contrast(k),family:w.family,size:w.size,weight:w.weight,style:w.style,variant:w.variant,textcase:w.textcase,lineposition:w.lineposition,shadow:w.shadow}),M(n,A.insidetextfont,h,w)}function C(A,h,p){var k=b(A,h,p);return M(o,A.outsidetextfont,h,k)}function M(A,h,p,k){h=h||{};var w=i.getValue(h.family,p),R=i.getValue(h.size,p),O=i.getValue(h.color,p),N=i.getValue(h.weight,p),V=i.getValue(h.style,p),H=i.getValue(h.variant,p),F=i.getValue(h.textcase,p),U=i.getValue(h.lineposition,p),W=i.getValue(h.shadow,p);return{family:i.coerceString(A.family,w,k.family),size:i.coerceNumber(A.size,R,k.size),color:i.coerceColor(A.color,O,k.color),weight:i.coerceString(A.weight,N,k.weight),style:i.coerceString(A.style,V,k.style),variant:i.coerceString(A.variant,H,k.variant),textcase:i.coerceString(A.variant,F,k.textcase),lineposition:i.coerceString(A.variant,U,k.lineposition),shadow:i.coerceString(A.variant,W,k.shadow)}}function E(A,h){return h.type==="waterfall"?h[A.dir].marker.color:A.mcc||A.mc||h.marker.color}$.exports={style:s,styleTextPoints:x,styleOnSelect:y,getInsideTextFont:_,getOutsideTextFont:C,getBarColor:E,resizeText:e}}),Qy=Ft((Q,$)=>{var c=un(),g=ra(),P=bn(),S=tc(),t=li(),e=js(),r=Xo(),a=Es().tickText,n=Rp(),o=n.recordMinTextSize,i=n.clearMinTextSize,s=xm(),f=P6(),x=Jy(),y=Sg(),v=y.text,T=y.textposition,u=Dp().appendArrayPointValue,b=x.TEXTPAD;function _(lt){return lt.id}function C(lt){if(lt.ids)return _}function M(lt){return(lt>0)-(lt<0)}function E(lt,yt){return lt0}function k(lt,yt,pt,st,tt,dt){var rt=yt.xaxis,at=yt.yaxis,vt=lt._fullLayout,it=lt._context.staticPlot;tt||(tt={mode:vt.barmode,norm:vt.barmode,gap:vt.bargap,groupgap:vt.bargroupgap},i("bar",vt));var Y=P.makeTraceGroups(st,pt,"trace bars").each(function(ft){var ut=c.select(this),wt=ft[0].trace,zt=ft[0].t,Pt=wt.type==="waterfall",Wt=wt.type==="funnel",Ht=wt.type==="histogram",Jt=wt.type==="bar",ge=Jt||Wt,he=0;Pt&&wt.connector.visible&&wt.connector.mode==="between"&&(he=wt.connector.line.width/2);var de=wt.orientation==="h",se=p(tt),Tt=P.ensureSingle(ut,"g","points"),Lt=C(wt),Mt=Tt.selectAll("g.point").data(P.identity,Lt);Mt.enter().append("g").classed("point",!0),Mt.exit().remove(),Mt.each(function(ve,oe){var Te=c.select(this),He=A(ve,rt,at,de),Ge=He[0][0],cr=He[0][1],ur=He[1][0],jr=He[1][1],Hr=(de?cr-Ge:jr-ur)===0;Hr&&ge&&f.getLineWidth(wt,ve)&&(Hr=!1),Hr||(Hr=!g(Ge)||!g(cr)||!g(ur)||!g(jr)),ve.isBlank=Hr,Hr&&(de?cr=Ge:jr=ur),he&&!Hr&&(de?(Ge-=E(Ge,cr)*he,cr+=E(Ge,cr)*he):(ur-=E(ur,jr)*he,jr+=E(ur,jr)*he));var br,Kr;if(wt.type==="waterfall"){if(!Hr){var rn=wt[ve.dir].marker;br=rn.line.width,Kr=rn.color}}else br=f.getLineWidth(wt,ve),Kr=ve.mc||wt.marker.color;function Ce(Hi){var We=c.round(br/2%1,2);return tt.gap===0&&tt.groupgap===0?c.round(Math.round(Hi)-We,2):Hi}function $t(Hi,We,rr){return rr&&Hi===We?Hi:Math.abs(Hi-We)>=2?Ce(Hi):Hi>We?Math.ceil(Hi):Math.floor(Hi)}var ne=t.opacity(Kr),Ct=ne<1||br>.01?Ce:$t;lt._context.staticPlot||(Ge=Ct(Ge,cr,de),cr=Ct(cr,Ge,de),ur=Ct(ur,jr,!de),jr=Ct(jr,ur,!de));var gt=de?rt.c2p:at.c2p,St;ve.s0>0?St=ve._sMax:ve.s0<0?St=ve._sMin:St=ve.s1>0?ve._sMax:ve._sMin;function Nt(Hi,We){if(!Hi)return 0;var rr=Math.abs(de?jr-ur:cr-Ge),fr=Math.abs(de?cr-Ge:jr-ur),xr=Ct(Math.abs(gt(St,!0)-gt(0,!0))),Qr=ve.hasB?Math.min(rr/2,fr/2):Math.min(rr/2,xr),Cn;if(We==="%"){var wn=Math.min(50,Hi);Cn=rr*(wn/100)}else Cn=Hi;return Ct(Math.max(Math.min(Cn,Qr),0))}var ee=Jt||Ht?Nt(zt.cornerradiusvalue,zt.cornerradiusform):0,le,we,Ue="M"+Ge+","+ur+"V"+jr+"H"+cr+"V"+ur+"Z",qe=0;if(ee&&ve.s){var ar=M(ve.s0)===0||M(ve.s)===M(ve.s0)?ve.s1:ve.s0;if(qe=Ct(ve.hasB?0:Math.abs(gt(St,!0)-gt(ar,!0))),qe0?Math.sqrt(qe*(2*ee-qe)):0,Hn=Ar>0?Math.max:Math.min;le="M"+Ge+","+ur+"V"+(jr-Jr*Tr)+"H"+Hn(cr-(ee-qe)*Ar,Ge)+"A "+ee+","+ee+" 0 0 "+pr+" "+cr+","+(jr-ee*Tr-Vn)+"V"+(ur+ee*Tr+Vn)+"A "+ee+","+ee+" 0 0 "+pr+" "+Hn(cr-(ee-qe)*Ar,Ge)+","+(ur+Jr*Tr)+"Z"}else if(ve.hasB)le="M"+(Ge+ee*Ar)+","+ur+"A "+ee+","+ee+" 0 0 "+pr+" "+Ge+","+(ur+ee*Tr)+"V"+(jr-ee*Tr)+"A "+ee+","+ee+" 0 0 "+pr+" "+(Ge+ee*Ar)+","+jr+"H"+(cr-ee*Ar)+"A "+ee+","+ee+" 0 0 "+pr+" "+cr+","+(jr-ee*Tr)+"V"+(ur+ee*Tr)+"A "+ee+","+ee+" 0 0 "+pr+" "+(cr-ee*Ar)+","+ur+"Z";else{we=Math.abs(jr-ur)+qe;var Kn=we0?Math.sqrt(qe*(2*ee-qe)):0,ii=Tr>0?Math.max:Math.min;le="M"+(Ge+Kn*Ar)+","+ur+"V"+ii(jr-(ee-qe)*Tr,ur)+"A "+ee+","+ee+" 0 0 "+pr+" "+(Ge+ee*Ar-Ci)+","+jr+"H"+(cr-ee*Ar+Ci)+"A "+ee+","+ee+" 0 0 "+pr+" "+(cr-Kn*Ar)+","+ii(jr-(ee-qe)*Tr,ur)+"V"+ur+"Z"}}else le=Ue}else le=Ue;var qn=h(P.ensureSingle(Te,"path"),vt,tt,dt);if(qn.style("vector-effect",it?"none":"non-scaling-stroke").attr("d",isNaN((cr-Ge)*(jr-ur))||Hr&<._context.staticPlot?"M0,0Z":le).call(e.setClipUrl,yt.layerClipId,lt),!vt.uniformtext.mode&&se){var oa=e.makePointStyleFns(wt);e.singlePointStyle(ve,qn,wt,oa,lt)}w(lt,yt,Te,ft,oe,Ge,cr,ur,jr,ee,qe,tt,dt),yt.layerClipId&&e.hideOutsideRangePoint(ve,Te.select("text"),rt,at,wt.xcalendar,wt.ycalendar)});var te=wt.cliponaxis===!1;e.setClipUrl(ut,te?null:yt.layerClipId,lt)});r.getComponentMethod("errorbars","plot")(lt,Y,yt,tt)}function w(lt,yt,pt,st,tt,dt,rt,at,vt,it,Y,ft,ut){var wt=yt.xaxis,zt=yt.yaxis,Pt=lt._fullLayout,Wt;function Ht(we,Ue,qe){var ar=P.ensureSingle(we,"text").text(Ue).attr({class:"bartext bartext-"+Wt,"text-anchor":"middle","data-notex":1}).call(e.font,qe).call(S.convertToTspans,lt);return ar}var Jt=st[0].trace,ge=Jt.orientation==="h",he=U(Pt,st,tt,wt,zt);Wt=W(Jt,tt);var de=ft.mode==="stack"||ft.mode==="relative",se=st[tt],Tt=!de||se._outmost,Lt=se.hasB,Mt=it&&it-Y>b;if(!he||Wt==="none"||(se.isBlank||dt===rt||at===vt)&&(Wt==="auto"||Wt==="inside")){pt.select("text").remove();return}var te=Pt.font,ve=s.getBarColor(st[tt],Jt),oe=s.getInsideTextFont(Jt,tt,te,ve),Te=s.getOutsideTextFont(Jt,tt,te),He=Jt.insidetextanchor||"end",Ge=pt.datum();ge?wt.type==="log"&&Ge.s0<=0&&(wt.range[0]0&&Ce>0,Ct;Mt?Lt?Ct=R(jr-2*it,Hr,rn,Ce,ge)||R(jr,Hr-2*it,rn,Ce,ge):ge?Ct=R(jr-(it-Y),Hr,rn,Ce,ge)||R(jr,Hr-2*(it-Y),rn,Ce,ge):Ct=R(jr,Hr-(it-Y),rn,Ce,ge)||R(jr-2*(it-Y),Hr,rn,Ce,ge):Ct=R(jr,Hr,rn,Ce,ge),ne&&Ct?Wt="inside":(Wt="outside",br.remove(),br=null)}else Wt="inside";if(!br){$t=P.ensureUniformFontSize(lt,Wt==="outside"?Te:oe),br=Ht(pt,he,$t);var gt=br.attr("transform");if(br.attr("transform",""),Kr=e.bBox(br.node()),rn=Kr.width,Ce=Kr.height,br.attr("transform",gt),rn<=0||Ce<=0){br.remove();return}}var St=Jt.textangle,Nt,ee;Wt==="outside"?(ee=Jt.constraintext==="both"||Jt.constraintext==="outside",Nt=F(dt,rt,at,vt,Kr,{isHorizontal:ge,constrained:ee,angle:St})):(ee=Jt.constraintext==="both"||Jt.constraintext==="inside",Nt=V(dt,rt,at,vt,Kr,{isHorizontal:ge,constrained:ee,angle:St,anchor:He,hasB:Lt,r:it,overhead:Y})),Nt.fontSize=$t.size,o(Jt.type==="histogram"?"bar":Jt.type,Nt,Pt),se.transform=Nt;var le=h(br,Pt,ft,ut);P.setTransormAndDisplay(le,Nt)}function R(lt,yt,pt,st,tt){if(lt<0||yt<0)return!1;var dt=pt<=lt&&st<=yt,rt=pt<=yt&&st<=lt,at=tt?lt>=pt*(yt/st):yt>=st*(lt/pt);return dt||rt||at}function O(lt){return lt==="auto"?0:lt}function N(lt,yt){var pt=Math.PI/180*yt,st=Math.abs(Math.sin(pt)),tt=Math.abs(Math.cos(pt));return{x:lt.width*tt+lt.height*st,y:lt.width*st+lt.height*tt}}function V(lt,yt,pt,st,tt,dt){var rt=!!dt.isHorizontal,at=!!dt.constrained,vt=dt.angle||0,it=dt.anchor,Y=it==="end",ft=it==="start",ut=dt.leftToRight||0,wt=(ut+1)/2,zt=1-wt,Pt=dt.hasB,Wt=dt.r,Ht=dt.overhead,Jt=tt.width,ge=tt.height,he=Math.abs(yt-lt),de=Math.abs(st-pt),se=he>2*b&&de>2*b?b:0;he-=2*se,de-=2*se;var Tt=O(vt);vt==="auto"&&!(Jt<=he&&ge<=de)&&(Jt>he||ge>de)&&(!(Jt>de||ge>he)||Jtb){var ve=H(lt,yt,pt,st,Lt,Wt,Ht,rt,Pt);Mt=ve.scale,te=ve.pad}else Mt=1,at&&(Mt=Math.min(1,he/Lt.x,de/Lt.y)),te=0;var oe=tt.left*zt+tt.right*wt,Te=(tt.top+tt.bottom)/2,He=(lt+b)*zt+(yt-b)*wt,Ge=(pt+st)/2,cr=0,ur=0;if(ft||Y){var jr=(rt?Lt.x:Lt.y)/2;Wt&&(Y||Pt)&&(se+=te);var Hr=rt?E(lt,yt):E(pt,st);rt?ft?(He=lt+Hr*se,cr=-Hr*jr):(He=yt-Hr*se,cr=Hr*jr):ft?(Ge=pt+Hr*se,ur=-Hr*jr):(Ge=st-Hr*se,ur=Hr*jr)}return{textX:oe,textY:Te,targetX:He,targetY:Ge,anchorX:cr,anchorY:ur,scale:Mt,rotate:Tt}}function H(lt,yt,pt,st,tt,dt,rt,at,vt){var it=Math.max(0,Math.abs(yt-lt)-2*b),Y=Math.max(0,Math.abs(st-pt)-2*b),ft=dt-b,ut=rt?ft-Math.sqrt(ft*ft-(ft-rt)*(ft-rt)):ft,wt=vt?ft*2:at?ft-rt:2*ut,zt=vt?ft*2:at?2*ut:ft-rt,Pt,Wt,Ht,Jt,ge;return tt.y/tt.x>=Y/(it-wt)?Jt=Y/tt.y:tt.y/tt.x<=(Y-zt)/it?Jt=it/tt.x:!vt&&at?(Pt=tt.x*tt.x+tt.y*tt.y/4,Wt=-2*tt.x*(it-ft)-tt.y*(Y/2-ft),Ht=(it-ft)*(it-ft)+(Y/2-ft)*(Y/2-ft)-ft*ft,Jt=(-Wt+Math.sqrt(Wt*Wt-4*Pt*Ht))/(2*Pt)):vt?(Pt=(tt.x*tt.x+tt.y*tt.y)/4,Wt=-tt.x*(it/2-ft)-tt.y*(Y/2-ft),Ht=(it/2-ft)*(it/2-ft)+(Y/2-ft)*(Y/2-ft)-ft*ft,Jt=(-Wt+Math.sqrt(Wt*Wt-4*Pt*Ht))/(2*Pt)):(Pt=tt.x*tt.x/4+tt.y*tt.y,Wt=-tt.x*(it/2-ft)-2*tt.y*(Y-ft),Ht=(it/2-ft)*(it/2-ft)+(Y-ft)*(Y-ft)-ft*ft,Jt=(-Wt+Math.sqrt(Wt*Wt-4*Pt*Ht))/(2*Pt)),Jt=Math.min(1,Jt),at?ge=Math.max(0,ft-Math.sqrt(Math.max(0,ft*ft-(ft-(Y-tt.y*Jt)/2)*(ft-(Y-tt.y*Jt)/2)))-rt):ge=Math.max(0,ft-Math.sqrt(Math.max(0,ft*ft-(ft-(it-tt.x*Jt)/2)*(ft-(it-tt.x*Jt)/2)))-rt),{scale:Jt,pad:ge}}function F(lt,yt,pt,st,tt,dt){var rt=!!dt.isHorizontal,at=!!dt.constrained,vt=dt.angle||0,it=tt.width,Y=tt.height,ft=Math.abs(yt-lt),ut=Math.abs(st-pt),wt;rt?wt=ut>2*b?b:0:wt=ft>2*b?b:0;var zt=1;at&&(zt=rt?Math.min(1,ut/Y):Math.min(1,ft/it));var Pt=O(vt),Wt=N(tt,Pt),Ht=(rt?Wt.x:Wt.y)/2,Jt=(tt.left+tt.right)/2,ge=(tt.top+tt.bottom)/2,he=(lt+yt)/2,de=(pt+st)/2,se=0,Tt=0,Lt=rt?E(yt,lt):E(pt,st);return rt?(he=yt-Lt*wt,se=Lt*Ht):(de=st+Lt*wt,Tt=-Lt*Ht),{textX:Jt,textY:ge,targetX:he,targetY:de,anchorX:se,anchorY:Tt,scale:zt,rotate:Pt}}function U(lt,yt,pt,st,tt){var dt=yt[0].trace,rt=dt.texttemplate,at;return rt?at=q(lt,yt,pt,st,tt):dt.textinfo?at=X(yt,pt,st,tt):at=f.getValue(dt.text,pt),f.coerceString(v,at)}function W(lt,yt){var pt=f.getValue(lt.textposition,yt);return f.coerceEnumerated(T,pt)}function q(lt,yt,pt,st,tt){var dt=yt[0].trace,rt=P.castOption(dt,pt,"texttemplate");if(!rt)return"";var at=dt.type==="histogram",vt=dt.type==="waterfall",it=dt.type==="funnel",Y=dt.orientation==="h",ft,ut,wt,zt;Y?(ft="y",ut=tt,wt="x",zt=st):(ft="x",ut=st,wt="y",zt=tt);function Pt(se){return a(ut,ut.c2l(se),!0).text}function Wt(se){return a(zt,zt.c2l(se),!0).text}var Ht=yt[pt],Jt={};Jt.label=Ht.p,Jt.labelLabel=Jt[ft+"Label"]=Pt(Ht.p);var ge=P.castOption(dt,Ht.i,"text");(ge===0||ge)&&(Jt.text=ge),Jt.value=Ht.s,Jt.valueLabel=Jt[wt+"Label"]=Wt(Ht.s);var he={};u(he,dt,Ht.i),(at||he.x===void 0)&&(he.x=Y?Jt.value:Jt.label),(at||he.y===void 0)&&(he.y=Y?Jt.label:Jt.value),(at||he.xLabel===void 0)&&(he.xLabel=Y?Jt.valueLabel:Jt.labelLabel),(at||he.yLabel===void 0)&&(he.yLabel=Y?Jt.labelLabel:Jt.valueLabel),vt&&(Jt.delta=+Ht.rawS||Ht.s,Jt.deltaLabel=Wt(Jt.delta),Jt.final=Ht.v,Jt.finalLabel=Wt(Jt.final),Jt.initial=Jt.final-Jt.delta,Jt.initialLabel=Wt(Jt.initial)),it&&(Jt.value=Ht.s,Jt.valueLabel=Wt(Jt.value),Jt.percentInitial=Ht.begR,Jt.percentInitialLabel=P.formatPercent(Ht.begR),Jt.percentPrevious=Ht.difR,Jt.percentPreviousLabel=P.formatPercent(Ht.difR),Jt.percentTotal=Ht.sumR,Jt.percenTotalLabel=P.formatPercent(Ht.sumR));var de=P.castOption(dt,Ht.i,"customdata");return de&&(Jt.customdata=de),P.texttemplateString({data:[he,Jt,dt._meta],fallback:dt.texttemplatefallback,labels:Jt,locale:lt._d3locale,template:rt})}function X(lt,yt,pt,st){var tt=lt[0].trace,dt=tt.orientation==="h",rt=tt.type==="waterfall",at=tt.type==="funnel";function vt(de){var se=dt?st:pt;return a(se,de,!0).text}function it(de){var se=dt?pt:st;return a(se,+de,!0).text}var Y=tt.textinfo,ft=lt[yt],ut=Y.split("+"),wt=[],zt,Pt=function(de){return ut.indexOf(de)!==-1};if(Pt("label")&&wt.push(vt(lt[yt].p)),Pt("text")&&(zt=P.castOption(tt,ft.i,"text"),(zt===0||zt)&&wt.push(zt)),rt){var Wt=+ft.rawS||ft.s,Ht=ft.v,Jt=Ht-Wt;Pt("initial")&&wt.push(it(Jt)),Pt("delta")&&wt.push(it(Wt)),Pt("final")&&wt.push(it(Ht))}if(at){Pt("value")&&wt.push(it(ft.s));var ge=0;Pt("percent initial")&&ge++,Pt("percent previous")&&ge++,Pt("percent total")&&ge++;var he=ge>1;Pt("percent initial")&&(zt=P.formatPercent(ft.begR),he&&(zt+=" of initial"),wt.push(zt)),Pt("percent previous")&&(zt=P.formatPercent(ft.difR),he&&(zt+=" of previous"),wt.push(zt)),Pt("percent total")&&(zt=P.formatPercent(ft.sumR),he&&(zt+=" of total"),wt.push(zt))}return wt.join("
")}$.exports={plot:k,toMoveInsideBar:V}}),Y_=Ft((Q,$)=>{var c=Qh(),g=Xo(),P=li(),S=bn().fillText,t=P6().getLineWidth,e=Es().hoverLabelText,r=Da().BADNUM;function a(i,s,f,x,y){var v=n(i,s,f,x,y);if(v){var T=v.cd,u=T[0].trace,b=T[v.index];return v.color=o(u,b),g.getComponentMethod("errorbars","hoverInfo")(b,u,v),[v]}}function n(i,s,f,x,y){var v=i.cd,T=v[0].trace,u=v[0].t,b=x==="closest",_=T.type==="waterfall",C=i.maxHoverDistance,M=i.maxSpikeDistance,E,A,h,p,k,w,R;T.orientation==="h"?(E=f,A=s,h="y",p="x",k=st,w=lt):(E=s,A=f,h="x",p="y",w=st,k=lt);var O=T[h+"period"],N=b||O;function V(zt){return F(zt,-1)}function H(zt){return F(zt,1)}function F(zt,Pt){var Wt=zt.w;return zt[h]+Pt*Wt/2}function U(zt){return zt[h+"End"]-zt[h+"Start"]}var W=b?V:O?function(zt){return zt.p-U(zt)/2}:function(zt){return Math.min(V(zt),zt.p-u.bardelta/2)},q=b?H:O?function(zt){return zt.p+U(zt)/2}:function(zt){return Math.max(H(zt),zt.p+u.bardelta/2)};function X(zt,Pt,Wt){return y.finiteRange&&(Wt=0),c.inbox(zt-E,Pt-E,Wt+Math.min(1,Math.abs(Pt-zt)/R)-1)}function lt(zt){return X(W(zt),q(zt),C)}function yt(zt){return X(V(zt),H(zt),M)}function pt(zt){var Pt=zt[p];if(_){var Wt=Math.abs(zt.rawS)||0;A>0?Pt+=Wt:A<0&&(Pt-=Wt)}return Pt}function st(zt){var Pt=A,Wt=zt.b,Ht=pt(zt);return c.inbox(Wt-Pt,Ht-Pt,C+(Ht-Pt)/(Ht-Wt)-1)}function tt(zt){var Pt=A,Wt=zt.b,Ht=pt(zt);return c.inbox(Wt-Pt,Ht-Pt,M+(Ht-Pt)/(Ht-Wt)-1)}var dt=i[h+"a"],rt=i[p+"a"];R=Math.abs(dt.r2c(dt.range[1])-dt.r2c(dt.range[0]));function at(zt){return(k(zt)+w(zt))/2}var vt=c.getDistanceFunction(x,k,w,at);if(c.getClosest(v,vt,i),i.index!==!1&&v[i.index].p!==r){N||(W=function(zt){return Math.min(V(zt),zt.p-u.bargroupwidth/2)},q=function(zt){return Math.max(H(zt),zt.p+u.bargroupwidth/2)});var it=i.index,Y=v[it],ft=T.base?Y.b+Y.s:Y.s;i[p+"0"]=i[p+"1"]=rt.c2p(Y[p],!0),i[p+"LabelVal"]=ft;var ut=u.extents[u.extents.round(Y.p)];i[h+"0"]=dt.c2p(b?W(Y):ut[0],!0),i[h+"1"]=dt.c2p(b?q(Y):ut[1],!0);var wt=Y.orig_p!==void 0;return i[h+"LabelVal"]=wt?Y.orig_p:Y.p,i.labelLabel=e(dt,i[h+"LabelVal"],T[h+"hoverformat"]),i.valueLabel=e(rt,i[p+"LabelVal"],T[p+"hoverformat"]),i.baseLabel=e(rt,Y.b,T[p+"hoverformat"]),i.spikeDistance=(tt(Y)+yt(Y))/2,i[h+"Spike"]=dt.c2p(Y.p,!0),S(Y,T,i),i.hovertemplate=T.hovertemplate,i}}function o(i,s){var f=s.mcc||i.marker.color,x=s.mlcc||i.marker.line.color,y=t(i,s);if(P.opacity(f))return f;if(P.opacity(x)&&y)return x}$.exports={hoverPoints:a,hoverOnBars:n,getTraceColor:o}}),FF=Ft((Q,$)=>{$.exports=function(c,g,P){return c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),P.orientation==="h"?(c.label=c.y,c.value=c.x):(c.label=c.x,c.value=c.y),c}}),K_=Ft((Q,$)=>{$.exports=function(g,P){var S=g.cd,t=g.xaxis,e=g.yaxis,r=S[0].trace,a=r.type==="funnel",n=r.orientation==="h",o=[],i;if(P===!1)for(i=0;i{$.exports={attributes:Sg(),layoutAttributes:C6(),supplyDefaults:J0().supplyDefaults,crossTraceDefaults:J0().crossTraceDefaults,supplyLayoutDefaults:OM(),calc:DF(),crossTraceCalc:Pr().crossTraceCalc,colorbar:xo(),arraysToCalcdata:Rw(),plot:Qy().plot,style:xm().style,styleOnSelect:xm().styleOnSelect,hoverPoints:Y_().hoverPoints,eventData:FF(),selectPoints:K_(),moduleType:"trace",name:"bar",basePlotModule:Mf(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}}),BF=Ft((Q,$)=>{$.exports=RF()}),Bw=Ft((Q,$)=>{var c=z0(),g=tf(),P=Sg(),S=bi(),t=fh().axisHoverFormat,{hovertemplateAttrs:e,templatefallbackAttrs:r}=$u(),a=Ta().extendFlat,n=g.marker,o=n.line;$.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:g.xperiod,yperiod:g.yperiod,xperiod0:g.xperiod0,yperiod0:g.yperiod0,xperiodalignment:g.xperiodalignment,yperiodalignment:g.yperiodalignment,xhoverformat:t("x"),yhoverformat:t("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:a({},n.symbol,{arrayOk:!1,editType:"plot"}),opacity:a({},n.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:a({},n.angle,{arrayOk:!1,editType:"calc"}),size:a({},n.size,{arrayOk:!1,editType:"calc"}),color:a({},n.color,{arrayOk:!1,editType:"style"}),line:{color:a({},o.color,{arrayOk:!1,dflt:S.defaultLine,editType:"style"}),width:a({},o.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:c(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:P.offsetgroup,alignmentgroup:P.alignmentgroup,selected:{marker:g.selected.marker,editType:"style"},unselected:{marker:g.unselected.marker,editType:"style"},text:a({},g.text,{}),hovertext:a({},g.hovertext,{}),hovertemplate:e({}),hovertemplatefallback:r(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:g.zorder}}),Nw=Ft((Q,$)=>{$.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}}),jw=Ft((Q,$)=>{var c=bn(),g=Xo(),P=li(),S=Fp(),t=Mg(),e=dv(),r=Bw();function a(s,f,x,y){function v(p,k){return c.coerce(s,f,r,p,k)}if(n(s,f,v,y),f.visible!==!1){S(s,f,y,v),v("xhoverformat"),v("yhoverformat");var T=f._hasPreCompStats;T&&(v("lowerfence"),v("upperfence")),v("line.color",(s.marker||{}).color||x),v("line.width"),v("fillcolor",P.addOpacity(f.line.color,.5));var u=!1;if(T){var b=v("mean"),_=v("sd");b&&b.length&&(u=!0,_&&_.length&&(u="sd"))}v("whiskerwidth");var C=v("sizemode"),M;C==="quartiles"&&(M=v("boxmean",u)),v("showwhiskers",C==="quartiles"),(C==="sd"||M==="sd")&&v("sdmultiple"),v("width"),v("quartilemethod");var E=!1;if(T){var A=v("notchspan");A&&A.length&&(E=!0)}else c.validate(s.notchwidth,r.notchwidth)&&(E=!0);var h=v("notched",E);h&&v("notchwidth"),o(s,f,v,{prefix:"box"}),v("zorder")}}function n(s,f,x,y){function v(X){var lt=0;return X&&X.length&&(lt+=1,c.isArrayOrTypedArray(X[0])&&X[0].length&&(lt+=1)),lt}function T(X){return c.validate(s[X],r[X])}var u=x("y"),b=x("x"),_;if(f.type==="box"){var C=x("q1"),M=x("median"),E=x("q3");f._hasPreCompStats=C&&C.length&&M&&M.length&&E&&E.length,_=Math.min(c.minRowLength(C),c.minRowLength(M),c.minRowLength(E))}var A=v(u),h=v(b),p=A&&c.minRowLength(u),k=h&&c.minRowLength(b),w=y.calendar,R={autotypenumbers:y.autotypenumbers},O,N;if(f._hasPreCompStats)switch(String(h)+String(A)){case"00":var V=T("x0")||T("dx"),H=T("y0")||T("dy");H&&!V?O="h":O="v",N=_;break;case"10":O="v",N=Math.min(_,k);break;case"20":O="h",N=Math.min(_,b.length);break;case"01":O="h",N=Math.min(_,p);break;case"02":O="v",N=Math.min(_,u.length);break;case"12":O="v",N=Math.min(_,k,u.length);break;case"21":O="h",N=Math.min(_,b.length,p);break;case"11":N=0;break;case"22":var F=!1,U;for(U=0;U0?(O="v",h>0?N=Math.min(k,p):N=Math.min(p)):h>0?(O="h",N=Math.min(k)):N=0;if(!N){f.visible=!1;return}f._length=N;var W=x("orientation",O);f._hasPreCompStats?W==="v"&&h===0?(x("x0",0),x("dx",1)):W==="h"&&A===0&&(x("y0",0),x("dy",1)):W==="v"&&h===0?x("x0"):W==="h"&&A===0&&x("y0");var q=g.getComponentMethod("calendars","handleTraceDefaults");q(s,f,["x","y"],y)}function o(s,f,x,y){var v=y.prefix,T=c.coerce2(s,f,r,"marker.outliercolor"),u=x("marker.line.outliercolor"),b="outliers";f._hasPreCompStats?b="all":(T||u)&&(b="suspectedoutliers");var _=x(v+"points",b);_?(x("jitter",_==="all"?.3:0),x("pointpos",_==="all"?-1.5:0),x("marker.symbol"),x("marker.opacity"),x("marker.size"),x("marker.angle"),x("marker.color",f.line.color),x("marker.line.color"),x("marker.line.width"),_==="suspectedoutliers"&&(x("marker.line.outliercolor",f.marker.color),x("marker.line.outlierwidth")),x("selected.marker.color"),x("unselected.marker.color"),x("selected.marker.size"),x("unselected.marker.size"),x("text"),x("hovertext")):delete f.marker;var C=x("hoveron");(C==="all"||C.indexOf("points")!==-1)&&(x("hovertemplate"),x("hovertemplatefallback")),c.coerceSelectionMarkerOpacity(f,x)}function i(s,f){var x,y;function v(_){return c.coerce(y._input,y,r,_)}for(var T=0;T{var c=Xo(),g=bn(),P=Nw();function S(e,r,a,n,o){for(var i=o+"Layout",s=!1,f=0;f{var c=ra(),g=Es(),P=D0(),S=bn(),t=Da().BADNUM,e=S._;$.exports=function(_,C){var M=_._fullLayout,E=g.getFromId(_,C.xaxis||"x"),A=g.getFromId(_,C.yaxis||"y"),h=[],p=C.type==="violin"?"_numViolins":"_numBoxes",k,w,R,O,N,V,H;C.orientation==="h"?(R=E,O="x",N=A,V="y",H=!!C.yperiodalignment):(R=A,O="y",N=E,V="x",H=!!C.xperiodalignment);var F=r(C,V,N,M[p]),U=F[0],W=F[1],q=S.distinctVals(U,N),X=q.vals,lt=q.minDiff/2,yt,pt,st,tt,dt,rt,at=(C.boxpoints||C.points)==="all"?S.identity:function(jr){return jr.vyt.uf};if(C._hasPreCompStats){var vt=C[O],it=function(jr){return R.d2c((C[jr]||[])[k])},Y=1/0,ft=-1/0;for(k=0;k=yt.q1&&yt.q3>=yt.med){var wt=it("lowerfence");yt.lf=wt!==t&&wt<=yt.q1?wt:y(yt,st,tt);var zt=it("upperfence");yt.uf=zt!==t&&zt>=yt.q3?zt:v(yt,st,tt);var Pt=it("mean");yt.mean=Pt!==t?Pt:tt?S.mean(st,tt):(yt.q1+yt.q3)/2;var Wt=it("sd");yt.sd=Pt!==t&&Wt>=0?Wt:tt?S.stdev(st,tt,yt.mean):yt.q3-yt.q1,yt.lo=T(yt),yt.uo=u(yt);var Ht=it("notchspan");Ht=Ht!==t&&Ht>0?Ht:b(yt,tt),yt.ln=yt.med-Ht,yt.un=yt.med+Ht;var Jt=yt.lf,ge=yt.uf;C.boxpoints&&st.length&&(Jt=Math.min(Jt,st[0]),ge=Math.max(ge,st[tt-1])),C.notched&&(Jt=Math.min(Jt,yt.ln),ge=Math.max(ge,yt.un)),yt.min=Jt,yt.max=ge}else{S.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+yt.q1,"median = "+yt.med,"q3 = "+yt.q3].join(` +`));var he;yt.med!==t?he=yt.med:yt.q1!==t?yt.q3!==t?he=(yt.q1+yt.q3)/2:he=yt.q1:yt.q3!==t?he=yt.q3:he=0,yt.med=he,yt.q1=yt.q3=he,yt.lf=yt.uf=he,yt.mean=yt.sd=he,yt.ln=yt.un=he,yt.min=yt.max=he}Y=Math.min(Y,yt.min),ft=Math.max(ft,yt.max),yt.pts2=pt.filter(at),h.push(yt)}}C._extremes[R._id]=g.findExtremes(R,[Y,ft],{padded:!0})}else{var de=R.makeCalcdata(C,O),se=a(X,lt),Tt=X.length,Lt=n(Tt);for(k=0;k=0&&Mt0){if(yt={},yt.pos=yt[V]=X[k],pt=yt.pts=Lt[k].sort(f),st=yt[O]=pt.map(x),tt=st.length,yt.min=st[0],yt.max=st[tt-1],yt.mean=S.mean(st,tt),yt.sd=S.stdev(st,tt,yt.mean)*C.sdmultiple,yt.med=S.interp(st,.5),tt%2&&(Te||He)){var Ge,cr;Te?(Ge=st.slice(0,tt/2),cr=st.slice(tt/2+1)):He&&(Ge=st.slice(0,tt/2+1),cr=st.slice(tt/2)),yt.q1=S.interp(Ge,.5),yt.q3=S.interp(cr,.5)}else yt.q1=S.interp(st,.25),yt.q3=S.interp(st,.75);yt.lf=y(yt,st,tt),yt.uf=v(yt,st,tt),yt.lo=T(yt),yt.uo=u(yt);var ur=b(yt,tt);yt.ln=yt.med-ur,yt.un=yt.med+ur,te=Math.min(te,yt.ln),ve=Math.max(ve,yt.un),yt.pts2=pt.filter(at),h.push(yt)}C.notched&&S.isTypedArray(de)&&(de=Array.from(de)),C._extremes[R._id]=g.findExtremes(R,C.notched?de.concat([te,ve]):de,{padded:!0})}return s(h,C),h.length>0?(h[0].t={num:M[p],dPos:lt,posLetter:V,valLetter:O,labels:{med:e(_,"median:"),min:e(_,"min:"),q1:e(_,"q1:"),q3:e(_,"q3:"),max:e(_,"max:"),mean:C.boxmean==="sd"||C.sizemode==="sd"?e(_,"mean ± σ:").replace("σ",C.sdmultiple===1?"σ":C.sdmultiple+"σ"):e(_,"mean:"),lf:e(_,"lower fence:"),uf:e(_,"upper fence:")}},M[p]++,h):[{t:{empty:!0}}]};function r(_,C,M,E){var A=C in _,h=C+"0"in _,p="d"+C in _;if(A||h&&p){var k=M.makeCalcdata(_,C),w=P(_,M,C,k).vals;return[w,k]}var R;h?R=_[C+"0"]:"name"in _&&(M.type==="category"||c(_.name)&&["linear","log"].indexOf(M.type)!==-1||S.isDateTime(_.name)&&M.type==="date")?R=_.name:R=E;for(var O=M.type==="multicategory"?M.r2c_just_indices(R):M.d2c(R,0,_[C+"calendar"]),N=_._length,V=new Array(N),H=0;H{var c=Es(),g=bn(),P=vv().getAxisGroup,S=["v","h"];function t(r,a){for(var n=r.calcdata,o=a.xaxis,i=a.yaxis,s=0;s1,h=1-s[r+"gap"],p=1-s[r+"groupgap"];for(y=0;y0;if(O==="positive"?(pt=N*(R?1:.5),dt=tt,st=dt=H):O==="negative"?(pt=dt=H,st=N*(R?1:.5),rt=tt):(pt=st=N,dt=rt=tt),ut){var wt=k.pointpos,zt=k.jitter,Pt=k.marker.size/2,Wt=0;wt+zt>=0&&(Wt=tt*(wt+zt),Wt>pt?(ft=!0,it=Pt,at=Wt):Wt>dt&&(it=Pt,at=pt)),Wt<=pt&&(at=pt);var Ht=0;wt-zt<=0&&(Ht=-tt*(wt-zt),Ht>st?(ft=!0,Y=Pt,vt=Ht):Ht>rt&&(Y=Pt,vt=st)),Ht<=st&&(vt=st)}else at=pt,vt=st;var Jt=new Array(T.length);for(v=0;v{var c=un(),g=bn(),P=js(),S=5,t=.01;function e(o,i,s,f){var x=o._context.staticPlot,y=i.xaxis,v=i.yaxis;g.makeTraceGroups(f,s,"trace boxes").each(function(T){var u=c.select(this),b=T[0],_=b.t,C=b.trace;if(_.wdPos=_.bdPos*C.whiskerwidth,C.visible!==!0||_.empty){u.remove();return}var M,E;C.orientation==="h"?(M=v,E=y):(M=y,E=v),r(u,{pos:M,val:E},C,_,x),a(u,{x:y,y:v},C,_),n(u,{pos:M,val:E},C,_)})}function r(o,i,s,f,x){var y=s.orientation==="h",v=i.val,T=i.pos,u=!!T.rangebreaks,b=f.bPos,_=f.wdPos||0,C=f.bPosPxOffset||0,M=s.whiskerwidth||0,E=s.showwhiskers!==!1,A=s.notched||!1,h=A?1-2*s.notchwidth:1,p,k;Array.isArray(f.bdPos)?(p=f.bdPos[0],k=f.bdPos[1]):(p=f.bdPos,k=f.bdPos);var w=o.selectAll("path.box").data(s.type!=="violin"||s.box.visible?g.identity:[]);w.enter().append("path").style("vector-effect",x?"none":"non-scaling-stroke").attr("class","box"),w.exit().remove(),w.each(function(R){if(R.empty)return c.select(this).attr("d","M0,0Z");var O=T.c2l(R.pos+b,!0),N=T.l2p(O-p)+C,V=T.l2p(O+k)+C,H=u?(N+V)/2:T.l2p(O)+C,F=s.whiskerwidth,U=u?N*F+(1-F)*H:T.l2p(O-_)+C,W=u?V*F+(1-F)*H:T.l2p(O+_)+C,q=T.l2p(O-p*h)+C,X=T.l2p(O+k*h)+C,lt=s.sizemode==="sd",yt=v.c2p(lt?R.mean-R.sd:R.q1,!0),pt=lt?v.c2p(R.mean+R.sd,!0):v.c2p(R.q3,!0),st=g.constrain(lt?v.c2p(R.mean,!0):v.c2p(R.med,!0),Math.min(yt,pt)+1,Math.max(yt,pt)-1),tt=R.lf===void 0||s.boxpoints===!1||lt,dt=v.c2p(tt?R.min:R.lf,!0),rt=v.c2p(tt?R.max:R.uf,!0),at=v.c2p(R.ln,!0),vt=v.c2p(R.un,!0);y?c.select(this).attr("d","M"+st+","+q+"V"+X+"M"+yt+","+N+"V"+V+(A?"H"+at+"L"+st+","+X+"L"+vt+","+V:"")+"H"+pt+"V"+N+(A?"H"+vt+"L"+st+","+q+"L"+at+","+N:"")+"Z"+(E?"M"+yt+","+H+"H"+dt+"M"+pt+","+H+"H"+rt+(M===0?"":"M"+dt+","+U+"V"+W+"M"+rt+","+U+"V"+W):"")):c.select(this).attr("d","M"+q+","+st+"H"+X+"M"+N+","+yt+"H"+V+(A?"V"+at+"L"+X+","+st+"L"+V+","+vt:"")+"V"+pt+"H"+N+(A?"V"+vt+"L"+q+","+st+"L"+N+","+at:"")+"Z"+(E?"M"+H+","+yt+"V"+dt+"M"+H+","+pt+"V"+rt+(M===0?"":"M"+U+","+dt+"H"+W+"M"+U+","+rt+"H"+W):""))})}function a(o,i,s,f){var x=i.x,y=i.y,v=f.bdPos,T=f.bPos,u=s.boxpoints||s.points;g.seedPseudoRandom();var b=function(M){return M.forEach(function(E){E.t=f,E.trace=s}),M},_=o.selectAll("g.points").data(u?b:[]);_.enter().append("g").attr("class","points"),_.exit().remove();var C=_.selectAll("path").data(function(M){var E,A=M.pts2,h=Math.max((M.max-M.min)/10,M.q3-M.q1),p=h*1e-9,k=h*t,w=[],R=0,O;if(s.jitter){if(h===0)for(R=1,w=new Array(A.length),E=0;EM.lo&&(W.so=!0)}return A});C.enter().append("path").classed("point",!0),C.exit().remove(),C.call(P.translatePoints,x,y)}function n(o,i,s,f){var x=i.val,y=i.pos,v=!!y.rangebreaks,T=f.bPos,u=f.bPosPxOffset||0,b=s.boxmean||(s.meanline||{}).visible,_,C;Array.isArray(f.bdPos)?(_=f.bdPos[0],C=f.bdPos[1]):(_=f.bdPos,C=f.bdPos);var M=o.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?g.identity:[]);M.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),M.exit().remove(),M.each(function(E){var A=y.c2l(E.pos+T,!0),h=y.l2p(A-_)+u,p=y.l2p(A+C)+u,k=v?(h+p)/2:y.l2p(A)+u,w=x.c2p(E.mean,!0),R=x.c2p(E.mean-E.sd,!0),O=x.c2p(E.mean+E.sd,!0);s.orientation==="h"?c.select(this).attr("d","M"+w+","+h+"V"+p+(b==="sd"?"m0,0L"+R+","+k+"L"+w+","+h+"L"+O+","+k+"Z":"")):c.select(this).attr("d","M"+h+","+w+"H"+p+(b==="sd"?"m0,0L"+k+","+R+"L"+h+","+w+"L"+k+","+O+"Z":""))})}$.exports={plot:e,plotBoxAndWhiskers:r,plotPoints:a,plotBoxMean:n}}),D6=Ft((Q,$)=>{var c=un(),g=li(),P=js();function S(e,r,a){var n=a||c.select(e).selectAll("g.trace.boxes");n.style("opacity",function(o){return o[0].trace.opacity}),n.each(function(o){var i=c.select(this),s=o[0].trace,f=s.line.width;function x(T,u,b,_){T.style("stroke-width",u+"px").call(g.stroke,b).call(g.fill,_)}var y=i.selectAll("path.box");if(s.type==="candlestick")y.each(function(T){if(!T.empty){var u=c.select(this),b=s[T.dir];x(u,b.line.width,b.line.color,b.fillcolor),u.style("opacity",s.selectedpoints&&!T.selected?.3:1)}});else{x(y,f,s.line.color,s.fillcolor),i.selectAll("path.mean").style({"stroke-width":f,"stroke-dasharray":2*f+"px,"+f+"px"}).call(g.stroke,s.line.color);var v=i.selectAll("path.point");P.pointStyle(v,s,e)}})}function t(e,r,a){var n=r[0].trace,o=a.selectAll("path.point");n.selectedpoints?P.selectedPointStyle(o,n):P.pointStyle(o,n,e)}$.exports={style:S,styleOnSelect:t}}),FM=Ft((Q,$)=>{var c=Es(),g=bn(),P=Qh(),S=li(),t=g.fillText;function e(n,o,i,s){var f=n.cd,x=f[0].trace,y=x.hoveron,v=[],T;return y.indexOf("boxes")!==-1&&(v=v.concat(r(n,o,i,s))),y.indexOf("points")!==-1&&(T=a(n,o,i)),s==="closest"?T?[T]:v:(T&&v.push(T),v)}function r(n,o,i,s){var f=n.cd,x=n.xa,y=n.ya,v=f[0].trace,T=f[0].t,u=v.type==="violin",b,_,C,M,E,A,h,p,k,w,R,O=T.bdPos,N,V,H=T.wHover,F=function(Ht){return C.c2l(Ht.pos)+T.bPos-C.c2l(A)};u&&v.side!=="both"?(v.side==="positive"&&(k=function(Ht){var Jt=F(Ht);return P.inbox(Jt,Jt+H,w)},N=O,V=0),v.side==="negative"&&(k=function(Ht){var Jt=F(Ht);return P.inbox(Jt-H,Jt,w)},N=0,V=O)):(k=function(Ht){var Jt=F(Ht);return P.inbox(Jt-H,Jt+H,w)},N=V=O);var U;u?U=function(Ht){return P.inbox(Ht.span[0]-E,Ht.span[1]-E,w)}:U=function(Ht){return P.inbox(Ht.min-E,Ht.max-E,w)},v.orientation==="h"?(E=o,A=i,h=U,p=k,b="y",C=y,_="x",M=x):(E=i,A=o,h=k,p=U,b="x",C=x,_="y",M=y);var W=Math.min(1,O/Math.abs(C.r2c(C.range[1])-C.r2c(C.range[0])));w=n.maxHoverDistance-W,R=n.maxSpikeDistance-W;function q(Ht){return(h(Ht)+p(Ht))/2}var X=P.getDistanceFunction(s,h,p,q);if(P.getClosest(f,X,n),n.index===!1)return[];var lt=f[n.index],yt=v.line.color,pt=(v.marker||{}).color;S.opacity(yt)&&v.line.width?n.color=yt:S.opacity(pt)&&v.boxpoints?n.color=pt:n.color=v.fillcolor,n[b+"0"]=C.c2p(lt.pos+T.bPos-V,!0),n[b+"1"]=C.c2p(lt.pos+T.bPos+N,!0),n[b+"LabelVal"]=lt.orig_p!==void 0?lt.orig_p:lt.pos;var st=b+"Spike";n.spikeDistance=q(lt)*R/w,n[st]=C.c2p(lt.pos,!0);var tt=v.boxmean||v.sizemode==="sd"||(v.meanline||{}).visible,dt=v.boxpoints||v.points,rt=dt&&tt?["max","uf","q3","med","mean","q1","lf","min"]:dt&&!tt?["max","uf","q3","med","q1","lf","min"]:!dt&&tt?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],at=M.range[1]{$.exports=function(c,g){return g.hoverOnBox&&(c.hoverOnBox=g.hoverOnBox),"xVal"in g&&(c.x=g.xVal),"yVal"in g&&(c.y=g.yVal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c}}),RM=Ft((Q,$)=>{$.exports=function(c,g){var P=c.cd,S=c.xaxis,t=c.yaxis,e=[],r,a;if(g===!1)for(r=0;r{$.exports={attributes:Bw(),layoutAttributes:Nw(),supplyDefaults:jw().supplyDefaults,crossTraceDefaults:jw().crossTraceDefaults,supplyLayoutDefaults:z6().supplyLayoutDefaults,calc:DM(),crossTraceCalc:I6().crossTraceCalc,plot:O6().plot,style:D6().style,styleOnSelect:D6().styleOnSelect,hoverPoints:FM().hoverPoints,eventData:NF(),selectPoints:RM(),moduleType:"trace",name:"box",basePlotModule:Mf(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}}),UF=Ft((Q,$)=>{$.exports=jF()}),X_=Ft((Q,$)=>{var c=Tc(),{extendFlat:g}=Ta(),P=$o(),{axisHoverFormat:S}=fh(),t=Ea(),{hovertemplateAttrs:e,templatefallbackAttrs:r,texttemplateAttrs:a}=$u(),n=tf();$.exports=g({z:{valType:"data_array",editType:"calc"},x:g({},n.x,{impliedEdits:{xtype:"array"}}),x0:g({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:g({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:g({},n.y,{impliedEdits:{ytype:"array"}}),y0:g({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:g({},n.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:g({},n.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:g({},n.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:g({},n.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:g({},n.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:g({},n.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:g({},n.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:e(),hovertemplatefallback:r(),texttemplate:a({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:r({editType:"plot"}),textfont:t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:g({},P.showlegend,{dflt:!1}),zorder:n.zorder},c("",{cLetter:"z",autoColorDflt:!1}))}),F6=Ft((Q,$)=>{var c=ra(),g=bn(),P=Xo();$.exports=function(e,r,a,n,o,i){var s=a("z");o=o||"x",i=i||"y";var f,x;if(s===void 0||!s.length)return 0;if(g.isArray1D(s)){f=a(o),x=a(i);var y=g.minRowLength(f),v=g.minRowLength(x);if(y===0||v===0)return 0;r._length=Math.min(y,v,s.length)}else{if(f=S(o,a),x=S(i,a),!t(s))return 0;a("transpose"),r._length=null}var T=P.getComponentMethod("calendars","handleTraceDefaults");return T(e,r,[o,i],n),!0};function S(e,r){var a=r(e),n=a?r(e+"type","array"):"scaled";return n==="scaled"&&(r(e+"0"),r("d"+e)),a}function t(e){for(var r=!0,a=!1,n=!1,o,i=0;i0&&(a=!0);for(var s=0;s{var c=bn();$.exports=function(g,P){g("texttemplate"),g("texttemplatefallback");var S=c.extendFlat({},P.font,{color:"auto",size:"auto"});c.coerceFont(g,"textfont",S)}}),BM=Ft((Q,$)=>{$.exports=function(c,g,P){var S=P("zsmooth");S===!1&&(P("xgap"),P("ygap")),P("zhoverformat")}}),VF=Ft((Q,$)=>{var c=bn(),g=F6(),P=Uw(),S=Fp(),t=BM(),e=mc(),r=X_();$.exports=function(a,n,o,i){function s(x,y){return c.coerce(a,n,r,x,y)}var f=g(a,n,s,i);if(!f){n.visible=!1;return}S(a,n,i,s),s("xhoverformat"),s("yhoverformat"),s("text"),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),P(s,i),t(a,n,s,i),s("hoverongaps"),s("connectgaps",c.isArray1D(n.z)&&n.zsmooth!==!1),e(a,n,i,s,{prefix:"",cLetter:"z"}),s("zorder")}}),NM=Ft((Q,$)=>{var c=ra();$.exports={count:function(g,P,S){return S[g]++,1},sum:function(g,P,S,t){var e=t[P];return c(e)?(e=Number(e),S[g]+=e,e):0},avg:function(g,P,S,t,e){var r=t[P];return c(r)&&(r=Number(r),S[g]+=r,e[g]++),0},min:function(g,P,S,t){var e=t[P];if(c(e))if(e=Number(e),c(S[g])){if(S[g]>e){var r=e-S[g];return S[g]=e,r}}else return S[g]=e,e;return 0},max:function(g,P,S,t){var e=t[P];if(c(e))if(e=Number(e),c(S[g])){if(S[g]{$.exports={percent:function(c,g){for(var P=c.length,S=100/g,t=0;t{$.exports=function(c,g){for(var P=c.length,S=0,t=0;t{var c=Da(),g=c.ONEAVGYEAR,P=c.ONEAVGMONTH,S=c.ONEDAY,t=c.ONEHOUR,e=c.ONEMIN,r=c.ONESEC,a=Es().tickIncrement;$.exports=function(f,x,y,v,T){var u=-1.1*x,b=-.1*x,_=f-b,C=y[0],M=y[1],E=Math.min(n(C+b,C+_,v,T),n(M+b,M+_,v,T)),A=Math.min(n(C+u,C+b,v,T),n(M+u,M+b,v,T)),h,p;if(E>A&&AS){var k=h===g?1:6,w=h===g?"M12":"M1";return function(R,O){var N=v.c2d(R,g,T),V=N.indexOf("-",k);V>0&&(N=N.substr(0,V));var H=v.d2c(N,0,T);if(Hr?f>S?f>g*1.1?g:f>P*1.1?P:S:f>t?t:f>e?e:r:Math.pow(10,Math.floor(Math.log(f)/Math.LN10))}function i(f,x,y,v,T,u){if(v&&f>S){var b=s(x,T,u),_=s(y,T,u),C=f===g?0:1;return b[C]!==_[C]}return Math.floor(y/f)-Math.floor(x/f)>.1}function s(f,x,y){var v=x.c2d(f,g,y).split("-");return v[0]===""&&(v.unshift(),v[0]="-"+v[0]),v}}),HM=Ft((Q,$)=>{var c=ra(),g=bn(),P=Xo(),S=Es(),{hasColorscale:t}=Hd(),e=Jd(),r=Rw(),a=NM(),n=jM(),o=UM(),i=VM();function s(T,u){var b=[],_=[],C=u.orientation==="h",M=S.getFromId(T,C?u.yaxis:u.xaxis),E=C?"y":"x",A={x:"y",y:"x"}[E],h=u[E+"calendar"],p=u.cumulative,k,w=f(T,u,M,E),R=w[0],O=w[1],N=typeof R.size=="string",V=[],H=N?V:R,F=[],U=[],W=[],q=0,X=u.histnorm,lt=u.histfunc,yt=X.indexOf("density")!==-1,pt,st,tt;p.enabled&&yt&&(X=X.replace(/ ?density$/,""),yt=!1);var dt=lt==="max"||lt==="min",rt=dt?null:0,at=a.count,vt=n[X],it=!1,Y=function(te){return M.r2c(te,0,h)},ft;for(g.isArrayOrTypedArray(u[A])&<!=="count"&&(ft=u[A],it=lt==="avg",at=a[lt]),k=Y(R.start),st=Y(R.end)+(k-S.tickIncrement(k,R.size,!1,h))/1e6;k=0&&tt=Tt;k--)if(_[k]){Lt=k;break}for(k=Tt;k<=Lt;k++)if(c(b[k])&&c(_[k])){var Mt={p:b[k],s:_[k],b:0};p.enabled||(Mt.pts=W[k],Pt?Mt.ph0=Mt.ph1=W[k].length?O[W[k][0]]:b[k]:(u._computePh=!0,Mt.ph0=he(V[k]),Mt.ph1=he(V[k+1],!0))),se.push(Mt)}return se.length===1&&(se[0].width1=S.tickIncrement(se[0].p,R.size,!1,h)-se[0].p),t(u,"marker")&&e(T,u,{vals:u.marker.color,containerStr:"marker",cLetter:"c"}),t(u,"marker.line")&&e(T,u,{vals:u.marker.line.color,containerStr:"marker.line",cLetter:"c"}),r(se,u),g.isArrayOrTypedArray(u.selectedpoints)&&g.tagSelected(se,u,Jt),se}function f(T,u,b,_,C){var M=_+"bins",E=T._fullLayout,A=u["_"+_+"bingroup"],h=E._histogramBinOpts[A],p=E.barmode==="overlay",k,w,R,O,N,V,H,F=function(ge){return b.r2c(ge,0,O)},U=function(ge){return b.c2r(ge,0,O)},W=b.type==="date"?function(ge){return ge||ge===0?g.cleanDate(ge,null,O):null}:function(ge){return c(ge)?Number(ge):null};function q(ge,he,de){he[ge+"Found"]?(he[ge]=W(he[ge]),he[ge]===null&&(he[ge]=de[ge])):(V[ge]=he[ge]=de[ge],g.nestedProperty(w[0],M+"."+ge).set(de[ge]))}if(u["_"+_+"autoBinFinished"])delete u["_"+_+"autoBinFinished"];else{w=h.traces;var X=[],lt=!0,yt=!1,pt=!1;for(k=0;k"u"){if(C)return[tt,N,!0];tt=x(T,u,b,_,M)}H=R.cumulative||{},H.enabled&&H.currentbin!=="include"&&(H.direction==="decreasing"?tt.start=U(S.tickIncrement(F(tt.start),tt.size,!0,O)):tt.end=U(S.tickIncrement(F(tt.end),tt.size,!1,O))),h.size=tt.size,h.sizeFound||(V.size=tt.size,g.nestedProperty(w[0],M+".size").set(tt.size)),q("start",h,tt),q("end",h,tt)}N=u["_"+_+"pos0"],delete u["_"+_+"pos0"];var rt=u._input[M]||{},at=g.extendFlat({},h),vt=h.start,it=b.r2l(rt.start),Y=it!==void 0;if((h.startFound||Y)&&it!==b.r2l(vt)){var ft=Y?it:g.aggNums(Math.min,null,N),ut={type:b.type==="category"||b.type==="multicategory"?"linear":b.type,r2l:b.r2l,dtick:h.size,tick0:vt,calendar:O,range:[ft,S.tickIncrement(ft,h.size,!1,O)].map(b.l2r)},wt=S.tickFirst(ut);wt>b.r2l(ft)&&(wt=S.tickIncrement(wt,h.size,!0,O)),at.start=b.l2r(wt),Y||g.nestedProperty(u,M+".start").set(at.start)}var zt=h.end,Pt=b.r2l(rt.end),Wt=Pt!==void 0;if((h.endFound||Wt)&&Pt!==b.r2l(zt)){var Ht=Wt?Pt:g.aggNums(Math.max,null,N);at.end=b.l2r(Ht),Wt||g.nestedProperty(u,M+".start").set(at.end)}var Jt="autobin"+_;return u._input[Jt]===!1&&(u._input[M]=g.extendFlat({},u[M]||{}),delete u._input[Jt],delete u[Jt]),[at,N]}function x(T,u,b,_,C){var M=T._fullLayout,E=y(T,u),A=!1,h=1/0,p=[u],k,w,R;for(k=0;k=0;_--)A(_);else if(u==="increasing"){for(_=1;_=0;_--)T[_]+=T[_+1];b==="exclude"&&(T.push(0),T.shift())}}$.exports={calc:s,calcAllAutoBins:f}}),HF=Ft((Q,$)=>{var c=bn(),g=Es(),P=NM(),S=jM(),t=UM(),e=VM(),r=HM().calcAllAutoBins;$.exports=function(i,s){var f=g.getFromId(i,s.xaxis),x=g.getFromId(i,s.yaxis),y=s.xcalendar,v=s.ycalendar,T=function(Ce){return f.r2c(Ce,0,y)},u=function(Ce){return x.r2c(Ce,0,v)},b=function(Ce){return f.c2r(Ce,0,y)},_=function(Ce){return x.c2r(Ce,0,v)},C,M,E,A,h=r(i,s,f,"x"),p=h[0],k=h[1],w=r(i,s,x,"y"),R=w[0],O=w[1],N=s._length;k.length>N&&k.splice(N,k.length-N),O.length>N&&O.splice(N,O.length-N);var V=[],H=[],F=[],U=typeof p.size=="string",W=typeof R.size=="string",q=[],X=[],lt=U?q:p,yt=W?X:R,pt=0,st=[],tt=[],dt=s.histnorm,rt=s.histfunc,at=dt.indexOf("density")!==-1,vt=rt==="max"||rt==="min",it=vt?null:0,Y=P.count,ft=S[dt],ut=!1,wt=[],zt=[],Pt="z"in s?s.z:"marker"in s&&Array.isArray(s.marker.color)?s.marker.color:"";Pt&&rt!=="count"&&(ut=rt==="avg",Y=P[rt]);var Wt=p.size,Ht=T(p.start),Jt=T(p.end)+(Ht-g.tickIncrement(Ht,Wt,!1,y))/1e6;for(C=Ht;C=0&&E=0&&A{var c=bn(),g=Da().BADNUM,P=D0();$.exports=function(S,t,e,r,a,n){var o=S._length,i=t.makeCalcdata(S,r),s=e.makeCalcdata(S,a);i=P(S,t,r,i).vals,s=P(S,e,a,s).vals;var f=S.text,x=f!==void 0&&c.isArray1D(f),y=S.hovertext,v=y!==void 0&&c.isArray1D(y),T,u,b=c.distinctVals(i),_=b.vals,C=c.distinctVals(s),M=C.vals,E=[],A,h,p=M.length,k=_.length;for(T=0;T{var c=ra(),g=bn(),P=Da().BADNUM;$.exports=function(S,t,e,r){var a,n,o,i,s,f;function x(_){if(c(_))return+_}if(t&&t.transpose){for(a=0,s=0;s{var c=bn(),g=.01,P=[[-1,0],[1,0],[0,-1],[0,1]];function S(e){return .5-.25*Math.min(1,e*.5)}$.exports=function(e,r){var a=1,n;for(t(e,r),n=0;ng;n++)a=t(e,r,S(a));return a>g&&c.log("interp2d didn't converge quickly",a),e};function t(e,r,a){var n=0,o,i,s,f,x,y,v,T,u,b,_,C,M;for(f=0;fC&&(n=Math.max(n,Math.abs(e[i][s]-_)/(M-C))))}return n}}),j6=Ft((Q,$)=>{var c=bn().maxRowLength;$.exports=function(g){var P=[],S={},t=[],e=g[0],r=[],a=[0,0,0],n=c(g),o,i,s,f,x,y,v,T;for(i=0;i=0;x--)f=t[x],i=f[0],s=f[1],y=((S[[i-1,s]]||a)[2]+(S[[i+1,s]]||a)[2]+(S[[i,s-1]]||a)[2]+(S[[i,s+1]]||a)[2])/20,y&&(v[f]=[i,s,y],t.splice(x,1),T=!0);if(!T)throw"findEmpties iterated with no new neighbors";for(f in v)S[f]=v[f],P.push(v[f])}return P.sort(function(u,b){return b[2]-u[2]})}}),WM=Ft((Q,$)=>{var c=Xo(),g=bn().isArrayOrTypedArray;$.exports=function(P,S,t,e,r,a){var n=[],o=c.traceIs(P,"contour"),i=c.traceIs(P,"histogram"),s,f,x,y=g(S)&&S.length>1;if(y&&!i&&a.type!=="category"){var v=S.length;if(v<=r){if(o)n=Array.from(S).slice(0,r);else if(r===1)a.type==="log"?n=[.5*S[0],2*S[0]]:n=[S[0]-.5,S[0]+.5];else if(a.type==="log"){for(n=[Math.pow(S[0],1.5)/Math.pow(S[1],.5)],x=1;x{var c=Xo(),g=bn(),P=Es(),S=D0(),t=HF(),e=Jd(),r=R6(),a=B6(),n=N6(),o=j6(),i=WM(),s=Da().BADNUM;$.exports=function(y,v){var T=P.getFromId(y,v.xaxis||"x"),u=P.getFromId(y,v.yaxis||"y"),b=c.traceIs(v,"contour"),_=c.traceIs(v,"histogram"),C=b?"best":v.zsmooth,M,E,A,h,p,k,w,R,O,N,V;if(T._minDtick=0,u._minDtick=0,_)V=t(y,v),h=V.orig_x,M=V.x,E=V.x0,A=V.dx,R=V.orig_y,p=V.y,k=V.y0,w=V.dy,O=V.z;else{var H=v.z;g.isArray1D(H)?(r(v,T,u,"x","y",["z"]),M=v._x,p=v._y,H=v._z):(h=v.x?T.makeCalcdata(v,"x"):[],R=v.y?u.makeCalcdata(v,"y"):[],M=S(v,T,"x",h).vals,p=S(v,u,"y",R).vals,v._x=M,v._y=p),E=v.x0,A=v.dx,k=v.y0,w=v.dy,O=a(H,v,T,u)}(T.rangebreaks||u.rangebreaks)&&(O=x(M,p,O),_||(M=f(M),p=f(p),v._x=M,v._y=p)),!_&&(b||v.connectgaps)&&(v._emptypoints=o(O),n(O,v._emptypoints));function F(tt){C=v._input.zsmooth=v.zsmooth=!1,g.warn('cannot use zsmooth: "fast": '+tt)}function U(tt){if(tt.length>1){var dt=(tt[tt.length-1]-tt[0])/(tt.length-1),rt=Math.abs(dt/100);for(N=0;Nrt)return!1}return!0}v._islinear=!1,T.type==="log"||u.type==="log"?C==="fast"&&F("log axis found"):U(M)?U(p)?v._islinear=!0:C==="fast"&&F("y scale is not linear"):C==="fast"&&F("x scale is not linear");var W=g.maxRowLength(O),q=v.xtype==="scaled"?"":M,X=i(v,q,E,A,W,T),lt=v.ytype==="scaled"?"":p,yt=i(v,lt,k,w,O.length,u);v._extremes[T._id]=P.findExtremes(T,X),v._extremes[u._id]=P.findExtremes(u,yt);var pt={x:X,y:yt,z:O,text:v._text||v.text,hovertext:v._hovertext||v.hovertext};if(v.xperiodalignment&&h&&(pt.orig_x=h),v.yperiodalignment&&R&&(pt.orig_y=R),q&&q.length===X.length-1&&(pt.xCenter=q),lt&<.length===yt.length-1&&(pt.yCenter=lt),_&&(pt.xRanges=V.xRanges,pt.yRanges=V.yRanges,pt.pts=V.pts),b||e(y,v,{vals:O,cLetter:"z"}),b&&v.contours&&v.contours.coloring==="heatmap"){var st={type:v.type==="contour"?"heatmap":"histogram2d",xcalendar:v.xcalendar,ycalendar:v.ycalendar};pt.xfill=i(st,q,E,A,W,T),pt.yfill=i(st,lt,k,w,O.length,u)}return[pt]};function f(y){for(var v=[],T=y.length,u=0;u{Q.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],Q.STYLE=Q.CSS_DECLARATIONS.map(function($){return $.join(": ")+"; "}).join("")}),qM=Ft((Q,$)=>{var c=V6(),g=js(),P=bn(),S=null;function t(){if(S!==null)return S;S=!1;var e=P.isSafari()||P.isMacWKWebView()||P.isIOS();if(window.navigator.userAgent&&!e){var r=Array.from(c.CSS_DECLARATIONS).reverse(),a=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof a=="function")S=r.some(function(s){return a.apply(null,s)});else{var n=g.tester.append("image").attr("style",c.STYLE),o=window.getComputedStyle(n.node()),i=o.imageRendering;S=r.some(function(s){var f=s[1];return i===f||i===f.toLowerCase()}),n.remove()}}return S}$.exports=t}),H6=Ft((Q,$)=>{var c=un(),g=fo(),P=Xo(),S=js(),t=Es(),e=bn(),r=tc(),a=Vs(),n=li(),o=Xc().extractOpts,i=Xc().makeColorScaleFuncFromTrace,s=Op(),f=Af(),x=f.LINE_SPACING,y=qM(),v=V6().STYLE,T="heatmap-label";function u(E){return E.selectAll("g."+T)}function b(E){u(E).remove()}$.exports=function(E,A,h,p){var k=A.xaxis,w=A.yaxis;e.makeTraceGroups(p,h,"hm").each(function(R){var O=c.select(this),N=R[0],V=N.trace,H=V.xgap||0,F=V.ygap||0,U=N.z,W=N.x,q=N.y,X=N.xCenter,lt=N.yCenter,yt=P.traceIs(V,"contour"),pt=yt?"best":V.zsmooth,st=U.length,tt=e.maxRowLength(U),dt=!1,rt=!1,at,vt,it,Y,ft,ut,wt,zt;for(ut=0;at===void 0&&ut0;)vt=k.c2p(W[ut]),ut--;for(vt0;)ft=w.c2p(q[ut]),ut--;ft=k._length||vt<=0||Y>=w._length||ft<=0;if(ge){var he=O.selectAll("image").data([]);he.exit().remove(),b(O);return}var de,se;Pt==="fast"?(de=tt,se=st):(de=Ht,se=Jt);var Tt=document.createElement("canvas");Tt.width=de,Tt.height=se;var Lt=Tt.getContext("2d",{willReadFrequently:!0}),Mt=i(V,{noNumericCheck:!0,returnArray:!0}),te,ve;Pt==="fast"?(te=dt?function(Zn){return tt-1-Zn}:e.identity,ve=rt?function(Zn){return st-1-Zn}:e.identity):(te=function(Zn){return e.constrain(Math.round(k.c2p(W[Zn])-at),0,Ht)},ve=function(Zn){return e.constrain(Math.round(w.c2p(q[Zn])-Y),0,Jt)});var oe=ve(0),Te=[oe,oe],He=dt?0:1,Ge=rt?0:1,cr=0,ur=0,jr=0,Hr=0,br,Kr,rn,Ce,$t;function ne(Zn,Ca){if(Zn!==void 0){var Ri=Mt(Zn);return Ri[0]=Math.round(Ri[0]),Ri[1]=Math.round(Ri[1]),Ri[2]=Math.round(Ri[2]),cr+=Ca,ur+=Ri[0]*Ca,jr+=Ri[1]*Ca,Hr+=Ri[2]*Ca,Ri}return[0,0,0,0]}function Ct(Zn,Ca,Ri,Ja){var Xa=Zn[Ri.bin0];if(Xa===void 0)return ne(void 0,1);var Io=Zn[Ri.bin1],po=Ca[Ri.bin0],Do=Ca[Ri.bin1],Ia=Io-Xa||0,gs=po-Xa||0,is;return Io===void 0?Do===void 0?is=0:po===void 0?is=2*(Do-Xa):is=(2*Do-po-Xa)*2/3:Do===void 0?po===void 0?is=0:is=(2*Xa-Io-po)*2/3:po===void 0?is=(2*Do-Io-Xa)*2/3:is=Do+Xa-Io-po,ne(Xa+Ri.frac*Ia+Ja.frac*(gs+Ri.frac*is))}if(Pt!=="default"){var gt=0,St;try{St=new Uint8Array(de*se*4)}catch{St=new Array(de*se*4)}if(Pt==="smooth"){var Nt=X||W,ee=lt||q,le=new Array(Nt.length),we=new Array(ee.length),Ue=new Array(Ht),qe=X?C:_,ar=lt?C:_,Ar,Tr,pr;for(ut=0;utxi||xi>w._length))for(wt=Cn;wtDi||Di>k._length)){var Zi=a({x:Pi,y:ci},V,E._fullLayout);Zi.x=Pi,Zi.y=ci;var ui=N.z[ut][wt];ui===void 0?(Zi.z="",Zi.zLabel=""):(Zi.z=ui,Zi.zLabel=t.tickText(We,ui,"hover").text);var Pa=N.text&&N.text[ut]&&N.text[ut][wt];(Pa===void 0||Pa===!1)&&(Pa=""),Zi.text=Pa;var Wa=e.texttemplateString({data:[Zi,V._meta],fallback:V.texttemplatefallback,labels:Zi,locale:E._fullLayout._d3locale,template:oa});if(Wa){var ze=Wa.split("
"),Pe=ze.length,Rr=0;for(zt=0;zt{$.exports={min:"zmin",max:"zmax"}}),W6=Ft((Q,$)=>{var c=un();$.exports=function(g){c.select(g).selectAll(".hm image").style("opacity",function(P){return P.trace.opacity})}}),q6=Ft((Q,$)=>{var c=Qh(),g=bn(),P=g.isArrayOrTypedArray,S=Es(),t=Xc().extractOpts;$.exports=function(e,r,a,n,o){o||(o={});var i=o.isContour,s=e.cd[0],f=s.trace,x=e.xa,y=e.ya,v=s.x,T=s.y,u=s.z,b=s.xCenter,_=s.yCenter,C=s.zmask,M=f.zhoverformat,E=v,A=T,h,p,k,w;if(e.index!==!1){try{k=Math.round(e.index[1]),w=Math.round(e.index[0])}catch{g.error("Error hovering on heatmap, pointNumber must be [row,col], found:",e.index);return}if(k<0||k>=u[0].length||w<0||w>u.length)return}else{if(c.inbox(r-v[0],r-v[v.length-1],0)>0||c.inbox(a-T[0],a-T[T.length-1],0)>0)return;if(i){var R;for(E=[2*v[0]-v[1]],R=1;R{$.exports={attributes:X_(),supplyDefaults:VF(),calc:U6(),plot:H6(),colorbar:L1(),style:W6(),hoverPoints:q6(),moduleType:"trace",name:"heatmap",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}}),qF=Ft((Q,$)=>{$.exports=WF()}),ZM=Ft((Q,$)=>{$.exports=function(c,g){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}}),ZF=Ft((Q,$)=>{$.exports={eventDataKeys:["binNumber"]}}),Z6=Ft((Q,$)=>{var c=Sg(),g=fh().axisHoverFormat,{hovertemplateAttrs:P,texttemplateAttrs:S,templatefallbackAttrs:t}=$u(),e=Ea(),r=ZM(),a=ZF(),n=Ta().extendFlat;$.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:g("x"),yhoverformat:g("y"),text:n({},c.text,{}),hovertext:n({},c.hovertext,{}),orientation:c.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:r("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:r("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:P({},{keys:a.eventDataKeys}),hovertemplatefallback:t(),texttemplate:S({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:t({editType:"plot"}),textposition:n({},c.textposition,{arrayOk:!1}),textfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:c.insidetextanchor,textangle:c.textangle,cliponaxis:c.cliponaxis,constraintext:c.constraintext,marker:c.marker,offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,selected:c.selected,unselected:c.unselected,zorder:c.zorder}}),$F=Ft((Q,$)=>{var c=Xo(),g=bn(),P=li(),S=J0().handleText,t=L6(),e=Z6();$.exports=function(r,a,n,o){function i(A,h){return g.coerce(r,a,e,A,h)}var s=i("x"),f=i("y"),x=i("cumulative.enabled");x&&(i("cumulative.direction"),i("cumulative.currentbin")),i("text");var y=i("textposition");S(r,a,o,i,y,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat");var v=i("orientation",f&&!s?"h":"v"),T=v==="v"?"x":"y",u=v==="v"?"y":"x",b=s&&f?Math.min(g.minRowLength(s)&&g.minRowLength(f)):g.minRowLength(a[T]||[]);if(!b){a.visible=!1;return}a._length=b;var _=c.getComponentMethod("calendars","handleTraceDefaults");_(r,a,["x","y"],o);var C=a[u];C&&i("histfunc"),i("histnorm"),i("autobin"+T),t(r,a,i,n,o),g.coerceSelectionMarkerOpacity(a,i);var M=(a.marker.line||{}).color,E=c.getComponentMethod("errorbars","supplyDefaults");E(r,a,M||P.defaultLine,{axis:"y"}),E(r,a,M||P.defaultLine,{axis:"x",inherit:"y"}),i("zorder")}}),$6=Ft((Q,$)=>{var c=bn(),g=Rc(),P=Xo().traceIs,S=Mg(),t=J0().validateCornerradius,e=c.nestedProperty,r=vv().getAxisGroup,a=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],n=["x","y"];$.exports=function(o,i){var s=i._histogramBinOpts={},f=[],x={},y=[],v,T,u,b,_,C,M;function E(yt,pt){return c.coerce(v._input,v,v._module.attributes,yt,pt)}function A(yt){return yt.orientation==="v"?"x":"y"}function h(yt,pt){var st=g.getFromTrace({_fullLayout:i},yt,pt);return st.type}function p(yt,pt,st){var tt=yt.uid+"__"+st;pt||(pt=tt);var dt=h(yt,st),rt=yt[st+"calendar"]||"",at=s[pt],vt=!0;at&&(dt===at.axType&&rt===at.calendar?(vt=!1,at.traces.push(yt),at.dirs.push(st)):(pt=tt,dt!==at.axType&&c.warn(["Attempted to group the bins of trace",yt.index,"set on a","type:"+dt,"axis","with bins on","type:"+at.axType,"axis."].join(" ")),rt!==at.calendar&&c.warn(["Attempted to group the bins of trace",yt.index,"set with a",rt,"calendar","with bins",at.calendar?"on a "+at.calendar+" calendar":"w/o a set calendar"].join(" ")))),vt&&(s[pt]={traces:[yt],dirs:[st],axType:dt,calendar:yt[st+"calendar"]||""}),yt["_"+st+"bingroup"]=pt}for(_=0;_{var c=Y_().hoverPoints,g=Es().hoverLabelText;$.exports=function(P,S,t,e,r){var a=c(P,S,t,e,r);if(a){P=a[0];var n=P.cd[P.index],o=P.cd[0].trace;if(!o.cumulative.enabled){var i=o.orientation==="h"?"y":"x";P[i+"Label"]=g(P[i+"a"],[n.ph0,n.ph1],o[i+"hoverformat"])}return a}}}),$M=Ft((Q,$)=>{$.exports=function(c,g,P,S,t){if(c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,"zLabelVal"in g&&(c.z=g.zLabelVal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),!(P.cumulative||{}).enabled){var e=Array.isArray(t)?S[0].pts[t[0]][t[1]]:S[t].pts;c.pointNumbers=e,c.binNumber=c.pointNumber,delete c.pointNumber,delete c.pointIndex;var r;if(P._indexToPoints){r=[];for(var a=0;a{$.exports={attributes:Z6(),layoutAttributes:C6(),supplyDefaults:$F(),crossTraceDefaults:$6(),supplyLayoutDefaults:OM(),calc:HM().calc,crossTraceCalc:Pr().crossTraceCalc,plot:Qy().plot,layerName:"barlayer",style:xm().style,styleOnSelect:xm().styleOnSelect,colorbar:xo(),hoverPoints:GF(),selectPoints:K_(),eventData:$M(),moduleType:"trace",name:"histogram",basePlotModule:Mf(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}}),KF=Ft((Q,$)=>{$.exports=YF()}),G6=Ft((Q,$)=>{var c=Z6(),g=ZM(),P=X_(),S=$o(),t=fh().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:r,templatefallbackAttrs:a}=$u(),n=Tc(),o=Ta().extendFlat;$.exports=o({x:c.x,y:c.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:c.histnorm,histfunc:c.histfunc,nbinsx:c.nbinsx,xbins:g("x"),nbinsy:c.nbinsy,ybins:g("y"),autobinx:c.autobinx,autobiny:c.autobiny,bingroup:o({},c.bingroup,{}),xbingroup:o({},c.bingroup,{}),ybingroup:o({},c.bingroup,{}),xgap:P.xgap,ygap:P.ygap,zsmooth:P.zsmooth,xhoverformat:t("x"),yhoverformat:t("y"),zhoverformat:t("z",1),hovertemplate:e({},{keys:["z"]}),hovertemplatefallback:a(),texttemplate:r({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:a({editType:"plot"}),textfont:P.textfont,showlegend:o({},S.showlegend,{dflt:!1})},n("",{cLetter:"z",autoColorDflt:!1}))}),GM=Ft((Q,$)=>{var c=Xo(),g=bn();$.exports=function(P,S,t,e){var r=t("x"),a=t("y"),n=g.minRowLength(r),o=g.minRowLength(a);if(!n||!o){S.visible=!1;return}S._length=Math.min(n,o);var i=c.getComponentMethod("calendars","handleTraceDefaults");i(P,S,["x","y"],e);var s=t("z")||t("marker.color");s&&t("histfunc"),t("histnorm"),t("autobinx"),t("autobiny")}}),XF=Ft((Q,$)=>{var c=bn(),g=GM(),P=BM(),S=mc(),t=Uw(),e=G6();$.exports=function(r,a,n,o){function i(s,f){return c.coerce(r,a,e,s,f)}g(r,a,i,o),a.visible!==!1&&(P(r,a,i,o),S(r,a,o,i,{prefix:"",cLetter:"z"}),i("hovertemplate"),i("hovertemplatefallback"),t(i,o),i("xhoverformat"),i("yhoverformat"))}}),JF=Ft((Q,$)=>{var c=q6(),g=Es().hoverLabelText;$.exports=function(P,S,t,e,r){var a=c(P,S,t,e,r);if(a){P=a[0];var n=P.index,o=n[0],i=n[1],s=P.cd[0],f=s.trace,x=s.xRanges[i],y=s.yRanges[o];return P.xLabel=g(P.xa,[x[0],x[1]],f.xhoverformat),P.yLabel=g(P.ya,[y[0],y[1]],f.yhoverformat),a}}}),QF=Ft((Q,$)=>{$.exports={attributes:G6(),supplyDefaults:XF(),crossTraceDefaults:$6(),calc:U6(),plot:H6(),layerName:"heatmaplayer",colorbar:L1(),style:W6(),hoverPoints:JF(),eventData:$M(),moduleType:"trace",name:"histogram2d",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}}),tR=Ft((Q,$)=>{$.exports=QF()}),Y6=Ft((Q,$)=>{$.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}),Vw=Ft((Q,$)=>{var c=X_(),g=tf(),P=fh(),S=P.axisHoverFormat,t=P.descriptionOnlyNumbers,e=Tc(),r=Td().dash,a=Ea(),n=Ta().extendFlat,o=Y6(),i=o.COMPARISON_OPS2,s=o.INTERVAL_OPS,f=g.line;$.exports=n({z:c.z,x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:g.xperiod0,yperiod0:g.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,text:c.text,hovertext:c.hovertext,transpose:c.transpose,xtype:c.xtype,ytype:c.ytype,xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:c.hovertemplate,hovertemplatefallback:c.hovertemplatefallback,texttemplate:n({},c.texttemplate,{}),texttemplatefallback:c.texttemplatefallback,textfont:n({},c.textfont,{}),hoverongaps:c.hoverongaps,connectgaps:n({},c.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:a({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:t("contour label")},operation:{valType:"enumerated",values:[].concat(i).concat(s),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:n({},f.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:r,smoothing:n({},f.smoothing,{}),editType:"plot"},zorder:g.zorder},e("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}),YM=Ft((Q,$)=>{var c=G6(),g=Vw(),P=Tc(),S=fh().axisHoverFormat,t=Ta().extendFlat;$.exports=t({x:c.x,y:c.y,z:c.z,marker:c.marker,histnorm:c.histnorm,histfunc:c.histfunc,nbinsx:c.nbinsx,xbins:c.xbins,nbinsy:c.nbinsy,ybins:c.ybins,autobinx:c.autobinx,autobiny:c.autobiny,bingroup:c.bingroup,xbingroup:c.xbingroup,ybingroup:c.ybingroup,autocontour:g.autocontour,ncontours:g.ncontours,contours:g.contours,line:{color:g.line.color,width:t({},g.line.width,{dflt:.5}),dash:g.line.dash,smoothing:g.line.smoothing,editType:"plot"},xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:c.hovertemplate,hovertemplatefallback:c.hovertemplatefallback,texttemplate:g.texttemplate,texttemplatefallback:g.texttemplatefallback,textfont:g.textfont},P("",{cLetter:"z",editTypeOverride:"calc"}))}),K6=Ft((Q,$)=>{$.exports=function(c,g,P,S){var t=S("contours.start"),e=S("contours.end"),r=t===!1||e===!1,a=P("contours.size"),n;r?n=g.autocontour=!0:n=P("autocontour",!1),(n||!a)&&P("ncontours")}}),KM=Ft((Q,$)=>{var c=bn();$.exports=function(g,P,S,t){t||(t={});var e=g("contours.showlabels");if(e){var r=P.font;c.coerceFont(g,"contours.labelfont",r,{overrideDflt:{color:S}}),g("contours.labelformat")}t.hasHover!==!1&&g("zhoverformat")}}),X6=Ft((Q,$)=>{var c=mc(),g=KM();$.exports=function(P,S,t,e,r){var a=t("contours.coloring"),n,o="";a==="fill"&&(n=t("contours.showlines")),n!==!1&&(a!=="lines"&&(o=t("line.color","#000")),t("line.width",.5),t("line.dash")),a!=="none"&&(P.showlegend!==!0&&(S.showlegend=!1),S._dfltShowLegend=!1,c(P,S,e,t,{prefix:"",cLetter:"z"})),t("line.smoothing"),g(t,e,o,r)}}),eR=Ft((Q,$)=>{var c=bn(),g=GM(),P=K6(),S=X6(),t=Uw(),e=YM();$.exports=function(r,a,n,o){function i(f,x){return c.coerce(r,a,e,f,x)}function s(f){return c.coerce2(r,a,e,f)}g(r,a,i,o),a.visible!==!1&&(P(r,a,i,s),S(r,a,i,o),i("xhoverformat"),i("yhoverformat"),i("hovertemplate"),i("hovertemplatefallback"),a.contours&&a.contours.coloring==="heatmap"&&t(i,o))}}),XM=Ft((Q,$)=>{var c=Es(),g=bn();$.exports=function(S,t){var e=S.contours;if(S.autocontour){var r=S.zmin,a=S.zmax;(S.zauto||r===void 0)&&(r=g.aggNums(Math.min,null,t)),(S.zauto||a===void 0)&&(a=g.aggNums(Math.max,null,t));var n=P(r,a,S.ncontours);e.size=n.dtick,e.start=c.tickFirst(n),n.range.reverse(),e.end=c.tickFirst(n),e.start===r&&(e.start+=e.size),e.end===a&&(e.end-=e.size),e.start>e.end&&(e.start=e.end=(e.start+e.end)/2),S._input.contours||(S._input.contours={}),g.extendFlat(S._input.contours,{start:e.start,end:e.end,size:e.size}),S._input.autocontour=!0}else if(e.type!=="constraint"){var o=e.start,i=e.end,s=S._input.contours;if(o>i&&(e.start=s.start=i,i=e.end=s.end=o,o=e.start),!(e.size>0)){var f;o===i?f=1:f=P(o,i,S.ncontours).dtick,s.size=e.size=f}}};function P(S,t,e){var r={type:"linear",range:[S,t]};return c.autoTicks(r,(t-S)/(e||15)),r}}),Hw=Ft((Q,$)=>{$.exports=function(c){return c.end+c.size/1e6}}),JM=Ft((Q,$)=>{var c=Xc(),g=U6(),P=XM(),S=Hw();$.exports=function(t,e){var r=g(t,e),a=r[0].z;P(e,a);var n=e.contours,o=c.extractOpts(e),i;if(n.coloring==="heatmap"&&o.auto&&e.autocontour===!1){var s=n.start,f=S(n),x=n.size||1,y=Math.floor((f-s)/x)+1;isFinite(x)||(x=1,y=1);var v=s-x/2,T=v+y*x;i=[v,T]}else i=a;return c.calc(t,e,{vals:i,cLetter:"z"}),r}}),Ww=Ft((Q,$)=>{$.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}}),QM=Ft((Q,$)=>{var c=Ww();$.exports=function(P){var S=P[0].z,t=S.length,e=S[0].length,r=t===2||e===2,a,n,o,i,s,f,x,y,v;for(n=0;nP?0:1)+(S[0][1]>P?0:2)+(S[1][1]>P?0:4)+(S[1][0]>P?0:8);if(t===5||t===10){var e=(S[0][0]+S[0][1]+S[1][0]+S[1][1])/4;return P>e?t===5?713:1114:t===5?104:208}return t===15?0:t}}),t7=Ft((Q,$)=>{var c=bn(),g=Ww();$.exports=function(a,n,o){var i,s,f,x,y;for(n=n||.01,o=o||.01,f=0;f20?(x=g.CHOOSESADDLE[x][(y[0]||y[1])<0?0:1],a.crossings[f]=g.SADDLEREMAINDER[x]):delete a.crossings[f],y=g.NEWDELTA[x],!y){c.log("Found bad marching index:",x,n,a.level);break}v.push(r(a,n,y)),n[0]+=y[0],n[1]+=y[1],f=n.join(","),P(v[v.length-1],v[v.length-2],i,s)&&v.pop();var M=y[0]&&(n[0]<0||n[0]>u-2)||y[1]&&(n[1]<0||n[1]>T-2),E=n[0]===b[0]&&n[1]===b[1]&&y[0]===_[0]&&y[1]===_[1];if(E||o&&M)break;x=a.crossings[f]}C===1e4&&c.log("Infinite loop in contour?");var A=P(v[0],v[v.length-1],i,s),h=0,p=.2*a.smoothing,k=[],w=0,R,O,N,V,H,F,U,W,q,X,lt;for(C=1;C=w;C--)if(R=k[C],R=w&&R+k[O]W&&q--,a.edgepaths[q]=lt.concat(v,X));break}tt||(a.edgepaths[W]=v.concat(X))}for(W=0;W20&&n?a===208||a===1114?i=o[0]===0?1:-1:s=o[1]===0?1:-1:g.BOTTOMSTART.indexOf(a)!==-1?s=1:g.LEFTSTART.indexOf(a)!==-1?i=1:g.TOPSTART.indexOf(a)!==-1?s=-1:i=-1,[i,s]}function r(a,n,o){var i=n[0]+Math.max(o[0],0),s=n[1]+Math.max(o[1],0),f=a.z[s][i],x=a.xaxis,y=a.yaxis;if(o[1]){var v=(a.level-f)/(a.z[s][i+1]-f),T=(v!==1?(1-v)*x.c2l(a.x[i]):0)+(v!==0?v*x.c2l(a.x[i+1]):0);return[x.c2p(x.l2c(T),!0),y.c2p(a.y[s],!0),i+v,s]}else{var u=(a.level-f)/(a.z[s+1][i]-f),b=(u!==1?(1-u)*y.c2l(a.y[s]):0)+(u!==0?u*y.c2l(a.y[s+1]):0);return[x.c2p(a.x[i],!0),y.c2p(y.l2c(b),!0),i,s+u]}}}),rR=Ft((Q,$)=>{var c=Y6(),g=ra();$.exports={"[]":S("[]"),"][":S("]["),">":t(">"),"<":t("<"),"=":t("=")};function P(e,r){var a=Array.isArray(r),n;function o(i){return g(i)?+i:null}return c.COMPARISON_OPS2.indexOf(e)!==-1?n=o(a?r[0]:r):c.INTERVAL_OPS.indexOf(e)!==-1?n=a?[o(r[0]),o(r[1])]:[o(r),o(r)]:c.SET_OPS.indexOf(e)!==-1&&(n=a?r.map(o):[o(r)]),n}function S(e){return function(r){r=P(e,r);var a=Math.min(r[0],r[1]),n=Math.max(r[0],r[1]);return{start:a,end:n,size:n-a}}}function t(e){return function(r){return r=P(e,r),{start:r,end:1/0,size:1/0}}}}),e7=Ft((Q,$)=>{var c=bn(),g=rR(),P=Hw();$.exports=function(S,t,e){for(var r=S.type==="constraint"?g[S._operation](S.value):S,a=r.size,n=[],o=P(r),i=e.trace._carpetTrace,s=i?{xaxis:i.aaxis,yaxis:i.baxis,x:e.a,y:e.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:e.x,y:e.y},f=r.start;f1e3){c.warn("Too many contours, clipping at 1000",S);break}return n}}),r7=Ft((Q,$)=>{var c=bn();$.exports=function(P,S){var t,e,r,a=function(i){return i.reverse()},n=function(i){return i};switch(S){case"=":case"<":return P;case">":for(P.length!==1&&c.warn("Contour data invalid for the specified inequality operation."),e=P[0],t=0;t{$.exports=function(c,g){var P=c[0],S=P.z,t;switch(g.type){case"levels":var e=Math.min(S[0][0],S[0][1]);for(t=0;tr.level||r.starts.length&&e===r.level)}break;case"constraint":if(P.prefixBoundary=!1,P.edgepaths.length)return;var a=P.x.length,n=P.y.length,o=-1/0,i=1/0;for(t=0;t":s>o&&(P.prefixBoundary=!0);break;case"<":(so||P.starts.length&&x===i)&&(P.prefixBoundary=!0);break;case"][":f=Math.min(s[0],s[1]),x=Math.max(s[0],s[1]),fo&&(P.prefixBoundary=!0);break}break}}}),J6=Ft(Q=>{var $=un(),c=bn(),g=js(),P=Xc(),S=tc(),t=Es(),e=i0(),r=H6(),a=QM(),n=t7(),o=e7(),i=r7(),s=n7(),f=Ww(),x=f.LABELOPTIMIZER;Q.plot=function(M,E,A,h){var p=E.xaxis,k=E.yaxis;c.makeTraceGroups(h,A,"contour").each(function(w){var R=$.select(this),O=w[0],N=O.trace,V=O.x,H=O.y,F=N.contours,U=o(F,E,O),W=c.ensureSingle(R,"g","heatmapcoloring"),q=[];F.coloring==="heatmap"&&(q=[w]),r(M,E,q,W),a(U),n(U);var X=p.c2p(V[0],!0),lt=p.c2p(V[V.length-1],!0),yt=k.c2p(H[0],!0),pt=k.c2p(H[H.length-1],!0),st=[[X,pt],[lt,pt],[lt,yt],[X,yt]],tt=U;F.type==="constraint"&&(tt=i(U,F._operation)),y(R,st,F),v(R,tt,st,F),u(R,U,M,O,F),_(R,E,M,O,st)})};function y(M,E,A){var h=c.ensureSingle(M,"g","contourbg"),p=h.selectAll("path").data(A.coloring==="fill"?[0]:[]);p.enter().append("path"),p.exit().remove(),p.attr("d","M"+E.join("L")+"Z").style("stroke","none")}function v(M,E,A,h){var p=h.coloring==="fill"||h.type==="constraint"&&h._operation!=="=",k="M"+A.join("L")+"Z";p&&s(E,h);var w=c.ensureSingle(M,"g","contourfill"),R=w.selectAll("path").data(p?E:[]);R.enter().append("path"),R.exit().remove(),R.each(function(O){var N=(O.prefixBoundary?k:"")+T(O,A);N?$.select(this).attr("d",N).style("stroke","none"):$.select(this).remove()})}function T(M,E){var A="",h=0,p=M.edgepaths.map(function(lt,yt){return yt}),k=!0,w,R,O,N,V,H;function F(lt){return Math.abs(lt[1]-E[0][1])<.01}function U(lt){return Math.abs(lt[1]-E[2][1])<.01}function W(lt){return Math.abs(lt[0]-E[0][0])<.01}function q(lt){return Math.abs(lt[0]-E[2][0])<.01}for(;p.length;){for(H=g.smoothopen(M.edgepaths[h],M.smoothing),A+=k?H:H.replace(/^M/,"L"),p.splice(p.indexOf(h),1),w=M.edgepaths[h][M.edgepaths[h].length-1],N=-1,O=0;O<4;O++){if(!w){c.log("Missing end?",h,M);break}for(F(w)&&!q(w)?R=E[1]:W(w)?R=E[0]:U(w)?R=E[3]:q(w)&&(R=E[2]),V=0;V=0&&(R=X,N=V):Math.abs(w[1]-R[1])<.01?Math.abs(w[1]-X[1])<.01&&(X[0]-w[0])*(R[0]-X[0])>=0&&(R=X,N=V):c.log("endpt to newendpt is not vert. or horz.",w,R,X)}if(w=R,N>=0)break;A+="L"+R}if(N===M.edgepaths.length){c.log("unclosed perimeter path");break}h=N,k=p.indexOf(h)===-1,k&&(h=p[0],A+="Z")}for(h=0;hx.MAXCOST*2)break;F&&(R/=2),w=N-R/2,O=w+R*1.5}if(H<=x.MAXCOST)return V};function b(M,E,A,h){var p=E.width/2,k=E.height/2,w=M.x,R=M.y,O=M.theta,N=Math.cos(O)*p,V=Math.sin(O)*p,H=(w>h.center?h.right-w:w-h.left)/(N+Math.abs(Math.sin(O)*k)),F=(R>h.middle?h.bottom-R:R-h.top)/(Math.abs(V)+Math.cos(O)*k);if(H<1||F<1)return 1/0;var U=x.EDGECOST*(1/(H-1)+1/(F-1));U+=x.ANGLECOST*O*O;for(var W=w-N,q=R-V,X=w+N,lt=R+V,yt=0;yt{var c=un(),g=Xc(),P=Hw();$.exports=function(S){var t=S.contours,e=t.start,r=P(t),a=t.size||1,n=Math.floor((r-e)/a)+1,o=t.coloring==="lines"?0:1,i=g.extractOpts(S);isFinite(a)||(a=1,n=1);var s=i.reversescale?g.flipScale(i.colorscale):i.colorscale,f=s.length,x=new Array(f),y=new Array(f),v,T,u=i.min,b=i.max;if(t.coloring==="heatmap"){for(T=0;T=b)&&(e<=u&&(e=u),r>=b&&(r=b),n=Math.floor((r-e)/a)+1,o=0),T=0;Tu&&(x.unshift(u),y.unshift(y[0])),x[x.length-1]{var c=un(),g=js(),P=W6(),S=i7();$.exports=function(t){var e=c.select(t).selectAll("g.contour");e.style("opacity",function(r){return r[0].trace.opacity}),e.each(function(r){var a=c.select(this),n=r[0].trace,o=n.contours,i=n.line,s=o.size||1,f=o.start,x=o.type==="constraint",y=!x&&o.coloring==="lines",v=!x&&o.coloring==="fill",T=y||v?S(n):null;a.selectAll("g.contourlevel").each(function(_){c.select(this).selectAll("path").call(g.lineGroupStyle,i.width,y?T(_.level):i.color,i.dash)});var u=o.labelfont;if(a.selectAll("g.contourlabels text").each(function(_){g.font(c.select(this),{weight:u.weight,style:u.style,variant:u.variant,textcase:u.textcase,lineposition:u.lineposition,shadow:u.shadow,family:u.family,size:u.size,color:u.color||(y?T(_.level):i.color)})}),x)a.selectAll("g.contourfill path").style("fill",n.fillcolor);else if(v){var b;a.selectAll("g.contourfill path").style("fill",function(_){return b===void 0&&(b=_.level),T(_.level+.5*s)}),b===void 0&&(b=f),a.selectAll("g.contourbg path").style("fill",T(b-.5*s))}}),P(t)}}),tk=Ft((Q,$)=>{var c=Xc(),g=i7(),P=Hw();function S(t,e,r){var a=e.contours,n=e.line,o=a.size||1,i=a.coloring,s=g(e,{isColorbar:!0});if(i==="heatmap"){var f=c.extractOpts(e);r._fillgradient=f.reversescale?c.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else i==="fill"&&(r._fillcolor=s);r._line={color:i==="lines"?s:n.color,width:a.showlines!==!1?n.width:0,dash:n.dash},r._levels={start:a.start,end:P(a),size:o}}$.exports={min:"zmin",max:"zmax",calc:S}}),a7=Ft((Q,$)=>{var c=li(),g=q6();$.exports=function(P,S,t,e,r){r||(r={}),r.isContour=!0;var a=g(P,S,t,e,r);return a&&a.forEach(function(n){var o=n.trace;o.contours.type==="constraint"&&(o.fillcolor&&c.opacity(o.fillcolor)?n.color=c.addOpacity(o.fillcolor,1):o.contours.showlines&&c.opacity(o.line.color)&&(n.color=c.addOpacity(o.line.color,1)))}),a}}),nR=Ft((Q,$)=>{$.exports={attributes:YM(),supplyDefaults:eR(),crossTraceDefaults:$6(),calc:JM(),plot:J6().plot,layerName:"contourlayer",style:Q6(),colorbar:tk(),hoverPoints:a7(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}}),iR=Ft((Q,$)=>{$.exports=nR()}),o7=Ft((Q,$)=>{var c=ra(),g=KM(),P=li(),S=P.addOpacity,t=P.opacity,e=Y6(),r=bn().isArrayOrTypedArray,a=e.CONSTRAINT_REDUCTION,n=e.COMPARISON_OPS2;$.exports=function(i,s,f,x,y,v){var T=s.contours,u,b,_,C=f("contours.operation");if(T._operation=a[C],o(f,T),C==="="?u=T.showlines=!0:(u=f("contours.showlines"),_=f("fillcolor",S((i.line||{}).color||y,.5))),u){var M=_&&t(_)?S(s.fillcolor,1):y;b=f("line.color",M),f("line.width",2),f("line.dash")}f("line.smoothing"),g(f,x,b,v)};function o(i,s){var f;n.indexOf(s.operation)===-1?(i("contours.value",[0,1]),r(s.value)?s.value.length>2?s.value=s.value.slice(2):s.length===0?s.value=[0,1]:s.length<2?(f=parseFloat(s.value[0]),s.value=[f,f+1]):s.value=[parseFloat(s.value[0]),parseFloat(s.value[1])]:c(s.value)&&(f=parseFloat(s.value),s.value=[f,f+1])):(i("contours.value",0),c(s.value)||(r(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}),aR=Ft((Q,$)=>{var c=bn(),g=F6(),P=Fp(),S=o7(),t=K6(),e=X6(),r=Uw(),a=Vw();$.exports=function(n,o,i,s){function f(T,u){return c.coerce(n,o,a,T,u)}function x(T){return c.coerce2(n,o,a,T)}var y=g(n,o,f,s);if(!y){o.visible=!1;return}P(n,o,s,f),f("xhoverformat"),f("yhoverformat"),f("text"),f("hovertext"),f("hoverongaps"),f("hovertemplate"),f("hovertemplatefallback");var v=f("contours.type")==="constraint";f("connectgaps",c.isArray1D(o.z)),v?S(n,o,f,s,i):(t(n,o,f,x),e(n,o,f,s)),o.contours&&o.contours.coloring==="heatmap"&&r(f,s),f("zorder")}}),oR=Ft((Q,$)=>{$.exports={attributes:Vw(),supplyDefaults:aR(),calc:JM(),plot:J6().plot,style:Q6(),colorbar:tk(),hoverPoints:a7(),moduleType:"trace",name:"contour",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}),sR=Ft((Q,$)=>{$.exports=oR()}),s7=Ft((Q,$)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=z0(),t=tf(),e=$o(),r=Tc(),a=Td().dash,n=Ta().extendFlat,o=t.marker,i=t.line,s=o.line;$.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:n({},t.mode,{dflt:"markers"}),text:n({},t.text,{}),texttemplate:g({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:P({editType:"plot"}),hovertext:n({},t.hovertext,{}),line:{color:i.color,width:i.width,dash:a,backoff:i.backoff,shape:n({},i.shape,{values:["linear","spline"]}),smoothing:i.smoothing,editType:"calc"},connectgaps:t.connectgaps,cliponaxis:t.cliponaxis,fill:n({},t.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:S(),marker:n({symbol:o.symbol,opacity:o.opacity,angle:o.angle,angleref:o.angleref,standoff:o.standoff,maxdisplayed:o.maxdisplayed,size:o.size,sizeref:o.sizeref,sizemin:o.sizemin,sizemode:o.sizemode,line:n({width:s.width,editType:"calc"},r("marker.line")),gradient:o.gradient,editType:"calc"},r("marker")),textfont:t.textfont,textposition:t.textposition,selected:t.selected,unselected:t.unselected,hoverinfo:n({},e.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:t.hoveron,hovertemplate:c(),hovertemplatefallback:P()}}),lR=Ft((Q,$)=>{var c=bn(),g=vm(),P=Ac(),S=s0(),t=I0(),e=xv(),r=x0(),a=O0(),n=s7();$.exports=function(o,i,s,f){function x(C,M){return c.coerce(o,i,n,C,M)}var y=x("a"),v=x("b"),T=x("c"),u;if(y?(u=y.length,v?(u=Math.min(u,v.length),T&&(u=Math.min(u,T.length))):T?u=Math.min(u,T.length):u=0):v&&T&&(u=Math.min(v.length,T.length)),!u){i.visible=!1;return}i._length=u,x("sum"),x("text"),x("hovertext"),i.hoveron!=="fills"&&(x("hovertemplate"),x("hovertemplatefallback"));var b=u{var c=Es();$.exports=function(g,P,S){var t={},e=S[P.subplot]._subplot;return t.aLabel=c.tickText(e.aaxis,g.a,!0).text,t.bLabel=c.tickText(e.baxis,g.b,!0).text,t.cLabel=c.tickText(e.caxis,g.c,!0).text,t}}),cR=Ft((Q,$)=>{var c=ra(),g=F0(),P=ct(),S=Bt(),t=me().calcMarkerSize,e=["a","b","c"],r={a:["b","c"],b:["a","c"],c:["a","b"]};$.exports=function(a,n){var o=a._fullLayout[n.subplot],i=o.sum,s=n.sum||i,f={a:n.a,b:n.b,c:n.c},x=n.ids,y,v,T,u,b,_;for(y=0;y{var c=Ya();$.exports=function(g,P,S){var t=P.plotContainer;t.select(".scatterlayer").selectAll("*").remove();for(var e=P.xaxis,r=P.yaxis,a={xaxis:e,yaxis:r,plot:t,layerClipId:P._hasClipOnAxisFalse?P.clipIdRelative:null},n=P.layers.frontplot.select("g.scatterlayer"),o=0;o{var c=Sd();$.exports=function(g,P,S,t){var e=c(g,P,S,t);if(!e||e[0].index===!1)return;var r=e[0];if(r.index===void 0){var a=1-r.y0/g.ya._length,n=g.xa._length,o=n*a/2,i=n-o;return r.x0=Math.max(Math.min(r.x0,i),o),r.x1=Math.max(Math.min(r.x1,i),o),e}var s=r.cd[r.index],f=r.trace,x=r.subplot;r.a=s.a,r.b=s.b,r.c=s.c,r.xLabelVal=void 0,r.yLabelVal=void 0;var y={};y[f.subplot]={_subplot:x};var v=f._module.formatLabels(s,f,y);r.aLabel=v.aLabel,r.bLabel=v.bLabel,r.cLabel=v.cLabel;var T=s.hi||f.hoverinfo,u=[];function b(C,M){u.push(C._hovertitle+": "+M)}if(!f.hovertemplate){var _=T.split("+");_.indexOf("all")!==-1&&(_=["a","b","c"]),_.indexOf("a")!==-1&&b(x.aaxis,r.aLabel),_.indexOf("b")!==-1&&b(x.baxis,r.bLabel),_.indexOf("c")!==-1&&b(x.caxis,r.cLabel)}return r.extraText=u.join("
"),r.hovertemplate=f.hovertemplate,e}}),dR=Ft((Q,$)=>{$.exports=function(c,g,P,S,t){if(g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),S[t]){var e=S[t];c.a=e.a,c.b=e.b,c.c=e.c}else c.a=g.a,c.b=g.b,c.c=g.c;return c}}),pR=Ft((Q,$)=>{var c=un(),g=fo(),P=Xo(),S=bn(),t=S.strTranslate,e=S._,r=li(),a=js(),n=i0(),o=Ta().extendFlat,i=Kc(),s=Es(),f=up(),x=Qh(),y=v0(),v=y.freeMode,T=y.rectMode,u=lp(),b=vf().prepSelect,_=vf().selectOnClick,C=vf().clearOutline,M=vf().clearSelectionsCache,E=ic();function A(U,W){this.id=U.id,this.graphDiv=U.graphDiv,this.init(W),this.makeFramework(W),this.updateFx(W),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}$.exports=A;var h=A.prototype;h.init=function(U){this.container=U._ternarylayer,this.defs=U._defs,this.layoutId=U._uid,this.traceHash={},this.layers={}},h.plot=function(U,W){var q=this,X=W[q.id],lt=W._size;q._hasClipOnAxisFalse=!1;for(var yt=0;ytp*dt?(wt=dt,ut=wt*p):(ut=tt,wt=ut/p),zt=pt*ut/tt,Pt=st*wt/dt,Y=W.l+W.w*lt-ut/2,ft=W.t+W.h*(1-yt)-wt/2,q.x0=Y,q.y0=ft,q.w=ut,q.h=wt,q.sum=rt,q.xaxis={type:"linear",range:[at+2*it-rt,rt-at-2*vt],domain:[lt-zt/2,lt+zt/2],_id:"x"},n(q.xaxis,q.graphDiv._fullLayout),q.xaxis.setScale(),q.xaxis.isPtWithinRange=function(te){return te.a>=q.aaxis.range[0]&&te.a<=q.aaxis.range[1]&&te.b>=q.baxis.range[1]&&te.b<=q.baxis.range[0]&&te.c>=q.caxis.range[1]&&te.c<=q.caxis.range[0]},q.yaxis={type:"linear",range:[at,rt-vt-it],domain:[yt-Pt/2,yt+Pt/2],_id:"y"},n(q.yaxis,q.graphDiv._fullLayout),q.yaxis.setScale(),q.yaxis.isPtWithinRange=function(){return!0};var Wt=q.yaxis.domain[0],Ht=q.aaxis=o({},U.aaxis,{range:[at,rt-vt-it],side:"left",tickangle:(+U.aaxis.tickangle||0)-30,domain:[Wt,Wt+Pt*p],anchor:"free",position:0,_id:"y",_length:ut});n(Ht,q.graphDiv._fullLayout),Ht.setScale();var Jt=q.baxis=o({},U.baxis,{range:[rt-at-it,vt],side:"bottom",domain:q.xaxis.domain,anchor:"free",position:0,_id:"x",_length:ut});n(Jt,q.graphDiv._fullLayout),Jt.setScale();var ge=q.caxis=o({},U.caxis,{range:[rt-at-vt,it],side:"right",tickangle:(+U.caxis.tickangle||0)+30,domain:[Wt,Wt+Pt*p],anchor:"free",position:0,_id:"y",_length:ut});n(ge,q.graphDiv._fullLayout),ge.setScale();var he="M"+Y+","+(ft+wt)+"h"+ut+"l-"+ut/2+",-"+wt+"Z";q.clipDef.select("path").attr("d",he),q.layers.plotbg.select("path").attr("d",he);var de="M0,"+wt+"h"+ut+"l-"+ut/2+",-"+wt+"Z";q.clipDefRelative.select("path").attr("d",de);var se=t(Y,ft);q.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",se),q.clipDefRelative.select("path").attr("transform",null);var Tt=t(Y-Jt._offset,ft+wt);q.layers.baxis.attr("transform",Tt),q.layers.bgrid.attr("transform",Tt);var Lt=t(Y+ut/2,ft)+"rotate(30)"+t(0,-Ht._offset);q.layers.aaxis.attr("transform",Lt),q.layers.agrid.attr("transform",Lt);var Mt=t(Y+ut/2,ft)+"rotate(-30)"+t(0,-ge._offset);q.layers.caxis.attr("transform",Mt),q.layers.cgrid.attr("transform",Mt),q.drawAxes(!0),q.layers.aline.select("path").attr("d",Ht.showline?"M"+Y+","+(ft+wt)+"l"+ut/2+",-"+wt:"M0,0").call(r.stroke,Ht.linecolor||"#000").style("stroke-width",(Ht.linewidth||0)+"px"),q.layers.bline.select("path").attr("d",Jt.showline?"M"+Y+","+(ft+wt)+"h"+ut:"M0,0").call(r.stroke,Jt.linecolor||"#000").style("stroke-width",(Jt.linewidth||0)+"px"),q.layers.cline.select("path").attr("d",ge.showline?"M"+(Y+ut/2)+","+ft+"l"+ut/2+","+wt:"M0,0").call(r.stroke,ge.linecolor||"#000").style("stroke-width",(ge.linewidth||0)+"px"),q.graphDiv._context.staticPlot||q.initInteractions(),a.setClipUrl(q.layers.frontplot,q._hasClipOnAxisFalse?null:q.clipId,q.graphDiv)},h.drawAxes=function(U){var W=this,q=W.graphDiv,X=W.id.substr(7)+"title",lt=W.layers,yt=W.aaxis,pt=W.baxis,st=W.caxis;if(W.drawAx(yt),W.drawAx(pt),W.drawAx(st),U){var tt=Math.max(yt.showticklabels?yt.tickfont.size/2:0,(st.showticklabels?st.tickfont.size*.75:0)+(st.ticks==="outside"?st.ticklen*.87:0)),dt=(pt.showticklabels?pt.tickfont.size:0)+(pt.ticks==="outside"?pt.ticklen:0)+3;lt["a-title"]=u.draw(q,"a"+X,{propContainer:yt,propName:W.id+".aaxis.title.text",placeholder:e(q,"Click to enter Component A title"),attributes:{x:W.x0+W.w/2,y:W.y0-yt.title.font.size/3-tt,"text-anchor":"middle"}}),lt["b-title"]=u.draw(q,"b"+X,{propContainer:pt,propName:W.id+".baxis.title.text",placeholder:e(q,"Click to enter Component B title"),attributes:{x:W.x0-dt,y:W.y0+W.h+pt.title.font.size*.83+dt,"text-anchor":"middle"}}),lt["c-title"]=u.draw(q,"c"+X,{propContainer:st,propName:W.id+".caxis.title.text",placeholder:e(q,"Click to enter Component C title"),attributes:{x:W.x0+W.w+dt,y:W.y0+W.h+st.title.font.size*.83+dt,"text-anchor":"middle"}})}},h.drawAx=function(U){var W=this,q=W.graphDiv,X=U._name,lt=X.charAt(0),yt=U._id,pt=W.layers[X],st=30,tt=lt+"tickLayout",dt=k(U);W[tt]!==dt&&(pt.selectAll("."+yt+"tick").remove(),W[tt]=dt),U.setScale();var rt=s.calcTicks(U),at=s.clipEnds(U,rt),vt=s.makeTransTickFn(U),it=s.getTickSigns(U)[2],Y=S.deg2rad(st),ft=it*(U.linewidth||1)/2,ut=it*U.ticklen,wt=W.w,zt=W.h,Pt=lt==="b"?"M0,"+ft+"l"+Math.sin(Y)*ut+","+Math.cos(Y)*ut:"M"+ft+",0l"+Math.cos(Y)*ut+","+-Math.sin(Y)*ut,Wt={a:"M0,0l"+zt+",-"+wt/2,b:"M0,0l-"+wt/2+",-"+zt,c:"M0,0l-"+zt+","+wt/2}[lt];s.drawTicks(q,U,{vals:U.ticks==="inside"?at:rt,layer:pt,path:Pt,transFn:vt,crisp:!1}),s.drawGrid(q,U,{vals:at,layer:W.layers[lt+"grid"],path:Wt,transFn:vt,crisp:!1}),s.drawLabels(q,U,{vals:rt,layer:pt,transFn:vt,labelFns:s.makeLabelFns(U,0,st)})};function k(U){return U.ticks+String(U.ticklen)+String(U.showticklabels)}var w=E.MINZOOM/2+.87,R="m-0.87,.5h"+w+"v3h-"+(w+5.2)+"l"+(w/2+2.6)+",-"+(w*.87+4.5)+"l2.6,1.5l-"+w/2+","+w*.87+"Z",O="m0.87,.5h-"+w+"v3h"+(w+5.2)+"l-"+(w/2+2.6)+",-"+(w*.87+4.5)+"l-2.6,1.5l"+w/2+","+w*.87+"Z",N="m0,1l"+w/2+","+w*.87+"l2.6,-1.5l-"+(w/2+2.6)+",-"+(w*.87+4.5)+"l-"+(w/2+2.6)+","+(w*.87+4.5)+"l2.6,1.5l"+w/2+",-"+w*.87+"Z",V="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",H=!0;h.clearOutline=function(){M(this.dragOptions),C(this.dragOptions.gd)},h.initInteractions=function(){var U=this,W=U.layers.plotbg.select("path").node(),q=U.graphDiv,X=q._fullLayout._zoomlayer,lt,yt;this.dragOptions={element:W,gd:q,plotinfo:{id:U.id,domain:q._fullLayout[U.id].domain,xaxis:U.xaxis,yaxis:U.yaxis},subplot:U.id,prepFn:function(Tt,Lt,Mt){U.dragOptions.xaxes=[U.xaxis],U.dragOptions.yaxes=[U.yaxis],lt=q._fullLayout._invScaleX,yt=q._fullLayout._invScaleY;var te=U.dragOptions.dragmode=q._fullLayout.dragmode;v(te)?U.dragOptions.minDrag=1:U.dragOptions.minDrag=void 0,te==="zoom"?(U.dragOptions.moveFn=Jt,U.dragOptions.clickFn=wt,U.dragOptions.doneFn=ge,zt(Tt,Lt,Mt)):te==="pan"?(U.dragOptions.moveFn=de,U.dragOptions.clickFn=wt,U.dragOptions.doneFn=se,he(),U.clearOutline(q)):(T(te)||v(te))&&b(Tt,Lt,Mt,U.dragOptions,te)}};var pt,st,tt,dt,rt,at,vt,it,Y,ft;function ut(Tt){var Lt={};return Lt[U.id+".aaxis.min"]=Tt.a,Lt[U.id+".baxis.min"]=Tt.b,Lt[U.id+".caxis.min"]=Tt.c,Lt}function wt(Tt,Lt){var Mt=q._fullLayout.clickmode;F(q),Tt===2&&(q.emit("plotly_doubleclick",null),P.call("_guiRelayout",q,ut({a:0,b:0,c:0}))),Mt.indexOf("select")>-1&&Tt===1&&_(Lt,q,[U.xaxis],[U.yaxis],U.id,U.dragOptions),Mt.indexOf("event")>-1&&x.click(q,Lt,U.id)}function zt(Tt,Lt,Mt){var te=W.getBoundingClientRect();pt=Lt-te.left,st=Mt-te.top,q._fullLayout._calcInverseTransform(q);var ve=q._fullLayout._invTransform,oe=S.apply3DTransform(ve)(pt,st);pt=oe[0],st=oe[1],tt={a:U.aaxis.range[0],b:U.baxis.range[1],c:U.caxis.range[1]},rt=tt,dt=U.aaxis.range[1]-tt.a,at=g(U.graphDiv._fullLayout[U.id].bgcolor).getLuminance(),vt="M0,"+U.h+"L"+U.w/2+", 0L"+U.w+","+U.h+"Z",it=!1,Y=X.append("path").attr("class","zoombox").attr("transform",t(U.x0,U.y0)).style({fill:at>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",vt),ft=X.append("path").attr("class","zoombox-corners").attr("transform",t(U.x0,U.y0)).style({fill:r.background,stroke:r.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),U.clearOutline(q)}function Pt(Tt,Lt){return 1-Lt/U.h}function Wt(Tt,Lt){return 1-(Tt+(U.h-Lt)/Math.sqrt(3))/U.w}function Ht(Tt,Lt){return(Tt-(U.h-Lt)/Math.sqrt(3))/U.w}function Jt(Tt,Lt){var Mt=pt+Tt*lt,te=st+Lt*yt,ve=Math.max(0,Math.min(1,Pt(pt,st),Pt(Mt,te))),oe=Math.max(0,Math.min(1,Wt(pt,st),Wt(Mt,te))),Te=Math.max(0,Math.min(1,Ht(pt,st),Ht(Mt,te))),He=(ve/2+Te)*U.w,Ge=(1-ve/2-oe)*U.w,cr=(He+Ge)/2,ur=Ge-He,jr=(1-ve)*U.h,Hr=jr-ur/p;ur.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ft.transition().style("opacity",1).duration(200),it=!0),q.emit("plotly_relayouting",ut(rt))}function ge(){F(q),rt!==tt&&(P.call("_guiRelayout",q,ut(rt)),H&&q.data&&q._context.showTips&&(S.notifier(e(q,"Double-click to zoom back out"),"long"),H=!1))}function he(){tt={a:U.aaxis.range[0],b:U.baxis.range[1],c:U.caxis.range[1]},rt=tt}function de(Tt,Lt){var Mt=Tt/U.xaxis._m,te=Lt/U.yaxis._m;rt={a:tt.a-te,b:tt.b+(Mt+te)/2,c:tt.c-(Mt-te)/2};var ve=[rt.a,rt.b,rt.c].sort(S.sorterAsc),oe={a:ve.indexOf(rt.a),b:ve.indexOf(rt.b),c:ve.indexOf(rt.c)};ve[0]<0&&(ve[1]+ve[0]/2<0?(ve[2]+=ve[0]+ve[1],ve[0]=ve[1]=0):(ve[2]+=ve[0]/2,ve[1]+=ve[0]/2,ve[0]=0),rt={a:ve[oe.a],b:ve[oe.b],c:ve[oe.c]},Lt=(tt.a-rt.a)*U.yaxis._m,Tt=(tt.c-rt.c-tt.b+rt.b)*U.xaxis._m);var Te=t(U.x0+Tt,U.y0+Lt);U.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Te);var He=t(-Tt,-Lt);U.clipDefRelative.select("path").attr("transform",He),U.aaxis.range=[rt.a,U.sum-rt.b-rt.c],U.baxis.range=[U.sum-rt.a-rt.c,rt.b],U.caxis.range=[U.sum-rt.a-rt.b,rt.c],U.drawAxes(!1),U._hasClipOnAxisFalse&&U.plotContainer.select(".scatterlayer").selectAll(".trace").call(a.hideOutsideRangePoints,U),q.emit("plotly_relayouting",ut(rt))}function se(){P.call("_guiRelayout",q,ut(rt))}W.onmousemove=function(Tt){x.hover(q,Tt,U.id),q._fullLayout._lasthover=W,q._fullLayout._hoversubplot=U.id},W.onmouseout=function(Tt){q._dragging||f.unhover(q,Tt)},f.init(this.dragOptions)};function F(U){c.select(U).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}),l7=Ft((Q,$)=>{var c=bi(),g=Nh().attributes,P=Ad(),S=Yc().overrideAll,t=Ta().extendFlat,e={title:{text:P.title.text,font:P.title.font},color:P.color,tickmode:P.minor.tickmode,nticks:t({},P.nticks,{dflt:6,min:1}),tick0:P.tick0,dtick:P.dtick,tickvals:P.tickvals,ticktext:P.ticktext,ticks:P.ticks,ticklen:P.ticklen,tickwidth:P.tickwidth,tickcolor:P.tickcolor,ticklabelstep:P.ticklabelstep,showticklabels:P.showticklabels,labelalias:P.labelalias,showtickprefix:P.showtickprefix,tickprefix:P.tickprefix,showticksuffix:P.showticksuffix,ticksuffix:P.ticksuffix,showexponent:P.showexponent,exponentformat:P.exponentformat,minexponent:P.minexponent,separatethousands:P.separatethousands,tickfont:P.tickfont,tickangle:P.tickangle,tickformat:P.tickformat,tickformatstops:P.tickformatstops,hoverformat:P.hoverformat,showline:t({},P.showline,{dflt:!0}),linecolor:P.linecolor,linewidth:P.linewidth,showgrid:t({},P.showgrid,{dflt:!0}),gridcolor:P.gridcolor,gridwidth:P.gridwidth,griddash:P.griddash,layer:P.layer,min:{valType:"number",dflt:0,min:0}},r=$.exports=S({domain:g({name:"ternary"}),bgcolor:{valType:"color",dflt:c.background},sum:{valType:"number",dflt:1,min:0},aaxis:e,baxis:e,caxis:e},"plot","from-root");r.uirevision={valType:"any",editType:"none"},r.aaxis.uirevision=r.baxis.uirevision=r.caxis.uirevision={valType:"any",editType:"none"}}),P1=Ft((Q,$)=>{var c=bn(),g=pu(),P=Nh().defaults;$.exports=function(S,t,e,r){var a=r.type,n=r.attributes,o=r.handleDefaults,i=r.partition||"x",s=t._subplots[a],f=s.length,x=f&&s[0].replace(/\d+$/,""),y,v;function T(C,M){return c.coerce(y,v,n,C,M)}for(var u=0;u{var c=li(),g=pu(),P=bn(),S=P1(),t=n0(),e=dm(),r=gg(),a=mg(),n=Yy(),o=l7(),i=["aaxis","baxis","caxis"];$.exports=function(x,y,v){S(x,y,v,{type:"ternary",attributes:o,handleDefaults:s,font:y.font,paper_bgcolor:y.paper_bgcolor})};function s(x,y,v,T){var u=v("bgcolor"),b=v("sum");T.bgColor=c.combine(u,T.paper_bgcolor);for(var _,C,M,E=0;E=b&&(A.min=0,h.min=0,p.min=0,x.aaxis&&delete x.aaxis.min,x.baxis&&delete x.baxis.min,x.caxis&&delete x.caxis.min)}function f(x,y,v,T){var u=o[y._name];function b(k,w){return P.coerce(x,y,u,k,w)}b("uirevision",T.uirevision),y.type="linear";var _=b("color"),C=_!==u.color.dflt?_:v.font.color,M=y._name,E=M.charAt(0).toUpperCase(),A="Component "+E,h=b("title.text",A);y._hovertitle=h===A?h:E,P.coerceFont(b,"title.font",v.font,{overrideDflt:{size:P.bigFont(v.font.size),color:C}}),b("min"),a(x,y,b,"linear"),e(x,y,b,"linear"),t(x,y,b,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),r(x,y,b,{outerTicks:!0});var p=b("showticklabels");p&&(P.coerceFont(b,"tickfont",v.font,{overrideDflt:{color:C}}),b("tickangle"),b("tickformat")),n(x,y,b,{dfltColor:_,bgColor:v.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:u}),b("hoverformat"),b("layer")}}),gR=Ft(Q=>{var $=pR(),c=ud().getSubplotCalcData,g=bn().counterRegex,P="ternary";Q.name=P;var S=Q.attr="subplot";Q.idRoot=P,Q.idRegex=Q.attrRegex=g(P);var t=Q.attributes={};t[S]={valType:"subplotid",dflt:"ternary",editType:"calc"},Q.layoutAttributes=l7(),Q.supplyLayoutDefaults=mR(),Q.plot=function(e){for(var r=e._fullLayout,a=e.calcdata,n=r._subplots[P],o=0;o{$.exports={attributes:s7(),supplyDefaults:lR(),colorbar:xo(),formatLabels:uR(),calc:cR(),plot:hR(),style:xl().style,styleOnSelect:xl().styleOnSelect,hoverPoints:fR(),selectPoints:Bf(),eventData:dR(),moduleType:"trace",name:"scatterternary",basePlotModule:gR(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}}),yR=Ft((Q,$)=>{$.exports=vR()}),u7=Ft((Q,$)=>{var c=Bw(),g=Ta().extendFlat,P=fh().axisHoverFormat;$.exports={y:c.y,x:c.x,x0:c.x0,y0:c.y0,xhoverformat:P("x"),yhoverformat:P("y"),name:g({},c.name,{}),orientation:g({},c.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:c.fillcolor,points:g({},c.boxpoints,{}),jitter:g({},c.jitter,{}),pointpos:g({},c.pointpos,{}),width:g({},c.width,{}),marker:c.marker,text:c.text,hovertext:c.hovertext,hovertemplate:c.hovertemplate,hovertemplatefallback:c.hovertemplatefallback,quartilemethod:c.quartilemethod,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,selected:c.selected,unselected:c.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:c.zorder}}),c7=Ft((Q,$)=>{var c=Nw(),g=bn().extendFlat;$.exports={violinmode:g({},c.boxmode,{}),violingap:g({},c.boxgap,{}),violingroupgap:g({},c.boxgroupgap,{})}}),xR=Ft((Q,$)=>{var c=bn(),g=li(),P=jw(),S=u7();$.exports=function(t,e,r,a){function n(h,p){return c.coerce(t,e,S,h,p)}function o(h,p){return c.coerce2(t,e,S,h,p)}if(P.handleSampleDefaults(t,e,n,a),e.visible!==!1){n("bandwidth"),n("side");var i=n("width");i||(n("scalegroup",e.name),n("scalemode"));var s=n("span"),f;Array.isArray(s)&&(f="manual"),n("spanmode",f);var x=n("line.color",(t.marker||{}).color||r),y=n("line.width"),v=n("fillcolor",g.addOpacity(e.line.color,.5));P.handlePointsDefaults(t,e,n,{prefix:""});var T=o("box.width"),u=o("box.fillcolor",v),b=o("box.line.color",x),_=o("box.line.width",y),C=n("box.visible",!!(T||u||b||_));C||(e.box={visible:!1});var M=o("meanline.color",x),E=o("meanline.width",y),A=n("meanline.visible",!!(M||E));A||(e.meanline={visible:!1}),n("quartilemethod"),n("zorder")}}}),_R=Ft((Q,$)=>{var c=bn(),g=c7(),P=z6();$.exports=function(S,t,e){function r(a,n){return c.coerce(S,t,g,a,n)}P._supply(S,t,e,r,"violin")}}),ek=Ft(Q=>{var $=bn(),c={gaussian:function(g){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*g*g)}};Q.makeKDE=function(g,P,S){var t=S.length,e=c.gaussian,r=g.bandwidth,a=1/(t*r);return function(n){for(var o=0,i=0;i{var c=bn(),g=Es(),P=DM(),S=ek(),t=Da().BADNUM;$.exports=function(n,o){var i=P(n,o);if(i[0].t.empty)return i;for(var s=n._fullLayout,f=g.getFromId(n,o[o.orientation==="h"?"xaxis":"yaxis"]),x=1/0,y=-1/0,v=0,T=0,u=0;u{var c=I6().setPositionOffset,g=["v","h"];$.exports=function(P,S){for(var t=P.calcdata,e=S.xaxis,r=S.yaxis,a=0;a{var c=un(),g=bn(),P=js(),S=O6(),t=ji(),e=ek();$.exports=function(r,a,n,o){var i=r._context.staticPlot,s=r._fullLayout,f=a.xaxis,x=a.yaxis;function y(v,T){var u=t(v,{xaxis:f,yaxis:x,trace:T,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return P.smoothopen(u[0],1)}g.makeTraceGroups(o,n,"trace violins").each(function(v){var T=c.select(this),u=v[0],b=u.t,_=u.trace;if(_.visible!==!0||b.empty){T.remove();return}var C=b.bPos,M=b.bdPos,E=a[b.valLetter+"axis"],A=a[b.posLetter+"axis"],h=_.side==="both",p=h||_.side==="positive",k=h||_.side==="negative",w=T.selectAll("path.violin").data(g.identity);w.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","violin"),w.exit().remove(),w.each(function(W){var q=c.select(this),X=W.density,lt=X.length,yt=A.c2l(W.pos+C,!0),pt=A.l2p(yt),st;if(_.width)st=b.maxKDE/M;else{var tt=s._violinScaleGroupStats[_.scalegroup];st=_.scalemode==="count"?tt.maxKDE/M*(tt.maxCount/W.pts.length):tt.maxKDE/M}var dt,rt,at,vt,it,Y,ft;if(p){for(Y=new Array(lt),vt=0;vt{var c=un(),g=li(),P=xl().stylePoints;$.exports=function(S){var t=c.select(S).selectAll("g.trace.violins");t.style("opacity",function(e){return e[0].trace.opacity}),t.each(function(e){var r=e[0].trace,a=c.select(this),n=r.box||{},o=n.line||{},i=r.meanline||{},s=i.width;a.selectAll("path.violin").style("stroke-width",r.line.width+"px").call(g.stroke,r.line.color).call(g.fill,r.fillcolor),a.selectAll("path.box").style("stroke-width",o.width+"px").call(g.stroke,o.color).call(g.fill,n.fillcolor);var f={"stroke-width":s+"px","stroke-dasharray":2*s+"px,"+s+"px"};a.selectAll("path.mean").style(f).call(g.stroke,i.color),a.selectAll("path.meanline").style(f).call(g.stroke,i.color),P(a,r,S)})}}),AR=Ft((Q,$)=>{var c=li(),g=bn(),P=Es(),S=FM(),t=ek();$.exports=function(e,r,a,n,o){o||(o={});var i=o.hoverLayer,s=e.cd,f=s[0].trace,x=f.hoveron,y=x.indexOf("violins")!==-1,v=x.indexOf("kde")!==-1,T=[],u,b;if(y||v){var _=S.hoverOnBoxes(e,r,a,n);if(v&&_.length>0){var C=e.xa,M=e.ya,E,A,h,p,k;f.orientation==="h"?(k=r,E="y",h=M,A="x",p=C):(k=a,E="x",h=C,A="y",p=M);var w=s[e.index];if(k>=w.span[0]&&k<=w.span[1]){var R=g.extendFlat({},e),O=p.c2p(k,!0),N=t.getKdeValue(w,f,k),V=t.getPositionOnKdePath(w,f,O),H=h._offset,F=h._length;R[E+"0"]=V[0],R[E+"1"]=V[1],R[A+"0"]=R[A+"1"]=O,R[A+"Label"]=A+": "+P.hoverLabelText(p,k,f[A+"hoverformat"])+", "+s[0].t.labels.kde+" "+N.toFixed(3);for(var U=0,W=0;W<_.length;W++)if(_[W].attr==="med"){U=W;break}R.spikeDistance=_[U].spikeDistance;var q=E+"Spike";R[q]=_[U][q],_[U].spikeDistance=void 0,_[U][q]=void 0,R.hovertemplate=!1,T.push(R),b={},b[E+"1"]=g.constrain(H+V[0],H,H+F),b[E+"2"]=g.constrain(H+V[1],H,H+F),b[A+"1"]=b[A+"2"]=p._offset+O}}y&&(T=T.concat(_))}x.indexOf("points")!==-1&&(u=S.hoverOnPoints(e,r,a));var X=i.selectAll(".violinline-"+f.uid).data(b?[0]:[]);return X.enter().append("line").classed("violinline-"+f.uid,!0).attr("stroke-width",1.5),X.exit().remove(),X.attr(b).call(c.stroke,e.color),n==="closest"?u?[u]:T:(u&&T.push(u),T)}}),MR=Ft((Q,$)=>{$.exports={attributes:u7(),layoutAttributes:c7(),supplyDefaults:xR(),crossTraceDefaults:jw().crossTraceDefaults,supplyLayoutDefaults:_R(),calc:bR(),crossTraceCalc:wR(),plot:kR(),style:TR(),styleOnSelect:xl().styleOnSelect,hoverPoints:AR(),selectPoints:RM(),moduleType:"trace",name:"violin",basePlotModule:Mf(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}}),SR=Ft((Q,$)=>{$.exports=MR()}),ER=Ft((Q,$)=>{$.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}}),h7=Ft((Q,$)=>{var c=Sg(),g=tf().line,P=$o(),S=fh().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=$u(),a=ER(),n=Ta().extendFlat,o=li();$.exports={x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:c.xperiod0,yperiod0:c.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,xhoverformat:S("x"),yhoverformat:S("y"),hovertext:c.hovertext,hovertemplate:t({},{keys:a.eventDataKeys}),hovertemplatefallback:r(),hoverinfo:n({},P.hoverinfo,{flags:["name","x","y","text","percent initial","percent previous","percent total"]}),textinfo:{valType:"flaglist",flags:["label","text","percent initial","percent previous","percent total","value"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:e({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:r({editType:"plot"}),text:c.text,textposition:c.textposition,insidetextanchor:n({},c.insidetextanchor,{dflt:"middle"}),textangle:n({},c.textangle,{dflt:0}),textfont:c.textfont,insidetextfont:c.insidetextfont,outsidetextfont:c.outsidetextfont,constraintext:c.constraintext,cliponaxis:c.cliponaxis,orientation:n({},c.orientation,{}),offset:n({},c.offset,{arrayOk:!1}),width:n({},c.width,{arrayOk:!1}),marker:i(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:n({},g.color,{dflt:o.defaultLine}),width:n({},g.width,{dflt:0,editType:"plot"}),dash:g.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,zorder:c.zorder};function i(){var s=n({},c.marker);return delete s.pattern,delete s.cornerradius,s}}),f7=Ft((Q,$)=>{$.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}}),d7=Ft((Q,$)=>{var c=bn(),g=Mg(),P=J0().handleText,S=Nm(),t=Fp(),e=h7(),r=li();function a(i,s,f,x){function y(M,E){return c.coerce(i,s,e,M,E)}var v=S(i,s,x,y);if(!v){s.visible=!1;return}t(i,s,x,y),y("xhoverformat"),y("yhoverformat"),y("orientation",s.y&&!s.x?"v":"h"),y("offset"),y("width");var T=y("text");y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var u=y("textposition");P(i,s,x,y,u,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),s.textposition!=="none"&&!s.texttemplate&&y("textinfo",c.isArrayOrTypedArray(T)?"text+value":"value");var b=y("marker.color",f);y("marker.line.color",r.defaultLine),y("marker.line.width");var _=y("connector.visible");if(_){y("connector.fillcolor",n(b));var C=y("connector.line.width");C&&(y("connector.line.color"),y("connector.line.dash"))}y("zorder")}function n(i){var s=c.isArrayOrTypedArray(i)?"#000":i;return r.addOpacity(s,.5*r.opacity(s))}function o(i,s){var f,x;function y(T){return c.coerce(x._input,x,e,T)}for(var v=0;v{var c=bn(),g=f7();$.exports=function(P,S,t){var e=!1;function r(o,i){return c.coerce(P,S,g,o,i)}for(var a=0;a{var c=bn();$.exports=function(g,P){for(var S=0;S{var c=Es(),g=D0(),P=LR(),S=Bt(),t=Da().BADNUM;$.exports=function(r,a){var n=c.getFromId(r,a.xaxis||"x"),o=c.getFromId(r,a.yaxis||"y"),i,s,f,x,y,v,T,u;a.orientation==="h"?(i=n.makeCalcdata(a,"x"),f=o.makeCalcdata(a,"y"),x=g(a,o,"y",f),y=!!a.yperiodalignment,v="y"):(i=o.makeCalcdata(a,"y"),f=n.makeCalcdata(a,"x"),x=g(a,n,"x",f),y=!!a.xperiodalignment,v="x"),s=x.vals;var b=Math.min(s.length,i.length),_=new Array(b);for(a._base=[],T=0;T{var c=Pr().setGroupPositions;$.exports=function(g,P){var S=g._fullLayout,t=g._fullData,e=g.calcdata,r=P.xaxis,a=P.yaxis,n=[],o=[],i=[],s,f;for(f=0;f{var c=un(),g=bn(),P=js(),S=Da().BADNUM,t=Qy(),e=Rp().clearMinTextSize;$.exports=function(o,i,s,f){var x=o._fullLayout;e("funnel",x),r(o,i,s,f),a(o,i,s,f),t.plot(o,i,s,f,{mode:x.funnelmode,norm:x.funnelmode,gap:x.funnelgap,groupgap:x.funnelgroupgap})};function r(o,i,s,f){var x=i.xaxis,y=i.yaxis;g.makeTraceGroups(f,s,"trace bars").each(function(v){var T=c.select(this),u=v[0].trace,b=g.ensureSingle(T,"g","regions");if(!u.connector||!u.connector.visible){b.remove();return}var _=u.orientation==="h",C=b.selectAll("g.region").data(g.identity);C.enter().append("g").classed("region",!0),C.exit().remove();var M=C.size();C.each(function(E,A){if(!(A!==M-1&&!E.cNext)){var h=n(E,x,y,_),p=h[0],k=h[1],w="";p[0]!==S&&k[0]!==S&&p[1]!==S&&k[1]!==S&&p[2]!==S&&k[2]!==S&&p[3]!==S&&k[3]!==S&&(_?w+="M"+p[0]+","+k[1]+"L"+p[2]+","+k[2]+"H"+p[3]+"L"+p[1]+","+k[1]+"Z":w+="M"+p[1]+","+k[1]+"L"+p[2]+","+k[3]+"V"+k[2]+"L"+p[1]+","+k[0]+"Z"),w===""&&(w="M0,0Z"),g.ensureSingle(c.select(this),"path").attr("d",w).call(P.setClipUrl,i.layerClipId,o)}})})}function a(o,i,s,f){var x=i.xaxis,y=i.yaxis;g.makeTraceGroups(f,s,"trace bars").each(function(v){var T=c.select(this),u=v[0].trace,b=g.ensureSingle(T,"g","lines");if(!u.connector||!u.connector.visible||!u.connector.line.width){b.remove();return}var _=u.orientation==="h",C=b.selectAll("g.line").data(g.identity);C.enter().append("g").classed("line",!0),C.exit().remove();var M=C.size();C.each(function(E,A){if(!(A!==M-1&&!E.cNext)){var h=n(E,x,y,_),p=h[0],k=h[1],w="";p[3]!==void 0&&k[3]!==void 0&&(_?(w+="M"+p[0]+","+k[1]+"L"+p[2]+","+k[2],w+="M"+p[1]+","+k[1]+"L"+p[3]+","+k[2]):(w+="M"+p[1]+","+k[1]+"L"+p[2]+","+k[3],w+="M"+p[1]+","+k[0]+"L"+p[2]+","+k[2])),w===""&&(w="M0,0Z"),g.ensureSingle(c.select(this),"path").attr("d",w).call(P.setClipUrl,i.layerClipId,o)}})})}function n(o,i,s,f){var x=[],y=[],v=f?i:s,T=f?s:i;return x[0]=v.c2p(o.s0,!0),y[0]=T.c2p(o.p0,!0),x[1]=v.c2p(o.s1,!0),y[1]=T.c2p(o.p1,!0),x[2]=v.c2p(o.nextS0,!0),y[2]=T.c2p(o.nextP0,!0),x[3]=v.c2p(o.nextS1,!0),y[3]=T.c2p(o.nextP1,!0),f?[x,y]:[y,x]}}),OR=Ft((Q,$)=>{var c=un(),g=js(),P=li(),S=co().DESELECTDIM,t=xm(),e=Rp().resizeText,r=t.styleTextPoints;function a(n,o,i){var s=i||c.select(n).selectAll('g[class^="funnellayer"]').selectAll("g.trace");e(n,s,"funnel"),s.style("opacity",function(f){return f[0].trace.opacity}),s.each(function(f){var x=c.select(this),y=f[0].trace;x.selectAll(".point > path").each(function(v){if(!v.isBlank){var T=y.marker;c.select(this).call(P.fill,v.mc||T.color).call(P.stroke,v.mlc||T.line.color).call(g.dashLine,T.line.dash,v.mlw||T.line.width).style("opacity",y.selectedpoints&&!v.selected?S:1)}}),r(x,y,n),x.selectAll(".regions").each(function(){c.select(this).selectAll("path").style("stroke-width",0).call(P.fill,y.connector.fillcolor)}),x.selectAll(".lines").each(function(){var v=y.connector.line;g.lineGroupStyle(c.select(this).selectAll("path"),v.width,v.color,v.dash)})})}$.exports={style:a}}),DR=Ft((Q,$)=>{var c=li().opacity,g=Y_().hoverOnBars,P=bn().formatPercent;$.exports=function(t,e,r,a,n){var o=g(t,e,r,a,n);if(o){var i=o.cd,s=i[0].trace,f=s.orientation==="h",x=o.index,y=i[x],v=f?"x":"y";o[v+"LabelVal"]=y.s,o.percentInitial=y.begR,o.percentInitialLabel=P(y.begR,1),o.percentPrevious=y.difR,o.percentPreviousLabel=P(y.difR,1),o.percentTotal=y.sumR,o.percentTotalLabel=P(y.sumR,1);var T=y.hi||s.hoverinfo,u=[];if(T&&T!=="none"&&T!=="skip"){var b=T==="all",_=T.split("+"),C=function(M){return b||_.indexOf(M)!==-1};C("percent initial")&&u.push(o.percentInitialLabel+" of initial"),C("percent previous")&&u.push(o.percentPreviousLabel+" of previous"),C("percent total")&&u.push(o.percentTotalLabel+" of total")}return o.extraText=u.join("
"),o.color=S(s,y),[o]}};function S(t,e){var r=t.marker,a=e.mc||r.color,n=e.mlc||r.line.color,o=e.mlw||r.line.width;if(c(a))return a;if(c(n)&&o)return n}}),FR=Ft((Q,$)=>{$.exports=function(c,g){return c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,"percentInitial"in g&&(c.percentInitial=g.percentInitial),"percentPrevious"in g&&(c.percentPrevious=g.percentPrevious),"percentTotal"in g&&(c.percentTotal=g.percentTotal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c}}),RR=Ft((Q,$)=>{$.exports={attributes:h7(),layoutAttributes:f7(),supplyDefaults:d7().supplyDefaults,crossTraceDefaults:d7().crossTraceDefaults,supplyLayoutDefaults:CR(),calc:PR(),crossTraceCalc:zR(),plot:IR(),style:OR().style,hoverPoints:DR(),eventData:FR(),selectPoints:K_(),moduleType:"trace",name:"funnel",basePlotModule:Mf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}),BR=Ft((Q,$)=>{$.exports=RR()}),NR=Ft((Q,$)=>{$.exports={eventDataKeys:["initial","delta","final"]}}),p7=Ft((Q,$)=>{var c=Sg(),g=tf().line,P=$o(),S=fh().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=$u(),a=NR(),n=Ta().extendFlat,o=li();function i(s){return{marker:{color:n({},c.marker.color,{arrayOk:!1,editType:"style"}),line:{color:n({},c.marker.line.color,{arrayOk:!1,editType:"style"}),width:n({},c.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}$.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:c.xperiod0,yperiod0:c.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,xhoverformat:S("x"),yhoverformat:S("y"),hovertext:c.hovertext,hovertemplate:t({},{keys:a.eventDataKeys}),hovertemplatefallback:r(),hoverinfo:n({},P.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:e({editType:"plot"},{keys:a.eventDataKeys.concat(["label"])}),texttemplatefallback:r({editType:"plot"}),text:c.text,textposition:c.textposition,insidetextanchor:c.insidetextanchor,textangle:c.textangle,textfont:c.textfont,insidetextfont:c.insidetextfont,outsidetextfont:c.outsidetextfont,constraintext:c.constraintext,cliponaxis:c.cliponaxis,orientation:c.orientation,offset:c.offset,width:c.width,increasing:i(),decreasing:i(),totals:i(),connector:{line:{color:n({},g.color,{dflt:o.defaultLine}),width:n({},g.width,{editType:"plot"}),dash:g.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,zorder:c.zorder}}),m7=Ft((Q,$)=>{$.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}}),J_=Ft((Q,$)=>{$.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}}),g7=Ft((Q,$)=>{var c=bn(),g=Mg(),P=J0().handleText,S=Nm(),t=Fp(),e=p7(),r=li(),a=J_(),n=a.INCREASING.COLOR,o=a.DECREASING.COLOR,i="#4499FF";function s(y,v,T){y(v+".marker.color",T),y(v+".marker.line.color",r.defaultLine),y(v+".marker.line.width")}function f(y,v,T,u){function b(A,h){return c.coerce(y,v,e,A,h)}var _=S(y,v,u,b);if(!_){v.visible=!1;return}t(y,v,u,b),b("xhoverformat"),b("yhoverformat"),b("measure"),b("orientation",v.x&&!v.y?"h":"v"),b("base"),b("offset"),b("width"),b("text"),b("hovertext"),b("hovertemplate"),b("hovertemplatefallback");var C=b("textposition");P(y,v,u,b,C,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),v.textposition!=="none"&&(b("texttemplate"),b("texttemplatefallback"),v.texttemplate||b("textinfo")),s(b,"increasing",n),s(b,"decreasing",o),s(b,"totals",i);var M=b("connector.visible");if(M){b("connector.mode");var E=b("connector.line.width");E&&(b("connector.line.color"),b("connector.line.dash"))}b("zorder")}function x(y,v){var T,u;function b(C){return c.coerce(u._input,u,e,C)}if(v.waterfallmode==="group")for(var _=0;_{var c=bn(),g=m7();$.exports=function(P,S,t){var e=!1;function r(o,i){return c.coerce(P,S,g,o,i)}for(var a=0;a{var c=Es(),g=D0(),P=bn().mergeArray,S=Bt(),t=Da().BADNUM;function e(a){return a==="a"||a==="absolute"}function r(a){return a==="t"||a==="total"}$.exports=function(a,n){var o=c.getFromId(a,n.xaxis||"x"),i=c.getFromId(a,n.yaxis||"y"),s,f,x,y,v,T;n.orientation==="h"?(s=o.makeCalcdata(n,"x"),x=i.makeCalcdata(n,"y"),y=g(n,i,"y",x),v=!!n.yperiodalignment,T="y"):(s=i.makeCalcdata(n,"y"),x=o.makeCalcdata(n,"x"),y=g(n,o,"x",x),v=!!n.xperiodalignment,T="x"),f=y.vals;for(var u=Math.min(f.length,s.length),b=new Array(u),_=0,C,M=!1,E=0;E{var c=Pr().setGroupPositions;$.exports=function(g,P){var S=g._fullLayout,t=g._fullData,e=g.calcdata,r=P.xaxis,a=P.yaxis,n=[],o=[],i=[],s,f;for(f=0;f{var c=un(),g=bn(),P=js(),S=Da().BADNUM,t=Qy(),e=Rp().clearMinTextSize;$.exports=function(n,o,i,s){var f=n._fullLayout;e("waterfall",f),t.plot(n,o,i,s,{mode:f.waterfallmode,norm:f.waterfallmode,gap:f.waterfallgap,groupgap:f.waterfallgroupgap}),r(n,o,i,s)};function r(n,o,i,s){var f=o.xaxis,x=o.yaxis;g.makeTraceGroups(s,i,"trace bars").each(function(y){var v=c.select(this),T=y[0].trace,u=g.ensureSingle(v,"g","lines");if(!T.connector||!T.connector.visible){u.remove();return}var b=T.orientation==="h",_=T.connector.mode,C=u.selectAll("g.line").data(g.identity);C.enter().append("g").classed("line",!0),C.exit().remove();var M=C.size();C.each(function(E,A){if(!(A!==M-1&&!E.cNext)){var h=a(E,f,x,b),p=h[0],k=h[1],w="";p[0]!==S&&k[0]!==S&&p[1]!==S&&k[1]!==S&&(_==="spanning"&&!E.isSum&&A>0&&(b?w+="M"+p[0]+","+k[1]+"V"+k[0]:w+="M"+p[1]+","+k[0]+"H"+p[0]),_!=="between"&&(E.isSum||A{var c=un(),g=js(),P=li(),S=co().DESELECTDIM,t=xm(),e=Rp().resizeText,r=t.styleTextPoints;function a(n,o,i){var s=i||c.select(n).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");e(n,s,"waterfall"),s.style("opacity",function(f){return f[0].trace.opacity}),s.each(function(f){var x=c.select(this),y=f[0].trace;x.selectAll(".point > path").each(function(v){if(!v.isBlank){var T=y[v.dir].marker;c.select(this).call(P.fill,T.color).call(P.stroke,T.line.color).call(g.dashLine,T.line.dash,T.line.width).style("opacity",y.selectedpoints&&!v.selected?S:1)}}),r(x,y,n),x.selectAll(".lines").each(function(){var v=y.connector.line;g.lineGroupStyle(c.select(this).selectAll("path"),v.width,v.color,v.dash)})})}$.exports={style:a}}),qR=Ft((Q,$)=>{var c=Es().hoverLabelText,g=li().opacity,P=Y_().hoverOnBars,S=J_(),t={increasing:S.INCREASING.SYMBOL,decreasing:S.DECREASING.SYMBOL};$.exports=function(r,a,n,o,i){var s=P(r,a,n,o,i);if(!s)return;var f=s.cd,x=f[0].trace,y=x.orientation==="h",v=y?"x":"y",T=y?r.xa:r.ya;function u(w){return c(T,w,x[v+"hoverformat"])}var b=s.index,_=f[b],C=_.isSum?_.b+_.s:_.rawS;s.initial=_.b+_.s-C,s.delta=C,s.final=s.initial+s.delta;var M=u(Math.abs(s.delta));s.deltaLabel=C<0?"("+M+")":M,s.finalLabel=u(s.final),s.initialLabel=u(s.initial);var E=_.hi||x.hoverinfo,A=[];if(E&&E!=="none"&&E!=="skip"){var h=E==="all",p=E.split("+"),k=function(w){return h||p.indexOf(w)!==-1};_.isSum||(k("final")&&(y?!k("x"):!k("y"))&&A.push(s.finalLabel),k("delta")&&(C<0?A.push(s.deltaLabel+" "+t.decreasing):A.push(s.deltaLabel+" "+t.increasing)),k("initial")&&A.push("Initial: "+s.initialLabel))}return A.length&&(s.extraText=A.join("
")),s.color=e(x,_),[s]};function e(r,a){var n=r[a.dir].marker,o=n.color,i=n.line.color,s=n.line.width;if(g(o))return o;if(g(i)&&s)return i}}),ZR=Ft((Q,$)=>{$.exports=function(c,g){return c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,"initial"in g&&(c.initial=g.initial),"delta"in g&&(c.delta=g.delta),"final"in g&&(c.final=g.final),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c}}),$R=Ft((Q,$)=>{$.exports={attributes:p7(),layoutAttributes:m7(),supplyDefaults:g7().supplyDefaults,crossTraceDefaults:g7().crossTraceDefaults,supplyLayoutDefaults:jR(),calc:UR(),crossTraceCalc:VR(),plot:HR(),style:WR().style,hoverPoints:qR(),eventData:ZR(),selectPoints:K_(),moduleType:"trace",name:"waterfall",basePlotModule:Mf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}),GR=Ft((Q,$)=>{$.exports=$R()}),Q_=Ft((Q,$)=>{$.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(c){return c.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(c){return c.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(c){return c.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(c){var g=c.slice(0,3);return g[1]=g[1]+"%",g[2]=g[2]+"%",g},suffix:["°","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(c){var g=c.slice(0,4);return g[1]=g[1]+"%",g[2]=g[2]+"%",g},suffix:["°","%","%",""]}}}}),v7=Ft((Q,$)=>{var c=$o(),g=tf().zorder,{hovertemplateAttrs:P,templatefallbackAttrs:S}=$u(),t=Ta().extendFlat,e=Q_().colormodel,r=["rgb","rgba","rgba256","hsl","hsla"],a=[],n=[];for(i=0;i{var c=bn(),g=v7(),P=Q_(),S=o0().IMAGE_URL_PREFIX;$.exports=function(t,e){function r(o,i){return c.coerce(t,e,g,o,i)}r("source"),e.source&&!e.source.match(S)&&delete e.source,e._hasSource=!!e.source;var a=r("z");if(e._hasZ=!(a===void 0||!a.length||!a[0]||!a[0].length),!e._hasZ&&!e._hasSource){e.visible=!1;return}r("x0"),r("y0"),r("dx"),r("dy");var n;e._hasZ?(r("colormodel","rgb"),n=P.colormodel[e.colormodel],r("zmin",n.zminDflt||n.min),r("zmax",n.zmaxDflt||n.max)):e._hasSource&&(e.colormodel="rgba256",n=P.colormodel[e.colormodel],e.zmin=n.zminDflt,e.zmax=n.zmaxDflt),r("zsmooth"),r("text"),r("hovertext"),r("hovertemplate"),r("hovertemplatefallback"),e._length=null,r("zorder")}}),_v=Ft((Q,$)=>{typeof Object.create=="function"?$.exports=function(c,g){g&&(c.super_=g,c.prototype=Object.create(g.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}))}:$.exports=function(c,g){if(g){c.super_=g;var P=function(){};P.prototype=g.prototype,c.prototype=new P,c.prototype.constructor=c}}}),y7=Ft((Q,$)=>{$.exports=Im().EventEmitter}),KR=Ft(Q=>{Q.byteLength=r,Q.toByteArray=n,Q.fromByteArray=s;var $=[],c=[],g=typeof Uint8Array<"u"?Uint8Array:Array,P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(S=0,t=P.length;S0)throw new Error("Invalid string. Length must be a multiple of 4");var y=f.indexOf("=");y===-1&&(y=x);var v=y===x?0:4-y%4;return[y,v]}function r(f){var x=e(f),y=x[0],v=x[1];return(y+v)*3/4-v}function a(f,x,y){return(x+y)*3/4-y}function n(f){var x,y=e(f),v=y[0],T=y[1],u=new g(a(f,v,T)),b=0,_=T>0?v-4:v,C;for(C=0;C<_;C+=4)x=c[f.charCodeAt(C)]<<18|c[f.charCodeAt(C+1)]<<12|c[f.charCodeAt(C+2)]<<6|c[f.charCodeAt(C+3)],u[b++]=x>>16&255,u[b++]=x>>8&255,u[b++]=x&255;return T===2&&(x=c[f.charCodeAt(C)]<<2|c[f.charCodeAt(C+1)]>>4,u[b++]=x&255),T===1&&(x=c[f.charCodeAt(C)]<<10|c[f.charCodeAt(C+1)]<<4|c[f.charCodeAt(C+2)]>>2,u[b++]=x>>8&255,u[b++]=x&255),u}function o(f){return $[f>>18&63]+$[f>>12&63]+$[f>>6&63]+$[f&63]}function i(f,x,y){for(var v,T=[],u=x;u_?_:b+u));return v===1?(x=f[y-1],T.push($[x>>2]+$[x<<4&63]+"==")):v===2&&(x=(f[y-2]<<8)+f[y-1],T.push($[x>>10]+$[x>>4&63]+$[x<<2&63]+"=")),T.join("")}}),XR=Ft(Q=>{Q.read=function($,c,g,P,S){var t,e,r=S*8-P-1,a=(1<>1,o=-7,i=g?S-1:0,s=g?-1:1,f=$[c+i];for(i+=s,t=f&(1<<-o)-1,f>>=-o,o+=r;o>0;t=t*256+$[c+i],i+=s,o-=8);for(e=t&(1<<-o)-1,t>>=-o,o+=P;o>0;e=e*256+$[c+i],i+=s,o-=8);if(t===0)t=1-n;else{if(t===a)return e?NaN:(f?-1:1)*(1/0);e=e+Math.pow(2,P),t=t-n}return(f?-1:1)*e*Math.pow(2,t-P)},Q.write=function($,c,g,P,S,t){var e,r,a,n=t*8-S-1,o=(1<>1,s=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=P?0:t-1,x=P?1:-1,y=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(r=isNaN(c)?1:0,e=o):(e=Math.floor(Math.log(c)/Math.LN2),c*(a=Math.pow(2,-e))<1&&(e--,a*=2),e+i>=1?c+=s/a:c+=s*Math.pow(2,1-i),c*a>=2&&(e++,a/=2),e+i>=o?(r=0,e=o):e+i>=1?(r=(c*a-1)*Math.pow(2,S),e=e+i):(r=c*Math.pow(2,i-1)*Math.pow(2,S),e=0));S>=8;$[g+f]=r&255,f+=x,r/=256,S-=8);for(e=e<0;$[g+f]=e&255,f+=x,e/=256,n-=8);$[g+f-x]|=y*128}}),tx=Ft(Q=>{var $=KR(),c=XR(),g=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Q.Buffer=e,Q.SlowBuffer=T,Q.INSPECT_MAX_BYTES=50;var P=2147483647;Q.kMaxLength=P,e.TYPED_ARRAY_SUPPORT=S(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function S(){try{let Tt=new Uint8Array(1),Lt={foo:function(){return 42}};return Object.setPrototypeOf(Lt,Uint8Array.prototype),Object.setPrototypeOf(Tt,Lt),Tt.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function t(Tt){if(Tt>P)throw new RangeError('The value "'+Tt+'" is invalid for option "size"');let Lt=new Uint8Array(Tt);return Object.setPrototypeOf(Lt,e.prototype),Lt}function e(Tt,Lt,Mt){if(typeof Tt=="number"){if(typeof Lt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return o(Tt)}return r(Tt,Lt,Mt)}e.poolSize=8192;function r(Tt,Lt,Mt){if(typeof Tt=="string")return i(Tt,Lt);if(ArrayBuffer.isView(Tt))return f(Tt);if(Tt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Tt);if(Jt(Tt,ArrayBuffer)||Tt&&Jt(Tt.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Jt(Tt,SharedArrayBuffer)||Tt&&Jt(Tt.buffer,SharedArrayBuffer)))return x(Tt,Lt,Mt);if(typeof Tt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let te=Tt.valueOf&&Tt.valueOf();if(te!=null&&te!==Tt)return e.from(te,Lt,Mt);let ve=y(Tt);if(ve)return ve;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Tt[Symbol.toPrimitive]=="function")return e.from(Tt[Symbol.toPrimitive]("string"),Lt,Mt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Tt)}e.from=function(Tt,Lt,Mt){return r(Tt,Lt,Mt)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array);function a(Tt){if(typeof Tt!="number")throw new TypeError('"size" argument must be of type number');if(Tt<0)throw new RangeError('The value "'+Tt+'" is invalid for option "size"')}function n(Tt,Lt,Mt){return a(Tt),Tt<=0?t(Tt):Lt!==void 0?typeof Mt=="string"?t(Tt).fill(Lt,Mt):t(Tt).fill(Lt):t(Tt)}e.alloc=function(Tt,Lt,Mt){return n(Tt,Lt,Mt)};function o(Tt){return a(Tt),t(Tt<0?0:v(Tt)|0)}e.allocUnsafe=function(Tt){return o(Tt)},e.allocUnsafeSlow=function(Tt){return o(Tt)};function i(Tt,Lt){if((typeof Lt!="string"||Lt==="")&&(Lt="utf8"),!e.isEncoding(Lt))throw new TypeError("Unknown encoding: "+Lt);let Mt=u(Tt,Lt)|0,te=t(Mt),ve=te.write(Tt,Lt);return ve!==Mt&&(te=te.slice(0,ve)),te}function s(Tt){let Lt=Tt.length<0?0:v(Tt.length)|0,Mt=t(Lt);for(let te=0;te=P)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+P.toString(16)+" bytes");return Tt|0}function T(Tt){return+Tt!=Tt&&(Tt=0),e.alloc(+Tt)}e.isBuffer=function(Tt){return Tt!=null&&Tt._isBuffer===!0&&Tt!==e.prototype},e.compare=function(Tt,Lt){if(Jt(Tt,Uint8Array)&&(Tt=e.from(Tt,Tt.offset,Tt.byteLength)),Jt(Lt,Uint8Array)&&(Lt=e.from(Lt,Lt.offset,Lt.byteLength)),!e.isBuffer(Tt)||!e.isBuffer(Lt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Tt===Lt)return 0;let Mt=Tt.length,te=Lt.length;for(let ve=0,oe=Math.min(Mt,te);vete.length?(e.isBuffer(oe)||(oe=e.from(oe)),oe.copy(te,ve)):Uint8Array.prototype.set.call(te,oe,ve);else if(e.isBuffer(oe))oe.copy(te,ve);else throw new TypeError('"list" argument must be an Array of Buffers');ve+=oe.length}return te};function u(Tt,Lt){if(e.isBuffer(Tt))return Tt.length;if(ArrayBuffer.isView(Tt)||Jt(Tt,ArrayBuffer))return Tt.byteLength;if(typeof Tt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Tt);let Mt=Tt.length,te=arguments.length>2&&arguments[2]===!0;if(!te&&Mt===0)return 0;let ve=!1;for(;;)switch(Lt){case"ascii":case"latin1":case"binary":return Mt;case"utf8":case"utf-8":return wt(Tt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Mt*2;case"hex":return Mt>>>1;case"base64":return Wt(Tt).length;default:if(ve)return te?-1:wt(Tt).length;Lt=(""+Lt).toLowerCase(),ve=!0}}e.byteLength=u;function b(Tt,Lt,Mt){let te=!1;if((Lt===void 0||Lt<0)&&(Lt=0),Lt>this.length||((Mt===void 0||Mt>this.length)&&(Mt=this.length),Mt<=0)||(Mt>>>=0,Lt>>>=0,Mt<=Lt))return"";for(Tt||(Tt="utf8");;)switch(Tt){case"hex":return F(this,Lt,Mt);case"utf8":case"utf-8":return R(this,Lt,Mt);case"ascii":return V(this,Lt,Mt);case"latin1":case"binary":return H(this,Lt,Mt);case"base64":return w(this,Lt,Mt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,Lt,Mt);default:if(te)throw new TypeError("Unknown encoding: "+Tt);Tt=(Tt+"").toLowerCase(),te=!0}}e.prototype._isBuffer=!0;function _(Tt,Lt,Mt){let te=Tt[Lt];Tt[Lt]=Tt[Mt],Tt[Mt]=te}e.prototype.swap16=function(){let Tt=this.length;if(Tt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Lt=0;LtLt&&(Tt+=" ... "),""},g&&(e.prototype[g]=e.prototype.inspect),e.prototype.compare=function(Tt,Lt,Mt,te,ve){if(Jt(Tt,Uint8Array)&&(Tt=e.from(Tt,Tt.offset,Tt.byteLength)),!e.isBuffer(Tt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Tt);if(Lt===void 0&&(Lt=0),Mt===void 0&&(Mt=Tt?Tt.length:0),te===void 0&&(te=0),ve===void 0&&(ve=this.length),Lt<0||Mt>Tt.length||te<0||ve>this.length)throw new RangeError("out of range index");if(te>=ve&&Lt>=Mt)return 0;if(te>=ve)return-1;if(Lt>=Mt)return 1;if(Lt>>>=0,Mt>>>=0,te>>>=0,ve>>>=0,this===Tt)return 0;let oe=ve-te,Te=Mt-Lt,He=Math.min(oe,Te),Ge=this.slice(te,ve),cr=Tt.slice(Lt,Mt);for(let ur=0;ur2147483647?Mt=2147483647:Mt<-2147483648&&(Mt=-2147483648),Mt=+Mt,ge(Mt)&&(Mt=ve?0:Tt.length-1),Mt<0&&(Mt=Tt.length+Mt),Mt>=Tt.length){if(ve)return-1;Mt=Tt.length-1}else if(Mt<0)if(ve)Mt=0;else return-1;if(typeof Lt=="string"&&(Lt=e.from(Lt,te)),e.isBuffer(Lt))return Lt.length===0?-1:M(Tt,Lt,Mt,te,ve);if(typeof Lt=="number")return Lt=Lt&255,typeof Uint8Array.prototype.indexOf=="function"?ve?Uint8Array.prototype.indexOf.call(Tt,Lt,Mt):Uint8Array.prototype.lastIndexOf.call(Tt,Lt,Mt):M(Tt,[Lt],Mt,te,ve);throw new TypeError("val must be string, number or Buffer")}function M(Tt,Lt,Mt,te,ve){let oe=1,Te=Tt.length,He=Lt.length;if(te!==void 0&&(te=String(te).toLowerCase(),te==="ucs2"||te==="ucs-2"||te==="utf16le"||te==="utf-16le")){if(Tt.length<2||Lt.length<2)return-1;oe=2,Te/=2,He/=2,Mt/=2}function Ge(ur,jr){return oe===1?ur[jr]:ur.readUInt16BE(jr*oe)}let cr;if(ve){let ur=-1;for(cr=Mt;crTe&&(Mt=Te-He),cr=Mt;cr>=0;cr--){let ur=!0;for(let jr=0;jrve&&(te=ve)):te=ve;let oe=Lt.length;te>oe/2&&(te=oe/2);let Te;for(Te=0;Te>>0,isFinite(Mt)?(Mt=Mt>>>0,te===void 0&&(te="utf8")):(te=Mt,Mt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let ve=this.length-Lt;if((Mt===void 0||Mt>ve)&&(Mt=ve),Tt.length>0&&(Mt<0||Lt<0)||Lt>this.length)throw new RangeError("Attempt to write outside buffer bounds");te||(te="utf8");let oe=!1;for(;;)switch(te){case"hex":return E(this,Tt,Lt,Mt);case"utf8":case"utf-8":return A(this,Tt,Lt,Mt);case"ascii":case"latin1":case"binary":return h(this,Tt,Lt,Mt);case"base64":return p(this,Tt,Lt,Mt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,Tt,Lt,Mt);default:if(oe)throw new TypeError("Unknown encoding: "+te);te=(""+te).toLowerCase(),oe=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function w(Tt,Lt,Mt){return Lt===0&&Mt===Tt.length?$.fromByteArray(Tt):$.fromByteArray(Tt.slice(Lt,Mt))}function R(Tt,Lt,Mt){Mt=Math.min(Tt.length,Mt);let te=[],ve=Lt;for(;ve239?4:oe>223?3:oe>191?2:1;if(ve+He<=Mt){let Ge,cr,ur,jr;switch(He){case 1:oe<128&&(Te=oe);break;case 2:Ge=Tt[ve+1],(Ge&192)===128&&(jr=(oe&31)<<6|Ge&63,jr>127&&(Te=jr));break;case 3:Ge=Tt[ve+1],cr=Tt[ve+2],(Ge&192)===128&&(cr&192)===128&&(jr=(oe&15)<<12|(Ge&63)<<6|cr&63,jr>2047&&(jr<55296||jr>57343)&&(Te=jr));break;case 4:Ge=Tt[ve+1],cr=Tt[ve+2],ur=Tt[ve+3],(Ge&192)===128&&(cr&192)===128&&(ur&192)===128&&(jr=(oe&15)<<18|(Ge&63)<<12|(cr&63)<<6|ur&63,jr>65535&&jr<1114112&&(Te=jr))}}Te===null?(Te=65533,He=1):Te>65535&&(Te-=65536,te.push(Te>>>10&1023|55296),Te=56320|Te&1023),te.push(Te),ve+=He}return N(te)}var O=4096;function N(Tt){let Lt=Tt.length;if(Lt<=O)return String.fromCharCode.apply(String,Tt);let Mt="",te=0;for(;tete)&&(Mt=te);let ve="";for(let oe=Lt;oeMt&&(Tt=Mt),Lt<0?(Lt+=Mt,Lt<0&&(Lt=0)):Lt>Mt&&(Lt=Mt),LtMt)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(Tt,Lt,Mt){Tt=Tt>>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let te=this[Tt],ve=1,oe=0;for(;++oe>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let te=this[Tt+--Lt],ve=1;for(;Lt>0&&(ve*=256);)te+=this[Tt+--Lt]*ve;return te},e.prototype.readUint8=e.prototype.readUInt8=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,1,this.length),this[Tt]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,2,this.length),this[Tt]|this[Tt+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,2,this.length),this[Tt]<<8|this[Tt+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),(this[Tt]|this[Tt+1]<<8|this[Tt+2]<<16)+this[Tt+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),this[Tt]*16777216+(this[Tt+1]<<16|this[Tt+2]<<8|this[Tt+3])},e.prototype.readBigUInt64LE=de(function(Tt){Tt=Tt>>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&Y(Tt,this.length-8);let te=Lt+this[++Tt]*2**8+this[++Tt]*2**16+this[++Tt]*2**24,ve=this[++Tt]+this[++Tt]*2**8+this[++Tt]*2**16+Mt*2**24;return BigInt(te)+(BigInt(ve)<>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&Y(Tt,this.length-8);let te=Lt*2**24+this[++Tt]*2**16+this[++Tt]*2**8+this[++Tt],ve=this[++Tt]*2**24+this[++Tt]*2**16+this[++Tt]*2**8+Mt;return(BigInt(te)<>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let te=this[Tt],ve=1,oe=0;for(;++oe=ve&&(te-=Math.pow(2,8*Lt)),te},e.prototype.readIntBE=function(Tt,Lt,Mt){Tt=Tt>>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let te=Lt,ve=1,oe=this[Tt+--te];for(;te>0&&(ve*=256);)oe+=this[Tt+--te]*ve;return ve*=128,oe>=ve&&(oe-=Math.pow(2,8*Lt)),oe},e.prototype.readInt8=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,1,this.length),this[Tt]&128?(255-this[Tt]+1)*-1:this[Tt]},e.prototype.readInt16LE=function(Tt,Lt){Tt=Tt>>>0,Lt||W(Tt,2,this.length);let Mt=this[Tt]|this[Tt+1]<<8;return Mt&32768?Mt|4294901760:Mt},e.prototype.readInt16BE=function(Tt,Lt){Tt=Tt>>>0,Lt||W(Tt,2,this.length);let Mt=this[Tt+1]|this[Tt]<<8;return Mt&32768?Mt|4294901760:Mt},e.prototype.readInt32LE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),this[Tt]|this[Tt+1]<<8|this[Tt+2]<<16|this[Tt+3]<<24},e.prototype.readInt32BE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),this[Tt]<<24|this[Tt+1]<<16|this[Tt+2]<<8|this[Tt+3]},e.prototype.readBigInt64LE=de(function(Tt){Tt=Tt>>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&Y(Tt,this.length-8);let te=this[Tt+4]+this[Tt+5]*2**8+this[Tt+6]*2**16+(Mt<<24);return(BigInt(te)<>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&Y(Tt,this.length-8);let te=(Lt<<24)+this[++Tt]*2**16+this[++Tt]*2**8+this[++Tt];return(BigInt(te)<>>0,Lt||W(Tt,4,this.length),c.read(this,Tt,!0,23,4)},e.prototype.readFloatBE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),c.read(this,Tt,!1,23,4)},e.prototype.readDoubleLE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,8,this.length),c.read(this,Tt,!0,52,8)},e.prototype.readDoubleBE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,8,this.length),c.read(this,Tt,!1,52,8)};function q(Tt,Lt,Mt,te,ve,oe){if(!e.isBuffer(Tt))throw new TypeError('"buffer" argument must be a Buffer instance');if(Lt>ve||LtTt.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(Tt,Lt,Mt,te){if(Tt=+Tt,Lt=Lt>>>0,Mt=Mt>>>0,!te){let Te=Math.pow(2,8*Mt)-1;q(this,Tt,Lt,Mt,Te,0)}let ve=1,oe=0;for(this[Lt]=Tt&255;++oe>>0,Mt=Mt>>>0,!te){let Te=Math.pow(2,8*Mt)-1;q(this,Tt,Lt,Mt,Te,0)}let ve=Mt-1,oe=1;for(this[Lt+ve]=Tt&255;--ve>=0&&(oe*=256);)this[Lt+ve]=Tt/oe&255;return Lt+Mt},e.prototype.writeUint8=e.prototype.writeUInt8=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,1,255,0),this[Lt]=Tt&255,Lt+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,65535,0),this[Lt]=Tt&255,this[Lt+1]=Tt>>>8,Lt+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,65535,0),this[Lt]=Tt>>>8,this[Lt+1]=Tt&255,Lt+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,4294967295,0),this[Lt+3]=Tt>>>24,this[Lt+2]=Tt>>>16,this[Lt+1]=Tt>>>8,this[Lt]=Tt&255,Lt+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,4294967295,0),this[Lt]=Tt>>>24,this[Lt+1]=Tt>>>16,this[Lt+2]=Tt>>>8,this[Lt+3]=Tt&255,Lt+4};function X(Tt,Lt,Mt,te,ve){vt(Lt,te,ve,Tt,Mt,7);let oe=Number(Lt&BigInt(4294967295));Tt[Mt++]=oe,oe=oe>>8,Tt[Mt++]=oe,oe=oe>>8,Tt[Mt++]=oe,oe=oe>>8,Tt[Mt++]=oe;let Te=Number(Lt>>BigInt(32)&BigInt(4294967295));return Tt[Mt++]=Te,Te=Te>>8,Tt[Mt++]=Te,Te=Te>>8,Tt[Mt++]=Te,Te=Te>>8,Tt[Mt++]=Te,Mt}function lt(Tt,Lt,Mt,te,ve){vt(Lt,te,ve,Tt,Mt,7);let oe=Number(Lt&BigInt(4294967295));Tt[Mt+7]=oe,oe=oe>>8,Tt[Mt+6]=oe,oe=oe>>8,Tt[Mt+5]=oe,oe=oe>>8,Tt[Mt+4]=oe;let Te=Number(Lt>>BigInt(32)&BigInt(4294967295));return Tt[Mt+3]=Te,Te=Te>>8,Tt[Mt+2]=Te,Te=Te>>8,Tt[Mt+1]=Te,Te=Te>>8,Tt[Mt]=Te,Mt+8}e.prototype.writeBigUInt64LE=de(function(Tt,Lt=0){return X(this,Tt,Lt,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=de(function(Tt,Lt=0){return lt(this,Tt,Lt,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(Tt,Lt,Mt,te){if(Tt=+Tt,Lt=Lt>>>0,!te){let He=Math.pow(2,8*Mt-1);q(this,Tt,Lt,Mt,He-1,-He)}let ve=0,oe=1,Te=0;for(this[Lt]=Tt&255;++ve>0)-Te&255;return Lt+Mt},e.prototype.writeIntBE=function(Tt,Lt,Mt,te){if(Tt=+Tt,Lt=Lt>>>0,!te){let He=Math.pow(2,8*Mt-1);q(this,Tt,Lt,Mt,He-1,-He)}let ve=Mt-1,oe=1,Te=0;for(this[Lt+ve]=Tt&255;--ve>=0&&(oe*=256);)Tt<0&&Te===0&&this[Lt+ve+1]!==0&&(Te=1),this[Lt+ve]=(Tt/oe>>0)-Te&255;return Lt+Mt},e.prototype.writeInt8=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,1,127,-128),Tt<0&&(Tt=255+Tt+1),this[Lt]=Tt&255,Lt+1},e.prototype.writeInt16LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,32767,-32768),this[Lt]=Tt&255,this[Lt+1]=Tt>>>8,Lt+2},e.prototype.writeInt16BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,32767,-32768),this[Lt]=Tt>>>8,this[Lt+1]=Tt&255,Lt+2},e.prototype.writeInt32LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,2147483647,-2147483648),this[Lt]=Tt&255,this[Lt+1]=Tt>>>8,this[Lt+2]=Tt>>>16,this[Lt+3]=Tt>>>24,Lt+4},e.prototype.writeInt32BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,2147483647,-2147483648),Tt<0&&(Tt=4294967295+Tt+1),this[Lt]=Tt>>>24,this[Lt+1]=Tt>>>16,this[Lt+2]=Tt>>>8,this[Lt+3]=Tt&255,Lt+4},e.prototype.writeBigInt64LE=de(function(Tt,Lt=0){return X(this,Tt,Lt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=de(function(Tt,Lt=0){return lt(this,Tt,Lt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function yt(Tt,Lt,Mt,te,ve,oe){if(Mt+te>Tt.length)throw new RangeError("Index out of range");if(Mt<0)throw new RangeError("Index out of range")}function pt(Tt,Lt,Mt,te,ve){return Lt=+Lt,Mt=Mt>>>0,ve||yt(Tt,Lt,Mt,4),c.write(Tt,Lt,Mt,te,23,4),Mt+4}e.prototype.writeFloatLE=function(Tt,Lt,Mt){return pt(this,Tt,Lt,!0,Mt)},e.prototype.writeFloatBE=function(Tt,Lt,Mt){return pt(this,Tt,Lt,!1,Mt)};function st(Tt,Lt,Mt,te,ve){return Lt=+Lt,Mt=Mt>>>0,ve||yt(Tt,Lt,Mt,8),c.write(Tt,Lt,Mt,te,52,8),Mt+8}e.prototype.writeDoubleLE=function(Tt,Lt,Mt){return st(this,Tt,Lt,!0,Mt)},e.prototype.writeDoubleBE=function(Tt,Lt,Mt){return st(this,Tt,Lt,!1,Mt)},e.prototype.copy=function(Tt,Lt,Mt,te){if(!e.isBuffer(Tt))throw new TypeError("argument should be a Buffer");if(Mt||(Mt=0),!te&&te!==0&&(te=this.length),Lt>=Tt.length&&(Lt=Tt.length),Lt||(Lt=0),te>0&&te=this.length)throw new RangeError("Index out of range");if(te<0)throw new RangeError("sourceEnd out of bounds");te>this.length&&(te=this.length),Tt.length-Lt>>0,Mt=Mt===void 0?this.length:Mt>>>0,Tt||(Tt=0);let ve;if(typeof Tt=="number")for(ve=Lt;ve2**32?ve=rt(String(Mt)):typeof Mt=="bigint"&&(ve=String(Mt),(Mt>BigInt(2)**BigInt(32)||Mt<-(BigInt(2)**BigInt(32)))&&(ve=rt(ve)),ve+="n"),te+=` It must be ${Lt}. Received ${ve}`,te},RangeError);function rt(Tt){let Lt="",Mt=Tt.length,te=Tt[0]==="-"?1:0;for(;Mt>=te+4;Mt-=3)Lt=`_${Tt.slice(Mt-3,Mt)}${Lt}`;return`${Tt.slice(0,Mt)}${Lt}`}function at(Tt,Lt,Mt){it(Lt,"offset"),(Tt[Lt]===void 0||Tt[Lt+Mt]===void 0)&&Y(Lt,Tt.length-(Mt+1))}function vt(Tt,Lt,Mt,te,ve,oe){if(Tt>Mt||Tt= 0${Te} and < 2${Te} ** ${(oe+1)*8}${Te}`:He=`>= -(2${Te} ** ${(oe+1)*8-1}${Te}) and < 2 ** ${(oe+1)*8-1}${Te}`,new tt.ERR_OUT_OF_RANGE("value",He,Tt)}at(te,ve,oe)}function it(Tt,Lt){if(typeof Tt!="number")throw new tt.ERR_INVALID_ARG_TYPE(Lt,"number",Tt)}function Y(Tt,Lt,Mt){throw Math.floor(Tt)!==Tt?(it(Tt,Mt),new tt.ERR_OUT_OF_RANGE("offset","an integer",Tt)):Lt<0?new tt.ERR_BUFFER_OUT_OF_BOUNDS:new tt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Lt}`,Tt)}var ft=/[^+/0-9A-Za-z-_]/g;function ut(Tt){if(Tt=Tt.split("=")[0],Tt=Tt.trim().replace(ft,""),Tt.length<2)return"";for(;Tt.length%4!==0;)Tt=Tt+"=";return Tt}function wt(Tt,Lt){Lt=Lt||1/0;let Mt,te=Tt.length,ve=null,oe=[];for(let Te=0;Te55295&&Mt<57344){if(!ve){if(Mt>56319){(Lt-=3)>-1&&oe.push(239,191,189);continue}else if(Te+1===te){(Lt-=3)>-1&&oe.push(239,191,189);continue}ve=Mt;continue}if(Mt<56320){(Lt-=3)>-1&&oe.push(239,191,189),ve=Mt;continue}Mt=(ve-55296<<10|Mt-56320)+65536}else ve&&(Lt-=3)>-1&&oe.push(239,191,189);if(ve=null,Mt<128){if((Lt-=1)<0)break;oe.push(Mt)}else if(Mt<2048){if((Lt-=2)<0)break;oe.push(Mt>>6|192,Mt&63|128)}else if(Mt<65536){if((Lt-=3)<0)break;oe.push(Mt>>12|224,Mt>>6&63|128,Mt&63|128)}else if(Mt<1114112){if((Lt-=4)<0)break;oe.push(Mt>>18|240,Mt>>12&63|128,Mt>>6&63|128,Mt&63|128)}else throw new Error("Invalid code point")}return oe}function zt(Tt){let Lt=[];for(let Mt=0;Mt>8,ve=Mt%256,oe.push(ve),oe.push(te);return oe}function Wt(Tt){return $.toByteArray(ut(Tt))}function Ht(Tt,Lt,Mt,te){let ve;for(ve=0;ve=Lt.length||ve>=Tt.length);++ve)Lt[ve+Mt]=Tt[ve];return ve}function Jt(Tt,Lt){return Tt instanceof Lt||Tt!=null&&Tt.constructor!=null&&Tt.constructor.name!=null&&Tt.constructor.name===Lt.name}function ge(Tt){return Tt!==Tt}var he=function(){let Tt="0123456789abcdef",Lt=new Array(256);for(let Mt=0;Mt<16;++Mt){let te=Mt*16;for(let ve=0;ve<16;++ve)Lt[te+ve]=Tt[Mt]+Tt[ve]}return Lt}();function de(Tt){return typeof BigInt>"u"?se:Tt}function se(){throw new Error("BigInt not supported")}}),rk=Ft((Q,$)=>{$.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var c={},g=Symbol("test"),P=Object(g);if(typeof g=="string"||Object.prototype.toString.call(g)!=="[object Symbol]"||Object.prototype.toString.call(P)!=="[object Symbol]")return!1;var S=42;c[g]=S;for(var t in c)return!1;if(typeof Object.keys=="function"&&Object.keys(c).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(c).length!==0)return!1;var e=Object.getOwnPropertySymbols(c);if(e.length!==1||e[0]!==g||!Object.prototype.propertyIsEnumerable.call(c,g))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var r=Object.getOwnPropertyDescriptor(c,g);if(r.value!==S||r.enumerable!==!0)return!1}return!0}}),qw=Ft((Q,$)=>{var c=rk();$.exports=function(){return c()&&!!Symbol.toStringTag}}),x7=Ft((Q,$)=>{$.exports=Object}),JR=Ft((Q,$)=>{$.exports=Error}),QR=Ft((Q,$)=>{$.exports=EvalError}),tB=Ft((Q,$)=>{$.exports=RangeError}),eB=Ft((Q,$)=>{$.exports=ReferenceError}),_7=Ft((Q,$)=>{$.exports=SyntaxError}),tb=Ft((Q,$)=>{$.exports=TypeError}),rB=Ft((Q,$)=>{$.exports=URIError}),nB=Ft((Q,$)=>{$.exports=Math.abs}),iB=Ft((Q,$)=>{$.exports=Math.floor}),aB=Ft((Q,$)=>{$.exports=Math.max}),oB=Ft((Q,$)=>{$.exports=Math.min}),sB=Ft((Q,$)=>{$.exports=Math.pow}),lB=Ft((Q,$)=>{$.exports=Math.round}),uB=Ft((Q,$)=>{$.exports=Number.isNaN||function(c){return c!==c}}),cB=Ft((Q,$)=>{var c=uB();$.exports=function(g){return c(g)||g===0?g:g<0?-1:1}}),hB=Ft((Q,$)=>{$.exports=Object.getOwnPropertyDescriptor}),ex=Ft((Q,$)=>{var c=hB();if(c)try{c([],"length")}catch{c=null}$.exports=c}),Zw=Ft((Q,$)=>{var c=Object.defineProperty||!1;if(c)try{c({},"a",{value:1})}catch{c=!1}$.exports=c}),fB=Ft((Q,$)=>{var c=typeof Symbol<"u"&&Symbol,g=rk();$.exports=function(){return typeof c!="function"||typeof Symbol!="function"||typeof c("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:g()}}),b7=Ft((Q,$)=>{$.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}),w7=Ft((Q,$)=>{var c=x7();$.exports=c.getPrototypeOf||null}),dB=Ft((Q,$)=>{var c="Function.prototype.bind called on incompatible ",g=Object.prototype.toString,P=Math.max,S="[object Function]",t=function(a,n){for(var o=[],i=0;i{var c=dB();$.exports=Function.prototype.bind||c}),nk=Ft((Q,$)=>{$.exports=Function.prototype.call}),k7=Ft((Q,$)=>{$.exports=Function.prototype.apply}),pB=Ft((Q,$)=>{$.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}),mB=Ft((Q,$)=>{var c=eb(),g=k7(),P=nk(),S=pB();$.exports=S||c.call(P,g)}),gB=Ft((Q,$)=>{var c=eb(),g=tb(),P=nk(),S=mB();$.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new g("a function is required");return S(c,P,t)}}),vB=Ft((Q,$)=>{var c=gB(),g=ex(),P;try{P=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var S=!!P&&g&&g(Object.prototype,"__proto__"),t=Object,e=t.getPrototypeOf;$.exports=S&&typeof S.get=="function"?c([S.get]):typeof e=="function"?function(r){return e(r==null?r:t(r))}:!1}),yB=Ft((Q,$)=>{var c=b7(),g=w7(),P=vB();$.exports=c?function(S){return c(S)}:g?function(S){if(!S||typeof S!="object"&&typeof S!="function")throw new TypeError("getProto: not an object");return g(S)}:P?function(S){return P(S)}:null}),xB=Ft((Q,$)=>{var c=Function.prototype.call,g=Object.prototype.hasOwnProperty,P=eb();$.exports=P.call(c,g)}),ik=Ft((Q,$)=>{var c,g=x7(),P=JR(),S=QR(),t=tB(),e=eB(),r=_7(),a=tb(),n=rB(),o=nB(),i=iB(),s=aB(),f=oB(),x=sB(),y=lB(),v=cB(),T=Function,u=function(at){try{return T('"use strict"; return ('+at+").constructor;")()}catch{}},b=ex(),_=Zw(),C=function(){throw new a},M=b?function(){try{return arguments.callee,C}catch{try{return b(arguments,"callee").get}catch{return C}}}():C,E=fB()(),A=yB(),h=w7(),p=b7(),k=k7(),w=nk(),R={},O=typeof Uint8Array>"u"||!A?c:A(Uint8Array),N={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?c:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?c:ArrayBuffer,"%ArrayIteratorPrototype%":E&&A?A([][Symbol.iterator]()):c,"%AsyncFromSyncIteratorPrototype%":c,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%Atomics%":typeof Atomics>"u"?c:Atomics,"%BigInt%":typeof BigInt>"u"?c:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?c:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?c:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?c:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":P,"%eval%":eval,"%EvalError%":S,"%Float16Array%":typeof Float16Array>"u"?c:Float16Array,"%Float32Array%":typeof Float32Array>"u"?c:Float32Array,"%Float64Array%":typeof Float64Array>"u"?c:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?c:FinalizationRegistry,"%Function%":T,"%GeneratorFunction%":R,"%Int8Array%":typeof Int8Array>"u"?c:Int8Array,"%Int16Array%":typeof Int16Array>"u"?c:Int16Array,"%Int32Array%":typeof Int32Array>"u"?c:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&A?A(A([][Symbol.iterator]())):c,"%JSON%":typeof JSON=="object"?JSON:c,"%Map%":typeof Map>"u"?c:Map,"%MapIteratorPrototype%":typeof Map>"u"||!E||!A?c:A(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":g,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?c:Promise,"%Proxy%":typeof Proxy>"u"?c:Proxy,"%RangeError%":t,"%ReferenceError%":e,"%Reflect%":typeof Reflect>"u"?c:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?c:Set,"%SetIteratorPrototype%":typeof Set>"u"||!E||!A?c:A(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?c:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&A?A(""[Symbol.iterator]()):c,"%Symbol%":E?Symbol:c,"%SyntaxError%":r,"%ThrowTypeError%":M,"%TypedArray%":O,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?c:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?c:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?c:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?c:Uint32Array,"%URIError%":n,"%WeakMap%":typeof WeakMap>"u"?c:WeakMap,"%WeakRef%":typeof WeakRef>"u"?c:WeakRef,"%WeakSet%":typeof WeakSet>"u"?c:WeakSet,"%Function.prototype.call%":w,"%Function.prototype.apply%":k,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":h,"%Math.abs%":o,"%Math.floor%":i,"%Math.max%":s,"%Math.min%":f,"%Math.pow%":x,"%Math.round%":y,"%Math.sign%":v,"%Reflect.getPrototypeOf%":p};if(A)try{null.error}catch(at){V=A(A(at)),N["%Error.prototype%"]=V}var V,H=function at(vt){var it;if(vt==="%AsyncFunction%")it=u("async function () {}");else if(vt==="%GeneratorFunction%")it=u("function* () {}");else if(vt==="%AsyncGeneratorFunction%")it=u("async function* () {}");else if(vt==="%AsyncGenerator%"){var Y=at("%AsyncGeneratorFunction%");Y&&(it=Y.prototype)}else if(vt==="%AsyncIteratorPrototype%"){var ft=at("%AsyncGenerator%");ft&&A&&(it=A(ft.prototype))}return N[vt]=it,it},F={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},U=eb(),W=xB(),q=U.call(w,Array.prototype.concat),X=U.call(k,Array.prototype.splice),lt=U.call(w,String.prototype.replace),yt=U.call(w,String.prototype.slice),pt=U.call(w,RegExp.prototype.exec),st=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,tt=/\\(\\)?/g,dt=function(at){var vt=yt(at,0,1),it=yt(at,-1);if(vt==="%"&&it!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(it==="%"&&vt!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var Y=[];return lt(at,st,function(ft,ut,wt,zt){Y[Y.length]=wt?lt(zt,tt,"$1"):ut||ft}),Y},rt=function(at,vt){var it=at,Y;if(W(F,it)&&(Y=F[it],it="%"+Y[0]+"%"),W(N,it)){var ft=N[it];if(ft===R&&(ft=H(it)),typeof ft>"u"&&!vt)throw new a("intrinsic "+at+" exists, but is not available. Please file an issue!");return{alias:Y,name:it,value:ft}}throw new r("intrinsic "+at+" does not exist!")};$.exports=function(at,vt){if(typeof at!="string"||at.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof vt!="boolean")throw new a('"allowMissing" argument must be a boolean');if(pt(/^%?[^%]*%?$/,at)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var it=dt(at),Y=it.length>0?it[0]:"",ft=rt("%"+Y+"%",vt),ut=ft.name,wt=ft.value,zt=!1,Pt=ft.alias;Pt&&(Y=Pt[0],X(it,q([0,1],Pt)));for(var Wt=1,Ht=!0;Wt=it.length){var de=b(wt,Jt);Ht=!!de,Ht&&"get"in de&&!("originalValue"in de.get)?wt=de.get:wt=wt[Jt]}else Ht=W(wt,Jt),wt=wt[Jt];Ht&&!zt&&(N[ut]=wt)}}return wt}}),_B=Ft((Q,$)=>{var c=Zw(),g=_7(),P=tb(),S=ex();$.exports=function(t,e,r){if(!t||typeof t!="object"&&typeof t!="function")throw new P("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new P("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new P("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new P("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new P("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new P("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,i=arguments.length>6?arguments[6]:!1,s=!!S&&S(t,e);if(c)c(t,e,{configurable:o===null&&s?s.configurable:!o,enumerable:a===null&&s?s.enumerable:!a,value:r,writable:n===null&&s?s.writable:!n});else if(i||!a&&!n&&!o)t[e]=r;else throw new g("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}),T7=Ft((Q,$)=>{var c=Zw(),g=function(){return!!c};g.hasArrayLengthDefineBug=function(){if(!c)return null;try{return c([],"length",{value:1}).length!==1}catch{return!0}},$.exports=g}),bB=Ft((Q,$)=>{var c=ik(),g=_B(),P=T7()(),S=ex(),t=tb(),e=c("%Math.floor%");$.exports=function(r,a){if(typeof r!="function")throw new t("`fn` is not a function");if(typeof a!="number"||a<0||a>4294967295||e(a)!==a)throw new t("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in r&&S){var s=S(r,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!n)&&(P?g(r,"length",a,!0,!0):g(r,"length",a)),r}}),$w=Ft((Q,$)=>{var c=eb(),g=ik(),P=bB(),S=tb(),t=g("%Function.prototype.apply%"),e=g("%Function.prototype.call%"),r=g("%Reflect.apply%",!0)||c.call(e,t),a=Zw(),n=g("%Math.max%");$.exports=function(i){if(typeof i!="function")throw new S("a function is required");var s=r(c,e,arguments);return P(s,1+n(0,i.length-(arguments.length-1)),!0)};var o=function(){return r(c,t,arguments)};a?a($.exports,"apply",{value:o}):$.exports.apply=o}),rb=Ft((Q,$)=>{var c=ik(),g=$w(),P=g(c("String.prototype.indexOf"));$.exports=function(S,t){var e=c(S,!!t);return typeof e=="function"&&P(S,".prototype.")>-1?g(e):e}}),wB=Ft((Q,$)=>{var c=qw()(),g=rb(),P=g("Object.prototype.toString"),S=function(r){return c&&r&&typeof r=="object"&&Symbol.toStringTag in r?!1:P(r)==="[object Arguments]"},t=function(r){return S(r)?!0:r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&P(r)!=="[object Array]"&&P(r.callee)==="[object Function]"},e=function(){return S(arguments)}();S.isLegacyArguments=t,$.exports=e?S:t}),kB=Ft((Q,$)=>{var c=Object.prototype.toString,g=Function.prototype.toString,P=/^\s*(?:function)?\*/,S=qw()(),t=Object.getPrototypeOf,e=function(){if(!S)return!1;try{return Function("return function*() {}")()}catch{}},r;$.exports=function(a){if(typeof a!="function")return!1;if(P.test(g.call(a)))return!0;if(!S){var n=c.call(a);return n==="[object GeneratorFunction]"}if(!t)return!1;if(typeof r>"u"){var o=e();r=o?t(o):!1}return t(a)===r}}),TB=Ft((Q,$)=>{var c=Function.prototype.toString,g=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,P,S;if(typeof g=="function"&&typeof Object.defineProperty=="function")try{P=Object.defineProperty({},"length",{get:function(){throw S}}),S={},g(function(){throw 42},null,P)}catch(b){b!==S&&(g=null)}else g=null;var t=/^\s*class\b/,e=function(b){try{var _=c.call(b);return t.test(_)}catch{return!1}},r=function(b){try{return e(b)?!1:(c.call(b),!0)}catch{return!1}},a=Object.prototype.toString,n="[object Object]",o="[object Function]",i="[object GeneratorFunction]",s="[object HTMLAllCollection]",f="[object HTML document.all class]",x="[object HTMLCollection]",y=typeof Symbol=="function"&&!!Symbol.toStringTag,v=!(0 in[,]),T=function(){return!1};typeof document=="object"&&(u=document.all,a.call(u)===a.call(document.all)&&(T=function(b){if((v||!b)&&(typeof b>"u"||typeof b=="object"))try{var _=a.call(b);return(_===s||_===f||_===x||_===n)&&b("")==null}catch{}return!1}));var u;$.exports=g?function(b){if(T(b))return!0;if(!b||typeof b!="function"&&typeof b!="object")return!1;try{g(b,null,P)}catch(_){if(_!==S)return!1}return!e(b)&&r(b)}:function(b){if(T(b))return!0;if(!b||typeof b!="function"&&typeof b!="object")return!1;if(y)return r(b);if(e(b))return!1;var _=a.call(b);return _!==o&&_!==i&&!/^\[object HTML/.test(_)?!1:r(b)}}),A7=Ft((Q,$)=>{var c=TB(),g=Object.prototype.toString,P=Object.prototype.hasOwnProperty,S=function(a,n,o){for(var i=0,s=a.length;i=3&&(i=o),g.call(a)==="[object Array]"?S(a,n,i):typeof a=="string"?t(a,n,i):e(a,n,i)};$.exports=r}),M7=Ft((Q,$)=>{var c=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],g=typeof globalThis>"u"?window:globalThis;$.exports=function(){for(var P=[],S=0;S{var c=A7(),g=M7(),P=$w(),S=rb(),t=ex(),e=S("Object.prototype.toString"),r=qw()(),a=typeof globalThis>"u"?window:globalThis,n=g(),o=S("String.prototype.slice"),i=Object.getPrototypeOf,s=S("Array.prototype.indexOf",!0)||function(v,T){for(var u=0;u-1?T:T!=="Object"?!1:y(v)}return t?x(v):null}}),MB=Ft((Q,$)=>{var c=A7(),g=M7(),P=rb(),S=P("Object.prototype.toString"),t=qw()(),e=ex(),r=typeof globalThis>"u"?window:globalThis,a=g(),n=P("Array.prototype.indexOf",!0)||function(x,y){for(var v=0;v-1}return e?f(x):!1}}),S7=Ft(Q=>{var $=wB(),c=kB(),g=AB(),P=MB();function S(Pt){return Pt.call.bind(Pt)}var t=typeof BigInt<"u",e=typeof Symbol<"u",r=S(Object.prototype.toString),a=S(Number.prototype.valueOf),n=S(String.prototype.valueOf),o=S(Boolean.prototype.valueOf);t&&(i=S(BigInt.prototype.valueOf));var i;e&&(s=S(Symbol.prototype.valueOf));var s;function f(Pt,Wt){if(typeof Pt!="object")return!1;try{return Wt(Pt),!0}catch{return!1}}Q.isArgumentsObject=$,Q.isGeneratorFunction=c,Q.isTypedArray=P;function x(Pt){return typeof Promise<"u"&&Pt instanceof Promise||Pt!==null&&typeof Pt=="object"&&typeof Pt.then=="function"&&typeof Pt.catch=="function"}Q.isPromise=x;function y(Pt){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Pt):P(Pt)||X(Pt)}Q.isArrayBufferView=y;function v(Pt){return g(Pt)==="Uint8Array"}Q.isUint8Array=v;function T(Pt){return g(Pt)==="Uint8ClampedArray"}Q.isUint8ClampedArray=T;function u(Pt){return g(Pt)==="Uint16Array"}Q.isUint16Array=u;function b(Pt){return g(Pt)==="Uint32Array"}Q.isUint32Array=b;function _(Pt){return g(Pt)==="Int8Array"}Q.isInt8Array=_;function C(Pt){return g(Pt)==="Int16Array"}Q.isInt16Array=C;function M(Pt){return g(Pt)==="Int32Array"}Q.isInt32Array=M;function E(Pt){return g(Pt)==="Float32Array"}Q.isFloat32Array=E;function A(Pt){return g(Pt)==="Float64Array"}Q.isFloat64Array=A;function h(Pt){return g(Pt)==="BigInt64Array"}Q.isBigInt64Array=h;function p(Pt){return g(Pt)==="BigUint64Array"}Q.isBigUint64Array=p;function k(Pt){return r(Pt)==="[object Map]"}k.working=typeof Map<"u"&&k(new Map);function w(Pt){return typeof Map>"u"?!1:k.working?k(Pt):Pt instanceof Map}Q.isMap=w;function R(Pt){return r(Pt)==="[object Set]"}R.working=typeof Set<"u"&&R(new Set);function O(Pt){return typeof Set>"u"?!1:R.working?R(Pt):Pt instanceof Set}Q.isSet=O;function N(Pt){return r(Pt)==="[object WeakMap]"}N.working=typeof WeakMap<"u"&&N(new WeakMap);function V(Pt){return typeof WeakMap>"u"?!1:N.working?N(Pt):Pt instanceof WeakMap}Q.isWeakMap=V;function H(Pt){return r(Pt)==="[object WeakSet]"}H.working=typeof WeakSet<"u"&&H(new WeakSet);function F(Pt){return H(Pt)}Q.isWeakSet=F;function U(Pt){return r(Pt)==="[object ArrayBuffer]"}U.working=typeof ArrayBuffer<"u"&&U(new ArrayBuffer);function W(Pt){return typeof ArrayBuffer>"u"?!1:U.working?U(Pt):Pt instanceof ArrayBuffer}Q.isArrayBuffer=W;function q(Pt){return r(Pt)==="[object DataView]"}q.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&q(new DataView(new ArrayBuffer(1),0,1));function X(Pt){return typeof DataView>"u"?!1:q.working?q(Pt):Pt instanceof DataView}Q.isDataView=X;var lt=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function yt(Pt){return r(Pt)==="[object SharedArrayBuffer]"}function pt(Pt){return typeof lt>"u"?!1:(typeof yt.working>"u"&&(yt.working=yt(new lt)),yt.working?yt(Pt):Pt instanceof lt)}Q.isSharedArrayBuffer=pt;function st(Pt){return r(Pt)==="[object AsyncFunction]"}Q.isAsyncFunction=st;function tt(Pt){return r(Pt)==="[object Map Iterator]"}Q.isMapIterator=tt;function dt(Pt){return r(Pt)==="[object Set Iterator]"}Q.isSetIterator=dt;function rt(Pt){return r(Pt)==="[object Generator]"}Q.isGeneratorObject=rt;function at(Pt){return r(Pt)==="[object WebAssembly.Module]"}Q.isWebAssemblyCompiledModule=at;function vt(Pt){return f(Pt,a)}Q.isNumberObject=vt;function it(Pt){return f(Pt,n)}Q.isStringObject=it;function Y(Pt){return f(Pt,o)}Q.isBooleanObject=Y;function ft(Pt){return t&&f(Pt,i)}Q.isBigIntObject=ft;function ut(Pt){return e&&f(Pt,s)}Q.isSymbolObject=ut;function wt(Pt){return vt(Pt)||it(Pt)||Y(Pt)||ft(Pt)||ut(Pt)}Q.isBoxedPrimitive=wt;function zt(Pt){return typeof Uint8Array<"u"&&(W(Pt)||pt(Pt))}Q.isAnyArrayBuffer=zt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Pt){Object.defineProperty(Q,Pt,{enumerable:!1,value:function(){throw new Error(Pt+" is not supported in userland")}})})}),E7=Ft((Q,$)=>{$.exports=function(c){return c&&typeof c=="object"&&typeof c.copy=="function"&&typeof c.fill=="function"&&typeof c.readUInt8=="function"}}),C7=Ft(Q=>{var $=Object.getOwnPropertyDescriptors||function(q){for(var X=Object.keys(q),lt={},yt=0;yt=pt)return rt;switch(rt){case"%s":return String(yt[lt++]);case"%d":return Number(yt[lt++]);case"%j":try{return JSON.stringify(yt[lt++])}catch{return"[Circular]"}default:return rt}}),tt=yt[lt];lt"u")return function(){return Q.deprecate(q,X).apply(this,arguments)};var lt=!1;function yt(){if(!lt){if(process.throwDeprecation)throw new Error(X);process.traceDeprecation?console.trace(X):console.error(X),lt=!0}return q.apply(this,arguments)}return yt};var g={},P=/^$/;S="false",S=S.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),P=new RegExp("^"+S+"$","i");var S;Q.debuglog=function(q){if(q=q.toUpperCase(),!g[q])if(P.test(q)){var X=process.pid;g[q]=function(){var lt=Q.format.apply(Q,arguments);console.error("%s %d: %s",q,X,lt)}}else g[q]=function(){};return g[q]};function t(q,X){var lt={seen:[],stylize:r};return arguments.length>=3&&(lt.depth=arguments[2]),arguments.length>=4&&(lt.colors=arguments[3]),v(X)?lt.showHidden=X:X&&Q._extend(lt,X),M(lt.showHidden)&&(lt.showHidden=!1),M(lt.depth)&&(lt.depth=2),M(lt.colors)&&(lt.colors=!1),M(lt.customInspect)&&(lt.customInspect=!0),lt.colors&&(lt.stylize=e),n(lt,q,lt.depth)}Q.inspect=t,t.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},t.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(q,X){var lt=t.styles[X];return lt?"\x1B["+t.colors[lt][0]+"m"+q+"\x1B["+t.colors[lt][1]+"m":q}function r(q,X){return q}function a(q){var X={};return q.forEach(function(lt,yt){X[lt]=!0}),X}function n(q,X,lt){if(q.customInspect&&X&&k(X.inspect)&&X.inspect!==Q.inspect&&!(X.constructor&&X.constructor.prototype===X)){var yt=X.inspect(lt,q);return _(yt)||(yt=n(q,yt,lt)),yt}var pt=o(q,X);if(pt)return pt;var st=Object.keys(X),tt=a(st);if(q.showHidden&&(st=Object.getOwnPropertyNames(X)),p(X)&&(st.indexOf("message")>=0||st.indexOf("description")>=0))return i(X);if(st.length===0){if(k(X)){var dt=X.name?": "+X.name:"";return q.stylize("[Function"+dt+"]","special")}if(E(X))return q.stylize(RegExp.prototype.toString.call(X),"regexp");if(h(X))return q.stylize(Date.prototype.toString.call(X),"date");if(p(X))return i(X)}var rt="",at=!1,vt=["{","}"];if(y(X)&&(at=!0,vt=["[","]"]),k(X)){var it=X.name?": "+X.name:"";rt=" [Function"+it+"]"}if(E(X)&&(rt=" "+RegExp.prototype.toString.call(X)),h(X)&&(rt=" "+Date.prototype.toUTCString.call(X)),p(X)&&(rt=" "+i(X)),st.length===0&&(!at||X.length==0))return vt[0]+rt+vt[1];if(lt<0)return E(X)?q.stylize(RegExp.prototype.toString.call(X),"regexp"):q.stylize("[Object]","special");q.seen.push(X);var Y;return at?Y=s(q,X,lt,tt,st):Y=st.map(function(ft){return f(q,X,lt,tt,ft,at)}),q.seen.pop(),x(Y,rt,vt)}function o(q,X){if(M(X))return q.stylize("undefined","undefined");if(_(X)){var lt="'"+JSON.stringify(X).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return q.stylize(lt,"string")}if(b(X))return q.stylize(""+X,"number");if(v(X))return q.stylize(""+X,"boolean");if(T(X))return q.stylize("null","null")}function i(q){return"["+Error.prototype.toString.call(q)+"]"}function s(q,X,lt,yt,pt){for(var st=[],tt=0,dt=X.length;tt-1&&(st?dt=dt.split(` +`).map(function(at){return" "+at}).join(` +`).slice(2):dt=` +`+dt.split(` +`).map(function(at){return" "+at}).join(` +`))):dt=q.stylize("[Circular]","special")),M(tt)){if(st&&pt.match(/^\d+$/))return dt;tt=JSON.stringify(""+pt),tt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(tt=tt.slice(1,-1),tt=q.stylize(tt,"name")):(tt=tt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),tt=q.stylize(tt,"string"))}return tt+": "+dt}function x(q,X,lt){var yt=0,pt=q.reduce(function(st,tt){return yt++,tt.indexOf(` +`)>=0&&yt++,st+tt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return pt>60?lt[0]+(X===""?"":X+` + `)+" "+q.join(`, + `)+" "+lt[1]:lt[0]+X+" "+q.join(", ")+" "+lt[1]}Q.types=S7();function y(q){return Array.isArray(q)}Q.isArray=y;function v(q){return typeof q=="boolean"}Q.isBoolean=v;function T(q){return q===null}Q.isNull=T;function u(q){return q==null}Q.isNullOrUndefined=u;function b(q){return typeof q=="number"}Q.isNumber=b;function _(q){return typeof q=="string"}Q.isString=_;function C(q){return typeof q=="symbol"}Q.isSymbol=C;function M(q){return q===void 0}Q.isUndefined=M;function E(q){return A(q)&&R(q)==="[object RegExp]"}Q.isRegExp=E,Q.types.isRegExp=E;function A(q){return typeof q=="object"&&q!==null}Q.isObject=A;function h(q){return A(q)&&R(q)==="[object Date]"}Q.isDate=h,Q.types.isDate=h;function p(q){return A(q)&&(R(q)==="[object Error]"||q instanceof Error)}Q.isError=p,Q.types.isNativeError=p;function k(q){return typeof q=="function"}Q.isFunction=k;function w(q){return q===null||typeof q=="boolean"||typeof q=="number"||typeof q=="string"||typeof q=="symbol"||typeof q>"u"}Q.isPrimitive=w,Q.isBuffer=E7();function R(q){return Object.prototype.toString.call(q)}function O(q){return q<10?"0"+q.toString(10):q.toString(10)}var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var q=new Date,X=[O(q.getHours()),O(q.getMinutes()),O(q.getSeconds())].join(":");return[q.getDate(),N[q.getMonth()],X].join(" ")}Q.log=function(){console.log("%s - %s",V(),Q.format.apply(Q,arguments))},Q.inherits=_v(),Q._extend=function(q,X){if(!X||!A(X))return q;for(var lt=Object.keys(X),yt=lt.length;yt--;)q[lt[yt]]=X[lt[yt]];return q};function H(q,X){return Object.prototype.hasOwnProperty.call(q,X)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Q.promisify=function(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&q[F]){var X=q[F];if(typeof X!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(X,F,{value:X,enumerable:!1,writable:!1,configurable:!0}),X}function X(){for(var lt,yt,pt=new Promise(function(dt,rt){lt=dt,yt=rt}),st=[],tt=0;tt{function c(f,x){var y=Object.keys(f);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(f);x&&(v=v.filter(function(T){return Object.getOwnPropertyDescriptor(f,T).enumerable})),y.push.apply(y,v)}return y}function g(f){for(var x=1;x0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(x){var y={data:x,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var x=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,x}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(x){if(this.length===0)return"";for(var y=this.head,v=""+y.data;y=y.next;)v+=x+y.data;return v}},{key:"concat",value:function(x){if(this.length===0)return a.alloc(0);for(var y=a.allocUnsafe(x>>>0),v=this.head,T=0;v;)s(v.data,y,T),T+=v.data.length,v=v.next;return y}},{key:"consume",value:function(x,y){var v;return xu.length?u.length:x;if(b===u.length?T+=u:T+=u.slice(0,x),x-=b,x===0){b===u.length?(++v,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=u.slice(b));break}++v}return this.length-=v,T}},{key:"_getBuffer",value:function(x){var y=a.allocUnsafe(x),v=this.head,T=1;for(v.data.copy(y),x-=v.data.length;v=v.next;){var u=v.data,b=x>u.length?u.length:x;if(u.copy(y,y.length-x,0,b),x-=b,x===0){b===u.length?(++T,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=u.slice(b));break}++T}return this.length-=T,y}},{key:i,value:function(x,y){return o(this,g({},y,{depth:0,customInspect:!1}))}}]),f}()}),L7=Ft((Q,$)=>{function c(r,a){var n=this,o=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return o||i?(a?a(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(t,this,r)):process.nextTick(t,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(s){!a&&s?n._writableState?n._writableState.errorEmitted?process.nextTick(P,n):(n._writableState.errorEmitted=!0,process.nextTick(g,n,s)):process.nextTick(g,n,s):a?(process.nextTick(P,n),a(s)):process.nextTick(P,n)}),this)}function g(r,a){t(r,a),P(r)}function P(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function S(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function t(r,a){r.emit("error",a)}function e(r,a){var n=r._readableState,o=r._writableState;n&&n.autoDestroy||o&&o.autoDestroy?r.destroy(a):r.emit("error",a)}$.exports={destroy:c,undestroy:S,errorOrDestroy:e}}),rx=Ft((Q,$)=>{function c(a,n){a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.__proto__=n}var g={};function P(a,n,o){o||(o=Error);function i(f,x,y){return typeof n=="string"?n:n(f,x,y)}var s=function(f){c(x,f);function x(y,v,T){return f.call(this,i(y,v,T))||this}return x}(o);s.prototype.name=o.name,s.prototype.code=a,g[a]=s}function S(a,n){if(Array.isArray(a)){var o=a.length;return a=a.map(function(i){return String(i)}),o>2?"one of ".concat(n," ").concat(a.slice(0,o-1).join(", "),", or ")+a[o-1]:o===2?"one of ".concat(n," ").concat(a[0]," or ").concat(a[1]):"of ".concat(n," ").concat(a[0])}else return"of ".concat(n," ").concat(String(a))}function t(a,n,o){return a.substr(0,n.length)===n}function e(a,n,o){return(o===void 0||o>a.length)&&(o=a.length),a.substring(o-n.length,o)===n}function r(a,n,o){return typeof o!="number"&&(o=0),o+n.length>a.length?!1:a.indexOf(n,o)!==-1}P("ERR_INVALID_OPT_VALUE",function(a,n){return'The value "'+n+'" is invalid for option "'+a+'"'},TypeError),P("ERR_INVALID_ARG_TYPE",function(a,n,o){var i;typeof n=="string"&&t(n,"not ")?(i="must not be",n=n.replace(/^not /,"")):i="must be";var s;if(e(a," argument"))s="The ".concat(a," ").concat(i," ").concat(S(n,"type"));else{var f=r(a,".")?"property":"argument";s='The "'.concat(a,'" ').concat(f," ").concat(i," ").concat(S(n,"type"))}return s+=". Received type ".concat(typeof o),s},TypeError),P("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),P("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),P("ERR_STREAM_PREMATURE_CLOSE","Premature close"),P("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),P("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),P("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),P("ERR_STREAM_WRITE_AFTER_END","write after end"),P("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),P("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),P("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),$.exports.codes=g}),P7=Ft((Q,$)=>{var c=rx().codes.ERR_INVALID_OPT_VALUE;function g(S,t,e){return S.highWaterMark!=null?S.highWaterMark:t?S[e]:null}function P(S,t,e,r){var a=g(t,r,e);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var n=r?e:"highWaterMark";throw new c(n,a)}return Math.floor(a)}return S.objectMode?16:16*1024}$.exports={getHighWaterMark:P}}),EB=Ft((Q,$)=>{$.exports=c;function c(P,S){if(g("noDeprecation"))return P;var t=!1;function e(){if(!t){if(g("throwDeprecation"))throw new Error(S);g("traceDeprecation")?console.trace(S):console.warn(S),t=!0}return P.apply(this,arguments)}return e}function g(P){try{if(!window.localStorage)return!1}catch{return!1}var S=window.localStorage[P];return S==null?!1:String(S).toLowerCase()==="true"}}),z7=Ft((Q,$)=>{$.exports=h;function c(tt){var dt=this;this.next=null,this.entry=null,this.finish=function(){st(dt,tt)}}var g;h.WritableState=E;var P={deprecate:EB()},S=y7(),t=tx().Buffer,e=window.Uint8Array||function(){};function r(tt){return t.from(tt)}function a(tt){return t.isBuffer(tt)||tt instanceof e}var n=L7(),o=P7(),i=o.getHighWaterMark,s=rx().codes,f=s.ERR_INVALID_ARG_TYPE,x=s.ERR_METHOD_NOT_IMPLEMENTED,y=s.ERR_MULTIPLE_CALLBACK,v=s.ERR_STREAM_CANNOT_PIPE,T=s.ERR_STREAM_DESTROYED,u=s.ERR_STREAM_NULL_VALUES,b=s.ERR_STREAM_WRITE_AFTER_END,_=s.ERR_UNKNOWN_ENCODING,C=n.errorOrDestroy;_v()(h,S);function M(){}function E(tt,dt,rt){g=g||nx(),tt=tt||{},typeof rt!="boolean"&&(rt=dt instanceof g),this.objectMode=!!tt.objectMode,rt&&(this.objectMode=this.objectMode||!!tt.writableObjectMode),this.highWaterMark=i(this,tt,"writableHighWaterMark",rt),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var at=tt.decodeStrings===!1;this.decodeStrings=!at,this.defaultEncoding=tt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(vt){H(dt,vt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=tt.emitClose!==!1,this.autoDestroy=!!tt.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new c(this)}E.prototype.getBuffer=function(){for(var tt=this.bufferedRequest,dt=[];tt;)dt.push(tt),tt=tt.next;return dt},function(){try{Object.defineProperty(E.prototype,"buffer",{get:P.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var A;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(A=Function.prototype[Symbol.hasInstance],Object.defineProperty(h,Symbol.hasInstance,{value:function(tt){return A.call(this,tt)?!0:this!==h?!1:tt&&tt._writableState instanceof E}})):A=function(tt){return tt instanceof this};function h(tt){g=g||nx();var dt=this instanceof g;if(!dt&&!A.call(h,this))return new h(tt);this._writableState=new E(tt,this,dt),this.writable=!0,tt&&(typeof tt.write=="function"&&(this._write=tt.write),typeof tt.writev=="function"&&(this._writev=tt.writev),typeof tt.destroy=="function"&&(this._destroy=tt.destroy),typeof tt.final=="function"&&(this._final=tt.final)),S.call(this)}h.prototype.pipe=function(){C(this,new v)};function p(tt,dt){var rt=new b;C(tt,rt),process.nextTick(dt,rt)}function k(tt,dt,rt,at){var vt;return rt===null?vt=new u:typeof rt!="string"&&!dt.objectMode&&(vt=new f("chunk",["string","Buffer"],rt)),vt?(C(tt,vt),process.nextTick(at,vt),!1):!0}h.prototype.write=function(tt,dt,rt){var at=this._writableState,vt=!1,it=!at.objectMode&&a(tt);return it&&!t.isBuffer(tt)&&(tt=r(tt)),typeof dt=="function"&&(rt=dt,dt=null),it?dt="buffer":dt||(dt=at.defaultEncoding),typeof rt!="function"&&(rt=M),at.ending?p(this,rt):(it||k(this,at,tt,rt))&&(at.pendingcb++,vt=R(this,at,it,tt,dt,rt)),vt},h.prototype.cork=function(){this._writableState.corked++},h.prototype.uncork=function(){var tt=this._writableState;tt.corked&&(tt.corked--,!tt.writing&&!tt.corked&&!tt.bufferProcessing&&tt.bufferedRequest&&W(this,tt))},h.prototype.setDefaultEncoding=function(tt){if(typeof tt=="string"&&(tt=tt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((tt+"").toLowerCase())>-1))throw new _(tt);return this._writableState.defaultEncoding=tt,this},Object.defineProperty(h.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function w(tt,dt,rt){return!tt.objectMode&&tt.decodeStrings!==!1&&typeof dt=="string"&&(dt=t.from(dt,rt)),dt}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function R(tt,dt,rt,at,vt,it){if(!rt){var Y=w(dt,at,vt);at!==Y&&(rt=!0,vt="buffer",at=Y)}var ft=dt.objectMode?1:at.length;dt.length+=ft;var ut=dt.length{var c=Object.keys||function(o){var i=[];for(var s in o)i.push(s);return i};$.exports=r;var g=O7(),P=z7();for(_v()(r,g),S=c(P.prototype),e=0;e{var c=tx(),g=c.Buffer;function P(t,e){for(var r in t)e[r]=t[r]}g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?$.exports=c:(P(c,Q),Q.Buffer=S);function S(t,e,r){return g(t,e,r)}S.prototype=Object.create(g.prototype),P(g,S),S.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return g(t,e,r)},S.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var a=g(t);return e!==void 0?typeof r=="string"?a.fill(e,r):a.fill(e):a.fill(0),a},S.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return g(t)},S.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return c.SlowBuffer(t)}}),I7=Ft(Q=>{var $=CB().Buffer,c=$.isEncoding||function(T){switch(T=""+T,T&&T.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function g(T){if(!T)return"utf8";for(var u;;)switch(T){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return T;default:if(u)return;T=(""+T).toLowerCase(),u=!0}}function P(T){var u=g(T);if(typeof u!="string"&&($.isEncoding===c||!c(T)))throw new Error("Unknown encoding: "+T);return u||T}Q.StringDecoder=S;function S(T){this.encoding=P(T);var u;switch(this.encoding){case"utf16le":this.text=i,this.end=s,u=4;break;case"utf8":this.fillLast=a,u=4;break;case"base64":this.text=f,this.end=x,u=3;break;default:this.write=y,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=$.allocUnsafe(u)}S.prototype.write=function(T){if(T.length===0)return"";var u,b;if(this.lastNeed){if(u=this.fillLast(T),u===void 0)return"";b=this.lastNeed,this.lastNeed=0}else b=0;return b>5===6?2:T>>4===14?3:T>>3===30?4:T>>6===2?-1:-2}function e(T,u,b){var _=u.length-1;if(_=0?(C>0&&(T.lastNeed=C-1),C):--_=0?(C>0&&(T.lastNeed=C-2),C):--_=0?(C>0&&(C===2?C=0:T.lastNeed=C-3),C):0))}function r(T,u,b){if((u[0]&192)!==128)return T.lastNeed=0,"�";if(T.lastNeed>1&&u.length>1){if((u[1]&192)!==128)return T.lastNeed=1,"�";if(T.lastNeed>2&&u.length>2&&(u[2]&192)!==128)return T.lastNeed=2,"�"}}function a(T){var u=this.lastTotal-this.lastNeed,b=r(this,T);if(b!==void 0)return b;if(this.lastNeed<=T.length)return T.copy(this.lastChar,u,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,u,0,T.length),this.lastNeed-=T.length}function n(T,u){var b=e(this,T,u);if(!this.lastNeed)return T.toString("utf8",u);this.lastTotal=b;var _=T.length-(b-this.lastNeed);return T.copy(this.lastChar,0,_),T.toString("utf8",u,_)}function o(T){var u=T&&T.length?this.write(T):"";return this.lastNeed?u+"�":u}function i(T,u){if((T.length-u)%2===0){var b=T.toString("utf16le",u);if(b){var _=b.charCodeAt(b.length-1);if(_>=55296&&_<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1],b.slice(0,-1)}return b}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=T[T.length-1],T.toString("utf16le",u,T.length-1)}function s(T){var u=T&&T.length?this.write(T):"";if(this.lastNeed){var b=this.lastTotal-this.lastNeed;return u+this.lastChar.toString("utf16le",0,b)}return u}function f(T,u){var b=(T.length-u)%3;return b===0?T.toString("base64",u):(this.lastNeed=3-b,this.lastTotal=3,b===1?this.lastChar[0]=T[T.length-1]:(this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1]),T.toString("base64",u,T.length-b))}function x(T){var u=T&&T.length?this.write(T):"";return this.lastNeed?u+this.lastChar.toString("base64",0,3-this.lastNeed):u}function y(T){return T.toString(this.encoding)}function v(T){return T&&T.length?this.write(T):""}}),ak=Ft((Q,$)=>{var c=rx().codes.ERR_STREAM_PREMATURE_CLOSE;function g(e){var r=!1;return function(){if(!r){r=!0;for(var a=arguments.length,n=new Array(a),o=0;o{var c;function g(u,b,_){return b in u?Object.defineProperty(u,b,{value:_,enumerable:!0,configurable:!0,writable:!0}):u[b]=_,u}var P=ak(),S=Symbol("lastResolve"),t=Symbol("lastReject"),e=Symbol("error"),r=Symbol("ended"),a=Symbol("lastPromise"),n=Symbol("handlePromise"),o=Symbol("stream");function i(u,b){return{value:u,done:b}}function s(u){var b=u[S];if(b!==null){var _=u[o].read();_!==null&&(u[a]=null,u[S]=null,u[t]=null,b(i(_,!1)))}}function f(u){process.nextTick(s,u)}function x(u,b){return function(_,C){u.then(function(){if(b[r]){_(i(void 0,!0));return}b[n](_,C)},C)}}var y=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((c={get stream(){return this[o]},next:function(){var u=this,b=this[e];if(b!==null)return Promise.reject(b);if(this[r])return Promise.resolve(i(void 0,!0));if(this[o].destroyed)return new Promise(function(E,A){process.nextTick(function(){u[e]?A(u[e]):E(i(void 0,!0))})});var _=this[a],C;if(_)C=new Promise(x(_,this));else{var M=this[o].read();if(M!==null)return Promise.resolve(i(M,!1));C=new Promise(this[n])}return this[a]=C,C}},g(c,Symbol.asyncIterator,function(){return this}),g(c,"return",function(){var u=this;return new Promise(function(b,_){u[o].destroy(null,function(C){if(C){_(C);return}b(i(void 0,!0))})})}),c),y),T=function(u){var b,_=Object.create(v,(b={},g(b,o,{value:u,writable:!0}),g(b,S,{value:null,writable:!0}),g(b,t,{value:null,writable:!0}),g(b,e,{value:null,writable:!0}),g(b,r,{value:u._readableState.endEmitted,writable:!0}),g(b,n,{value:function(C,M){var E=_[o].read();E?(_[a]=null,_[S]=null,_[t]=null,C(i(E,!1))):(_[S]=C,_[t]=M)},writable:!0}),b));return _[a]=null,P(u,function(C){if(C&&C.code!=="ERR_STREAM_PREMATURE_CLOSE"){var M=_[t];M!==null&&(_[a]=null,_[S]=null,_[t]=null,M(C)),_[e]=C;return}var E=_[S];E!==null&&(_[a]=null,_[S]=null,_[t]=null,E(i(void 0,!0))),_[r]=!0}),u.on("readable",f.bind(null,_)),_};$.exports=T}),PB=Ft((Q,$)=>{$.exports=function(){throw new Error("Readable.from is not available in the browser")}}),O7=Ft((Q,$)=>{$.exports=p;var c;p.ReadableState=h,Im().EventEmitter;var g=function(it,Y){return it.listeners(Y).length},P=y7(),S=tx().Buffer,t=window.Uint8Array||function(){};function e(it){return S.from(it)}function r(it){return S.isBuffer(it)||it instanceof t}var a=C7(),n;a&&a.debuglog?n=a.debuglog("stream"):n=function(){};var o=SB(),i=L7(),s=P7(),f=s.getHighWaterMark,x=rx().codes,y=x.ERR_INVALID_ARG_TYPE,v=x.ERR_STREAM_PUSH_AFTER_EOF,T=x.ERR_METHOD_NOT_IMPLEMENTED,u=x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,b,_,C;_v()(p,P);var M=i.errorOrDestroy,E=["error","close","destroy","pause","resume"];function A(it,Y,ft){if(typeof it.prependListener=="function")return it.prependListener(Y,ft);!it._events||!it._events[Y]?it.on(Y,ft):Array.isArray(it._events[Y])?it._events[Y].unshift(ft):it._events[Y]=[ft,it._events[Y]]}function h(it,Y,ft){c=c||nx(),it=it||{},typeof ft!="boolean"&&(ft=Y instanceof c),this.objectMode=!!it.objectMode,ft&&(this.objectMode=this.objectMode||!!it.readableObjectMode),this.highWaterMark=f(this,it,"readableHighWaterMark",ft),this.buffer=new o,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=it.emitClose!==!1,this.autoDestroy=!!it.autoDestroy,this.destroyed=!1,this.defaultEncoding=it.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,it.encoding&&(b||(b=I7().StringDecoder),this.decoder=new b(it.encoding),this.encoding=it.encoding)}function p(it){if(c=c||nx(),!(this instanceof p))return new p(it);var Y=this instanceof c;this._readableState=new h(it,this,Y),this.readable=!0,it&&(typeof it.read=="function"&&(this._read=it.read),typeof it.destroy=="function"&&(this._destroy=it.destroy)),P.call(this)}Object.defineProperty(p.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(it){this._readableState&&(this._readableState.destroyed=it)}}),p.prototype.destroy=i.destroy,p.prototype._undestroy=i.undestroy,p.prototype._destroy=function(it,Y){Y(it)},p.prototype.push=function(it,Y){var ft=this._readableState,ut;return ft.objectMode?ut=!0:typeof it=="string"&&(Y=Y||ft.defaultEncoding,Y!==ft.encoding&&(it=S.from(it,Y),Y=""),ut=!0),k(this,it,Y,!1,ut)},p.prototype.unshift=function(it){return k(this,it,null,!0,!1)};function k(it,Y,ft,ut,wt){n("readableAddChunk",Y);var zt=it._readableState;if(Y===null)zt.reading=!1,H(it,zt);else{var Pt;if(wt||(Pt=R(zt,Y)),Pt)M(it,Pt);else if(zt.objectMode||Y&&Y.length>0)if(typeof Y!="string"&&!zt.objectMode&&Object.getPrototypeOf(Y)!==S.prototype&&(Y=e(Y)),ut)zt.endEmitted?M(it,new u):w(it,zt,Y,!0);else if(zt.ended)M(it,new v);else{if(zt.destroyed)return!1;zt.reading=!1,zt.decoder&&!ft?(Y=zt.decoder.write(Y),zt.objectMode||Y.length!==0?w(it,zt,Y,!1):W(it,zt)):w(it,zt,Y,!1)}else ut||(zt.reading=!1,W(it,zt))}return!zt.ended&&(zt.length=O?it=O:(it--,it|=it>>>1,it|=it>>>2,it|=it>>>4,it|=it>>>8,it|=it>>>16,it++),it}function V(it,Y){return it<=0||Y.length===0&&Y.ended?0:Y.objectMode?1:it!==it?Y.flowing&&Y.length?Y.buffer.head.data.length:Y.length:(it>Y.highWaterMark&&(Y.highWaterMark=N(it)),it<=Y.length?it:Y.ended?Y.length:(Y.needReadable=!0,0))}p.prototype.read=function(it){n("read",it),it=parseInt(it,10);var Y=this._readableState,ft=it;if(it!==0&&(Y.emittedReadable=!1),it===0&&Y.needReadable&&((Y.highWaterMark!==0?Y.length>=Y.highWaterMark:Y.length>0)||Y.ended))return n("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended?rt(this):F(this),null;if(it=V(it,Y),it===0&&Y.ended)return Y.length===0&&rt(this),null;var ut=Y.needReadable;n("need readable",ut),(Y.length===0||Y.length-it0?wt=dt(it,Y):wt=null,wt===null?(Y.needReadable=Y.length<=Y.highWaterMark,it=0):(Y.length-=it,Y.awaitDrain=0),Y.length===0&&(Y.ended||(Y.needReadable=!0),ft!==it&&Y.ended&&rt(this)),wt!==null&&this.emit("data",wt),wt};function H(it,Y){if(n("onEofChunk"),!Y.ended){if(Y.decoder){var ft=Y.decoder.end();ft&&ft.length&&(Y.buffer.push(ft),Y.length+=Y.objectMode?1:ft.length)}Y.ended=!0,Y.sync?F(it):(Y.needReadable=!1,Y.emittedReadable||(Y.emittedReadable=!0,U(it)))}}function F(it){var Y=it._readableState;n("emitReadable",Y.needReadable,Y.emittedReadable),Y.needReadable=!1,Y.emittedReadable||(n("emitReadable",Y.flowing),Y.emittedReadable=!0,process.nextTick(U,it))}function U(it){var Y=it._readableState;n("emitReadable_",Y.destroyed,Y.length,Y.ended),!Y.destroyed&&(Y.length||Y.ended)&&(it.emit("readable"),Y.emittedReadable=!1),Y.needReadable=!Y.flowing&&!Y.ended&&Y.length<=Y.highWaterMark,tt(it)}function W(it,Y){Y.readingMore||(Y.readingMore=!0,process.nextTick(q,it,Y))}function q(it,Y){for(;!Y.reading&&!Y.ended&&(Y.length1&&vt(ut.pipes,it)!==-1)&&!Jt&&(n("false write response, pause",ut.awaitDrain),ut.awaitDrain++),ft.pause())}function de(Mt){n("onerror",Mt),Lt(),it.removeListener("error",de),g(it,"error")===0&&M(it,Mt)}A(it,"error",de);function se(){it.removeListener("finish",Tt),Lt()}it.once("close",se);function Tt(){n("onfinish"),it.removeListener("close",se),Lt()}it.once("finish",Tt);function Lt(){n("unpipe"),ft.unpipe(it)}return it.emit("pipe",ft),ut.flowing||(n("pipe resume"),ft.resume()),it};function X(it){return function(){var Y=it._readableState;n("pipeOnDrain",Y.awaitDrain),Y.awaitDrain&&Y.awaitDrain--,Y.awaitDrain===0&&g(it,"data")&&(Y.flowing=!0,tt(it))}}p.prototype.unpipe=function(it){var Y=this._readableState,ft={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1)return it&&it!==Y.pipes?this:(it||(it=Y.pipes),Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,it&&it.emit("unpipe",this,ft),this);if(!it){var ut=Y.pipes,wt=Y.pipesCount;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var zt=0;zt0,ut.flowing!==!1&&this.resume()):it==="readable"&&!ut.endEmitted&&!ut.readableListening&&(ut.readableListening=ut.needReadable=!0,ut.flowing=!1,ut.emittedReadable=!1,n("on readable",ut.length,ut.reading),ut.length?F(this):ut.reading||process.nextTick(yt,this)),ft},p.prototype.addListener=p.prototype.on,p.prototype.removeListener=function(it,Y){var ft=P.prototype.removeListener.call(this,it,Y);return it==="readable"&&process.nextTick(lt,this),ft},p.prototype.removeAllListeners=function(it){var Y=P.prototype.removeAllListeners.apply(this,arguments);return(it==="readable"||it===void 0)&&process.nextTick(lt,this),Y};function lt(it){var Y=it._readableState;Y.readableListening=it.listenerCount("readable")>0,Y.resumeScheduled&&!Y.paused?Y.flowing=!0:it.listenerCount("data")>0&&it.resume()}function yt(it){n("readable nexttick read 0"),it.read(0)}p.prototype.resume=function(){var it=this._readableState;return it.flowing||(n("resume"),it.flowing=!it.readableListening,pt(this,it)),it.paused=!1,this};function pt(it,Y){Y.resumeScheduled||(Y.resumeScheduled=!0,process.nextTick(st,it,Y))}function st(it,Y){n("resume",Y.reading),Y.reading||it.read(0),Y.resumeScheduled=!1,it.emit("resume"),tt(it),Y.flowing&&!Y.reading&&it.read(0)}p.prototype.pause=function(){return n("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(n("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function tt(it){var Y=it._readableState;for(n("flow",Y.flowing);Y.flowing&&it.read()!==null;);}p.prototype.wrap=function(it){var Y=this,ft=this._readableState,ut=!1;it.on("end",function(){if(n("wrapped end"),ft.decoder&&!ft.ended){var Pt=ft.decoder.end();Pt&&Pt.length&&Y.push(Pt)}Y.push(null)}),it.on("data",function(Pt){if(n("wrapped data"),ft.decoder&&(Pt=ft.decoder.write(Pt)),!(ft.objectMode&&Pt==null)&&!(!ft.objectMode&&(!Pt||!Pt.length))){var Wt=Y.push(Pt);Wt||(ut=!0,it.pause())}});for(var wt in it)this[wt]===void 0&&typeof it[wt]=="function"&&(this[wt]=function(Pt){return function(){return it[Pt].apply(it,arguments)}}(wt));for(var zt=0;zt=Y.length?(Y.decoder?ft=Y.buffer.join(""):Y.buffer.length===1?ft=Y.buffer.first():ft=Y.buffer.concat(Y.length),Y.buffer.clear()):ft=Y.buffer.consume(it,Y.decoder),ft}function rt(it){var Y=it._readableState;n("endReadable",Y.endEmitted),Y.endEmitted||(Y.ended=!0,process.nextTick(at,Y,it))}function at(it,Y){if(n("endReadableNT",it.endEmitted,it.length),!it.endEmitted&&it.length===0&&(it.endEmitted=!0,Y.readable=!1,Y.emit("end"),it.autoDestroy)){var ft=Y._writableState;(!ft||ft.autoDestroy&&ft.finished)&&Y.destroy()}}typeof Symbol=="function"&&(p.from=function(it,Y){return C===void 0&&(C=PB()),C(p,it,Y)});function vt(it,Y){for(var ft=0,ut=it.length;ft{$.exports=a;var c=rx().codes,g=c.ERR_METHOD_NOT_IMPLEMENTED,P=c.ERR_MULTIPLE_CALLBACK,S=c.ERR_TRANSFORM_ALREADY_TRANSFORMING,t=c.ERR_TRANSFORM_WITH_LENGTH_0,e=nx();_v()(a,e);function r(i,s){var f=this._transformState;f.transforming=!1;var x=f.writecb;if(x===null)return this.emit("error",new P);f.writechunk=null,f.writecb=null,s!=null&&this.push(s),x(i);var y=this._readableState;y.reading=!1,(y.needReadable||y.length{$.exports=g;var c=D7();_v()(g,c);function g(P){if(!(this instanceof g))return new g(P);c.call(this,P)}g.prototype._transform=function(P,S,t){t(null,P)}}),IB=Ft((Q,$)=>{var c;function g(f){var x=!1;return function(){x||(x=!0,f.apply(void 0,arguments))}}var P=rx().codes,S=P.ERR_MISSING_ARGS,t=P.ERR_STREAM_DESTROYED;function e(f){if(f)throw f}function r(f){return f.setHeader&&typeof f.abort=="function"}function a(f,x,y,v){v=g(v);var T=!1;f.on("close",function(){T=!0}),c===void 0&&(c=ak()),c(f,{readable:x,writable:y},function(b){if(b)return v(b);T=!0,v()});var u=!1;return function(b){if(!T&&!u){if(u=!0,r(f))return f.abort();if(typeof f.destroy=="function")return f.destroy();v(b||new t("pipe"))}}}function n(f){f()}function o(f,x){return f.pipe(x)}function i(f){return!f.length||typeof f[f.length-1]!="function"?e:f.pop()}function s(){for(var f=arguments.length,x=new Array(f),y=0;y0;return a(b,C,M,function(E){T||(T=E),E&&u.forEach(n),!C&&(u.forEach(n),v(T))})});return x.reduce(o)}$.exports=s}),OB=Ft((Q,$)=>{$.exports=P;var c=Im().EventEmitter,g=_v();g(P,c),P.Readable=O7(),P.Writable=z7(),P.Duplex=nx(),P.Transform=D7(),P.PassThrough=zB(),P.finished=ak(),P.pipeline=IB(),P.Stream=P;function P(){c.call(this)}P.prototype.pipe=function(S,t){var e=this;function r(x){S.writable&&S.write(x)===!1&&e.pause&&e.pause()}e.on("data",r);function a(){e.readable&&e.resume&&e.resume()}S.on("drain",a),!S._isStdio&&(!t||t.end!==!1)&&(e.on("end",o),e.on("close",i));var n=!1;function o(){n||(n=!0,S.end())}function i(){n||(n=!0,typeof S.destroy=="function"&&S.destroy())}function s(x){if(f(),c.listenerCount(this,"error")===0)throw x}e.on("error",s),S.on("error",s);function f(){e.removeListener("data",r),S.removeListener("drain",a),e.removeListener("end",o),e.removeListener("close",i),e.removeListener("error",s),S.removeListener("error",s),e.removeListener("end",f),e.removeListener("close",f),S.removeListener("close",f)}return e.on("end",f),e.on("close",f),S.on("close",f),S.emit("pipe",e),S}}),nb=Ft(Q=>{var $=Object.getOwnPropertyDescriptors||function(q){for(var X=Object.keys(q),lt={},yt=0;yt=pt)return rt;switch(rt){case"%s":return String(yt[lt++]);case"%d":return Number(yt[lt++]);case"%j":try{return JSON.stringify(yt[lt++])}catch{return"[Circular]"}default:return rt}}),tt=yt[lt];lt"u")return function(){return Q.deprecate(q,X).apply(this,arguments)};var lt=!1;function yt(){if(!lt){if(process.throwDeprecation)throw new Error(X);process.traceDeprecation?console.trace(X):console.error(X),lt=!0}return q.apply(this,arguments)}return yt};var g={},P=/^$/;S="false",S=S.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),P=new RegExp("^"+S+"$","i");var S;Q.debuglog=function(q){if(q=q.toUpperCase(),!g[q])if(P.test(q)){var X=process.pid;g[q]=function(){var lt=Q.format.apply(Q,arguments);console.error("%s %d: %s",q,X,lt)}}else g[q]=function(){};return g[q]};function t(q,X){var lt={seen:[],stylize:r};return arguments.length>=3&&(lt.depth=arguments[2]),arguments.length>=4&&(lt.colors=arguments[3]),v(X)?lt.showHidden=X:X&&Q._extend(lt,X),M(lt.showHidden)&&(lt.showHidden=!1),M(lt.depth)&&(lt.depth=2),M(lt.colors)&&(lt.colors=!1),M(lt.customInspect)&&(lt.customInspect=!0),lt.colors&&(lt.stylize=e),n(lt,q,lt.depth)}Q.inspect=t,t.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},t.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(q,X){var lt=t.styles[X];return lt?"\x1B["+t.colors[lt][0]+"m"+q+"\x1B["+t.colors[lt][1]+"m":q}function r(q,X){return q}function a(q){var X={};return q.forEach(function(lt,yt){X[lt]=!0}),X}function n(q,X,lt){if(q.customInspect&&X&&k(X.inspect)&&X.inspect!==Q.inspect&&!(X.constructor&&X.constructor.prototype===X)){var yt=X.inspect(lt,q);return _(yt)||(yt=n(q,yt,lt)),yt}var pt=o(q,X);if(pt)return pt;var st=Object.keys(X),tt=a(st);if(q.showHidden&&(st=Object.getOwnPropertyNames(X)),p(X)&&(st.indexOf("message")>=0||st.indexOf("description")>=0))return i(X);if(st.length===0){if(k(X)){var dt=X.name?": "+X.name:"";return q.stylize("[Function"+dt+"]","special")}if(E(X))return q.stylize(RegExp.prototype.toString.call(X),"regexp");if(h(X))return q.stylize(Date.prototype.toString.call(X),"date");if(p(X))return i(X)}var rt="",at=!1,vt=["{","}"];if(y(X)&&(at=!0,vt=["[","]"]),k(X)){var it=X.name?": "+X.name:"";rt=" [Function"+it+"]"}if(E(X)&&(rt=" "+RegExp.prototype.toString.call(X)),h(X)&&(rt=" "+Date.prototype.toUTCString.call(X)),p(X)&&(rt=" "+i(X)),st.length===0&&(!at||X.length==0))return vt[0]+rt+vt[1];if(lt<0)return E(X)?q.stylize(RegExp.prototype.toString.call(X),"regexp"):q.stylize("[Object]","special");q.seen.push(X);var Y;return at?Y=s(q,X,lt,tt,st):Y=st.map(function(ft){return f(q,X,lt,tt,ft,at)}),q.seen.pop(),x(Y,rt,vt)}function o(q,X){if(M(X))return q.stylize("undefined","undefined");if(_(X)){var lt="'"+JSON.stringify(X).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return q.stylize(lt,"string")}if(b(X))return q.stylize(""+X,"number");if(v(X))return q.stylize(""+X,"boolean");if(T(X))return q.stylize("null","null")}function i(q){return"["+Error.prototype.toString.call(q)+"]"}function s(q,X,lt,yt,pt){for(var st=[],tt=0,dt=X.length;tt-1&&(st?dt=dt.split(` +`).map(function(at){return" "+at}).join(` +`).slice(2):dt=` +`+dt.split(` +`).map(function(at){return" "+at}).join(` +`))):dt=q.stylize("[Circular]","special")),M(tt)){if(st&&pt.match(/^\d+$/))return dt;tt=JSON.stringify(""+pt),tt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(tt=tt.slice(1,-1),tt=q.stylize(tt,"name")):(tt=tt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),tt=q.stylize(tt,"string"))}return tt+": "+dt}function x(q,X,lt){var yt=0,pt=q.reduce(function(st,tt){return yt++,tt.indexOf(` +`)>=0&&yt++,st+tt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return pt>60?lt[0]+(X===""?"":X+` + `)+" "+q.join(`, + `)+" "+lt[1]:lt[0]+X+" "+q.join(", ")+" "+lt[1]}Q.types=S7();function y(q){return Array.isArray(q)}Q.isArray=y;function v(q){return typeof q=="boolean"}Q.isBoolean=v;function T(q){return q===null}Q.isNull=T;function u(q){return q==null}Q.isNullOrUndefined=u;function b(q){return typeof q=="number"}Q.isNumber=b;function _(q){return typeof q=="string"}Q.isString=_;function C(q){return typeof q=="symbol"}Q.isSymbol=C;function M(q){return q===void 0}Q.isUndefined=M;function E(q){return A(q)&&R(q)==="[object RegExp]"}Q.isRegExp=E,Q.types.isRegExp=E;function A(q){return typeof q=="object"&&q!==null}Q.isObject=A;function h(q){return A(q)&&R(q)==="[object Date]"}Q.isDate=h,Q.types.isDate=h;function p(q){return A(q)&&(R(q)==="[object Error]"||q instanceof Error)}Q.isError=p,Q.types.isNativeError=p;function k(q){return typeof q=="function"}Q.isFunction=k;function w(q){return q===null||typeof q=="boolean"||typeof q=="number"||typeof q=="string"||typeof q=="symbol"||typeof q>"u"}Q.isPrimitive=w,Q.isBuffer=E7();function R(q){return Object.prototype.toString.call(q)}function O(q){return q<10?"0"+q.toString(10):q.toString(10)}var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var q=new Date,X=[O(q.getHours()),O(q.getMinutes()),O(q.getSeconds())].join(":");return[q.getDate(),N[q.getMonth()],X].join(" ")}Q.log=function(){console.log("%s - %s",V(),Q.format.apply(Q,arguments))},Q.inherits=_v(),Q._extend=function(q,X){if(!X||!A(X))return q;for(var lt=Object.keys(X),yt=lt.length;yt--;)q[lt[yt]]=X[lt[yt]];return q};function H(q,X){return Object.prototype.hasOwnProperty.call(q,X)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Q.promisify=function(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&q[F]){var X=q[F];if(typeof X!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(X,F,{value:X,enumerable:!1,writable:!1,configurable:!0}),X}function X(){for(var lt,yt,pt=new Promise(function(dt,rt){lt=dt,yt=rt}),st=[],tt=0;tt{function c(b){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},c(b)}function g(b,_,C){return Object.defineProperty(b,"prototype",{writable:!1}),b}function P(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}function S(b,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(_&&_.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),Object.defineProperty(b,"prototype",{writable:!1}),_&&t(b,_)}function t(b,_){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(C,M){return C.__proto__=M,C},t(b,_)}function e(b){var _=n();return function(){var C=o(b),M;if(_){var E=o(this).constructor;M=Reflect.construct(C,arguments,E)}else M=C.apply(this,arguments);return r(this,M)}}function r(b,_){if(_&&(c(_)==="object"||typeof _=="function"))return _;if(_!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a(b)}function a(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}function n(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function o(b){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(_){return _.__proto__||Object.getPrototypeOf(_)},o(b)}var i={},s,f;function x(b,_,C){C||(C=Error);function M(A,h,p){return typeof _=="string"?_:_(A,h,p)}var E=function(A){S(p,A);var h=e(p);function p(k,w,R){var O;return P(this,p),O=h.call(this,M(k,w,R)),O.code=b,O}return g(p)}(C);i[b]=E}function y(b,_){if(Array.isArray(b)){var C=b.length;return b=b.map(function(M){return String(M)}),C>2?"one of ".concat(_," ").concat(b.slice(0,C-1).join(", "),", or ")+b[C-1]:C===2?"one of ".concat(_," ").concat(b[0]," or ").concat(b[1]):"of ".concat(_," ").concat(b[0])}else return"of ".concat(_," ").concat(String(b))}function v(b,_,C){return b.substr(0,_.length)===_}function T(b,_,C){return(C===void 0||C>b.length)&&(C=b.length),b.substring(C-_.length,C)===_}function u(b,_,C){return typeof C!="number"&&(C=0),C+_.length>b.length?!1:b.indexOf(_,C)!==-1}x("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),x("ERR_INVALID_ARG_TYPE",function(b,_,C){s===void 0&&(s=Yw()),s(typeof b=="string","'name' must be a string");var M;typeof _=="string"&&v(_,"not ")?(M="must not be",_=_.replace(/^not /,"")):M="must be";var E;if(T(b," argument"))E="The ".concat(b," ").concat(M," ").concat(y(_,"type"));else{var A=u(b,".")?"property":"argument";E='The "'.concat(b,'" ').concat(A," ").concat(M," ").concat(y(_,"type"))}return E+=". Received type ".concat(c(C)),E},TypeError),x("ERR_INVALID_ARG_VALUE",function(b,_){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";f===void 0&&(f=nb());var M=f.inspect(_);return M.length>128&&(M="".concat(M.slice(0,128),"...")),"The argument '".concat(b,"' ").concat(C,". Received ").concat(M)},TypeError),x("ERR_INVALID_RETURN_VALUE",function(b,_,C){var M;return C&&C.constructor&&C.constructor.name?M="instance of ".concat(C.constructor.name):M="type ".concat(c(C)),"Expected ".concat(b,' to be returned from the "').concat(_,'"')+" function but got ".concat(M,".")},TypeError),x("ERR_MISSING_ARGS",function(){for(var b=arguments.length,_=new Array(b),C=0;C0,"At least one arg needs to be specified");var M="The ",E=_.length;switch(_=_.map(function(A){return'"'.concat(A,'"')}),E){case 1:M+="".concat(_[0]," argument");break;case 2:M+="".concat(_[0]," and ").concat(_[1]," arguments");break;default:M+=_.slice(0,E-1).join(", "),M+=", and ".concat(_[E-1]," arguments");break}return"".concat(M," must be specified")},TypeError),$.exports.codes=i}),DB=Ft((Q,$)=>{function c(W,q){var X=Object.keys(W);if(Object.getOwnPropertySymbols){var lt=Object.getOwnPropertySymbols(W);q&&(lt=lt.filter(function(yt){return Object.getOwnPropertyDescriptor(W,yt).enumerable})),X.push.apply(X,lt)}return X}function g(W){for(var q=1;q"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function v(W){return Function.toString.call(W).indexOf("[native code]")!==-1}function T(W,q){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(X,lt){return X.__proto__=lt,X},T(W,q)}function u(W){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(q){return q.__proto__||Object.getPrototypeOf(q)},u(W)}function b(W){"@babel/helpers - typeof";return b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},b(W)}var _=nb(),C=_.inspect,M=F7(),E=M.codes.ERR_INVALID_ARG_TYPE;function A(W,q,X){return(X===void 0||X>W.length)&&(X=W.length),W.substring(X-q.length,X)===q}function h(W,q){if(q=Math.floor(q),W.length==0||q==0)return"";var X=W.length*q;for(q=Math.floor(Math.log(q)/Math.log(2));q;)W+=W,q--;return W+=W.substring(0,X-W.length),W}var p="",k="",w="",R="",O={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},N=10;function V(W){var q=Object.keys(W),X=Object.create(Object.getPrototypeOf(W));return q.forEach(function(lt){X[lt]=W[lt]}),Object.defineProperty(X,"message",{value:W.message}),X}function H(W){return C(W,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function F(W,q,X){var lt="",yt="",pt=0,st="",tt=!1,dt=H(W),rt=dt.split(` +`),at=H(q).split(` +`),vt=0,it="";if(X==="strictEqual"&&b(W)==="object"&&b(q)==="object"&&W!==null&&q!==null&&(X="strictEqualObject"),rt.length===1&&at.length===1&&rt[0]!==at[0]){var Y=rt[0].length+at[0].length;if(Y<=N){if((b(W)!=="object"||W===null)&&(b(q)!=="object"||q===null)&&(W!==0||q!==0))return"".concat(O[X],` + +`)+"".concat(rt[0]," !== ").concat(at[0],` +`)}else if(X!=="strictEqualObject"){var ft=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(Y2&&(it=` + `.concat(h(" ",vt),"^"),vt=0)}}}for(var ut=rt[rt.length-1],wt=at[at.length-1];ut===wt&&(vt++<2?st=` + `.concat(ut).concat(st):lt=ut,rt.pop(),at.pop(),!(rt.length===0||at.length===0));)ut=rt[rt.length-1],wt=at[at.length-1];var zt=Math.max(rt.length,at.length);if(zt===0){var Pt=dt.split(` +`);if(Pt.length>30)for(Pt[26]="".concat(p,"...").concat(R);Pt.length>27;)Pt.pop();return"".concat(O.notIdentical,` + +`).concat(Pt.join(` +`),` +`)}vt>3&&(st=` +`.concat(p,"...").concat(R).concat(st),tt=!0),lt!==""&&(st=` + `.concat(lt).concat(st),lt="");var Wt=0,Ht=O[X]+` +`.concat(k,"+ actual").concat(R," ").concat(w,"- expected").concat(R),Jt=" ".concat(p,"...").concat(R," Lines skipped");for(vt=0;vt1&&vt>2&&(ge>4?(yt+=` +`.concat(p,"...").concat(R),tt=!0):ge>3&&(yt+=` + `.concat(at[vt-2]),Wt++),yt+=` + `.concat(at[vt-1]),Wt++),pt=vt,lt+=` +`.concat(w,"-").concat(R," ").concat(at[vt]),Wt++;else if(at.length1&&vt>2&&(ge>4?(yt+=` +`.concat(p,"...").concat(R),tt=!0):ge>3&&(yt+=` + `.concat(rt[vt-2]),Wt++),yt+=` + `.concat(rt[vt-1]),Wt++),pt=vt,yt+=` +`.concat(k,"+").concat(R," ").concat(rt[vt]),Wt++;else{var he=at[vt],de=rt[vt],se=de!==he&&(!A(de,",")||de.slice(0,-1)!==he);se&&A(he,",")&&he.slice(0,-1)===de&&(se=!1,de+=","),se?(ge>1&&vt>2&&(ge>4?(yt+=` +`.concat(p,"...").concat(R),tt=!0):ge>3&&(yt+=` + `.concat(rt[vt-2]),Wt++),yt+=` + `.concat(rt[vt-1]),Wt++),pt=vt,yt+=` +`.concat(k,"+").concat(R," ").concat(de),lt+=` +`.concat(w,"-").concat(R," ").concat(he),Wt+=2):(yt+=lt,lt="",(ge===1||vt===0)&&(yt+=` + `.concat(de),Wt++))}if(Wt>20&&vt30)for(Y[26]="".concat(p,"...").concat(R);Y.length>27;)Y.pop();Y.length===1?pt=X.call(this,"".concat(it," ").concat(Y[0])):pt=X.call(this,"".concat(it,` + +`).concat(Y.join(` +`),` +`))}else{var ft=H(rt),ut="",wt=O[tt];tt==="notDeepEqual"||tt==="notEqual"?(ft="".concat(O[tt],` + +`).concat(ft),ft.length>1024&&(ft="".concat(ft.slice(0,1021),"..."))):(ut="".concat(H(at)),ft.length>512&&(ft="".concat(ft.slice(0,509),"...")),ut.length>512&&(ut="".concat(ut.slice(0,509),"...")),tt==="deepEqual"||tt==="equal"?ft="".concat(wt,` + +`).concat(ft,` + +should equal + +`):ut=" ".concat(tt," ").concat(ut)),pt=X.call(this,"".concat(ft).concat(ut))}return Error.stackTraceLimit=vt,pt.generatedMessage=!st,Object.defineProperty(s(pt),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),pt.code="ERR_ASSERTION",pt.actual=rt,pt.expected=at,pt.operator=tt,Error.captureStackTrace&&Error.captureStackTrace(s(pt),dt),pt.stack,pt.name="AssertionError",i(pt)}return e(lt,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:q,value:function(yt,pt){return C(this,g(g({},pt),{},{customInspect:!1,depth:0}))}}]),lt}(f(Error),C.custom);$.exports=U}),R7=Ft((Q,$)=>{var c=Object.prototype.toString;$.exports=function(g){var P=c.call(g),S=P==="[object Arguments]";return S||(S=P!=="[object Array]"&&g!==null&&typeof g=="object"&&typeof g.length=="number"&&g.length>=0&&c.call(g.callee)==="[object Function]"),S}}),FB=Ft((Q,$)=>{var c;Object.keys||(g=Object.prototype.hasOwnProperty,P=Object.prototype.toString,S=R7(),t=Object.prototype.propertyIsEnumerable,e=!t.call({toString:null},"toString"),r=t.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],n=function(f){var x=f.constructor;return x&&x.prototype===f},o={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},i=function(){if(typeof window>"u")return!1;for(var f in window)try{if(!o["$"+f]&&g.call(window,f)&&window[f]!==null&&typeof window[f]=="object")try{n(window[f])}catch{return!0}}catch{return!0}return!1}(),s=function(f){if(typeof window>"u"||!i)return n(f);try{return n(f)}catch{return!1}},c=function(f){var x=f!==null&&typeof f=="object",y=P.call(f)==="[object Function]",v=S(f),T=x&&P.call(f)==="[object String]",u=[];if(!x&&!y&&!v)throw new TypeError("Object.keys called on a non-object");var b=r&&y;if(T&&f.length>0&&!g.call(f,0))for(var _=0;_0)for(var C=0;C{var c=Array.prototype.slice,g=R7(),P=Object.keys,S=P?function(e){return P(e)}:FB(),t=Object.keys;S.shim=function(){if(Object.keys){var e=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);e||(Object.keys=function(r){return g(r)?t(c.call(r)):t(r)})}else Object.keys=S;return Object.keys||S},$.exports=S}),RB=Ft((Q,$)=>{var c=B7(),g=rk()(),P=rb(),S=Object,t=P("Array.prototype.push"),e=P("Object.prototype.propertyIsEnumerable"),r=g?Object.getOwnPropertySymbols:null;$.exports=function(a,n){if(a==null)throw new TypeError("target must be an object");var o=S(a);if(arguments.length===1)return o;for(var i=1;i{var c=RB(),g=function(){if(!Object.assign)return!1;for(var S="abcdefghijklmnopqrst",t=S.split(""),e={},r=0;r{var c=function(g){return g!==g};$.exports=function(g,P){return g===0&&P===0?1/g===1/P:!!(g===P||c(g)&&c(P))}}),ok=Ft((Q,$)=>{var c=N7();$.exports=function(){return typeof Object.is=="function"?Object.is:c}}),Gw=Ft((Q,$)=>{var c=B7(),g=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",P=Object.prototype.toString,S=Array.prototype.concat,t=Object.defineProperty,e=function(i){return typeof i=="function"&&P.call(i)==="[object Function]"},r=T7()(),a=t&&r,n=function(i,s,f,x){if(s in i){if(x===!0){if(i[s]===f)return}else if(!e(x)||!x())return}a?t(i,s,{configurable:!0,enumerable:!1,value:f,writable:!0}):i[s]=f},o=function(i,s){var f=arguments.length>2?arguments[2]:{},x=c(s);g&&(x=S.call(x,Object.getOwnPropertySymbols(s)));for(var y=0;y{var c=ok(),g=Gw();$.exports=function(){var P=c();return g(Object,{is:P},{is:function(){return Object.is!==P}}),P}}),jB=Ft((Q,$)=>{var c=Gw(),g=$w(),P=N7(),S=ok(),t=NB(),e=g(S(),Object);c(e,{getPolyfill:S,implementation:P,shim:t}),$.exports=e}),j7=Ft((Q,$)=>{$.exports=function(c){return c!==c}}),U7=Ft((Q,$)=>{var c=j7();$.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:c}}),UB=Ft((Q,$)=>{var c=Gw(),g=U7();$.exports=function(){var P=g();return c(Number,{isNaN:P},{isNaN:function(){return Number.isNaN!==P}}),P}}),VB=Ft((Q,$)=>{var c=$w(),g=Gw(),P=j7(),S=U7(),t=UB(),e=c(S(),Number);g(e,{getPolyfill:S,implementation:P,shim:t}),$.exports=e}),HB=Ft((Q,$)=>{function c(se,Tt){return e(se)||t(se,Tt)||P(se,Tt)||g()}function g(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P(se,Tt){if(se){if(typeof se=="string")return S(se,Tt);var Lt=Object.prototype.toString.call(se).slice(8,-1);if(Lt==="Object"&&se.constructor&&(Lt=se.constructor.name),Lt==="Map"||Lt==="Set")return Array.from(se);if(Lt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Lt))return S(se,Tt)}}function S(se,Tt){(Tt==null||Tt>se.length)&&(Tt=se.length);for(var Lt=0,Mt=new Array(Tt);Lt10)return!0;for(var Tt=0;Tt57)return!0}return se.length===10&&se>=Math.pow(2,32)}function U(se){return Object.keys(se).filter(F).concat(s(se).filter(Object.prototype.propertyIsEnumerable.bind(se)))}function W(se,Tt){if(se===Tt)return 0;for(var Lt=se.length,Mt=Tt.length,te=0,ve=Math.min(Lt,Mt);te{function c(pt){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(st){return typeof st}:function(st){return st&&typeof Symbol=="function"&&st.constructor===Symbol&&st!==Symbol.prototype?"symbol":typeof st},c(pt)}function g(pt,st,tt){return Object.defineProperty(pt,"prototype",{writable:!1}),pt}function P(pt,st){if(!(pt instanceof st))throw new TypeError("Cannot call a class as a function")}var S=F7(),t=S.codes,e=t.ERR_AMBIGUOUS_ARGUMENT,r=t.ERR_INVALID_ARG_TYPE,a=t.ERR_INVALID_ARG_VALUE,n=t.ERR_INVALID_RETURN_VALUE,o=t.ERR_MISSING_ARGS,i=DB(),s=nb(),f=s.inspect,x=nb().types,y=x.isPromise,v=x.isRegExp,T=BB()(),u=ok()(),b=rb()("RegExp.prototype.test"),_,C;function M(){var pt=HB();_=pt.isDeepEqual,C=pt.isDeepStrictEqual}var E=!1,A=$.exports=R,h={};function p(pt){throw pt.message instanceof Error?pt.message:new i(pt)}function k(pt,st,tt,dt,rt){var at=arguments.length,vt;if(at===0)vt="Failed";else if(at===1)tt=pt,pt=void 0;else{if(E===!1){E=!0;var it=process.emitWarning?process.emitWarning:console.warn.bind(console);it("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}at===2&&(dt="!=")}if(tt instanceof Error)throw tt;var Y={actual:pt,expected:st,operator:dt===void 0?"fail":dt,stackStartFn:rt||k};tt!==void 0&&(Y.message=tt);var ft=new i(Y);throw vt&&(ft.message=vt,ft.generatedMessage=!0),ft}A.fail=k,A.AssertionError=i;function w(pt,st,tt,dt){if(!tt){var rt=!1;if(st===0)rt=!0,dt="No value argument passed to `assert.ok()`";else if(dt instanceof Error)throw dt;var at=new i({actual:tt,expected:!0,message:dt,operator:"==",stackStartFn:pt});throw at.generatedMessage=rt,at}}function R(){for(var pt=arguments.length,st=new Array(pt),tt=0;tt1?tt-1:0),rt=1;rt1?tt-1:0),rt=1;rt1?tt-1:0),rt=1;rt1?tt-1:0),rt=1;rt{var c=1e3,g=c*60,P=g*60,S=P*24,t=S*365.25;$.exports=function(o,i){i=i||{};var s=typeof o;if(s==="string"&&o.length>0)return e(o);if(s==="number"&&isNaN(o)===!1)return i.long?a(o):r(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))};function e(o){if(o=String(o),!(o.length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(o);if(i){var s=parseFloat(i[1]),f=(i[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return s*t;case"days":case"day":case"d":return s*S;case"hours":case"hour":case"hrs":case"hr":case"h":return s*P;case"minutes":case"minute":case"mins":case"min":case"m":return s*g;case"seconds":case"second":case"secs":case"sec":case"s":return s*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function r(o){return o>=S?Math.round(o/S)+"d":o>=P?Math.round(o/P)+"h":o>=g?Math.round(o/g)+"m":o>=c?Math.round(o/c)+"s":o+"ms"}function a(o){return n(o,S,"day")||n(o,P,"hour")||n(o,g,"minute")||n(o,c,"second")||o+" ms"}function n(o,i,s){if(!(o{Q=$.exports=P.debug=P.default=P,Q.coerce=r,Q.disable=t,Q.enable=S,Q.enabled=e,Q.humanize=WB(),Q.names=[],Q.skips=[],Q.formatters={};var c;function g(a){var n=0,o;for(o in a)n=(n<<5)-n+a.charCodeAt(o),n|=0;return Q.colors[Math.abs(n)%Q.colors.length]}function P(a){function n(){if(n.enabled){var o=n,i=+new Date,s=i-(c||i);o.diff=s,o.prev=c,o.curr=i,c=i;for(var f=new Array(arguments.length),x=0;x{Q=$.exports=qB(),Q.log=P,Q.formatArgs=g,Q.save=S,Q.load=t,Q.useColors=c,Q.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:e(),Q.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function c(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}Q.formatters.j=function(r){try{return JSON.stringify(r)}catch(a){return"[UnexpectedJSONParseError]: "+a.message}};function g(r){var a=this.useColors;if(r[0]=(a?"%c":"")+this.namespace+(a?" %c":" ")+r[0]+(a?"%c ":" ")+"+"+Q.humanize(this.diff),!!a){var n="color: "+this.color;r.splice(1,0,n,"color: inherit");var o=0,i=0;r[0].replace(/%[a-zA-Z%]/g,function(s){s!=="%%"&&(o++,s==="%c"&&(i=o))}),r.splice(i,0,n)}}function P(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function S(r){try{r==null?Q.storage.removeItem("debug"):Q.storage.debug=r}catch{}}function t(){var r;try{r=Q.storage.debug}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=l.DEBUG),r}Q.enable(t());function e(){try{return window.localStorage}catch{}}}),$B=Ft((Q,$)=>{var c=Yw(),g=ZB()("stream-parser");$.exports=r;var P=-1,S=0,t=1,e=2;function r(u){var b=u&&typeof u._transform=="function",_=u&&typeof u._write=="function";if(!b&&!_)throw new Error("must pass a Writable or Transform stream in");g("extending Parser into stream"),u._bytes=n,u._skipBytes=o,b&&(u._passthrough=i),b?u._transform=f:u._write=s}function a(u){g("initializing parser stream"),u._parserBytesLeft=0,u._parserBuffers=[],u._parserBuffered=0,u._parserState=P,u._parserCallback=null,typeof u.push=="function"&&(u._parserOutput=u.push.bind(u)),u._parserInit=!0}function n(u,b){c(!this._parserCallback,'there is already a "callback" set!'),c(isFinite(u)&&u>0,'can only buffer a finite number of bytes > 0, got "'+u+'"'),this._parserInit||a(this),g("buffering %o bytes",u),this._parserBytesLeft=u,this._parserCallback=b,this._parserState=S}function o(u,b){c(!this._parserCallback,'there is already a "callback" set!'),c(u>0,'can only skip > 0 bytes, got "'+u+'"'),this._parserInit||a(this),g("skipping %o bytes",u),this._parserBytesLeft=u,this._parserCallback=b,this._parserState=t}function i(u,b){c(!this._parserCallback,'There is already a "callback" set!'),c(u>0,'can only pass through > 0 bytes, got "'+u+'"'),this._parserInit||a(this),g("passing through %o bytes",u),this._parserBytesLeft=u,this._parserCallback=b,this._parserState=e}function s(u,b,_){this._parserInit||a(this),g("write(%o bytes)",u.length),typeof b=="function"&&(_=b),v(this,u,null,_)}function f(u,b,_){this._parserInit||a(this),g("transform(%o bytes)",u.length),typeof b!="function"&&(b=this._parserOutput),v(this,u,b,_)}function x(u,b,_,C){return u._parserBytesLeft<=0?C(new Error("got data but not currently parsing anything")):b.length<=u._parserBytesLeft?function(){return y(u,b,_,C)}:function(){var M=b.slice(0,u._parserBytesLeft);return y(u,M,_,function(E){if(E)return C(E);if(b.length>M.length)return function(){return x(u,b.slice(M.length),_,C)}})}}function y(u,b,_,C){if(u._parserBytesLeft-=b.length,g("%o bytes left for stream piece",u._parserBytesLeft),u._parserState===S?(u._parserBuffers.push(b),u._parserBuffered+=b.length):u._parserState===e&&_(b),u._parserBytesLeft===0){var M=u._parserCallback;if(M&&u._parserState===S&&u._parserBuffers.length>1&&(b=Buffer.concat(u._parserBuffers,u._parserBuffered)),u._parserState!==S&&(b=null),u._parserCallback=null,u._parserBuffered=0,u._parserState=P,u._parserBuffers.splice(0),M){var E=[];b&&E.push(b),_&&E.push(_);var A=M.length>E.length;A&&E.push(T(C));var h=M.apply(u,E);if(!A||C===h)return C}}else return C}var v=T(x);function T(u){return function(){for(var b=u.apply(this,arguments);typeof b=="function";)b=b();return b}}}),dh=Ft(Q=>{var $=OB().Transform,c=$B();function g(){$.call(this,{readableObjectMode:!0})}g.prototype=Object.create($.prototype),g.prototype.constructor=g,c(g.prototype),Q.ParserStream=g,Q.sliceEq=function(S,t,e){for(var r=t,a=0;a{var c=dh().readUInt16BE,g=dh().readUInt32BE;function P(i,s){if(i.length<4+s)return null;var f=g(i,s);return i.length>4&15,x=i[4]&15,y=i[5]>>4&15,v=c(i,6),T=8,u=0;uv.width||y.width===v.width&&y.height>v.height?y:v}),f=i.reduce(function(y,v){return y.height>v.height||y.height===v.height&&y.width>v.width?y:v}),x;return s.width>f.height||s.width===f.height&&s.height>f.width?x=s:x=f,x}$.exports.readSizeFromMeta=function(i){var s={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(n(i,s),!!s.sizes.length){var f=o(s.sizes),x=1;s.transforms.forEach(function(v){var T={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},u={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(v.type==="imir"&&(v.value===0?x=u[x]:(x=u[x],x=T[x],x=T[x])),v.type==="irot")for(var b=0;b{function c(S,t){var e=new Error(S);return e.code=t,e}function g(S){try{return decodeURIComponent(escape(S))}catch{return S}}function P(S,t,e){this.input=S.subarray(t,e),this.start=t;var r=String.fromCharCode.apply(null,this.input.subarray(0,4));if(r!=="II*\0"&&r!=="MM\0*")throw c("invalid TIFF signature","EBADDATA");this.big_endian=r[0]==="M"}P.prototype.each=function(S){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var e=this.ifds_to_read.shift();e.offset&&this.scan_ifd(e.id,e.offset,S)}},P.prototype.read_uint16=function(S){var t=this.input;if(S+2>t.length)throw c("unexpected EOF","EBADDATA");return this.big_endian?t[S]*256+t[S+1]:t[S]+t[S+1]*256},P.prototype.read_uint32=function(S){var t=this.input;if(S+4>t.length)throw c("unexpected EOF","EBADDATA");return this.big_endian?t[S]*16777216+t[S+1]*65536+t[S+2]*256+t[S+3]:t[S]+t[S+1]*256+t[S+2]*65536+t[S+3]*16777216},P.prototype.is_subifd_link=function(S,t){return S===0&&t===34665||S===0&&t===34853||S===34665&&t===40965},P.prototype.exif_format_length=function(S){switch(S){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},P.prototype.exif_format_read=function(S,t){var e;switch(S){case 1:case 2:return e=this.input[t],e;case 6:return e=this.input[t],e|(e&128)*33554430;case 3:return e=this.read_uint16(t),e;case 8:return e=this.read_uint16(t),e|(e&32768)*131070;case 4:return e=this.read_uint32(t),e;case 9:return e=this.read_uint32(t),e|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},P.prototype.scan_ifd=function(S,t,e){var r=this.read_uint16(t);t+=2;for(var a=0;athis.input.length)throw c("unexpected EOF","EBADDATA");for(var v=[],T=x,u=0;u0&&(this.ifds_to_read.push({id:n,offset:v[0]}),y=!0);var _={is_big_endian:this.big_endian,ifd:S,tag:n,format:o,count:i,entry_offset:t+this.start,data_length:f,data_offset:x+this.start,value:v,is_subifd_link:y};if(e(_)===!1){this.aborted=!0;return}t+=12}S===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})},$.exports.ExifParser=P,$.exports.get_orientation=function(S){var t=0;try{return new P(S,0,S.length).each(function(e){if(e.ifd===0&&e.tag===274&&Array.isArray(e.value))return t=e.value[0],!1}),t}catch{return-1}}}),YB=Ft((Q,$)=>{var c=dh().str2arr,g=dh().sliceEq,P=dh().readUInt32BE,S=GB(),t=sk(),e=c("ftyp");$.exports=function(r){if(g(r,4,e)){var a=S.unbox(r,0);if(a){var n=S.getMimeType(a.data);if(n){for(var o,i=a.end;;){var s=S.unbox(r,i);if(!s)break;if(i=s.end,s.boxtype==="mdat")return;if(s.boxtype==="meta"){o=s.data;break}}if(o){var f=S.readSizeFromMeta(o);if(f){var x={width:f.width,height:f.height,type:n.type,mime:n.mime,wUnits:"px",hUnits:"px"};if(f.variants.length>1&&(x.variants=f.variants),f.orientation&&(x.orientation=f.orientation),f.exif_location&&f.exif_location.offset+f.exif_location.length<=r.length){var y=P(r,f.exif_location.offset),v=r.slice(f.exif_location.offset+y+4,f.exif_location.offset+f.exif_location.length),T=t.get_orientation(v);T>0&&(x.orientation=T)}return x}}}}}}}),KB=Ft((Q,$)=>{var c=dh().str2arr,g=dh().sliceEq,P=dh().readUInt16LE,S=c("BM");$.exports=function(t){if(!(t.length<26)&&g(t,0,S))return{width:P(t,18),height:P(t,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}),XB=Ft((Q,$)=>{var c=dh().str2arr,g=dh().sliceEq,P=dh().readUInt16LE,S=c("GIF87a"),t=c("GIF89a");$.exports=function(e){if(!(e.length<10)&&!(!g(e,0,S)&&!g(e,0,t)))return{width:P(e,6),height:P(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}),JB=Ft((Q,$)=>{var c=dh().readUInt16LE,g=0,P=1,S=16;$.exports=function(t){var e=c(t,0),r=c(t,2),a=c(t,4);if(!(e!==g||r!==P||!a)){for(var n=[],o={width:0,height:0},i=0;io.width||f>o.height)&&(o=x)}return{width:o.width,height:o.height,variants:n,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}),QB=Ft((Q,$)=>{var c=dh().readUInt16BE,g=dh().str2arr,P=dh().sliceEq,S=sk(),t=g("Exif\0\0");$.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var r=2;;){for(;;){if(e.length-r<2)return;if(e[r++]===255)break}for(var a=e[r++],n;a===255;)a=e[r++];if(208<=a&&a<=217||a===1)n=0;else if(192<=a&&a<=254){if(e.length-r<2)return;n=c(e,r)-2,r+=2}else return;if(a===217||a===218)return;var o;if(a===225&&n>=10&&P(e,r,t)&&(o=S.get_orientation(e.slice(r+6,r+n))),n>=5&&192<=a&&a<=207&&a!==196&&a!==200&&a!==204){if(e.length-r0&&(i.orientation=o),i}r+=n}}}),tN=Ft((Q,$)=>{var c=dh().str2arr,g=dh().sliceEq,P=dh().readUInt32BE,S=c(`‰PNG\r + +`),t=c("IHDR");$.exports=function(e){if(!(e.length<24)&&g(e,0,S)&&g(e,12,t))return{width:P(e,16),height:P(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}),eN=Ft((Q,$)=>{var c=dh().str2arr,g=dh().sliceEq,P=dh().readUInt32BE,S=c("8BPS\0");$.exports=function(t){if(!(t.length<22)&&g(t,0,S))return{width:P(t,18),height:P(t,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}),rN=Ft((Q,$)=>{function c(s){return s===32||s===9||s===13||s===10}function g(s){return typeof s=="number"&&isFinite(s)&&s>0}function P(s){var f=0,x=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(f=3);f]*>/,t=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,e=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,r=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,a=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,n=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function o(s){var f=s.match(e),x=s.match(r),y=s.match(a);return{width:f&&(f[1]||f[2]),height:x&&(x[1]||x[2]),viewbox:y&&(y[1]||y[2])}}function i(s){return n.test(s)?s.match(n)[0]:"px"}$.exports=function(s){if(P(s)){for(var f="",x=0;x{var c=dh().str2arr,g=dh().sliceEq,P=dh().readUInt16LE,S=dh().readUInt16BE,t=dh().readUInt32LE,e=dh().readUInt32BE,r=c("II*\0"),a=c("MM\0*");function n(s,f,x){return x?S(s,f):P(s,f)}function o(s,f,x){return x?e(s,f):t(s,f)}function i(s,f,x){var y=n(s,f+2,x),v=o(s,f+4,x);return v!==1||y!==3&&y!==4?null:y===3?n(s,f+8,x):o(s,f+8,x)}$.exports=function(s){if(!(s.length<8)&&!(!g(s,0,r)&&!g(s,0,a))){var f=s[0]===77,x=o(s,4,f)-8;if(!(x<0)){var y=x+8;if(!(s.length-y<2)){var v=n(s,y+0,f)*12;if(!(v<=0)&&(y+=2,!(s.length-y{var c=dh().str2arr,g=dh().sliceEq,P=dh().readUInt16LE,S=dh().readUInt32LE,t=sk(),e=c("RIFF"),r=c("WEBP");function a(i,s){if(!(i[s+3]!==157||i[s+4]!==1||i[s+5]!==42))return{width:P(i,s+6)&16383,height:P(i,s+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function n(i,s){if(i[s]===47){var f=S(i,s+1);return{width:(f&16383)+1,height:(f>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function o(i,s){return{width:(i[s+6]<<16|i[s+5]<<8|i[s+4])+1,height:(i[s+9]<i.length)){for(;s+8=10?f=f||a(i,s+8):v==="VP8L"&&T>=9?f=f||n(i,s+8):v==="VP8X"&&T>=10?f=f||o(i,s+8):v==="EXIF"&&(x=t.get_orientation(i.slice(s+8,s+8+T)),s=1/0),s+=8+T}if(f)return x>0&&(f.orientation=x),f}}}}),aN=Ft((Q,$)=>{$.exports={avif:YB(),bmp:KB(),gif:XB(),ico:JB(),jpeg:QB(),png:tN(),psd:eN(),svg:rN(),tiff:nN(),webp:iN()}}),oN=Ft((Q,$)=>{var c=aN();function g(P){for(var S=Object.keys(c),t=0;t{var $=oN(),c=o0().IMAGE_URL_PREFIX,g=tx().Buffer;Q.getImageSize=function(P){var S=P.replace(c,""),t=new g(S,"base64");return $(t)}}),lN=Ft((Q,$)=>{var c=bn(),g=Q_(),P=ra(),S=Es(),t=bn().maxRowLength,e=sN().getImageSize;$.exports=function(o,i){var s,f;if(i._hasZ)s=i.z.length,f=t(i.z);else if(i._hasSource){var x=e(i.source);s=x.height,f=x.width}var y=S.getFromId(o,i.xaxis||"x"),v=S.getFromId(o,i.yaxis||"y"),T=y.d2c(i.x0)-i.dx/2,u=v.d2c(i.y0)-i.dy/2,b,_=[T,T+f*i.dx],C=[u,u+s*i.dy];if(y&&y.type==="log")for(b=0;b{var c=un(),g=bn(),P=g.strTranslate,S=Op(),t=Q_(),e=qM(),r=V6().STYLE;$.exports=function(a,n,o,i){var s=n.xaxis,f=n.yaxis,x=!a._context._exportedPlot&&e();g.makeTraceGroups(i,o,"im").each(function(y){var v=c.select(this),T=y[0],u=T.trace,b=(u.zsmooth==="fast"||u.zsmooth===!1&&x)&&!u._hasZ&&u._hasSource&&s.type==="linear"&&f.type==="linear";u._realImage=b;var _=T.z,C=T.x0,M=T.y0,E=T.w,A=T.h,h=u.dx,p=u.dy,k,w,R,O,N,V;for(V=0;k===void 0&&V0;)w=s.c2p(C+V*h),V--;for(V=0;O===void 0&&V0;)N=f.c2p(M+V*p),V--;if(wst[0];if(tt||dt){var rt=k+F/2,at=O+U/2;yt+="transform:"+P(rt+"px",at+"px")+"scale("+(tt?-1:1)+","+(dt?-1:1)+")"+P(-rt+"px",-at+"px")+";"}}lt.attr("style",yt);var vt=new Promise(function(it){if(u._hasZ)it();else if(u._hasSource)if(u._canvas&&u._canvas.el.width===E&&u._canvas.el.height===A&&u._canvas.source===u.source)it();else{var Y=document.createElement("canvas");Y.width=E,Y.height=A;var ft=Y.getContext("2d",{willReadFrequently:!0});u._image=u._image||new Image;var ut=u._image;ut.onload=function(){ft.drawImage(ut,0,0),u._canvas={el:Y,source:u.source},it()},ut.setAttribute("src",u.source)}}).then(function(){var it,Y;if(u._hasZ)Y=X(function(wt,zt){var Pt=_[zt][wt];return g.isTypedArray(Pt)&&(Pt=Array.from(Pt)),Pt}),it=Y.toDataURL("image/png");else if(u._hasSource)if(b)it=u.source;else{var ft=u._canvas.el.getContext("2d",{willReadFrequently:!0}),ut=ft.getImageData(0,0,E,A).data;Y=X(function(wt,zt){var Pt=4*(zt*E+wt);return[ut[Pt],ut[Pt+1],ut[Pt+2],ut[Pt+3]]}),it=Y.toDataURL("image/png")}lt.attr({"xlink:href":it,height:U,width:F,x:k,y:O})});a._promises.push(vt)})}}),cN=Ft((Q,$)=>{var c=un();$.exports=function(g){c.select(g).selectAll(".im image").style("opacity",function(P){return P[0].trace.opacity})}}),hN=Ft((Q,$)=>{var c=Qh(),g=bn(),P=g.isArrayOrTypedArray,S=Q_();$.exports=function(t,e,r){var a=t.cd[0],n=a.trace,o=t.xa,i=t.ya;if(!(c.inbox(e-a.x0,e-(a.x0+a.w*n.dx),0)>0||c.inbox(r-a.y0,r-(a.y0+a.h*n.dy),0)>0)){var s=Math.floor((e-a.x0)/n.dx),f=Math.floor(Math.abs(r-a.y0)/n.dy),x;if(n._hasZ?x=a.z[f][s]:n._hasSource&&(x=n._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(s,f,1,1).data),!!x){var y=a.hi||n.hoverinfo,v;if(y){var T=y.split("+");T.indexOf("all")!==-1&&(T=["color"]),T.indexOf("color")!==-1&&(v=!0)}var u=S.colormodel[n.colormodel],b=u.colormodel||n.colormodel,_=b.length,C=n._scaler(x),M=u.suffix,E=[];(n.hovertemplate||v)&&(E.push("["+[C[0]+M[0],C[1]+M[1],C[2]+M[2]].join(", ")),_===4&&E.push(", "+C[3]+M[3]),E.push("]"),E=E.join(""),t.extraText=b.toUpperCase()+": "+E);var A;P(n.hovertext)&&P(n.hovertext[f])?A=n.hovertext[f][s]:P(n.text)&&P(n.text[f])&&(A=n.text[f][s]);var h=i.c2p(a.y0+(f+.5)*n.dy),p=a.x0+(s+.5)*n.dx,k=a.y0+(f+.5)*n.dy,w="["+x.slice(0,n.colormodel.length).join(", ")+"]";return[g.extendFlat(t,{index:[f,s],x0:o.c2p(a.x0+s*n.dx),x1:o.c2p(a.x0+(s+1)*n.dx),y0:h,y1:h,color:C,xVal:p,xLabelVal:p,yVal:k,yLabelVal:k,zLabelVal:w,text:A,hovertemplateLabels:{zLabel:w,colorLabel:E,"color[0]Label":C[0]+M[0],"color[1]Label":C[1]+M[1],"color[2]Label":C[2]+M[2],"color[3]Label":C[3]+M[3]}})]}}}}),fN=Ft((Q,$)=>{$.exports=function(c,g){return"xVal"in g&&(c.x=g.xVal),"yVal"in g&&(c.y=g.yVal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c.color=g.color,c.colormodel=g.trace.colormodel,c.z||(c.z=g.color),c}}),dN=Ft((Q,$)=>{$.exports={attributes:v7(),supplyDefaults:YR(),calc:lN(),plot:uN(),style:cN(),hoverPoints:hN(),eventData:fN(),moduleType:"trace",name:"image",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}),pN=Ft((Q,$)=>{$.exports=dN()}),ix=Ft((Q,$)=>{var c=$o(),g=Nh().attributes,P=Ea(),S=bi(),{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=$u(),a=Ta().extendFlat,n=Td().pattern,o=P({editType:"plot",arrayOk:!0,colorEditType:"plot"});$.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:S.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:n,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:a({},c.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:t({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:r(),texttemplate:e({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:r({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:a({},o,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:a({},o,{}),outsidetextfont:a({},o,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:a({},o,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:g({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}}),ax=Ft((Q,$)=>{var c=ra(),g=bn(),P=ix(),S=Nh().defaults,t=J0().handleText,e=bn().coercePattern;function r(o,i){var s=g.isArrayOrTypedArray(o),f=g.isArrayOrTypedArray(i),x=Math.min(s?o.length:1/0,f?i.length:1/0);if(isFinite(x)||(x=0),x&&f){for(var y,v=0;v0){y=!0;break}}y||(x=0)}return{hasLabels:s,hasValues:f,len:x}}function a(o,i,s,f,x){var y=f("marker.line.width");y&&f("marker.line.color",x?void 0:s.paper_bgcolor);var v=f("marker.colors");e(f,"marker.pattern",v),o.marker&&!i.marker.pattern.fgcolor&&(i.marker.pattern.fgcolor=o.marker.colors),i.marker.pattern.bgcolor||(i.marker.pattern.bgcolor=s.paper_bgcolor)}function n(o,i,s,f){function x(w,R){return g.coerce(o,i,P,w,R)}var y=x("labels"),v=x("values"),T=r(y,v),u=T.len;if(i._hasLabels=T.hasLabels,i._hasValues=T.hasValues,!i._hasLabels&&i._hasValues&&(x("label0"),x("dlabel")),!u){i.visible=!1;return}i._length=u,a(o,i,f,x,!0),x("scalegroup");var b=x("text"),_=x("texttemplate");x("texttemplatefallback");var C;if(_||(C=x("textinfo",g.isArrayOrTypedArray(b)?"text+percent":"percent")),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),_||C&&C!=="none"){var M=x("textposition");t(o,i,f,x,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var E=Array.isArray(M)||M==="auto",A=E||M==="outside";A&&x("automargin"),(M==="inside"||M==="auto"||Array.isArray(M))&&x("insidetextorientation")}else C==="none"&&x("textposition","none");S(i,f,x);var h=x("hole"),p=x("title.text");if(p){var k=x("title.position",h?"middle center":"top center");!h&&k==="middle center"&&(i.title.position="top center"),g.coerceFont(x,"title.font",f.font)}x("sort"),x("direction"),x("rotation"),x("pull")}$.exports={handleLabelsAndValues:r,handleMarkerDefaults:a,supplyDefaults:n}}),lk=Ft((Q,$)=>{$.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),mN=Ft((Q,$)=>{var c=bn(),g=lk();$.exports=function(P,S){function t(e,r){return c.coerce(P,S,g,e,r)}t("hiddenlabels"),t("piecolorway",S.colorway),t("extendpiecolors")}}),ib=Ft((Q,$)=>{var c=ra(),g=fo(),P=li(),S={};function t(n,o){var i=[],s=n._fullLayout,f=s.hiddenlabels||[],x=o.labels,y=o.marker.colors||[],v=o.values,T=o._length,u=o._hasValues&&T,b,_;if(o.dlabel)for(x=new Array(T),b=0;b=0});var R=o.type==="funnelarea"?A:o.sort;return R&&i.sort(function(O,N){return N.v-O.v}),i[0]&&(i[0].vTotal=E),i}function e(n){return function(o,i){return!o||(o=g(o),!o.isValid())?!1:(o=P.addOpacity(o,o.getAlpha()),n[i]||(n[i]=o),o)}}function r(n,o){var i=(o||{}).type;i||(i="pie");var s=n._fullLayout,f=n.calcdata,x=s[i+"colorway"],y=s["_"+i+"colormap"];s["extend"+i+"colors"]&&(x=a(x,S));for(var v=0,T=0;T{var c=Dp().appendArrayMultiPointValues;$.exports=function(g,P){var S={curveNumber:P.index,pointNumbers:g.pts,data:P._input,fullData:P,label:g.label,color:g.color,value:g.v,percent:g.percent,text:g.text,bbox:g.bbox,v:g.v};return g.pts.length===1&&(S.pointNumber=S.i=g.pts[0]),c(S,P,g.pts),P.type==="funnelarea"&&(delete S.v,delete S.i),S}}),uk=Ft((Q,$)=>{var c=un(),g=Kc(),P=Qh(),S=li(),t=js(),e=bn(),r=e.strScale,a=e.strTranslate,n=tc(),o=Rp(),i=o.recordMinTextSize,s=o.clearMinTextSize,f=Jy().TEXTPAD,x=xg(),y=gN(),v=bn().isValidTextValue;function T(dt,rt){var at=dt._context.staticPlot,vt=dt._fullLayout,it=vt._size;s("pie",vt),M(rt,dt),X(rt,it);var Y=e.makeTraceGroups(vt._pielayer,rt,"trace").each(function(ft){var ut=c.select(this),wt=ft[0],zt=wt.trace;yt(ft),ut.attr("stroke-linejoin","round"),ut.each(function(){var Pt=c.select(this).selectAll("g.slice").data(ft);Pt.enter().append("g").classed("slice",!0),Pt.exit().remove();var Wt=[[[],[]],[[],[]]],Ht=!1;Pt.each(function(Mt,te){if(Mt.hidden){c.select(this).selectAll("path,g").remove();return}Mt.pointNumber=Mt.i,Mt.curveNumber=zt.index,Wt[Mt.pxmid[1]<0?0:1][Mt.pxmid[0]<0?0:1].push(Mt);var ve=wt.cx,oe=wt.cy,Te=c.select(this),He=Te.selectAll("path.surface").data([Mt]);if(He.enter().append("path").classed("surface",!0).style({"pointer-events":at?"none":"all"}),Te.call(b,dt,ft),zt.pull){var Ge=+x.castOption(zt.pull,Mt.pts)||0;Ge>0&&(ve+=Ge*Mt.pxmid[0],oe+=Ge*Mt.pxmid[1])}Mt.cxFinal=ve,Mt.cyFinal=oe;function cr(Ce,$t,ne,Ct){var gt=Ct*($t[0]-Ce[0]),St=Ct*($t[1]-Ce[1]);return"a"+Ct*wt.r+","+Ct*wt.r+" 0 "+Mt.largeArc+(ne?" 1 ":" 0 ")+gt+","+St}var ur=zt.hole;if(Mt.v===wt.vTotal){var jr="M"+(ve+Mt.px0[0])+","+(oe+Mt.px0[1])+cr(Mt.px0,Mt.pxmid,!0,1)+cr(Mt.pxmid,Mt.px0,!0,1)+"Z";ur?He.attr("d","M"+(ve+ur*Mt.px0[0])+","+(oe+ur*Mt.px0[1])+cr(Mt.px0,Mt.pxmid,!1,ur)+cr(Mt.pxmid,Mt.px0,!1,ur)+"Z"+jr):He.attr("d",jr)}else{var Hr=cr(Mt.px0,Mt.px1,!0,1);if(ur){var br=1-ur;He.attr("d","M"+(ve+ur*Mt.px1[0])+","+(oe+ur*Mt.px1[1])+cr(Mt.px1,Mt.px0,!1,ur)+"l"+br*Mt.px0[0]+","+br*Mt.px0[1]+Hr+"Z")}else He.attr("d","M"+ve+","+oe+"l"+Mt.px0[0]+","+Mt.px0[1]+Hr+"Z")}st(dt,Mt,wt);var Kr=x.castOption(zt.textposition,Mt.pts),rn=Te.selectAll("g.slicetext").data(Mt.text&&Kr!=="none"?[0]:[]);rn.enter().append("g").classed("slicetext",!0),rn.exit().remove(),rn.each(function(){var Ce=e.ensureSingle(c.select(this),"text","",function(le){le.attr("data-notex",1)}),$t=e.ensureUniformFontSize(dt,Kr==="outside"?_(zt,Mt,vt.font):C(zt,Mt,vt.font));Ce.text(Mt.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(t.font,$t).call(n.convertToTspans,dt);var ne=t.bBox(Ce.node()),Ct;if(Kr==="outside")Ct=N(ne,Mt);else if(Ct=E(ne,Mt,wt),Kr==="auto"&&Ct.scale<1){var gt=e.ensureUniformFontSize(dt,zt.outsidetextfont);Ce.call(t.font,gt),ne=t.bBox(Ce.node()),Ct=N(ne,Mt)}var St=Ct.textPosAngle,Nt=St===void 0?Mt.pxmid:pt(wt.r,St);if(Ct.targetX=ve+Nt[0]*Ct.rCenter+(Ct.x||0),Ct.targetY=oe+Nt[1]*Ct.rCenter+(Ct.y||0),tt(Ct,ne),Ct.outside){var ee=Ct.targetY;Mt.yLabelMin=ee-ne.height/2,Mt.yLabelMid=ee,Mt.yLabelMax=ee+ne.height/2,Mt.labelExtraX=0,Mt.labelExtraY=0,Ht=!0}Ct.fontSize=$t.size,i(zt.type,Ct,vt),ft[te].transform=Ct,e.setTransormAndDisplay(Ce,Ct)})});var Jt=c.select(this).selectAll("g.titletext").data(zt.title.text?[0]:[]);if(Jt.enter().append("g").classed("titletext",!0),Jt.exit().remove(),Jt.each(function(){var Mt=e.ensureSingle(c.select(this),"text","",function(oe){oe.attr("data-notex",1)}),te=zt.title.text;zt._meta&&(te=e.templateString(te,zt._meta)),Mt.text(te).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(t.font,zt.title.font).call(n.convertToTspans,dt);var ve;zt.title.position==="middle center"?ve=V(wt):ve=H(wt,it),Mt.attr("transform",a(ve.x,ve.y)+r(Math.min(1,ve.scale))+a(ve.tx,ve.ty))}),Ht&&q(Wt,zt),u(Pt,zt),Ht&&zt.automargin){var ge=t.bBox(ut.node()),he=zt.domain,de=it.w*(he.x[1]-he.x[0]),se=it.h*(he.y[1]-he.y[0]),Tt=(.5*de-wt.r)/it.w,Lt=(.5*se-wt.r)/it.h;g.autoMargin(dt,"pie."+zt.uid+".automargin",{xl:he.x[0]-Tt,xr:he.x[1]+Tt,yb:he.y[0]-Lt,yt:he.y[1]+Lt,l:Math.max(wt.cx-wt.r-ge.left,0),r:Math.max(ge.right-(wt.cx+wt.r),0),b:Math.max(ge.bottom-(wt.cy+wt.r),0),t:Math.max(wt.cy-wt.r-ge.top,0),pad:5})}})});setTimeout(function(){Y.selectAll("tspan").each(function(){var ft=c.select(this);ft.attr("dy")&&ft.attr("dy",ft.attr("dy"))})},0)}function u(dt,rt){dt.each(function(at){var vt=c.select(this);if(!at.labelExtraX&&!at.labelExtraY){vt.select("path.textline").remove();return}var it=vt.select("g.slicetext text");at.transform.targetX+=at.labelExtraX,at.transform.targetY+=at.labelExtraY,e.setTransormAndDisplay(it,at.transform);var Y=at.cxFinal+at.pxmid[0],ft=at.cyFinal+at.pxmid[1],ut="M"+Y+","+ft,wt=(at.yLabelMax-at.yLabelMin)*(at.pxmid[0]<0?-1:1)/4;if(at.labelExtraX){var zt=at.labelExtraX*at.pxmid[1]/at.pxmid[0],Pt=at.yLabelMid+at.labelExtraY-(at.cyFinal+at.pxmid[1]);Math.abs(zt)>Math.abs(Pt)?ut+="l"+Pt*at.pxmid[0]/at.pxmid[1]+","+Pt+"H"+(Y+at.labelExtraX+wt):ut+="l"+at.labelExtraX+","+zt+"v"+(Pt-zt)+"h"+wt}else ut+="V"+(at.yLabelMid+at.labelExtraY)+"h"+wt;e.ensureSingle(vt,"path","textline").call(S.stroke,rt.outsidetextfont.color).attr({"stroke-width":Math.min(2,rt.outsidetextfont.size/8),d:ut,fill:"none"})})}function b(dt,rt,at){var vt=at[0],it=vt.cx,Y=vt.cy,ft=vt.trace,ut=ft.type==="funnelarea";"_hasHoverLabel"in ft||(ft._hasHoverLabel=!1),"_hasHoverEvent"in ft||(ft._hasHoverEvent=!1),dt.on("mouseover",function(wt){var zt=rt._fullLayout,Pt=rt._fullData[ft.index];if(!(rt._dragging||zt.hovermode===!1)){var Wt=Pt.hoverinfo;if(Array.isArray(Wt)&&(Wt=P.castHoverinfo({hoverinfo:[x.castOption(Wt,wt.pts)],_module:ft._module},zt,0)),Wt==="all"&&(Wt="label+text+value+percent+name"),Pt.hovertemplate||Wt!=="none"&&Wt!=="skip"&&Wt){var Ht=wt.rInscribed||0,Jt=it+wt.pxmid[0]*(1-Ht),ge=Y+wt.pxmid[1]*(1-Ht),he=zt.separators,de=[];if(Wt&&Wt.indexOf("label")!==-1&&de.push(wt.label),wt.text=x.castOption(Pt.hovertext||Pt.text,wt.pts),Wt&&Wt.indexOf("text")!==-1){var se=wt.text;e.isValidTextValue(se)&&de.push(se)}wt.value=wt.v,wt.valueLabel=x.formatPieValue(wt.v,he),Wt&&Wt.indexOf("value")!==-1&&de.push(wt.valueLabel),wt.percent=wt.v/vt.vTotal,wt.percentLabel=x.formatPiePercent(wt.percent,he),Wt&&Wt.indexOf("percent")!==-1&&de.push(wt.percentLabel);var Tt=Pt.hoverlabel,Lt=Tt.font,Mt=[];P.loneHover({trace:ft,x0:Jt-Ht*vt.r,x1:Jt+Ht*vt.r,y:ge,_x0:ut?it+wt.TL[0]:Jt-Ht*vt.r,_x1:ut?it+wt.TR[0]:Jt+Ht*vt.r,_y0:ut?Y+wt.TL[1]:ge-Ht*vt.r,_y1:ut?Y+wt.BL[1]:ge+Ht*vt.r,text:de.join("
"),name:Pt.hovertemplate||Wt.indexOf("name")!==-1?Pt.name:void 0,idealAlign:wt.pxmid[0]<0?"left":"right",color:x.castOption(Tt.bgcolor,wt.pts)||wt.color,borderColor:x.castOption(Tt.bordercolor,wt.pts),fontFamily:x.castOption(Lt.family,wt.pts),fontSize:x.castOption(Lt.size,wt.pts),fontColor:x.castOption(Lt.color,wt.pts),nameLength:x.castOption(Tt.namelength,wt.pts),textAlign:x.castOption(Tt.align,wt.pts),hovertemplate:x.castOption(Pt.hovertemplate,wt.pts),hovertemplateLabels:wt,eventData:[y(wt,Pt)]},{container:zt._hoverlayer.node(),outerContainer:zt._paper.node(),gd:rt,inOut_bbox:Mt}),wt.bbox=Mt[0],ft._hasHoverLabel=!0}ft._hasHoverEvent=!0,rt.emit("plotly_hover",{points:[y(wt,Pt)],event:c.event})}}),dt.on("mouseout",function(wt){var zt=rt._fullLayout,Pt=rt._fullData[ft.index],Wt=c.select(this).datum();ft._hasHoverEvent&&(wt.originalEvent=c.event,rt.emit("plotly_unhover",{points:[y(Wt,Pt)],event:c.event}),ft._hasHoverEvent=!1),ft._hasHoverLabel&&(P.loneUnhover(zt._hoverlayer.node()),ft._hasHoverLabel=!1)}),dt.on("click",function(wt){var zt=rt._fullLayout,Pt=rt._fullData[ft.index];rt._dragging||zt.hovermode===!1||(rt._hoverdata=[y(wt,Pt)],P.click(rt,c.event))})}function _(dt,rt,at){var vt=x.castOption(dt.outsidetextfont.color,rt.pts)||x.castOption(dt.textfont.color,rt.pts)||at.color,it=x.castOption(dt.outsidetextfont.family,rt.pts)||x.castOption(dt.textfont.family,rt.pts)||at.family,Y=x.castOption(dt.outsidetextfont.size,rt.pts)||x.castOption(dt.textfont.size,rt.pts)||at.size,ft=x.castOption(dt.outsidetextfont.weight,rt.pts)||x.castOption(dt.textfont.weight,rt.pts)||at.weight,ut=x.castOption(dt.outsidetextfont.style,rt.pts)||x.castOption(dt.textfont.style,rt.pts)||at.style,wt=x.castOption(dt.outsidetextfont.variant,rt.pts)||x.castOption(dt.textfont.variant,rt.pts)||at.variant,zt=x.castOption(dt.outsidetextfont.textcase,rt.pts)||x.castOption(dt.textfont.textcase,rt.pts)||at.textcase,Pt=x.castOption(dt.outsidetextfont.lineposition,rt.pts)||x.castOption(dt.textfont.lineposition,rt.pts)||at.lineposition,Wt=x.castOption(dt.outsidetextfont.shadow,rt.pts)||x.castOption(dt.textfont.shadow,rt.pts)||at.shadow;return{color:vt,family:it,size:Y,weight:ft,style:ut,variant:wt,textcase:zt,lineposition:Pt,shadow:Wt}}function C(dt,rt,at){var vt=x.castOption(dt.insidetextfont.color,rt.pts);!vt&&dt._input.textfont&&(vt=x.castOption(dt._input.textfont.color,rt.pts));var it=x.castOption(dt.insidetextfont.family,rt.pts)||x.castOption(dt.textfont.family,rt.pts)||at.family,Y=x.castOption(dt.insidetextfont.size,rt.pts)||x.castOption(dt.textfont.size,rt.pts)||at.size,ft=x.castOption(dt.insidetextfont.weight,rt.pts)||x.castOption(dt.textfont.weight,rt.pts)||at.weight,ut=x.castOption(dt.insidetextfont.style,rt.pts)||x.castOption(dt.textfont.style,rt.pts)||at.style,wt=x.castOption(dt.insidetextfont.variant,rt.pts)||x.castOption(dt.textfont.variant,rt.pts)||at.variant,zt=x.castOption(dt.insidetextfont.textcase,rt.pts)||x.castOption(dt.textfont.textcase,rt.pts)||at.textcase,Pt=x.castOption(dt.insidetextfont.lineposition,rt.pts)||x.castOption(dt.textfont.lineposition,rt.pts)||at.lineposition,Wt=x.castOption(dt.insidetextfont.shadow,rt.pts)||x.castOption(dt.textfont.shadow,rt.pts)||at.shadow;return{color:vt||S.contrast(rt.color),family:it,size:Y,weight:ft,style:ut,variant:wt,textcase:zt,lineposition:Pt,shadow:Wt}}function M(dt,rt){for(var at,vt,it=0;it=-4;Tt-=2)se(Math.PI*Tt,"tan");for(Tt=4;Tt>=-4;Tt-=2)se(Math.PI*(Tt+1),"tan")}if(Wt||Jt){for(Tt=4;Tt>=-4;Tt-=2)se(Math.PI*(Tt+1.5),"rad");for(Tt=4;Tt>=-4;Tt-=2)se(Math.PI*(Tt+.5),"rad")}}if(ut||ge||Wt){var Lt=Math.sqrt(dt.width*dt.width+dt.height*dt.height);if(de={scale:it*vt*2/Lt,rCenter:1-it,rotate:0},de.textPosAngle=(rt.startangle+rt.stopangle)/2,de.scale>=1)return de;he.push(de)}(ge||Jt)&&(de=h(dt,vt,ft,wt,zt),de.textPosAngle=(rt.startangle+rt.stopangle)/2,he.push(de)),(ge||Ht)&&(de=p(dt,vt,ft,wt,zt),de.textPosAngle=(rt.startangle+rt.stopangle)/2,he.push(de));for(var Mt=0,te=0,ve=0;ve=1)break}return he[Mt]}function A(dt,rt){var at=dt.startangle,vt=dt.stopangle;return at>rt&&rt>vt||at0?1:-1)/2,y:Y/(1+at*at/(vt*vt)),outside:!0}}function V(dt){var rt=Math.sqrt(dt.titleBox.width*dt.titleBox.width+dt.titleBox.height*dt.titleBox.height);return{x:dt.cx,y:dt.cy,scale:dt.trace.hole*dt.r*2/rt,tx:0,ty:-dt.titleBox.height/2+dt.trace.title.font.size}}function H(dt,rt){var at=1,vt=1,it,Y=dt.trace,ft={x:dt.cx,y:dt.cy},ut={tx:0,ty:0};ut.ty+=Y.title.font.size,it=W(Y),Y.title.position.indexOf("top")!==-1?(ft.y-=(1+it)*dt.r,ut.ty-=dt.titleBox.height):Y.title.position.indexOf("bottom")!==-1&&(ft.y+=(1+it)*dt.r);var wt=F(dt.r,dt.trace.aspectratio),zt=rt.w*(Y.domain.x[1]-Y.domain.x[0])/2;return Y.title.position.indexOf("left")!==-1?(zt=zt+wt,ft.x-=(1+it)*wt,ut.tx+=dt.titleBox.width/2):Y.title.position.indexOf("center")!==-1?zt*=2:Y.title.position.indexOf("right")!==-1&&(zt=zt+wt,ft.x+=(1+it)*wt,ut.tx-=dt.titleBox.width/2),at=zt/dt.titleBox.width,vt=U(dt,rt)/dt.titleBox.height,{x:ft.x,y:ft.y,scale:Math.min(at,vt),tx:ut.tx,ty:ut.ty}}function F(dt,rt){return dt/(rt===void 0?1:rt)}function U(dt,rt){var at=dt.trace,vt=rt.h*(at.domain.y[1]-at.domain.y[0]);return Math.min(dt.titleBox.height,vt/2)}function W(dt){var rt=dt.pull;if(!rt)return 0;var at;if(e.isArrayOrTypedArray(rt))for(rt=0,at=0;atrt&&(rt=dt.pull[at]);return rt}function q(dt,rt){var at,vt,it,Y,ft,ut,wt,zt,Pt,Wt,Ht,Jt,ge;function he(Lt,Mt){return Lt.pxmid[1]-Mt.pxmid[1]}function de(Lt,Mt){return Mt.pxmid[1]-Lt.pxmid[1]}function se(Lt,Mt){Mt||(Mt={});var te=Mt.labelExtraY+(vt?Mt.yLabelMax:Mt.yLabelMin),ve=vt?Lt.yLabelMin:Lt.yLabelMax,oe=vt?Lt.yLabelMax:Lt.yLabelMin,Te=Lt.cyFinal+ft(Lt.px0[1],Lt.px1[1]),He=te-ve,Ge,cr,ur,jr,Hr,br;if(He*wt>0&&(Lt.labelExtraY=He),!!e.isArrayOrTypedArray(rt.pull))for(cr=0;cr=(x.castOption(rt.pull,ur.pts)||0))&&((Lt.pxmid[1]-ur.pxmid[1])*wt>0?(jr=ur.cyFinal+ft(ur.px0[1],ur.px1[1]),He=jr-ve-Lt.labelExtraY,He*wt>0&&(Lt.labelExtraY+=He)):(oe+Lt.labelExtraY-Te)*wt>0&&(Ge=3*ut*Math.abs(cr-Wt.indexOf(Lt)),Hr=ur.cxFinal+Y(ur.px0[0],ur.px1[0]),br=Hr+Ge-(Lt.cxFinal+Lt.pxmid[0])-Lt.labelExtraX,br*ut>0&&(Lt.labelExtraX+=br)))}for(vt=0;vt<2;vt++)for(it=vt?he:de,ft=vt?Math.max:Math.min,wt=vt?1:-1,at=0;at<2;at++){for(Y=at?Math.max:Math.min,ut=at?1:-1,zt=dt[vt][at],zt.sort(it),Pt=dt[1-vt][at],Wt=Pt.concat(zt),Jt=[],Ht=0;Ht1?(zt=at.r,Pt=zt/it.aspectratio):(Pt=at.r,zt=Pt*it.aspectratio),zt*=(1+it.baseratio)/2,wt=zt*Pt}ft=Math.min(ft,wt/at.vTotal)}for(vt=0;vtrt.vTotal/2?1:0,zt.halfangle=Math.PI*Math.min(zt.v/rt.vTotal,.5),zt.ring=1-vt.hole,zt.rInscribed=O(zt,rt))}function pt(dt,rt){return[dt*Math.sin(rt),-dt*Math.cos(rt)]}function st(dt,rt,at){var vt=dt._fullLayout,it=at.trace,Y=it.texttemplate,ft=it.textinfo;if(!Y&&ft&&ft!=="none"){var ut=ft.split("+"),wt=function(Mt){return ut.indexOf(Mt)!==-1},zt=wt("label"),Pt=wt("text"),Wt=wt("value"),Ht=wt("percent"),Jt=vt.separators,ge;if(ge=zt?[rt.label]:[],Pt){var he=x.getFirstFilled(it.text,rt.pts);v(he)&&ge.push(he)}Wt&&ge.push(x.formatPieValue(rt.v,Jt)),Ht&&ge.push(x.formatPiePercent(rt.v/at.vTotal,Jt)),rt.text=ge.join("
")}function de(Mt){return{label:Mt.label,value:Mt.v,valueLabel:x.formatPieValue(Mt.v,vt.separators),percent:Mt.v/at.vTotal,percentLabel:x.formatPiePercent(Mt.v/at.vTotal,vt.separators),color:Mt.color,text:Mt.text,customdata:e.castOption(it,Mt.i,"customdata")}}if(Y){var se=e.castOption(it,rt.i,"texttemplate");if(!se)rt.text="";else{var Tt=de(rt),Lt=x.getFirstFilled(it.text,rt.pts);(v(Lt)||Lt==="")&&(Tt.text=Lt),rt.text=e.texttemplateString({data:[Tt,it._meta],fallback:it.texttemplatefallback,labels:Tt,locale:dt._fullLayout._d3locale,template:se})}}}function tt(dt,rt){var at=dt.rotate*Math.PI/180,vt=Math.cos(at),it=Math.sin(at),Y=(rt.left+rt.right)/2,ft=(rt.top+rt.bottom)/2;dt.textX=Y*vt-ft*it,dt.textY=Y*it+ft*vt,dt.noCenter=!0}$.exports={plot:T,formatSliceLabel:st,transformInsideText:E,determineInsideTextFont:C,positionTitleOutside:H,prerenderTitles:M,layoutAreas:X,attachFxHandlers:b,computeTransform:tt}}),vN=Ft((Q,$)=>{var c=un(),g=_g(),P=Rp().resizeText;$.exports=function(S){var t=S._fullLayout._pielayer.selectAll(".trace");P(S,t,"pie"),t.each(function(e){var r=e[0],a=r.trace,n=c.select(this);n.style({opacity:a.opacity}),n.selectAll("path.surface").each(function(o){c.select(this).call(g,o,a,S)})})}}),yN=Ft(Q=>{var $=Kc();Q.name="pie",Q.plot=function(c,g,P,S){$.plotBasePlot(Q.name,c,g,P,S)},Q.clean=function(c,g,P,S){$.cleanBasePlot(Q.name,c,g,P,S)}}),xN=Ft((Q,$)=>{$.exports={attributes:ix(),supplyDefaults:ax().supplyDefaults,supplyLayoutDefaults:mN(),layoutAttributes:lk(),calc:ib().calc,crossTraceCalc:ib().crossTraceCalc,plot:uk().plot,style:vN(),styleOne:_g(),moduleType:"trace",name:"pie",basePlotModule:yN(),categories:["pie-like","pie","showLegend"],meta:{}}}),_N=Ft((Q,$)=>{$.exports=xN()}),bN=Ft(Q=>{var $=Kc();Q.name="sunburst",Q.plot=function(c,g,P,S){$.plotBasePlot(Q.name,c,g,P,S)},Q.clean=function(c,g,P,S){$.cleanBasePlot(Q.name,c,g,P,S)}}),V7=Ft((Q,$)=>{$.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}),Kw=Ft((Q,$)=>{var c=$o(),{hovertemplateAttrs:g,texttemplateAttrs:P,templatefallbackAttrs:S}=$u(),t=Tc(),e=Nh().attributes,r=ix(),a=V7(),n=Ta().extendFlat,o=Td().pattern;$.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:n({colors:{valType:"data_array",editType:"calc"},line:{color:n({},r.marker.line.color,{dflt:null}),width:n({},r.marker.line.width,{dflt:1}),editType:"calc"},pattern:o,editType:"calc"},t("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:r.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:P({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:S({editType:"plot"}),hovertext:r.hovertext,hoverinfo:n({},c.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:g({},{keys:a.eventDataKeys}),hovertemplatefallback:S(),textfont:r.textfont,insidetextorientation:r.insidetextorientation,insidetextfont:r.insidetextfont,outsidetextfont:n({},r.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:r.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:e({name:"sunburst",trace:!0,editType:"calc"})}}),H7=Ft((Q,$)=>{$.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),wN=Ft((Q,$)=>{var c=bn(),g=Kw(),P=Nh().defaults,S=J0().handleText,t=ax().handleMarkerDefaults,e=Xc(),r=e.hasColorscale,a=e.handleDefaults;$.exports=function(n,o,i,s){function f(_,C){return c.coerce(n,o,g,_,C)}var x=f("labels"),y=f("parents");if(!x||!x.length||!y||!y.length){o.visible=!1;return}var v=f("values");v&&v.length?f("branchvalues"):f("count"),f("level"),f("maxdepth"),t(n,o,s,f);var T=o._hasColorscale=r(n,"marker","colors")||(n.marker||{}).coloraxis;T&&a(n,o,s,f,{prefix:"marker.",cLetter:"c"}),f("leaf.opacity",T?1:.7);var u=f("text");f("texttemplate"),f("texttemplatefallback"),o.texttemplate||f("textinfo",c.isArrayOrTypedArray(u)?"text+label":"label"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback");var b="auto";S(n,o,s,f,b,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("insidetextorientation"),f("sort"),f("rotation"),f("root.color"),P(o,s,f),o._length=null}}),kN=Ft((Q,$)=>{var c=bn(),g=H7();$.exports=function(P,S){function t(e,r){return c.coerce(P,S,g,e,r)}t("sunburstcolorway",S.colorway),t("extendsunburstcolors")}}),Xw=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){function g(Ct,gt){return Ct.parent===gt.parent?1:2}function P(Ct){return Ct.reduce(S,0)/Ct.length}function S(Ct,gt){return Ct+gt.x}function t(Ct){return 1+Ct.reduce(e,0)}function e(Ct,gt){return Math.max(Ct,gt.y)}function r(Ct){for(var gt;gt=Ct.children;)Ct=gt[0];return Ct}function a(Ct){for(var gt;gt=Ct.children;)Ct=gt[gt.length-1];return Ct}function n(){var Ct=g,gt=1,St=1,Nt=!1;function ee(le){var we,Ue=0;le.eachAfter(function(pr){var Jr=pr.children;Jr?(pr.x=P(Jr),pr.y=t(Jr)):(pr.x=we?Ue+=Ct(pr,we):0,pr.y=0,we=pr)});var qe=r(le),ar=a(le),Ar=qe.x-Ct(qe,ar)/2,Tr=ar.x+Ct(ar,qe)/2;return le.eachAfter(Nt?function(pr){pr.x=(pr.x-le.x)*gt,pr.y=(le.y-pr.y)*St}:function(pr){pr.x=(pr.x-Ar)/(Tr-Ar)*gt,pr.y=(1-(le.y?pr.y/le.y:1))*St})}return ee.separation=function(le){return arguments.length?(Ct=le,ee):Ct},ee.size=function(le){return arguments.length?(Nt=!1,gt=+le[0],St=+le[1],ee):Nt?null:[gt,St]},ee.nodeSize=function(le){return arguments.length?(Nt=!0,gt=+le[0],St=+le[1],ee):Nt?[gt,St]:null},ee}function o(Ct){var gt=0,St=Ct.children,Nt=St&&St.length;if(!Nt)gt=1;else for(;--Nt>=0;)gt+=St[Nt].value;Ct.value=gt}function i(){return this.eachAfter(o)}function s(Ct){var gt=this,St,Nt=[gt],ee,le,we;do for(St=Nt.reverse(),Nt=[];gt=St.pop();)if(Ct(gt),ee=gt.children,ee)for(le=0,we=ee.length;le=0;--ee)St.push(Nt[ee]);return this}function x(Ct){for(var gt=this,St=[gt],Nt=[],ee,le,we;gt=St.pop();)if(Nt.push(gt),ee=gt.children,ee)for(le=0,we=ee.length;le=0;)St+=Nt[ee].value;gt.value=St})}function v(Ct){return this.eachBefore(function(gt){gt.children&>.children.sort(Ct)})}function T(Ct){for(var gt=this,St=u(gt,Ct),Nt=[gt];gt!==St;)gt=gt.parent,Nt.push(gt);for(var ee=Nt.length;Ct!==St;)Nt.splice(ee,0,Ct),Ct=Ct.parent;return Nt}function u(Ct,gt){if(Ct===gt)return Ct;var St=Ct.ancestors(),Nt=gt.ancestors(),ee=null;for(Ct=St.pop(),gt=Nt.pop();Ct===gt;)ee=Ct,Ct=St.pop(),gt=Nt.pop();return ee}function b(){for(var Ct=this,gt=[Ct];Ct=Ct.parent;)gt.push(Ct);return gt}function _(){var Ct=[];return this.each(function(gt){Ct.push(gt)}),Ct}function C(){var Ct=[];return this.eachBefore(function(gt){gt.children||Ct.push(gt)}),Ct}function M(){var Ct=this,gt=[];return Ct.each(function(St){St!==Ct&>.push({source:St.parent,target:St})}),gt}function E(Ct,gt){var St=new w(Ct),Nt=+Ct.value&&(St.value=Ct.value),ee,le=[St],we,Ue,qe,ar;for(gt==null&&(gt=h);ee=le.pop();)if(Nt&&(ee.value=+ee.data.value),(Ue=gt(ee.data))&&(ar=Ue.length))for(ee.children=new Array(ar),qe=ar-1;qe>=0;--qe)le.push(we=ee.children[qe]=new w(Ue[qe])),we.parent=ee,we.depth=ee.depth+1;return St.eachBefore(k)}function A(){return E(this).eachBefore(p)}function h(Ct){return Ct.children}function p(Ct){Ct.data=Ct.data.data}function k(Ct){var gt=0;do Ct.height=gt;while((Ct=Ct.parent)&&Ct.height<++gt)}function w(Ct){this.data=Ct,this.depth=this.height=0,this.parent=null}w.prototype=E.prototype={constructor:w,count:i,each:s,eachAfter:x,eachBefore:f,sum:y,sort:v,path:T,ancestors:b,descendants:_,leaves:C,links:M,copy:A};var R=Array.prototype.slice;function O(Ct){for(var gt=Ct.length,St,Nt;gt;)Nt=Math.random()*gt--|0,St=Ct[gt],Ct[gt]=Ct[Nt],Ct[Nt]=St;return Ct}function N(Ct){for(var gt=0,St=(Ct=O(R.call(Ct))).length,Nt=[],ee,le;gt0&&St*St>Nt*Nt+ee*ee}function U(Ct,gt){for(var St=0;Stqe?(ee=(ar+qe-le)/(2*ar),Ue=Math.sqrt(Math.max(0,qe/ar-ee*ee)),St.x=Ct.x-ee*Nt-Ue*we,St.y=Ct.y-ee*we+Ue*Nt):(ee=(ar+le-qe)/(2*ar),Ue=Math.sqrt(Math.max(0,le/ar-ee*ee)),St.x=gt.x+ee*Nt-Ue*we,St.y=gt.y+ee*we+Ue*Nt)):(St.x=gt.x+St.r,St.y=gt.y)}function pt(Ct,gt){var St=Ct.r+gt.r-1e-6,Nt=gt.x-Ct.x,ee=gt.y-Ct.y;return St>0&&St*St>Nt*Nt+ee*ee}function st(Ct){var gt=Ct._,St=Ct.next._,Nt=gt.r+St.r,ee=(gt.x*St.r+St.x*gt.r)/Nt,le=(gt.y*St.r+St.y*gt.r)/Nt;return ee*ee+le*le}function tt(Ct){this._=Ct,this.next=null,this.previous=null}function dt(Ct){if(!(ee=Ct.length))return 0;var gt,St,Nt,ee,le,we,Ue,qe,ar,Ar,Tr;if(gt=Ct[0],gt.x=0,gt.y=0,!(ee>1))return gt.r;if(St=Ct[1],gt.x=-St.r,St.x=gt.r,St.y=0,!(ee>2))return gt.r+St.r;yt(St,gt,Nt=Ct[2]),gt=new tt(gt),St=new tt(St),Nt=new tt(Nt),gt.next=Nt.previous=St,St.next=gt.previous=Nt,Nt.next=St.previous=gt;t:for(Ue=3;Ue0)throw new Error("cycle");return Ue}return St.id=function(Nt){return arguments.length?(Ct=vt(Nt),St):Ct},St.parentId=function(Nt){return arguments.length?(gt=vt(Nt),St):gt},St}function Mt(Ct,gt){return Ct.parent===gt.parent?1:2}function te(Ct){var gt=Ct.children;return gt?gt[0]:Ct.t}function ve(Ct){var gt=Ct.children;return gt?gt[gt.length-1]:Ct.t}function oe(Ct,gt,St){var Nt=St/(gt.i-Ct.i);gt.c-=Nt,gt.s+=St,Ct.c+=Nt,gt.z+=St,gt.m+=St}function Te(Ct){for(var gt=0,St=0,Nt=Ct.children,ee=Nt.length,le;--ee>=0;)le=Nt[ee],le.z+=gt,le.m+=gt,gt+=le.s+(St+=le.c)}function He(Ct,gt,St){return Ct.a.parent===gt.parent?Ct.a:St}function Ge(Ct,gt){this._=Ct,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=gt}Ge.prototype=Object.create(w.prototype);function cr(Ct){for(var gt=new Ge(Ct,0),St,Nt=[gt],ee,le,we,Ue;St=Nt.pop();)if(le=St._.children)for(St.children=new Array(Ue=le.length),we=Ue-1;we>=0;--we)Nt.push(ee=St.children[we]=new Ge(le[we],we)),ee.parent=St;return(gt.parent=new Ge(null,0)).children=[gt],gt}function ur(){var Ct=Mt,gt=1,St=1,Nt=null;function ee(ar){var Ar=cr(ar);if(Ar.eachAfter(le),Ar.parent.m=-Ar.z,Ar.eachBefore(we),Nt)ar.eachBefore(qe);else{var Tr=ar,pr=ar,Jr=ar;ar.eachBefore(function(ii){ii.xpr.x&&(pr=ii),ii.depth>Jr.depth&&(Jr=ii)});var Vn=Tr===pr?1:Ct(Tr,pr)/2,Hn=Vn-Tr.x,Kn=gt/(pr.x+Vn+Hn),Ci=St/(Jr.depth||1);ar.eachBefore(function(ii){ii.x=(ii.x+Hn)*Kn,ii.y=ii.depth*Ci})}return ar}function le(ar){var Ar=ar.children,Tr=ar.parent.children,pr=ar.i?Tr[ar.i-1]:null;if(Ar){Te(ar);var Jr=(Ar[0].z+Ar[Ar.length-1].z)/2;pr?(ar.z=pr.z+Ct(ar._,pr._),ar.m=ar.z-Jr):ar.z=Jr}else pr&&(ar.z=pr.z+Ct(ar._,pr._));ar.parent.A=Ue(ar,pr,ar.parent.A||Tr[0])}function we(ar){ar._.x=ar.z+ar.parent.m,ar.m+=ar.parent.m}function Ue(ar,Ar,Tr){if(Ar){for(var pr=ar,Jr=ar,Vn=Ar,Hn=pr.parent.children[0],Kn=pr.m,Ci=Jr.m,ii=Vn.m,qn=Hn.m,oa;Vn=ve(Vn),pr=te(pr),Vn&≺)Hn=te(Hn),Jr=ve(Jr),Jr.a=ar,oa=Vn.z+ii-pr.z-Kn+Ct(Vn._,pr._),oa>0&&(oe(He(Vn,ar,Tr),ar,oa),Kn+=oa,Ci+=oa),ii+=Vn.m,Kn+=pr.m,qn+=Hn.m,Ci+=Jr.m;Vn&&!ve(Jr)&&(Jr.t=Vn,Jr.m+=ii-Ci),pr&&!te(Hn)&&(Hn.t=pr,Hn.m+=Kn-qn,Tr=ar)}return Tr}function qe(ar){ar.x*=gt,ar.y=ar.depth*St}return ee.separation=function(ar){return arguments.length?(Ct=ar,ee):Ct},ee.size=function(ar){return arguments.length?(Nt=!1,gt=+ar[0],St=+ar[1],ee):Nt?null:[gt,St]},ee.nodeSize=function(ar){return arguments.length?(Nt=!0,gt=+ar[0],St=+ar[1],ee):Nt?[gt,St]:null},ee}function jr(Ct,gt,St,Nt,ee){for(var le=Ct.children,we,Ue=-1,qe=le.length,ar=Ct.value&&(ee-St)/Ct.value;++Ueii&&(ii=ar),We=Kn*Kn*Hi,qn=Math.max(ii/We,We/Ci),qn>oa){Kn-=ar;break}oa=qn}we.push(qe={value:Kn,dice:Jr1?Nt:1)},St}(Hr);function rn(){var Ct=Kr,gt=!1,St=1,Nt=1,ee=[0],le=it,we=it,Ue=it,qe=it,ar=it;function Ar(pr){return pr.x0=pr.y0=0,pr.x1=St,pr.y1=Nt,pr.eachBefore(Tr),ee=[0],gt&&pr.eachBefore(Wt),pr}function Tr(pr){var Jr=ee[pr.depth],Vn=pr.x0+Jr,Hn=pr.y0+Jr,Kn=pr.x1-Jr,Ci=pr.y1-Jr;Kn=pr-1){var ii=le[Tr];ii.x0=Vn,ii.y0=Hn,ii.x1=Kn,ii.y1=Ci;return}for(var qn=ar[Tr],oa=Jr/2+qn,Hi=Tr+1,We=pr-1;Hi>>1;ar[rr]Ci-Hn){var Qr=(Vn*xr+Kn*fr)/Jr;Ar(Tr,Hi,fr,Vn,Hn,Qr,Ci),Ar(Hi,pr,xr,Qr,Hn,Kn,Ci)}else{var Cn=(Hn*xr+Ci*fr)/Jr;Ar(Tr,Hi,fr,Vn,Hn,Kn,Cn),Ar(Hi,pr,xr,Vn,Cn,Kn,Ci)}}}function $t(Ct,gt,St,Nt,ee){(Ct.depth&1?jr:Ht)(Ct,gt,St,Nt,ee)}var ne=function Ct(gt){function St(Nt,ee,le,we,Ue){if((qe=Nt._squarify)&&qe.ratio===gt)for(var qe,ar,Ar,Tr,pr=-1,Jr,Vn=qe.length,Hn=Nt.value;++pr1?Nt:1)},St}(Hr);c.cluster=n,c.hierarchy=E,c.pack=ut,c.packEnclose=N,c.packSiblings=rt,c.partition=Jt,c.stratify=Lt,c.tree=ur,c.treemap=rn,c.treemapBinary=Ce,c.treemapDice=Ht,c.treemapResquarify=ne,c.treemapSlice=jr,c.treemapSliceDice=$t,c.treemapSquarify=Kr,Object.defineProperty(c,"__esModule",{value:!0})})}),Jw=Ft(Q=>{var $=Xw(),c=ra(),g=bn(),P=Xc().makeColorScaleFuncFromTrace,S=ib().makePullColorFn,t=ib().generateExtendedColors,e=Xc().calc,r=Da().ALMOST_EQUAL,a={},n={},o={};Q.calc=function(s,f){var x=s._fullLayout,y=f.ids,v=g.isArrayOrTypedArray(y),T=f.labels,u=f.parents,b=f.values,_=g.isArrayOrTypedArray(b),C=[],M={},E={},A=function(rt,at){M[rt]?M[rt].push(at):M[rt]=[at],E[at]=1},h=function(rt){return rt||typeof rt=="number"},p=function(rt){return!_||c(b[rt])&&b[rt]>=0},k,w,R;v?(k=Math.min(y.length,u.length),w=function(rt){return h(y[rt])&&p(rt)},R=function(rt){return String(y[rt])}):(k=Math.min(T.length,u.length),w=function(rt){return h(T[rt])&&p(rt)},R=function(rt){return String(T[rt])}),_&&(k=Math.min(k,b.length));for(var O=0;O1){for(var F=g.randstr(),U=0;U{});function bv(){}function W7(){return this.rgb().formatHex()}function TN(){return this.rgb().formatHex8()}function AN(){return K7(this).formatHsl()}function q7(){return this.rgb().formatRgb()}function ob(Q){var $,c;return Q=(Q+"").trim().toLowerCase(),($=J7.exec(Q))?(c=$[1].length,$=parseInt($[1],16),c===6?Z7($):c===3?new cp($>>8&15|$>>4&240,$>>4&15|$&240,($&15)<<4|$&15,1):c===8?Qw($>>24&255,$>>16&255,$>>8&255,($&255)/255):c===4?Qw($>>12&15|$>>8&240,$>>8&15|$>>4&240,$>>4&15|$&240,(($&15)<<4|$&15)/255):null):($=Q7.exec(Q))?new cp($[1],$[2],$[3],1):($=t9.exec(Q))?new cp($[1]*255/100,$[2]*255/100,$[3]*255/100,1):($=e9.exec(Q))?Qw($[1],$[2],$[3],$[4]):($=r9.exec(Q))?Qw($[1]*255/100,$[2]*255/100,$[3]*255/100,$[4]):($=n9.exec(Q))?Y7($[1],$[2]/100,$[3]/100,1):($=i9.exec(Q))?Y7($[1],$[2]/100,$[3]/100,$[4]):pk.hasOwnProperty(Q)?Z7(pk[Q]):Q==="transparent"?new cp(NaN,NaN,NaN,0):null}function Z7(Q){return new cp(Q>>16&255,Q>>8&255,Q&255,1)}function Qw(Q,$,c,g){return g<=0&&(Q=$=c=NaN),new cp(Q,$,c,g)}function hk(Q){return Q instanceof bv||(Q=ob(Q)),Q?(Q=Q.rgb(),new cp(Q.r,Q.g,Q.b,Q.opacity)):new cp}function t3(Q,$,c,g){return arguments.length===1?hk(Q):new cp(Q,$,c,g??1)}function cp(Q,$,c,g){this.r=+Q,this.g=+$,this.b=+c,this.opacity=+g}function $7(){return`#${I1(this.r)}${I1(this.g)}${I1(this.b)}`}function MN(){return`#${I1(this.r)}${I1(this.g)}${I1(this.b)}${I1((isNaN(this.opacity)?1:this.opacity)*255)}`}function G7(){let Q=e3(this.opacity);return`${Q===1?"rgb(":"rgba("}${z1(this.r)}, ${z1(this.g)}, ${z1(this.b)}${Q===1?")":`, ${Q})`}`}function e3(Q){return isNaN(Q)?1:Math.max(0,Math.min(1,Q))}function z1(Q){return Math.max(0,Math.min(255,Math.round(Q)||0))}function I1(Q){return Q=z1(Q),(Q<16?"0":"")+Q.toString(16)}function Y7(Q,$,c,g){return g<=0?Q=$=c=NaN:c<=0||c>=1?Q=$=NaN:$<=0&&(Q=NaN),new _m(Q,$,c,g)}function K7(Q){if(Q instanceof _m)return new _m(Q.h,Q.s,Q.l,Q.opacity);if(Q instanceof bv||(Q=ob(Q)),!Q)return new _m;if(Q instanceof _m)return Q;Q=Q.rgb();var $=Q.r/255,c=Q.g/255,g=Q.b/255,P=Math.min($,c,g),S=Math.max($,c,g),t=NaN,e=S-P,r=(S+P)/2;return e?($===S?t=(c-g)/e+(c0&&r<1?0:t,new _m(t,e,r,Q.opacity)}function fk(Q,$,c,g){return arguments.length===1?K7(Q):new _m(Q,$,c,g??1)}function _m(Q,$,c,g){this.h=+Q,this.s=+$,this.l=+c,this.opacity=+g}function X7(Q){return Q=(Q||0)%360,Q<0?Q+360:Q}function r3(Q){return Math.max(0,Math.min(1,Q||0))}function dk(Q,$,c){return(Q<60?$+(c-$)*Q/60:Q<180?c:Q<240?$+(c-$)*(240-Q)/60:$)*255}var wv,O1,D1,sx,bm,J7,Q7,t9,e9,r9,n9,i9,pk,mk=An(()=>{ck(),wv=.7,O1=1/wv,D1="\\s*([+-]?\\d+)\\s*",sx="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",bm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",J7=/^#([0-9a-f]{3,8})$/,Q7=new RegExp(`^rgb\\(${D1},${D1},${D1}\\)$`),t9=new RegExp(`^rgb\\(${bm},${bm},${bm}\\)$`),e9=new RegExp(`^rgba\\(${D1},${D1},${D1},${sx}\\)$`),r9=new RegExp(`^rgba\\(${bm},${bm},${bm},${sx}\\)$`),n9=new RegExp(`^hsl\\(${sx},${bm},${bm}\\)$`),i9=new RegExp(`^hsla\\(${sx},${bm},${bm},${sx}\\)$`),pk={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},ox(bv,ob,{copy(Q){return Object.assign(new this.constructor,this,Q)},displayable(){return this.rgb().displayable()},hex:W7,formatHex:W7,formatHex8:TN,formatHsl:AN,formatRgb:q7,toString:q7}),ox(cp,t3,ab(bv,{brighter(Q){return Q=Q==null?O1:Math.pow(O1,Q),new cp(this.r*Q,this.g*Q,this.b*Q,this.opacity)},darker(Q){return Q=Q==null?wv:Math.pow(wv,Q),new cp(this.r*Q,this.g*Q,this.b*Q,this.opacity)},rgb(){return this},clamp(){return new cp(z1(this.r),z1(this.g),z1(this.b),e3(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$7,formatHex:$7,formatHex8:MN,formatRgb:G7,toString:G7})),ox(_m,fk,ab(bv,{brighter(Q){return Q=Q==null?O1:Math.pow(O1,Q),new _m(this.h,this.s,this.l*Q,this.opacity)},darker(Q){return Q=Q==null?wv:Math.pow(wv,Q),new _m(this.h,this.s,this.l*Q,this.opacity)},rgb(){var Q=this.h%360+(this.h<0)*360,$=isNaN(Q)||isNaN(this.s)?0:this.s,c=this.l,g=c+(c<.5?c:1-c)*$,P=2*c-g;return new cp(dk(Q>=240?Q-240:Q+120,P,g),dk(Q,P,g),dk(Q<120?Q+240:Q-120,P,g),this.opacity)},clamp(){return new _m(X7(this.h),r3(this.s),r3(this.l),e3(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let Q=e3(this.opacity);return`${Q===1?"hsl(":"hsla("}${X7(this.h)}, ${r3(this.s)*100}%, ${r3(this.l)*100}%${Q===1?")":`, ${Q})`}`}}))}),gk,vk,a9=An(()=>{gk=Math.PI/180,vk=180/Math.PI});function o9(Q){if(Q instanceof Um)return new Um(Q.l,Q.a,Q.b,Q.opacity);if(Q instanceof Eg)return s9(Q);Q instanceof cp||(Q=hk(Q));var $=wk(Q.r),c=wk(Q.g),g=wk(Q.b),P=xk((.2225045*$+.7168786*c+.0606169*g)/Ak),S,t;return $===c&&c===g?S=t=P:(S=xk((.4360747*$+.3850649*c+.1430804*g)/Tk),t=xk((.0139322*$+.0971045*c+.7141733*g)/Mk)),new Um(116*P-16,500*(S-P),200*(P-t),Q.opacity)}function yk(Q,$,c,g){return arguments.length===1?o9(Q):new Um(Q,$,c,g??1)}function Um(Q,$,c,g){this.l=+Q,this.a=+$,this.b=+c,this.opacity=+g}function xk(Q){return Q>l9?Math.pow(Q,.3333333333333333):Q/Ek+Sk}function _k(Q){return Q>F1?Q*Q*Q:Ek*(Q-Sk)}function bk(Q){return 255*(Q<=.0031308?12.92*Q:1.055*Math.pow(Q,.4166666666666667)-.055)}function wk(Q){return(Q/=255)<=.04045?Q/12.92:Math.pow((Q+.055)/1.055,2.4)}function SN(Q){if(Q instanceof Eg)return new Eg(Q.h,Q.c,Q.l,Q.opacity);if(Q instanceof Um||(Q=o9(Q)),Q.a===0&&Q.b===0)return new Eg(NaN,0{ck(),mk(),a9(),sb=18,Tk=.96422,Ak=1,Mk=.82521,Sk=4/29,F1=6/29,Ek=3*F1*F1,l9=F1*F1*F1,ox(Um,yk,ab(bv,{brighter(Q){return new Um(this.l+sb*(Q??1),this.a,this.b,this.opacity)},darker(Q){return new Um(this.l-sb*(Q??1),this.a,this.b,this.opacity)},rgb(){var Q=(this.l+16)/116,$=isNaN(this.a)?Q:Q+this.a/500,c=isNaN(this.b)?Q:Q-this.b/200;return $=Tk*_k($),Q=Ak*_k(Q),c=Mk*_k(c),new cp(bk(3.1338561*$-1.6168667*Q-.4906146*c),bk(-.9787684*$+1.9161415*Q+.033454*c),bk(.0719453*$-.2289914*Q+1.4052427*c),this.opacity)}})),ox(Eg,kk,ab(bv,{brighter(Q){return new Eg(this.h,this.c,this.l+sb*(Q??1),this.opacity)},darker(Q){return new Eg(this.h,this.c,this.l-sb*(Q??1),this.opacity)},rgb(){return s9(this).rgb()}}))});function CN(Q){if(Q instanceof R1)return new R1(Q.h,Q.s,Q.l,Q.opacity);Q instanceof cp||(Q=hk(Q));var $=Q.r/255,c=Q.g/255,g=Q.b/255,P=(Ik*g+Pk*$-zk*c)/(Ik+Pk-zk),S=g-P,t=(lx*(c-P)-i3*S)/lb,e=Math.sqrt(t*t+S*S)/(lx*P*(1-P)),r=e?Math.atan2(t,S)*vk-120:NaN;return new R1(r<0?r+360:r,e,P,Q.opacity)}function Ck(Q,$,c,g){return arguments.length===1?CN(Q):new R1(Q,$,c,g??1)}function R1(Q,$,c,g){this.h=+Q,this.s=+$,this.l=+c,this.opacity=+g}var Lk,n3,i3,lb,lx,Pk,zk,Ik,LN=An(()=>{ck(),mk(),a9(),Lk=-.14861,n3=1.78277,i3=-.29227,lb=-.90649,lx=1.97294,Pk=lx*lb,zk=lx*n3,Ik=n3*i3-lb*Lk,ox(R1,Ck,ab(bv,{brighter(Q){return Q=Q==null?O1:Math.pow(O1,Q),new R1(this.h,this.s,this.l*Q,this.opacity)},darker(Q){return Q=Q==null?wv:Math.pow(wv,Q),new R1(this.h,this.s,this.l*Q,this.opacity)},rgb(){var Q=isNaN(this.h)?0:(this.h+120)*gk,$=+this.l,c=isNaN(this.s)?0:this.s*$*(1-$),g=Math.cos(Q),P=Math.sin(Q);return new cp(255*($+c*(Lk*g+n3*P)),255*($+c*(i3*g+lb*P)),255*($+c*(lx*g)),this.opacity)}}))}),ux=An(()=>{mk(),EN(),LN()});function u9(Q,$,c,g,P){var S=Q*Q,t=S*Q;return((1-3*Q+3*S-t)*$+(4-6*S+3*t)*c+(1+3*Q+3*S-3*t)*g+t*P)/6}function c9(Q){var $=Q.length-1;return function(c){var g=c<=0?c=0:c>=1?(c=1,$-1):Math.floor(c*$),P=Q[g],S=Q[g+1],t=g>0?Q[g-1]:2*P-S,e=g<$-1?Q[g+2]:2*S-P;return u9((c-g/$)*$,t,P,S,e)}}var Ok=An(()=>{});function h9(Q){var $=Q.length;return function(c){var g=Math.floor(((c%=1)<0?++c:c)*$),P=Q[(g+$-1)%$],S=Q[g%$],t=Q[(g+1)%$],e=Q[(g+2)%$];return u9((c-g/$)*$,P,S,t,e)}}var f9=An(()=>{Ok()}),ub,d9=An(()=>{ub=Q=>()=>Q});function p9(Q,$){return function(c){return Q+c*$}}function PN(Q,$,c){return Q=Math.pow(Q,c),$=Math.pow($,c)-Q,c=1/c,function(g){return Math.pow(Q+g*$,c)}}function a3(Q,$){var c=$-Q;return c?p9(Q,c>180||c<-180?c-360*Math.round(c/360):c):ub(isNaN(Q)?$:Q)}function zN(Q){return(Q=+Q)==1?hp:function($,c){return c-$?PN($,c,Q):ub(isNaN($)?c:$)}}function hp(Q,$){var c=$-Q;return c?p9(Q,c):ub(isNaN(Q)?$:Q)}var cx=An(()=>{d9()});function m9(Q){return function($){var c=$.length,g=new Array(c),P=new Array(c),S=new Array(c),t,e;for(t=0;t{ux(),Ok(),f9(),cx(),o3=function Q($){var c=zN($);function g(P,S){var t=c((P=t3(P)).r,(S=t3(S)).r),e=c(P.g,S.g),r=c(P.b,S.b),a=hp(P.opacity,S.opacity);return function(n){return P.r=t(n),P.g=e(n),P.b=r(n),P.opacity=a(n),P+""}}return g.gamma=Q,g}(1),g9=m9(c9),v9=m9(h9)});function Dk(Q,$){$||($=[]);var c=Q?Math.min($.length,Q.length):0,g=$.slice(),P;return function(S){for(P=0;P{});function IN(Q,$){return(x9($)?Dk:_9)(Q,$)}function _9(Q,$){var c=$?$.length:0,g=Q?Math.min(c,Q.length):0,P=new Array(g),S=new Array(c),t;for(t=0;t{h3(),Fk()});function w9(Q,$){var c=new Date;return Q=+Q,$=+$,function(g){return c.setTime(Q*(1-g)+$*g),c}}var k9=An(()=>{});function Vm(Q,$){return Q=+Q,$=+$,function(c){return Q*(1-c)+$*c}}var s3=An(()=>{});function T9(Q,$){var c={},g={},P;(Q===null||typeof Q!="object")&&(Q={}),($===null||typeof $!="object")&&($={});for(P in $)P in Q?c[P]=c3(Q[P],$[P]):g[P]=$[P];return function(S){for(P in c)g[P]=c[P](S);return g}}var A9=An(()=>{h3()});function ON(Q){return function(){return Q}}function DN(Q){return function($){return Q($)+""}}function M9(Q,$){var c=l3.lastIndex=u3.lastIndex=0,g,P,S,t=-1,e=[],r=[];for(Q=Q+"",$=$+"";(g=l3.exec(Q))&&(P=u3.exec($));)(S=P.index)>c&&(S=$.slice(c,S),e[t]?e[t]+=S:e[++t]=S),(g=g[0])===(P=P[0])?e[t]?e[t]+=P:e[++t]=P:(e[++t]=null,r.push({i:t,x:Vm(g,P)})),c=u3.lastIndex;return c<$.length&&(S=$.slice(c),e[t]?e[t]+=S:e[++t]=S),e.length<2?r[0]?DN(r[0].x):ON($):($=r.length,function(a){for(var n=0,o;n<$;++n)e[(o=r[n]).i]=o.x(a);return e.join("")})}var l3,u3,S9=An(()=>{s3(),l3=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,u3=new RegExp(l3.source,"g")});function c3(Q,$){var c=typeof $,g;return $==null||c==="boolean"?ub($):(c==="number"?Vm:c==="string"?(g=ob($))?($=g,o3):M9:$ instanceof ob?o3:$ instanceof Date?w9:x9($)?Dk:Array.isArray($)?_9:typeof $.valueOf!="function"&&typeof $.toString!="function"||isNaN($)?T9:Vm)(Q,$)}var h3=An(()=>{ux(),y9(),b9(),k9(),s3(),A9(),S9(),d9(),Fk()});function FN(Q){var $=Q.length;return function(c){return Q[Math.max(0,Math.min($-1,Math.floor(c*$)))]}}var RN=An(()=>{});function BN(Q,$){var c=a3(+Q,+$);return function(g){var P=c(g);return P-360*Math.floor(P/360)}}var NN=An(()=>{cx()});function jN(Q,$){return Q=+Q,$=+$,function(c){return Math.round(Q*(1-c)+$*c)}}var UN=An(()=>{});function E9(Q,$,c,g,P,S){var t,e,r;return(t=Math.sqrt(Q*Q+$*$))&&(Q/=t,$/=t),(r=Q*c+$*g)&&(c-=Q*r,g-=$*r),(e=Math.sqrt(c*c+g*g))&&(c/=e,g/=e,r/=e),Q*g<$*c&&(Q=-Q,$=-$,r=-r,t=-t),{translateX:P,translateY:S,rotate:Math.atan2($,Q)*Rk,skewX:Math.atan(r)*Rk,scaleX:t,scaleY:e}}var Rk,f3,VN=An(()=>{Rk=180/Math.PI,f3={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function HN(Q){let $=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(Q+"");return $.isIdentity?f3:E9($.a,$.b,$.c,$.d,$.e,$.f)}function WN(Q){return Q==null?f3:(d3||(d3=document.createElementNS("http://www.w3.org/2000/svg","g")),d3.setAttribute("transform",Q),(Q=d3.transform.baseVal.consolidate())?(Q=Q.matrix,E9(Q.a,Q.b,Q.c,Q.d,Q.e,Q.f)):f3)}var d3,qN=An(()=>{VN()});function C9(Q,$,c,g){function P(a){return a.length?a.pop()+" ":""}function S(a,n,o,i,s,f){if(a!==o||n!==i){var x=s.push("translate(",null,$,null,c);f.push({i:x-4,x:Vm(a,o)},{i:x-2,x:Vm(n,i)})}else(o||i)&&s.push("translate("+o+$+i+c)}function t(a,n,o,i){a!==n?(a-n>180?n+=360:n-a>180&&(a+=360),i.push({i:o.push(P(o)+"rotate(",null,g)-2,x:Vm(a,n)})):n&&o.push(P(o)+"rotate("+n+g)}function e(a,n,o,i){a!==n?i.push({i:o.push(P(o)+"skewX(",null,g)-2,x:Vm(a,n)}):n&&o.push(P(o)+"skewX("+n+g)}function r(a,n,o,i,s,f){if(a!==o||n!==i){var x=s.push(P(s)+"scale(",null,",",null,")");f.push({i:x-4,x:Vm(a,o)},{i:x-2,x:Vm(n,i)})}else(o!==1||i!==1)&&s.push(P(s)+"scale("+o+","+i+")")}return function(a,n){var o=[],i=[];return a=Q(a),n=Q(n),S(a.translateX,a.translateY,n.translateX,n.translateY,o,i),t(a.rotate,n.rotate,o,i),e(a.skewX,n.skewX,o,i),r(a.scaleX,a.scaleY,n.scaleX,n.scaleY,o,i),a=n=null,function(s){for(var f=-1,x=i.length,y;++f{s3(),qN(),L9=C9(HN,"px, ","px)","deg)"),P9=C9(WN,", ",")",")")});function z9(Q){return((Q=Math.exp(Q))+1/Q)/2}function $N(Q){return((Q=Math.exp(Q))-1/Q)/2}function GN(Q){return((Q=Math.exp(2*Q))-1)/(Q+1)}var I9,O9,YN=An(()=>{I9=1e-12,O9=function Q($,c,g){function P(S,t){var e=S[0],r=S[1],a=S[2],n=t[0],o=t[1],i=t[2],s=n-e,f=o-r,x=s*s+f*f,y,v;if(x{ux(),cx(),F9=D9(a3),R9=D9(hp)});function XN(Q,$){var c=hp((Q=yk(Q)).l,($=yk($)).l),g=hp(Q.a,$.a),P=hp(Q.b,$.b),S=hp(Q.opacity,$.opacity);return function(t){return Q.l=c(t),Q.a=g(t),Q.b=P(t),Q.opacity=S(t),Q+""}}var JN=An(()=>{ux(),cx()});function B9(Q){return function($,c){var g=Q(($=kk($)).h,(c=kk(c)).h),P=hp($.c,c.c),S=hp($.l,c.l),t=hp($.opacity,c.opacity);return function(e){return $.h=g(e),$.c=P(e),$.l=S(e),$.opacity=t(e),$+""}}}var N9,j9,QN=An(()=>{ux(),cx(),N9=B9(a3),j9=B9(hp)});function U9(Q){return function $(c){c=+c;function g(P,S){var t=Q((P=Ck(P)).h,(S=Ck(S)).h),e=hp(P.s,S.s),r=hp(P.l,S.l),a=hp(P.opacity,S.opacity);return function(n){return P.h=t(n),P.s=e(n),P.l=r(Math.pow(n,c)),P.opacity=a(n),P+""}}return g.gamma=$,g}(1)}var V9,H9,tj=An(()=>{ux(),cx(),V9=U9(a3),H9=U9(hp)});function ej(Q,$){$===void 0&&($=Q,Q=c3);for(var c=0,g=$.length-1,P=$[0],S=new Array(g<0?0:g);c{h3()});function nj(Q,$){for(var c=new Array($),g=0;g<$;++g)c[g]=Q(g/($-1));return c}var ij=An(()=>{}),B1={};kn(B1,{interpolate:()=>c3,interpolateArray:()=>IN,interpolateBasis:()=>c9,interpolateBasisClosed:()=>h9,interpolateCubehelix:()=>V9,interpolateCubehelixLong:()=>H9,interpolateDate:()=>w9,interpolateDiscrete:()=>FN,interpolateHcl:()=>N9,interpolateHclLong:()=>j9,interpolateHsl:()=>F9,interpolateHslLong:()=>R9,interpolateHue:()=>BN,interpolateLab:()=>XN,interpolateNumber:()=>Vm,interpolateNumberArray:()=>Dk,interpolateObject:()=>T9,interpolateRgb:()=>o3,interpolateRgbBasis:()=>g9,interpolateRgbBasisClosed:()=>v9,interpolateRound:()=>jN,interpolateString:()=>M9,interpolateTransformCss:()=>L9,interpolateTransformSvg:()=>P9,interpolateZoom:()=>O9,piecewise:()=>ej,quantize:()=>nj});var hx=An(()=>{h3(),b9(),Ok(),f9(),k9(),RN(),NN(),s3(),Fk(),A9(),UN(),S9(),ZN(),YN(),y9(),KN(),JN(),QN(),tj(),rj(),ij()}),Bk=Ft((Q,$)=>{var c=js(),g=li();$.exports=function(P,S,t,e,r){var a=S.data.data,n=a.i,o=r||a.color;if(n>=0){S.i=a.i;var i=t.marker;i.pattern?(!i.colors||!i.pattern.shape)&&(i.color=o,S.color=o):(i.color=o,S.color=o),c.pointStyle(P,t,e,S)}else g.fill(P,o)}}),W9=Ft((Q,$)=>{var c=un(),g=li(),P=bn(),S=Rp().resizeText,t=Bk();function e(a){var n=a._fullLayout._sunburstlayer.selectAll(".trace");S(a,n,"sunburst"),n.each(function(o){var i=c.select(this),s=o[0],f=s.trace;i.style("opacity",f.opacity),i.selectAll("path.surface").each(function(x){c.select(this).call(r,x,f,a)})})}function r(a,n,o,i){var s=n.data.data,f=!n.children,x=s.i,y=P.castOption(o,x,"marker.line.color")||g.defaultLine,v=P.castOption(o,x,"marker.line.width")||0;a.call(t,n,o,i).style("stroke-width",v).call(g.stroke,y).style("opacity",f?o.leaf.opacity:null)}$.exports={style:e,styleOne:r}}),kv=Ft(Q=>{var $=bn(),c=li(),g=P0(),P=xg();Q.findEntryWithLevel=function(r,a){var n;return a&&r.eachAfter(function(o){if(Q.getPtId(o)===a)return n=o.copy()}),n||r},Q.findEntryWithChild=function(r,a){var n;return r.eachAfter(function(o){for(var i=o.children||[],s=0;s0)},Q.getMaxDepth=function(r){return r.maxdepth>=0?r.maxdepth:1/0},Q.isHeader=function(r,a){return!(Q.isLeaf(r)||r.depth===a._maxDepth-1)};function e(r){return r.data.data.pid}Q.getParent=function(r,a){return Q.findEntryWithLevel(r,e(a))},Q.listPath=function(r,a){var n=r.parent;if(!n)return[];var o=a?[n.data[a]]:[n];return Q.listPath(n,a).concat(o)},Q.getPath=function(r){return Q.listPath(r,"label").join("/")+"/"},Q.formatValue=P.formatPieValue,Q.formatPercent=function(r,a){var n=$.formatPercent(r,0);return n==="0%"&&(n=P.formatPiePercent(r,a)),n}}),p3=Ft((Q,$)=>{var c=un(),g=Xo(),P=Dp().appendArrayPointValue,S=Qh(),t=bn(),e=Om(),r=kv(),a=xg(),n=a.formatPieValue;$.exports=function(i,s,f,x,y){var v=x[0],T=v.trace,u=v.hierarchy,b=T.type==="sunburst",_=T.type==="treemap"||T.type==="icicle";"_hasHoverLabel"in T||(T._hasHoverLabel=!1),"_hasHoverEvent"in T||(T._hasHoverEvent=!1);var C=function(A){var h=f._fullLayout;if(!(f._dragging||h.hovermode===!1)){var p=f._fullData[T.index],k=A.data.data,w=k.i,R=r.isHierarchyRoot(A),O=r.getParent(u,A),N=r.getValue(A),V=function(Y){return t.castOption(p,w,Y)},H=V("hovertemplate"),F=S.castHoverinfo(p,h,w),U=h.separators,W;if(H||F&&F!=="none"&&F!=="skip"){var q,X;b&&(q=v.cx+A.pxmid[0]*(1-A.rInscribed),X=v.cy+A.pxmid[1]*(1-A.rInscribed)),_&&(q=A._hoverX,X=A._hoverY);var lt={},yt=[],pt=[],st=function(Y){return yt.indexOf(Y)!==-1};F&&(yt=F==="all"?p._module.attributes.hoverinfo.flags:F.split("+")),lt.label=k.label,st("label")&<.label&&pt.push(lt.label),k.hasOwnProperty("v")&&(lt.value=k.v,lt.valueLabel=n(lt.value,U),st("value")&&pt.push(lt.valueLabel)),lt.currentPath=A.currentPath=r.getPath(A.data),st("current path")&&!R&&pt.push(lt.currentPath);var tt,dt=[],rt=function(){dt.indexOf(tt)===-1&&(pt.push(tt),dt.push(tt))};lt.percentParent=A.percentParent=N/r.getValue(O),lt.parent=A.parentString=r.getPtLabel(O),st("percent parent")&&(tt=r.formatPercent(lt.percentParent,U)+" of "+lt.parent,rt()),lt.percentEntry=A.percentEntry=N/r.getValue(s),lt.entry=A.entry=r.getPtLabel(s),st("percent entry")&&!R&&!A.onPathbar&&(tt=r.formatPercent(lt.percentEntry,U)+" of "+lt.entry,rt()),lt.percentRoot=A.percentRoot=N/r.getValue(u),lt.root=A.root=r.getPtLabel(u),st("percent root")&&!R&&(tt=r.formatPercent(lt.percentRoot,U)+" of "+lt.root,rt()),lt.text=V("hovertext")||V("text"),st("text")&&(tt=lt.text,t.isValidTextValue(tt)&&pt.push(tt)),W=[o(A,p,y.eventDataKeys)];var at={trace:p,y:X,_x0:A._x0,_x1:A._x1,_y0:A._y0,_y1:A._y1,text:pt.join("
"),name:H||st("name")?p.name:void 0,color:V("hoverlabel.bgcolor")||k.color,borderColor:V("hoverlabel.bordercolor"),fontFamily:V("hoverlabel.font.family"),fontSize:V("hoverlabel.font.size"),fontColor:V("hoverlabel.font.color"),fontWeight:V("hoverlabel.font.weight"),fontStyle:V("hoverlabel.font.style"),fontVariant:V("hoverlabel.font.variant"),nameLength:V("hoverlabel.namelength"),textAlign:V("hoverlabel.align"),hovertemplate:H,hovertemplateLabels:lt,eventData:W};b&&(at.x0=q-A.rInscribed*A.rpx1,at.x1=q+A.rInscribed*A.rpx1,at.idealAlign=A.pxmid[0]<0?"left":"right"),_&&(at.x=q,at.idealAlign=q<0?"left":"right");var vt=[];S.loneHover(at,{container:h._hoverlayer.node(),outerContainer:h._paper.node(),gd:f,inOut_bbox:vt}),W[0].bbox=vt[0],T._hasHoverLabel=!0}if(_){var it=i.select("path.surface");y.styleOne(it,A,p,f,{hovered:!0})}T._hasHoverEvent=!0,f.emit("plotly_hover",{points:W||[o(A,p,y.eventDataKeys)],event:c.event})}},M=function(A){var h=f._fullLayout,p=f._fullData[T.index],k=c.select(this).datum();if(T._hasHoverEvent&&(A.originalEvent=c.event,f.emit("plotly_unhover",{points:[o(k,p,y.eventDataKeys)],event:c.event}),T._hasHoverEvent=!1),T._hasHoverLabel&&(S.loneUnhover(h._hoverlayer.node()),T._hasHoverLabel=!1),_){var w=i.select("path.surface");y.styleOne(w,k,p,f,{hovered:!1})}},E=function(A){var h=f._fullLayout,p=f._fullData[T.index],k=b&&(r.isHierarchyRoot(A)||r.isLeaf(A)),w=r.getPtId(A),R=r.isEntry(A)?r.findEntryWithChild(u,w):r.findEntryWithLevel(u,w),O=r.getPtId(R),N={points:[o(A,p,y.eventDataKeys)],event:c.event};k||(N.nextLevel=O);var V=e.triggerHandler(f,"plotly_"+T.type+"click",N);if(V!==!1&&h.hovermode&&(f._hoverdata=[o(A,p,y.eventDataKeys)],S.click(f,c.event)),!k&&V!==!1&&!f._dragging&&!f._transitioning){g.call("_storeDirectGUIEdit",p,h._tracePreGUI[p.uid],{level:p.level});var H={data:[{level:O}],traces:[T.index]},F={frame:{redraw:!1,duration:y.transitionTime},transition:{duration:y.transitionTime,easing:y.transitionEasing},mode:"immediate",fromcurrent:!0};S.loneUnhover(h._hoverlayer.node()),g.call("animate",f,H,F)}};i.on("mouseover",C),i.on("mouseout",M),i.on("click",E)};function o(i,s,f){for(var x=i.data.data,y={curveNumber:s.index,pointNumber:x.i,data:s._input,fullData:s},v=0;v{var $=un(),c=Xw(),g=(hx(),ai(B1)).interpolate,P=js(),S=bn(),t=tc(),e=Rp(),r=e.recordMinTextSize,a=e.clearMinTextSize,n=uk(),o=xg().getRotationAngle,i=n.computeTransform,s=n.transformInsideText,f=W9().styleOne,x=xm().resizeText,y=p3(),v=V7(),T=kv();Q.plot=function(E,A,h,p){var k=E._fullLayout,w=k._sunburstlayer,R,O,N=!h,V=!k.uniformtext.mode&&T.hasTransition(h);if(a("sunburst",k),R=w.selectAll("g.trace.sunburst").data(A,function(F){return F[0].trace.uid}),R.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),R.order(),V){p&&(O=p());var H=$.transition().duration(h.duration).ease(h.easing).each("end",function(){O&&O()}).each("interrupt",function(){O&&O()});H.each(function(){w.selectAll("g.trace").each(function(F){u(E,F,this,h)})})}else R.each(function(F){u(E,F,this,h)}),k.uniformtext.mode&&x(E,k._sunburstlayer.selectAll(".trace"),"sunburst");N&&R.exit().remove()};function u(E,A,h,p){var k=E._context.staticPlot,w=E._fullLayout,R=!w.uniformtext.mode&&T.hasTransition(p),O=$.select(h),N=O.selectAll("g.slice"),V=A[0],H=V.trace,F=V.hierarchy,U=T.findEntryWithLevel(F,H.level),W=T.getMaxDepth(H),q=w._size,X=H.domain,lt=q.w*(X.x[1]-X.x[0]),yt=q.h*(X.y[1]-X.y[0]),pt=.5*Math.min(lt,yt),st=V.cx=q.l+q.w*(X.x[1]+X.x[0])/2,tt=V.cy=q.t+q.h*(1-X.y[0])-yt/2;if(!U)return N.remove();var dt=null,rt={};R&&N.each(function(Mt){rt[T.getPtId(Mt)]={rpx0:Mt.rpx0,rpx1:Mt.rpx1,x0:Mt.x0,x1:Mt.x1,transform:Mt.transform},!dt&&T.isEntry(Mt)&&(dt=Mt)});var at=b(U).descendants(),vt=U.height+1,it=0,Y=W;V.hasMultipleRoots&&T.isHierarchyRoot(U)&&(at=at.slice(1),vt-=1,it=1,Y+=1),at=at.filter(function(Mt){return Mt.y1<=Y});var ft=o(H.rotation);ft&&at.forEach(function(Mt){Mt.x0+=ft,Mt.x1+=ft});var ut=Math.min(vt,W),wt=function(Mt){return(Mt-it)/ut*pt},zt=function(Mt,te){return[Mt*Math.cos(te),-Mt*Math.sin(te)]},Pt=function(Mt){return S.pathAnnulus(Mt.rpx0,Mt.rpx1,Mt.x0,Mt.x1,st,tt)},Wt=function(Mt){return st+C(Mt)[0]*(Mt.transform.rCenter||0)+(Mt.transform.x||0)},Ht=function(Mt){return tt+C(Mt)[1]*(Mt.transform.rCenter||0)+(Mt.transform.y||0)};N=N.data(at,T.getPtId),N.enter().append("g").classed("slice",!0),R?N.exit().transition().each(function(){var Mt=$.select(this),te=Mt.select("path.surface");te.transition().attrTween("d",function(oe){var Te=de(oe);return function(He){return Pt(Te(He))}});var ve=Mt.select("g.slicetext");ve.attr("opacity",0)}).remove():N.exit().remove(),N.order();var Jt=null;if(R&&dt){var ge=T.getPtId(dt);N.each(function(Mt){Jt===null&&T.getPtId(Mt)===ge&&(Jt=Mt.x1)})}var he=N;R&&(he=he.transition().each("end",function(){var Mt=$.select(this);T.setSliceCursor(Mt,E,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),he.each(function(Mt){var te=$.select(this),ve=S.ensureSingle(te,"path","surface",function(ur){ur.style("pointer-events",k?"none":"all")});Mt.rpx0=wt(Mt.y0),Mt.rpx1=wt(Mt.y1),Mt.xmid=(Mt.x0+Mt.x1)/2,Mt.pxmid=zt(Mt.rpx1,Mt.xmid),Mt.midangle=-(Mt.xmid-Math.PI/2),Mt.startangle=-(Mt.x0-Math.PI/2),Mt.stopangle=-(Mt.x1-Math.PI/2),Mt.halfangle=.5*Math.min(S.angleDelta(Mt.x0,Mt.x1)||Math.PI,Math.PI),Mt.ring=1-Mt.rpx0/Mt.rpx1,Mt.rInscribed=_(Mt),R?ve.transition().attrTween("d",function(ur){var jr=se(ur);return function(Hr){return Pt(jr(Hr))}}):ve.attr("d",Pt),te.call(y,U,E,A,{eventDataKeys:v.eventDataKeys,transitionTime:v.CLICK_TRANSITION_TIME,transitionEasing:v.CLICK_TRANSITION_EASING}).call(T.setSliceCursor,E,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:E._transitioning}),ve.call(f,Mt,H,E);var oe=S.ensureSingle(te,"g","slicetext"),Te=S.ensureSingle(oe,"text","",function(ur){ur.attr("data-notex",1)}),He=S.ensureUniformFontSize(E,T.determineTextFont(H,Mt,w.font));Te.text(Q.formatSliceLabel(Mt,U,H,A,w)).classed("slicetext",!0).attr("text-anchor","middle").call(P.font,He).call(t.convertToTspans,E);var Ge=P.bBox(Te.node());Mt.transform=s(Ge,Mt,V),Mt.transform.targetX=Wt(Mt),Mt.transform.targetY=Ht(Mt);var cr=function(ur,jr){var Hr=ur.transform;return i(Hr,jr),Hr.fontSize=He.size,r(H.type,Hr,w),S.getTextTransform(Hr)};R?Te.transition().attrTween("transform",function(ur){var jr=Tt(ur);return function(Hr){return cr(jr(Hr),Ge)}}):Te.attr("transform",cr(Mt,Ge))});function de(Mt){var te=T.getPtId(Mt),ve=rt[te],oe=rt[T.getPtId(U)],Te;if(oe){var He=(Mt.x1>oe.x1?2*Math.PI:0)+ft;Te=Mt.rpx1Jt?2*Math.PI:0)+ft;ve={x0:Te,x1:Te}}else ve={rpx0:pt,rpx1:pt},S.extendFlat(ve,Lt(Mt));else ve={rpx0:0,rpx1:0};else ve={x0:ft,x1:ft};return g(ve,oe)}function Tt(Mt){var te=rt[T.getPtId(Mt)],ve,oe=Mt.transform;if(te)ve=te;else if(ve={rpx1:Mt.rpx1,transform:{textPosAngle:oe.textPosAngle,scale:0,rotate:oe.rotate,rCenter:oe.rCenter,x:oe.x,y:oe.y}},dt)if(Mt.parent)if(Jt){var Te=Mt.x1>Jt?2*Math.PI:0;ve.x0=ve.x1=Te}else S.extendFlat(ve,Lt(Mt));else ve.x0=ve.x1=ft;else ve.x0=ve.x1=ft;var He=g(ve.transform.textPosAngle,Mt.transform.textPosAngle),Ge=g(ve.rpx1,Mt.rpx1),cr=g(ve.x0,Mt.x0),ur=g(ve.x1,Mt.x1),jr=g(ve.transform.scale,oe.scale),Hr=g(ve.transform.rotate,oe.rotate),br=oe.rCenter===0?3:ve.transform.rCenter===0?1/3:1,Kr=g(ve.transform.rCenter,oe.rCenter),rn=function(Ce){return Kr(Math.pow(Ce,br))};return function(Ce){var $t=Ge(Ce);cr(Ce),ur(Ce);var ne=rn(Ce),Ct=He(Ce),gt={rpx1:$t,transform:{textPosAngle:Ct,rCenter:ne,x:oe.x,y:oe.y}};return r(H.type,oe,w),{transform:{targetX:Wt(gt),targetY:Ht(gt),scale:jr(Ce),rotate:Hr(Ce),rCenter:ne}}}}function Lt(Mt){var te=Mt.parent,ve=rt[T.getPtId(te)],oe={};if(ve){var Te=te.children,He=Te.indexOf(Mt),Ge=Te.length,cr=g(ve.x0,ve.x1);oe.x0=cr(He/Ge),oe.x1=cr(He/Ge)}else oe.x0=oe.x1=0;return oe}}function b(E){return c.partition().size([2*Math.PI,E.height+1])(E)}Q.formatSliceLabel=function(E,A,h,p,k){var w=h.texttemplate,R=h.textinfo;if(!w&&(!R||R==="none"))return"";var O=k.separators,N=p[0],V=E.data.data,H=N.hierarchy,F=T.isHierarchyRoot(E),U=T.getParent(H,E),W=T.getValue(E);if(!w){var q=R.split("+"),X=function(it){return q.indexOf(it)!==-1},lt=[],yt;if(X("label")&&V.label&<.push(V.label),V.hasOwnProperty("v")&&X("value")&<.push(T.formatValue(V.v,O)),!F){X("current path")&<.push(T.getPath(E.data));var pt=0;X("percent parent")&&pt++,X("percent entry")&&pt++,X("percent root")&&pt++;var st=pt>1;if(pt){var tt,dt=function(it){yt=T.formatPercent(tt,O),st&&(yt+=" of "+it),lt.push(yt)};X("percent parent")&&!F&&(tt=W/T.getValue(U),dt("parent")),X("percent entry")&&(tt=W/T.getValue(A),dt("entry")),X("percent root")&&(tt=W/T.getValue(H),dt("root"))}}return X("text")&&(yt=S.castOption(h,V.i,"text"),S.isValidTextValue(yt)&<.push(yt)),lt.join("
")}var rt=S.castOption(h,V.i,"texttemplate");if(!rt)return"";var at={};V.label&&(at.label=V.label),V.hasOwnProperty("v")&&(at.value=V.v,at.valueLabel=T.formatValue(V.v,O)),at.currentPath=T.getPath(E.data),F||(at.percentParent=W/T.getValue(U),at.percentParentLabel=T.formatPercent(at.percentParent,O),at.parent=T.getPtLabel(U)),at.percentEntry=W/T.getValue(A),at.percentEntryLabel=T.formatPercent(at.percentEntry,O),at.entry=T.getPtLabel(A),at.percentRoot=W/T.getValue(H),at.percentRootLabel=T.formatPercent(at.percentRoot,O),at.root=T.getPtLabel(H),V.hasOwnProperty("color")&&(at.color=V.color);var vt=S.castOption(h,V.i,"text");return(S.isValidTextValue(vt)||vt==="")&&(at.text=vt),at.customdata=S.castOption(h,V.i,"customdata"),S.texttemplateString({data:[at,h._meta],fallback:h.texttemplatefallback,labels:at,locale:k._d3locale,template:rt})};function _(E){return E.rpx0===0&&S.isFullCircle([E.x0,E.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(E.halfangle)),E.ring/2))}function C(E){return M(E.rpx1,E.transform.textPosAngle)}function M(E,A){return[E*Math.sin(A),-E*Math.cos(A)]}}),aj=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"sunburst",basePlotModule:bN(),categories:[],animatable:!0,attributes:Kw(),layoutAttributes:H7(),supplyDefaults:wN(),supplyLayoutDefaults:kN(),calc:Jw().calc,crossTraceCalc:Jw().crossTraceCalc,plot:Nk().plot,style:W9().style,colorbar:xo(),meta:{}}}),oj=Ft((Q,$)=>{$.exports=aj()}),sj=Ft(Q=>{var $=Kc();Q.name="treemap",Q.plot=function(c,g,P,S){$.plotBasePlot(Q.name,c,g,P,S)},Q.clean=function(c,g,P,S){$.cleanBasePlot(Q.name,c,g,P,S)}}),fx=Ft((Q,$)=>{$.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}),jk=Ft((Q,$)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=Tc(),t=Nh().attributes,e=ix(),r=Kw(),a=fx(),n=Ta().extendFlat,o=Td().pattern;$.exports={labels:r.labels,parents:r.parents,values:r.values,branchvalues:r.branchvalues,count:r.count,level:r.level,maxdepth:r.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:n({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:r.marker.colors,pattern:o,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:r.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},S("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:n({},e.textfont,{}),editType:"calc"},text:e.text,textinfo:r.textinfo,texttemplate:g({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:P({editType:"plot"}),hovertext:e.hovertext,hoverinfo:r.hoverinfo,hovertemplate:c({},{keys:a.eventDataKeys}),hovertemplatefallback:P(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:n({},e.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:e.sort,root:r.root,domain:t({name:"treemap",trace:!0,editType:"calc"})}}),q9=Ft((Q,$)=>{$.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),lj=Ft((Q,$)=>{var c=bn(),g=jk(),P=li(),S=Nh().defaults,t=J0().handleText,e=Jy().TEXTPAD,r=ax().handleMarkerDefaults,a=Xc(),n=a.hasColorscale,o=a.handleDefaults;$.exports=function(i,s,f,x){function y(p,k){return c.coerce(i,s,g,p,k)}var v=y("labels"),T=y("parents");if(!v||!v.length||!T||!T.length){s.visible=!1;return}var u=y("values");u&&u.length?y("branchvalues"):y("count"),y("level"),y("maxdepth");var b=y("tiling.packing");b==="squarify"&&y("tiling.squarifyratio"),y("tiling.flip"),y("tiling.pad");var _=y("text");y("texttemplate"),y("texttemplatefallback"),s.texttemplate||y("textinfo",c.isArrayOrTypedArray(_)?"text+label":"label"),y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var C=y("pathbar.visible"),M="auto";t(i,s,x,y,M,{hasPathbar:C,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),y("textposition");var E=s.textposition.indexOf("bottom")!==-1;r(i,s,x,y);var A=s._hasColorscale=n(i,"marker","colors")||(i.marker||{}).coloraxis;A?o(i,s,x,y,{prefix:"marker.",cLetter:"c"}):y("marker.depthfade",!(s.marker.colors||[]).length);var h=s.textfont.size*2;y("marker.pad.t",E?h/4:h),y("marker.pad.l",h/4),y("marker.pad.r",h/4),y("marker.pad.b",E?h:h/4),y("marker.cornerradius"),s._hovered={marker:{line:{width:2,color:P.contrast(x.paper_bgcolor)}}},C&&(y("pathbar.thickness",s.pathbar.textfont.size+2*e),y("pathbar.side"),y("pathbar.edgeshape")),y("sort"),y("root.color"),S(s,x,y),s._length=null}}),uj=Ft((Q,$)=>{var c=bn(),g=q9();$.exports=function(P,S){function t(e,r){return c.coerce(P,S,g,e,r)}t("treemapcolorway",S.colorway),t("extendtreemapcolors")}}),Z9=Ft(Q=>{var $=Jw();Q.calc=function(c,g){return $.calc(c,g)},Q.crossTraceCalc=function(c){return $._runCrossTraceCalc("treemap",c)}}),$9=Ft((Q,$)=>{$.exports=function c(g,P,S){var t;S.swapXY&&(t=g.x0,g.x0=g.y0,g.y0=t,t=g.x1,g.x1=g.y1,g.y1=t),S.flipX&&(t=g.x0,g.x0=P[0]-g.x1,g.x1=P[0]-t),S.flipY&&(t=g.y0,g.y0=P[1]-g.y1,g.y1=P[1]-t);var e=g.children;if(e)for(var r=0;r{var c=Xw(),g=$9();$.exports=function(S,t,e){var r=e.flipX,a=e.flipY,n=e.packing==="dice-slice",o=e.pad[a?"bottom":"top"],i=e.pad[r?"right":"left"],s=e.pad[r?"left":"right"],f=e.pad[a?"top":"bottom"],x;n&&(x=i,i=o,o=x,x=s,s=f,f=x);var y=c.treemap().tile(P(e.packing,e.squarifyratio)).paddingInner(e.pad.inner).paddingLeft(i).paddingRight(s).paddingTop(o).paddingBottom(f).size(n?[t[1],t[0]]:t)(S);return(n||r||a)&&g(y,t,{swapXY:n,flipX:r,flipY:a}),y};function P(S,t){switch(S){case"squarify":return c.treemapSquarify.ratio(t);case"binary":return c.treemapBinary;case"dice":return c.treemapDice;case"slice":return c.treemapSlice;default:return c.treemapSliceDice}}}),Uk=Ft((Q,$)=>{var c=un(),g=li(),P=bn(),S=kv(),t=Rp().resizeText,e=Bk();function r(n){var o=n._fullLayout._treemaplayer.selectAll(".trace");t(n,o,"treemap"),o.each(function(i){var s=c.select(this),f=i[0],x=f.trace;s.style("opacity",x.opacity),s.selectAll("path.surface").each(function(y){c.select(this).call(a,y,x,n,{hovered:!1})})})}function a(n,o,i,s,f){var x=(f||{}).hovered,y=o.data.data,v=y.i,T,u,b=y.color,_=S.isHierarchyRoot(o),C=1;if(x)T=i._hovered.marker.line.color,u=i._hovered.marker.line.width;else if(_&&b===i.root.color)C=100,T="rgba(0,0,0,0)",u=0;else if(T=P.castOption(i,v,"marker.line.color")||g.defaultLine,u=P.castOption(i,v,"marker.line.width")||0,!i._hasColorscale&&!o.onPathbar){var M=i.marker.depthfade;if(M){var E=g.combine(g.addOpacity(i._backgroundColor,.75),b),A;if(M===!0){var h=S.getMaxDepth(i);isFinite(h)?S.isLeaf(o)?A=0:A=i._maxVisibleLayers-(o.data.depth-i._entryDepth):A=o.data.height+1}else A=o.data.depth-i._entryDepth,i._atRootLevel||A++;if(A>0)for(var p=0;p{var c=un(),g=bn(),P=js(),S=tc(),t=G9(),e=Uk().styleOne,r=fx(),a=kv(),n=p3(),o=!0;$.exports=function(i,s,f,x,y){var v=y.barDifY,T=y.width,u=y.height,b=y.viewX,_=y.viewY,C=y.pathSlice,M=y.toMoveInsideSlice,E=y.strTransform,A=y.hasTransition,h=y.handleSlicesExit,p=y.makeUpdateSliceInterpolator,k=y.makeUpdateTextInterpolator,w={},R=i._context.staticPlot,O=i._fullLayout,N=s[0],V=N.trace,H=N.hierarchy,F=T/V._entryDepth,U=a.listPath(f.data,"id"),W=t(H.copy(),[T,u],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();W=W.filter(function(X){var lt=U.indexOf(X.data.id);return lt===-1?!1:(X.x0=F*lt,X.x1=F*(lt+1),X.y0=v,X.y1=v+u,X.onPathbar=!0,!0)}),W.reverse(),x=x.data(W,a.getPtId),x.enter().append("g").classed("pathbar",!0),h(x,o,w,[T,u],C),x.order();var q=x;A&&(q=q.transition().each("end",function(){var X=c.select(this);a.setSliceCursor(X,i,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),q.each(function(X){X._x0=b(X.x0),X._x1=b(X.x1),X._y0=_(X.y0),X._y1=_(X.y1),X._hoverX=b(X.x1-Math.min(T,u)/2),X._hoverY=_(X.y1-u/2);var lt=c.select(this),yt=g.ensureSingle(lt,"path","surface",function(dt){dt.style("pointer-events",R?"none":"all")});A?yt.transition().attrTween("d",function(dt){var rt=p(dt,o,w,[T,u]);return function(at){return C(rt(at))}}):yt.attr("d",C),lt.call(n,f,i,s,{styleOne:e,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,i,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:i._transitioning}),yt.call(e,X,V,i,{hovered:!1}),X._text=(a.getPtLabel(X)||"").split("
").join(" ")||"";var pt=g.ensureSingle(lt,"g","slicetext"),st=g.ensureSingle(pt,"text","",function(dt){dt.attr("data-notex",1)}),tt=g.ensureUniformFontSize(i,a.determineTextFont(V,X,O.font,{onPathbar:!0}));st.text(X._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(P.font,tt).call(S.convertToTspans,i),X.textBB=P.bBox(st.node()),X.transform=M(X,{fontSize:tt.size,onPathbar:!0}),X.transform.fontSize=tt.size,A?st.transition().attrTween("transform",function(dt){var rt=k(dt,o,w,[T,u]);return function(at){return E(rt(at))}}):st.attr("transform",E(X))})}}),hj=Ft((Q,$)=>{var c=un(),g=(hx(),ai(B1)).interpolate,P=kv(),S=bn(),t=Jy().TEXTPAD,e=Qy(),r=e.toMoveInsideBar,a=Rp(),n=a.recordMinTextSize,o=fx(),i=cj();function s(f){return P.isHierarchyRoot(f)?"":P.getPtId(f)}$.exports=function(f,x,y,v,T){var u=f._fullLayout,b=x[0],_=b.trace,C=_.type,M=C==="icicle",E=b.hierarchy,A=P.findEntryWithLevel(E,_.level),h=c.select(y),p=h.selectAll("g.pathbar"),k=h.selectAll("g.slice");if(!A){p.remove(),k.remove();return}var w=P.isHierarchyRoot(A),R=!u.uniformtext.mode&&P.hasTransition(v),O=P.getMaxDepth(_),N=function(br){return br.data.depth-A.data.depth-1?U+X:-(q+X):0,yt={x0:W,x1:W,y0:lt,y1:lt+q},pt=function(br,Kr,rn){var Ce=_.tiling.pad,$t=function(St){return St-Ce<=Kr.x0},ne=function(St){return St+Ce>=Kr.x1},Ct=function(St){return St-Ce<=Kr.y0},gt=function(St){return St+Ce>=Kr.y1};return br.x0===Kr.x0&&br.x1===Kr.x1&&br.y0===Kr.y0&&br.y1===Kr.y1?{x0:br.x0,x1:br.x1,y0:br.y0,y1:br.y1}:{x0:$t(br.x0-Ce)?0:ne(br.x0-Ce)?rn[0]:br.x0,x1:$t(br.x1+Ce)?0:ne(br.x1+Ce)?rn[0]:br.x1,y0:Ct(br.y0-Ce)?0:gt(br.y0-Ce)?rn[1]:br.y0,y1:Ct(br.y1+Ce)?0:gt(br.y1+Ce)?rn[1]:br.y1}},st=null,tt={},dt={},rt=null,at=function(br,Kr){return Kr?tt[s(br)]:dt[s(br)]},vt=function(br,Kr,rn,Ce){if(Kr)return tt[s(E)]||yt;var $t=dt[_.level]||rn;return N(br)?pt(br,$t,Ce):{}};b.hasMultipleRoots&&w&&O++,_._maxDepth=O,_._backgroundColor=u.paper_bgcolor,_._entryDepth=A.data.depth,_._atRootLevel=w;var it=-F/2+V.l+V.w*(H.x[1]+H.x[0])/2,Y=-U/2+V.t+V.h*(1-(H.y[1]+H.y[0])/2),ft=function(br){return it+br},ut=function(br){return Y+br},wt=ut(0),zt=ft(0),Pt=function(br){return zt+br},Wt=function(br){return wt+br};function Ht(br,Kr){return br+","+Kr}var Jt=Pt(0),ge=function(br){br.x=Math.max(Jt,br.x)},he=_.pathbar.edgeshape,de=function(br){var Kr=Pt(Math.max(Math.min(br.x0,br.x0),0)),rn=Pt(Math.min(Math.max(br.x1,br.x1),W)),Ce=Wt(br.y0),$t=Wt(br.y1),ne=q/2,Ct={},gt={};Ct.x=Kr,gt.x=rn,Ct.y=gt.y=(Ce+$t)/2;var St={x:Kr,y:Ce},Nt={x:rn,y:Ce},ee={x:rn,y:$t},le={x:Kr,y:$t};return he===">"?(St.x-=ne,Nt.x-=ne,ee.x-=ne,le.x-=ne):he==="/"?(ee.x-=ne,le.x-=ne,Ct.x-=ne/2,gt.x-=ne/2):he==="\\"?(St.x-=ne,Nt.x-=ne,Ct.x-=ne/2,gt.x-=ne/2):he==="<"&&(Ct.x-=ne,gt.x-=ne),ge(St),ge(le),ge(Ct),ge(Nt),ge(ee),ge(gt),"M"+Ht(St.x,St.y)+"L"+Ht(Nt.x,Nt.y)+"L"+Ht(gt.x,gt.y)+"L"+Ht(ee.x,ee.y)+"L"+Ht(le.x,le.y)+"L"+Ht(Ct.x,Ct.y)+"Z"},se=_[M?"tiling":"marker"].pad,Tt=function(br){return _.textposition.indexOf(br)!==-1},Lt=Tt("top"),Mt=Tt("left"),te=Tt("right"),ve=Tt("bottom"),oe=function(br){var Kr=ft(br.x0),rn=ft(br.x1),Ce=ut(br.y0),$t=ut(br.y1),ne=rn-Kr,Ct=$t-Ce;if(!ne||!Ct)return"";var gt=_.marker.cornerradius||0,St=Math.min(gt,ne/2,Ct/2);St&&br.data&&br.data.data&&br.data.data.label&&(Lt&&(St=Math.min(St,se.t)),Mt&&(St=Math.min(St,se.l)),te&&(St=Math.min(St,se.r)),ve&&(St=Math.min(St,se.b)));var Nt=function(ee,le){return St?"a"+Ht(St,St)+" 0 0 1 "+Ht(ee,le):""};return"M"+Ht(Kr,Ce+St)+Nt(St,-St)+"L"+Ht(rn-St,Ce)+Nt(St,St)+"L"+Ht(rn,$t-St)+Nt(-St,St)+"L"+Ht(Kr+St,$t)+Nt(-St,-St)+"Z"},Te=function(br,Kr){var rn=br.x0,Ce=br.x1,$t=br.y0,ne=br.y1,Ct=br.textBB,gt=Lt||Kr.isHeader&&!ve,St=gt?"start":ve?"end":"middle",Nt=Tt("right"),ee=Tt("left")||Kr.onPathbar,le=ee?-1:Nt?1:0;if(Kr.isHeader){if(rn+=(M?se:se.l)-t,Ce-=(M?se:se.r)-t,rn>=Ce){var we=(rn+Ce)/2;rn=we,Ce=we}var Ue;ve?(Ue=ne-(M?se:se.b),$t{var c=un(),g=kv(),P=Rp(),S=P.clearMinTextSize,t=xm().resizeText,e=hj();$.exports=function(r,a,n,o,i){var s=i.type,f=i.drawDescendants,x=r._fullLayout,y=x["_"+s+"layer"],v,T,u=!n;if(S(s,x),v=y.selectAll("g.trace."+s).data(a,function(_){return _[0].trace.uid}),v.enter().append("g").classed("trace",!0).classed(s,!0),v.order(),!x.uniformtext.mode&&g.hasTransition(n)){o&&(T=o());var b=c.transition().duration(n.duration).ease(n.easing).each("end",function(){T&&T()}).each("interrupt",function(){T&&T()});b.each(function(){y.selectAll("g.trace").each(function(_){e(r,_,this,n,f)})})}else v.each(function(_){e(r,_,this,n,f)}),x.uniformtext.mode&&t(r,y.selectAll(".trace"),s);u&&v.exit().remove()}}),fj=Ft((Q,$)=>{var c=un(),g=bn(),P=js(),S=tc(),t=G9(),e=Uk().styleOne,r=fx(),a=kv(),n=p3(),o=Nk().formatSliceLabel,i=!1;$.exports=function(s,f,x,y,v){var T=v.width,u=v.height,b=v.viewX,_=v.viewY,C=v.pathSlice,M=v.toMoveInsideSlice,E=v.strTransform,A=v.hasTransition,h=v.handleSlicesExit,p=v.makeUpdateSliceInterpolator,k=v.makeUpdateTextInterpolator,w=v.prevEntry,R={},O=s._context.staticPlot,N=s._fullLayout,V=f[0],H=V.trace,F=H.textposition.indexOf("left")!==-1,U=H.textposition.indexOf("right")!==-1,W=H.textposition.indexOf("bottom")!==-1,q=!W&&!H.marker.pad.t||W&&!H.marker.pad.b,X=t(x,[T,u],{packing:H.tiling.packing,squarifyratio:H.tiling.squarifyratio,flipX:H.tiling.flip.indexOf("x")>-1,flipY:H.tiling.flip.indexOf("y")>-1,pad:{inner:H.tiling.pad,top:H.marker.pad.t,left:H.marker.pad.l,right:H.marker.pad.r,bottom:H.marker.pad.b}}),lt=X.descendants(),yt=1/0,pt=-1/0;lt.forEach(function(at){var vt=at.depth;vt>=H._maxDepth?(at.x0=at.x1=(at.x0+at.x1)/2,at.y0=at.y1=(at.y0+at.y1)/2):(yt=Math.min(yt,vt),pt=Math.max(pt,vt))}),y=y.data(lt,a.getPtId),H._maxVisibleLayers=isFinite(pt)?pt-yt+1:0,y.enter().append("g").classed("slice",!0),h(y,i,R,[T,u],C),y.order();var st=null;if(A&&w){var tt=a.getPtId(w);y.each(function(at){st===null&&a.getPtId(at)===tt&&(st={x0:at.x0,x1:at.x1,y0:at.y0,y1:at.y1})})}var dt=function(){return st||{x0:0,x1:T,y0:0,y1:u}},rt=y;return A&&(rt=rt.transition().each("end",function(){var at=c.select(this);a.setSliceCursor(at,s,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),rt.each(function(at){var vt=a.isHeader(at,H);at._x0=b(at.x0),at._x1=b(at.x1),at._y0=_(at.y0),at._y1=_(at.y1),at._hoverX=b(at.x1-H.marker.pad.r),at._hoverY=_(W?at.y1-H.marker.pad.b/2:at.y0+H.marker.pad.t/2);var it=c.select(this),Y=g.ensureSingle(it,"path","surface",function(Wt){Wt.style("pointer-events",O?"none":"all")});A?Y.transition().attrTween("d",function(Wt){var Ht=p(Wt,i,dt(),[T,u]);return function(Jt){return C(Ht(Jt))}}):Y.attr("d",C),it.call(n,x,s,f,{styleOne:e,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,s,{isTransitioning:s._transitioning}),Y.call(e,at,H,s,{hovered:!1}),at.x0===at.x1||at.y0===at.y1?at._text="":vt?at._text=q?"":a.getPtLabel(at)||"":at._text=o(at,x,H,f,N)||"";var ft=g.ensureSingle(it,"g","slicetext"),ut=g.ensureSingle(ft,"text","",function(Wt){Wt.attr("data-notex",1)}),wt=g.ensureUniformFontSize(s,a.determineTextFont(H,at,N.font)),zt=at._text||" ",Pt=vt&&zt.indexOf("
")===-1;ut.text(zt).classed("slicetext",!0).attr("text-anchor",U?"end":F||Pt?"start":"middle").call(P.font,wt).call(S.convertToTspans,s),at.textBB=P.bBox(ut.node()),at.transform=M(at,{fontSize:wt.size,isHeader:vt}),at.transform.fontSize=wt.size,A?ut.transition().attrTween("transform",function(Wt){var Ht=k(Wt,i,dt(),[T,u]);return function(Jt){return E(Ht(Jt))}}):ut.attr("transform",E(at))}),st}}),dj=Ft((Q,$)=>{var c=Y9(),g=fj();$.exports=function(P,S,t,e){return c(P,S,t,e,{type:"treemap",drawDescendants:g})}}),pj=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"treemap",basePlotModule:sj(),categories:[],animatable:!0,attributes:jk(),layoutAttributes:q9(),supplyDefaults:lj(),supplyLayoutDefaults:uj(),calc:Z9().calc,crossTraceCalc:Z9().crossTraceCalc,plot:dj(),style:Uk().style,colorbar:xo(),meta:{}}}),mj=Ft((Q,$)=>{$.exports=pj()}),gj=Ft(Q=>{var $=Kc();Q.name="icicle",Q.plot=function(c,g,P,S){$.plotBasePlot(Q.name,c,g,P,S)},Q.clean=function(c,g,P,S){$.cleanBasePlot(Q.name,c,g,P,S)}}),K9=Ft((Q,$)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=Tc(),t=Nh().attributes,e=ix(),r=Kw(),a=jk(),n=fx(),o=Ta().extendFlat,i=Td().pattern;$.exports={labels:r.labels,parents:r.parents,values:r.values,branchvalues:r.branchvalues,count:r.count,level:r.level,maxdepth:r.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:a.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:o({colors:r.marker.colors,line:r.marker.line,pattern:i,editType:"calc"},S("marker",{colorAttr:"colors",anim:!1})),leaf:r.leaf,pathbar:a.pathbar,text:e.text,textinfo:r.textinfo,texttemplate:g({editType:"plot"},{keys:n.eventDataKeys.concat(["label","value"])}),texttemplatefallback:P({editType:"plot"}),hovertext:e.hovertext,hoverinfo:r.hoverinfo,hovertemplate:c({},{keys:n.eventDataKeys}),hovertemplatefallback:P(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:a.outsidetextfont,textposition:a.textposition,sort:e.sort,root:r.root,domain:t({name:"icicle",trace:!0,editType:"calc"})}}),X9=Ft((Q,$)=>{$.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),vj=Ft((Q,$)=>{var c=bn(),g=K9(),P=li(),S=Nh().defaults,t=J0().handleText,e=Jy().TEXTPAD,r=ax().handleMarkerDefaults,a=Xc(),n=a.hasColorscale,o=a.handleDefaults;$.exports=function(i,s,f,x){function y(E,A){return c.coerce(i,s,g,E,A)}var v=y("labels"),T=y("parents");if(!v||!v.length||!T||!T.length){s.visible=!1;return}var u=y("values");u&&u.length?y("branchvalues"):y("count"),y("level"),y("maxdepth"),y("tiling.orientation"),y("tiling.flip"),y("tiling.pad");var b=y("text");y("texttemplate"),y("texttemplatefallback"),s.texttemplate||y("textinfo",c.isArrayOrTypedArray(b)?"text+label":"label"),y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var _=y("pathbar.visible"),C="auto";t(i,s,x,y,C,{hasPathbar:_,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),y("textposition"),r(i,s,x,y);var M=s._hasColorscale=n(i,"marker","colors")||(i.marker||{}).coloraxis;M&&o(i,s,x,y,{prefix:"marker.",cLetter:"c"}),y("leaf.opacity",M?1:.7),s._hovered={marker:{line:{width:2,color:P.contrast(x.paper_bgcolor)}}},_&&(y("pathbar.thickness",s.pathbar.textfont.size+2*e),y("pathbar.side"),y("pathbar.edgeshape")),y("sort"),y("root.color"),S(s,x,y),s._length=null}}),yj=Ft((Q,$)=>{var c=bn(),g=X9();$.exports=function(P,S){function t(e,r){return c.coerce(P,S,g,e,r)}t("iciclecolorway",S.colorway),t("extendiciclecolors")}}),J9=Ft(Q=>{var $=Jw();Q.calc=function(c,g){return $.calc(c,g)},Q.crossTraceCalc=function(c){return $._runCrossTraceCalc("icicle",c)}}),xj=Ft((Q,$)=>{var c=Xw(),g=$9();$.exports=function(P,S,t){var e=t.flipX,r=t.flipY,a=t.orientation==="h",n=t.maxDepth,o=S[0],i=S[1];n&&(o=(P.height+1)*S[0]/Math.min(P.height+1,n),i=(P.height+1)*S[1]/Math.min(P.height+1,n));var s=c.partition().padding(t.pad.inner).size(a?[S[1],o]:[S[0],i])(P);return(a||e||r)&&g(s,S,{swapXY:a,flipX:e,flipY:r}),s}}),Q9=Ft((Q,$)=>{var c=un(),g=li(),P=bn(),S=Rp().resizeText,t=Bk();function e(a){var n=a._fullLayout._iciclelayer.selectAll(".trace");S(a,n,"icicle"),n.each(function(o){var i=c.select(this),s=o[0],f=s.trace;i.style("opacity",f.opacity),i.selectAll("path.surface").each(function(x){c.select(this).call(r,x,f,a)})})}function r(a,n,o,i){var s=n.data.data,f=!n.children,x=s.i,y=P.castOption(o,x,"marker.line.color")||g.defaultLine,v=P.castOption(o,x,"marker.line.width")||0;a.call(t,n,o,i).style("stroke-width",v).call(g.stroke,y).style("opacity",f?o.leaf.opacity:null)}$.exports={style:e,styleOne:r}}),_j=Ft((Q,$)=>{var c=un(),g=bn(),P=js(),S=tc(),t=xj(),e=Q9().styleOne,r=fx(),a=kv(),n=p3(),o=Nk().formatSliceLabel,i=!1;$.exports=function(s,f,x,y,v){var T=v.width,u=v.height,b=v.viewX,_=v.viewY,C=v.pathSlice,M=v.toMoveInsideSlice,E=v.strTransform,A=v.hasTransition,h=v.handleSlicesExit,p=v.makeUpdateSliceInterpolator,k=v.makeUpdateTextInterpolator,w=v.prevEntry,R={},O=s._context.staticPlot,N=s._fullLayout,V=f[0],H=V.trace,F=H.textposition.indexOf("left")!==-1,U=H.textposition.indexOf("right")!==-1,W=H.textposition.indexOf("bottom")!==-1,q=t(x,[T,u],{flipX:H.tiling.flip.indexOf("x")>-1,flipY:H.tiling.flip.indexOf("y")>-1,orientation:H.tiling.orientation,pad:{inner:H.tiling.pad},maxDepth:H._maxDepth}),X=q.descendants(),lt=1/0,yt=-1/0;X.forEach(function(rt){var at=rt.depth;at>=H._maxDepth?(rt.x0=rt.x1=(rt.x0+rt.x1)/2,rt.y0=rt.y1=(rt.y0+rt.y1)/2):(lt=Math.min(lt,at),yt=Math.max(yt,at))}),y=y.data(X,a.getPtId),H._maxVisibleLayers=isFinite(yt)?yt-lt+1:0,y.enter().append("g").classed("slice",!0),h(y,i,R,[T,u],C),y.order();var pt=null;if(A&&w){var st=a.getPtId(w);y.each(function(rt){pt===null&&a.getPtId(rt)===st&&(pt={x0:rt.x0,x1:rt.x1,y0:rt.y0,y1:rt.y1})})}var tt=function(){return pt||{x0:0,x1:T,y0:0,y1:u}},dt=y;return A&&(dt=dt.transition().each("end",function(){var rt=c.select(this);a.setSliceCursor(rt,s,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),dt.each(function(rt){rt._x0=b(rt.x0),rt._x1=b(rt.x1),rt._y0=_(rt.y0),rt._y1=_(rt.y1),rt._hoverX=b(rt.x1-H.tiling.pad),rt._hoverY=_(W?rt.y1-H.tiling.pad/2:rt.y0+H.tiling.pad/2);var at=c.select(this),vt=g.ensureSingle(at,"path","surface",function(ut){ut.style("pointer-events",O?"none":"all")});A?vt.transition().attrTween("d",function(ut){var wt=p(ut,i,tt(),[T,u],{orientation:H.tiling.orientation,flipX:H.tiling.flip.indexOf("x")>-1,flipY:H.tiling.flip.indexOf("y")>-1});return function(zt){return C(wt(zt))}}):vt.attr("d",C),at.call(n,x,s,f,{styleOne:e,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,s,{isTransitioning:s._transitioning}),vt.call(e,rt,H,s,{hovered:!1}),rt.x0===rt.x1||rt.y0===rt.y1?rt._text="":rt._text=o(rt,x,H,f,N)||"";var it=g.ensureSingle(at,"g","slicetext"),Y=g.ensureSingle(it,"text","",function(ut){ut.attr("data-notex",1)}),ft=g.ensureUniformFontSize(s,a.determineTextFont(H,rt,N.font));Y.text(rt._text||" ").classed("slicetext",!0).attr("text-anchor",U?"end":F?"start":"middle").call(P.font,ft).call(S.convertToTspans,s),rt.textBB=P.bBox(Y.node()),rt.transform=M(rt,{fontSize:ft.size}),rt.transform.fontSize=ft.size,A?Y.transition().attrTween("transform",function(ut){var wt=k(ut,i,tt(),[T,u]);return function(zt){return E(wt(zt))}}):Y.attr("transform",E(rt))}),pt}}),bj=Ft((Q,$)=>{var c=Y9(),g=_j();$.exports=function(P,S,t,e){return c(P,S,t,e,{type:"icicle",drawDescendants:g})}}),wj=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"icicle",basePlotModule:gj(),categories:[],animatable:!0,attributes:K9(),layoutAttributes:X9(),supplyDefaults:vj(),supplyLayoutDefaults:yj(),calc:J9().calc,crossTraceCalc:J9().crossTraceCalc,plot:bj(),style:Q9().style,colorbar:xo(),meta:{}}}),kj=Ft((Q,$)=>{$.exports=wj()}),Tj=Ft(Q=>{var $=Kc();Q.name="funnelarea",Q.plot=function(c,g,P,S){$.plotBasePlot(Q.name,c,g,P,S)},Q.clean=function(c,g,P,S){$.cleanBasePlot(Q.name,c,g,P,S)}}),tS=Ft((Q,$)=>{var c=ix(),g=$o(),P=Nh().attributes,{hovertemplateAttrs:S,texttemplateAttrs:t,templatefallbackAttrs:e}=$u(),r=Ta().extendFlat;$.exports={labels:c.labels,label0:c.label0,dlabel:c.dlabel,values:c.values,marker:{colors:c.marker.colors,line:{color:r({},c.marker.line.color,{dflt:null}),width:r({},c.marker.line.width,{dflt:1}),editType:"calc"},pattern:c.marker.pattern,editType:"calc"},text:c.text,hovertext:c.hovertext,scalegroup:r({},c.scalegroup,{}),textinfo:r({},c.textinfo,{flags:["label","text","value","percent"]}),texttemplate:t({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:e({editType:"plot"}),hoverinfo:r({},g.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:S({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:e(),textposition:r({},c.textposition,{values:["inside","none"],dflt:"inside"}),textfont:c.textfont,insidetextfont:c.insidetextfont,title:{text:c.title.text,font:c.title.font,position:r({},c.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:P({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}}),eS=Ft((Q,$)=>{var c=lk().hiddenlabels;$.exports={hiddenlabels:c,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),Aj=Ft((Q,$)=>{var c=bn(),g=tS(),P=Nh().defaults,S=J0().handleText,t=ax().handleLabelsAndValues,e=ax().handleMarkerDefaults;$.exports=function(r,a,n,o){function i(C,M){return c.coerce(r,a,g,C,M)}var s=i("labels"),f=i("values"),x=t(s,f),y=x.len;if(a._hasLabels=x.hasLabels,a._hasValues=x.hasValues,!a._hasLabels&&a._hasValues&&(i("label0"),i("dlabel")),!y){a.visible=!1;return}a._length=y,e(r,a,o,i),i("scalegroup");var v=i("text"),T=i("texttemplate");i("texttemplatefallback");var u;if(T||(u=i("textinfo",Array.isArray(v)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),T||u&&u!=="none"){var b=i("textposition");S(r,a,o,i,b,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else u==="none"&&i("textposition","none");P(a,o,i);var _=i("title.text");_&&(i("title.position"),c.coerceFont(i,"title.font",o.font)),i("aspectratio"),i("baseratio")}}),Mj=Ft((Q,$)=>{var c=bn(),g=eS();$.exports=function(P,S){function t(e,r){return c.coerce(P,S,g,e,r)}t("hiddenlabels"),t("funnelareacolorway",S.colorway),t("extendfunnelareacolors")}}),rS=Ft((Q,$)=>{var c=ib();function g(S,t){return c.calc(S,t)}function P(S){c.crossTraceCalc(S,{type:"funnelarea"})}$.exports={calc:g,crossTraceCalc:P}}),Sj=Ft((Q,$)=>{var c=un(),g=js(),P=bn(),S=P.strScale,t=P.strTranslate,e=tc(),r=Qy(),a=r.toMoveInsideBar,n=Rp(),o=n.recordMinTextSize,i=n.clearMinTextSize,s=xg(),f=uk(),x=f.attachFxHandlers,y=f.determineInsideTextFont,v=f.layoutAreas,T=f.prerenderTitles,u=f.positionTitleOutside,b=f.formatSliceLabel;$.exports=function(E,A){var h=E._context.staticPlot,p=E._fullLayout;i("funnelarea",p),T(A,E),v(A,p._size),P.makeTraceGroups(p._funnelarealayer,A,"trace").each(function(k){var w=c.select(this),R=k[0],O=R.trace;M(k),w.each(function(){var N=c.select(this).selectAll("g.slice").data(k);N.enter().append("g").classed("slice",!0),N.exit().remove(),N.each(function(H,F){if(H.hidden){c.select(this).selectAll("path,g").remove();return}H.pointNumber=H.i,H.curveNumber=O.index;var U=R.cx,W=R.cy,q=c.select(this),X=q.selectAll("path.surface").data([H]);X.enter().append("path").classed("surface",!0).style({"pointer-events":h?"none":"all"}),q.call(x,E,k);var lt="M"+(U+H.TR[0])+","+(W+H.TR[1])+_(H.TR,H.BR)+_(H.BR,H.BL)+_(H.BL,H.TL)+"Z";X.attr("d",lt),b(E,H,R);var yt=s.castOption(O.textposition,H.pts),pt=q.selectAll("g.slicetext").data(H.text&&yt!=="none"?[0]:[]);pt.enter().append("g").classed("slicetext",!0),pt.exit().remove(),pt.each(function(){var st=P.ensureSingle(c.select(this),"text","",function(ft){ft.attr("data-notex",1)}),tt=P.ensureUniformFontSize(E,y(O,H,p.font));st.text(H.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(g.font,tt).call(e.convertToTspans,E);var dt=g.bBox(st.node()),rt,at,vt,it=Math.min(H.BL[1],H.BR[1])+W,Y=Math.max(H.TL[1],H.TR[1])+W;at=Math.max(H.TL[0],H.BL[0])+U,vt=Math.min(H.TR[0],H.BR[0])+U,rt=a(at,vt,it,Y,dt,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),rt.fontSize=tt.size,o(O.type,rt,p),k[F].transform=rt,P.setTransormAndDisplay(st,rt)})});var V=c.select(this).selectAll("g.titletext").data(O.title.text?[0]:[]);V.enter().append("g").classed("titletext",!0),V.exit().remove(),V.each(function(){var H=P.ensureSingle(c.select(this),"text","",function(W){W.attr("data-notex",1)}),F=O.title.text;O._meta&&(F=P.templateString(F,O._meta)),H.text(F).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(g.font,O.title.font).call(e.convertToTspans,E);var U=u(R,p._size);H.attr("transform",t(U.x,U.y)+S(Math.min(1,U.scale))+t(U.tx,U.ty))})})})};function _(E,A){var h=A[0]-E[0],p=A[1]-E[1];return"l"+h+","+p}function C(E,A){return[.5*(E[0]+A[0]),.5*(E[1]+A[1])]}function M(E){if(!E.length)return;var A=E[0],h=A.trace,p=h.aspectratio,k=h.baseratio;k>.999&&(k=.999);var w=Math.pow(k,2),R=A.vTotal,O=R*w/(1-w),N=R,V=O/R;function H(){var wt=Math.sqrt(V);return{x:wt,y:-wt}}function F(){var wt=H();return[wt.x,wt.y]}var U,W=[];W.push(F());var q,X;for(q=E.length-1;q>-1;q--)if(X=E[q],!X.hidden){var lt=X.v/N;V+=lt,W.push(F())}var yt=1/0,pt=-1/0;for(q=0;q-1;q--)if(X=E[q],!X.hidden){Y+=1;var ft=W[Y][0],ut=W[Y][1];X.TL=[-ft,ut],X.TR=[ft,ut],X.BL=vt,X.BR=it,X.pxmid=C(X.TR,X.BR),vt=X.TL,it=X.TR}}}),Ej=Ft((Q,$)=>{var c=un(),g=_g(),P=Rp().resizeText;$.exports=function(S){var t=S._fullLayout._funnelarealayer.selectAll(".trace");P(S,t,"funnelarea"),t.each(function(e){var r=e[0],a=r.trace,n=c.select(this);n.style({opacity:a.opacity}),n.selectAll("path.surface").each(function(o){c.select(this).call(g,o,a,S)})})}}),Cj=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"funnelarea",basePlotModule:Tj(),categories:["pie-like","funnelarea","showLegend"],attributes:tS(),layoutAttributes:eS(),supplyDefaults:Aj(),supplyLayoutDefaults:Mj(),calc:rS().calc,crossTraceCalc:rS().crossTraceCalc,plot:Sj(),style:Ej(),styleOne:_g(),meta:{}}}),Lj=Ft((Q,$)=>{$.exports=Cj()}),fp=Ft((Q,$)=>{(function(){var c={24:function(t){var e={left:0,top:0};t.exports=r;function r(n,o,i){o=o||n.currentTarget||n.srcElement,Array.isArray(i)||(i=[0,0]);var s=n.clientX||0,f=n.clientY||0,x=a(o);return i[0]=s-x.left,i[1]=f-x.top,i}function a(n){return n===window||n===document||n===document.body?e:n.getBoundingClientRect()}},109:function(t){t.exports=e;function e(r,a,n,o){var i=n[0],s=n[2],f=a[0]-i,x=a[2]-s,y=Math.sin(o),v=Math.cos(o);return r[0]=i+x*y+f*v,r[1]=a[1],r[2]=s+x*v-f*y,r}},160:function(t){t.exports=e;function e(r,a,n){return r[0]=Math.max(a[0],n[0]),r[1]=Math.max(a[1],n[1]),r[2]=Math.max(a[2],n[2]),r[3]=Math.max(a[3],n[3]),r}},216:function(t){t.exports=e;function e(r,a){for(var n={},o=0;o1){y[0]in f||(f[y[0]]=[]),f=f[y[0]];for(var v=1;v=0;--U){var dt=H[U];W=dt[0];var rt=N[W],at=rt[0],vt=rt[1],it=O[at],Y=O[vt];if((it[0]-Y[0]||it[1]-Y[1])<0){var ft=at;at=vt,vt=ft}rt[0]=at;var ut=rt[1]=dt[1],wt;for(F&&(wt=rt[2]);U>0&&H[U-1][0]===W;){var dt=H[--U],zt=dt[1];F?N.push([ut,zt,wt]):N.push([ut,zt]),ut=zt}F?N.push([ut,vt,wt]):N.push([ut,vt])}return q}function E(O,N,V){for(var H=N.length,F=new a(H),U=[],W=0;WN[2]?1:0)}function p(O,N,V){if(O.length!==0){if(N)for(var H=0;H0||W.length>0}function R(O,N,V){var H;if(V){H=N;for(var F=new Array(N.length),U=0;U 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the cone vertex and normal at the given index. +// +// The returned vertex is for a cone with its top at origin and height of 1.0, +// pointing in the direction of the vector attribute. +// +// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. +// These vertices are used to make up the triangles of the cone by the following: +// segment + 0 top vertex +// segment + 1 perimeter vertex a+1 +// segment + 2 perimeter vertex a +// segment + 3 center base vertex +// segment + 4 perimeter vertex a +// segment + 5 perimeter vertex a+1 +// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. +// To go from index to segment, floor(index / 6) +// To go from segment to angle, 2*pi * (segment/segmentCount) +// To go from index to segment index, index - (segment*6) +// +vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { + + const float segmentCount = 8.0; + + float index = rawIndex - floor(rawIndex / + (segmentCount * 6.0)) * + (segmentCount * 6.0); + + float segment = floor(0.001 + index/6.0); + float segmentIndex = index - (segment*6.0); + + normal = -normalize(d); + + if (segmentIndex > 2.99 && segmentIndex < 3.01) { + return mix(vec3(0.0), -d, coneOffset); + } + + float nextAngle = ( + (segmentIndex > 0.99 && segmentIndex < 1.01) || + (segmentIndex > 4.99 && segmentIndex < 5.01) + ) ? 1.0 : 0.0; + float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); + + vec3 v1 = mix(d, vec3(0.0), coneOffset); + vec3 v2 = v1 - d; + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d)*0.25; + vec3 y = v * sin(angle) * length(d)*0.25; + vec3 v3 = v2 + x + y; + if (segmentIndex < 3.0) { + vec3 tx = u * sin(angle); + vec3 ty = v * -cos(angle); + vec3 tangent = tx + ty; + normal = normalize(cross(v3 - v1, tangent)); + } + + if (segmentIndex == 0.0) { + return mix(d, vec3(0.0), coneOffset); + } + return v3; +} + +attribute vec3 vector; +attribute vec4 color, position; +attribute vec2 uv; + +uniform float vectorScale, coneScale, coneOffset; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 eyePosition, lightPosition; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + // Scale the vector magnitude to stay constant with + // model & view changes. + vec3 normal; + vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal); + vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * conePosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + // vec4 m_position = model * vec4(conePosition, 1.0); + vec4 t_position = view * conePosition; + gl_Position = projection * t_position; + + f_color = color; + f_data = conePosition.xyz; + f_position = position.xyz; + f_uv = uv; +} +`]),o=a([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform sampler2D texture; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = f_color * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * opacity; +} +`]),i=a([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the cone vertex and normal at the given index. +// +// The returned vertex is for a cone with its top at origin and height of 1.0, +// pointing in the direction of the vector attribute. +// +// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. +// These vertices are used to make up the triangles of the cone by the following: +// segment + 0 top vertex +// segment + 1 perimeter vertex a+1 +// segment + 2 perimeter vertex a +// segment + 3 center base vertex +// segment + 4 perimeter vertex a +// segment + 5 perimeter vertex a+1 +// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. +// To go from index to segment, floor(index / 6) +// To go from segment to angle, 2*pi * (segment/segmentCount) +// To go from index to segment index, index - (segment*6) +// +vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { + + const float segmentCount = 8.0; + + float index = rawIndex - floor(rawIndex / + (segmentCount * 6.0)) * + (segmentCount * 6.0); + + float segment = floor(0.001 + index/6.0); + float segmentIndex = index - (segment*6.0); + + normal = -normalize(d); + + if (segmentIndex > 2.99 && segmentIndex < 3.01) { + return mix(vec3(0.0), -d, coneOffset); + } + + float nextAngle = ( + (segmentIndex > 0.99 && segmentIndex < 1.01) || + (segmentIndex > 4.99 && segmentIndex < 5.01) + ) ? 1.0 : 0.0; + float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); + + vec3 v1 = mix(d, vec3(0.0), coneOffset); + vec3 v2 = v1 - d; + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d)*0.25; + vec3 y = v * sin(angle) * length(d)*0.25; + vec3 v3 = v2 + x + y; + if (segmentIndex < 3.0) { + vec3 tx = u * sin(angle); + vec3 ty = v * -cos(angle); + vec3 tangent = tx + ty; + normal = normalize(cross(v3 - v1, tangent)); + } + + if (segmentIndex == 0.0) { + return mix(d, vec3(0.0), coneOffset); + } + return v3; +} + +attribute vec4 vector; +attribute vec4 position; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform float vectorScale, coneScale, coneOffset; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + vec3 normal; + vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal); + vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + gl_Position = projection * (view * conePosition); + f_id = id; + f_position = position.xyz; +} +`]),s=a([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]);e.meshShader={vertex:n,fragment:o,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},620:function(t){t.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},665:function(t,e,r){var a=r(3202);t.exports=s;var n=96;function o(f,x){var y=a(getComputedStyle(f).getPropertyValue(x));return y[0]*s(y[1],f)}function i(f,x){var y=document.createElement("div");y.style["font-size"]="128"+f,x.appendChild(y);var v=o(y,"font-size")/128;return x.removeChild(y),v}function s(f,x){switch(x=x||document.body,f=(f||"px").trim().toLowerCase(),(x===window||x===document)&&(x=document.body),f){case"%":return x.clientHeight/100;case"ch":case"ex":return i(f,x);case"em":return o(x,"font-size");case"rem":return o(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return n;case"cm":return n/2.54;case"mm":return n/25.4;case"pt":return n/72;case"pc":return n/6}return 1}},727:function(t,e,r){var a=r(2962),n=6;function o(C){var M=C===2?f:C===3?x:C===4?y:C===5?v:T;return C<6?M(a[C]):M(a)}function i(){return[[0]]}function s(C,M){return[[M[0]],[C[0][0]]]}function f(C){return function(M,E){return[C([[+E[0],+M[0][1]],[+E[1],+M[1][1]]]),C([[+M[0][0],+E[0]],[+M[1][0],+E[1]]]),C(M)]}}function x(C){return function(M,E){return[C([[+E[0],+M[0][1],+M[0][2]],[+E[1],+M[1][1],+M[1][2]],[+E[2],+M[2][1],+M[2][2]]]),C([[+M[0][0],+E[0],+M[0][2]],[+M[1][0],+E[1],+M[1][2]],[+M[2][0],+E[2],+M[2][2]]]),C([[+M[0][0],+M[0][1],+E[0]],[+M[1][0],+M[1][1],+E[1]],[+M[2][0],+M[2][1],+E[2]]]),C(M)]}}function y(C){return function(M,E){return[C([[+E[0],+M[0][1],+M[0][2],+M[0][3]],[+E[1],+M[1][1],+M[1][2],+M[1][3]],[+E[2],+M[2][1],+M[2][2],+M[2][3]],[+E[3],+M[3][1],+M[3][2],+M[3][3]]]),C([[+M[0][0],+E[0],+M[0][2],+M[0][3]],[+M[1][0],+E[1],+M[1][2],+M[1][3]],[+M[2][0],+E[2],+M[2][2],+M[2][3]],[+M[3][0],+E[3],+M[3][2],+M[3][3]]]),C([[+M[0][0],+M[0][1],+E[0],+M[0][3]],[+M[1][0],+M[1][1],+E[1],+M[1][3]],[+M[2][0],+M[2][1],+E[2],+M[2][3]],[+M[3][0],+M[3][1],+E[3],+M[3][3]]]),C([[+M[0][0],+M[0][1],+M[0][2],+E[0]],[+M[1][0],+M[1][1],+M[1][2],+E[1]],[+M[2][0],+M[2][1],+M[2][2],+E[2]],[+M[3][0],+M[3][1],+M[3][2],+E[3]]]),C(M)]}}function v(C){return function(M,E){return[C([[+E[0],+M[0][1],+M[0][2],+M[0][3],+M[0][4]],[+E[1],+M[1][1],+M[1][2],+M[1][3],+M[1][4]],[+E[2],+M[2][1],+M[2][2],+M[2][3],+M[2][4]],[+E[3],+M[3][1],+M[3][2],+M[3][3],+M[3][4]],[+E[4],+M[4][1],+M[4][2],+M[4][3],+M[4][4]]]),C([[+M[0][0],+E[0],+M[0][2],+M[0][3],+M[0][4]],[+M[1][0],+E[1],+M[1][2],+M[1][3],+M[1][4]],[+M[2][0],+E[2],+M[2][2],+M[2][3],+M[2][4]],[+M[3][0],+E[3],+M[3][2],+M[3][3],+M[3][4]],[+M[4][0],+E[4],+M[4][2],+M[4][3],+M[4][4]]]),C([[+M[0][0],+M[0][1],+E[0],+M[0][3],+M[0][4]],[+M[1][0],+M[1][1],+E[1],+M[1][3],+M[1][4]],[+M[2][0],+M[2][1],+E[2],+M[2][3],+M[2][4]],[+M[3][0],+M[3][1],+E[3],+M[3][3],+M[3][4]],[+M[4][0],+M[4][1],+E[4],+M[4][3],+M[4][4]]]),C([[+M[0][0],+M[0][1],+M[0][2],+E[0],+M[0][4]],[+M[1][0],+M[1][1],+M[1][2],+E[1],+M[1][4]],[+M[2][0],+M[2][1],+M[2][2],+E[2],+M[2][4]],[+M[3][0],+M[3][1],+M[3][2],+E[3],+M[3][4]],[+M[4][0],+M[4][1],+M[4][2],+E[4],+M[4][4]]]),C([[+M[0][0],+M[0][1],+M[0][2],+M[0][3],+E[0]],[+M[1][0],+M[1][1],+M[1][2],+M[1][3],+E[1]],[+M[2][0],+M[2][1],+M[2][2],+M[2][3],+E[2]],[+M[3][0],+M[3][1],+M[3][2],+M[3][3],+E[3]],[+M[4][0],+M[4][1],+M[4][2],+M[4][3],+E[4]]]),C(M)]}}function T(C){return function(M,E){return[C([[+E[0],+M[0][1],+M[0][2],+M[0][3],+M[0][4],+M[0][5]],[+E[1],+M[1][1],+M[1][2],+M[1][3],+M[1][4],+M[1][5]],[+E[2],+M[2][1],+M[2][2],+M[2][3],+M[2][4],+M[2][5]],[+E[3],+M[3][1],+M[3][2],+M[3][3],+M[3][4],+M[3][5]],[+E[4],+M[4][1],+M[4][2],+M[4][3],+M[4][4],+M[4][5]],[+E[5],+M[5][1],+M[5][2],+M[5][3],+M[5][4],+M[5][5]]]),C([[+M[0][0],+E[0],+M[0][2],+M[0][3],+M[0][4],+M[0][5]],[+M[1][0],+E[1],+M[1][2],+M[1][3],+M[1][4],+M[1][5]],[+M[2][0],+E[2],+M[2][2],+M[2][3],+M[2][4],+M[2][5]],[+M[3][0],+E[3],+M[3][2],+M[3][3],+M[3][4],+M[3][5]],[+M[4][0],+E[4],+M[4][2],+M[4][3],+M[4][4],+M[4][5]],[+M[5][0],+E[5],+M[5][2],+M[5][3],+M[5][4],+M[5][5]]]),C([[+M[0][0],+M[0][1],+E[0],+M[0][3],+M[0][4],+M[0][5]],[+M[1][0],+M[1][1],+E[1],+M[1][3],+M[1][4],+M[1][5]],[+M[2][0],+M[2][1],+E[2],+M[2][3],+M[2][4],+M[2][5]],[+M[3][0],+M[3][1],+E[3],+M[3][3],+M[3][4],+M[3][5]],[+M[4][0],+M[4][1],+E[4],+M[4][3],+M[4][4],+M[4][5]],[+M[5][0],+M[5][1],+E[5],+M[5][3],+M[5][4],+M[5][5]]]),C([[+M[0][0],+M[0][1],+M[0][2],+E[0],+M[0][4],+M[0][5]],[+M[1][0],+M[1][1],+M[1][2],+E[1],+M[1][4],+M[1][5]],[+M[2][0],+M[2][1],+M[2][2],+E[2],+M[2][4],+M[2][5]],[+M[3][0],+M[3][1],+M[3][2],+E[3],+M[3][4],+M[3][5]],[+M[4][0],+M[4][1],+M[4][2],+E[4],+M[4][4],+M[4][5]],[+M[5][0],+M[5][1],+M[5][2],+E[5],+M[5][4],+M[5][5]]]),C([[+M[0][0],+M[0][1],+M[0][2],+M[0][3],+E[0],+M[0][5]],[+M[1][0],+M[1][1],+M[1][2],+M[1][3],+E[1],+M[1][5]],[+M[2][0],+M[2][1],+M[2][2],+M[2][3],+E[2],+M[2][5]],[+M[3][0],+M[3][1],+M[3][2],+M[3][3],+E[3],+M[3][5]],[+M[4][0],+M[4][1],+M[4][2],+M[4][3],+E[4],+M[4][5]],[+M[5][0],+M[5][1],+M[5][2],+M[5][3],+E[5],+M[5][5]]]),C([[+M[0][0],+M[0][1],+M[0][2],+M[0][3],+M[0][4],+E[0]],[+M[1][0],+M[1][1],+M[1][2],+M[1][3],+M[1][4],+E[1]],[+M[2][0],+M[2][1],+M[2][2],+M[2][3],+M[2][4],+E[2]],[+M[3][0],+M[3][1],+M[3][2],+M[3][3],+M[3][4],+E[3]],[+M[4][0],+M[4][1],+M[4][2],+M[4][3],+M[4][4],+E[4]],[+M[5][0],+M[5][1],+M[5][2],+M[5][3],+M[5][4],+E[5]]]),C(M)]}}var u=[i,s];function b(C,M,E,A,h,p,k,w){return function(R,O){switch(R.length){case 0:return C(R,O);case 1:return M(R,O);case 2:return E(R,O);case 3:return A(R,O);case 4:return h(R,O);case 5:return p(R,O)}var N=k[R.length];return N||(N=k[R.length]=w(R.length)),N(R,O)}}function _(){for(;u.length1e-6?(b=Math.acos(_),C=Math.sin(b),M=Math.sin((1-o)*b)/C,E=Math.sin(o*b)/C):(M=1-o,E=o),r[0]=M*i+E*y,r[1]=M*s+E*v,r[2]=M*f+E*T,r[3]=M*x+E*u,r}},799:function(t,e,r){var a=r(3236),n=r(9405),o=a([`precision mediump float; +#define GLSLIFY 1 +attribute vec2 position; +varying vec2 uv; +void main() { + uv = position; + gl_Position = vec4(position, 0, 1); +}`]),i=a([`precision mediump float; +#define GLSLIFY 1 + +uniform sampler2D accumBuffer; +varying vec2 uv; + +void main() { + vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); + gl_FragColor = min(vec4(1,1,1,1), accum); +}`]);t.exports=function(s){return n(s,o,i,null,[{name:"position",type:"vec2"}])}},811:function(t){t.exports=e;function e(r,a){return r[0]=1/a[0],r[1]=1/a[1],r[2]=1/a[2],r}},840:function(t,e,r){var a=r(3236),n=a([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position, normal; +attribute vec4 color; +attribute vec2 uv; + +uniform mat4 model + , view + , projection + , inverseModel; +uniform vec3 eyePosition + , lightPosition; + +varying vec3 f_normal + , f_lightDirection + , f_eyeDirection + , f_data; +varying vec4 f_color; +varying vec2 f_uv; + +vec4 project(vec3 p) { + return projection * (view * (model * vec4(p, 1.0))); +} + +void main() { + gl_Position = project(position); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * vec4(position , 1.0); + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + f_color = color; + f_data = position; + f_uv = uv; +} +`]),o=a([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness + , fresnel + , kambient + , kdiffuse + , kspecular; +uniform sampler2D texture; + +varying vec3 f_normal + , f_lightDirection + , f_eyeDirection + , f_data; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (f_color.a == 0.0 || + outOfRange(clipBounds[0], clipBounds[1], f_data) + ) discard; + + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d + + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * f_color.a; +} +`]),i=a([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec4 color; +attribute vec2 uv; + +uniform mat4 model, view, projection; + +varying vec4 f_color; +varying vec3 f_data; +varying vec2 f_uv; + +void main() { + gl_Position = projection * (view * (model * vec4(position, 1.0))); + f_color = color; + f_data = position; + f_uv = uv; +}`]),s=a([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform sampler2D texture; +uniform float opacity; + +varying vec4 f_color; +varying vec3 f_data; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; + + gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; +}`]),f=a([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 uv; +attribute float pointSize; + +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0); + } else { + gl_Position = projection * (view * (model * vec4(position, 1.0))); + } + gl_PointSize = pointSize; + f_color = color; + f_uv = uv; +}`]),x=a([`precision highp float; +#define GLSLIFY 1 + +uniform sampler2D texture; +uniform float opacity; + +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5); + if(dot(pointR, pointR) > 0.25) { + discard; + } + gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; +}`]),y=a([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec4 id; + +uniform mat4 model, view, projection; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + gl_Position = projection * (view * (model * vec4(position, 1.0))); + f_id = id; + f_position = position; +}`]),v=a([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]),T=a([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute float pointSize; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0.0, 0.0, 0.0, 0.0); + } else { + gl_Position = projection * (view * (model * vec4(position, 1.0))); + gl_PointSize = pointSize; + } + f_id = id; + f_position = position; +}`]),u=a([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; + +uniform mat4 model, view, projection; + +void main() { + gl_Position = projection * (view * (model * vec4(position, 1.0))); +}`]),b=a([`precision highp float; +#define GLSLIFY 1 + +uniform vec3 contourColor; + +void main() { + gl_FragColor = vec4(contourColor, 1.0); +} +`]);e.meshShader={vertex:n,fragment:o,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:f,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:y,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:T,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:u,fragment:b,attributes:[{name:"position",type:"vec3"}]}},855:function(t,e,r){t.exports={init:_,sweepBipartite:E,sweepComplete:A,scanBipartite:h,scanComplete:p};var a=r(1888),n=r(8828),o=r(4192),i=1<<28,s=1024,f=a.mallocInt32(s),x=a.mallocInt32(s),y=a.mallocInt32(s),v=a.mallocInt32(s),T=a.mallocInt32(s),u=a.mallocInt32(s),b=a.mallocDouble(s*8);function _(k){var w=n.nextPow2(k);f.length>>1;o(b,rt);for(var at=0,vt=0,pt=0;pt=i)it=it-i|0,C(y,v,vt--,it);else if(it>=0)C(f,x,at--,it);else if(it<=-i){it=-it-i|0;for(var Y=0;Y>>1;o(b,rt);for(var at=0,vt=0,it=0,pt=0;pt>1===b[2*pt+3]>>1&&(ft=2,pt+=1),Y<0){for(var ut=-(Y>>1)-1,wt=0;wt>1)-1;ft===0?C(f,x,at--,ut):ft===1?C(y,v,vt--,ut):ft===2&&C(T,u,it--,ut)}}}function h(k,w,R,O,N,V,H,F,U,W,q,X){var lt=0,yt=2*k,pt=w,st=w+k,tt=1,dt=1;O?dt=i:tt=i;for(var rt=N;rt>>1;o(b,Y);for(var ft=0,rt=0;rt=i?(wt=!O,at-=i):(wt=!!O,at-=1),wt)M(f,x,ft++,at);else{var zt=X[at],Pt=yt*at,Wt=q[Pt+w+1],Ht=q[Pt+w+1+k];t:for(var Jt=0;Jt>>1;o(b,at);for(var vt=0,st=0;st=i)f[vt++]=tt-i;else{tt-=1;var Y=q[tt],ft=lt*tt,ut=W[ft+w+1],wt=W[ft+w+1+k];t:for(var zt=0;zt=0;--zt)if(f[zt]===tt){for(var Jt=zt+1;Jt max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 lowerBound, upperBound; +uniform float contourTint; +uniform vec4 contourColor; +uniform sampler2D colormap; +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform float vertexColor; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + if ( + kill > 0.0 || + vColor.a == 0.0 || + outOfRange(clipBounds[0], clipBounds[1], worldCoordinate) + ) discard; + + vec3 N = normalize(surfaceNormal); + vec3 V = normalize(eyeDirection); + vec3 L = normalize(lightDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = max(beckmannSpecular(L, V, N, roughness), 0.); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + //decide how to interpolate color — in vertex or in fragment + vec4 surfaceColor = + step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + + step(.5, vertexColor) * vColor; + + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = mix(litColor, contourColor, contourTint) * opacity; +} +`]),s=n([`precision highp float; +#define GLSLIFY 1 + +attribute vec4 uv; +attribute float f; + +uniform vec3 objectOffset; +uniform mat3 permutation; +uniform mat4 model, view, projection; +uniform float height, zOffset; +uniform sampler2D colormap; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + vec3 dataCoordinate = permutation * vec3(uv.xy, height); + worldCoordinate = objectOffset + dataCoordinate; + mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); + vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0); + + vec4 clipPosition = projection * (view * worldPosition); + clipPosition.z += zOffset; + + gl_Position = clipPosition; + value = f + objectOffset.z; + kill = -1.0; + planeCoordinate = uv.zw; + + vColor = texture2D(colormap, vec2(value, value)); + + //Don't do lighting for contours + surfaceNormal = vec3(1,0,0); + eyeDirection = vec3(0,1,0); + lightDirection = vec3(0,0,1); +} +`]),f=n([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec2 shape; +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 surfaceNormal; + +vec2 splitFloat(float v) { + float vh = 255.0 * v; + float upper = floor(vh); + float lower = fract(vh); + return vec2(upper / 255.0, floor(lower * 16.0) / 16.0); +} + +void main() { + if ((kill > 0.0) || + (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard; + + vec2 ux = splitFloat(planeCoordinate.x / shape.x); + vec2 uy = splitFloat(planeCoordinate.y / shape.y); + gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); +} +`]);e.createShader=function(x){var y=a(x,o,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y.attributes.normal.location=2,y},e.createPickShader=function(x){var y=a(x,o,f,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y.attributes.normal.location=2,y},e.createContourShader=function(x){var y=a(x,s,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y},e.createPickContourShader=function(x){var y=a(x,s,f,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y}},1085:function(t,e,r){var a=r(1371);t.exports=n;function n(o,i,s){i=typeof i=="number"?i:1,s=s||": ";var f=o.split(/\r?\n/),x=String(f.length+i-1).length;return f.map(function(y,v){var T=v+i,u=String(T).length,b=a(T,x-u);return b+s+y}).join(` +`)}},1091:function(t){t.exports=e;function e(){var r=new Float32Array(3);return r[0]=0,r[1]=0,r[2]=0,r}},1125:function(t,e,r){t.exports=o;var a=r(3250)[3];function n(i,s,f,x){for(var y=0;y<2;++y){var v=i[y],T=s[y],u=Math.min(v,T),b=Math.max(v,T),_=f[y],C=x[y],M=Math.min(_,C),E=Math.max(_,C);if(E0&&v>0||y<0&&v<0)return!1;var T=a(f,i,s),u=a(x,i,s);return T>0&&u>0||T<0&&u<0?!1:y===0&&v===0&&T===0&&u===0?n(i,s,f,x):!0}},1278:function(t,e,r){var a=r(2361),n=Math.pow(2,-1074),o=-1>>>0;t.exports=i;function i(s,f){if(isNaN(s)||isNaN(f))return NaN;if(s===f)return s;if(s===0)return f<0?-n:n;var x=a.hi(s),y=a.lo(s);return f>s==s>0?y===o?(x+=1,y=0):y+=1:y===0?(y=o,x-=1):y-=1,a.pack(y,x)}},1283:function(t,e,r){var a=r(9405),n=r(3236),o=n([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform vec4 highlightId; +uniform float highlightScale; +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float scale = 1.0; + if(distance(highlightId, id) < 0.0001) { + scale = highlightScale; + } + + vec4 worldPosition = model * vec4(position, 1); + vec4 viewPosition = view * worldPosition; + viewPosition = viewPosition / viewPosition.w; + vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0)); + + gl_Position = clipPosition; + interpColor = color; + pickId = id; + dataCoordinate = position; + } +}`]),i=n([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform vec2 screenSize; +uniform vec3 clipBounds[2]; +uniform float highlightScale, pixelRatio; +uniform vec4 highlightId; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float scale = pixelRatio; + if(distance(highlightId.bgr, id.bgr) < 0.001) { + scale *= highlightScale; + } + + vec4 worldPosition = model * vec4(position, 1.0); + vec4 viewPosition = view * worldPosition; + vec4 clipPosition = projection * viewPosition; + clipPosition /= clipPosition.w; + + gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0); + interpColor = color; + pickId = id; + dataCoordinate = position; + } +}`]),s=n([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform float highlightScale; +uniform vec4 highlightId; +uniform vec3 axes[2]; +uniform mat4 model, view, projection; +uniform vec2 screenSize; +uniform vec3 clipBounds[2]; +uniform float scale, pixelRatio; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float lscale = pixelRatio * scale; + if(distance(highlightId, id) < 0.0001) { + lscale *= highlightScale; + } + + vec4 clipCenter = projection * (view * (model * vec4(position, 1))); + vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y; + vec4 clipPosition = projection * (view * (model * vec4(dataPosition, 1))); + + gl_Position = clipPosition; + interpColor = color; + pickId = id; + dataCoordinate = dataPosition; + } +} +`]),f=n([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 fragClipBounds[2]; +uniform float opacity; + +varying vec4 interpColor; +varying vec3 dataCoordinate; + +void main() { + if ( + outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) || + interpColor.a * opacity == 0. + ) discard; + gl_FragColor = interpColor * opacity; +} +`]),x=n([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 fragClipBounds[2]; +uniform float pickGroup; + +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard; + + gl_FragColor = vec4(pickGroup, pickId.bgr); +}`]),y=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],v={vertex:o,fragment:f,attributes:y},T={vertex:i,fragment:f,attributes:y},u={vertex:s,fragment:f,attributes:y},b={vertex:o,fragment:x,attributes:y},_={vertex:i,fragment:x,attributes:y},C={vertex:s,fragment:x,attributes:y};function M(E,A){var h=a(E,A),p=h.attributes;return p.position.location=0,p.color.location=1,p.glyph.location=2,p.id.location=3,h}e.createPerspective=function(E){return M(E,v)},e.createOrtho=function(E){return M(E,T)},e.createProject=function(E){return M(E,u)},e.createPickPerspective=function(E){return M(E,b)},e.createPickOrtho=function(E){return M(E,_)},e.createPickProject=function(E){return M(E,C)}},1303:function(t,e,r){t.exports=o;var a=r(3250);function n(i,s){var f,x;if(s[0][0]s[1][0])f=s[1],x=s[0];else{var y=Math.min(i[0][1],i[1][1]),v=Math.max(i[0][1],i[1][1]),T=Math.min(s[0][1],s[1][1]),u=Math.max(s[0][1],s[1][1]);return vu?y-u:v-u}var b,_;i[0][1]s[1][0])f=s[1],x=s[0];else return n(s,i);var y,v;if(i[0][0]i[1][0])y=i[1],v=i[0];else return-n(i,s);var T=a(f,x,v),u=a(f,x,y);if(T<0){if(u<=0)return T}else if(T>0){if(u>=0)return T}else if(u)return u;if(T=a(v,y,x),u=a(v,y,f),T<0){if(u<=0)return T}else if(T>0){if(u>=0)return T}else if(u)return u;return x[0]-v[0]}},1318:function(t){t.exports=e;function e(r,a){return r[0].mul(a[1]).cmp(a[0].mul(r[1]))}},1338:function(t){function e(n,o,i){var s=n[i]|0;if(s<=0)return[];var f=new Array(s),x;if(i===n.length-1)for(x=0;x"u"&&(o=0),typeof n){case"number":if(n>0)return r(n|0,o);break;case"object":if(typeof n.length=="number")return e(n,o,0);break}return[]}t.exports=a},1369:function(t,e,r){var a=r(5716);t.exports=n;function n(o){var i=o.length,s=o.words,f=0;if(i===1)f=s[0];else if(i===2)f=s[0]+s[1]*67108864;else for(var x=0;xo)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i=0?k[U]:F)}function O(H){var F=_(H);return F?w in F:p.indexOf(H)>=0}function N(H,F){var U,W=_(H);return W?W[w]=F:(U=p.indexOf(H),U>=0?k[U]=F:(U=p.length,k[U]=F,p[U]=H)),this}function V(H){var F=_(H),U,W;return F?w in F&&delete F[w]:(U=p.indexOf(H),U<0?!1:(W=p.length-1,p[U]=void 0,k[U]=k[W],p[U]=p[W],p.length=W,k.length=W,!0))}return Object.create(h.prototype,{get___:{value:C(R)},has___:{value:C(O)},set___:{value:C(N)},delete___:{value:C(V)}})};h.prototype=Object.create(Object.prototype,{get:{value:function(p,k){return this.get___(p,k)},writable:!0,configurable:!0},has:{value:function(p){return this.has___(p)},writable:!0,configurable:!0},set:{value:function(p,k){return this.set___(p,k)},writable:!0,configurable:!0},delete:{value:function(p){return this.delete___(p)},writable:!0,configurable:!0}}),typeof a=="function"?function(){r&&typeof Proxy<"u"&&(Proxy=void 0);function p(){this instanceof h||E();var k=new a,w=void 0,R=!1;function O(F,U){return w?k.has(F)?k.get(F):w.get___(F,U):k.get(F,U)}function N(F){return k.has(F)||(w?w.has___(F):!1)}var V;r?V=function(F,U){return k.set(F,U),k.has(F)||(w||(w=new h),w.set(F,U)),this}:V=function(F,U){if(R)try{k.set(F,U)}catch{w||(w=new h),w.set___(F,U)}else k.set(F,U);return this};function H(F){var U=!!k.delete(F);return w&&w.delete___(F)||U}return Object.create(h.prototype,{get___:{value:C(O)},has___:{value:C(N)},set___:{value:C(V)},delete___:{value:C(H)},permitHostObjects___:{value:C(function(F){if(F===e)R=!0;else throw new Error("bogus call to permitHostObjects___")})}})}p.prototype=h.prototype,t.exports=p,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),t.exports=h)})()},1570:function(t){t.exports=r;var e=[function(){function a(n,o,i,s){for(var f=n.length,x=[],y=0;y>1,b=i[2*u+1];if(b===y)return u;y>1,b=i[2*u+1];if(b===y)return u;y>1,b=i[2*u+1];if(b===y)return u;y HALF_PI) && (b <= ONE_AND_HALF_PI)) ? + b - PI : + b; +} + +float look_horizontal_or_vertical(float a, float ratio) { + // ratio controls the ratio between being horizontal to (vertical + horizontal) + // if ratio is set to 0.5 then it is 50%, 50%. + // when using a higher ratio e.g. 0.75 the result would + // likely be more horizontal than vertical. + + float b = positive_angle(a); + + return + (b < ( ratio) * HALF_PI) ? 0.0 : + (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI : + (b < (2.0 + ratio) * HALF_PI) ? 0.0 : + (b < (4.0 - ratio) * HALF_PI) ? HALF_PI : + 0.0; +} + +float roundTo(float a, float b) { + return float(b * floor((a + 0.5 * b) / b)); +} + +float look_round_n_directions(float a, int n) { + float b = positive_angle(a); + float div = TWO_PI / float(n); + float c = roundTo(b, div); + return look_upwards(c); +} + +float applyAlignOption(float rawAngle, float delta) { + return + (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions + (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical + (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis + (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards + (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal + rawAngle; // otherwise return back raw input angle +} + +bool isAxisTitle = (axis.x == 0.0) && + (axis.y == 0.0) && + (axis.z == 0.0); + +void main() { + //Compute world offset + float axisDistance = position.z; + vec3 dataPosition = axisDistance * axis + offset; + + float beta = angle; // i.e. user defined attributes for each tick + + float axisAngle; + float clipAngle; + float flip; + + if (enableAlign) { + axisAngle = (isAxisTitle) ? HALF_PI : + computeViewAngle(dataPosition, dataPosition + axis); + clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir); + + axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0; + clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0; + + flip = (dot(vec2(cos(axisAngle), sin(axisAngle)), + vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0; + + beta += applyAlignOption(clipAngle, flip * PI); + } + + //Compute plane offset + vec2 planeCoord = position.xy * pixelScale; + + mat2 planeXform = scale * mat2( + cos(beta), sin(beta), + -sin(beta), cos(beta) + ); + + vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution; + + //Compute clip position + vec3 clipPosition = project(dataPosition); + + //Apply text offset in clip coordinates + clipPosition += vec3(viewOffset, 0.0); + + //Done + gl_Position = vec4(clipPosition, 1.0); +} +`]),f=a([`precision highp float; +#define GLSLIFY 1 + +uniform vec4 color; +void main() { + gl_FragColor = color; +}`]);e.Q=function(v){return n(v,s,f,null,[{name:"position",type:"vec3"}])};var x=a([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec3 normal; + +uniform mat4 model, view, projection; +uniform vec3 enable; +uniform vec3 bounds[2]; + +varying vec3 colorChannel; + +void main() { + + vec3 signAxis = sign(bounds[1] - bounds[0]); + + vec3 realNormal = signAxis * normal; + + if(dot(realNormal, enable) > 0.0) { + vec3 minRange = min(bounds[0], bounds[1]); + vec3 maxRange = max(bounds[0], bounds[1]); + vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0)); + gl_Position = projection * (view * (model * vec4(nPosition, 1.0))); + } else { + gl_Position = vec4(0,0,0,0); + } + + colorChannel = abs(realNormal); +} +`]),y=a([`precision highp float; +#define GLSLIFY 1 + +uniform vec4 colors[3]; + +varying vec3 colorChannel; + +void main() { + gl_FragColor = colorChannel.x * colors[0] + + colorChannel.y * colors[1] + + colorChannel.z * colors[2]; +}`]);e.bg=function(v){return n(v,x,y,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},1888:function(t,e,r){var a=r(8828),n=r(1338),o=r(4793).hp;r.g.__TYPEDARRAY_POOL||(r.g.__TYPEDARRAY_POOL={UINT8:n([32,0]),UINT16:n([32,0]),UINT32:n([32,0]),BIGUINT64:n([32,0]),INT8:n([32,0]),INT16:n([32,0]),INT32:n([32,0]),BIGINT64:n([32,0]),FLOAT:n([32,0]),DOUBLE:n([32,0]),DATA:n([32,0]),UINT8C:n([32,0]),BUFFER:n([32,0])});var i=typeof Uint8ClampedArray<"u",s=typeof BigUint64Array<"u",f=typeof BigInt64Array<"u",x=r.g.__TYPEDARRAY_POOL;x.UINT8C||(x.UINT8C=n([32,0])),x.BIGUINT64||(x.BIGUINT64=n([32,0])),x.BIGINT64||(x.BIGINT64=n([32,0])),x.BUFFER||(x.BUFFER=n([32,0]));var y=x.DATA,v=x.BUFFER;e.free=function(H){if(o.isBuffer(H))v[a.log2(H.length)].push(H);else{if(Object.prototype.toString.call(H)!=="[object ArrayBuffer]"&&(H=H.buffer),!H)return;var F=H.length||H.byteLength,U=a.log2(F)|0;y[U].push(H)}};function T(H){if(H){var F=H.length||H.byteLength,U=a.log2(F);y[U].push(H)}}function u(H){T(H.buffer)}e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=u,e.freeArrayBuffer=T,e.freeBuffer=function(H){v[a.log2(H.length)].push(H)},e.malloc=function(H,F){if(F===void 0||F==="arraybuffer")return b(H);switch(F){case"uint8":return _(H);case"uint16":return C(H);case"uint32":return M(H);case"int8":return E(H);case"int16":return A(H);case"int32":return h(H);case"float":case"float32":return p(H);case"double":case"float64":return k(H);case"uint8_clamped":return w(H);case"bigint64":return O(H);case"biguint64":return R(H);case"buffer":return V(H);case"data":case"dataview":return N(H);default:return null}return null};function b(F){var F=a.nextPow2(F),U=a.log2(F),W=y[U];return W.length>0?W.pop():new ArrayBuffer(F)}e.mallocArrayBuffer=b;function _(H){return new Uint8Array(b(H),0,H)}e.mallocUint8=_;function C(H){return new Uint16Array(b(2*H),0,H)}e.mallocUint16=C;function M(H){return new Uint32Array(b(4*H),0,H)}e.mallocUint32=M;function E(H){return new Int8Array(b(H),0,H)}e.mallocInt8=E;function A(H){return new Int16Array(b(2*H),0,H)}e.mallocInt16=A;function h(H){return new Int32Array(b(4*H),0,H)}e.mallocInt32=h;function p(H){return new Float32Array(b(4*H),0,H)}e.mallocFloat32=e.mallocFloat=p;function k(H){return new Float64Array(b(8*H),0,H)}e.mallocFloat64=e.mallocDouble=k;function w(H){return i?new Uint8ClampedArray(b(H),0,H):_(H)}e.mallocUint8Clamped=w;function R(H){return s?new BigUint64Array(b(8*H),0,H):null}e.mallocBigUint64=R;function O(H){return f?new BigInt64Array(b(8*H),0,H):null}e.mallocBigInt64=O;function N(H){return new DataView(b(H),0,H)}e.mallocDataView=N;function V(H){H=a.nextPow2(H);var F=a.log2(H),U=v[F];return U.length>0?U.pop():new o(H)}e.mallocBuffer=V,e.clearCache=function(){for(var H=0;H<32;++H)x.UINT8[H].length=0,x.UINT16[H].length=0,x.UINT32[H].length=0,x.INT8[H].length=0,x.INT16[H].length=0,x.INT32[H].length=0,x.FLOAT[H].length=0,x.DOUBLE[H].length=0,x.BIGUINT64[H].length=0,x.BIGINT64[H].length=0,x.UINT8C[H].length=0,y[H].length=0,v[H].length=0}},1903:function(t){t.exports=e;function e(r){var a=new Float32Array(16);return a[0]=r[0],a[1]=r[1],a[2]=r[2],a[3]=r[3],a[4]=r[4],a[5]=r[5],a[6]=r[6],a[7]=r[7],a[8]=r[8],a[9]=r[9],a[10]=r[10],a[11]=r[11],a[12]=r[12],a[13]=r[13],a[14]=r[14],a[15]=r[15],a}},1944:function(t,e,r){var a=r(5250),n=r(8210);t.exports=o;function o(i,s){for(var f=a(i[0],s[0]),x=1;x>1,V=f(p[N],k);V<=0?(V===0&&(O=N),w=N+1):V>0&&(R=N-1)}return O}e.findCell=T;function u(p,k){for(var w=new Array(p.length),R=0,O=w.length;R=p.length||f(p[lt],N)!==0););}return w}e.incidence=u;function b(p,k){if(!k)return u(v(C(p,0)),p);for(var w=new Array(k),R=0;R>>U&1&&F.push(O[U]);k.push(F)}return y(k)}e.explode=_;function C(p,k){if(k<0)return[];for(var w=[],R=(1<0}h=h.filter(p);for(var k=h.length,w=new Array(k),R=new Array(k),A=0;A0;){var ut=Y.pop(),wt=pt[ut];f(wt,function(ge,he){return ge-he});var zt=wt.length,Pt=ft[ut],Wt;if(Pt===0){var U=h[ut];Wt=[U]}for(var A=0;A=0)&&(ft[Ht]=Pt^1,Y.push(Ht),Pt===0)){var U=h[Ht];it(U)||(U.reverse(),Wt.push(U))}}Pt===0&&_.push(Wt)}return _}},2145:function(t,e){e.uniforms=o,e.attributes=i;var r={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},a=null;function n(s,f){if(!a){var x=Object.keys(r);a={};for(var y=0;y1)for(var b=0;b1&&V.drawBuffersWEBGL(n[N]);var q=k.getExtension("WEBGL_depth_texture");q?H?h.depth=u(k,R,O,q.UNSIGNED_INT_24_8_WEBGL,k.DEPTH_STENCIL,k.DEPTH_STENCIL_ATTACHMENT):F&&(h.depth=u(k,R,O,k.UNSIGNED_SHORT,k.DEPTH_COMPONENT,k.DEPTH_ATTACHMENT)):F&&H?h._depth_rb=b(k,R,O,k.DEPTH_STENCIL,k.DEPTH_STENCIL_ATTACHMENT):F?h._depth_rb=b(k,R,O,k.DEPTH_COMPONENT16,k.DEPTH_ATTACHMENT):H&&(h._depth_rb=b(k,R,O,k.STENCIL_INDEX,k.STENCIL_ATTACHMENT));var X=k.checkFramebufferStatus(k.FRAMEBUFFER);if(X!==k.FRAMEBUFFER_COMPLETE){h._destroyed=!0,k.bindFramebuffer(k.FRAMEBUFFER,null),k.deleteFramebuffer(h.handle),h.handle=null,h.depth&&(h.depth.dispose(),h.depth=null),h._depth_rb&&(k.deleteRenderbuffer(h._depth_rb),h._depth_rb=null);for(var W=0;WR||k<0||k>R)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");h._shape[0]=p,h._shape[1]=k;for(var O=x(w),N=0;NO||k<0||k>O)throw new Error("gl-fbo: Parameters are too large for FBO");w=w||{};var N=1;if("color"in w){if(N=Math.max(w.color|0,0),N<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(N>1)if(R){if(N>h.getParameter(R.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+N+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var V=h.UNSIGNED_BYTE,H=h.getExtension("OES_texture_float");if(w.float&&N>0){if(!H)throw new Error("gl-fbo: Context does not support floating point textures");V=h.FLOAT}else w.preferFloat&&N>0&&H&&(V=h.FLOAT);var F=!0;"depth"in w&&(F=!!w.depth);var U=!1;return"stencil"in w&&(U=!!w.stencil),new C(h,p,k,V,N,F,U,R)}},2272:function(t,e,r){var a=r(2646)[4];r(2478),t.exports=o;function n(i,s,f,x,y,v){var T=s.opposite(x,y);if(!(T<0)){if(y0;){for(var b=f.pop(),v=f.pop(),_=-1,C=-1,T=y[v],E=1;E=0||(s.flip(v,b),n(i,s,f,_,v,C),n(i,s,f,v,C,_),n(i,s,f,C,b,_),n(i,s,f,b,_,C))}}},2334:function(t){t.exports=e;function e(r,a,n){return r[0]=Math.min(a[0],n[0]),r[1]=Math.min(a[1],n[1]),r[2]=Math.min(a[2],n[2]),r[3]=Math.min(a[3],n[3]),r}},2335:function(t){t.exports=e;function e(r){var a=new Float32Array(4);return a[0]=r[0],a[1]=r[1],a[2]=r[2],a[3]=r[3],a}},2361:function(t){var e=!1;if(typeof Float64Array<"u"){var r=new Float64Array(1),a=new Uint32Array(r.buffer);if(r[0]=1,e=!0,a[1]===1072693248){let o=function(f,x){return a[0]=f,a[1]=x,r[0]},i=function(f){return r[0]=f,a[0]},s=function(f){return r[0]=f,a[1]};t.exports=function(f){return r[0]=f,[a[0],a[1]]},t.exports.pack=o,t.exports.lo=i,t.exports.hi=s}else if(a[0]===1072693248){let o=function(f,x){return a[1]=f,a[0]=x,r[0]},i=function(f){return r[0]=f,a[1]},s=function(f){return r[0]=f,a[0]};t.exports=function(f){return r[0]=f,[a[1],a[0]]},t.exports.pack=o,t.exports.lo=i,t.exports.hi=s}else e=!1}if(!e){let o=function(f,x){return n.writeUInt32LE(f,0,!0),n.writeUInt32LE(x,4,!0),n.readDoubleLE(0,!0)},i=function(f){return n.writeDoubleLE(f,0,!0),n.readUInt32LE(0,!0)},s=function(f){return n.writeDoubleLE(f,0,!0),n.readUInt32LE(4,!0)};var n=new Buffer(8);t.exports=function(f){return n.writeDoubleLE(f,0,!0),[n.readUInt32LE(0,!0),n.readUInt32LE(4,!0)]},t.exports.pack=o,t.exports.lo=i,t.exports.hi=s}t.exports.sign=function(o){return t.exports.hi(o)>>>31},t.exports.exponent=function(o){var i=t.exports.hi(o);return(i<<1>>>21)-1023},t.exports.fraction=function(o){var i=t.exports.lo(o),s=t.exports.hi(o),f=s&(1<<20)-1;return s&2146435072&&(f+=1048576),[i,f]},t.exports.denormalized=function(o){var i=t.exports.hi(o);return!(i&2146435072)}},2408:function(t){t.exports=e;function e(r,a,n){var o=Math.sin(n),i=Math.cos(n),s=a[0],f=a[1],x=a[2],y=a[3],v=a[8],T=a[9],u=a[10],b=a[11];return a!==r&&(r[4]=a[4],r[5]=a[5],r[6]=a[6],r[7]=a[7],r[12]=a[12],r[13]=a[13],r[14]=a[14],r[15]=a[15]),r[0]=s*i-v*o,r[1]=f*i-T*o,r[2]=x*i-u*o,r[3]=y*i-b*o,r[8]=s*o+v*i,r[9]=f*o+T*i,r[10]=x*o+u*i,r[11]=y*o+b*i,r}},2419:function(t){t.exports=e;function e(r){for(var a=1,n=1;nC-_?o(f,x,y,v,T,u,b,_,C,M,E):i(f,x,y,v,T,u,b,_,C,M,E)}return s}function a(){function o(y,v,T,u,b,_,C,M,E,A,h){for(var p=2*y,k=u,w=p*u;kA-E?u?o(y,v,T,b,_,C,M,E,A,h,p):i(y,v,T,b,_,C,M,E,A,h,p):u?s(y,v,T,b,_,C,M,E,A,h,p):f(y,v,T,b,_,C,M,E,A,h,p)}return x}function n(o){return o?r():a()}e.partial=n(!1),e.full=n(!0)},2478:function(t){function e(s,f,x,y,v){for(var T=v+1;y<=v;){var u=y+v>>>1,b=s[u],_=x!==void 0?x(b,f):b-f;_>=0?(T=u,v=u-1):y=u+1}return T}function r(s,f,x,y,v){for(var T=v+1;y<=v;){var u=y+v>>>1,b=s[u],_=x!==void 0?x(b,f):b-f;_>0?(T=u,v=u-1):y=u+1}return T}function a(s,f,x,y,v){for(var T=y-1;y<=v;){var u=y+v>>>1,b=s[u],_=x!==void 0?x(b,f):b-f;_<0?(T=u,y=u+1):v=u-1}return T}function n(s,f,x,y,v){for(var T=y-1;y<=v;){var u=y+v>>>1,b=s[u],_=x!==void 0?x(b,f):b-f;_<=0?(T=u,y=u+1):v=u-1}return T}function o(s,f,x,y,v){for(;y<=v;){var T=y+v>>>1,u=s[T],b=x!==void 0?x(u,f):u-f;if(b===0)return T;b<=0?y=T+1:v=T-1}return-1}function i(s,f,x,y,v,T){return typeof x=="function"?T(s,f,x,y===void 0?0:y|0,v===void 0?s.length-1:v|0):T(s,f,void 0,x===void 0?0:x|0,y===void 0?s.length-1:y|0)}t.exports={ge:function(s,f,x,y,v){return i(s,f,x,y,v,e)},gt:function(s,f,x,y,v){return i(s,f,x,y,v,r)},lt:function(s,f,x,y,v){return i(s,f,x,y,v,a)},le:function(s,f,x,y,v){return i(s,f,x,y,v,n)},eq:function(s,f,x,y,v){return i(s,f,x,y,v,o)}}},2504:function(t){t.exports=e;function e(r,a,n){var o=n[0],i=n[1],s=n[2];return r[0]=a[0]*o,r[1]=a[1]*o,r[2]=a[2]*o,r[3]=a[3]*o,r[4]=a[4]*i,r[5]=a[5]*i,r[6]=a[6]*i,r[7]=a[7]*i,r[8]=a[8]*s,r[9]=a[9]*s,r[10]=a[10]*s,r[11]=a[11]*s,r[12]=a[12],r[13]=a[13],r[14]=a[14],r[15]=a[15],r}},2538:function(t,e,r){var a=r(8902),n=r(5542),o=r(2272),i=r(5023);t.exports=v;function s(T){return[Math.min(T[0],T[1]),Math.max(T[0],T[1])]}function f(T,u){return T[0]-u[0]||T[1]-u[1]}function x(T){return T.map(s).sort(f)}function y(T,u,b){return u in T?T[u]:b}function v(T,u,b){Array.isArray(u)?(b=b||{},u=u||[]):(b=u||{},u=[]);var _=!!y(b,"delaunay",!0),C=!!y(b,"interior",!0),M=!!y(b,"exterior",!0),E=!!y(b,"infinity",!1);if(!C&&!M||T.length===0)return[];var A=a(T,u);if(_||C!==M||E){for(var h=n(T.length,x(u)),p=0;p0){if(X=1,pt[tt++]=x(E[k],u,b,_),k+=U,C>0)for(q=1,w=E[k],dt=pt[tt]=x(w,u,b,_),vt=pt[tt+rt],ft=pt[tt+it],zt=pt[tt+ut],(dt!==vt||dt!==ft||dt!==zt)&&(O=E[k+R],V=E[k+N],F=E[k+H],s(q,X,w,O,V,F,dt,vt,ft,zt,u,b,_),Pt=st[tt]=lt++),tt+=1,k+=U,q=2;q0)for(q=1,w=E[k],dt=pt[tt]=x(w,u,b,_),vt=pt[tt+rt],ft=pt[tt+it],zt=pt[tt+ut],(dt!==vt||dt!==ft||dt!==zt)&&(O=E[k+R],V=E[k+N],F=E[k+H],s(q,X,w,O,V,F,dt,vt,ft,zt,u,b,_),Pt=st[tt]=lt++,zt!==ft&&f(st[tt+it],Pt,V,F,ft,zt,u,b,_)),tt+=1,k+=U,q=2;q0){if(q=1,pt[tt++]=x(E[k],u,b,_),k+=U,M>0)for(X=1,w=E[k],dt=pt[tt]=x(w,u,b,_),ft=pt[tt+it],vt=pt[tt+rt],zt=pt[tt+ut],(dt!==ft||dt!==vt||dt!==zt)&&(O=E[k+R],V=E[k+N],F=E[k+H],s(q,X,w,O,V,F,dt,ft,vt,zt,u,b,_),Pt=st[tt]=lt++),tt+=1,k+=U,X=2;X0)for(X=1,w=E[k],dt=pt[tt]=x(w,u,b,_),ft=pt[tt+it],vt=pt[tt+rt],zt=pt[tt+ut],(dt!==ft||dt!==vt||dt!==zt)&&(O=E[k+R],V=E[k+N],F=E[k+H],s(q,X,w,O,V,F,dt,ft,vt,zt,u,b,_),Pt=st[tt]=lt++,zt!==ft&&f(st[tt+it],Pt,F,O,zt,ft,u,b,_)),tt+=1,k+=U,X=2;X 0"),typeof s.vertex!="function"&&f("Must specify vertex creation function"),typeof s.cell!="function"&&f("Must specify cell creation function"),typeof s.phase!="function"&&f("Must specify phase function");for(var T=s.getters||[],u=new Array(y),b=0;b=0?u[b]=!0:u[b]=!1;return o(s.vertex,s.cell,s.phase,v,x,u)}},2642:function(t,e,r){t.exports=o;var a=r(727);function n(i){for(var s=0,f=0;fu[1][2]&&(w[0]=-w[0]),u[0][2]>u[2][0]&&(w[1]=-w[1]),u[1][0]>u[0][1]&&(w[2]=-w[2]),!0};function _(E,A,h){var p=A[0],k=A[1],w=A[2],R=A[3];return E[0]=h[0]*p+h[4]*k+h[8]*w+h[12]*R,E[1]=h[1]*p+h[5]*k+h[9]*w+h[13]*R,E[2]=h[2]*p+h[6]*k+h[10]*w+h[14]*R,E[3]=h[3]*p+h[7]*k+h[11]*w+h[15]*R,E}function C(E,A){E[0][0]=A[0],E[0][1]=A[1],E[0][2]=A[2],E[1][0]=A[4],E[1][1]=A[5],E[1][2]=A[6],E[2][0]=A[8],E[2][1]=A[9],E[2][2]=A[10]}function M(E,A,h,p,k){E[0]=A[0]*p+h[0]*k,E[1]=A[1]*p+h[1]*k,E[2]=A[2]*p+h[2]*k}},2653:function(t,e,r){var a=r(3865);t.exports=n;function n(o,i){for(var s=o.length,f=new Array(s),x=0;x=x[C]&&(_+=1);u[b]=_}}return f}function s(f,x){try{return a(f,!0)}catch{var y=n(f);if(y.length<=x)return[];var v=o(f,y),T=a(v,!0);return i(T,y)}}},2762:function(t,e,r){var a=r(1888),n=r(5298),o=r(9618),i=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function s(u,b,_,C,M){this.gl=u,this.type=b,this.handle=_,this.length=C,this.usage=M}var f=s.prototype;f.bind=function(){this.gl.bindBuffer(this.type,this.handle)},f.unbind=function(){this.gl.bindBuffer(this.type,null)},f.dispose=function(){this.gl.deleteBuffer(this.handle)};function x(u,b,_,C,M,E){var A=M.length*M.BYTES_PER_ELEMENT;if(E<0)return u.bufferData(b,M,C),A;if(A+E>_)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return u.bufferSubData(b,E,M),_}function y(u,b){for(var _=a.malloc(u.length,b),C=u.length,M=0;M=0;--C){if(b[C]!==_)return!1;_*=u[C]}return!0}f.update=function(u,b){if(typeof b!="number"&&(b=-1),this.bind(),typeof u=="object"&&typeof u.shape<"u"){var _=u.dtype;if(i.indexOf(_)<0&&(_="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var C=gl.getExtension("OES_element_index_uint");C&&_!=="uint16"?_="uint32":_="uint16"}if(_===u.dtype&&v(u.shape,u.stride))u.offset===0&&u.data.length===u.shape[0]?this.length=x(this.gl,this.type,this.length,this.usage,u.data,b):this.length=x(this.gl,this.type,this.length,this.usage,u.data.subarray(u.offset,u.shape[0]),b);else{var M=a.malloc(u.size,_),E=o(M,u.shape);n.assign(E,u),b<0?this.length=x(this.gl,this.type,this.length,this.usage,M,b):this.length=x(this.gl,this.type,this.length,this.usage,M.subarray(0,u.size),b),a.free(M)}}else if(Array.isArray(u)){var A;this.type===this.gl.ELEMENT_ARRAY_BUFFER?A=y(u,"uint16"):A=y(u,"float32"),b<0?this.length=x(this.gl,this.type,this.length,this.usage,A,b):this.length=x(this.gl,this.type,this.length,this.usage,A.subarray(0,u.length),b),a.free(A)}else if(typeof u=="object"&&typeof u.length=="number")this.length=x(this.gl,this.type,this.length,this.usage,u,b);else if(typeof u=="number"||u===void 0){if(b>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");u=u|0,u<=0&&(u=1),this.gl.bufferData(this.type,u|0,this.usage),this.length=u}else throw new Error("gl-buffer: Invalid data type")};function T(u,b,_,C){if(_=_||u.ARRAY_BUFFER,C=C||u.DYNAMIC_DRAW,_!==u.ARRAY_BUFFER&&_!==u.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(C!==u.DYNAMIC_DRAW&&C!==u.STATIC_DRAW&&C!==u.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var M=u.createBuffer(),E=new s(u,_,M,0,C);return E.update(b),E}t.exports=T},2825:function(t){t.exports=e;function e(r,a,n){var o=new Float32Array(3);return o[0]=r,o[1]=a,o[2]=n,o}},2931:function(t,e,r){t.exports={EPSILON:r(2613),create:r(1091),clone:r(3126),angle:r(8192),fromValues:r(2825),copy:r(3990),set:r(1463),equals:r(9922),exactEquals:r(9265),add:r(5632),subtract:r(6843),sub:r(2229),multiply:r(5847),mul:r(4505),divide:r(6690),div:r(4008),min:r(8107),max:r(7417),floor:r(2681),ceil:r(9226),round:r(2447),scale:r(6621),scaleAndAdd:r(8489),distance:r(7056),dist:r(5455),squaredDistance:r(2953),sqrDist:r(6141),length:r(1387),len:r(868),squaredLength:r(3066),sqrLen:r(5486),negate:r(5093),inverse:r(811),normalize:r(3536),dot:r(244),cross:r(5911),lerp:r(6658),random:r(7636),transformMat4:r(5673),transformMat3:r(492),transformQuat:r(264),rotateX:r(6894),rotateY:r(109),rotateZ:r(8692),forEach:r(5137)}},2933:function(t){t.exports=e;function e(r,a){return r[0]=a[0],r[1]=a[1],r[2]=a[2],r[3]=a[3],r}},2953:function(t){t.exports=e;function e(r,a){var n=a[0]-r[0],o=a[1]-r[1],i=a[2]-r[2];return n*n+o*o+i*i}},2962:function(t,e,r){var a=r(5250),n=r(8210),o=r(3012),i=r(7004),s=6;function f(C,M,E,A){return function(h){return A(C(E(h[0][0],h[1][1]),E(-h[0][1],h[1][0])))}}function x(C,M,E,A){return function(h){return A(C(M(C(E(h[1][1],h[2][2]),E(-h[1][2],h[2][1])),h[0][0]),C(M(C(E(h[1][0],h[2][2]),E(-h[1][2],h[2][0])),-h[0][1]),M(C(E(h[1][0],h[2][1]),E(-h[1][1],h[2][0])),h[0][2]))))}}function y(C,M,E,A){return function(h){return A(C(C(M(C(M(C(E(h[2][2],h[3][3]),E(-h[2][3],h[3][2])),h[1][1]),C(M(C(E(h[2][1],h[3][3]),E(-h[2][3],h[3][1])),-h[1][2]),M(C(E(h[2][1],h[3][2]),E(-h[2][2],h[3][1])),h[1][3]))),h[0][0]),M(C(M(C(E(h[2][2],h[3][3]),E(-h[2][3],h[3][2])),h[1][0]),C(M(C(E(h[2][0],h[3][3]),E(-h[2][3],h[3][0])),-h[1][2]),M(C(E(h[2][0],h[3][2]),E(-h[2][2],h[3][0])),h[1][3]))),-h[0][1])),C(M(C(M(C(E(h[2][1],h[3][3]),E(-h[2][3],h[3][1])),h[1][0]),C(M(C(E(h[2][0],h[3][3]),E(-h[2][3],h[3][0])),-h[1][1]),M(C(E(h[2][0],h[3][1]),E(-h[2][1],h[3][0])),h[1][3]))),h[0][2]),M(C(M(C(E(h[2][1],h[3][2]),E(-h[2][2],h[3][1])),h[1][0]),C(M(C(E(h[2][0],h[3][2]),E(-h[2][2],h[3][0])),-h[1][1]),M(C(E(h[2][0],h[3][1]),E(-h[2][1],h[3][0])),h[1][2]))),-h[0][3]))))}}function v(C,M,E,A){return function(h){return A(C(C(M(C(C(M(C(M(C(E(h[3][3],h[4][4]),E(-h[3][4],h[4][3])),h[2][2]),C(M(C(E(h[3][2],h[4][4]),E(-h[3][4],h[4][2])),-h[2][3]),M(C(E(h[3][2],h[4][3]),E(-h[3][3],h[4][2])),h[2][4]))),h[1][1]),M(C(M(C(E(h[3][3],h[4][4]),E(-h[3][4],h[4][3])),h[2][1]),C(M(C(E(h[3][1],h[4][4]),E(-h[3][4],h[4][1])),-h[2][3]),M(C(E(h[3][1],h[4][3]),E(-h[3][3],h[4][1])),h[2][4]))),-h[1][2])),C(M(C(M(C(E(h[3][2],h[4][4]),E(-h[3][4],h[4][2])),h[2][1]),C(M(C(E(h[3][1],h[4][4]),E(-h[3][4],h[4][1])),-h[2][2]),M(C(E(h[3][1],h[4][2]),E(-h[3][2],h[4][1])),h[2][4]))),h[1][3]),M(C(M(C(E(h[3][2],h[4][3]),E(-h[3][3],h[4][2])),h[2][1]),C(M(C(E(h[3][1],h[4][3]),E(-h[3][3],h[4][1])),-h[2][2]),M(C(E(h[3][1],h[4][2]),E(-h[3][2],h[4][1])),h[2][3]))),-h[1][4]))),h[0][0]),M(C(C(M(C(M(C(E(h[3][3],h[4][4]),E(-h[3][4],h[4][3])),h[2][2]),C(M(C(E(h[3][2],h[4][4]),E(-h[3][4],h[4][2])),-h[2][3]),M(C(E(h[3][2],h[4][3]),E(-h[3][3],h[4][2])),h[2][4]))),h[1][0]),M(C(M(C(E(h[3][3],h[4][4]),E(-h[3][4],h[4][3])),h[2][0]),C(M(C(E(h[3][0],h[4][4]),E(-h[3][4],h[4][0])),-h[2][3]),M(C(E(h[3][0],h[4][3]),E(-h[3][3],h[4][0])),h[2][4]))),-h[1][2])),C(M(C(M(C(E(h[3][2],h[4][4]),E(-h[3][4],h[4][2])),h[2][0]),C(M(C(E(h[3][0],h[4][4]),E(-h[3][4],h[4][0])),-h[2][2]),M(C(E(h[3][0],h[4][2]),E(-h[3][2],h[4][0])),h[2][4]))),h[1][3]),M(C(M(C(E(h[3][2],h[4][3]),E(-h[3][3],h[4][2])),h[2][0]),C(M(C(E(h[3][0],h[4][3]),E(-h[3][3],h[4][0])),-h[2][2]),M(C(E(h[3][0],h[4][2]),E(-h[3][2],h[4][0])),h[2][3]))),-h[1][4]))),-h[0][1])),C(M(C(C(M(C(M(C(E(h[3][3],h[4][4]),E(-h[3][4],h[4][3])),h[2][1]),C(M(C(E(h[3][1],h[4][4]),E(-h[3][4],h[4][1])),-h[2][3]),M(C(E(h[3][1],h[4][3]),E(-h[3][3],h[4][1])),h[2][4]))),h[1][0]),M(C(M(C(E(h[3][3],h[4][4]),E(-h[3][4],h[4][3])),h[2][0]),C(M(C(E(h[3][0],h[4][4]),E(-h[3][4],h[4][0])),-h[2][3]),M(C(E(h[3][0],h[4][3]),E(-h[3][3],h[4][0])),h[2][4]))),-h[1][1])),C(M(C(M(C(E(h[3][1],h[4][4]),E(-h[3][4],h[4][1])),h[2][0]),C(M(C(E(h[3][0],h[4][4]),E(-h[3][4],h[4][0])),-h[2][1]),M(C(E(h[3][0],h[4][1]),E(-h[3][1],h[4][0])),h[2][4]))),h[1][3]),M(C(M(C(E(h[3][1],h[4][3]),E(-h[3][3],h[4][1])),h[2][0]),C(M(C(E(h[3][0],h[4][3]),E(-h[3][3],h[4][0])),-h[2][1]),M(C(E(h[3][0],h[4][1]),E(-h[3][1],h[4][0])),h[2][3]))),-h[1][4]))),h[0][2]),C(M(C(C(M(C(M(C(E(h[3][2],h[4][4]),E(-h[3][4],h[4][2])),h[2][1]),C(M(C(E(h[3][1],h[4][4]),E(-h[3][4],h[4][1])),-h[2][2]),M(C(E(h[3][1],h[4][2]),E(-h[3][2],h[4][1])),h[2][4]))),h[1][0]),M(C(M(C(E(h[3][2],h[4][4]),E(-h[3][4],h[4][2])),h[2][0]),C(M(C(E(h[3][0],h[4][4]),E(-h[3][4],h[4][0])),-h[2][2]),M(C(E(h[3][0],h[4][2]),E(-h[3][2],h[4][0])),h[2][4]))),-h[1][1])),C(M(C(M(C(E(h[3][1],h[4][4]),E(-h[3][4],h[4][1])),h[2][0]),C(M(C(E(h[3][0],h[4][4]),E(-h[3][4],h[4][0])),-h[2][1]),M(C(E(h[3][0],h[4][1]),E(-h[3][1],h[4][0])),h[2][4]))),h[1][2]),M(C(M(C(E(h[3][1],h[4][2]),E(-h[3][2],h[4][1])),h[2][0]),C(M(C(E(h[3][0],h[4][2]),E(-h[3][2],h[4][0])),-h[2][1]),M(C(E(h[3][0],h[4][1]),E(-h[3][1],h[4][0])),h[2][2]))),-h[1][4]))),-h[0][3]),M(C(C(M(C(M(C(E(h[3][2],h[4][3]),E(-h[3][3],h[4][2])),h[2][1]),C(M(C(E(h[3][1],h[4][3]),E(-h[3][3],h[4][1])),-h[2][2]),M(C(E(h[3][1],h[4][2]),E(-h[3][2],h[4][1])),h[2][3]))),h[1][0]),M(C(M(C(E(h[3][2],h[4][3]),E(-h[3][3],h[4][2])),h[2][0]),C(M(C(E(h[3][0],h[4][3]),E(-h[3][3],h[4][0])),-h[2][2]),M(C(E(h[3][0],h[4][2]),E(-h[3][2],h[4][0])),h[2][3]))),-h[1][1])),C(M(C(M(C(E(h[3][1],h[4][3]),E(-h[3][3],h[4][1])),h[2][0]),C(M(C(E(h[3][0],h[4][3]),E(-h[3][3],h[4][0])),-h[2][1]),M(C(E(h[3][0],h[4][1]),E(-h[3][1],h[4][0])),h[2][3]))),h[1][2]),M(C(M(C(E(h[3][1],h[4][2]),E(-h[3][2],h[4][1])),h[2][0]),C(M(C(E(h[3][0],h[4][2]),E(-h[3][2],h[4][0])),-h[2][1]),M(C(E(h[3][0],h[4][1]),E(-h[3][1],h[4][0])),h[2][2]))),-h[1][3]))),h[0][4])))))}}function T(C){var M=C===2?f:C===3?x:C===4?y:C===5?v:void 0;return M(n,o,a,i)}var u=[function(){return[0]},function(C){return[C[0][0]]}];function b(C,M,E,A,h,p,k,w){return function(R){switch(R.length){case 0:return C(R);case 1:return M(R);case 2:return E(R);case 3:return A(R);case 4:return h(R);case 5:return p(R)}var O=k[R.length];return O||(O=k[R.length]=w(R.length)),O(R)}}function _(){for(;u.length0){w=x[N][p][0],O=N;break}R=w[O^1];for(var V=0;V<2;++V)for(var H=x[V][p],F=0;F0&&(w=U,R=W,O=V)}return k||w&&u(w,O),R}function _(h,p){var k=x[p][h][0],w=[h];u(k,p);for(var R=k[p^1],O=p;;){for(;R!==h;)w.push(R),R=b(w[w.length-2],R,!1);if(x[0][h].length+x[1][h].length===0)break;var N=w[w.length-1],V=h,H=w[1],F=b(N,V,!0);if(a(i[N],i[V],i[H],i[F])<0)break;w.push(h),R=b(N,V)}return w}function C(h,p){return p[1]===p[p.length-1]}for(var y=0;y0;){x[0][y].length;var A=_(y,M);C(E,A)?E.push.apply(E,A):(E.length>0&&T.push(E),E=A)}E.length>0&&T.push(E)}return T}},3090:function(t,e,r){t.exports=n;var a=r(3250)[3];function n(o){var i=o.length;if(i<3){for(var s=new Array(i),f=0;f1&&a(o[y[b-2]],o[y[b-1]],u)<=0;)b-=1,y.pop();for(y.push(T),b=v.length;b>1&&a(o[v[b-2]],o[v[b-1]],u)>=0;)b-=1,v.pop();v.push(T)}for(var s=new Array(v.length+y.length-2),_=0,f=0,C=y.length;f0;--M)s[_++]=v[M];return s}},3105:function(t,e){"use restrict";var r=32;e.INT_BITS=r,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(o<0)},e.abs=function(o){var i=o>>r-1;return(o^i)-i},e.min=function(o,i){return i^(o^i)&-(o65535)<<4,o>>>=i,s=(o>255)<<3,o>>>=s,i|=s,s=(o>15)<<2,o>>>=s,i|=s,s=(o>3)<<1,o>>>=s,i|=s,i|o>>1},e.log10=function(o){return o>=1e9?9:o>=1e8?8:o>=1e7?7:o>=1e6?6:o>=1e5?5:o>=1e4?4:o>=1e3?3:o>=100?2:o>=10?1:0},e.popCount=function(o){return o=o-(o>>>1&1431655765),o=(o&858993459)+(o>>>2&858993459),(o+(o>>>4)&252645135)*16843009>>>24};function a(o){var i=32;return o&=-o,o&&i--,o&65535&&(i-=16),o&16711935&&(i-=8),o&252645135&&(i-=4),o&858993459&&(i-=2),o&1431655765&&(i-=1),i}e.countTrailingZeros=a,e.nextPow2=function(o){return o+=o===0,--o,o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o+1},e.prevPow2=function(o){return o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o-(o>>>1)},e.parity=function(o){return o^=o>>>16,o^=o>>>8,o^=o>>>4,o&=15,27030>>>o&1};var n=new Array(256);(function(o){for(var i=0;i<256;++i){var s=i,f=i,x=7;for(s>>>=1;s;s>>>=1)f<<=1,f|=s&1,--x;o[i]=f<>>8&255]<<16|n[o>>>16&255]<<8|n[o>>>24&255]},e.interleave2=function(o,i){return o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,o|i<<1},e.deinterleave2=function(o,i){return o=o>>>i&1431655765,o=(o|o>>>1)&858993459,o=(o|o>>>2)&252645135,o=(o|o>>>4)&16711935,o=(o|o>>>16)&65535,o<<16>>16},e.interleave3=function(o,i,s){return o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,o|=i<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,o|s<<2},e.deinterleave3=function(o,i){return o=o>>>i&1227133513,o=(o|o>>>2)&3272356035,o=(o|o>>>4)&251719695,o=(o|o>>>8)&4278190335,o=(o|o>>>16)&1023,o<<22>>22},e.nextCombination=function(o){var i=o|o-1;return i+1|(~i&-~i)-1>>>a(o)+1}},3126:function(t){t.exports=e;function e(r){var a=new Float32Array(3);return a[0]=r[0],a[1]=r[1],a[2]=r[2],a}},3134:function(t,e,r){t.exports=n;var a=r(1682);function n(o,i){var s=o.length;if(typeof i!="number"){i=0;for(var f=0;f=0}function x(y,v,T,u){var b=a(v,T,u);if(b===0){var _=n(a(y,v,T)),C=n(a(y,v,u));if(_===C){if(_===0){var M=f(y,v,T),E=f(y,v,u);return M===E?0:M?1:-1}return 0}else{if(C===0)return _>0||f(y,v,u)?-1:1;if(_===0)return C>0||f(y,v,T)?1:-1}return n(C-_)}var A=a(y,v,T);if(A>0)return b>0&&a(y,v,u)>0?1:-1;if(A<0)return b>0||a(y,v,u)>0?1:-1;var h=a(y,v,u);return h>0||f(y,v,T)?1:-1}},3202:function(t){t.exports=function(e,r){r||(r=[0,""]),e=String(e);var a=parseFloat(e,10);return r[0]=a,r[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",r}},3233:function(t){var e="",r;t.exports=a;function a(n,o){if(typeof n!="string")throw new TypeError("expected a string");if(o===1)return n;if(o===2)return n+n;var i=n.length*o;if(r!==n||typeof r>"u")r=n,e="";else if(e.length>=i)return e.substr(0,i);for(;i>e.length&&o>1;)o&1&&(e+=n),o>>=1,n+=n;return e+=n,e=e.substr(0,i),e}},3236:function(t){t.exports=function(e){typeof e=="string"&&(e=[e]);for(var r=[].slice.call(arguments,1),a=[],n=0;n0){if(O<=0)return N;V=R+O}else if(R<0){if(O>=0)return N;V=-(R+O)}else return N;var H=x*V;return N>=H||N<=-H?N:_(p,k,w)},function(p,k,w,R){var O=p[0]-R[0],N=k[0]-R[0],V=w[0]-R[0],H=p[1]-R[1],F=k[1]-R[1],U=w[1]-R[1],W=p[2]-R[2],q=k[2]-R[2],X=w[2]-R[2],lt=N*U,yt=V*F,pt=V*H,st=O*U,tt=O*F,dt=N*H,rt=W*(lt-yt)+q*(pt-st)+X*(tt-dt),at=(Math.abs(lt)+Math.abs(yt))*Math.abs(W)+(Math.abs(pt)+Math.abs(st))*Math.abs(q)+(Math.abs(tt)+Math.abs(dt))*Math.abs(X),vt=y*at;return rt>vt||-rt>vt?rt:C(p,k,w,R)}];function E(p){var k=M[p.length];return k||(k=M[p.length]=b(p.length)),k.apply(void 0,p)}function A(p,k,w,R,O,N,V){return function(H,F,U,W,q){switch(arguments.length){case 0:case 1:return 0;case 2:return R(H,F);case 3:return O(H,F,U);case 4:return N(H,F,U,W);case 5:return V(H,F,U,W,q)}for(var X=new Array(arguments.length),lt=0;lt4)throw new n("","Invalid data type");switch(W.charAt(0)){case"b":case"i":f["uniform"+q+"iv"](v[O],N);break;case"v":f["uniform"+q+"fv"](v[O],N);break;default:throw new n("","Unrecognized data type for vector "+name+": "+W)}}else if(W.indexOf("mat")===0&&W.length===4){if(q=W.charCodeAt(W.length-1)-48,q<2||q>4)throw new n("","Invalid uniform dimension type for matrix "+name+": "+W);f["uniformMatrix"+q+"fv"](v[O],!1,N);break}else throw new n("","Unknown uniform data type for "+name+": "+W)}}}}}function b(A,h){if(typeof h!="object")return[[A,h]];var p=[];for(var k in h){var w=h[k],R=A;parseInt(k)+""===k?R+="["+k+"]":R+="."+k,typeof w=="object"?p.push.apply(p,b(R,w)):p.push([R,w])}return p}function _(A){switch(A){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var h=A.indexOf("vec");if(0<=h&&h<=1&&A.length===4+h){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new n("","Invalid data type");return A.charAt(0)==="b"?i(p,!1):i(p,0)}else if(A.indexOf("mat")===0&&A.length===4){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new n("","Invalid uniform dimension type for matrix "+name+": "+A);return i(p*p,0)}else throw new n("","Unknown uniform data type for "+name+": "+A)}}function C(A,h,p){if(typeof p=="object"){var k=M(p);Object.defineProperty(A,h,{get:o(k),set:u(p),enumerable:!0,configurable:!1})}else v[p]?Object.defineProperty(A,h,{get:T(p),set:u(p),enumerable:!0,configurable:!1}):A[h]=_(y[p].type)}function M(A){var h;if(Array.isArray(A)){h=new Array(A.length);for(var p=0;p=0!=h>=0&&v.push(_[0]+.5+.5*(A+h)/(A-h))}y+=E,++_[0]}}}function r(){return e()}var a=r;function n(s){var f={};return function(x,y,v){var T=x.dtype,u=x.order,b=[T,u.join()].join(),_=f[b];return _||(f[b]=_=s([T,u])),_(x.shape.slice(0),x.data,x.stride,x.offset|0,y,v)}}function o(s){return n(a.bind(void 0,s))}function i(s){return o({funcName:s.funcName})}t.exports=i({funcName:"zeroCrossings"})},3352:function(t,e,r){var a=r(2478),n=0,o=1,i=2;t.exports=k;function s(w,R,O,N,V){this.mid=w,this.left=R,this.right=O,this.leftPoints=N,this.rightPoints=V,this.count=(R?R.count:0)+(O?O.count:0)+N.length}var f=s.prototype;function x(w,R){w.mid=R.mid,w.left=R.left,w.right=R.right,w.leftPoints=R.leftPoints,w.rightPoints=R.rightPoints,w.count=R.count}function y(w,R){var O=A(R);w.mid=O.mid,w.left=O.left,w.right=O.right,w.leftPoints=O.leftPoints,w.rightPoints=O.rightPoints,w.count=O.count}function v(w,R){var O=w.intervals([]);O.push(R),y(w,O)}function T(w,R){var O=w.intervals([]),N=O.indexOf(R);return N<0?n:(O.splice(N,1),y(w,O),o)}f.intervals=function(w){return w.push.apply(w,this.leftPoints),this.left&&this.left.intervals(w),this.right&&this.right.intervals(w),w},f.insert=function(w){var R=this.count-this.leftPoints.length;if(this.count+=1,w[1]3*(R+1)?v(this,w):this.left.insert(w):this.left=A([w]);else if(w[0]>this.mid)this.right?4*(this.right.count+1)>3*(R+1)?v(this,w):this.right.insert(w):this.right=A([w]);else{var O=a.ge(this.leftPoints,w,M),N=a.ge(this.rightPoints,w,E);this.leftPoints.splice(O,0,w),this.rightPoints.splice(N,0,w)}},f.remove=function(w){var R=this.count-this.leftPoints;if(w[1]3*(R-1))return T(this,w);var N=this.left.remove(w);return N===i?(this.left=null,this.count-=1,o):(N===o&&(this.count-=1),N)}else if(w[0]>this.mid){if(!this.right)return n;var V=this.left?this.left.count:0;if(4*V>3*(R-1))return T(this,w);var N=this.right.remove(w);return N===i?(this.right=null,this.count-=1,o):(N===o&&(this.count-=1),N)}else{if(this.count===1)return this.leftPoints[0]===w?i:n;if(this.leftPoints.length===1&&this.leftPoints[0]===w){if(this.left&&this.right){for(var H=this,F=this.left;F.right;)H=F,F=F.right;if(H===this)F.right=this.right;else{var U=this.left,N=this.right;H.count-=F.count,H.right=F.left,F.left=U,F.right=N}x(this,F),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?x(this,this.left):x(this,this.right);return o}for(var U=a.ge(this.leftPoints,w,M);U=0&&w[N][1]>=R;--N){var V=O(w[N]);if(V)return V}}function _(w,R){for(var O=0;Othis.mid){if(this.right){var O=this.right.queryPoint(w,R);if(O)return O}return b(this.rightPoints,w,R)}else return _(this.leftPoints,R)},f.queryInterval=function(w,R,O){if(wthis.mid&&this.right){var N=this.right.queryInterval(w,R,O);if(N)return N}return Rthis.mid?b(this.rightPoints,w,O):_(this.leftPoints,O)};function C(w,R){return w-R}function M(w,R){var O=w[0]-R[0];return O||w[1]-R[1]}function E(w,R){var O=w[1]-R[1];return O||w[0]-R[0]}function A(w){if(w.length===0)return null;for(var R=[],O=0;O>1],V=[],H=[],F=[],O=0;O=0),E.type){case"b":b=parseInt(b,10).toString(2);break;case"c":b=String.fromCharCode(parseInt(b,10));break;case"d":case"i":b=parseInt(b,10);break;case"j":b=JSON.stringify(b,null,E.width?parseInt(E.width):0);break;case"e":b=E.precision?parseFloat(b).toExponential(E.precision):parseFloat(b).toExponential();break;case"f":b=E.precision?parseFloat(b).toFixed(E.precision):parseFloat(b);break;case"g":b=E.precision?String(Number(b.toPrecision(E.precision))):parseFloat(b);break;case"o":b=(parseInt(b,10)>>>0).toString(8);break;case"s":b=String(b),b=E.precision?b.substring(0,E.precision):b;break;case"t":b=String(!!b),b=E.precision?b.substring(0,E.precision):b;break;case"T":b=Object.prototype.toString.call(b).slice(8,-1).toLowerCase(),b=E.precision?b.substring(0,E.precision):b;break;case"u":b=parseInt(b,10)>>>0;break;case"v":b=b.valueOf(),b=E.precision?b.substring(0,E.precision):b;break;case"x":b=(parseInt(b,10)>>>0).toString(16);break;case"X":b=(parseInt(b,10)>>>0).toString(16).toUpperCase();break}n.json.test(E.type)?_+=b:(n.number.test(E.type)&&(!k||E.sign)?(w=k?"+":"-",b=b.toString().replace(n.sign,"")):w="",h=E.pad_char?E.pad_char==="0"?"0":E.pad_char.charAt(1):" ",p=E.width-(w+b).length,A=E.width&&p>0?h.repeat(p):"",_+=E.align?w+b+A:h==="0"?w+A+b:A+w+b)}return _}var f=Object.create(null);function x(y){if(f[y])return f[y];for(var v=y,T,u=[],b=0;v;){if((T=n.text.exec(v))!==null)u.push(T[0]);else if((T=n.modulo.exec(v))!==null)u.push("%");else if((T=n.placeholder.exec(v))!==null){if(T[2]){b|=1;var _=[],C=T[2],M=[];if((M=n.key.exec(C))!==null)for(_.push(M[1]);(C=C.substring(M[0].length))!=="";)if((M=n.key_access.exec(C))!==null)_.push(M[1]);else if((M=n.index_access.exec(C))!==null)_.push(M[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");T[2]=_}else b|=2;if(b===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");u.push({placeholder:T[0],param_no:T[1],keys:T[2],sign:T[3],pad_char:T[4],align:T[5],width:T[6],precision:T[7],type:T[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");v=v.substring(T[0].length)}return f[y]=u}e.sprintf=o,e.vsprintf=i,typeof window<"u"&&(window.sprintf=o,window.vsprintf=i,a=(function(){return{sprintf:o,vsprintf:i}}).call(e,r,e,t),a!==void 0&&(t.exports=a))})()},3390:function(t){t.exports=e;function e(r,a,n,o){var i=new Float32Array(4);return i[0]=r,i[1]=a,i[2]=n,i[3]=o,i}},3436:function(t,e,r){var a=r(3236),n=r(9405),o=a([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position, offset; +attribute vec4 color; +uniform mat4 model, view, projection; +uniform float capSize; +varying vec4 fragColor; +varying vec3 fragPosition; + +void main() { + vec4 worldPosition = model * vec4(position, 1.0); + worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0); + gl_Position = projection * (view * worldPosition); + fragColor = color; + fragPosition = position; +}`]),i=a([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float opacity; +varying vec3 fragPosition; +varying vec4 fragColor; + +void main() { + if ( + outOfRange(clipBounds[0], clipBounds[1], fragPosition) || + fragColor.a * opacity == 0. + ) discard; + + gl_FragColor = opacity * fragColor; +}`]);t.exports=function(s){return n(s,o,i,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},3502:function(t,e,r){t.exports=o;var a=r(5995),n=r(9127);function o(i,s){return n(a(i,s))}},3508:function(t,e,r){var a=r(6852);a=a.slice().filter(function(n){return!/^(gl\_|texture)/.test(n)}),t.exports=a.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},3536:function(t){t.exports=e;function e(r,a){var n=a[0],o=a[1],i=a[2],s=n*n+o*o+i*i;return s>0&&(s=1/Math.sqrt(s),r[0]=a[0]*s,r[1]=a[1]*s,r[2]=a[2]*s),r}},3545:function(t,e,r){t.exports=s;var a=r(8105),n=a("loy&&T[A+x]>M;--E,A-=b){for(var h=A,p=A+b,k=0;k>>1,M=2*f,E=C,A=T[M*C+x];b<_;){if(_-b=R?(E=w,A=R):k>=N?(E=p,A=k):(E=O,A=N):R>=N?(E=w,A=R):N>=k?(E=p,A=k):(E=O,A=N);for(var V=M*(_-1),H=M*E,F=0;Fthis.buffer.length){n.free(this.buffer);for(var _=this.buffer=n.mallocUint8(i(b*u*4)),C=0;CM|0},vertex:function(b,_,C,M,E,A,h,p,k,w,R,O,N){var V=(h<<0)+(p<<1)+(k<<2)+(w<<3)|0;if(!(V===0||V===15))switch(V){case 0:R.push([b-.5,_-.5]);break;case 1:R.push([b-.25-.25*(M+C-2*N)/(C-M),_-.25-.25*(E+C-2*N)/(C-E)]);break;case 2:R.push([b-.75-.25*(-M-C+2*N)/(M-C),_-.25-.25*(A+M-2*N)/(M-A)]);break;case 3:R.push([b-.5,_-.5-.5*(E+C+A+M-4*N)/(C-E+M-A)]);break;case 4:R.push([b-.25-.25*(A+E-2*N)/(E-A),_-.75-.25*(-E-C+2*N)/(E-C)]);break;case 5:R.push([b-.5-.5*(M+C+A+E-4*N)/(C-M+E-A),_-.5]);break;case 6:R.push([b-.5-.25*(-M-C+A+E)/(M-C+E-A),_-.5-.25*(-E-C+A+M)/(E-C+M-A)]);break;case 7:R.push([b-.75-.25*(A+E-2*N)/(E-A),_-.75-.25*(A+M-2*N)/(M-A)]);break;case 8:R.push([b-.75-.25*(-A-E+2*N)/(A-E),_-.75-.25*(-A-M+2*N)/(A-M)]);break;case 9:R.push([b-.5-.25*(M+C+-A-E)/(C-M+A-E),_-.5-.25*(E+C+-A-M)/(C-E+A-M)]);break;case 10:R.push([b-.5-.5*(-M-C+-A-E+4*N)/(M-C+A-E),_-.5]);break;case 11:R.push([b-.25-.25*(-A-E+2*N)/(A-E),_-.75-.25*(E+C-2*N)/(C-E)]);break;case 12:R.push([b-.5,_-.5-.5*(-E-C+-A-M+4*N)/(E-C+A-M)]);break;case 13:R.push([b-.75-.25*(M+C-2*N)/(C-M),_-.25-.25*(-A-M+2*N)/(A-M)]);break;case 14:R.push([b-.25-.25*(-M-C+2*N)/(M-C),_-.25-.25*(-E-C+2*N)/(E-C)]);break;case 15:R.push([b-.5,_-.5]);break}},cell:function(b,_,C,M,E,A,h,p,k){E?p.push([b,_]):p.push([_,b])}});return function(b,_){var C=[],M=[];return u(b,C,M,_),{positions:C,cells:M}}}};function i(y,v){var T=y.length+"d",u=o[T];if(u)return u(a,y,v)}function s(y,v){for(var T=n(y,v),u=T.length,b=new Array(u),_=new Array(u),C=0;C>1,T=-7,u=n?i-1:0,b=n?-1:1,_=r[a+u];for(u+=b,s=_&(1<<-T)-1,_>>=-T,T+=x;T>0;s=s*256+r[a+u],u+=b,T-=8);for(f=s&(1<<-T)-1,s>>=-T,T+=o;T>0;f=f*256+r[a+u],u+=b,T-=8);if(s===0)s=1-v;else{if(s===y)return f?NaN:(_?-1:1)*(1/0);f=f+Math.pow(2,o),s=s-v}return(_?-1:1)*f*Math.pow(2,s-o)},e.write=function(r,a,n,o,i,s){var f,x,y,v=s*8-i-1,T=(1<>1,b=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=o?0:s-1,C=o?1:-1,M=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(x=isNaN(a)?1:0,f=T):(f=Math.floor(Math.log(a)/Math.LN2),a*(y=Math.pow(2,-f))<1&&(f--,y*=2),f+u>=1?a+=b/y:a+=b*Math.pow(2,1-u),a*y>=2&&(f++,y/=2),f+u>=T?(x=0,f=T):f+u>=1?(x=(a*y-1)*Math.pow(2,i),f=f+u):(x=a*Math.pow(2,u-1)*Math.pow(2,i),f=0));i>=8;r[n+_]=x&255,_+=C,x/=256,i-=8);for(f=f<0;r[n+_]=f&255,_+=C,f/=256,v-=8);r[n+_-C]|=M*128}},3788:function(t,e,r){var a=r(8507),n=r(2419);t.exports=o;function o(i,s){return a(i,s)||n(i)-n(s)}},3837:function(t,e,r){t.exports=O;var a=r(4935),n=r(501),o=r(5304),i=r(6429),s=r(6444),f=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),x=ArrayBuffer,y=DataView;function v(N){return x.isView(N)&&!(N instanceof y)}function T(N){return Array.isArray(N)||v(N)}function u(N,V){return N[0]=V[0],N[1]=V[1],N[2]=V[2],N}function b(N){this.gl=N,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=o(N)}var _=b.prototype;_.update=function(N){N=N||{};function V(at,vt,it){if(it in N){var Y=N[it],ft=this[it],ut;(at?T(Y)&&T(Y[0]):T(Y))?this[it]=ut=[vt(Y[0]),vt(Y[1]),vt(Y[2])]:this[it]=ut=[vt(Y),vt(Y),vt(Y)];for(var wt=0;wt<3;++wt)if(ut[wt]!==ft[wt])return!0}return!1}var H=V.bind(this,!1,Number),F=V.bind(this,!1,Boolean),U=V.bind(this,!1,String),W=V.bind(this,!0,function(at){if(T(at)){if(at.length===3)return[+at[0],+at[1],+at[2],1];if(at.length===4)return[+at[0],+at[1],+at[2],+at[3]]}return[0,0,0,1]}),q,X=!1,lt=!1;if("bounds"in N)for(var yt=N.bounds,pt=0;pt<2;++pt)for(var st=0;st<3;++st)yt[pt][st]!==this.bounds[pt][st]&&(lt=!0),this.bounds[pt][st]=yt[pt][st];if("ticks"in N){q=N.ticks,X=!0,this.autoTicks=!1;for(var pt=0;pt<3;++pt)this.tickSpacing[pt]=0}else H("tickSpacing")&&(this.autoTicks=!0,lt=!0);if(this._firstInit&&("ticks"in N||"tickSpacing"in N||(this.autoTicks=!0),lt=!0,X=!0,this._firstInit=!1),lt&&this.autoTicks&&(q=s.create(this.bounds,this.tickSpacing),X=!0),X){for(var pt=0;pt<3;++pt)q[pt].sort(function(vt,it){return vt.x-it.x});s.equal(q,this.ticks)?X=!1:this.ticks=q}F("tickEnable"),U("tickFont")&&(X=!0),U("tickFontStyle")&&(X=!0),U("tickFontWeight")&&(X=!0),U("tickFontVariant")&&(X=!0),H("tickSize"),H("tickAngle"),H("tickPad"),W("tickColor");var tt=U("labels");U("labelFont")&&(tt=!0),U("labelFontStyle")&&(tt=!0),U("labelFontWeight")&&(tt=!0),U("labelFontVariant")&&(tt=!0),F("labelEnable"),H("labelSize"),H("labelPad"),W("labelColor"),F("lineEnable"),F("lineMirror"),H("lineWidth"),W("lineColor"),F("lineTickEnable"),F("lineTickMirror"),H("lineTickLength"),H("lineTickWidth"),W("lineTickColor"),F("gridEnable"),H("gridWidth"),W("gridColor"),F("zeroEnable"),W("zeroLineColor"),H("zeroLineWidth"),F("backgroundEnable"),W("backgroundColor");var dt=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],rt=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(tt||X)&&this._text.update(this.bounds,this.labels,dt,this.ticks,rt):this._text=a(this.gl,this.bounds,this.labels,dt,this.ticks,rt),this._lines&&X&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=n(this.gl,this.bounds,this.ticks))};function C(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var M=[new C,new C,new C];function E(N,V,H,F,U){for(var W=N.primalOffset,q=N.primalMinor,X=N.mirrorOffset,lt=N.mirrorMinor,yt=F[V],pt=0;pt<3;++pt)if(V!==pt){var st=W,tt=X,dt=q,rt=lt;yt&1<0?(dt[pt]=-1,rt[pt]=0):(dt[pt]=0,rt[pt]=1)}}var A=[0,0,0],h={model:f,view:f,projection:f,_ortho:!1};_.isOpaque=function(){return!0},_.isTransparent=function(){return!1},_.drawTransparent=function(N){};var p=0,k=[0,0,0],w=[0,0,0],R=[0,0,0];_.draw=function(N){N=N||h;for(var V=this.gl,H=N.model||f,F=N.view||f,U=N.projection||f,W=this.bounds,q=N._ortho||!1,X=i(H,F,U,W,q),lt=X.cubeEdges,yt=X.axis,pt=F[12],st=F[13],tt=F[14],dt=F[15],rt=q?2:1,at=rt*this.pixelRatio*(U[3]*pt+U[7]*st+U[11]*tt+U[15]*dt)/V.drawingBufferHeight,vt=0;vt<3;++vt)this.lastCubeProps.cubeEdges[vt]=lt[vt],this.lastCubeProps.axis[vt]=yt[vt];for(var it=M,vt=0;vt<3;++vt)E(M[vt],vt,this.bounds,lt,yt);for(var V=this.gl,Y=A,vt=0;vt<3;++vt)this.backgroundEnable[vt]?Y[vt]=yt[vt]:Y[vt]=0;this._background.draw(H,F,U,W,Y,this.backgroundColor),this._lines.bind(H,F,U,this);for(var vt=0;vt<3;++vt){var ft=[0,0,0];yt[vt]>0?ft[vt]=W[1][vt]:ft[vt]=W[0][vt];for(var ut=0;ut<2;++ut){var wt=(vt+1+ut)%3,zt=(vt+1+(ut^1))%3;this.gridEnable[wt]&&this._lines.drawGrid(wt,zt,this.bounds,ft,this.gridColor[wt],this.gridWidth[wt]*this.pixelRatio)}for(var ut=0;ut<2;++ut){var wt=(vt+1+ut)%3,zt=(vt+1+(ut^1))%3;this.zeroEnable[zt]&&Math.min(W[0][zt],W[1][zt])<=0&&Math.max(W[0][zt],W[1][zt])>=0&&this._lines.drawZero(wt,zt,this.bounds,ft,this.zeroLineColor[zt],this.zeroLineWidth[zt]*this.pixelRatio)}}for(var vt=0;vt<3;++vt){this.lineEnable[vt]&&this._lines.drawAxisLine(vt,this.bounds,it[vt].primalOffset,this.lineColor[vt],this.lineWidth[vt]*this.pixelRatio),this.lineMirror[vt]&&this._lines.drawAxisLine(vt,this.bounds,it[vt].mirrorOffset,this.lineColor[vt],this.lineWidth[vt]*this.pixelRatio);for(var Pt=u(k,it[vt].primalMinor),Wt=u(w,it[vt].mirrorMinor),Ht=this.lineTickLength,ut=0;ut<3;++ut){var Jt=at/H[5*ut];Pt[ut]*=Ht[ut]*Jt,Wt[ut]*=Ht[ut]*Jt}this.lineTickEnable[vt]&&this._lines.drawAxisTicks(vt,it[vt].primalOffset,Pt,this.lineTickColor[vt],this.lineTickWidth[vt]*this.pixelRatio),this.lineTickMirror[vt]&&this._lines.drawAxisTicks(vt,it[vt].mirrorOffset,Wt,this.lineTickColor[vt],this.lineTickWidth[vt]*this.pixelRatio)}this._lines.unbind(),this._text.bind(H,F,U,this.pixelRatio);var ge,he=.5,de,se;function Tt(Te){se=[0,0,0],se[Te]=1}function Lt(Te,He,Ge){var cr=(Te+1)%3,ur=(Te+2)%3,jr=He[cr],Hr=He[ur],br=Ge[cr],Kr=Ge[ur];if(jr>0&&Kr>0){Tt(cr);return}else if(jr>0&&Kr<0){Tt(cr);return}else if(jr<0&&Kr>0){Tt(cr);return}else if(jr<0&&Kr<0){Tt(cr);return}else if(Hr>0&&br>0){Tt(ur);return}else if(Hr>0&&br<0){Tt(ur);return}else if(Hr<0&&br>0){Tt(ur);return}else if(Hr<0&&br<0){Tt(ur);return}}for(var vt=0;vt<3;++vt){for(var Mt=it[vt].primalMinor,te=it[vt].mirrorMinor,ve=u(R,it[vt].primalOffset),ut=0;ut<3;++ut)this.lineTickEnable[vt]&&(ve[ut]+=at*Mt[ut]*Math.max(this.lineTickLength[ut],0)/H[5*ut]);var oe=[0,0,0];if(oe[vt]=1,this.tickEnable[vt]){this.tickAngle[vt]===-3600?(this.tickAngle[vt]=0,this.tickAlign[vt]="auto"):this.tickAlign[vt]=-1,de=1,ge=[this.tickAlign[vt],he,de],ge[0]==="auto"?ge[0]=p:ge[0]=parseInt(""+ge[0]),se=[0,0,0],Lt(vt,Mt,te);for(var ut=0;ut<3;++ut)ve[ut]+=at*Mt[ut]*this.tickPad[ut]/H[5*ut];this._text.drawTicks(vt,this.tickSize[vt],this.tickAngle[vt],ve,this.tickColor[vt],oe,se,ge)}if(this.labelEnable[vt]){de=0,se=[0,0,0],this.labels[vt].length>4&&(Tt(vt),de=1),ge=[this.labelAlign[vt],he,de],ge[0]==="auto"?ge[0]=p:ge[0]=parseInt(""+ge[0]);for(var ut=0;ut<3;++ut)ve[ut]+=at*Mt[ut]*this.labelPad[ut]/H[5*ut];ve[vt]+=.5*(W[0][vt]+W[1][vt]),this._text.drawLabel(vt,this.labelSize[vt],this.labelAngle[vt],ve,this.labelColor[vt],[0,0,0],se,ge)}}this._text.unbind()},_.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function O(N,V){var H=new b(N);return H.update(V),H}},3840:function(t){t.exports=M;var e=0,r=1;function a(E,A,h,p,k,w){this._color=E,this.key=A,this.value=h,this.left=p,this.right=k,this._count=w}function n(E){return new a(E._color,E.key,E.value,E.left,E.right,E._count)}function o(E,A){return new a(E,A.key,A.value,A.left,A.right,A._count)}function i(E){E._count=1+(E.left?E.left._count:0)+(E.right?E.right._count:0)}function s(E,A){this._compare=E,this.root=A}var f=s.prototype;Object.defineProperty(f,"keys",{get:function(){var E=[];return this.forEach(function(A,h){E.push(A)}),E}}),Object.defineProperty(f,"values",{get:function(){var E=[];return this.forEach(function(A,h){E.push(h)}),E}}),Object.defineProperty(f,"length",{get:function(){return this.root?this.root._count:0}}),f.insert=function(E,A){for(var h=this._compare,p=this.root,k=[],w=[];p;){var R=h(E,p.key);k.push(p),w.push(R),R<=0?p=p.left:p=p.right}k.push(new a(e,E,A,null,null,1));for(var O=k.length-2;O>=0;--O){var p=k[O];w[O]<=0?k[O]=new a(p._color,p.key,p.value,k[O+1],p.right,p._count+1):k[O]=new a(p._color,p.key,p.value,p.left,k[O+1],p._count+1)}for(var O=k.length-1;O>1;--O){var N=k[O-1],p=k[O];if(N._color===r||p._color===r)break;var V=k[O-2];if(V.left===N)if(N.left===p){var H=V.right;if(H&&H._color===e)N._color=r,V.right=o(r,H),V._color=e,O-=1;else{if(V._color=e,V.left=N.right,N._color=r,N.right=V,k[O-2]=N,k[O-1]=p,i(V),i(N),O>=3){var F=k[O-3];F.left===V?F.left=N:F.right=N}break}}else{var H=V.right;if(H&&H._color===e)N._color=r,V.right=o(r,H),V._color=e,O-=1;else{if(N.right=p.left,V._color=e,V.left=p.right,p._color=r,p.left=N,p.right=V,k[O-2]=p,k[O-1]=N,i(V),i(N),i(p),O>=3){var F=k[O-3];F.left===V?F.left=p:F.right=p}break}}else if(N.right===p){var H=V.left;if(H&&H._color===e)N._color=r,V.left=o(r,H),V._color=e,O-=1;else{if(V._color=e,V.right=N.left,N._color=r,N.left=V,k[O-2]=N,k[O-1]=p,i(V),i(N),O>=3){var F=k[O-3];F.right===V?F.right=N:F.left=N}break}}else{var H=V.left;if(H&&H._color===e)N._color=r,V.left=o(r,H),V._color=e,O-=1;else{if(N.left=p.right,V._color=e,V.right=p.left,p._color=r,p.right=N,p.left=V,k[O-2]=p,k[O-1]=N,i(V),i(N),i(p),O>=3){var F=k[O-3];F.right===V?F.right=p:F.left=p}break}}}return k[0]._color=r,new s(h,k[0])};function x(E,A){if(A.left){var h=x(E,A.left);if(h)return h}var h=E(A.key,A.value);if(h)return h;if(A.right)return x(E,A.right)}function y(E,A,h,p){var k=A(E,p.key);if(k<=0){if(p.left){var w=y(E,A,h,p.left);if(w)return w}var w=h(p.key,p.value);if(w)return w}if(p.right)return y(E,A,h,p.right)}function v(E,A,h,p,k){var w=h(E,k.key),R=h(A,k.key),O;if(w<=0&&(k.left&&(O=v(E,A,h,p,k.left),O)||R>0&&(O=p(k.key,k.value),O)))return O;if(R>0&&k.right)return v(E,A,h,p,k.right)}f.forEach=function(E,A,h){if(this.root)switch(arguments.length){case 1:return x(E,this.root);case 2:return y(A,this._compare,E,this.root);case 3:return this._compare(A,h)>=0?void 0:v(A,h,this._compare,E,this.root)}},Object.defineProperty(f,"begin",{get:function(){for(var E=[],A=this.root;A;)E.push(A),A=A.left;return new T(this,E)}}),Object.defineProperty(f,"end",{get:function(){for(var E=[],A=this.root;A;)E.push(A),A=A.right;return new T(this,E)}}),f.at=function(E){if(E<0)return new T(this,[]);for(var A=this.root,h=[];;){if(h.push(A),A.left){if(E=A.right._count)break;A=A.right}else break}return new T(this,[])},f.ge=function(E){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(E,h.key);p.push(h),w<=0&&(k=p.length),w<=0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.gt=function(E){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(E,h.key);p.push(h),w<0&&(k=p.length),w<0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.lt=function(E){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(E,h.key);p.push(h),w>0&&(k=p.length),w<=0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.le=function(E){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(E,h.key);p.push(h),w>=0&&(k=p.length),w<0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.find=function(E){for(var A=this._compare,h=this.root,p=[];h;){var k=A(E,h.key);if(p.push(h),k===0)return new T(this,p);k<=0?h=h.left:h=h.right}return new T(this,[])},f.remove=function(E){var A=this.find(E);return A?A.remove():this},f.get=function(E){for(var A=this._compare,h=this.root;h;){var p=A(E,h.key);if(p===0)return h.value;p<=0?h=h.left:h=h.right}};function T(E,A){this.tree=E,this._stack=A}var u=T.prototype;Object.defineProperty(u,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(u,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),u.clone=function(){return new T(this.tree,this._stack.slice())};function b(E,A){E.key=A.key,E.value=A.value,E.left=A.left,E.right=A.right,E._color=A._color,E._count=A._count}function _(E){for(var A,h,p,k,w=E.length-1;w>=0;--w){if(A=E[w],w===0){A._color=r;return}if(h=E[w-1],h.left===A){if(p=h.right,p.right&&p.right._color===e){if(p=h.right=n(p),k=p.right=n(p.right),h.right=p.left,p.left=h,p.right=k,p._color=h._color,A._color=r,h._color=r,k._color=r,i(h),i(p),w>1){var R=E[w-2];R.left===h?R.left=p:R.right=p}E[w-1]=p;return}else if(p.left&&p.left._color===e){if(p=h.right=n(p),k=p.left=n(p.left),h.right=k.left,p.left=k.right,k.left=h,k.right=p,k._color=h._color,h._color=r,p._color=r,A._color=r,i(h),i(p),i(k),w>1){var R=E[w-2];R.left===h?R.left=k:R.right=k}E[w-1]=k;return}if(p._color===r)if(h._color===e){h._color=r,h.right=o(e,p);return}else{h.right=o(e,p);continue}else{if(p=n(p),h.right=p.left,p.left=h,p._color=h._color,h._color=e,i(h),i(p),w>1){var R=E[w-2];R.left===h?R.left=p:R.right=p}E[w-1]=p,E[w]=h,w+11){var R=E[w-2];R.right===h?R.right=p:R.left=p}E[w-1]=p;return}else if(p.right&&p.right._color===e){if(p=h.left=n(p),k=p.right=n(p.right),h.left=k.right,p.right=k.left,k.right=h,k.left=p,k._color=h._color,h._color=r,p._color=r,A._color=r,i(h),i(p),i(k),w>1){var R=E[w-2];R.right===h?R.right=k:R.left=k}E[w-1]=k;return}if(p._color===r)if(h._color===e){h._color=r,h.left=o(e,p);return}else{h.left=o(e,p);continue}else{if(p=n(p),h.left=p.right,p.right=h,p._color=h._color,h._color=e,i(h),i(p),w>1){var R=E[w-2];R.right===h?R.right=p:R.left=p}E[w-1]=p,E[w]=h,w+1=0;--p){var h=E[p];h.left===E[p+1]?A[p]=new a(h._color,h.key,h.value,A[p+1],h.right,h._count):A[p]=new a(h._color,h.key,h.value,h.left,A[p+1],h._count)}if(h=A[A.length-1],h.left&&h.right){var k=A.length;for(h=h.left;h.right;)A.push(h),h=h.right;var w=A[k-1];A.push(new a(h._color,w.key,w.value,h.left,h.right,h._count)),A[k-1].key=h.key,A[k-1].value=h.value;for(var p=A.length-2;p>=k;--p)h=A[p],A[p]=new a(h._color,h.key,h.value,h.left,A[p+1],h._count);A[k-1].left=A[k]}if(h=A[A.length-1],h._color===e){var R=A[A.length-2];R.left===h?R.left=null:R.right===h&&(R.right=null),A.pop();for(var p=0;p0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(u,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(u,"index",{get:function(){var E=0,A=this._stack;if(A.length===0){var h=this.tree.root;return h?h._count:0}else A[A.length-1].left&&(E=A[A.length-1].left._count);for(var p=A.length-2;p>=0;--p)A[p+1]===A[p].right&&(++E,A[p].left&&(E+=A[p].left._count));return E},enumerable:!0}),u.next=function(){var E=this._stack;if(E.length!==0){var A=E[E.length-1];if(A.right)for(A=A.right;A;)E.push(A),A=A.left;else for(E.pop();E.length>0&&E[E.length-1].right===A;)A=E[E.length-1],E.pop()}},Object.defineProperty(u,"hasNext",{get:function(){var E=this._stack;if(E.length===0)return!1;if(E[E.length-1].right)return!0;for(var A=E.length-1;A>0;--A)if(E[A-1].left===E[A])return!0;return!1}}),u.update=function(E){var A=this._stack;if(A.length===0)throw new Error("Can't update empty node!");var h=new Array(A.length),p=A[A.length-1];h[h.length-1]=new a(p._color,p.key,E,p.left,p.right,p._count);for(var k=A.length-2;k>=0;--k)p=A[k],p.left===A[k+1]?h[k]=new a(p._color,p.key,p.value,h[k+1],p.right,p._count):h[k]=new a(p._color,p.key,p.value,p.left,h[k+1],p._count);return new s(this.tree._compare,h[0])},u.prev=function(){var E=this._stack;if(E.length!==0){var A=E[E.length-1];if(A.left)for(A=A.left;A;)E.push(A),A=A.right;else for(E.pop();E.length>0&&E[E.length-1].left===A;)A=E[E.length-1],E.pop()}},Object.defineProperty(u,"hasPrev",{get:function(){var E=this._stack;if(E.length===0)return!1;if(E[E.length-1].left)return!0;for(var A=E.length-1;A>0;--A)if(E[A-1].right===E[A])return!0;return!1}});function C(E,A){return EA?1:0}function M(E){return new s(E||C,null)}},3865:function(t,e,r){var a=r(869);t.exports=n;function n(o,i){return a(o[0].mul(i[1]).add(i[0].mul(o[1])),o[1].mul(i[1]))}},3952:function(t,e,r){t.exports=o;var a=r(3250);function n(i,s){for(var f=new Array(s+1),x=0;x20?52:f+32}},4040:function(t){t.exports=e;function e(r,a,n,o,i,s,f){var x=1/(a-n),y=1/(o-i),v=1/(s-f);return r[0]=-2*x,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*y,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*v,r[11]=0,r[12]=(a+n)*x,r[13]=(i+o)*y,r[14]=(f+s)*v,r[15]=1,r}},4041:function(t){t.exports=e;function e(r,a,n){var o=a[0],i=a[1],s=a[2],f=n[0],x=n[1],y=n[2],v=n[3],T=v*o+x*s-y*i,u=v*i+y*o-f*s,b=v*s+f*i-x*o,_=-f*o-x*i-y*s;return r[0]=T*v+_*-f+u*-y-b*-x,r[1]=u*v+_*-x+b*-f-T*-y,r[2]=b*v+_*-y+T*-x-u*-f,r[3]=a[3],r}},4081:function(t){t.exports=e;function e(r,a,n,o,i,s,f,x,y,v){var T=a+s+v;if(u>0){var u=Math.sqrt(T+1);r[0]=.5*(f-y)/u,r[1]=.5*(x-o)/u,r[2]=.5*(n-s)/u,r[3]=.5*u}else{var b=Math.max(a,s,v),u=Math.sqrt(2*b-T+1);a>=b?(r[0]=.5*u,r[1]=.5*(i+n)/u,r[2]=.5*(x+o)/u,r[3]=.5*(f-y)/u):s>=b?(r[0]=.5*(n+i)/u,r[1]=.5*u,r[2]=.5*(y+f)/u,r[3]=.5*(x-o)/u):(r[0]=.5*(o+x)/u,r[1]=.5*(f+y)/u,r[2]=.5*u,r[3]=.5*(n-i)/u)}return r}},4100:function(t,e,r){var a=r(4437),n=r(3837),o=r(5445),i=r(4449),s=r(3589),f=r(2260),x=r(7169),y=r(351),v=r(4772),T=r(4040),u=r(799),b=r(9216)({tablet:!0,featureDetect:!0});t.exports={createScene:A,createCamera:a};function _(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function C(p,k){var w=null;try{w=p.getContext("webgl",k),w||(w=p.getContext("experimental-webgl",k))}catch{return null}return w}function M(p){var k=Math.round(Math.log(Math.abs(p))/Math.log(10));if(k<0){var w=Math.round(Math.pow(10,-k));return Math.ceil(p*w)/w}else if(k>0){var w=Math.round(Math.pow(10,k));return Math.ceil(p/w)*w}return Math.ceil(p)}function E(p){return typeof p=="boolean"?p:!0}function A(p){p=p||{},p.camera=p.camera||{};var k=p.canvas;if(!k)if(k=document.createElement("canvas"),p.container){var w=p.container;w.appendChild(k)}else document.body.appendChild(k);var R=p.gl;if(R||(p.glOptions&&(b=!!p.glOptions.preserveDrawingBuffer),R=C(k,p.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:b})),!R)throw new Error("webgl not supported");var O=p.bounds||[[-10,-10,-10],[10,10,10]],N=new _,V=f(R,R.drawingBufferWidth,R.drawingBufferHeight,{preferFloat:!b}),H=u(R),F=p.cameraObject&&p.cameraObject._ortho===!0||p.camera.projection&&p.camera.projection.type==="orthographic"||!1,U={eye:p.camera.eye||[2,0,0],center:p.camera.center||[0,0,0],up:p.camera.up||[0,1,0],zoomMin:p.camera.zoomMax||.1,zoomMax:p.camera.zoomMin||100,mode:p.camera.mode||"turntable",_ortho:F},W=p.axes||{},q=n(R,W);q.enable=!W.disable;var X=p.spikes||{},lt=i(R,X),yt=[],pt=[],st=[],tt=[],dt=!0,it=!0,rt=new Array(16),at=new Array(16),vt={view:null,projection:rt,model:at,_ortho:!1},it=!0,Y=[R.drawingBufferWidth,R.drawingBufferHeight],ft=p.cameraObject||a(k,U),ut={gl:R,contextLost:!1,pixelRatio:p.pixelRatio||1,canvas:k,selection:N,camera:ft,axes:q,axesPixels:null,spikes:lt,bounds:O,objects:yt,shape:Y,aspect:p.aspectRatio||[1,1,1],pickRadius:p.pickRadius||10,zNear:p.zNear||.01,zFar:p.zFar||1e3,fovy:p.fovy||Math.PI/4,clearColor:p.clearColor||[0,0,0,0],autoResize:E(p.autoResize),autoBounds:E(p.autoBounds),autoScale:!!p.autoScale,autoCenter:E(p.autoCenter),clipToBounds:E(p.clipToBounds),snapToData:!!p.snapToData,onselect:p.onselect||null,onrender:p.onrender||null,onclick:p.onclick||null,cameraParams:vt,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(se){this.aspect[0]=se.x,this.aspect[1]=se.y,this.aspect[2]=se.z,it=!0},setBounds:function(se,Tt){this.bounds[0][se]=Tt.min,this.bounds[1][se]=Tt.max},setClearColor:function(se){this.clearColor=se},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},wt=[R.drawingBufferWidth/ut.pixelRatio|0,R.drawingBufferHeight/ut.pixelRatio|0];function zt(){if(!ut._stopped&&ut.autoResize){var se=k.parentNode,Tt=1,Lt=1;se&&se!==document.body?(Tt=se.clientWidth,Lt=se.clientHeight):(Tt=window.innerWidth,Lt=window.innerHeight);var Mt=Math.ceil(Tt*ut.pixelRatio)|0,te=Math.ceil(Lt*ut.pixelRatio)|0;if(Mt!==k.width||te!==k.height){k.width=Mt,k.height=te;var ve=k.style;ve.position=ve.position||"absolute",ve.left="0px",ve.top="0px",ve.width=Tt+"px",ve.height=Lt+"px",dt=!0}}}ut.autoResize&&zt(),window.addEventListener("resize",zt);function Pt(){for(var se=yt.length,Tt=tt.length,Lt=0;Lt0&&st[Tt-1]===0;)st.pop(),tt.pop().dispose()}ut.update=function(se){ut._stopped||(dt=!0,it=!0)},ut.add=function(se){ut._stopped||(se.axes=q,yt.push(se),pt.push(-1),dt=!0,it=!0,Pt())},ut.remove=function(se){if(!ut._stopped){var Tt=yt.indexOf(se);Tt<0||(yt.splice(Tt,1),pt.pop(),dt=!0,it=!0,Pt())}},ut.dispose=function(){if(!ut._stopped&&(ut._stopped=!0,window.removeEventListener("resize",zt),k.removeEventListener("webglcontextlost",Wt),ut.mouseListener.enabled=!1,!ut.contextLost)){q.dispose(),lt.dispose();for(var se=0;seN.distance)continue;for(var Ge=0;Gev;){var h=u[A-2],p=u[A-1];if(hu[T+1]:!0}function x(v,T,u,b){v*=2;var _=b[v];return _>1,E=M-b,A=M+b,h=_,p=E,k=M,w=A,R=C,O=v+1,N=T-1,V=0;f(h,p,u)&&(V=h,h=p,p=V),f(w,R,u)&&(V=w,w=R,R=V),f(h,k,u)&&(V=h,h=k,k=V),f(p,k,u)&&(V=p,p=k,k=V),f(h,w,u)&&(V=h,h=w,w=V),f(k,w,u)&&(V=k,k=w,w=V),f(p,R,u)&&(V=p,p=R,R=V),f(p,k,u)&&(V=p,p=k,k=V),f(w,R,u)&&(V=w,w=R,R=V);for(var H=u[2*p],F=u[2*p+1],U=u[2*w],W=u[2*w+1],q=2*h,X=2*k,lt=2*R,yt=2*_,pt=2*M,st=2*C,tt=0;tt<2;++tt){var dt=u[q+tt],rt=u[X+tt],at=u[lt+tt];u[yt+tt]=dt,u[pt+tt]=rt,u[st+tt]=at}o(E,v,u),o(A,T,u);for(var vt=O;vt<=N;++vt)if(x(vt,H,F,u))vt!==O&&n(vt,O,u),++O;else if(!x(vt,U,W,u))for(;;)if(x(N,U,W,u)){x(N,H,F,u)?(i(vt,O,N,u),++O,--N):(n(vt,N,u),--N);break}else{if(--N0)if(_[0]!==M[1][0])C=b,b=b.right;else{var p=y(b.right,_);if(p)return p;b=b.left}else{if(_[0]!==M[1][0])return b;var p=y(b.right,_);if(p)return p;b=b.left}}return C}f.castUp=function(b){var _=a.le(this.coordinates,b[0]);if(_<0)return-1;this.slabs[_];var C=y(this.slabs[_],b),M=-1;if(C&&(M=C.value),this.coordinates[_]===b[0]){var E=null;if(C&&(E=C.key),_>0){var A=y(this.slabs[_-1],b);A&&(E?i(A.key,E)>0&&(E=A.key,M=A.value):(M=A.value,E=A.key))}var h=this.horizontal[_];if(h.length>0){var p=a.ge(h,b[1],x);if(p=h.length)return M;k=h[p]}}if(k.start)if(E){var w=o(E[0],E[1],[b[0],k.y]);E[0][0]>E[1][0]&&(w=-w),w>0&&(M=k.index)}else M=k.index;else k.y!==b[1]&&(M=k.index)}}}return M};function v(b,_,C,M){this.y=b,this.index=_,this.start=C,this.closed=M}function T(b,_,C,M){this.x=b,this.segment=_,this.create=C,this.index=M}function u(b){for(var _=b.length,C=2*_,M=new Array(C),E=0;E<_;++E){var A=b[E],h=A[0][0]Math.abs(p))u.rotate(R,0,0,-h*k*Math.PI*E.rotateSpeed/window.innerWidth);else if(!E._ortho){var O=-E.zoomSpeed*w*p/window.innerHeight*(R-u.lastT())/20;u.pan(R,0,0,_*(Math.exp(O)-1))}}},!0)},E.enableMouseListeners(),E}},4449:function(t,e,r){var a=r(2762),n=r(8116),o=r(1493);t.exports=T;var i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(u,b,_,C){this.gl=u,this.buffer=b,this.vao=_,this.shader=C,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var f=s.prototype,x=[0,0,0],y=[0,0,0],v=[0,0];f.isTransparent=function(){return!1},f.drawTransparent=function(u){},f.draw=function(u){var b=this.gl,_=this.vao,C=this.shader;_.bind(),C.bind();var M=u.model||i,E=u.view||i,A=u.projection||i,h;this.axes&&(h=this.axes.lastCubeProps.axis);for(var p=x,k=y,w=0;w<3;++w)h&&h[w]<0?(p[w]=this.bounds[0][w],k[w]=this.bounds[1][w]):(p[w]=this.bounds[1][w],k[w]=this.bounds[0][w]);v[0]=b.drawingBufferWidth,v[1]=b.drawingBufferHeight,C.uniforms.model=M,C.uniforms.view=E,C.uniforms.projection=A,C.uniforms.coordinates=[this.position,p,k],C.uniforms.colors=this.colors,C.uniforms.screenShape=v;for(var w=0;w<3;++w)C.uniforms.lineWidth=this.lineWidth[w]*this.pixelRatio,this.enabled[w]&&(_.draw(b.TRIANGLES,6,6*w),this.drawSides[w]&&_.draw(b.TRIANGLES,12,18+12*w));_.unbind()},f.update=function(u){u&&("bounds"in u&&(this.bounds=u.bounds),"position"in u&&(this.position=u.position),"lineWidth"in u&&(this.lineWidth=u.lineWidth),"colors"in u&&(this.colors=u.colors),"enabled"in u&&(this.enabled=u.enabled),"drawSides"in u&&(this.drawSides=u.drawSides))},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function T(u,b){var _=[];function C(p,k,w,R,O,N){var V=[p,k,w,0,0,0,1];V[R+3]=1,V[R]=O,_.push.apply(_,V),V[6]=-1,_.push.apply(_,V),V[R]=N,_.push.apply(_,V),_.push.apply(_,V),V[6]=1,_.push.apply(_,V),V[R]=O,_.push.apply(_,V)}C(0,0,0,0,0,1),C(0,0,0,1,0,1),C(0,0,0,2,0,1),C(1,0,0,1,-1,1),C(1,0,0,2,-1,1),C(0,1,0,0,-1,1),C(0,1,0,2,-1,1),C(0,0,1,0,-1,1),C(0,0,1,1,-1,1);var M=a(u,_),E=n(u,[{type:u.FLOAT,buffer:M,size:3,offset:0,stride:28},{type:u.FLOAT,buffer:M,size:3,offset:12,stride:28},{type:u.FLOAT,buffer:M,size:1,offset:24,stride:28}]),A=o(u);A.attributes.position.location=0,A.attributes.color.location=1,A.attributes.weight.location=2;var h=new s(u,M,E,A);return h.update(b),h}},4494:function(t){t.exports=e;function e(r,a){return r[0]=1/a[0],r[1]=1/a[1],r[2]=1/a[2],r[3]=1/a[3],r}},4505:function(t,e,r){t.exports=r(5847)},4578:function(t){t.exports=e;function e(r,a,n,o,i){return r[0]=a,r[1]=n,r[2]=o,r[3]=i,r}},4623:function(t){"use restrict";t.exports=e;function e(r){this.roots=new Array(r),this.ranks=new Array(r);for(var a=0;a0)return 1<=0)return 1<=0;--u)f[u]=x*a[u]+y*n[u]+v*o[u]+T*i[u];return f}return x*a+y*n+v*o[u]+T*i}function r(a,n,o,i,s,f){var x=s-1,y=s*s,v=x*x,T=(1+2*s)*v,u=s*v,b=y*(3-2*s),_=y*x;if(a.length){f||(f=new Array(a.length));for(var C=a.length-1;C>=0;--C)f[C]=T*a[C]+u*n[C]+b*o[C]+_*i[C];return f}return T*a+u*n+b*o+_*i}t.exports=r,t.exports.derivative=e},4772:function(t){t.exports=e;function e(r,a,n,o,i){var s=1/Math.tan(a/2),f=1/(o-i);return r[0]=s/n,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=s,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(i+o)*f,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*i*o*f,r[15]=0,r}},4793:function(t,e,r){function a(gt,St){if(!(gt instanceof St))throw new TypeError("Cannot call a class as a function")}function n(gt,St){for(var Nt=0;NtA)throw new RangeError('The value "'+gt+'" is invalid for option "size"');var St=new Uint8Array(gt);return Object.setPrototypeOf(St,k.prototype),St}function k(gt,St,Nt){if(typeof gt=="number"){if(typeof St=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return N(gt)}return w(gt,St,Nt)}k.poolSize=8192;function w(gt,St,Nt){if(typeof gt=="string")return V(gt,St);if(ArrayBuffer.isView(gt))return F(gt);if(gt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_(gt));if(rn(gt,ArrayBuffer)||gt&&rn(gt.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(rn(gt,SharedArrayBuffer)||gt&&rn(gt.buffer,SharedArrayBuffer)))return U(gt,St,Nt);if(typeof gt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ee=gt.valueOf&>.valueOf();if(ee!=null&&ee!==gt)return k.from(ee,St,Nt);var le=W(gt);if(le)return le;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof gt[Symbol.toPrimitive]=="function")return k.from(gt[Symbol.toPrimitive]("string"),St,Nt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_(gt))}k.from=function(gt,St,Nt){return w(gt,St,Nt)},Object.setPrototypeOf(k.prototype,Uint8Array.prototype),Object.setPrototypeOf(k,Uint8Array);function R(gt){if(typeof gt!="number")throw new TypeError('"size" argument must be of type number');if(gt<0)throw new RangeError('The value "'+gt+'" is invalid for option "size"')}function O(gt,St,Nt){return R(gt),gt<=0?p(gt):St!==void 0?typeof Nt=="string"?p(gt).fill(St,Nt):p(gt).fill(St):p(gt)}k.alloc=function(gt,St,Nt){return O(gt,St,Nt)};function N(gt){return R(gt),p(gt<0?0:q(gt)|0)}k.allocUnsafe=function(gt){return N(gt)},k.allocUnsafeSlow=function(gt){return N(gt)};function V(gt,St){if((typeof St!="string"||St==="")&&(St="utf8"),!k.isEncoding(St))throw new TypeError("Unknown encoding: "+St);var Nt=X(gt,St)|0,ee=p(Nt),le=ee.write(gt,St);return le!==Nt&&(ee=ee.slice(0,le)),ee}function H(gt){for(var St=gt.length<0?0:q(gt.length)|0,Nt=p(St),ee=0;ee=A)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A.toString(16)+" bytes");return gt|0}k.isBuffer=function(gt){return gt!=null&>._isBuffer===!0&>!==k.prototype},k.compare=function(gt,St){if(rn(gt,Uint8Array)&&(gt=k.from(gt,gt.offset,gt.byteLength)),rn(St,Uint8Array)&&(St=k.from(St,St.offset,St.byteLength)),!k.isBuffer(gt)||!k.isBuffer(St))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(gt===St)return 0;for(var Nt=gt.length,ee=St.length,le=0,we=Math.min(Nt,ee);leee.length?(k.isBuffer(we)||(we=k.from(we)),we.copy(ee,le)):Uint8Array.prototype.set.call(ee,we,le);else if(k.isBuffer(we))we.copy(ee,le);else throw new TypeError('"list" argument must be an Array of Buffers');le+=we.length}return ee};function X(gt,St){if(k.isBuffer(gt))return gt.length;if(ArrayBuffer.isView(gt)||rn(gt,ArrayBuffer))return gt.byteLength;if(typeof gt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+_(gt));var Nt=gt.length,ee=arguments.length>2&&arguments[2]===!0;if(!ee&&Nt===0)return 0;for(var le=!1;;)switch(St){case"ascii":case"latin1":case"binary":return Nt;case"utf8":case"utf-8":return ur(gt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Nt*2;case"hex":return Nt>>>1;case"base64":return br(gt).length;default:if(le)return ee?-1:ur(gt).length;St=(""+St).toLowerCase(),le=!0}}k.byteLength=X;function lt(gt,St,Nt){var ee=!1;if((St===void 0||St<0)&&(St=0),St>this.length||((Nt===void 0||Nt>this.length)&&(Nt=this.length),Nt<=0)||(Nt>>>=0,St>>>=0,Nt<=St))return"";for(gt||(gt="utf8");;)switch(gt){case"hex":return Pt(this,St,Nt);case"utf8":case"utf-8":return Y(this,St,Nt);case"ascii":return wt(this,St,Nt);case"latin1":case"binary":return zt(this,St,Nt);case"base64":return it(this,St,Nt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wt(this,St,Nt);default:if(ee)throw new TypeError("Unknown encoding: "+gt);gt=(gt+"").toLowerCase(),ee=!0}}k.prototype._isBuffer=!0;function yt(gt,St,Nt){var ee=gt[St];gt[St]=gt[Nt],gt[Nt]=ee}k.prototype.swap16=function(){var gt=this.length;if(gt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var St=0;StSt&&(gt+=" ... "),""},E&&(k.prototype[E]=k.prototype.inspect),k.prototype.compare=function(gt,St,Nt,ee,le){if(rn(gt,Uint8Array)&&(gt=k.from(gt,gt.offset,gt.byteLength)),!k.isBuffer(gt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+_(gt));if(St===void 0&&(St=0),Nt===void 0&&(Nt=gt?gt.length:0),ee===void 0&&(ee=0),le===void 0&&(le=this.length),St<0||Nt>gt.length||ee<0||le>this.length)throw new RangeError("out of range index");if(ee>=le&&St>=Nt)return 0;if(ee>=le)return-1;if(St>=Nt)return 1;if(St>>>=0,Nt>>>=0,ee>>>=0,le>>>=0,this===gt)return 0;for(var we=le-ee,Ue=Nt-St,qe=Math.min(we,Ue),ar=this.slice(ee,le),Ar=gt.slice(St,Nt),Tr=0;Tr2147483647?Nt=2147483647:Nt<-2147483648&&(Nt=-2147483648),Nt=+Nt,Ce(Nt)&&(Nt=le?0:gt.length-1),Nt<0&&(Nt=gt.length+Nt),Nt>=gt.length){if(le)return-1;Nt=gt.length-1}else if(Nt<0)if(le)Nt=0;else return-1;if(typeof St=="string"&&(St=k.from(St,ee)),k.isBuffer(St))return St.length===0?-1:st(gt,St,Nt,ee,le);if(typeof St=="number")return St=St&255,typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(gt,St,Nt):Uint8Array.prototype.lastIndexOf.call(gt,St,Nt):st(gt,[St],Nt,ee,le);throw new TypeError("val must be string, number or Buffer")}function st(gt,St,Nt,ee,le){var we=1,Ue=gt.length,qe=St.length;if(ee!==void 0&&(ee=String(ee).toLowerCase(),ee==="ucs2"||ee==="ucs-2"||ee==="utf16le"||ee==="utf-16le")){if(gt.length<2||St.length<2)return-1;we=2,Ue/=2,qe/=2,Nt/=2}function ar(Vn,Hn){return we===1?Vn[Hn]:Vn.readUInt16BE(Hn*we)}var Ar;if(le){var Tr=-1;for(Ar=Nt;ArUe&&(Nt=Ue-qe),Ar=Nt;Ar>=0;Ar--){for(var pr=!0,Jr=0;Jrle&&(ee=le)):ee=le;var we=St.length;ee>we/2&&(ee=we/2);var Ue;for(Ue=0;Ue>>0,isFinite(Nt)?(Nt=Nt>>>0,ee===void 0&&(ee="utf8")):(ee=Nt,Nt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var le=this.length-St;if((Nt===void 0||Nt>le)&&(Nt=le),gt.length>0&&(Nt<0||St<0)||St>this.length)throw new RangeError("Attempt to write outside buffer bounds");ee||(ee="utf8");for(var we=!1;;)switch(ee){case"hex":return tt(this,gt,St,Nt);case"utf8":case"utf-8":return dt(this,gt,St,Nt);case"ascii":case"latin1":case"binary":return rt(this,gt,St,Nt);case"base64":return at(this,gt,St,Nt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vt(this,gt,St,Nt);default:if(we)throw new TypeError("Unknown encoding: "+ee);ee=(""+ee).toLowerCase(),we=!0}},k.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function it(gt,St,Nt){return St===0&&Nt===gt.length?C.fromByteArray(gt):C.fromByteArray(gt.slice(St,Nt))}function Y(gt,St,Nt){Nt=Math.min(gt.length,Nt);for(var ee=[],le=St;le239?4:we>223?3:we>191?2:1;if(le+qe<=Nt){var ar=void 0,Ar=void 0,Tr=void 0,pr=void 0;switch(qe){case 1:we<128&&(Ue=we);break;case 2:ar=gt[le+1],(ar&192)===128&&(pr=(we&31)<<6|ar&63,pr>127&&(Ue=pr));break;case 3:ar=gt[le+1],Ar=gt[le+2],(ar&192)===128&&(Ar&192)===128&&(pr=(we&15)<<12|(ar&63)<<6|Ar&63,pr>2047&&(pr<55296||pr>57343)&&(Ue=pr));break;case 4:ar=gt[le+1],Ar=gt[le+2],Tr=gt[le+3],(ar&192)===128&&(Ar&192)===128&&(Tr&192)===128&&(pr=(we&15)<<18|(ar&63)<<12|(Ar&63)<<6|Tr&63,pr>65535&&pr<1114112&&(Ue=pr))}}Ue===null?(Ue=65533,qe=1):Ue>65535&&(Ue-=65536,ee.push(Ue>>>10&1023|55296),Ue=56320|Ue&1023),ee.push(Ue),le+=qe}return ut(ee)}var ft=4096;function ut(gt){var St=gt.length;if(St<=ft)return String.fromCharCode.apply(String,gt);for(var Nt="",ee=0;eeee)&&(Nt=ee);for(var le="",we=St;weNt&&(gt=Nt),St<0?(St+=Nt,St<0&&(St=0)):St>Nt&&(St=Nt),StNt)throw new RangeError("Trying to access beyond buffer length")}k.prototype.readUintLE=k.prototype.readUIntLE=function(gt,St,Nt){gt=gt>>>0,St=St>>>0,Nt||Ht(gt,St,this.length);for(var ee=this[gt],le=1,we=0;++we>>0,St=St>>>0,Nt||Ht(gt,St,this.length);for(var ee=this[gt+--St],le=1;St>0&&(le*=256);)ee+=this[gt+--St]*le;return ee},k.prototype.readUint8=k.prototype.readUInt8=function(gt,St){return gt=gt>>>0,St||Ht(gt,1,this.length),this[gt]},k.prototype.readUint16LE=k.prototype.readUInt16LE=function(gt,St){return gt=gt>>>0,St||Ht(gt,2,this.length),this[gt]|this[gt+1]<<8},k.prototype.readUint16BE=k.prototype.readUInt16BE=function(gt,St){return gt=gt>>>0,St||Ht(gt,2,this.length),this[gt]<<8|this[gt+1]},k.prototype.readUint32LE=k.prototype.readUInt32LE=function(gt,St){return gt=gt>>>0,St||Ht(gt,4,this.length),(this[gt]|this[gt+1]<<8|this[gt+2]<<16)+this[gt+3]*16777216},k.prototype.readUint32BE=k.prototype.readUInt32BE=function(gt,St){return gt=gt>>>0,St||Ht(gt,4,this.length),this[gt]*16777216+(this[gt+1]<<16|this[gt+2]<<8|this[gt+3])},k.prototype.readBigUInt64LE=ne(function(gt){gt=gt>>>0,Te(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var ee=St+this[++gt]*Math.pow(2,8)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,24),le=this[++gt]+this[++gt]*Math.pow(2,8)+this[++gt]*Math.pow(2,16)+Nt*Math.pow(2,24);return BigInt(ee)+(BigInt(le)<>>0,Te(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var ee=St*Math.pow(2,24)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,8)+this[++gt],le=this[++gt]*Math.pow(2,24)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,8)+Nt;return(BigInt(ee)<>>0,St=St>>>0,Nt||Ht(gt,St,this.length);for(var ee=this[gt],le=1,we=0;++we=le&&(ee-=Math.pow(2,8*St)),ee},k.prototype.readIntBE=function(gt,St,Nt){gt=gt>>>0,St=St>>>0,Nt||Ht(gt,St,this.length);for(var ee=St,le=1,we=this[gt+--ee];ee>0&&(le*=256);)we+=this[gt+--ee]*le;return le*=128,we>=le&&(we-=Math.pow(2,8*St)),we},k.prototype.readInt8=function(gt,St){return gt=gt>>>0,St||Ht(gt,1,this.length),this[gt]&128?(255-this[gt]+1)*-1:this[gt]},k.prototype.readInt16LE=function(gt,St){gt=gt>>>0,St||Ht(gt,2,this.length);var Nt=this[gt]|this[gt+1]<<8;return Nt&32768?Nt|4294901760:Nt},k.prototype.readInt16BE=function(gt,St){gt=gt>>>0,St||Ht(gt,2,this.length);var Nt=this[gt+1]|this[gt]<<8;return Nt&32768?Nt|4294901760:Nt},k.prototype.readInt32LE=function(gt,St){return gt=gt>>>0,St||Ht(gt,4,this.length),this[gt]|this[gt+1]<<8|this[gt+2]<<16|this[gt+3]<<24},k.prototype.readInt32BE=function(gt,St){return gt=gt>>>0,St||Ht(gt,4,this.length),this[gt]<<24|this[gt+1]<<16|this[gt+2]<<8|this[gt+3]},k.prototype.readBigInt64LE=ne(function(gt){gt=gt>>>0,Te(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var ee=this[gt+4]+this[gt+5]*Math.pow(2,8)+this[gt+6]*Math.pow(2,16)+(Nt<<24);return(BigInt(ee)<>>0,Te(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var ee=(St<<24)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,8)+this[++gt];return(BigInt(ee)<>>0,St||Ht(gt,4,this.length),M.read(this,gt,!0,23,4)},k.prototype.readFloatBE=function(gt,St){return gt=gt>>>0,St||Ht(gt,4,this.length),M.read(this,gt,!1,23,4)},k.prototype.readDoubleLE=function(gt,St){return gt=gt>>>0,St||Ht(gt,8,this.length),M.read(this,gt,!0,52,8)},k.prototype.readDoubleBE=function(gt,St){return gt=gt>>>0,St||Ht(gt,8,this.length),M.read(this,gt,!1,52,8)};function Jt(gt,St,Nt,ee,le,we){if(!k.isBuffer(gt))throw new TypeError('"buffer" argument must be a Buffer instance');if(St>le||Stgt.length)throw new RangeError("Index out of range")}k.prototype.writeUintLE=k.prototype.writeUIntLE=function(gt,St,Nt,ee){if(gt=+gt,St=St>>>0,Nt=Nt>>>0,!ee){var le=Math.pow(2,8*Nt)-1;Jt(this,gt,St,Nt,le,0)}var we=1,Ue=0;for(this[St]=gt&255;++Ue>>0,Nt=Nt>>>0,!ee){var le=Math.pow(2,8*Nt)-1;Jt(this,gt,St,Nt,le,0)}var we=Nt-1,Ue=1;for(this[St+we]=gt&255;--we>=0&&(Ue*=256);)this[St+we]=gt/Ue&255;return St+Nt},k.prototype.writeUint8=k.prototype.writeUInt8=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,1,255,0),this[St]=gt&255,St+1},k.prototype.writeUint16LE=k.prototype.writeUInt16LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,65535,0),this[St]=gt&255,this[St+1]=gt>>>8,St+2},k.prototype.writeUint16BE=k.prototype.writeUInt16BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,65535,0),this[St]=gt>>>8,this[St+1]=gt&255,St+2},k.prototype.writeUint32LE=k.prototype.writeUInt32LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,4294967295,0),this[St+3]=gt>>>24,this[St+2]=gt>>>16,this[St+1]=gt>>>8,this[St]=gt&255,St+4},k.prototype.writeUint32BE=k.prototype.writeUInt32BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,4294967295,0),this[St]=gt>>>24,this[St+1]=gt>>>16,this[St+2]=gt>>>8,this[St+3]=gt&255,St+4};function ge(gt,St,Nt,ee,le){oe(St,ee,le,gt,Nt,7);var we=Number(St&BigInt(4294967295));gt[Nt++]=we,we=we>>8,gt[Nt++]=we,we=we>>8,gt[Nt++]=we,we=we>>8,gt[Nt++]=we;var Ue=Number(St>>BigInt(32)&BigInt(4294967295));return gt[Nt++]=Ue,Ue=Ue>>8,gt[Nt++]=Ue,Ue=Ue>>8,gt[Nt++]=Ue,Ue=Ue>>8,gt[Nt++]=Ue,Nt}function he(gt,St,Nt,ee,le){oe(St,ee,le,gt,Nt,7);var we=Number(St&BigInt(4294967295));gt[Nt+7]=we,we=we>>8,gt[Nt+6]=we,we=we>>8,gt[Nt+5]=we,we=we>>8,gt[Nt+4]=we;var Ue=Number(St>>BigInt(32)&BigInt(4294967295));return gt[Nt+3]=Ue,Ue=Ue>>8,gt[Nt+2]=Ue,Ue=Ue>>8,gt[Nt+1]=Ue,Ue=Ue>>8,gt[Nt]=Ue,Nt+8}k.prototype.writeBigUInt64LE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ge(this,gt,St,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeBigUInt64BE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return he(this,gt,St,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeIntLE=function(gt,St,Nt,ee){if(gt=+gt,St=St>>>0,!ee){var le=Math.pow(2,8*Nt-1);Jt(this,gt,St,Nt,le-1,-le)}var we=0,Ue=1,qe=0;for(this[St]=gt&255;++we>0)-qe&255;return St+Nt},k.prototype.writeIntBE=function(gt,St,Nt,ee){if(gt=+gt,St=St>>>0,!ee){var le=Math.pow(2,8*Nt-1);Jt(this,gt,St,Nt,le-1,-le)}var we=Nt-1,Ue=1,qe=0;for(this[St+we]=gt&255;--we>=0&&(Ue*=256);)gt<0&&qe===0&&this[St+we+1]!==0&&(qe=1),this[St+we]=(gt/Ue>>0)-qe&255;return St+Nt},k.prototype.writeInt8=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,1,127,-128),gt<0&&(gt=255+gt+1),this[St]=gt&255,St+1},k.prototype.writeInt16LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,32767,-32768),this[St]=gt&255,this[St+1]=gt>>>8,St+2},k.prototype.writeInt16BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,32767,-32768),this[St]=gt>>>8,this[St+1]=gt&255,St+2},k.prototype.writeInt32LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,2147483647,-2147483648),this[St]=gt&255,this[St+1]=gt>>>8,this[St+2]=gt>>>16,this[St+3]=gt>>>24,St+4},k.prototype.writeInt32BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,2147483647,-2147483648),gt<0&&(gt=4294967295+gt+1),this[St]=gt>>>24,this[St+1]=gt>>>16,this[St+2]=gt>>>8,this[St+3]=gt&255,St+4},k.prototype.writeBigInt64LE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ge(this,gt,St,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeBigInt64BE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return he(this,gt,St,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function de(gt,St,Nt,ee,le,we){if(Nt+ee>gt.length)throw new RangeError("Index out of range");if(Nt<0)throw new RangeError("Index out of range")}function se(gt,St,Nt,ee,le){return St=+St,Nt=Nt>>>0,le||de(gt,St,Nt,4),M.write(gt,St,Nt,ee,23,4),Nt+4}k.prototype.writeFloatLE=function(gt,St,Nt){return se(this,gt,St,!0,Nt)},k.prototype.writeFloatBE=function(gt,St,Nt){return se(this,gt,St,!1,Nt)};function Tt(gt,St,Nt,ee,le){return St=+St,Nt=Nt>>>0,le||de(gt,St,Nt,8),M.write(gt,St,Nt,ee,52,8),Nt+8}k.prototype.writeDoubleLE=function(gt,St,Nt){return Tt(this,gt,St,!0,Nt)},k.prototype.writeDoubleBE=function(gt,St,Nt){return Tt(this,gt,St,!1,Nt)},k.prototype.copy=function(gt,St,Nt,ee){if(!k.isBuffer(gt))throw new TypeError("argument should be a Buffer");if(Nt||(Nt=0),!ee&&ee!==0&&(ee=this.length),St>=gt.length&&(St=gt.length),St||(St=0),ee>0&&ee=this.length)throw new RangeError("Index out of range");if(ee<0)throw new RangeError("sourceEnd out of bounds");ee>this.length&&(ee=this.length),gt.length-St>>0,Nt=Nt===void 0?this.length:Nt>>>0,gt||(gt=0);var we;if(typeof gt=="number")for(we=St;weMath.pow(2,32)?le=te(String(Nt)):typeof Nt=="bigint"&&(le=String(Nt),(Nt>Math.pow(BigInt(2),BigInt(32))||Nt<-Math.pow(BigInt(2),BigInt(32)))&&(le=te(le)),le+="n"),ee+=" It must be ".concat(St,". Received ").concat(le),ee},RangeError);function te(gt){for(var St="",Nt=gt.length,ee=gt[0]==="-"?1:0;Nt>=ee+4;Nt-=3)St="_".concat(gt.slice(Nt-3,Nt)).concat(St);return"".concat(gt.slice(0,Nt)).concat(St)}function ve(gt,St,Nt){Te(St,"offset"),(gt[St]===void 0||gt[St+Nt]===void 0)&&He(St,gt.length-(Nt+1))}function oe(gt,St,Nt,ee,le,we){if(gt>Nt||gt= 0".concat(Ue," and < 2").concat(Ue," ** ").concat((we+1)*8).concat(Ue):qe=">= -(2".concat(Ue," ** ").concat((we+1)*8-1).concat(Ue,") and < 2 ** ")+"".concat((we+1)*8-1).concat(Ue),new Lt.ERR_OUT_OF_RANGE("value",qe,gt)}ve(ee,le,we)}function Te(gt,St){if(typeof gt!="number")throw new Lt.ERR_INVALID_ARG_TYPE(St,"number",gt)}function He(gt,St,Nt){throw Math.floor(gt)!==gt?(Te(gt,Nt),new Lt.ERR_OUT_OF_RANGE("offset","an integer",gt)):St<0?new Lt.ERR_BUFFER_OUT_OF_BOUNDS:new Lt.ERR_OUT_OF_RANGE("offset",">= ".concat(0," and <= ").concat(St),gt)}var Ge=/[^+/0-9A-Za-z-_]/g;function cr(gt){if(gt=gt.split("=")[0],gt=gt.trim().replace(Ge,""),gt.length<2)return"";for(;gt.length%4!==0;)gt=gt+"=";return gt}function ur(gt,St){St=St||1/0;for(var Nt,ee=gt.length,le=null,we=[],Ue=0;Ue55295&&Nt<57344){if(!le){if(Nt>56319){(St-=3)>-1&&we.push(239,191,189);continue}else if(Ue+1===ee){(St-=3)>-1&&we.push(239,191,189);continue}le=Nt;continue}if(Nt<56320){(St-=3)>-1&&we.push(239,191,189),le=Nt;continue}Nt=(le-55296<<10|Nt-56320)+65536}else le&&(St-=3)>-1&&we.push(239,191,189);if(le=null,Nt<128){if((St-=1)<0)break;we.push(Nt)}else if(Nt<2048){if((St-=2)<0)break;we.push(Nt>>6|192,Nt&63|128)}else if(Nt<65536){if((St-=3)<0)break;we.push(Nt>>12|224,Nt>>6&63|128,Nt&63|128)}else if(Nt<1114112){if((St-=4)<0)break;we.push(Nt>>18|240,Nt>>12&63|128,Nt>>6&63|128,Nt&63|128)}else throw new Error("Invalid code point")}return we}function jr(gt){for(var St=[],Nt=0;Nt>8,le=Nt%256,we.push(le),we.push(ee);return we}function br(gt){return C.toByteArray(cr(gt))}function Kr(gt,St,Nt,ee){var le;for(le=0;le=St.length||le>=gt.length);++le)St[le+Nt]=gt[le];return le}function rn(gt,St){return gt instanceof St||gt!=null&>.constructor!=null&>.constructor.name!=null&>.constructor.name===St.name}function Ce(gt){return gt!==gt}var $t=function(){for(var gt="0123456789abcdef",St=new Array(256),Nt=0;Nt<16;++Nt)for(var ee=Nt*16,le=0;le<16;++le)St[ee+le]=gt[Nt]+gt[le];return St}();function ne(gt){return typeof BigInt>"u"?Ct:gt}function Ct(){throw new Error("BigInt not supported")}},4844:function(t){t.exports=e;function e(r,a,n,o){return r[0]=a[0]+n[0]*o,r[1]=a[1]+n[1]*o,r[2]=a[2]+n[2]*o,r[3]=a[3]+n[3]*o,r}},4905:function(t,e,r){var a=r(5874);t.exports=n;function n(o,i){var s=a(i),f=[];return f=f.concat(s(o)),f=f.concat(s(null)),f}},4935:function(t,e,r){t.exports=b;var a=r(2762),n=r(8116),o=r(4359),i=r(1879).Q,s=window||process.global||{},f=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};var x=3;function y(_,C,M,E){this.gl=_,this.shader=C,this.buffer=M,this.vao=E,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var v=y.prototype,T=[0,0];v.bind=function(_,C,M,E){this.vao.bind(),this.shader.bind();var A=this.shader.uniforms;A.model=_,A.view=C,A.projection=M,A.pixelScale=E,T[0]=this.gl.drawingBufferWidth,T[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=T},v.unbind=function(){this.vao.unbind()},v.update=function(_,C,M,E,A){var h=[];function p(W,q,X,lt,yt,pt){var st=[X.style,X.weight,X.variant,X.family].join("_"),tt=f[st];tt||(tt=f[st]={});var dt=tt[q];dt||(dt=tt[q]=u(q,{triangles:!0,font:X.family,fontStyle:X.style,fontWeight:X.weight,fontVariant:X.variant,textAlign:"center",textBaseline:"middle",lineSpacing:yt,styletags:pt}));for(var rt=(lt||12)/12,at=dt.positions,vt=dt.cells,it=0,Y=vt.length;it=0;--ut){var wt=at[ft[ut]];h.push(rt*wt[0],-rt*wt[1],W)}}for(var k=[0,0,0],w=[0,0,0],R=[0,0,0],O=[0,0,0],N=1.25,V={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},H=0;H<3;++H){R[H]=h.length/x|0,p(.5*(_[0][H]+_[1][H]),C[H],M[H],12,N,V),O[H]=(h.length/x|0)-R[H],k[H]=h.length/x|0;for(var F=0;F0||C.length>0;){for(;_.length>0;){var p=_.pop();if(M[p]!==-b){M[p]=b;for(var k=E[p],w=0;w<3;++w){var R=h[3*p+w];R>=0&&M[R]===0&&(A[3*p+w]?C.push(R):(_.push(R),M[R]=b))}}}var O=C;C=_,_=O,C.length=0,b=-b}var N=f(E,M,v);return T?N.concat(u.boundary):N}},5033:function(t){t.exports=e;function e(r,a,n){var o=a||0,i=n||1;return[[r[12]+r[0],r[13]+r[1],r[14]+r[2],r[15]+r[3]],[r[12]-r[0],r[13]-r[1],r[14]-r[2],r[15]-r[3]],[r[12]+r[4],r[13]+r[5],r[14]+r[6],r[15]+r[7]],[r[12]-r[4],r[13]-r[5],r[14]-r[6],r[15]-r[7]],[o*r[12]+r[8],o*r[13]+r[9],o*r[14]+r[10],o*r[15]+r[11]],[i*r[12]-r[8],i*r[13]-r[9],i*r[14]-r[10],i*r[15]-r[11]]]}},5085:function(t,e,r){t.exports=b;var a=r(3250)[3],n=r(4209),o=r(3352),i=r(2478);function s(){return!0}function f(_){return function(C,M){var E=_[C];return E?!!E.queryPoint(M,s):!1}}function x(_){for(var C={},M=0;M<_.length;++M){var E=_[M],A=E[0][0],h=E[0][1],p=E[1][1],k=[Math.min(h,p),Math.max(h,p)];A in C?C[A].push(k):C[A]=[k]}for(var w={},R=Object.keys(C),M=0;M0&&C[E]===M[0])A=_[E-1];else return 1;for(var h=1;A;){var p=A.key,k=a(M,p[0],p[1]);if(p[0][0]0)h=-1,A=A.right;else return 0;else if(k>0)A=A.left;else if(k<0)h=1,A=A.right;else return 0}return h}}function v(_){return 1}function T(_){return function(C){return _(C[0],C[1])?0:1}}function u(_,C){return function(M){return _(M[0],M[1])?0:C(M)}}function b(_){for(var C=_.length,M=[],E=[],A=0,h=0;h"u"?r(606):WeakMap,i=new o,s=0;function f(C,M,E,A,h,p,k){this.id=C,this.src=M,this.type=E,this.shader=A,this.count=p,this.programs=[],this.cache=k}f.prototype.dispose=function(){if(--this.count===0){for(var C=this.cache,M=C.gl,E=this.programs,A=0,h=E.length;A0&&(f=1/Math.sqrt(f),r[0]=n*f,r[1]=o*f,r[2]=i*f,r[3]=s*f),r}},5202:function(t,e,r){var a=r(1944),n=r(8210);t.exports=s,t.exports.positive=f,t.exports.negative=x;function o(y,v){var T=n(a(y,v),[v[v.length-1]]);return T[T.length-1]}function i(y,v,T,u){var b=u-v,_=-v/b;_<0?_=0:_>1&&(_=1);for(var C=1-_,M=y.length,E=new Array(M),A=0;A0||b>0&&E<0){var A=i(_,E,C,b);T.push(A),u.push(A.slice())}E<0?u.push(C.slice()):E>0?T.push(C.slice()):(T.push(C.slice()),u.push(C.slice())),b=E}return{positive:T,negative:u}}function f(y,v){for(var T=[],u=o(y[y.length-1],v),b=y[y.length-1],_=y[0],C=0;C0||u>0&&M<0)&&T.push(i(b,M,_,u)),M>=0&&T.push(_.slice()),u=M}return T}function x(y,v){for(var T=[],u=o(y[y.length-1],v),b=y[y.length-1],_=y[0],C=0;C0||u>0&&M<0)&&T.push(i(b,M,_,u)),M<=0&&T.push(_.slice()),u=M}return T}},5219:function(t){t.exports=function(e){for(var r=e.length,a,n=0;n13)&&a!==32&&a!==133&&a!==160&&a!==5760&&a!==6158&&(a<8192||a>8205)&&a!==8232&&a!==8233&&a!==8239&&a!==8287&&a!==8288&&a!==12288&&a!==65279)return!1;return!0}},5250:function(t){t.exports=r;var e=+(Math.pow(2,27)+1);function r(a,n,o){var i=a*n,s=e*a,f=s-a,x=s-f,y=a-x,v=e*n,T=v-n,u=v-T,b=n-u,_=i-x*u,C=_-y*u,M=C-x*b,E=y*b-M;return o?(o[0]=E,o[1]=i,o):[E,i]}},5298:function(t,e){var r={"float64,2,1,0":function(){return function(x,y,v,T,u){var b=x[0],_=x[1],C=x[2],M=v[0],E=v[1],A=v[2];T|=0;var h=0,p=0,k=0,w=A,R=E-C*A,O=M-_*E;for(k=0;k0;){H<64?(M=H,H=0):(M=64,H-=64);for(var F=x[1]|0;F>0;){F<64?(E=F,F=0):(E=64,F-=64),T=N+H*h+F*p,_=V+H*w+F*R;var U=0,W=0,q=0,X=k,lt=h-A*k,yt=p-M*h,pt=O,st=w-A*O,tt=R-M*w;for(q=0;q0;){R<64?(M=R,R=0):(M=64,R-=64);for(var O=x[0]|0;O>0;){O<64?(C=O,O=0):(C=64,O-=64),T=k+R*A+O*E,_=w+R*p+O*h;var N=0,V=0,H=A,F=E-M*A,U=p,W=h-M*p;for(V=0;V0;){V<64?(E=V,V=0):(E=64,V-=64);for(var H=x[0]|0;H>0;){H<64?(C=H,H=0):(C=64,H-=64);for(var F=x[1]|0;F>0;){F<64?(M=F,F=0):(M=64,F-=64),T=O+V*p+H*A+F*h,_=N+V*R+H*k+F*w;var U=0,W=0,q=0,X=p,lt=A-E*p,yt=h-C*A,pt=R,st=k-E*R,tt=w-C*k;for(q=0;q=0}}(),o.removeTriangle=function(f,x,y){var v=this.stars;i(v[f],x,y),i(v[x],y,f),i(v[y],f,x)},o.addTriangle=function(f,x,y){var v=this.stars;v[f].push(x,y),v[x].push(y,f),v[y].push(f,x)},o.opposite=function(f,x){for(var y=this.stars[x],v=1,T=y.length;v0;){var u=y.pop();f[u]=!1;for(var b=s[u],v=0;v0){for(var st=0;st<24;++st)O.push(O[O.length-12]);F+=2,lt=!0}continue t}U[0][w]=Math.min(U[0][w],yt[w],pt[w]),U[1][w]=Math.max(U[1][w],yt[w],pt[w])}var tt,dt;Array.isArray(q[0])?(tt=q.length>k-1?q[k-1]:q.length>0?q[q.length-1]:[0,0,0,1],dt=q.length>k?q[k]:q.length>0?q[q.length-1]:[0,0,0,1]):tt=dt=q,tt.length===3&&(tt=[tt[0],tt[1],tt[2],1]),dt.length===3&&(dt=[dt[0],dt[1],dt[2],1]),!this.hasAlpha&&tt[3]<1&&(this.hasAlpha=!0);var rt;Array.isArray(X)?rt=X.length>k-1?X[k-1]:X.length>0?X[X.length-1]:[0,0,0,1]:rt=X;var at=H;if(H+=_(yt,pt),lt){for(w=0;w<2;++w)O.push(yt[0],yt[1],yt[2],pt[0],pt[1],pt[2],at,rt,tt[0],tt[1],tt[2],tt[3]);F+=2,lt=!1}O.push(yt[0],yt[1],yt[2],pt[0],pt[1],pt[2],at,rt,tt[0],tt[1],tt[2],tt[3],yt[0],yt[1],yt[2],pt[0],pt[1],pt[2],at,-rt,tt[0],tt[1],tt[2],tt[3],pt[0],pt[1],pt[2],yt[0],yt[1],yt[2],H,-rt,dt[0],dt[1],dt[2],dt[3],pt[0],pt[1],pt[2],yt[0],yt[1],yt[2],H,rt,dt[0],dt[1],dt[2],dt[3]),F+=4}}if(this.buffer.update(O),N.push(H),V.push(W[W.length-1].slice()),this.bounds=U,this.vertexCount=F,this.points=V,this.arcLength=N,"dashes"in p){var vt=p.dashes,it=vt.slice();for(it.unshift(0),k=1;kr[n][0]&&(n=o);return an?[[n],[a]]:[[a]]}},5771:function(t,e,r){var a=r(8507),n=r(3788),o=r(2419);t.exports=i;function i(s){s.sort(n);for(var f=s.length,x=0,y=0;y0){var u=s[x-1];if(a(v,u)===0&&o(u)!==T){x-=1;continue}}s[x++]=v}}return s.length=x,s}},5838:function(t,e,r){t.exports=n;var a=r(7842);function n(o){for(var i=new Array(o.length),s=0;s0)continue;te=Tt.slice(0,1).join("")}return it(te),lt+=te.length,U=U.slice(te.length),U.length}while(!0)}function ge(){return/[^a-fA-F0-9]/.test(H)?(it(U.join("")),V=f,O):(U.push(H),F=H,O+1)}function he(){return H==="."||/[eE]/.test(H)?(U.push(H),V=_,F=H,O+1):H==="x"&&U.length===1&&U[0]==="0"?(V=p,U.push(H),F=H,O+1):/[^\d]/.test(H)?(it(U.join("")),V=f,O):(U.push(H),F=H,O+1)}function de(){return H==="f"&&(U.push(H),F=H,O+=1),/[eE]/.test(H)||(H==="-"||H==="+")&&/[eE]/.test(F)?(U.push(H),F=H,O+1):/[^\d]/.test(H)?(it(U.join("")),V=f,O):(U.push(H),F=H,O+1)}function se(){if(/[^\d\w_]/.test(H)){var Tt=U.join("");return vt[Tt]?V=E:at[Tt]?V=M:V=C,it(U.join("")),V=f,O}return U.push(H),F=H,O+1}}},5878:function(t,e,r){t.exports=i;var a=r(3250),n=r(2014);function o(s,f,x){var y=Math.abs(a(s,f,x)),v=Math.sqrt(Math.pow(f[0]-x[0],2)+Math.pow(f[1]-x[1],2));return y/v}function i(s,f,x){for(var y=f.length,v=s.length,T=new Array(y),u=new Array(y),b=new Array(y),_=new Array(y),C=0;C>1:(st>>1)-1}function R(st){for(var tt=k(st);;){var dt=tt,rt=2*st+1,at=2*(st+1),vt=st;if(rt0;){var dt=w(st);if(dt>=0){var rt=k(dt);if(tt0){var st=F[0];return p(0,q-1),q-=1,R(0),st}return-1}function V(st,tt){var dt=F[st];return b[dt]===tt?st:(b[dt]=-1/0,O(st),N(),b[dt]=tt,q+=1,O(q-1))}function H(st){if(!_[st]){_[st]=!0;var tt=T[st],dt=u[st];T[dt]>=0&&(T[dt]=tt),u[tt]>=0&&(u[tt]=dt),U[tt]>=0&&V(U[tt],h(tt)),U[dt]>=0&&V(U[dt],h(dt))}}for(var F=[],U=new Array(y),C=0;C>1;C>=0;--C)R(C);for(;;){var X=N();if(X<0||b[X]>x)break;H(X)}for(var lt=[],C=0;C=0&&dt>=0&&tt!==dt){var rt=U[tt],at=U[dt];rt!==at&&pt.push([rt,at])}}),n.unique(n.normalize(pt)),{positions:lt,edges:pt}}},5911:function(t){t.exports=e;function e(r,a,n){var o=a[0],i=a[1],s=a[2],f=n[0],x=n[1],y=n[2];return r[0]=i*y-s*x,r[1]=s*f-o*y,r[2]=o*x-i*f,r}},5964:function(t){t.exports=function(e){return!e&&e!==0?"":e.toString()}},5995:function(t,e,r){t.exports=o;var a=r(7642),n=r(6037);function o(i,s){return a(s).filter(function(f){for(var x=new Array(f.length),y=0;y2&&k[1]>2&&A(p.pick(-1,-1).lo(1,1).hi(k[0]-2,k[1]-2),h.pick(-1,-1,0).lo(1,1).hi(k[0]-2,k[1]-2),h.pick(-1,-1,1).lo(1,1).hi(k[0]-2,k[1]-2)),k[1]>2&&(E(p.pick(0,-1).lo(1).hi(k[1]-2),h.pick(0,-1,1).lo(1).hi(k[1]-2)),M(h.pick(0,-1,0).lo(1).hi(k[1]-2))),k[1]>2&&(E(p.pick(k[0]-1,-1).lo(1).hi(k[1]-2),h.pick(k[0]-1,-1,1).lo(1).hi(k[1]-2)),M(h.pick(k[0]-1,-1,0).lo(1).hi(k[1]-2))),k[0]>2&&(E(p.pick(-1,0).lo(1).hi(k[0]-2),h.pick(-1,0,0).lo(1).hi(k[0]-2)),M(h.pick(-1,0,1).lo(1).hi(k[0]-2))),k[0]>2&&(E(p.pick(-1,k[1]-1).lo(1).hi(k[0]-2),h.pick(-1,k[1]-1,0).lo(1).hi(k[0]-2)),M(h.pick(-1,k[1]-1,1).lo(1).hi(k[0]-2))),h.set(0,0,0,0),h.set(0,0,1,0),h.set(k[0]-1,0,0,0),h.set(k[0]-1,0,1,0),h.set(0,k[1]-1,0,0),h.set(0,k[1]-1,1,0),h.set(k[0]-1,k[1]-1,0,0),h.set(k[0]-1,k[1]-1,1,0),h}}function _(C){var M=C.join(),k=y[M];if(k)return k;for(var E=C.length,A=[v,T],h=1;h<=E;++h)A.push(u(h));var p=b,k=p.apply(void 0,A);return y[M]=k,k}t.exports=function(C,M,E){if(Array.isArray(E)||(typeof E=="string"?E=a(M.dimension,E):E=a(M.dimension,"clamp")),M.size===0)return C;if(M.dimension===0)return C.set(0),C;var A=_(E);return A(C,M)}},6204:function(t){t.exports=e;function e(r){var a,n,o,i=r.length,s=0;for(a=0;ay&&(y=a.length(O)),w&&!k){var N=2*a.distance(M,R)/(a.length(E)+a.length(O));N?(h=Math.min(h,N),p=!1):p=!0}p||(M=R,E=O),A.push(O)}var V=[v,u,_],H=[T,b,C];i&&(i[0]=V,i[1]=H),y===0&&(y=1);var F=1/y;isFinite(h)||(h=1),x.vectorScale=h;var U=o.coneSize||(k?1:.5);o.absoluteConeSize&&(U=o.absoluteConeSize*F),x.coneScale=U;for(var w=0,W=0;wlt&&(H|=1<lt){H|=1<x[O][1])&&(vt=O);for(var it=-1,O=0;O<3;++O){var Y=vt^1<x[ft][0]&&(ft=Y)}}var ut=_;ut[0]=ut[1]=ut[2]=0,ut[a.log2(it^vt)]=vt&it,ut[a.log2(vt^ft)]=vt&ft;var wt=ft^7;wt===H||wt===at?(wt=it^7,ut[a.log2(ft^wt)]=wt&ft):ut[a.log2(it^wt)]=wt⁢for(var zt=C,Pt=H,W=0;W<3;++W)Pt&1<=0&&(x=s.length-f-1);var y=Math.pow(10,x),v=Math.round(o*i*y),T=v+"";if(T.indexOf("e")>=0)return T;var u=v/y,b=v%y;v<0?(u=-Math.ceil(u)|0,b=-b|0):(u=Math.floor(u)|0,b=b|0);var _=""+u;if(v<0&&(_="-"+_),x){for(var C=""+b;C.length=o[0][f];--v)x.push({x:v*i[f],text:r(i[f],v)});s.push(x)}return s}function n(o,i){for(var s=0;s<3;++s){if(o[s].length!==i[s].length)return!1;for(var f=0;fM+1)throw new Error(_+" map requires nshades to be at least size "+b.length);Array.isArray(x.alpha)?x.alpha.length!==2?E=[1,1]:E=x.alpha.slice():typeof x.alpha=="number"?E=[x.alpha,x.alpha]:E=[1,1],y=b.map(function(R){return Math.round(R.index*M)}),E[0]=Math.min(Math.max(E[0],0),1),E[1]=Math.min(Math.max(E[1],0),1);var h=b.map(function(R,O){var N=b[O].index,V=b[O].rgb.slice();return V.length===4&&V[3]>=0&&V[3]<=1||(V[3]=E[0]+(E[1]-E[0])*N),V}),p=[];for(A=0;A 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the tube vertex and normal at the given index. +// +// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. +// +// Each tube segment is made up of a ring of vertices. +// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. +// The indexes of tube segments run from 0 to 8. +// +vec3 getTubePosition(vec3 d, float index, out vec3 normal) { + float segmentCount = 8.0; + + float angle = 2.0 * 3.14159 * (index / segmentCount); + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d); + vec3 y = v * sin(angle) * length(d); + vec3 v3 = x + y; + + normal = normalize(v3); + + return v3; +} + +attribute vec4 vector; +attribute vec4 color, position; +attribute vec2 uv; + +uniform float vectorScale, tubeScale; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 eyePosition, lightPosition; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + // Scale the vector magnitude to stay constant with + // model & view changes. + vec3 normal; + vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); + vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * tubePosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + // vec4 m_position = model * vec4(tubePosition, 1.0); + vec4 t_position = view * tubePosition; + gl_Position = projection * t_position; + + f_color = color; + f_data = tubePosition.xyz; + f_position = position.xyz; + f_uv = uv; +} +`]),o=a([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform sampler2D texture; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = f_color * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * opacity; +} +`]),i=a([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the tube vertex and normal at the given index. +// +// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. +// +// Each tube segment is made up of a ring of vertices. +// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. +// The indexes of tube segments run from 0 to 8. +// +vec3 getTubePosition(vec3 d, float index, out vec3 normal) { + float segmentCount = 8.0; + + float angle = 2.0 * 3.14159 * (index / segmentCount); + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d); + vec3 y = v * sin(angle) * length(d); + vec3 v3 = x + y; + + normal = normalize(v3); + + return v3; +} + +attribute vec4 vector; +attribute vec4 position; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform float tubeScale; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + vec3 normal; + vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); + vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + gl_Position = projection * (view * tubePosition); + f_id = id; + f_position = position.xyz; +} +`]),s=a([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]);e.meshShader={vertex:n,fragment:o,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},e.pickShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},6743:function(t){t.exports=e;function e(r,a,n){var o=a[0],i=a[1],s=a[2],f=a[3],x=o+o,y=i+i,v=s+s,T=o*x,u=o*y,b=o*v,_=i*y,C=i*v,M=s*v,E=f*x,A=f*y,h=f*v;return r[0]=1-(_+M),r[1]=u+h,r[2]=b-A,r[3]=0,r[4]=u-h,r[5]=1-(T+M),r[6]=C+E,r[7]=0,r[8]=b+A,r[9]=C-E,r[10]=1-(T+_),r[11]=0,r[12]=n[0],r[13]=n[1],r[14]=n[2],r[15]=1,r}},6760:function(t){t.exports=e;function e(r,a,n){var o=a[0],i=a[1],s=a[2],f=a[3],x=a[4],y=a[5],v=a[6],T=a[7],u=a[8],b=a[9],_=a[10],C=a[11],M=a[12],E=a[13],A=a[14],h=a[15],p=n[0],k=n[1],w=n[2],R=n[3];return r[0]=p*o+k*x+w*u+R*M,r[1]=p*i+k*y+w*b+R*E,r[2]=p*s+k*v+w*_+R*A,r[3]=p*f+k*T+w*C+R*h,p=n[4],k=n[5],w=n[6],R=n[7],r[4]=p*o+k*x+w*u+R*M,r[5]=p*i+k*y+w*b+R*E,r[6]=p*s+k*v+w*_+R*A,r[7]=p*f+k*T+w*C+R*h,p=n[8],k=n[9],w=n[10],R=n[11],r[8]=p*o+k*x+w*u+R*M,r[9]=p*i+k*y+w*b+R*E,r[10]=p*s+k*v+w*_+R*A,r[11]=p*f+k*T+w*C+R*h,p=n[12],k=n[13],w=n[14],R=n[15],r[12]=p*o+k*x+w*u+R*M,r[13]=p*i+k*y+w*b+R*E,r[14]=p*s+k*v+w*_+R*A,r[15]=p*f+k*T+w*C+R*h,r}},6768:function(t,e,r){var a=r(6859);t.exports=n;function n(o){return new a(o)}},6803:function(t,e,r){r(8828),r(1755);function a(n,o){var i=n.length,s=n.length-o.length,f=Math.min;if(s)return s;switch(i){case 0:return 0;case 1:return n[0]-o[0];case 2:var u=n[0]+n[1]-o[0]-o[1];return u||f(n[0],n[1])-f(o[0],o[1]);case 3:var x=n[0]+n[1],y=o[0]+o[1];if(u=x+n[2]-(y+o[2]),u)return u;var v=f(n[0],n[1]),T=f(o[0],o[1]),u=f(v,n[2])-f(T,o[2]);return u||f(v+n[2],x)-f(T+o[2],y);default:var b=n.slice(0);b.sort();var _=o.slice(0);_.sort();for(var C=0;C0?F:U},s.min=function(F,U){return F.cmp(U)<0?F:U},s.prototype._init=function(F,U,W){if(typeof F=="number")return this._initNumber(F,U,W);if(typeof F=="object")return this._initArray(F,U,W);U==="hex"&&(U=16),o(U===(U|0)&&U>=2&&U<=36),F=F.toString().replace(/\s+/g,"");var q=0;F[0]==="-"&&(q++,this.negative=1),q=0;q-=3)lt=F[q]|F[q-1]<<8|F[q-2]<<16,this.words[X]|=lt<>>26-yt&67108863,yt+=24,yt>=26&&(yt-=26,X++);else if(W==="le")for(q=0,X=0;q>>26-yt&67108863,yt+=24,yt>=26&&(yt-=26,X++);return this.strip()};function x(F,U){var W=F.charCodeAt(U);return W>=65&&W<=70?W-55:W>=97&&W<=102?W-87:W-48&15}function y(F,U,W){var q=x(F,W);return W-1>=U&&(q|=x(F,W-1)<<4),q}s.prototype._parseHex=function(F,U,W){this.length=Math.ceil((F.length-U)/6),this.words=new Array(this.length);for(var q=0;q=U;q-=2)yt=y(F,U,q)<=18?(X-=18,lt+=1,this.words[lt]|=yt>>>26):X+=8;else{var pt=F.length-U;for(q=pt%2===0?U+1:U;q=18?(X-=18,lt+=1,this.words[lt]|=yt>>>26):X+=8}this.strip()};function v(F,U,W,q){for(var X=0,lt=Math.min(F.length,W),yt=U;yt=49?X+=pt-49+10:pt>=17?X+=pt-17+10:X+=pt}return X}s.prototype._parseBase=function(F,U,W){this.words=[0],this.length=1;for(var q=0,X=1;X<=67108863;X*=U)q++;q--,X=X/U|0;for(var lt=F.length-W,yt=lt%q,pt=Math.min(lt,lt-yt)+W,st=0,tt=W;tt1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var T=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],b=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(F,U){F=F||10,U=U|0||1;var W;if(F===16||F==="hex"){W="";for(var q=0,X=0,lt=0;lt>>24-q&16777215,X!==0||lt!==this.length-1?W=T[6-pt.length]+pt+W:W=pt+W,q+=2,q>=26&&(q-=26,lt--)}for(X!==0&&(W=X.toString(16)+W);W.length%U!==0;)W="0"+W;return this.negative!==0&&(W="-"+W),W}if(F===(F|0)&&F>=2&&F<=36){var st=u[F],tt=b[F];W="";var dt=this.clone();for(dt.negative=0;!dt.isZero();){var rt=dt.modn(tt).toString(F);dt=dt.idivn(tt),dt.isZero()?W=rt+W:W=T[st-rt.length]+rt+W}for(this.isZero()&&(W="0"+W);W.length%U!==0;)W="0"+W;return this.negative!==0&&(W="-"+W),W}o(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var F=this.words[0];return this.length===2?F+=this.words[1]*67108864:this.length===3&&this.words[2]===1?F+=4503599627370496+this.words[1]*67108864:this.length>2&&o(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-F:F},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(F,U){return o(typeof f<"u"),this.toArrayLike(f,F,U)},s.prototype.toArray=function(F,U){return this.toArrayLike(Array,F,U)},s.prototype.toArrayLike=function(F,U,W){var q=this.byteLength(),X=W||Math.max(1,q);o(q<=X,"byte array longer than desired length"),o(X>0,"Requested array length <= 0"),this.strip();var lt=U==="le",yt=new F(X),pt,st,tt=this.clone();if(lt){for(st=0;!tt.isZero();st++)pt=tt.andln(255),tt.iushrn(8),yt[st]=pt;for(;st=4096&&(W+=13,U>>>=13),U>=64&&(W+=7,U>>>=7),U>=8&&(W+=4,U>>>=4),U>=2&&(W+=2,U>>>=2),W+U},s.prototype._zeroBits=function(F){if(F===0)return 26;var U=F,W=0;return(U&8191)===0&&(W+=13,U>>>=13),(U&127)===0&&(W+=7,U>>>=7),(U&15)===0&&(W+=4,U>>>=4),(U&3)===0&&(W+=2,U>>>=2),(U&1)===0&&W++,W},s.prototype.bitLength=function(){var F=this.words[this.length-1],U=this._countBits(F);return(this.length-1)*26+U};function _(F){for(var U=new Array(F.bitLength()),W=0;W>>X}return U}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var F=0,U=0;UF.length?this.clone().ior(F):F.clone().ior(this)},s.prototype.uor=function(F){return this.length>F.length?this.clone().iuor(F):F.clone().iuor(this)},s.prototype.iuand=function(F){var U;this.length>F.length?U=F:U=this;for(var W=0;WF.length?this.clone().iand(F):F.clone().iand(this)},s.prototype.uand=function(F){return this.length>F.length?this.clone().iuand(F):F.clone().iuand(this)},s.prototype.iuxor=function(F){var U,W;this.length>F.length?(U=this,W=F):(U=F,W=this);for(var q=0;qF.length?this.clone().ixor(F):F.clone().ixor(this)},s.prototype.uxor=function(F){return this.length>F.length?this.clone().iuxor(F):F.clone().iuxor(this)},s.prototype.inotn=function(F){o(typeof F=="number"&&F>=0);var U=Math.ceil(F/26)|0,W=F%26;this._expand(U),W>0&&U--;for(var q=0;q0&&(this.words[q]=~this.words[q]&67108863>>26-W),this.strip()},s.prototype.notn=function(F){return this.clone().inotn(F)},s.prototype.setn=function(F,U){o(typeof F=="number"&&F>=0);var W=F/26|0,q=F%26;return this._expand(W+1),U?this.words[W]=this.words[W]|1<F.length?(W=this,q=F):(W=F,q=this);for(var X=0,lt=0;lt>>26;for(;X!==0&<>>26;if(this.length=W.length,X!==0)this.words[this.length]=X,this.length++;else if(W!==this)for(;ltF.length?this.clone().iadd(F):F.clone().iadd(this)},s.prototype.isub=function(F){if(F.negative!==0){F.negative=0;var U=this.iadd(F);return F.negative=1,U._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(F),this.negative=1,this._normSign();var W=this.cmp(F);if(W===0)return this.negative=0,this.length=1,this.words[0]=0,this;var q,X;W>0?(q=this,X=F):(q=F,X=this);for(var lt=0,yt=0;yt>26,this.words[yt]=U&67108863;for(;lt!==0&&yt>26,this.words[yt]=U&67108863;if(lt===0&&yt>>26,rt=st&67108863,at=Math.min(tt,U.length-1),vt=Math.max(0,tt-F.length+1);vt<=at;vt++){var it=tt-vt|0;X=F.words[it]|0,lt=U.words[vt]|0,yt=X*lt+rt,dt+=yt/67108864|0,rt=yt&67108863}W.words[tt]=rt|0,st=dt|0}return st!==0?W.words[tt]=st|0:W.length--,W.strip()}var M=function(F,U,W){var q=F.words,X=U.words,lt=W.words,yt=0,pt,st,tt,dt=q[0]|0,rt=dt&8191,at=dt>>>13,vt=q[1]|0,it=vt&8191,Y=vt>>>13,ft=q[2]|0,ut=ft&8191,wt=ft>>>13,zt=q[3]|0,Pt=zt&8191,Wt=zt>>>13,Ht=q[4]|0,Jt=Ht&8191,ge=Ht>>>13,he=q[5]|0,de=he&8191,se=he>>>13,Tt=q[6]|0,Lt=Tt&8191,Mt=Tt>>>13,te=q[7]|0,ve=te&8191,oe=te>>>13,Te=q[8]|0,He=Te&8191,Ge=Te>>>13,cr=q[9]|0,ur=cr&8191,jr=cr>>>13,Hr=X[0]|0,br=Hr&8191,Kr=Hr>>>13,rn=X[1]|0,Ce=rn&8191,$t=rn>>>13,ne=X[2]|0,Ct=ne&8191,gt=ne>>>13,St=X[3]|0,Nt=St&8191,ee=St>>>13,le=X[4]|0,we=le&8191,Ue=le>>>13,qe=X[5]|0,ar=qe&8191,Ar=qe>>>13,Tr=X[6]|0,pr=Tr&8191,Jr=Tr>>>13,Vn=X[7]|0,Hn=Vn&8191,Kn=Vn>>>13,Ci=X[8]|0,ii=Ci&8191,qn=Ci>>>13,oa=X[9]|0,Hi=oa&8191,We=oa>>>13;W.negative=F.negative^U.negative,W.length=19,pt=Math.imul(rt,br),st=Math.imul(rt,Kr),st=st+Math.imul(at,br)|0,tt=Math.imul(at,Kr);var rr=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(rr>>>26)|0,rr&=67108863,pt=Math.imul(it,br),st=Math.imul(it,Kr),st=st+Math.imul(Y,br)|0,tt=Math.imul(Y,Kr),pt=pt+Math.imul(rt,Ce)|0,st=st+Math.imul(rt,$t)|0,st=st+Math.imul(at,Ce)|0,tt=tt+Math.imul(at,$t)|0;var fr=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(fr>>>26)|0,fr&=67108863,pt=Math.imul(ut,br),st=Math.imul(ut,Kr),st=st+Math.imul(wt,br)|0,tt=Math.imul(wt,Kr),pt=pt+Math.imul(it,Ce)|0,st=st+Math.imul(it,$t)|0,st=st+Math.imul(Y,Ce)|0,tt=tt+Math.imul(Y,$t)|0,pt=pt+Math.imul(rt,Ct)|0,st=st+Math.imul(rt,gt)|0,st=st+Math.imul(at,Ct)|0,tt=tt+Math.imul(at,gt)|0;var xr=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(xr>>>26)|0,xr&=67108863,pt=Math.imul(Pt,br),st=Math.imul(Pt,Kr),st=st+Math.imul(Wt,br)|0,tt=Math.imul(Wt,Kr),pt=pt+Math.imul(ut,Ce)|0,st=st+Math.imul(ut,$t)|0,st=st+Math.imul(wt,Ce)|0,tt=tt+Math.imul(wt,$t)|0,pt=pt+Math.imul(it,Ct)|0,st=st+Math.imul(it,gt)|0,st=st+Math.imul(Y,Ct)|0,tt=tt+Math.imul(Y,gt)|0,pt=pt+Math.imul(rt,Nt)|0,st=st+Math.imul(rt,ee)|0,st=st+Math.imul(at,Nt)|0,tt=tt+Math.imul(at,ee)|0;var Qr=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,pt=Math.imul(Jt,br),st=Math.imul(Jt,Kr),st=st+Math.imul(ge,br)|0,tt=Math.imul(ge,Kr),pt=pt+Math.imul(Pt,Ce)|0,st=st+Math.imul(Pt,$t)|0,st=st+Math.imul(Wt,Ce)|0,tt=tt+Math.imul(Wt,$t)|0,pt=pt+Math.imul(ut,Ct)|0,st=st+Math.imul(ut,gt)|0,st=st+Math.imul(wt,Ct)|0,tt=tt+Math.imul(wt,gt)|0,pt=pt+Math.imul(it,Nt)|0,st=st+Math.imul(it,ee)|0,st=st+Math.imul(Y,Nt)|0,tt=tt+Math.imul(Y,ee)|0,pt=pt+Math.imul(rt,we)|0,st=st+Math.imul(rt,Ue)|0,st=st+Math.imul(at,we)|0,tt=tt+Math.imul(at,Ue)|0;var Cn=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,pt=Math.imul(de,br),st=Math.imul(de,Kr),st=st+Math.imul(se,br)|0,tt=Math.imul(se,Kr),pt=pt+Math.imul(Jt,Ce)|0,st=st+Math.imul(Jt,$t)|0,st=st+Math.imul(ge,Ce)|0,tt=tt+Math.imul(ge,$t)|0,pt=pt+Math.imul(Pt,Ct)|0,st=st+Math.imul(Pt,gt)|0,st=st+Math.imul(Wt,Ct)|0,tt=tt+Math.imul(Wt,gt)|0,pt=pt+Math.imul(ut,Nt)|0,st=st+Math.imul(ut,ee)|0,st=st+Math.imul(wt,Nt)|0,tt=tt+Math.imul(wt,ee)|0,pt=pt+Math.imul(it,we)|0,st=st+Math.imul(it,Ue)|0,st=st+Math.imul(Y,we)|0,tt=tt+Math.imul(Y,Ue)|0,pt=pt+Math.imul(rt,ar)|0,st=st+Math.imul(rt,Ar)|0,st=st+Math.imul(at,ar)|0,tt=tt+Math.imul(at,Ar)|0;var wn=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(wn>>>26)|0,wn&=67108863,pt=Math.imul(Lt,br),st=Math.imul(Lt,Kr),st=st+Math.imul(Mt,br)|0,tt=Math.imul(Mt,Kr),pt=pt+Math.imul(de,Ce)|0,st=st+Math.imul(de,$t)|0,st=st+Math.imul(se,Ce)|0,tt=tt+Math.imul(se,$t)|0,pt=pt+Math.imul(Jt,Ct)|0,st=st+Math.imul(Jt,gt)|0,st=st+Math.imul(ge,Ct)|0,tt=tt+Math.imul(ge,gt)|0,pt=pt+Math.imul(Pt,Nt)|0,st=st+Math.imul(Pt,ee)|0,st=st+Math.imul(Wt,Nt)|0,tt=tt+Math.imul(Wt,ee)|0,pt=pt+Math.imul(ut,we)|0,st=st+Math.imul(ut,Ue)|0,st=st+Math.imul(wt,we)|0,tt=tt+Math.imul(wt,Ue)|0,pt=pt+Math.imul(it,ar)|0,st=st+Math.imul(it,Ar)|0,st=st+Math.imul(Y,ar)|0,tt=tt+Math.imul(Y,Ar)|0,pt=pt+Math.imul(rt,pr)|0,st=st+Math.imul(rt,Jr)|0,st=st+Math.imul(at,pr)|0,tt=tt+Math.imul(at,Jr)|0;var Mn=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Mn>>>26)|0,Mn&=67108863,pt=Math.imul(ve,br),st=Math.imul(ve,Kr),st=st+Math.imul(oe,br)|0,tt=Math.imul(oe,Kr),pt=pt+Math.imul(Lt,Ce)|0,st=st+Math.imul(Lt,$t)|0,st=st+Math.imul(Mt,Ce)|0,tt=tt+Math.imul(Mt,$t)|0,pt=pt+Math.imul(de,Ct)|0,st=st+Math.imul(de,gt)|0,st=st+Math.imul(se,Ct)|0,tt=tt+Math.imul(se,gt)|0,pt=pt+Math.imul(Jt,Nt)|0,st=st+Math.imul(Jt,ee)|0,st=st+Math.imul(ge,Nt)|0,tt=tt+Math.imul(ge,ee)|0,pt=pt+Math.imul(Pt,we)|0,st=st+Math.imul(Pt,Ue)|0,st=st+Math.imul(Wt,we)|0,tt=tt+Math.imul(Wt,Ue)|0,pt=pt+Math.imul(ut,ar)|0,st=st+Math.imul(ut,Ar)|0,st=st+Math.imul(wt,ar)|0,tt=tt+Math.imul(wt,Ar)|0,pt=pt+Math.imul(it,pr)|0,st=st+Math.imul(it,Jr)|0,st=st+Math.imul(Y,pr)|0,tt=tt+Math.imul(Y,Jr)|0,pt=pt+Math.imul(rt,Hn)|0,st=st+Math.imul(rt,Kn)|0,st=st+Math.imul(at,Hn)|0,tt=tt+Math.imul(at,Kn)|0;var ci=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(ci>>>26)|0,ci&=67108863,pt=Math.imul(He,br),st=Math.imul(He,Kr),st=st+Math.imul(Ge,br)|0,tt=Math.imul(Ge,Kr),pt=pt+Math.imul(ve,Ce)|0,st=st+Math.imul(ve,$t)|0,st=st+Math.imul(oe,Ce)|0,tt=tt+Math.imul(oe,$t)|0,pt=pt+Math.imul(Lt,Ct)|0,st=st+Math.imul(Lt,gt)|0,st=st+Math.imul(Mt,Ct)|0,tt=tt+Math.imul(Mt,gt)|0,pt=pt+Math.imul(de,Nt)|0,st=st+Math.imul(de,ee)|0,st=st+Math.imul(se,Nt)|0,tt=tt+Math.imul(se,ee)|0,pt=pt+Math.imul(Jt,we)|0,st=st+Math.imul(Jt,Ue)|0,st=st+Math.imul(ge,we)|0,tt=tt+Math.imul(ge,Ue)|0,pt=pt+Math.imul(Pt,ar)|0,st=st+Math.imul(Pt,Ar)|0,st=st+Math.imul(Wt,ar)|0,tt=tt+Math.imul(Wt,Ar)|0,pt=pt+Math.imul(ut,pr)|0,st=st+Math.imul(ut,Jr)|0,st=st+Math.imul(wt,pr)|0,tt=tt+Math.imul(wt,Jr)|0,pt=pt+Math.imul(it,Hn)|0,st=st+Math.imul(it,Kn)|0,st=st+Math.imul(Y,Hn)|0,tt=tt+Math.imul(Y,Kn)|0,pt=pt+Math.imul(rt,ii)|0,st=st+Math.imul(rt,qn)|0,st=st+Math.imul(at,ii)|0,tt=tt+Math.imul(at,qn)|0;var xi=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(xi>>>26)|0,xi&=67108863,pt=Math.imul(ur,br),st=Math.imul(ur,Kr),st=st+Math.imul(jr,br)|0,tt=Math.imul(jr,Kr),pt=pt+Math.imul(He,Ce)|0,st=st+Math.imul(He,$t)|0,st=st+Math.imul(Ge,Ce)|0,tt=tt+Math.imul(Ge,$t)|0,pt=pt+Math.imul(ve,Ct)|0,st=st+Math.imul(ve,gt)|0,st=st+Math.imul(oe,Ct)|0,tt=tt+Math.imul(oe,gt)|0,pt=pt+Math.imul(Lt,Nt)|0,st=st+Math.imul(Lt,ee)|0,st=st+Math.imul(Mt,Nt)|0,tt=tt+Math.imul(Mt,ee)|0,pt=pt+Math.imul(de,we)|0,st=st+Math.imul(de,Ue)|0,st=st+Math.imul(se,we)|0,tt=tt+Math.imul(se,Ue)|0,pt=pt+Math.imul(Jt,ar)|0,st=st+Math.imul(Jt,Ar)|0,st=st+Math.imul(ge,ar)|0,tt=tt+Math.imul(ge,Ar)|0,pt=pt+Math.imul(Pt,pr)|0,st=st+Math.imul(Pt,Jr)|0,st=st+Math.imul(Wt,pr)|0,tt=tt+Math.imul(Wt,Jr)|0,pt=pt+Math.imul(ut,Hn)|0,st=st+Math.imul(ut,Kn)|0,st=st+Math.imul(wt,Hn)|0,tt=tt+Math.imul(wt,Kn)|0,pt=pt+Math.imul(it,ii)|0,st=st+Math.imul(it,qn)|0,st=st+Math.imul(Y,ii)|0,tt=tt+Math.imul(Y,qn)|0,pt=pt+Math.imul(rt,Hi)|0,st=st+Math.imul(rt,We)|0,st=st+Math.imul(at,Hi)|0,tt=tt+Math.imul(at,We)|0;var Pi=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Pi>>>26)|0,Pi&=67108863,pt=Math.imul(ur,Ce),st=Math.imul(ur,$t),st=st+Math.imul(jr,Ce)|0,tt=Math.imul(jr,$t),pt=pt+Math.imul(He,Ct)|0,st=st+Math.imul(He,gt)|0,st=st+Math.imul(Ge,Ct)|0,tt=tt+Math.imul(Ge,gt)|0,pt=pt+Math.imul(ve,Nt)|0,st=st+Math.imul(ve,ee)|0,st=st+Math.imul(oe,Nt)|0,tt=tt+Math.imul(oe,ee)|0,pt=pt+Math.imul(Lt,we)|0,st=st+Math.imul(Lt,Ue)|0,st=st+Math.imul(Mt,we)|0,tt=tt+Math.imul(Mt,Ue)|0,pt=pt+Math.imul(de,ar)|0,st=st+Math.imul(de,Ar)|0,st=st+Math.imul(se,ar)|0,tt=tt+Math.imul(se,Ar)|0,pt=pt+Math.imul(Jt,pr)|0,st=st+Math.imul(Jt,Jr)|0,st=st+Math.imul(ge,pr)|0,tt=tt+Math.imul(ge,Jr)|0,pt=pt+Math.imul(Pt,Hn)|0,st=st+Math.imul(Pt,Kn)|0,st=st+Math.imul(Wt,Hn)|0,tt=tt+Math.imul(Wt,Kn)|0,pt=pt+Math.imul(ut,ii)|0,st=st+Math.imul(ut,qn)|0,st=st+Math.imul(wt,ii)|0,tt=tt+Math.imul(wt,qn)|0,pt=pt+Math.imul(it,Hi)|0,st=st+Math.imul(it,We)|0,st=st+Math.imul(Y,Hi)|0,tt=tt+Math.imul(Y,We)|0;var Di=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Di>>>26)|0,Di&=67108863,pt=Math.imul(ur,Ct),st=Math.imul(ur,gt),st=st+Math.imul(jr,Ct)|0,tt=Math.imul(jr,gt),pt=pt+Math.imul(He,Nt)|0,st=st+Math.imul(He,ee)|0,st=st+Math.imul(Ge,Nt)|0,tt=tt+Math.imul(Ge,ee)|0,pt=pt+Math.imul(ve,we)|0,st=st+Math.imul(ve,Ue)|0,st=st+Math.imul(oe,we)|0,tt=tt+Math.imul(oe,Ue)|0,pt=pt+Math.imul(Lt,ar)|0,st=st+Math.imul(Lt,Ar)|0,st=st+Math.imul(Mt,ar)|0,tt=tt+Math.imul(Mt,Ar)|0,pt=pt+Math.imul(de,pr)|0,st=st+Math.imul(de,Jr)|0,st=st+Math.imul(se,pr)|0,tt=tt+Math.imul(se,Jr)|0,pt=pt+Math.imul(Jt,Hn)|0,st=st+Math.imul(Jt,Kn)|0,st=st+Math.imul(ge,Hn)|0,tt=tt+Math.imul(ge,Kn)|0,pt=pt+Math.imul(Pt,ii)|0,st=st+Math.imul(Pt,qn)|0,st=st+Math.imul(Wt,ii)|0,tt=tt+Math.imul(Wt,qn)|0,pt=pt+Math.imul(ut,Hi)|0,st=st+Math.imul(ut,We)|0,st=st+Math.imul(wt,Hi)|0,tt=tt+Math.imul(wt,We)|0;var Zi=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Zi>>>26)|0,Zi&=67108863,pt=Math.imul(ur,Nt),st=Math.imul(ur,ee),st=st+Math.imul(jr,Nt)|0,tt=Math.imul(jr,ee),pt=pt+Math.imul(He,we)|0,st=st+Math.imul(He,Ue)|0,st=st+Math.imul(Ge,we)|0,tt=tt+Math.imul(Ge,Ue)|0,pt=pt+Math.imul(ve,ar)|0,st=st+Math.imul(ve,Ar)|0,st=st+Math.imul(oe,ar)|0,tt=tt+Math.imul(oe,Ar)|0,pt=pt+Math.imul(Lt,pr)|0,st=st+Math.imul(Lt,Jr)|0,st=st+Math.imul(Mt,pr)|0,tt=tt+Math.imul(Mt,Jr)|0,pt=pt+Math.imul(de,Hn)|0,st=st+Math.imul(de,Kn)|0,st=st+Math.imul(se,Hn)|0,tt=tt+Math.imul(se,Kn)|0,pt=pt+Math.imul(Jt,ii)|0,st=st+Math.imul(Jt,qn)|0,st=st+Math.imul(ge,ii)|0,tt=tt+Math.imul(ge,qn)|0,pt=pt+Math.imul(Pt,Hi)|0,st=st+Math.imul(Pt,We)|0,st=st+Math.imul(Wt,Hi)|0,tt=tt+Math.imul(Wt,We)|0;var ui=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(ui>>>26)|0,ui&=67108863,pt=Math.imul(ur,we),st=Math.imul(ur,Ue),st=st+Math.imul(jr,we)|0,tt=Math.imul(jr,Ue),pt=pt+Math.imul(He,ar)|0,st=st+Math.imul(He,Ar)|0,st=st+Math.imul(Ge,ar)|0,tt=tt+Math.imul(Ge,Ar)|0,pt=pt+Math.imul(ve,pr)|0,st=st+Math.imul(ve,Jr)|0,st=st+Math.imul(oe,pr)|0,tt=tt+Math.imul(oe,Jr)|0,pt=pt+Math.imul(Lt,Hn)|0,st=st+Math.imul(Lt,Kn)|0,st=st+Math.imul(Mt,Hn)|0,tt=tt+Math.imul(Mt,Kn)|0,pt=pt+Math.imul(de,ii)|0,st=st+Math.imul(de,qn)|0,st=st+Math.imul(se,ii)|0,tt=tt+Math.imul(se,qn)|0,pt=pt+Math.imul(Jt,Hi)|0,st=st+Math.imul(Jt,We)|0,st=st+Math.imul(ge,Hi)|0,tt=tt+Math.imul(ge,We)|0;var Pa=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Pa>>>26)|0,Pa&=67108863,pt=Math.imul(ur,ar),st=Math.imul(ur,Ar),st=st+Math.imul(jr,ar)|0,tt=Math.imul(jr,Ar),pt=pt+Math.imul(He,pr)|0,st=st+Math.imul(He,Jr)|0,st=st+Math.imul(Ge,pr)|0,tt=tt+Math.imul(Ge,Jr)|0,pt=pt+Math.imul(ve,Hn)|0,st=st+Math.imul(ve,Kn)|0,st=st+Math.imul(oe,Hn)|0,tt=tt+Math.imul(oe,Kn)|0,pt=pt+Math.imul(Lt,ii)|0,st=st+Math.imul(Lt,qn)|0,st=st+Math.imul(Mt,ii)|0,tt=tt+Math.imul(Mt,qn)|0,pt=pt+Math.imul(de,Hi)|0,st=st+Math.imul(de,We)|0,st=st+Math.imul(se,Hi)|0,tt=tt+Math.imul(se,We)|0;var Wa=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Wa>>>26)|0,Wa&=67108863,pt=Math.imul(ur,pr),st=Math.imul(ur,Jr),st=st+Math.imul(jr,pr)|0,tt=Math.imul(jr,Jr),pt=pt+Math.imul(He,Hn)|0,st=st+Math.imul(He,Kn)|0,st=st+Math.imul(Ge,Hn)|0,tt=tt+Math.imul(Ge,Kn)|0,pt=pt+Math.imul(ve,ii)|0,st=st+Math.imul(ve,qn)|0,st=st+Math.imul(oe,ii)|0,tt=tt+Math.imul(oe,qn)|0,pt=pt+Math.imul(Lt,Hi)|0,st=st+Math.imul(Lt,We)|0,st=st+Math.imul(Mt,Hi)|0,tt=tt+Math.imul(Mt,We)|0;var ze=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(ze>>>26)|0,ze&=67108863,pt=Math.imul(ur,Hn),st=Math.imul(ur,Kn),st=st+Math.imul(jr,Hn)|0,tt=Math.imul(jr,Kn),pt=pt+Math.imul(He,ii)|0,st=st+Math.imul(He,qn)|0,st=st+Math.imul(Ge,ii)|0,tt=tt+Math.imul(Ge,qn)|0,pt=pt+Math.imul(ve,Hi)|0,st=st+Math.imul(ve,We)|0,st=st+Math.imul(oe,Hi)|0,tt=tt+Math.imul(oe,We)|0;var Pe=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,pt=Math.imul(ur,ii),st=Math.imul(ur,qn),st=st+Math.imul(jr,ii)|0,tt=Math.imul(jr,qn),pt=pt+Math.imul(He,Hi)|0,st=st+Math.imul(He,We)|0,st=st+Math.imul(Ge,Hi)|0,tt=tt+Math.imul(Ge,We)|0;var Rr=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Rr>>>26)|0,Rr&=67108863,pt=Math.imul(ur,Hi),st=Math.imul(ur,We),st=st+Math.imul(jr,Hi)|0,tt=Math.imul(jr,We);var qr=(yt+pt|0)+((st&8191)<<13)|0;return yt=(tt+(st>>>13)|0)+(qr>>>26)|0,qr&=67108863,lt[0]=rr,lt[1]=fr,lt[2]=xr,lt[3]=Qr,lt[4]=Cn,lt[5]=wn,lt[6]=Mn,lt[7]=ci,lt[8]=xi,lt[9]=Pi,lt[10]=Di,lt[11]=Zi,lt[12]=ui,lt[13]=Pa,lt[14]=Wa,lt[15]=ze,lt[16]=Pe,lt[17]=Rr,lt[18]=qr,yt!==0&&(lt[19]=yt,W.length++),W};Math.imul||(M=C);function E(F,U,W){W.negative=U.negative^F.negative,W.length=F.length+U.length;for(var q=0,X=0,lt=0;lt>>26)|0,X+=yt>>>26,yt&=67108863}W.words[lt]=pt,q=yt,yt=X}return q!==0?W.words[lt]=q:W.length--,W.strip()}function A(F,U,W){var q=new h;return q.mulp(F,U,W)}s.prototype.mulTo=function(F,U){var W,q=this.length+F.length;return this.length===10&&F.length===10?W=M(this,F,U):q<63?W=C(this,F,U):q<1024?W=E(this,F,U):W=A(this,F,U),W};function h(F,U){this.x=F,this.y=U}h.prototype.makeRBT=function(F){for(var U=new Array(F),W=s.prototype._countBits(F)-1,q=0;q>=1;return q},h.prototype.permute=function(F,U,W,q,X,lt){for(var yt=0;yt>>1)X++;return 1<>>13,W[2*lt+1]=X&8191,X=X>>>13;for(lt=2*U;lt>=26,U+=q/67108864|0,U+=X>>>26,this.words[W]=X&67108863}return U!==0&&(this.words[W]=U,this.length++),this},s.prototype.muln=function(F){return this.clone().imuln(F)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(F){var U=_(F);if(U.length===0)return new s(1);for(var W=this,q=0;q=0);var U=F%26,W=(F-U)/26,q=67108863>>>26-U<<26-U,X;if(U!==0){var lt=0;for(X=0;X>>26-U}lt&&(this.words[X]=lt,this.length++)}if(W!==0){for(X=this.length-1;X>=0;X--)this.words[X+W]=this.words[X];for(X=0;X=0);var q;U?q=(U-U%26)/26:q=0;var X=F%26,lt=Math.min((F-X)/26,this.length),yt=67108863^67108863>>>X<lt)for(this.length-=lt,st=0;st=0&&(tt!==0||st>=q);st--){var dt=this.words[st]|0;this.words[st]=tt<<26-X|dt>>>X,tt=dt&yt}return pt&&tt!==0&&(pt.words[pt.length++]=tt),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(F,U,W){return o(this.negative===0),this.iushrn(F,U,W)},s.prototype.shln=function(F){return this.clone().ishln(F)},s.prototype.ushln=function(F){return this.clone().iushln(F)},s.prototype.shrn=function(F){return this.clone().ishrn(F)},s.prototype.ushrn=function(F){return this.clone().iushrn(F)},s.prototype.testn=function(F){o(typeof F=="number"&&F>=0);var U=F%26,W=(F-U)/26,q=1<=0);var U=F%26,W=(F-U)/26;if(o(this.negative===0,"imaskn works only with positive numbers"),this.length<=W)return this;if(U!==0&&W++,this.length=Math.min(W,this.length),U!==0){var q=67108863^67108863>>>U<=67108864;U++)this.words[U]-=67108864,U===this.length-1?this.words[U+1]=1:this.words[U+1]++;return this.length=Math.max(this.length,U+1),this},s.prototype.isubn=function(F){if(o(typeof F=="number"),o(F<67108864),F<0)return this.iaddn(-F);if(this.negative!==0)return this.negative=0,this.iaddn(F),this.negative=1,this;if(this.words[0]-=F,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var U=0;U>26)-(pt/67108864|0),this.words[X+W]=lt&67108863}for(;X>26,this.words[X+W]=lt&67108863;if(yt===0)return this.strip();for(o(yt===-1),yt=0,X=0;X>26,this.words[X]=lt&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(F,U){var W=this.length-F.length,q=this.clone(),X=F,lt=X.words[X.length-1]|0,yt=this._countBits(lt);W=26-yt,W!==0&&(X=X.ushln(W),q.iushln(W),lt=X.words[X.length-1]|0);var pt=q.length-X.length,st;if(U!=="mod"){st=new s(null),st.length=pt+1,st.words=new Array(st.length);for(var tt=0;tt=0;rt--){var at=(q.words[X.length+rt]|0)*67108864+(q.words[X.length+rt-1]|0);for(at=Math.min(at/lt|0,67108863),q._ishlnsubmul(X,at,rt);q.negative!==0;)at--,q.negative=0,q._ishlnsubmul(X,1,rt),q.isZero()||(q.negative^=1);st&&(st.words[rt]=at)}return st&&st.strip(),q.strip(),U!=="div"&&W!==0&&q.iushrn(W),{div:st||null,mod:q}},s.prototype.divmod=function(F,U,W){if(o(!F.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var q,X,lt;return this.negative!==0&&F.negative===0?(lt=this.neg().divmod(F,U),U!=="mod"&&(q=lt.div.neg()),U!=="div"&&(X=lt.mod.neg(),W&&X.negative!==0&&X.iadd(F)),{div:q,mod:X}):this.negative===0&&F.negative!==0?(lt=this.divmod(F.neg(),U),U!=="mod"&&(q=lt.div.neg()),{div:q,mod:lt.mod}):(this.negative&F.negative)!==0?(lt=this.neg().divmod(F.neg(),U),U!=="div"&&(X=lt.mod.neg(),W&&X.negative!==0&&X.isub(F)),{div:lt.div,mod:X}):F.length>this.length||this.cmp(F)<0?{div:new s(0),mod:this}:F.length===1?U==="div"?{div:this.divn(F.words[0]),mod:null}:U==="mod"?{div:null,mod:new s(this.modn(F.words[0]))}:{div:this.divn(F.words[0]),mod:new s(this.modn(F.words[0]))}:this._wordDiv(F,U)},s.prototype.div=function(F){return this.divmod(F,"div",!1).div},s.prototype.mod=function(F){return this.divmod(F,"mod",!1).mod},s.prototype.umod=function(F){return this.divmod(F,"mod",!0).mod},s.prototype.divRound=function(F){var U=this.divmod(F);if(U.mod.isZero())return U.div;var W=U.div.negative!==0?U.mod.isub(F):U.mod,q=F.ushrn(1),X=F.andln(1),lt=W.cmp(q);return lt<0||X===1&<===0?U.div:U.div.negative!==0?U.div.isubn(1):U.div.iaddn(1)},s.prototype.modn=function(F){o(F<=67108863);for(var U=67108864%F,W=0,q=this.length-1;q>=0;q--)W=(U*W+(this.words[q]|0))%F;return W},s.prototype.idivn=function(F){o(F<=67108863);for(var U=0,W=this.length-1;W>=0;W--){var q=(this.words[W]|0)+U*67108864;this.words[W]=q/F|0,U=q%F}return this.strip()},s.prototype.divn=function(F){return this.clone().idivn(F)},s.prototype.egcd=function(F){o(F.negative===0),o(!F.isZero());var U=this,W=F.clone();U.negative!==0?U=U.umod(F):U=U.clone();for(var q=new s(1),X=new s(0),lt=new s(0),yt=new s(1),pt=0;U.isEven()&&W.isEven();)U.iushrn(1),W.iushrn(1),++pt;for(var st=W.clone(),tt=U.clone();!U.isZero();){for(var dt=0,rt=1;(U.words[0]&rt)===0&&dt<26;++dt,rt<<=1);if(dt>0)for(U.iushrn(dt);dt-- >0;)(q.isOdd()||X.isOdd())&&(q.iadd(st),X.isub(tt)),q.iushrn(1),X.iushrn(1);for(var at=0,vt=1;(W.words[0]&vt)===0&&at<26;++at,vt<<=1);if(at>0)for(W.iushrn(at);at-- >0;)(lt.isOdd()||yt.isOdd())&&(lt.iadd(st),yt.isub(tt)),lt.iushrn(1),yt.iushrn(1);U.cmp(W)>=0?(U.isub(W),q.isub(lt),X.isub(yt)):(W.isub(U),lt.isub(q),yt.isub(X))}return{a:lt,b:yt,gcd:W.iushln(pt)}},s.prototype._invmp=function(F){o(F.negative===0),o(!F.isZero());var U=this,W=F.clone();U.negative!==0?U=U.umod(F):U=U.clone();for(var q=new s(1),X=new s(0),lt=W.clone();U.cmpn(1)>0&&W.cmpn(1)>0;){for(var yt=0,pt=1;(U.words[0]&pt)===0&&yt<26;++yt,pt<<=1);if(yt>0)for(U.iushrn(yt);yt-- >0;)q.isOdd()&&q.iadd(lt),q.iushrn(1);for(var st=0,tt=1;(W.words[0]&tt)===0&&st<26;++st,tt<<=1);if(st>0)for(W.iushrn(st);st-- >0;)X.isOdd()&&X.iadd(lt),X.iushrn(1);U.cmp(W)>=0?(U.isub(W),q.isub(X)):(W.isub(U),X.isub(q))}var dt;return U.cmpn(1)===0?dt=q:dt=X,dt.cmpn(0)<0&&dt.iadd(F),dt},s.prototype.gcd=function(F){if(this.isZero())return F.abs();if(F.isZero())return this.abs();var U=this.clone(),W=F.clone();U.negative=0,W.negative=0;for(var q=0;U.isEven()&&W.isEven();q++)U.iushrn(1),W.iushrn(1);do{for(;U.isEven();)U.iushrn(1);for(;W.isEven();)W.iushrn(1);var X=U.cmp(W);if(X<0){var lt=U;U=W,W=lt}else if(X===0||W.cmpn(1)===0)break;U.isub(W)}while(!0);return W.iushln(q)},s.prototype.invm=function(F){return this.egcd(F).a.umod(F)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(F){return this.words[0]&F},s.prototype.bincn=function(F){o(typeof F=="number");var U=F%26,W=(F-U)/26,q=1<>>26,yt&=67108863,this.words[lt]=yt}return X!==0&&(this.words[lt]=X,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(F){var U=F<0;if(this.negative!==0&&!U)return-1;if(this.negative===0&&U)return 1;this.strip();var W;if(this.length>1)W=1;else{U&&(F=-F),o(F<=67108863,"Number is too big");var q=this.words[0]|0;W=q===F?0:qF.length)return 1;if(this.length=0;W--){var q=this.words[W]|0,X=F.words[W]|0;if(q!==X){qX&&(U=1);break}}return U},s.prototype.gtn=function(F){return this.cmpn(F)===1},s.prototype.gt=function(F){return this.cmp(F)===1},s.prototype.gten=function(F){return this.cmpn(F)>=0},s.prototype.gte=function(F){return this.cmp(F)>=0},s.prototype.ltn=function(F){return this.cmpn(F)===-1},s.prototype.lt=function(F){return this.cmp(F)===-1},s.prototype.lten=function(F){return this.cmpn(F)<=0},s.prototype.lte=function(F){return this.cmp(F)<=0},s.prototype.eqn=function(F){return this.cmpn(F)===0},s.prototype.eq=function(F){return this.cmp(F)===0},s.red=function(F){return new V(F)},s.prototype.toRed=function(F){return o(!this.red,"Already a number in reduction context"),o(this.negative===0,"red works only with positives"),F.convertTo(this)._forceRed(F)},s.prototype.fromRed=function(){return o(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(F){return this.red=F,this},s.prototype.forceRed=function(F){return o(!this.red,"Already a number in reduction context"),this._forceRed(F)},s.prototype.redAdd=function(F){return o(this.red,"redAdd works only with red numbers"),this.red.add(this,F)},s.prototype.redIAdd=function(F){return o(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,F)},s.prototype.redSub=function(F){return o(this.red,"redSub works only with red numbers"),this.red.sub(this,F)},s.prototype.redISub=function(F){return o(this.red,"redISub works only with red numbers"),this.red.isub(this,F)},s.prototype.redShl=function(F){return o(this.red,"redShl works only with red numbers"),this.red.shl(this,F)},s.prototype.redMul=function(F){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,F),this.red.mul(this,F)},s.prototype.redIMul=function(F){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,F),this.red.imul(this,F)},s.prototype.redSqr=function(){return o(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return o(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return o(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return o(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return o(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(F){return o(this.red&&!F.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,F)};var p={k256:null,p224:null,p192:null,p25519:null};function k(F,U){this.name=F,this.p=new s(U,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}k.prototype._tmp=function(){var F=new s(null);return F.words=new Array(Math.ceil(this.n/13)),F},k.prototype.ireduce=function(F){var U=F,W;do this.split(U,this.tmp),U=this.imulK(U),U=U.iadd(this.tmp),W=U.bitLength();while(W>this.n);var q=W0?U.isub(this.p):U.strip!==void 0?U.strip():U._strip(),U},k.prototype.split=function(F,U){F.iushrn(this.n,0,U)},k.prototype.imulK=function(F){return F.imul(this.k)};function w(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(w,k),w.prototype.split=function(F,U){for(var W=4194303,q=Math.min(F.length,9),X=0;X>>22,lt=yt}lt>>>=22,F.words[X-10]=lt,lt===0&&F.length>10?F.length-=10:F.length-=9},w.prototype.imulK=function(F){F.words[F.length]=0,F.words[F.length+1]=0,F.length+=2;for(var U=0,W=0;W>>=26,F.words[W]=X,U=q}return U!==0&&(F.words[F.length++]=U),F},s._prime=function(F){if(p[F])return p[F];var U;if(F==="k256")U=new w;else if(F==="p224")U=new R;else if(F==="p192")U=new O;else if(F==="p25519")U=new N;else throw new Error("Unknown prime "+F);return p[F]=U,U};function V(F){if(typeof F=="string"){var U=s._prime(F);this.m=U.p,this.prime=U}else o(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}V.prototype._verify1=function(F){o(F.negative===0,"red works only with positives"),o(F.red,"red works only with red numbers")},V.prototype._verify2=function(F,U){o((F.negative|U.negative)===0,"red works only with positives"),o(F.red&&F.red===U.red,"red works only with red numbers")},V.prototype.imod=function(F){return this.prime?this.prime.ireduce(F)._forceRed(this):F.umod(this.m)._forceRed(this)},V.prototype.neg=function(F){return F.isZero()?F.clone():this.m.sub(F)._forceRed(this)},V.prototype.add=function(F,U){this._verify2(F,U);var W=F.add(U);return W.cmp(this.m)>=0&&W.isub(this.m),W._forceRed(this)},V.prototype.iadd=function(F,U){this._verify2(F,U);var W=F.iadd(U);return W.cmp(this.m)>=0&&W.isub(this.m),W},V.prototype.sub=function(F,U){this._verify2(F,U);var W=F.sub(U);return W.cmpn(0)<0&&W.iadd(this.m),W._forceRed(this)},V.prototype.isub=function(F,U){this._verify2(F,U);var W=F.isub(U);return W.cmpn(0)<0&&W.iadd(this.m),W},V.prototype.shl=function(F,U){return this._verify1(F),this.imod(F.ushln(U))},V.prototype.imul=function(F,U){return this._verify2(F,U),this.imod(F.imul(U))},V.prototype.mul=function(F,U){return this._verify2(F,U),this.imod(F.mul(U))},V.prototype.isqr=function(F){return this.imul(F,F.clone())},V.prototype.sqr=function(F){return this.mul(F,F)},V.prototype.sqrt=function(F){if(F.isZero())return F.clone();var U=this.m.andln(3);if(o(U%2===1),U===3){var W=this.m.add(new s(1)).iushrn(2);return this.pow(F,W)}for(var q=this.m.subn(1),X=0;!q.isZero()&&q.andln(1)===0;)X++,q.iushrn(1);o(!q.isZero());var lt=new s(1).toRed(this),yt=lt.redNeg(),pt=this.m.subn(1).iushrn(1),st=this.m.bitLength();for(st=new s(2*st*st).toRed(this);this.pow(st,pt).cmp(yt)!==0;)st.redIAdd(yt);for(var tt=this.pow(st,q),dt=this.pow(F,q.addn(1).iushrn(1)),rt=this.pow(F,q),at=X;rt.cmp(lt)!==0;){for(var vt=rt,it=0;vt.cmp(lt)!==0;it++)vt=vt.redSqr();o(it=0;X--){for(var tt=U.words[X],dt=st-1;dt>=0;dt--){var rt=tt>>dt&1;if(lt!==q[0]&&(lt=this.sqr(lt)),rt===0&&yt===0){pt=0;continue}yt<<=1,yt|=rt,pt++,!(pt!==W&&(X!==0||dt!==0))&&(lt=this.mul(lt,q[yt]),pt=0,yt=0)}st=26}return lt},V.prototype.convertTo=function(F){var U=F.umod(this.m);return U===F?U.clone():U},V.prototype.convertFrom=function(F){var U=F.clone();return U.red=null,U},s.mont=function(F){return new H(F)};function H(F){V.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(H,V),H.prototype.convertTo=function(F){return this.imod(F.ushln(this.shift))},H.prototype.convertFrom=function(F){var U=this.imod(F.mul(this.rinv));return U.red=null,U},H.prototype.imul=function(F,U){if(F.isZero()||U.isZero())return F.words[0]=0,F.length=1,F;var W=F.imul(U),q=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),X=W.isub(q).iushrn(this.shift),lt=X;return X.cmp(this.m)>=0?lt=X.isub(this.m):X.cmpn(0)<0&&(lt=X.iadd(this.m)),lt._forceRed(this)},H.prototype.mul=function(F,U){if(F.isZero()||U.isZero())return new s(0)._forceRed(this);var W=F.mul(U),q=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),X=W.isub(q).iushrn(this.shift),lt=X;return X.cmp(this.m)>=0?lt=X.isub(this.m):X.cmpn(0)<0&&(lt=X.iadd(this.m)),lt._forceRed(this)},H.prototype.invm=function(F){var U=this.imod(F._invmp(this.m).mul(this.r2));return U._forceRed(this)}}(t,this)},6860:function(t){t.exports=e;function e(r,a,n){return r[0]=a[0]-n[0],r[1]=a[1]-n[1],r[2]=a[2]-n[2],r[3]=a[3]-n[3],r}},6864:function(t){t.exports=e;function e(){var r=new Float32Array(16);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},6867:function(t,e,r){t.exports=u;var a=r(1888),n=r(855),o=r(7150);function i(b,_){for(var C=0;C>>1;if(!(h<=0)){var p,k=a.mallocDouble(2*h*E),w=a.mallocInt32(E);if(E=s(b,h,k,w),E>0){if(h===1&&M)n.init(E),p=n.sweepComplete(h,C,0,E,k,w,0,E,k,w);else{var R=a.mallocDouble(2*h*A),O=a.mallocInt32(A);A=s(_,h,R,O),A>0&&(n.init(E+A),h===1?p=n.sweepBipartite(h,C,0,E,k,w,0,A,R,O):p=o(h,C,M,E,k,w,A,R,O),a.free(R),a.free(O))}a.free(k),a.free(w)}return p}}}var x;function y(b,_){x.push([b,_])}function v(b){return x=[],f(b,b,y,!0),x}function T(b,_){return x=[],f(b,_,y,!1),x}function u(b,_,C){switch(arguments.length){case 1:return v(b);case 2:return typeof _=="function"?f(b,b,_,!0):T(b,_);case 3:return f(b,_,C,!1);default:throw new Error("box-intersect: Invalid arguments")}}},6894:function(t){t.exports=e;function e(r,a,n,o){var i=n[1],s=n[2],f=a[1]-i,x=a[2]-s,y=Math.sin(o),v=Math.cos(o);return r[0]=a[0],r[1]=i+f*v-x*y,r[2]=s+f*y+x*v,r}},7004:function(t){t.exports=e;function e(r){for(var a=r.length,n=r[r.length-1],o=a,i=a-2;i>=0;--i){var s=n,f=r[i];n=s+f;var x=n-s,y=f-x;y&&(r[--o]=n,n=y)}for(var v=0,i=o;i=p0)&&!(p1>=hi)"),_=y("lo===p0"),C=y("lo0;){dt-=1;var vt=dt*h,it=w[vt],Y=w[vt+1],ft=w[vt+2],ut=w[vt+3],wt=w[vt+4],zt=w[vt+5],Pt=dt*p,Wt=R[Pt],Ht=R[Pt+1],Jt=zt&1,ge=!!(zt&16),he=lt,de=yt,se=st,Tt=tt;if(Jt&&(he=st,de=tt,se=lt,Tt=yt),!(zt&2&&(ft=C(U,it,Y,ft,he,de,Ht),Y>=ft))&&!(zt&4&&(Y=M(U,it,Y,ft,he,de,Wt),Y>=ft))){var Lt=ft-Y,Mt=wt-ut;if(ge){if(U*Lt*(Lt+Mt)"u"?r(1538):WeakMap,n=r(2762),o=r(8116),i=new a;function s(f){var x=i.get(f),y=x&&(x._triangleBuffer.handle||x._triangleBuffer.buffer);if(!y||!f.isBuffer(y)){var v=n(f,new Float32Array([-1,-1,-1,4,4,-1]));x=o(f,[{buffer:v,type:f.FLOAT,size:2}]),x._triangleBuffer=v,i.set(f,x)}x.bind(),f.drawArrays(f.TRIANGLES,0,3),x.unbind()}t.exports=s},7182:function(t,e,r){var a={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)};a.create();var n=a.create();t.exports=function(o,i,s,f,x,y){return a.identity(o),a.fromRotationTranslation(o,y,i),o[3]=x[0],o[7]=x[1],o[11]=x[2],o[15]=x[3],a.identity(n),f[2]!==0&&(n[9]=f[2],a.multiply(o,o,n)),f[1]!==0&&(n[9]=0,n[8]=f[1],a.multiply(o,o,n)),f[0]!==0&&(n[8]=0,n[4]=f[0],a.multiply(o,o,n)),a.scale(o,o,s),o}},7201:function(t,e,r){var a=1e-6,n=1e-6,o=r(9405),i=r(2762),s=r(8116),f=r(7766),x=r(8406),y=r(6760),v=r(7608),T=r(9618),u=r(6729),b=r(7765),_=r(1888),C=r(840),M=r(7626),E=C.meshShader,A=C.wireShader,h=C.pointShader,p=C.pickShader,k=C.pointPickShader,w=C.contourShader,R=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function O(st,tt,dt,rt,at,vt,it,Y,ft,ut,wt,zt,Pt,Wt,Ht,Jt,ge,he,de,se,Tt,Lt,Mt,te,ve,oe,Te){this.gl=st,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=tt,this.dirty=!0,this.triShader=dt,this.lineShader=rt,this.pointShader=at,this.pickShader=vt,this.pointPickShader=it,this.contourShader=Y,this.trianglePositions=ft,this.triangleColors=wt,this.triangleNormals=Pt,this.triangleUVs=zt,this.triangleIds=ut,this.triangleVAO=Wt,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Ht,this.edgeColors=ge,this.edgeUVs=he,this.edgeIds=Jt,this.edgeVAO=de,this.edgeCount=0,this.pointPositions=se,this.pointColors=Lt,this.pointUVs=Mt,this.pointSizes=te,this.pointIds=Tt,this.pointVAO=ve,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=oe,this.contourVAO=Te,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=R,this._view=R,this._projection=R,this._resolution=[1,1]}var N=O.prototype;N.isOpaque=function(){return!this.hasAlpha},N.isTransparent=function(){return this.hasAlpha},N.pickSlots=1,N.setPickBase=function(st){this.pickId=st};function V(st,tt){if(!tt||!tt.length)return 1;for(var dt=0;dtst&&dt>0){var rt=(tt[dt][0]-st)/(tt[dt][0]-tt[dt-1][0]);return tt[dt][1]*(1-rt)+rt*tt[dt-1][1]}}return 1}function H(st,tt){for(var dt=u({colormap:st,nshades:256,format:"rgba"}),rt=new Uint8Array(1024),at=0;at<256;++at){for(var vt=dt[at],it=0;it<3;++it)rt[4*at+it]=vt[it];tt?rt[4*at+3]=255*V(at/255,tt):rt[4*at+3]=255*vt[3]}return T(rt,[256,256,4],[4,0,1])}function F(st){for(var tt=st.length,dt=new Array(tt),rt=0;rt0){var Pt=this.triShader;Pt.bind(),Pt.uniforms=Y,this.triangleVAO.bind(),tt.drawArrays(tt.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Pt=this.lineShader;Pt.bind(),Pt.uniforms=Y,this.edgeVAO.bind(),tt.lineWidth(this.lineWidth*this.pixelRatio),tt.drawArrays(tt.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Pt=this.pointShader;Pt.bind(),Pt.uniforms=Y,this.pointVAO.bind(),tt.drawArrays(tt.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Pt=this.contourShader;Pt.bind(),Pt.uniforms=Y,this.contourVAO.bind(),tt.drawArrays(tt.LINES,0,this.contourCount),this.contourVAO.unbind()}},N.drawPick=function(st){st=st||{};for(var tt=this.gl,dt=st.model||R,rt=st.view||R,at=st.projection||R,vt=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],it=0;it<3;++it)vt[0][it]=Math.max(vt[0][it],this.clipBounds[0][it]),vt[1][it]=Math.min(vt[1][it],this.clipBounds[1][it]);this._model=[].slice.call(dt),this._view=[].slice.call(rt),this._projection=[].slice.call(at),this._resolution=[tt.drawingBufferWidth,tt.drawingBufferHeight];var Y={model:dt,view:rt,projection:at,clipBounds:vt,pickId:this.pickId/255},ft=this.pickShader;if(ft.bind(),ft.uniforms=Y,this.triangleCount>0&&(this.triangleVAO.bind(),tt.drawArrays(tt.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),tt.lineWidth(this.lineWidth*this.pixelRatio),tt.drawArrays(tt.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ft=this.pointPickShader;ft.bind(),ft.uniforms=Y,this.pointVAO.bind(),tt.drawArrays(tt.POINTS,0,this.pointCount),this.pointVAO.unbind()}},N.pick=function(st){if(!st||st.id!==this.pickId)return null;for(var tt=st.value[0]+256*st.value[1]+65536*st.value[2],dt=this.cells[tt],rt=this.positions,at=new Array(dt.length),vt=0;vtMath.max(E,A)?h[2]=1:E>Math.max(M,A)?h[0]=1:h[1]=1;for(var p=0,k=0,w=0;w<3;++w)p+=C[w]*C[w],k+=h[w]*C[w];for(var w=0;w<3;++w)h[w]-=k/p*C[w];return s(h,h),h}function T(C,M,E,A,h,p,k,w){this.center=a(E),this.up=a(A),this.right=a(h),this.radius=a([p]),this.angle=a([k,w]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(C,M),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var R=0;R<16;++R)this.computedMatrix[R]=.5;this.recalcMatrix(0)}var u=T.prototype;u.setDistanceLimits=function(C,M){C>0?C=Math.log(C):C=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,C),this.radius.bounds[0][0]=C,this.radius.bounds[1][0]=M},u.getDistanceLimits=function(C){var M=this.radius.bounds[0];return C?(C[0]=Math.exp(M[0][0]),C[1]=Math.exp(M[1][0]),C):[Math.exp(M[0][0]),Math.exp(M[1][0])]},u.recalcMatrix=function(C){this.center.curve(C),this.up.curve(C),this.right.curve(C),this.radius.curve(C),this.angle.curve(C);for(var M=this.computedUp,E=this.computedRight,A=0,h=0,p=0;p<3;++p)h+=M[p]*E[p],A+=M[p]*M[p];for(var k=Math.sqrt(A),w=0,p=0;p<3;++p)E[p]-=M[p]*h/A,w+=E[p]*E[p],M[p]/=k;for(var R=Math.sqrt(w),p=0;p<3;++p)E[p]/=R;var O=this.computedToward;i(O,M,E),s(O,O);for(var N=Math.exp(this.computedRadius[0]),V=this.computedAngle[0],H=this.computedAngle[1],F=Math.cos(V),U=Math.sin(V),W=Math.cos(H),q=Math.sin(H),X=this.computedCenter,lt=F*W,yt=U*W,pt=q,st=-F*q,tt=-U*q,dt=W,rt=this.computedEye,at=this.computedMatrix,p=0;p<3;++p){var vt=lt*E[p]+yt*O[p]+pt*M[p];at[4*p+1]=st*E[p]+tt*O[p]+dt*M[p],at[4*p+2]=vt,at[4*p+3]=0}var it=at[1],Y=at[5],ft=at[9],ut=at[2],wt=at[6],zt=at[10],Pt=Y*zt-ft*wt,Wt=ft*ut-it*zt,Ht=it*wt-Y*ut,Jt=x(Pt,Wt,Ht);Pt/=Jt,Wt/=Jt,Ht/=Jt,at[0]=Pt,at[4]=Wt,at[8]=Ht;for(var p=0;p<3;++p)rt[p]=X[p]+at[2+4*p]*N;for(var p=0;p<3;++p){for(var w=0,ge=0;ge<3;++ge)w+=at[p+4*ge]*rt[ge];at[12+p]=-w}at[15]=1},u.getMatrix=function(C,M){this.recalcMatrix(C);var E=this.computedMatrix;if(M){for(var A=0;A<16;++A)M[A]=E[A];return M}return E};var b=[0,0,0];u.rotate=function(C,M,E,A){if(this.angle.move(C,M,E),A){this.recalcMatrix(C);var h=this.computedMatrix;b[0]=h[2],b[1]=h[6],b[2]=h[10];for(var p=this.computedUp,k=this.computedRight,w=this.computedToward,R=0;R<3;++R)h[4*R]=p[R],h[4*R+1]=k[R],h[4*R+2]=w[R];o(h,h,A,b);for(var R=0;R<3;++R)p[R]=h[4*R],k[R]=h[4*R+1];this.up.set(C,p[0],p[1],p[2]),this.right.set(C,k[0],k[1],k[2])}},u.pan=function(C,M,E,A){M=M||0,E=E||0,A=A||0,this.recalcMatrix(C);var h=this.computedMatrix;Math.exp(this.computedRadius[0]);var p=h[1],k=h[5],w=h[9],R=x(p,k,w);p/=R,k/=R,w/=R;var O=h[0],N=h[4],V=h[8],H=O*p+N*k+V*w;O-=p*H,N-=k*H,V-=w*H;var F=x(O,N,V);O/=F,N/=F,V/=F;var U=O*M+p*E,W=N*M+k*E,q=V*M+w*E;this.center.move(C,U,W,q);var X=Math.exp(this.computedRadius[0]);X=Math.max(1e-4,X+A),this.radius.set(C,Math.log(X))},u.translate=function(C,M,E,A){this.center.move(C,M||0,E||0,A||0)},u.setMatrix=function(C,M,E,A){var h=1;typeof E=="number"&&(h=E|0),(h<0||h>3)&&(h=1);var p=(h+2)%3;M||(this.recalcMatrix(C),M=this.computedMatrix);var k=M[h],w=M[h+4],R=M[h+8];if(A){var O=Math.abs(k),N=Math.abs(w),V=Math.abs(R),H=Math.max(O,N,V);O===H?(k=k<0?-1:1,w=R=0):V===H?(R=R<0?-1:1,k=w=0):(w=w<0?-1:1,k=R=0)}else{var F=x(k,w,R);k/=F,w/=F,R/=F}var U=M[p],W=M[p+4],q=M[p+8],X=U*k+W*w+q*R;U-=k*X,W-=w*X,q-=R*X;var lt=x(U,W,q);U/=lt,W/=lt,q/=lt;var yt=w*q-R*W,pt=R*U-k*q,st=k*W-w*U,tt=x(yt,pt,st);yt/=tt,pt/=tt,st/=tt,this.center.jump(C,Tt,Lt,Mt),this.radius.idle(C),this.up.jump(C,k,w,R),this.right.jump(C,U,W,q);var dt,rt;if(h===2){var at=M[1],vt=M[5],it=M[9],Y=at*U+vt*W+it*q,ft=at*yt+vt*pt+it*st;Pt<0?dt=-Math.PI/2:dt=Math.PI/2,rt=Math.atan2(ft,Y)}else{var ut=M[2],wt=M[6],zt=M[10],Pt=ut*k+wt*w+zt*R,Wt=ut*U+wt*W+zt*q,Ht=ut*yt+wt*pt+zt*st;dt=Math.asin(y(Pt)),rt=Math.atan2(Ht,Wt)}this.angle.jump(C,rt,dt),this.recalcMatrix(C);var Jt=M[2],ge=M[6],he=M[10],de=this.computedMatrix;n(de,M);var se=de[15],Tt=de[12]/se,Lt=de[13]/se,Mt=de[14]/se,te=Math.exp(this.computedRadius[0]);this.center.jump(C,Tt-Jt*te,Lt-ge*te,Mt-he*te)},u.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},u.idle=function(C){this.center.idle(C),this.up.idle(C),this.right.idle(C),this.radius.idle(C),this.angle.idle(C)},u.flush=function(C){this.center.flush(C),this.up.flush(C),this.right.flush(C),this.radius.flush(C),this.angle.flush(C)},u.setDistance=function(C,M){M>0&&this.radius.set(C,Math.log(M))},u.lookAt=function(C,M,E,A){this.recalcMatrix(C),M=M||this.computedEye,E=E||this.computedCenter,A=A||this.computedUp;var h=A[0],p=A[1],k=A[2],w=x(h,p,k);if(!(w<1e-6)){h/=w,p/=w,k/=w;var R=M[0]-E[0],O=M[1]-E[1],N=M[2]-E[2],V=x(R,O,N);if(!(V<1e-6)){R/=V,O/=V,N/=V;var H=this.computedRight,F=H[0],U=H[1],W=H[2],q=h*F+p*U+k*W;F-=q*h,U-=q*p,W-=q*k;var X=x(F,U,W);if(!(X<.01&&(F=p*N-k*O,U=k*R-h*N,W=h*O-p*R,X=x(F,U,W),X<1e-6))){F/=X,U/=X,W/=X,this.up.set(C,h,p,k),this.right.set(C,F,U,W),this.center.set(C,E[0],E[1],E[2]),this.radius.set(C,Math.log(V));var lt=p*W-k*U,yt=k*F-h*W,pt=h*U-p*F,st=x(lt,yt,pt);lt/=st,yt/=st,pt/=st;var tt=h*R+p*O+k*N,dt=F*R+U*O+W*N,rt=lt*R+yt*O+pt*N,at=Math.asin(y(tt)),vt=Math.atan2(rt,dt),it=this.angle._state,Y=it[it.length-1],ft=it[it.length-2];Y=Y%(2*Math.PI);var ut=Math.abs(Y+2*Math.PI-vt),wt=Math.abs(Y-vt),zt=Math.abs(Y-2*Math.PI-vt);ut max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform sampler2D dashTexture; +uniform float dashScale; +uniform float opacity; + +varying vec3 worldPosition; +varying float pixelArcLength; +varying vec4 fragColor; + +void main() { + if ( + outOfRange(clipBounds[0], clipBounds[1], worldPosition) || + fragColor.a * opacity == 0. + ) discard; + + float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r; + if(dashWeight < 0.5) { + discard; + } + gl_FragColor = fragColor * opacity; +} +`]),s=a([`precision highp float; +#define GLSLIFY 1 + +#define FLOAT_MAX 1.70141184e38 +#define FLOAT_MIN 1.17549435e-38 + +// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl +vec4 packFloat(float v) { + float av = abs(v); + + //Handle special cases + if(av < FLOAT_MIN) { + return vec4(0.0, 0.0, 0.0, 0.0); + } else if(v > FLOAT_MAX) { + return vec4(127.0, 128.0, 0.0, 0.0) / 255.0; + } else if(v < -FLOAT_MAX) { + return vec4(255.0, 128.0, 0.0, 0.0) / 255.0; + } + + vec4 c = vec4(0,0,0,0); + + //Compute exponent and mantissa + float e = floor(log2(av)); + float m = av * pow(2.0, -e) - 1.0; + + //Unpack mantissa + c[1] = floor(128.0 * m); + m -= c[1] / 128.0; + c[2] = floor(32768.0 * m); + m -= c[2] / 32768.0; + c[3] = floor(8388608.0 * m); + + //Unpack exponent + float ebias = e + 127.0; + c[0] = floor(ebias / 2.0); + ebias -= c[0] * 2.0; + c[1] += floor(ebias) * 128.0; + + //Unpack sign bit + c[0] += 128.0 * step(0.0, -v); + + //Scale back to range + return c / 255.0; +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform float pickId; +uniform vec3 clipBounds[2]; + +varying vec3 worldPosition; +varying float pixelArcLength; +varying vec4 fragColor; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard; + + gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz); +}`]),f=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];e.createShader=function(x){return n(x,o,i,null,f)},e.createPickShader=function(x){return n(x,o,s,null,f)}},7352:function(t,e,r){var a=r(5721),n=r(4750),o=r(2690);t.exports=i;function i(s){var f=s.length;if(f===0)return[];if(f===1)return[[0]];var x=s[0].length;return x===0?[]:x===1?a(s):x===2?n(s):o(s,x)}},7399:function(t){t.exports=e;function e(r,a){var n=a[0],o=a[1],i=a[2],s=a[3],f=n+n,x=o+o,y=i+i,v=n*f,T=o*f,u=o*x,b=i*f,_=i*x,C=i*y,M=s*f,E=s*x,A=s*y;return r[0]=1-u-C,r[1]=T+A,r[2]=b-E,r[3]=0,r[4]=T-A,r[5]=1-v-C,r[6]=_+M,r[7]=0,r[8]=b+E,r[9]=_-M,r[10]=1-v-u,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7417:function(t){t.exports=e;function e(r,a,n){return r[0]=Math.max(a[0],n[0]),r[1]=Math.max(a[1],n[1]),r[2]=Math.max(a[2],n[2]),r}},7442:function(t,e,r){var a=r(6658),n=r(7182),o=r(2652),i=r(9921),s=r(8648),f=T(),x=T(),y=T();t.exports=v;function v(_,C,M,E){if(i(C)===0||i(M)===0)return!1;var A=o(C,f.translate,f.scale,f.skew,f.perspective,f.quaternion),h=o(M,x.translate,x.scale,x.skew,x.perspective,x.quaternion);return!A||!h?!1:(a(y.translate,f.translate,x.translate,E),a(y.skew,f.skew,x.skew,E),a(y.scale,f.scale,x.scale,E),a(y.perspective,f.perspective,x.perspective,E),s(y.quaternion,f.quaternion,x.quaternion,E),n(_,y.translate,y.scale,y.skew,y.perspective,y.quaternion),!0)}function T(){return{translate:u(),scale:u(1),skew:u(),perspective:b(),quaternion:b()}}function u(_){return[_||0,_||0,_||0]}function b(){return[0,0,0,1]}},7507:function(t,e){e.byteLength=x,e.toByteArray=v,e.fromByteArray=b;for(var r=[],a=[],n=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,s=o.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var M=_.indexOf("=");M===-1&&(M=C);var E=M===C?0:4-M%4;return[M,E]}function x(_){var C=f(_),M=C[0],E=C[1];return(M+E)*3/4-E}function y(_,C,M){return(C+M)*3/4-M}function v(_){var C,M=f(_),E=M[0],A=M[1],h=new n(y(_,E,A)),p=0,k=A>0?E-4:E,w;for(w=0;w>16&255,h[p++]=C>>8&255,h[p++]=C&255;return A===2&&(C=a[_.charCodeAt(w)]<<2|a[_.charCodeAt(w+1)]>>4,h[p++]=C&255),A===1&&(C=a[_.charCodeAt(w)]<<10|a[_.charCodeAt(w+1)]<<4|a[_.charCodeAt(w+2)]>>2,h[p++]=C>>8&255,h[p++]=C&255),h}function T(_){return r[_>>18&63]+r[_>>12&63]+r[_>>6&63]+r[_&63]}function u(_,C,M){for(var E,A=[],h=C;hk?k:p+h));return E===1?(C=_[M-1],A.push(r[C>>2]+r[C<<4&63]+"==")):E===2&&(C=(_[M-2]<<8)+_[M-1],A.push(r[C>>10]+r[C>>4&63]+r[C<<2&63]+"=")),A.join("")}},7518:function(t,e,r){var a=r(1433);function n(s,f,x,y,v,T){this.location=s,this.dimension=f,this.a=x,this.b=y,this.c=v,this.d=T}n.prototype.bind=function(s){switch(this.dimension){case 1:s.vertexAttrib1f(this.location,this.a);break;case 2:s.vertexAttrib2f(this.location,this.a,this.b);break;case 3:s.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:s.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function o(s,f,x){this.gl=s,this._ext=f,this.handle=x,this._attribs=[],this._useElements=!1,this._elementsType=s.UNSIGNED_SHORT}o.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var s=0;s1.0001)return null;w+=k[M]}return Math.abs(w-1)>.001?null:[E,f(y,k),k]}},7636:function(t){t.exports=e;function e(r,a){a=a||1;var n=Math.random()*2*Math.PI,o=Math.random()*2-1,i=Math.sqrt(1-o*o)*a;return r[0]=Math.cos(n)*i,r[1]=Math.sin(n)*i,r[2]=o*a,r}},7640:function(t,e,r){var a=r(1888);function n(v){switch(v){case"uint32":return[a.mallocUint32,a.freeUint32];default:return null}}var o={"uint32,1,0":function(v,T){return function(u,b,_,C,M,E,A,h,p,k,w){var R,O,N,V=u*M+C,H,F=v(h),U,W,q,X;for(R=u+1;R<=b;++R){for(O=R,V+=M,N=V,U=0,W=V,H=0;Hu;){U=0,W=N-M;e:for(H=0;HX)break e;W+=k,U+=w}for(U=N,W=N-M,H=0;H>1,U=F-N,W=F+N,q=V,X=U,lt=F,yt=W,pt=H,st=_+1,tt=C-1,dt=!0,rt,at,vt,it,Y,ft,ut,wt,zt,Pt=0,Wt=0,Ht=0,Jt,ge,he,de,se,Tt,Lt,Mt,te,ve,oe,Te,He,Ge,cr,ur,jr=k,Hr=T(jr),br=T(jr);ge=A*q,he=A*X,ur=E;t:for(Jt=0;Jt0){at=q,q=X,X=at;break t}if(Ht<0)break t;ur+=R}ge=A*yt,he=A*pt,ur=E;t:for(Jt=0;Jt0){at=yt,yt=pt,pt=at;break t}if(Ht<0)break t;ur+=R}ge=A*q,he=A*lt,ur=E;t:for(Jt=0;Jt0){at=q,q=lt,lt=at;break t}if(Ht<0)break t;ur+=R}ge=A*X,he=A*lt,ur=E;t:for(Jt=0;Jt0){at=X,X=lt,lt=at;break t}if(Ht<0)break t;ur+=R}ge=A*q,he=A*yt,ur=E;t:for(Jt=0;Jt0){at=q,q=yt,yt=at;break t}if(Ht<0)break t;ur+=R}ge=A*lt,he=A*yt,ur=E;t:for(Jt=0;Jt0){at=lt,lt=yt,yt=at;break t}if(Ht<0)break t;ur+=R}ge=A*X,he=A*pt,ur=E;t:for(Jt=0;Jt0){at=X,X=pt,pt=at;break t}if(Ht<0)break t;ur+=R}ge=A*X,he=A*lt,ur=E;t:for(Jt=0;Jt0){at=X,X=lt,lt=at;break t}if(Ht<0)break t;ur+=R}ge=A*yt,he=A*pt,ur=E;t:for(Jt=0;Jt0){at=yt,yt=pt,pt=at;break t}if(Ht<0)break t;ur+=R}for(ge=A*q,he=A*X,de=A*lt,se=A*yt,Tt=A*pt,Lt=A*V,Mt=A*F,te=A*H,cr=0,ur=E,Jt=0;Jt0)tt--;else if(Ht<0){for(ge=A*ft,he=A*st,de=A*tt,ur=E,Jt=0;Jt0)for(;;){ut=E+tt*A,cr=0;t:for(Jt=0;Jt0){if(--ttH){t:for(;;){for(ut=E+st*A,cr=0,ur=E,Jt=0;Jt1&&b?C(u,b[0],b[1]):C(u)}var x={"uint32,1,0":function(v,T){return function(u){var b=u.data,_=u.offset|0,C=u.shape,M=u.stride,E=M[0]|0,A=C[0]|0,h=M[1]|0,p=C[1]|0,k=h,w=h,R=1;A<=32?v(0,A-1,b,_,E,h,A,p,k,w,R):T(0,A-1,b,_,E,h,A,p,k,w,R)}}};function y(v,T){var u=[T,v].join(","),b=x[u],_=i(v,T),C=f(v,T,_);return b(_,C)}t.exports=y},7642:function(t,e,r){var a=r(8954),n=r(1682);t.exports=f;function o(x,y){this.point=x,this.index=y}function i(x,y){for(var v=x.point,T=y.point,u=v.length,b=0;b=2)return!1;V[F]=U}return!0}):N=N.filter(function(V){for(var H=0;H<=T;++H){var F=k[V[H]];if(F<0)return!1;V[H]=F}return!0}),T&1)for(var _=0;_",W="",q=U.length,X=W.length,lt=V[0]===b||V[0]===M,yt=0,pt=-X;yt>-1&&(yt=H.indexOf(U,yt),!(yt===-1||(pt=H.indexOf(W,yt+q),pt===-1)||pt<=yt));){for(var st=yt;st=pt)F[st]=null,H=H.substr(0,st)+" "+H.substr(st+1);else if(F[st]!==null){var tt=F[st].indexOf(V[0]);tt===-1?F[st]+=V:lt&&(F[st]=F[st].substr(0,tt+1)+(1+parseInt(F[st][tt+1]))+F[st].substr(tt+2))}var dt=yt+q,rt=H.substr(dt,pt-dt),at=rt.indexOf(U);at!==-1?yt=at:yt=pt+X}return F}function h(N,V,H){for(var F=V.textAlign||"start",U=V.textBaseline||"alphabetic",W=[1073741824,1073741824],q=[0,0],X=N.length,lt=0;lt/g,` +`):H=H.replace(/\/g," ");var q="",X=[];for(Y=0;Y-1?parseInt(Mt[1+oe]):0,Ge=Te>-1?parseInt(te[1+Te]):0;He!==Ge&&(ve=ve.replace(Ht(),"?px "),wt*=Math.pow(.75,Ge-He),ve=ve.replace("?px ",Ht())),ut+=.25*tt*(Ge-He)}if(W.superscripts===!0){var cr=Mt.indexOf(b),ur=te.indexOf(b),jr=cr>-1?parseInt(Mt[1+cr]):0,Hr=ur>-1?parseInt(te[1+ur]):0;jr!==Hr&&(ve=ve.replace(Ht(),"?px "),wt*=Math.pow(.75,Hr-jr),ve=ve.replace("?px ",Ht())),ut-=.25*tt*(Hr-jr)}if(W.bolds===!0){var br=Mt.indexOf(y)>-1,Kr=te.indexOf(y)>-1;!br&&Kr&&(rn?ve=ve.replace("italic ","italic bold "):ve="bold "+ve),br&&!Kr&&(ve=ve.replace("bold ",""))}if(W.italics===!0){var rn=Mt.indexOf(T)>-1,Ce=te.indexOf(T)>-1;!rn&&Ce&&(ve="italic "+ve),rn&&!Ce&&(ve=ve.replace("italic ",""))}V.font=ve}for(it=0;it0&&(U=F.size),F.lineSpacing&&F.lineSpacing>0&&(W=F.lineSpacing),F.styletags&&F.styletags.breaklines&&(q.breaklines=!!F.styletags.breaklines),F.styletags&&F.styletags.bolds&&(q.bolds=!!F.styletags.bolds),F.styletags&&F.styletags.italics&&(q.italics=!!F.styletags.italics),F.styletags&&F.styletags.subscripts&&(q.subscripts=!!F.styletags.subscripts),F.styletags&&F.styletags.superscripts&&(q.superscripts=!!F.styletags.superscripts)),H.font=[F.fontStyle,F.fontVariant,F.fontWeight,U+"px",F.font].filter(function(lt){return lt}).join(" "),H.textAlign="start",H.textBaseline="alphabetic",H.direction="ltr";var X=p(V,H,N,U,W,q);return R(X,F,U)}},7721:function(t,e,r){var a=r(5716);t.exports=n;function n(o){return a(o[0])*a(o[1])}},7765:function(t,e,r){t.exports=u;var a=r(9618),n=r(1888),o=r(446),i=r(1570);function s(b){for(var _=b.length,C=0,M=0;M<_;++M)C=Math.max(C,b[M].length)|0;return C-1}function f(b,_){for(var C=b.length,M=n.mallocUint8(C),E=0;E"u"&&(M=s(b));var E=b.length;if(E===0||M<1)return{cells:[],vertexIds:[],vertexWeights:[]};var A=f(_,+C),h=x(b,M),p=y(h,_,A,+C),k=v(h,_.length|0),w=i(M)(b,h.data,k,A),R=T(h),O=[].slice.call(p.data,0,p.shape[0]);return n.free(A),n.free(h.data),n.free(p.data),n.free(k),{cells:w,vertexIds:R,vertexWeights:O}}},7766:function(t,e,r){var a=r(9618),n=r(5298),o=r(1888);t.exports=p;var i=null,s=null,f=null;function x(k){i=[k.LINEAR,k.NEAREST_MIPMAP_LINEAR,k.LINEAR_MIPMAP_NEAREST,k.LINEAR_MIPMAP_NEAREST],s=[k.NEAREST,k.LINEAR,k.NEAREST_MIPMAP_NEAREST,k.NEAREST_MIPMAP_LINEAR,k.LINEAR_MIPMAP_NEAREST,k.LINEAR_MIPMAP_LINEAR],f=[k.REPEAT,k.CLAMP_TO_EDGE,k.MIRRORED_REPEAT]}function y(k){return typeof HTMLCanvasElement<"u"&&k instanceof HTMLCanvasElement||typeof HTMLImageElement<"u"&&k instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&k instanceof HTMLVideoElement||typeof ImageData<"u"&&k instanceof ImageData}var v=function(k,w){n.muls(k,w,255)};function T(k,w,R){var O=k.gl,N=O.getParameter(O.MAX_TEXTURE_SIZE);if(w<0||w>N||R<0||R>N)throw new Error("gl-texture2d: Invalid texture size");return k._shape=[w,R],k.bind(),O.texImage2D(O.TEXTURE_2D,0,k.format,w,R,0,k.format,k.type,null),k._mipLevels=[0],k}function u(k,w,R,O,N,V){this.gl=k,this.handle=w,this.format=N,this.type=V,this._shape=[R,O],this._mipLevels=[0],this._magFilter=k.NEAREST,this._minFilter=k.NEAREST,this._wrapS=k.CLAMP_TO_EDGE,this._wrapT=k.CLAMP_TO_EDGE,this._anisoSamples=1;var H=this,F=[this._wrapS,this._wrapT];Object.defineProperties(F,[{get:function(){return H._wrapS},set:function(W){return H.wrapS=W}},{get:function(){return H._wrapT},set:function(W){return H.wrapT=W}}]),this._wrapVector=F;var U=[this._shape[0],this._shape[1]];Object.defineProperties(U,[{get:function(){return H._shape[0]},set:function(W){return H.width=W}},{get:function(){return H._shape[1]},set:function(W){return H.height=W}}]),this._shapeVector=U}var b=u.prototype;Object.defineProperties(b,{minFilter:{get:function(){return this._minFilter},set:function(k){this.bind();var w=this.gl;if(this.type===w.FLOAT&&i.indexOf(k)>=0&&(w.getExtension("OES_texture_float_linear")||(k=w.NEAREST)),s.indexOf(k)<0)throw new Error("gl-texture2d: Unknown filter mode "+k);return w.texParameteri(w.TEXTURE_2D,w.TEXTURE_MIN_FILTER,k),this._minFilter=k}},magFilter:{get:function(){return this._magFilter},set:function(k){this.bind();var w=this.gl;if(this.type===w.FLOAT&&i.indexOf(k)>=0&&(w.getExtension("OES_texture_float_linear")||(k=w.NEAREST)),s.indexOf(k)<0)throw new Error("gl-texture2d: Unknown filter mode "+k);return w.texParameteri(w.TEXTURE_2D,w.TEXTURE_MAG_FILTER,k),this._magFilter=k}},mipSamples:{get:function(){return this._anisoSamples},set:function(k){var w=this._anisoSamples;if(this._anisoSamples=Math.max(k,1)|0,w!==this._anisoSamples){var R=this.gl.getExtension("EXT_texture_filter_anisotropic");R&&this.gl.texParameterf(this.gl.TEXTURE_2D,R.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(k){if(this.bind(),f.indexOf(k)<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,k),this._wrapS=k}},wrapT:{get:function(){return this._wrapT},set:function(k){if(this.bind(),f.indexOf(k)<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,k),this._wrapT=k}},wrap:{get:function(){return this._wrapVector},set:function(k){if(Array.isArray(k)||(k=[k,k]),k.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var w=0;w<2;++w)if(f.indexOf(k[w])<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);this._wrapS=k[0],this._wrapT=k[1];var R=this.gl;return this.bind(),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_S,this._wrapS),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_T,this._wrapT),k}},shape:{get:function(){return this._shapeVector},set:function(k){if(!Array.isArray(k))k=[k|0,k|0];else if(k.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return T(this,k[0]|0,k[1]|0),[k[0]|0,k[1]|0]}},width:{get:function(){return this._shape[0]},set:function(k){return k=k|0,T(this,k,this._shape[1]),k}},height:{get:function(){return this._shape[1]},set:function(k){return k=k|0,T(this,this._shape[0],k),k}}}),b.bind=function(k){var w=this.gl;return k!==void 0&&w.activeTexture(w.TEXTURE0+(k|0)),w.bindTexture(w.TEXTURE_2D,this.handle),k!==void 0?k|0:w.getParameter(w.ACTIVE_TEXTURE)-w.TEXTURE0},b.dispose=function(){this.gl.deleteTexture(this.handle)},b.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var k=Math.min(this._shape[0],this._shape[1]),w=0;k>0;++w,k>>>=1)this._mipLevels.indexOf(w)<0&&this._mipLevels.push(w)},b.setPixels=function(k,w,R,O){var N=this.gl;this.bind(),Array.isArray(w)?(O=R,R=w[1]|0,w=w[0]|0):(w=w||0,R=R||0),O=O||0;var V=y(k)?k:k.raw;if(V){var H=this._mipLevels.indexOf(O)<0;H?(N.texImage2D(N.TEXTURE_2D,0,this.format,this.format,this.type,V),this._mipLevels.push(O)):N.texSubImage2D(N.TEXTURE_2D,O,w,R,this.format,this.type,V)}else if(k.shape&&k.stride&&k.data){if(k.shape.length<2||w+k.shape[1]>this._shape[1]>>>O||R+k.shape[0]>this._shape[0]>>>O||w<0||R<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");C(N,w,R,O,this.format,this.type,this._mipLevels,k)}else throw new Error("gl-texture2d: Unsupported data type")};function _(k,w){return k.length===3?w[2]===1&&w[1]===k[0]*k[2]&&w[0]===k[2]:w[0]===1&&w[1]===k[0]}function C(k,w,R,O,N,V,H,F){var U=F.dtype,W=F.shape.slice();if(W.length<2||W.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var q=0,X=0,lt=_(W,F.stride.slice());if(U==="float32"?q=k.FLOAT:U==="float64"?(q=k.FLOAT,lt=!1,U="float32"):U==="uint8"?q=k.UNSIGNED_BYTE:(q=k.UNSIGNED_BYTE,lt=!1,U="uint8"),W.length===2)X=k.LUMINANCE,W=[W[0],W[1],1],F=a(F.data,W,[F.stride[0],F.stride[1],1],F.offset);else if(W.length===3){if(W[2]===1)X=k.ALPHA;else if(W[2]===2)X=k.LUMINANCE_ALPHA;else if(W[2]===3)X=k.RGB;else if(W[2]===4)X=k.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");W[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((X===k.LUMINANCE||X===k.ALPHA)&&(N===k.LUMINANCE||N===k.ALPHA)&&(X=N),X!==N)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var yt=F.size,pt=H.indexOf(O)<0;if(pt&&H.push(O),q===V&<)F.offset===0&&F.data.length===yt?pt?k.texImage2D(k.TEXTURE_2D,O,N,W[0],W[1],0,N,V,F.data):k.texSubImage2D(k.TEXTURE_2D,O,w,R,W[0],W[1],N,V,F.data):pt?k.texImage2D(k.TEXTURE_2D,O,N,W[0],W[1],0,N,V,F.data.subarray(F.offset,F.offset+yt)):k.texSubImage2D(k.TEXTURE_2D,O,w,R,W[0],W[1],N,V,F.data.subarray(F.offset,F.offset+yt));else{var st;V===k.FLOAT?st=o.mallocFloat32(yt):st=o.mallocUint8(yt);var tt=a(st,W,[W[2],W[2]*W[0],1]);q===k.FLOAT&&V===k.UNSIGNED_BYTE?v(tt,F):n.assign(tt,F),pt?k.texImage2D(k.TEXTURE_2D,O,N,W[0],W[1],0,N,V,st.subarray(0,yt)):k.texSubImage2D(k.TEXTURE_2D,O,w,R,W[0],W[1],N,V,st.subarray(0,yt)),V===k.FLOAT?o.freeFloat32(st):o.freeUint8(st)}}function M(k){var w=k.createTexture();return k.bindTexture(k.TEXTURE_2D,w),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,k.NEAREST),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,k.NEAREST),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,k.CLAMP_TO_EDGE),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,k.CLAMP_TO_EDGE),w}function E(k,w,R,O,N){var V=k.getParameter(k.MAX_TEXTURE_SIZE);if(w<0||w>V||R<0||R>V)throw new Error("gl-texture2d: Invalid texture shape");if(N===k.FLOAT&&!k.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var H=M(k);return k.texImage2D(k.TEXTURE_2D,0,O,w,R,0,O,N,null),new u(k,H,w,R,O,N)}function A(k,w,R,O,N,V){var H=M(k);return k.texImage2D(k.TEXTURE_2D,0,N,N,V,w),new u(k,H,R,O,N,V)}function h(k,w){var R=w.dtype,O=w.shape.slice(),N=k.getParameter(k.MAX_TEXTURE_SIZE);if(O[0]<0||O[0]>N||O[1]<0||O[1]>N)throw new Error("gl-texture2d: Invalid texture size");var V=_(O,w.stride.slice()),H=0;R==="float32"?H=k.FLOAT:R==="float64"?(H=k.FLOAT,V=!1,R="float32"):R==="uint8"?H=k.UNSIGNED_BYTE:(H=k.UNSIGNED_BYTE,V=!1,R="uint8");var F=0;if(O.length===2)F=k.LUMINANCE,O=[O[0],O[1],1],w=a(w.data,O,[w.stride[0],w.stride[1],1],w.offset);else if(O.length===3)if(O[2]===1)F=k.ALPHA;else if(O[2]===2)F=k.LUMINANCE_ALPHA;else if(O[2]===3)F=k.RGB;else if(O[2]===4)F=k.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");H===k.FLOAT&&!k.getExtension("OES_texture_float")&&(H=k.UNSIGNED_BYTE,V=!1);var U,W,q=w.size;if(V)w.offset===0&&w.data.length===q?U=w.data:U=w.data.subarray(w.offset,w.offset+q);else{var X=[O[2],O[2]*O[0],1];W=o.malloc(q,R);var lt=a(W,O,X,0);(R==="float32"||R==="float64")&&H===k.UNSIGNED_BYTE?v(lt,w):n.assign(lt,w),U=W.subarray(0,q)}var yt=M(k);return k.texImage2D(k.TEXTURE_2D,0,F,O[0],O[1],0,F,H,U),V||o.free(W),new u(k,yt,O[0],O[1],F,H)}function p(k){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(i||x(k),typeof arguments[1]=="number")return E(k,arguments[1],arguments[2],arguments[3]||k.RGBA,arguments[4]||k.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return E(k,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||k.RGBA,arguments[3]||k.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var w=arguments[1],R=y(w)?w:w.raw;if(R)return A(k,R,w.width|0,w.height|0,arguments[2]||k.RGBA,arguments[3]||k.UNSIGNED_BYTE);if(w.shape&&w.data&&w.stride)return h(k,w)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},7790:function(){},7815:function(t,e,r){var a=r(2931),n=r(9970),o=["xyz","xzy","yxz","yzx","zxy","zyx"],i=function(_,C,M,E){for(var A=_.points,h=_.velocities,p=_.divergences,k=[],w=[],R=[],O=[],N=[],V=[],H=0,F=0,U=n.create(),W=n.create(),q=8,X=0;X0)for(var st=0;stC)return E-1}return E},x=function(_,C,M){return _M?M:_},y=function(_,C,M){var E=C.vectors,A=C.meshgrid,h=_[0],p=_[1],k=_[2],w=A[0].length,R=A[1].length,O=A[2].length,N=f(A[0],h),V=f(A[1],p),H=f(A[2],k),F=N+1,U=V+1,W=H+1;if(N=x(N,0,w-1),F=x(F,0,w-1),V=x(V,0,R-1),U=x(U,0,R-1),H=x(H,0,O-1),W=x(W,0,O-1),N<0||V<0||H<0||F>w-1||U>R-1||W>O-1)return a.create();var q=A[0][N],X=A[0][F],lt=A[1][V],yt=A[1][U],pt=A[2][H],st=A[2][W],tt=(h-q)/(X-q),dt=(p-lt)/(yt-lt),rt=(k-pt)/(st-pt);isFinite(tt)||(tt=.5),isFinite(dt)||(dt=.5),isFinite(rt)||(rt=.5);var at,vt,it,Y,ft,ut;switch(M.reversedX&&(N=w-1-N,F=w-1-F),M.reversedY&&(V=R-1-V,U=R-1-U),M.reversedZ&&(H=O-1-H,W=O-1-W),M.filled){case 5:ft=H,ut=W,it=V*O,Y=U*O,at=N*O*R,vt=F*O*R;break;case 4:ft=H,ut=W,at=N*O,vt=F*O,it=V*O*w,Y=U*O*w;break;case 3:it=V,Y=U,ft=H*R,ut=W*R,at=N*R*O,vt=F*R*O;break;case 2:it=V,Y=U,at=N*R,vt=F*R,ft=H*R*w,ut=W*R*w;break;case 1:at=N,vt=F,ft=H*w,ut=W*w,it=V*w*O,Y=U*w*O;break;default:at=N,vt=F,it=V*w,Y=U*w,ft=H*w*R,ut=W*w*R;break}var wt=E[at+it+ft],zt=E[at+it+ut],Pt=E[at+Y+ft],Wt=E[at+Y+ut],Ht=E[vt+it+ft],Jt=E[vt+it+ut],ge=E[vt+Y+ft],he=E[vt+Y+ut],de=a.create(),se=a.create(),Tt=a.create(),Lt=a.create();a.lerp(de,wt,Ht,tt),a.lerp(se,zt,Jt,tt),a.lerp(Tt,Pt,ge,tt),a.lerp(Lt,Wt,he,tt);var Mt=a.create(),te=a.create();a.lerp(Mt,de,Tt,dt),a.lerp(te,se,Lt,dt);var ve=a.create();return a.lerp(ve,Mt,te,rt),ve},v=function(_){var C=1/0;_.sort(function(h,p){return h-p});for(var M=_.length,E=1;EF||heU||deW)},X=a.distance(C[0],C[1]),lt=10*X/E,yt=lt*lt,pt=1,st=0,tt=M.length;tt>1&&(pt=T(M));for(var dt=0;dtst&&(st=wt),ft.push(wt),O.push({points:at,velocities:vt,divergences:ft});for(var zt=0;ztyt&&a.scale(Pt,Pt,lt/Math.sqrt(Wt)),a.add(Pt,Pt,rt),it=w(Pt),a.squaredDistance(Y,Pt)-yt>-1e-4*yt){at.push(Pt),Y=Pt,vt.push(it);var ut=R(Pt,it),wt=a.length(ut);isFinite(wt)&&wt>st&&(st=wt),ft.push(wt)}rt=Pt}}var Ht=s(O,_.colormap,st,pt);return h?Ht.tubeScale=h:(st===0&&(st=1),Ht.tubeScale=A*.5*pt/st),Ht};var u=r(6740),b=r(6405).createMesh;t.exports.createTubeMesh=function(_,C){return b(_,C,{shaders:u,traceType:"streamtube"})}},7827:function(t){t.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},7842:function(t,e,r){var a=r(6330),n=r(1533),o=r(2651),i=r(6768),s=r(869),f=r(8697);t.exports=x;function x(y,v){if(a(y))return v?f(y,x(v)):[y[0].clone(),y[1].clone()];var T=0,u,b;if(n(y))u=y.clone();else if(typeof y=="string")u=i(y);else{if(y===0)return[o(0),o(1)];if(y===Math.floor(y))u=o(y);else{for(;y!==Math.floor(y);)y=y*Math.pow(2,256),T-=256;u=o(y)}}if(a(v))u.mul(v[1]),b=v[0].clone();else if(n(v))b=v.clone();else if(typeof v=="string")b=i(v);else if(!v)b=o(1);else if(v===Math.floor(v))b=o(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),T+=256;b=o(v)}return T>0?u=u.ushln(T):T<0&&(b=b.ushln(-T)),s(u,b)}},7894:function(t){t.exports=e;function e(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7932:function(t,e,r){var a=r(620);t.exports=a.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},7960:function(t){t.exports=e;function e(r,a){var n=a[0]-r[0],o=a[1]-r[1],i=a[2]-r[2],s=a[3]-r[3];return n*n+o*o+i*i+s*s}},8105:function(t){t.exports=r;var e={"lo===p0":a,"lo=p0)&&!(p1>=hi)":x};function r(y){return e[y]}function a(y,v,T,u,b,_,C){for(var M=2*y,E=M*T,A=E,h=T,p=v,k=y+v,w=T;u>w;++w,E+=M){var R=b[E+p];if(R===C)if(h===w)h+=1,A+=M;else{for(var O=0;M>O;++O){var N=b[E+O];b[E+O]=b[A],b[A++]=N}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function n(y,v,T,u,b,_,C){for(var M=2*y,E=M*T,A=E,h=T,p=v,k=y+v,w=T;u>w;++w,E+=M){var R=b[E+p];if(RO;++O){var N=b[E+O];b[E+O]=b[A],b[A++]=N}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function o(y,v,T,u,b,_,C){for(var M=2*y,E=M*T,A=E,h=T,p=v,k=y+v,w=T;u>w;++w,E+=M){var R=b[E+k];if(R<=C)if(h===w)h+=1,A+=M;else{for(var O=0;M>O;++O){var N=b[E+O];b[E+O]=b[A],b[A++]=N}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function i(y,v,T,u,b,_,C){for(var M=2*y,E=M*T,A=E,h=T,p=v,k=y+v,w=T;u>w;++w,E+=M){var R=b[E+k];if(R<=C)if(h===w)h+=1,A+=M;else{for(var O=0;M>O;++O){var N=b[E+O];b[E+O]=b[A],b[A++]=N}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function s(y,v,T,u,b,_,C){for(var M=2*y,E=M*T,A=E,h=T,p=v,k=y+v,w=T;u>w;++w,E+=M){var R=b[E+p],O=b[E+k];if(R<=C&&C<=O)if(h===w)h+=1,A+=M;else{for(var N=0;M>N;++N){var V=b[E+N];b[E+N]=b[A],b[A++]=V}var H=_[w];_[w]=_[h],_[h++]=H}}return h}function f(y,v,T,u,b,_,C){for(var M=2*y,E=M*T,A=E,h=T,p=v,k=y+v,w=T;u>w;++w,E+=M){var R=b[E+p],O=b[E+k];if(RN;++N){var V=b[E+N];b[E+N]=b[A],b[A++]=V}var H=_[w];_[w]=_[h],_[h++]=H}}return h}function x(y,v,T,u,b,_,C,M){for(var E=2*y,A=E*T,h=A,p=T,k=v,w=y+v,R=T;u>R;++R,A+=E){var O=b[A+k],N=b[A+w];if(!(O>=C)&&!(M>=N))if(p===R)p+=1,h+=E;else{for(var V=0;E>V;++V){var H=b[A+V];b[A+V]=b[h],b[h++]=H}var F=_[R];_[R]=_[p],_[p++]=F}}return p}},8107:function(t){t.exports=e;function e(r,a,n){return r[0]=Math.min(a[0],n[0]),r[1]=Math.min(a[1],n[1]),r[2]=Math.min(a[2],n[2]),r}},8116:function(t,e,r){var a=r(7518),n=r(870);function o(s){this.bindVertexArrayOES=s.bindVertexArray.bind(s),this.createVertexArrayOES=s.createVertexArray.bind(s),this.deleteVertexArrayOES=s.deleteVertexArray.bind(s)}function i(s,f,x,y){var v=s.createVertexArray?new o(s):s.getExtension("OES_vertex_array_object"),T;return v?T=a(s,v):T=n(s),T.update(f,x,y),T}t.exports=i},8192:function(t,e,r){t.exports=i;var a=r(2825),n=r(3536),o=r(244);function i(s,f){var x=a(s[0],s[1],s[2]),y=a(f[0],f[1],f[2]);n(x,x),n(y,y);var v=o(x,y);return v>1?0:Math.acos(v)}},8210:function(t){t.exports=r;function e(a,n){var o=a+n,i=o-a,s=o-i,f=n-i,x=a-s,y=x+f;return y?[y,o]:[o]}function r(a,n){var o=a.length|0,i=n.length|0;if(o===1&&i===1)return e(a[0],n[0]);var s=o+i,f=new Array(s),x=0,y=0,v=0,T=Math.abs,u=a[y],b=T(u),_=n[v],C=T(_),M,E;b=i?(M=u,y+=1,yx)for(var R=f[u],O=1/Math.sqrt(h*k),w=0;w<3;++w){var N=(w+1)%3,V=(w+2)%3;R[w]+=O*(p[N]*A[V]-p[V]*A[N])}}for(var y=0;yx)for(var O=1/Math.sqrt(H),w=0;w<3;++w)R[w]*=O;else for(var w=0;w<3;++w)R[w]=0}return f},e.faceNormals=function(n,o,i){for(var s=n.length,f=new Array(s),x=i===void 0?a:i,y=0;yx?M=1/Math.sqrt(M):M=0;for(var u=0;u<3;++u)C[u]*=M;f[y]=C}return f}},8418:function(t,e,r){var a=r(5219),n=r(2762),o=r(8116),i=r(1888),s=r(6760),f=r(1283),x=r(9366),y=r(5964),v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=ArrayBuffer,u=DataView;function b(at){return T.isView(at)&&!(at instanceof u)}function _(at){return Array.isArray(at)||b(at)}t.exports=rt;function C(at,vt){var it=at[0],Y=at[1],ft=at[2],ut=at[3];return at[0]=vt[0]*it+vt[4]*Y+vt[8]*ft+vt[12]*ut,at[1]=vt[1]*it+vt[5]*Y+vt[9]*ft+vt[13]*ut,at[2]=vt[2]*it+vt[6]*Y+vt[10]*ft+vt[14]*ut,at[3]=vt[3]*it+vt[7]*Y+vt[11]*ft+vt[15]*ut,at}function M(at,vt,it,Y){return C(Y,Y),C(Y,Y),C(Y,Y)}function E(at,vt){this.index=at,this.dataCoordinate=this.position=vt}function A(at){return at===!0||at>1?1:at}function h(at,vt,it,Y,ft,ut,wt,zt,Pt,Wt,Ht,Jt){this.gl=at,this.pixelRatio=1,this.shader=vt,this.orthoShader=it,this.projectShader=Y,this.pointBuffer=ft,this.colorBuffer=ut,this.glyphBuffer=wt,this.idBuffer=zt,this.vao=Pt,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=Wt,this.pickOrthoShader=Ht,this.pickProjectShader=Jt,this.points=[],this._selectResult=new E(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var p=h.prototype;p.pickSlots=1,p.setPickBase=function(at){this.pickId=at},p.isTransparent=function(){if(this.hasAlpha)return!0;for(var at=0;at<3;++at)if(this.axesProject[at]&&this.projectHasAlpha)return!0;return!1},p.isOpaque=function(){if(!this.hasAlpha)return!0;for(var at=0;at<3;++at)if(this.axesProject[at]&&!this.projectHasAlpha)return!0;return!1};var k=[0,0],w=[0,0,0],R=[0,0,0],O=[0,0,0,1],N=[0,0,0,1],V=v.slice(),H=[0,0,0],F=[[0,0,0],[0,0,0]];function U(at){return at[0]=at[1]=at[2]=0,at}function W(at,vt){return at[0]=vt[0],at[1]=vt[1],at[2]=vt[2],at[3]=1,at}function q(at,vt,it,Y){return at[0]=vt[0],at[1]=vt[1],at[2]=vt[2],at[it]=Y,at}function X(at){for(var vt=F,it=0;it<2;++it)for(var Y=0;Y<3;++Y)vt[it][Y]=Math.max(Math.min(at[it][Y],1e8),-1e8);return vt}function lt(at,vt,it,Y){var ft=vt.axesProject,ut=vt.gl,wt=at.uniforms,zt=it.model||v,Pt=it.view||v,Wt=it.projection||v,Ht=vt.axesBounds,Jt=X(vt.clipBounds),ge;vt.axes&&vt.axes.lastCubeProps?ge=vt.axes.lastCubeProps.axis:ge=[1,1,1],k[0]=2/ut.drawingBufferWidth,k[1]=2/ut.drawingBufferHeight,at.bind(),wt.view=Pt,wt.projection=Wt,wt.screenSize=k,wt.highlightId=vt.highlightId,wt.highlightScale=vt.highlightScale,wt.clipBounds=Jt,wt.pickGroup=vt.pickId/255,wt.pixelRatio=Y;for(var he=0;he<3;++he)if(ft[he]){wt.scale=vt.projectScale[he],wt.opacity=vt.projectOpacity[he];for(var de=V,se=0;se<16;++se)de[se]=0;for(var se=0;se<4;++se)de[5*se]=1;de[5*he]=0,ge[he]<0?de[12+he]=Ht[0][he]:de[12+he]=Ht[1][he],s(de,zt,de),wt.model=de;var Tt=(he+1)%3,Lt=(he+2)%3,Mt=U(w),te=U(R);Mt[Tt]=1,te[Lt]=1;var ve=M(Wt,Pt,zt,W(O,Mt)),oe=M(Wt,Pt,zt,W(N,te));if(Math.abs(ve[1])>Math.abs(oe[1])){var Te=ve;ve=oe,oe=Te,Te=Mt,Mt=te,te=Te;var He=Tt;Tt=Lt,Lt=He}ve[0]<0&&(Mt[Tt]=-1),oe[1]>0&&(te[Lt]=-1);for(var Ge=0,cr=0,se=0;se<4;++se)Ge+=Math.pow(zt[4*Tt+se],2),cr+=Math.pow(zt[4*Lt+se],2);Mt[Tt]/=Math.sqrt(Ge),te[Lt]/=Math.sqrt(cr),wt.axes[0]=Mt,wt.axes[1]=te,wt.fragClipBounds[0]=q(H,Jt[0],he,-1e8),wt.fragClipBounds[1]=q(H,Jt[1],he,1e8),vt.vao.bind(),vt.vao.draw(ut.TRIANGLES,vt.vertexCount),vt.lineWidth>0&&(ut.lineWidth(vt.lineWidth*Y),vt.vao.draw(ut.LINES,vt.lineVertexCount,vt.vertexCount)),vt.vao.unbind()}}var yt=[-1e8,-1e8,-1e8],pt=[1e8,1e8,1e8],st=[yt,pt];function tt(at,vt,it,Y,ft,ut,wt){var zt=it.gl;if((ut===it.projectHasAlpha||wt)&<(vt,it,Y,ft),ut===it.hasAlpha||wt){at.bind();var Pt=at.uniforms;Pt.model=Y.model||v,Pt.view=Y.view||v,Pt.projection=Y.projection||v,k[0]=2/zt.drawingBufferWidth,k[1]=2/zt.drawingBufferHeight,Pt.screenSize=k,Pt.highlightId=it.highlightId,Pt.highlightScale=it.highlightScale,Pt.fragClipBounds=st,Pt.clipBounds=it.axes.bounds,Pt.opacity=it.opacity,Pt.pickGroup=it.pickId/255,Pt.pixelRatio=ft,it.vao.bind(),it.vao.draw(zt.TRIANGLES,it.vertexCount),it.lineWidth>0&&(zt.lineWidth(it.lineWidth*ft),it.vao.draw(zt.LINES,it.lineVertexCount,it.vertexCount)),it.vao.unbind()}}p.draw=function(at){var vt=this.useOrtho?this.orthoShader:this.shader;tt(vt,this.projectShader,this,at,this.pixelRatio,!1,!1)},p.drawTransparent=function(at){var vt=this.useOrtho?this.orthoShader:this.shader;tt(vt,this.projectShader,this,at,this.pixelRatio,!0,!1)},p.drawPick=function(at){var vt=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;tt(vt,this.pickProjectShader,this,at,1,!0,!0)},p.pick=function(at){if(!at||at.id!==this.pickId)return null;var vt=at.value[2]+(at.value[1]<<8)+(at.value[0]<<16);if(vt>=this.pointCount||vt<0)return null;var it=this.points[vt],Y=this._selectResult;Y.index=vt;for(var ft=0;ft<3;++ft)Y.position[ft]=Y.dataCoordinate[ft]=it[ft];return Y},p.highlight=function(at){if(!at)this.highlightId=[1,1,1,1];else{var vt=at.index,it=vt&255,Y=vt>>8&255,ft=vt>>16&255;this.highlightId=[it/255,Y/255,ft/255,0]}};function dt(at,vt,it,Y){var ft;_(at)?vt0){var rn=0,Ce=Lt,$t=[0,0,0,1],ne=[0,0,0,1],Ct=_(ge)&&_(ge[0]),gt=_(se)&&_(se[0]);t:for(var Y=0;Y0?1-cr[0][0]:qe<0?1+cr[1][0]:1,ar*=ar>0?1-cr[0][1]:ar<0?1+cr[1][1]:1;for(var Ar=[qe,ar],Tr=He.cells||[],pr=He.positions||[],oe=0;oe=i?(M=u,y+=1,y0?1:0}},8648:function(t,e,r){t.exports=r(783)},8692:function(t){t.exports=e;function e(r,a,n,o){var i=n[0],s=n[1],f=a[0]-i,x=a[1]-s,y=Math.sin(o),v=Math.cos(o);return r[0]=i+f*v-x*y,r[1]=s+f*y+x*v,r[2]=a[2],r}},8697:function(t,e,r){var a=r(869);t.exports=n;function n(o,i){return a(o[0].mul(i[1]),o[1].mul(i[0]))}},8731:function(t,e,r){t.exports=x;var a=r(8866);function n(y,v,T,u,b,_){this._gl=y,this._wrapper=v,this._index=T,this._locations=u,this._dimension=b,this._constFunc=_}var o=n.prototype;o.pointer=function(y,v,T,u){var b=this,_=b._gl,C=b._locations[b._index];_.vertexAttribPointer(C,b._dimension,y||_.FLOAT,!!v,T||0,u||0),_.enableVertexAttribArray(C)},o.set=function(y,v,T,u){return this._constFunc(this._locations[this._index],y,v,T,u)},Object.defineProperty(o,"location",{get:function(){return this._locations[this._index]},set:function(y){return y!==this._locations[this._index]&&(this._locations[this._index]=y|0,this._wrapper.program=null),y|0}});var i=[function(y,v,T){return T.length===void 0?y.vertexAttrib1f(v,T):y.vertexAttrib1fv(v,T)},function(y,v,T,u){return T.length===void 0?y.vertexAttrib2f(v,T,u):y.vertexAttrib2fv(v,T)},function(y,v,T,u,b){return T.length===void 0?y.vertexAttrib3f(v,T,u,b):y.vertexAttrib3fv(v,T)},function(y,v,T,u,b,_){return T.length===void 0?y.vertexAttrib4f(v,T,u,b,_):y.vertexAttrib4fv(v,T)}];function s(y,v,T,u,b,_,C){var M=i[b],E=new n(y,v,T,u,b,M);Object.defineProperty(_,C,{set:function(A){return y.disableVertexAttribArray(u[T]),M(y,u[T],A),A},get:function(){return E},enumerable:!0})}function f(y,v,T,u,b,_,C){for(var M=new Array(b),E=new Array(b),A=0;A=0){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new a("","Invalid data type for attribute "+E+": "+A);s(y,v,h[0],u,p,b,E)}else if(A.indexOf("mat")>=0){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new a("","Invalid data type for attribute "+E+": "+A);f(y,v,h,u,p,b,E)}else throw new a("","Unknown data type for attribute "+E+": "+A);break}}return b}},8828:function(t,e){"use restrict";var r=32;e.INT_BITS=r,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(o<0)},e.abs=function(o){var i=o>>r-1;return(o^i)-i},e.min=function(o,i){return i^(o^i)&-(o65535)<<4,o>>>=i,s=(o>255)<<3,o>>>=s,i|=s,s=(o>15)<<2,o>>>=s,i|=s,s=(o>3)<<1,o>>>=s,i|=s,i|o>>1},e.log10=function(o){return o>=1e9?9:o>=1e8?8:o>=1e7?7:o>=1e6?6:o>=1e5?5:o>=1e4?4:o>=1e3?3:o>=100?2:o>=10?1:0},e.popCount=function(o){return o=o-(o>>>1&1431655765),o=(o&858993459)+(o>>>2&858993459),(o+(o>>>4)&252645135)*16843009>>>24};function a(o){var i=32;return o&=-o,o&&i--,o&65535&&(i-=16),o&16711935&&(i-=8),o&252645135&&(i-=4),o&858993459&&(i-=2),o&1431655765&&(i-=1),i}e.countTrailingZeros=a,e.nextPow2=function(o){return o+=o===0,--o,o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o+1},e.prevPow2=function(o){return o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o-(o>>>1)},e.parity=function(o){return o^=o>>>16,o^=o>>>8,o^=o>>>4,o&=15,27030>>>o&1};var n=new Array(256);(function(o){for(var i=0;i<256;++i){var s=i,f=i,x=7;for(s>>>=1;s;s>>>=1)f<<=1,f|=s&1,--x;o[i]=f<>>8&255]<<16|n[o>>>16&255]<<8|n[o>>>24&255]},e.interleave2=function(o,i){return o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,o|i<<1},e.deinterleave2=function(o,i){return o=o>>>i&1431655765,o=(o|o>>>1)&858993459,o=(o|o>>>2)&252645135,o=(o|o>>>4)&16711935,o=(o|o>>>16)&65535,o<<16>>16},e.interleave3=function(o,i,s){return o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,o|=i<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,o|s<<2},e.deinterleave3=function(o,i){return o=o>>>i&1227133513,o=(o|o>>>2)&3272356035,o=(o|o>>>4)&251719695,o=(o|o>>>8)&4278190335,o=(o|o>>>16)&1023,o<<22>>22},e.nextCombination=function(o){var i=o|o-1;return i+1|(~i&-~i)-1>>>a(o)+1}},8866:function(t){function e(r,a,n){this.shortMessage=a||"",this.longMessage=n||"",this.rawError=r||"",this.message="gl-shader: "+(a||r||"")+(n?` +`+n:""),this.stack=new Error().stack}e.prototype=new Error,e.prototype.name="GLError",e.prototype.constructor=e,t.exports=e},8902:function(t,e,r){var a=r(2478),n=r(3250)[3],o=0,i=1,s=2;t.exports=C;function f(M,E,A,h,p){this.a=M,this.b=E,this.idx=A,this.lowerIds=h,this.upperIds=p}function x(M,E,A,h){this.a=M,this.b=E,this.type=A,this.idx=h}function y(M,E){var A=M.a[0]-E.a[0]||M.a[1]-E.a[1]||M.type-E.type;return A||M.type!==o&&(A=n(M.a,M.b,E.b),A)?A:M.idx-E.idx}function v(M,E){return n(M.a,M.b,E)}function T(M,E,A,h,p){for(var k=a.lt(E,h,v),w=a.gt(E,h,v),R=k;R1&&n(A[N[V-2]],A[N[V-1]],h)>0;)M.push([N[V-1],N[V-2],p]),V-=1;N.length=V,N.push(p);for(var H=O.upperIds,V=H.length;V>1&&n(A[H[V-2]],A[H[V-1]],h)<0;)M.push([H[V-2],H[V-1],p]),V-=1;H.length=V,H.push(p)}}function u(M,E){var A;return M.a[0]O[0]&&p.push(new x(O,R,s,k),new x(R,O,i,k))}p.sort(y);for(var N=p[0].a[0]-(1+Math.abs(p[0].a[0]))*Math.pow(2,-52),V=[new f([N,1],[N,0],-1,[],[])],H=[],k=0,F=p.length;k0;){b=h.pop();for(var p=b.adjacent,k=0;k<=C;++k){var w=p[k];if(!(!w.boundary||w.lastVisited<=-M)){for(var R=w.vertices,O=0;O<=C;++O){var N=R[O];N<0?E[O]=_:E[O]=A[N]}var V=this.orient();if(V>0)return w;w.lastVisited=-M,V===0&&h.push(w)}}}return null},T.walk=function(b,_){var C=this.vertices.length-1,M=this.dimension,E=this.vertices,A=this.tuple,h=_?this.interior.length*Math.random()|0:this.interior.length-1,p=this.interior[h];t:for(;!p.boundary;){for(var k=p.vertices,w=p.adjacent,R=0;R<=M;++R)A[R]=E[k[R]];p.lastVisited=C;for(var R=0;R<=M;++R){var O=w[R];if(!(O.lastVisited>=C)){var N=A[R];A[R]=b;var V=this.orient();if(A[R]=N,V<0){p=O;continue t}else O.boundary?O.lastVisited=-C:O.lastVisited=C}}return}return p},T.addPeaks=function(b,_){var C=this.vertices.length-1,M=this.dimension,E=this.vertices,A=this.tuple,h=this.interior,p=this.simplices,k=[_];_.lastVisited=C,_.vertices[_.vertices.indexOf(-1)]=C,_.boundary=!1,h.push(_);for(var w=[];k.length>0;){var _=k.pop(),R=_.vertices,O=_.adjacent,N=R.indexOf(C);if(!(N<0)){for(var V=0;V<=M;++V)if(V!==N){var H=O[V];if(!(!H.boundary||H.lastVisited>=C)){var F=H.vertices;if(H.lastVisited!==-C){for(var U=0,W=0;W<=M;++W)F[W]<0?(U=W,A[W]=b):A[W]=E[F[W]];var q=this.orient();if(q>0){F[U]=C,H.boundary=!1,h.push(H),k.push(H),H.lastVisited=C;continue}else H.lastVisited=-C}var X=H.adjacent,lt=R.slice(),yt=O.slice(),pt=new o(lt,yt,!0);p.push(pt);var st=X.indexOf(_);if(!(st<0)){X[st]=pt,yt[N]=H,lt[V]=-1,yt[V]=_,O[V]=pt,pt.flip();for(var W=0;W<=M;++W){var tt=lt[W];if(!(tt<0||tt===C)){for(var dt=new Array(M-1),rt=0,at=0;at<=M;++at){var vt=lt[at];vt<0||at===W||(dt[rt++]=vt)}w.push(new i(dt,pt,W))}}}}}}}w.sort(s);for(var V=0;V+1=0?h[k++]=p[R]:w=R&1;if(w===(b&1)){var O=h[0];h[0]=h[1],h[1]=O}_.push(h)}}return _};function u(b,_){var C=b.length;if(C===0)throw new Error("Must have at least d+1 points");var M=b[0].length;if(C<=M)throw new Error("Must input at least d+1 points");var E=b.slice(0,M+1),A=a.apply(void 0,E);if(A===0)throw new Error("Input not in general position");for(var h=new Array(M+1),p=0;p<=M;++p)h[p]=p;A<0&&(h[0]=1,h[1]=0);for(var k=new o(h,new Array(M+1),!1),w=k.adjacent,R=new Array(M+2),p=0;p<=M;++p){for(var O=h.slice(),N=0;N<=M;++N)N===p&&(O[N]=-1);var V=O[0];O[0]=O[1],O[1]=V;var H=new o(O,new Array(M+1),!0);w[p]=H,R[p]=H}R[M+1]=k;for(var p=0;p<=M;++p)for(var O=w[p].vertices,F=w[p].adjacent,N=0;N<=M;++N){var U=O[N];if(U<0){F[N]=k;continue}for(var W=0;W<=M;++W)w[W].vertices.indexOf(U)<0&&(F[N]=w[W])}for(var q=new v(M,E,R),X=!!_,p=M+1;p=1},u.isTransparent=function(){return this.opacity<1},u.pickSlots=1,u.setPickBase=function(A){this.pickId=A};function b(A){for(var h=y({colormap:A,nshades:256,format:"rgba"}),p=new Uint8Array(1024),k=0;k<256;++k){for(var w=h[k],R=0;R<3;++R)p[4*k+R]=w[R];p[4*k+3]=w[3]*255}return x(p,[256,256,4],[4,0,1])}function _(A){for(var h=A.length,p=new Array(h),k=0;k0){var W=this.triShader;W.bind(),W.uniforms=N,this.triangleVAO.bind(),h.drawArrays(h.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},u.drawPick=function(A){A=A||{};for(var h=this.gl,p=A.model||v,k=A.view||v,w=A.projection||v,R=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],O=0;O<3;++O)R[0][O]=Math.max(R[0][O],this.clipBounds[0][O]),R[1][O]=Math.min(R[1][O],this.clipBounds[1][O]);this._model=[].slice.call(p),this._view=[].slice.call(k),this._projection=[].slice.call(w),this._resolution=[h.drawingBufferWidth,h.drawingBufferHeight];var N={model:p,view:k,projection:w,clipBounds:R,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},V=this.pickShader;V.bind(),V.uniforms=N,this.triangleCount>0&&(this.triangleVAO.bind(),h.drawArrays(h.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},u.pick=function(A){if(!A||A.id!==this.pickId)return null;var h=A.value[0]+256*A.value[1]+65536*A.value[2],p=this.cells[h],k=this.positions[p[1]].slice(0,3),w={position:k,dataCoordinate:k,index:Math.floor(p[1]/48)};return this.traceType==="cone"?w.index=Math.floor(p[1]/48):this.traceType==="streamtube"&&(w.intensity=this.intensity[p[1]],w.velocity=this.vectors[p[1]].slice(0,3),w.divergence=this.vectors[p[1]][3],w.index=h),w},u.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function C(A,h){var p=a(A,h.meshShader.vertex,h.meshShader.fragment,null,h.meshShader.attributes);return p.attributes.position.location=0,p.attributes.color.location=2,p.attributes.uv.location=3,p.attributes.vector.location=4,p}function M(A,h){var p=a(A,h.pickShader.vertex,h.pickShader.fragment,null,h.pickShader.attributes);return p.attributes.position.location=0,p.attributes.id.location=1,p.attributes.vector.location=4,p}function E(A,h,p){var k=p.shaders;arguments.length===1&&(h=A,A=h.gl);var w=C(A,k),R=M(A,k),O=i(A,x(new Uint8Array([255,255,255,255]),[1,1,4]));O.generateMipmap(),O.minFilter=A.LINEAR_MIPMAP_LINEAR,O.magFilter=A.LINEAR;var N=n(A),V=n(A),H=n(A),F=n(A),U=n(A),W=o(A,[{buffer:N,type:A.FLOAT,size:4},{buffer:U,type:A.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:H,type:A.FLOAT,size:4},{buffer:F,type:A.FLOAT,size:2},{buffer:V,type:A.FLOAT,size:4}]),q=new T(A,O,w,R,N,V,U,H,F,W,p.traceType||"cone");return q.update(h),q}t.exports=E},9127:function(t,e,r){t.exports=o;var a=r(6204),n=r(5771);function o(i){return n(a(i))}},9131:function(t,e,r){var a=r(5177),n=r(9288);t.exports=o;function o(i,s){return s=s||1,i[0]=Math.random(),i[1]=Math.random(),i[2]=Math.random(),i[3]=Math.random(),a(i,i),n(i,i,s),i}},9165:function(t,e,r){t.exports=T;var a=r(2762),n=r(8116),o=r(3436),i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(u,b,_,C){this.gl=u,this.shader=C,this.buffer=b,this.vao=_,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var f=s.prototype;f.isOpaque=function(){return!this.hasAlpha},f.isTransparent=function(){return this.hasAlpha},f.drawTransparent=f.draw=function(u){var b=this.gl,_=this.shader.uniforms;this.shader.bind();var C=_.view=u.view||i,M=_.projection=u.projection||i;_.model=u.model||i,_.clipBounds=this.clipBounds,_.opacity=this.opacity;var E=C[12],A=C[13],h=C[14],p=C[15],k=u._ortho||!1,w=k?2:1,R=w*this.pixelRatio*(M[3]*E+M[7]*A+M[11]*h+M[15]*p)/b.drawingBufferHeight;this.vao.bind();for(var O=0;O<3;++O)b.lineWidth(this.lineWidth[O]*this.pixelRatio),_.capSize=this.capSize[O]*R,this.lineCount[O]&&b.drawArrays(b.LINES,this.lineOffset[O],this.lineCount[O]);this.vao.unbind()};function x(u,b){for(var _=0;_<3;++_)u[0][_]=Math.min(u[0][_],b[_]),u[1][_]=Math.max(u[1][_],b[_])}var y=function(){for(var u=new Array(3),b=0;b<3;++b){for(var _=[],C=1;C<=2;++C)for(var M=-1;M<=1;M+=2){var E=(C+b)%3,A=[0,0,0];A[E]=M,_.push(A)}u[b]=_}return u}();function v(u,b,_,C){for(var M=y[C],E=0;E0){var N=k.slice();N[h]+=R[1][h],M.push(k[0],k[1],k[2],O[0],O[1],O[2],O[3],0,0,0,N[0],N[1],N[2],O[0],O[1],O[2],O[3],0,0,0),x(this.bounds,N),A+=2+v(M,N,O,h)}}}this.lineCount[h]=A-this.lineOffset[h]}this.buffer.update(M)}},f.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function T(u){var b=u.gl,_=a(b),C=n(b,[{buffer:_,type:b.FLOAT,size:3,offset:0,stride:40},{buffer:_,type:b.FLOAT,size:4,offset:12,stride:40},{buffer:_,type:b.FLOAT,size:3,offset:28,stride:40}]),M=o(b);M.attributes.position.location=0,M.attributes.color.location=1,M.attributes.offset.location=2;var E=new s(b,_,C,M);return E.update(u),E}},9215:function(t,e,r){t.exports=x;var a=r(4769),n=r(2478);function o(y,v,T){return Math.min(v,Math.max(y,T))}function i(y,v,T){this.dimension=y.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var u=0;u=T-1)for(var A=_.length-1,p=y-v[T-1],h=0;h=T-1)for(var E=_.length-1,A=y-v[T-1],h=0;h=0;--T)if(y[--v])return!1;return!0},s.jump=function(y){var v=this.lastT(),T=this.dimension;if(!(y0;--h)u.push(o(M[h-1],E[h-1],arguments[h])),b.push(0)}},s.push=function(y){var v=this.lastT(),T=this.dimension;if(!(y1e-6?1/C:0;this._time.push(y);for(var p=T;p>0;--p){var k=o(E[p-1],A[p-1],arguments[p]);u.push(k),b.push((k-u[_++])*h)}}},s.set=function(y){var v=this.dimension;if(!(y0;--M)T.push(o(_[M-1],C[M-1],arguments[M])),u.push(0)}},s.move=function(y){var v=this.lastT(),T=this.dimension;if(!(y<=v||arguments.length!==T+1)){var u=this._state,b=this._velocity,_=u.length-this.dimension,C=this.bounds,M=C[0],E=C[1],A=y-v,h=A>1e-6?1/A:0;this._time.push(y);for(var p=T;p>0;--p){var k=arguments[p];u.push(o(M[p-1],E[p-1],u[_++]+k)),b.push(k*h)}}},s.idle=function(y){var v=this.lastT();if(!(y=0;--h)u.push(o(M[h],E[h],u[_]+A*b[_])),b.push(0),_+=1}};function f(y){for(var v=new Array(y),T=0;T1&&i.indexOf("Macintosh")!==-1&&i.indexOf("Safari")!==-1&&(s=!0),s}},9226:function(t){t.exports=e;function e(r,a){return r[0]=Math.ceil(a[0]),r[1]=Math.ceil(a[1]),r[2]=Math.ceil(a[2]),r}},9265:function(t){t.exports=e;function e(r,a){return r[0]===a[0]&&r[1]===a[1]&&r[2]===a[2]}},9288:function(t){t.exports=e;function e(r,a,n){return r[0]=a[0]*n,r[1]=a[1]*n,r[2]=a[2]*n,r[3]=a[3]*n,r}},9346:function(t){var e=new Float64Array(4),r=new Float64Array(4),a=new Float64Array(4);function n(o,i,s,f,x){e.length=v?(p=1,w=v+2*b+C):(p=-b/v,w=b*p+C)):(p=0,_>=0?(k=0,w=C):-_>=u?(k=1,w=u+2*_+C):(k=-_/u,w=_*k+C));else if(k<0)k=0,b>=0?(p=0,w=C):-b>=v?(p=1,w=v+2*b+C):(p=-b/v,w=b*p+C);else{var R=1/h;p*=R,k*=R,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+C}else{var O,N,V,H;p<0?(O=T+b,N=u+_,N>O?(V=N-O,H=v-2*T+u,V>=H?(p=1,k=0,w=v+2*b+C):(p=V/H,k=1-p,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+C)):(p=0,N<=0?(k=1,w=u+2*_+C):_>=0?(k=0,w=C):(k=-_/u,w=_*k+C))):k<0?(O=T+_,N=v+b,N>O?(V=N-O,H=v-2*T+u,V>=H?(k=1,p=0,w=u+2*_+C):(k=V/H,p=1-k,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+C)):(k=0,N<=0?(p=1,w=v+2*b+C):b>=0?(p=0,w=C):(p=-b/v,w=b*p+C))):(V=u+_-T-b,V<=0?(p=0,k=1,w=u+2*_+C):(H=v-2*T+u,V>=H?(p=1,k=0,w=v+2*b+C):(p=V/H,k=1-p,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+C)))}for(var F=1-p-k,y=0;y_)for(u=_;ub)for(u=b;u<_;u++)this.gl.disableVertexAttribArray(u);this.gl.lastAttribCount=b,this.gl.useProgram(this.program)},y.dispose=function(){for(var u=this.gl.lastAttribCount,b=0;b=0){for(var F=H.type.charAt(H.type.length-1)|0,U=new Array(F),W=0;W=0;)q+=1;N[V]=q}var X=new Array(_.length);function lt(){E.program=i.program(A,E._vref,E._fref,O,N);for(var yt=0;yt<_.length;++yt)X[yt]=A.getUniformLocation(E.program,_[yt].name)}lt(),E._relink=lt,E.types={uniforms:o(_),attributes:o(C)},E.attributes=n(A,E,R,N),Object.defineProperty(E,"uniforms",a(A,E,_,X))};function T(u,b,_,C,M){var E=new x(u);return E.update(b,_,C,M),E}t.exports=T},9499:function(t,e,r){t.exports=vt;var a=r(8828),n=r(2762),o=r(8116),i=r(7766),s=r(1888),f=r(6729),x=r(5298),y=r(9994),v=r(9618),T=r(3711),u=r(6760),b=r(7608),_=r(2478),C=r(6199),M=r(990),E=M.createShader,A=M.createContourShader,h=M.createPickShader,p=M.createPickContourShader,k=40,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],R=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],O=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var it=0;it<3;++it){var Y=O[it],ft=(it+1)%3,ut=(it+2)%3;Y[ft+0]=1,Y[ut+3]=1,Y[it+6]=1}})();function N(it,Y,ft,ut,wt){this.position=it,this.index=Y,this.uv=ft,this.level=ut,this.dataCoordinate=wt}var V=256;function H(it,Y,ft,ut,wt,zt,Pt,Wt,Ht,Jt,ge,he,de,se,Tt){this.gl=it,this.shape=Y,this.bounds=ft,this.objectOffset=Tt,this.intensityBounds=[],this._shader=ut,this._pickShader=wt,this._coordinateBuffer=zt,this._vao=Pt,this._colorMap=Wt,this._contourShader=Ht,this._contourPickShader=Jt,this._contourBuffer=ge,this._contourVAO=he,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new N([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=de,this._dynamicVAO=se,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[v(s.mallocFloat(1024),[0,0]),v(s.mallocFloat(1024),[0,0]),v(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var F=H.prototype;F.genColormap=function(it,Y){var ft=!1,ut=y([f({colormap:it,nshades:V,format:"rgba"}).map(function(wt,zt){var Pt=Y?U(zt/255,Y):wt[3];return Pt<1&&(ft=!0),[wt[0],wt[1],wt[2],255*Pt]})]);return x.divseq(ut,255),this.hasAlphaScale=ft,ut},F.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},F.isOpaque=function(){return!this.isTransparent()},F.pickSlots=1,F.setPickBase=function(it){this.pickId=it};function U(it,Y){if(!Y||!Y.length)return 1;for(var ft=0;ftit&&ft>0){var ut=(Y[ft][0]-it)/(Y[ft][0]-Y[ft-1][0]);return Y[ft][1]*(1-ut)+ut*Y[ft-1][1]}}return 1}var W=[0,0,0],q={showSurface:!1,showContour:!1,projections:[w.slice(),w.slice(),w.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function X(it,Y){var ft,ut,wt,zt=Y.axes&&Y.axes.lastCubeProps.axis||W,Pt=Y.showSurface,Wt=Y.showContour;for(ft=0;ft<3;++ft)for(Pt=Pt||Y.surfaceProject[ft],ut=0;ut<3;++ut)Wt=Wt||Y.contourProject[ft][ut];for(ft=0;ft<3;++ft){var Ht=q.projections[ft];for(ut=0;ut<16;++ut)Ht[ut]=0;for(ut=0;ut<4;++ut)Ht[5*ut]=1;Ht[5*ft]=0,Ht[12+ft]=Y.axesBounds[+(zt[ft]>0)][ft],u(Ht,it.model,Ht);var Jt=q.clipBounds[ft];for(wt=0;wt<2;++wt)for(ut=0;ut<3;++ut)Jt[wt][ut]=it.clipBounds[wt][ut];Jt[0][ft]=-1e8,Jt[1][ft]=1e8}return q.showSurface=Pt,q.showContour=Wt,q}var lt={model:w,view:w,projection:w,inverseModel:w.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},yt=w.slice(),pt=[1,0,0,0,1,0,0,0,1];function st(it,Y){it=it||{};var ft=this.gl;ft.disable(ft.CULL_FACE),this._colorMap.bind(0);var ut=lt;ut.model=it.model||w,ut.view=it.view||w,ut.projection=it.projection||w,ut.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ut.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ut.objectOffset=this.objectOffset,ut.contourColor=this.contourColor[0],ut.inverseModel=b(ut.inverseModel,ut.model);for(var wt=0;wt<2;++wt)for(var zt=ut.clipBounds[wt],Pt=0;Pt<3;++Pt)zt[Pt]=Math.min(Math.max(this.clipBounds[wt][Pt],-1e8),1e8);ut.kambient=this.ambientLight,ut.kdiffuse=this.diffuseLight,ut.kspecular=this.specularLight,ut.roughness=this.roughness,ut.fresnel=this.fresnel,ut.opacity=this.opacity,ut.height=0,ut.permutation=pt,ut.vertexColor=this.vertexColor;var Wt=yt;for(u(Wt,ut.view,ut.model),u(Wt,ut.projection,Wt),b(Wt,Wt),wt=0;wt<3;++wt)ut.eyePosition[wt]=Wt[12+wt]/Wt[15];var Ht=Wt[15];for(wt=0;wt<3;++wt)Ht+=this.lightPosition[wt]*Wt[4*wt+3];for(wt=0;wt<3;++wt){var Jt=Wt[12+wt];for(Pt=0;Pt<3;++Pt)Jt+=Wt[4*Pt+wt]*this.lightPosition[Pt];ut.lightPosition[wt]=Jt/Ht}var ge=X(ut,this);if(ge.showSurface){for(this._shader.bind(),this._shader.uniforms=ut,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ft.TRIANGLES,this._vertexCount),wt=0;wt<3;++wt)!this.surfaceProject[wt]||!this.vertexCount||(this._shader.uniforms.model=ge.projections[wt],this._shader.uniforms.clipBounds=ge.clipBounds[wt],this._vao.draw(ft.TRIANGLES,this._vertexCount));this._vao.unbind()}if(ge.showContour){var he=this._contourShader;ut.kambient=1,ut.kdiffuse=0,ut.kspecular=0,ut.opacity=1,he.bind(),he.uniforms=ut;var de=this._contourVAO;for(de.bind(),wt=0;wt<3;++wt)for(he.uniforms.permutation=O[wt],ft.lineWidth(this.contourWidth[wt]*this.pixelRatio),Pt=0;Pt>4)/16)/255,wt=Math.floor(ut),zt=ut-wt,Pt=Y[1]*(it.value[1]+(it.value[2]&15)/16)/255,Wt=Math.floor(Pt),Ht=Pt-Wt;wt+=1,Wt+=1;var Jt=ft.position;Jt[0]=Jt[1]=Jt[2]=0;for(var ge=0;ge<2;++ge)for(var he=ge?zt:1-zt,de=0;de<2;++de)for(var se=de?Ht:1-Ht,Tt=wt+ge,Lt=Wt+de,Mt=he*se,te=0;te<3;++te)Jt[te]+=this._field[te].get(Tt,Lt)*Mt;for(var ve=this._pickResult.level,oe=0;oe<3;++oe)if(ve[oe]=_.le(this.contourLevels[oe],Jt[oe]),ve[oe]<0)this.contourLevels[oe].length>0&&(ve[oe]=0);else if(ve[oe]Math.abs(He-Jt[oe])&&(ve[oe]+=1)}for(ft.index[0]=zt<.5?wt:wt+1,ft.index[1]=Ht<.5?Wt:Wt+1,ft.uv[0]=ut/Y[0],ft.uv[1]=Pt/Y[1],te=0;te<3;++te)ft.dataCoordinate[te]=this._field[te].get(ft.index[0],ft.index[1]);return ft},F.padField=function(it,Y){var ft=Y.shape.slice(),ut=it.shape.slice();x.assign(it.lo(1,1).hi(ft[0],ft[1]),Y),x.assign(it.lo(1).hi(ft[0],1),Y.hi(ft[0],1)),x.assign(it.lo(1,ut[1]-1).hi(ft[0],1),Y.lo(0,ft[1]-1).hi(ft[0],1)),x.assign(it.lo(0,1).hi(1,ft[1]),Y.hi(1)),x.assign(it.lo(ut[0]-1,1).hi(1,ft[1]),Y.lo(ft[0]-1)),it.set(0,0,Y.get(0,0)),it.set(0,ut[1]-1,Y.get(0,ft[1]-1)),it.set(ut[0]-1,0,Y.get(ft[0]-1,0)),it.set(ut[0]-1,ut[1]-1,Y.get(ft[0]-1,ft[1]-1))};function dt(it,Y){return Array.isArray(it)?[Y(it[0]),Y(it[1]),Y(it[2])]:[Y(it),Y(it),Y(it)]}function rt(it){return Array.isArray(it)?it.length===3?[it[0],it[1],it[2],1]:[it[0],it[1],it[2],it[3]]:[0,0,0,1]}function at(it){if(Array.isArray(it)){if(Array.isArray(it))return[rt(it[0]),rt(it[1]),rt(it[2])];var Y=rt(it);return[Y.slice(),Y.slice(),Y.slice()]}}F.update=function(it){it=it||{},this.objectOffset=it.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in it&&(this.contourWidth=dt(it.contourWidth,Number)),"showContour"in it&&(this.showContour=dt(it.showContour,Boolean)),"showSurface"in it&&(this.showSurface=!!it.showSurface),"contourTint"in it&&(this.contourTint=dt(it.contourTint,Boolean)),"contourColor"in it&&(this.contourColor=at(it.contourColor)),"contourProject"in it&&(this.contourProject=dt(it.contourProject,function(Zi){return dt(Zi,Boolean)})),"surfaceProject"in it&&(this.surfaceProject=it.surfaceProject),"dynamicColor"in it&&(this.dynamicColor=at(it.dynamicColor)),"dynamicTint"in it&&(this.dynamicTint=dt(it.dynamicTint,Number)),"dynamicWidth"in it&&(this.dynamicWidth=dt(it.dynamicWidth,Number)),"opacity"in it&&(this.opacity=it.opacity),"opacityscale"in it&&(this.opacityscale=it.opacityscale),"colorBounds"in it&&(this.colorBounds=it.colorBounds),"vertexColor"in it&&(this.vertexColor=it.vertexColor?1:0),"colormap"in it&&this._colorMap.setPixels(this.genColormap(it.colormap,this.opacityscale));var Y=it.field||it.coords&&it.coords[2]||null,ft=!1;if(Y||(this._field[2].shape[0]||this._field[2].shape[2]?Y=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):Y=this._field[2].hi(0,0)),"field"in it||"coords"in it){var ut=(Y.shape[0]+2)*(Y.shape[1]+2);ut>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(a.nextPow2(ut))),this._field[2]=v(this._field[2].data,[Y.shape[0]+2,Y.shape[1]+2]),this.padField(this._field[2],Y),this.shape=Y.shape.slice();for(var wt=this.shape,zt=0;zt<2;++zt)this._field[2].size>this._field[zt].data.length&&(s.freeFloat(this._field[zt].data),this._field[zt].data=s.mallocFloat(this._field[2].size)),this._field[zt]=v(this._field[zt].data,[wt[0]+2,wt[1]+2]);if(it.coords){var Pt=it.coords;if(!Array.isArray(Pt)||Pt.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(zt=0;zt<2;++zt){var Wt=Pt[zt];for(de=0;de<2;++de)if(Wt.shape[de]!==wt[de])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[zt],Wt)}}else if(it.ticks){var Ht=it.ticks;if(!Array.isArray(Ht)||Ht.length!==2)throw new Error("gl-surface: invalid ticks");for(zt=0;zt<2;++zt){var Jt=Ht[zt];if((Array.isArray(Jt)||Jt.length)&&(Jt=v(Jt)),Jt.shape[0]!==wt[zt])throw new Error("gl-surface: invalid tick length");var ge=v(Jt.data,wt);ge.stride[zt]=Jt.stride[0],ge.stride[zt^1]=0,this.padField(this._field[zt],ge)}}else{for(zt=0;zt<2;++zt){var he=[0,0];he[zt]=1,this._field[zt]=v(this._field[zt].data,[wt[0]+2,wt[1]+2],he,0)}this._field[0].set(0,0,0);for(var de=0;de0){for(var Pi=0;Pi<5;++Pi)Tr.pop();Ct-=1}continue t}}}Hn.push(Ct)}this._contourOffsets[pr]=Vn,this._contourCounts[pr]=Hn}var Di=s.mallocFloat(Tr.length);for(zt=0;zt=0&&(A=M|0,E+=p*A,h-=A),new _(this.data,h,p,E)},C.step=function(M){var E=this.shape[0],A=this.stride[0],h=this.offset,p=0,k=Math.ceil;return typeof M=="number"&&(p=M|0,p<0?(h+=A*(E-1),E=k(-E/p)):E=k(E/p),A*=p),new _(this.data,E,A,h)},C.transpose=function(M){M=M===void 0?0:M|0;var E=this.shape,A=this.stride;return new _(this.data,E[M],A[M],this.offset)},C.pick=function(M){var E=[],A=[],h=this.offset;typeof M=="number"&&M>=0?h=h+this.stride[0]*M|0:(E.push(this.shape[0]),A.push(this.stride[0]));var p=u[E.length+1];return p(this.data,E,A,h)},function(M,E,A,h){return new _(M,E[0],A[0],h)}},2:function(T,u,b){function _(M,E,A,h,p,k){this.data=M,this.shape=[E,A],this.stride=[h,p],this.offset=k|0}var C=_.prototype;return C.dtype=T,C.dimension=2,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(C,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),C.set=function(M,E,A){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*E,A):this.data[this.offset+this.stride[0]*M+this.stride[1]*E]=A},C.get=function(M,E){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*E):this.data[this.offset+this.stride[0]*M+this.stride[1]*E]},C.index=function(M,E){return this.offset+this.stride[0]*M+this.stride[1]*E},C.hi=function(M,E){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof E!="number"||E<0?this.shape[1]:E|0,this.stride[0],this.stride[1],this.offset)},C.lo=function(M,E){var A=this.offset,h=0,p=this.shape[0],k=this.shape[1],w=this.stride[0],R=this.stride[1];return typeof M=="number"&&M>=0&&(h=M|0,A+=w*h,p-=h),typeof E=="number"&&E>=0&&(h=E|0,A+=R*h,k-=h),new _(this.data,p,k,w,R,A)},C.step=function(M,E){var A=this.shape[0],h=this.shape[1],p=this.stride[0],k=this.stride[1],w=this.offset,R=0,O=Math.ceil;return typeof M=="number"&&(R=M|0,R<0?(w+=p*(A-1),A=O(-A/R)):A=O(A/R),p*=R),typeof E=="number"&&(R=E|0,R<0?(w+=k*(h-1),h=O(-h/R)):h=O(h/R),k*=R),new _(this.data,A,h,p,k,w)},C.transpose=function(M,E){M=M===void 0?0:M|0,E=E===void 0?1:E|0;var A=this.shape,h=this.stride;return new _(this.data,A[M],A[E],h[M],h[E],this.offset)},C.pick=function(M,E){var A=[],h=[],p=this.offset;typeof M=="number"&&M>=0?p=p+this.stride[0]*M|0:(A.push(this.shape[0]),h.push(this.stride[0])),typeof E=="number"&&E>=0?p=p+this.stride[1]*E|0:(A.push(this.shape[1]),h.push(this.stride[1]));var k=u[A.length+1];return k(this.data,A,h,p)},function(M,E,A,h){return new _(M,E[0],E[1],A[0],A[1],h)}},3:function(T,u,b){function _(M,E,A,h,p,k,w,R){this.data=M,this.shape=[E,A,h],this.stride=[p,k,w],this.offset=R|0}var C=_.prototype;return C.dtype=T,C.dimension=3,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(C,"order",{get:function(){var M=Math.abs(this.stride[0]),E=Math.abs(this.stride[1]),A=Math.abs(this.stride[2]);return M>E?E>A?[2,1,0]:M>A?[1,2,0]:[1,0,2]:M>A?[2,0,1]:A>E?[0,1,2]:[0,2,1]}}),C.set=function(M,E,A,h){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A,h):this.data[this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A]=h},C.get=function(M,E,A){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A):this.data[this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A]},C.index=function(M,E,A){return this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A},C.hi=function(M,E,A){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof E!="number"||E<0?this.shape[1]:E|0,typeof A!="number"||A<0?this.shape[2]:A|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},C.lo=function(M,E,A){var h=this.offset,p=0,k=this.shape[0],w=this.shape[1],R=this.shape[2],O=this.stride[0],N=this.stride[1],V=this.stride[2];return typeof M=="number"&&M>=0&&(p=M|0,h+=O*p,k-=p),typeof E=="number"&&E>=0&&(p=E|0,h+=N*p,w-=p),typeof A=="number"&&A>=0&&(p=A|0,h+=V*p,R-=p),new _(this.data,k,w,R,O,N,V,h)},C.step=function(M,E,A){var h=this.shape[0],p=this.shape[1],k=this.shape[2],w=this.stride[0],R=this.stride[1],O=this.stride[2],N=this.offset,V=0,H=Math.ceil;return typeof M=="number"&&(V=M|0,V<0?(N+=w*(h-1),h=H(-h/V)):h=H(h/V),w*=V),typeof E=="number"&&(V=E|0,V<0?(N+=R*(p-1),p=H(-p/V)):p=H(p/V),R*=V),typeof A=="number"&&(V=A|0,V<0?(N+=O*(k-1),k=H(-k/V)):k=H(k/V),O*=V),new _(this.data,h,p,k,w,R,O,N)},C.transpose=function(M,E,A){M=M===void 0?0:M|0,E=E===void 0?1:E|0,A=A===void 0?2:A|0;var h=this.shape,p=this.stride;return new _(this.data,h[M],h[E],h[A],p[M],p[E],p[A],this.offset)},C.pick=function(M,E,A){var h=[],p=[],k=this.offset;typeof M=="number"&&M>=0?k=k+this.stride[0]*M|0:(h.push(this.shape[0]),p.push(this.stride[0])),typeof E=="number"&&E>=0?k=k+this.stride[1]*E|0:(h.push(this.shape[1]),p.push(this.stride[1])),typeof A=="number"&&A>=0?k=k+this.stride[2]*A|0:(h.push(this.shape[2]),p.push(this.stride[2]));var w=u[h.length+1];return w(this.data,h,p,k)},function(M,E,A,h){return new _(M,E[0],E[1],E[2],A[0],A[1],A[2],h)}},4:function(T,u,b){function _(M,E,A,h,p,k,w,R,O,N){this.data=M,this.shape=[E,A,h,p],this.stride=[k,w,R,O],this.offset=N|0}var C=_.prototype;return C.dtype=T,C.dimension=4,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(C,"order",{get:b}),C.set=function(M,E,A,h,p){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h,p):this.data[this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h]=p},C.get=function(M,E,A,h){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h):this.data[this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h]},C.index=function(M,E,A,h){return this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h},C.hi=function(M,E,A,h){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof E!="number"||E<0?this.shape[1]:E|0,typeof A!="number"||A<0?this.shape[2]:A|0,typeof h!="number"||h<0?this.shape[3]:h|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},C.lo=function(M,E,A,h){var p=this.offset,k=0,w=this.shape[0],R=this.shape[1],O=this.shape[2],N=this.shape[3],V=this.stride[0],H=this.stride[1],F=this.stride[2],U=this.stride[3];return typeof M=="number"&&M>=0&&(k=M|0,p+=V*k,w-=k),typeof E=="number"&&E>=0&&(k=E|0,p+=H*k,R-=k),typeof A=="number"&&A>=0&&(k=A|0,p+=F*k,O-=k),typeof h=="number"&&h>=0&&(k=h|0,p+=U*k,N-=k),new _(this.data,w,R,O,N,V,H,F,U,p)},C.step=function(M,E,A,h){var p=this.shape[0],k=this.shape[1],w=this.shape[2],R=this.shape[3],O=this.stride[0],N=this.stride[1],V=this.stride[2],H=this.stride[3],F=this.offset,U=0,W=Math.ceil;return typeof M=="number"&&(U=M|0,U<0?(F+=O*(p-1),p=W(-p/U)):p=W(p/U),O*=U),typeof E=="number"&&(U=E|0,U<0?(F+=N*(k-1),k=W(-k/U)):k=W(k/U),N*=U),typeof A=="number"&&(U=A|0,U<0?(F+=V*(w-1),w=W(-w/U)):w=W(w/U),V*=U),typeof h=="number"&&(U=h|0,U<0?(F+=H*(R-1),R=W(-R/U)):R=W(R/U),H*=U),new _(this.data,p,k,w,R,O,N,V,H,F)},C.transpose=function(M,E,A,h){M=M===void 0?0:M|0,E=E===void 0?1:E|0,A=A===void 0?2:A|0,h=h===void 0?3:h|0;var p=this.shape,k=this.stride;return new _(this.data,p[M],p[E],p[A],p[h],k[M],k[E],k[A],k[h],this.offset)},C.pick=function(M,E,A,h){var p=[],k=[],w=this.offset;typeof M=="number"&&M>=0?w=w+this.stride[0]*M|0:(p.push(this.shape[0]),k.push(this.stride[0])),typeof E=="number"&&E>=0?w=w+this.stride[1]*E|0:(p.push(this.shape[1]),k.push(this.stride[1])),typeof A=="number"&&A>=0?w=w+this.stride[2]*A|0:(p.push(this.shape[2]),k.push(this.stride[2])),typeof h=="number"&&h>=0?w=w+this.stride[3]*h|0:(p.push(this.shape[3]),k.push(this.stride[3]));var R=u[p.length+1];return R(this.data,p,k,w)},function(M,E,A,h){return new _(M,E[0],E[1],E[2],E[3],A[0],A[1],A[2],A[3],h)}},5:function(T,u,b){function _(M,E,A,h,p,k,w,R,O,N,V,H){this.data=M,this.shape=[E,A,h,p,k],this.stride=[w,R,O,N,V],this.offset=H|0}var C=_.prototype;return C.dtype=T,C.dimension=5,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(C,"order",{get:b}),C.set=function(M,E,A,h,p,k){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p,k):this.data[this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p]=k},C.get=function(M,E,A,h,p){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p):this.data[this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p]},C.index=function(M,E,A,h,p){return this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p},C.hi=function(M,E,A,h,p){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof E!="number"||E<0?this.shape[1]:E|0,typeof A!="number"||A<0?this.shape[2]:A|0,typeof h!="number"||h<0?this.shape[3]:h|0,typeof p!="number"||p<0?this.shape[4]:p|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},C.lo=function(M,E,A,h,p){var k=this.offset,w=0,R=this.shape[0],O=this.shape[1],N=this.shape[2],V=this.shape[3],H=this.shape[4],F=this.stride[0],U=this.stride[1],W=this.stride[2],q=this.stride[3],X=this.stride[4];return typeof M=="number"&&M>=0&&(w=M|0,k+=F*w,R-=w),typeof E=="number"&&E>=0&&(w=E|0,k+=U*w,O-=w),typeof A=="number"&&A>=0&&(w=A|0,k+=W*w,N-=w),typeof h=="number"&&h>=0&&(w=h|0,k+=q*w,V-=w),typeof p=="number"&&p>=0&&(w=p|0,k+=X*w,H-=w),new _(this.data,R,O,N,V,H,F,U,W,q,X,k)},C.step=function(M,E,A,h,p){var k=this.shape[0],w=this.shape[1],R=this.shape[2],O=this.shape[3],N=this.shape[4],V=this.stride[0],H=this.stride[1],F=this.stride[2],U=this.stride[3],W=this.stride[4],q=this.offset,X=0,lt=Math.ceil;return typeof M=="number"&&(X=M|0,X<0?(q+=V*(k-1),k=lt(-k/X)):k=lt(k/X),V*=X),typeof E=="number"&&(X=E|0,X<0?(q+=H*(w-1),w=lt(-w/X)):w=lt(w/X),H*=X),typeof A=="number"&&(X=A|0,X<0?(q+=F*(R-1),R=lt(-R/X)):R=lt(R/X),F*=X),typeof h=="number"&&(X=h|0,X<0?(q+=U*(O-1),O=lt(-O/X)):O=lt(O/X),U*=X),typeof p=="number"&&(X=p|0,X<0?(q+=W*(N-1),N=lt(-N/X)):N=lt(N/X),W*=X),new _(this.data,k,w,R,O,N,V,H,F,U,W,q)},C.transpose=function(M,E,A,h,p){M=M===void 0?0:M|0,E=E===void 0?1:E|0,A=A===void 0?2:A|0,h=h===void 0?3:h|0,p=p===void 0?4:p|0;var k=this.shape,w=this.stride;return new _(this.data,k[M],k[E],k[A],k[h],k[p],w[M],w[E],w[A],w[h],w[p],this.offset)},C.pick=function(M,E,A,h,p){var k=[],w=[],R=this.offset;typeof M=="number"&&M>=0?R=R+this.stride[0]*M|0:(k.push(this.shape[0]),w.push(this.stride[0])),typeof E=="number"&&E>=0?R=R+this.stride[1]*E|0:(k.push(this.shape[1]),w.push(this.stride[1])),typeof A=="number"&&A>=0?R=R+this.stride[2]*A|0:(k.push(this.shape[2]),w.push(this.stride[2])),typeof h=="number"&&h>=0?R=R+this.stride[3]*h|0:(k.push(this.shape[3]),w.push(this.stride[3])),typeof p=="number"&&p>=0?R=R+this.stride[4]*p|0:(k.push(this.shape[4]),w.push(this.stride[4]));var O=u[k.length+1];return O(this.data,k,w,R)},function(M,E,A,h){return new _(M,E[0],E[1],E[2],E[3],E[4],A[0],A[1],A[2],A[3],A[4],h)}}};function f(T,u){var b=u===-1?"T":String(u),_=s[b];return u===-1?_(T):u===0?_(T,y[T][0]):_(T,y[T],i)}function x(T){if(a(T))return"buffer";if(n)switch(Object.prototype.toString.call(T)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(T)?"array":"generic"}var y={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function v(T,u,b,_){if(T===void 0){var p=y.array[0];return p([])}else typeof T=="number"&&(T=[T]);u===void 0&&(u=[T.length]);var C=u.length;if(b===void 0){b=new Array(C);for(var M=C-1,E=1;M>=0;--M)b[M]=E,E*=u[M]}if(_===void 0){_=0;for(var M=0;M1e-6?(b[0]=C/h,b[1]=M/h,b[2]=E/h,b[3]=A/h):(b[0]=b[1]=b[2]=0,b[3]=1)}function v(b,_,C){this.radius=a([C]),this.center=a(_),this.rotation=a(b),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var T=v.prototype;T.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},T.recalcMatrix=function(b){this.radius.curve(b),this.center.curve(b),this.rotation.curve(b);var _=this.computedRotation;y(_,_);var C=this.computedMatrix;o(C,_);var M=this.computedCenter,E=this.computedEye,A=this.computedUp,h=Math.exp(this.computedRadius[0]);E[0]=M[0]+h*C[2],E[1]=M[1]+h*C[6],E[2]=M[2]+h*C[10],A[0]=C[1],A[1]=C[5],A[2]=C[9];for(var p=0;p<3;++p){for(var k=0,w=0;w<3;++w)k+=C[p+4*w]*E[w];C[12+p]=-k}},T.getMatrix=function(b,_){this.recalcMatrix(b);var C=this.computedMatrix;if(_){for(var M=0;M<16;++M)_[M]=C[M];return _}return C},T.idle=function(b){this.center.idle(b),this.radius.idle(b),this.rotation.idle(b)},T.flush=function(b){this.center.flush(b),this.radius.flush(b),this.rotation.flush(b)},T.pan=function(b,_,C,M){_=_||0,C=C||0,M=M||0,this.recalcMatrix(b);var E=this.computedMatrix,A=E[1],h=E[5],p=E[9],k=f(A,h,p);A/=k,h/=k,p/=k;var w=E[0],R=E[4],O=E[8],N=w*A+R*h+O*p;w-=A*N,R-=h*N,O-=p*N;var V=f(w,R,O);w/=V,R/=V,O/=V,E[2],E[6],E[10];var H=w*_+A*C,F=R*_+h*C,U=O*_+p*C;this.center.move(b,H,F,U);var W=Math.exp(this.computedRadius[0]);W=Math.max(1e-4,W+M),this.radius.set(b,Math.log(W))},T.rotate=function(b,_,C,M){this.recalcMatrix(b),_=_||0,C=C||0;var E=this.computedMatrix,A=E[0],h=E[4],p=E[8],k=E[1],w=E[5],R=E[9],O=E[2],N=E[6],V=E[10],H=_*A+C*k,F=_*h+C*w,U=_*p+C*R,W=-(N*U-V*F),q=-(V*H-O*U),X=-(O*F-N*H),lt=Math.sqrt(Math.max(0,1-Math.pow(W,2)-Math.pow(q,2)-Math.pow(X,2))),yt=x(W,q,X,lt);yt>1e-6?(W/=yt,q/=yt,X/=yt,lt/=yt):(W=q=X=0,lt=1);var pt=this.computedRotation,st=pt[0],tt=pt[1],dt=pt[2],rt=pt[3],at=st*lt+rt*W+tt*X-dt*q,vt=tt*lt+rt*q+dt*W-st*X,it=dt*lt+rt*X+st*q-tt*W,Y=rt*lt-st*W-tt*q-dt*X;if(M){W=O,q=N,X=V;var ft=Math.sin(M)/f(W,q,X);W*=ft,q*=ft,X*=ft,lt=Math.cos(_),at=at*lt+Y*W+vt*X-it*q,vt=vt*lt+Y*q+it*W-at*X,it=it*lt+Y*X+at*q-vt*W,Y=Y*lt-at*W-vt*q-it*X}var ut=x(at,vt,it,Y);ut>1e-6?(at/=ut,vt/=ut,it/=ut,Y/=ut):(at=vt=it=0,Y=1),this.rotation.set(b,at,vt,it,Y)},T.lookAt=function(b,_,C,M){this.recalcMatrix(b),C=C||this.computedCenter,_=_||this.computedEye,M=M||this.computedUp;var E=this.computedMatrix;n(E,_,C,M);var A=this.computedRotation;s(A,E[0],E[1],E[2],E[4],E[5],E[6],E[8],E[9],E[10]),y(A,A),this.rotation.set(b,A[0],A[1],A[2],A[3]);for(var h=0,p=0;p<3;++p)h+=Math.pow(C[p]-_[p],2);this.radius.set(b,.5*Math.log(Math.max(h,1e-6))),this.center.set(b,C[0],C[1],C[2])},T.translate=function(b,_,C,M){this.center.move(b,_||0,C||0,M||0)},T.setMatrix=function(b,_){var C=this.computedRotation;s(C,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),y(C,C),this.rotation.set(b,C[0],C[1],C[2],C[3]);var M=this.computedMatrix;i(M,_);var E=M[15];if(Math.abs(E)>1e-6){var A=M[12]/E,h=M[13]/E,p=M[14]/E;this.recalcMatrix(b);var k=Math.exp(this.computedRadius[0]);this.center.set(b,A-M[2]*k,h-M[6]*k,p-M[10]*k),this.radius.idle(b)}else this.center.idle(b),this.radius.idle(b)},T.setDistance=function(b,_){_>0&&this.radius.set(b,Math.log(_))},T.setDistanceLimits=function(b,_){b>0?b=Math.log(b):b=-1/0,_>0?_=Math.log(_):_=1/0,_=Math.max(_,b),this.radius.bounds[0][0]=b,this.radius.bounds[1][0]=_},T.getDistanceLimits=function(b){var _=this.radius.bounds;return b?(b[0]=Math.exp(_[0][0]),b[1]=Math.exp(_[1][0]),b):[Math.exp(_[0][0]),Math.exp(_[1][0])]},T.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},T.fromJSON=function(b){var _=this.lastT(),C=b.center;C&&this.center.set(_,C[0],C[1],C[2]);var M=b.rotation;M&&this.rotation.set(_,M[0],M[1],M[2],M[3]);var E=b.distance;E&&E>0&&this.radius.set(_,Math.log(E)),this.setDistanceLimits(b.zoomMin,b.zoomMax)};function u(b){b=b||{};var _=b.center||[0,0,0],C=b.rotation||[0,0,0,1],M=b.radius||1;_=[].slice.call(_,0,3),C=[].slice.call(C,0,4),y(C,C);var E=new v(C,_,Math.log(M));return E.setDistanceLimits(b.zoomMin,b.zoomMax),("eye"in b||"up"in b)&&E.lookAt(0,b.eye,b.center,b.up),E}},9994:function(t,e,r){var a=r(9618),n=r(8277);t.exports=function(o,i){for(var s=[],f=o,x=1;Array.isArray(f);)s.push(f.length),x*=f.length,f=f[0];return s.length===0?a():(i||(i=a(new Float64Array(x),s)),n(i,o),i)}}},g={};function P(t){var e=g[t];if(e!==void 0)return e.exports;var r=g[t]={id:t,loaded:!1,exports:{}};return c[t].call(r.exports,r,r.exports,P),r.loaded=!0,r.exports}(function(){P.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){P.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t}}();var S=P(1964);$.exports=S})()}),nS=Ft((Q,$)=>{$.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}),Pj=Ft((Q,$)=>{var c=nS();$.exports=P;var g={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function P(S){var t,e=[],r=1,a;if(typeof S=="string")if(S=S.toLowerCase(),c[S])e=c[S].slice(),a="rgb";else if(S==="transparent")r=0,a="rgb",e=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(S)){var n=S.slice(1),o=n.length,i=o<=4;r=1,i?(e=[parseInt(n[0]+n[0],16),parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16)],o===4&&(r=parseInt(n[3]+n[3],16)/255)):(e=[parseInt(n[0]+n[1],16),parseInt(n[2]+n[3],16),parseInt(n[4]+n[5],16)],o===8&&(r=parseInt(n[6]+n[7],16)/255)),e[0]||(e[0]=0),e[1]||(e[1]=0),e[2]||(e[2]=0),a="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(S)){var s=t[1],f=s==="rgb",n=s.replace(/a$/,"");a=n;var o=n==="cmyk"?4:n==="gray"?1:3;e=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(v,T){if(/%$/.test(v))return T===o?parseFloat(v)/100:n==="rgb"?parseFloat(v)*255/100:parseFloat(v);if(n[T]==="h"){if(/deg$/.test(v))return parseFloat(v);if(g[v]!==void 0)return g[v]}return parseFloat(v)}),s===n&&e.push(1),r=f||e[o]===void 0?1:e[o],e=e.slice(0,o)}else S.length>10&&/[0-9](?:\s|\/)/.test(S)&&(e=S.match(/([0-9]+)/g).map(function(x){return parseFloat(x)}),a=S.match(/([a-z])/ig).join("").toLowerCase());else isNaN(S)?Array.isArray(S)||S.length?(e=[S[0],S[1],S[2]],a="rgb",r=S.length===4?S[3]:1):S instanceof Object&&(S.r!=null||S.red!=null||S.R!=null?(a="rgb",e=[S.r||S.red||S.R||0,S.g||S.green||S.G||0,S.b||S.blue||S.B||0]):(a="hsl",e=[S.h||S.hue||S.H||0,S.s||S.saturation||S.S||0,S.l||S.lightness||S.L||S.b||S.brightness]),r=S.a||S.alpha||S.opacity||1,S.opacity!=null&&(r/=100)):(a="rgb",e=[S>>>16,(S&65280)>>>8,S&255]);return{space:a,values:e,alpha:r}}}),zj=Ft((Q,$)=>{var c=Pj();$.exports=function(P){Array.isArray(P)&&P.raw&&(P=String.raw.apply(null,arguments));var S,t=c(P);if(!t.space)return[];var e=[0,0,0],r=t.space[0]==="h"?[360,100,100]:[255,255,255];return S=Array(3),S[0]=Math.min(Math.max(t.values[0],e[0]),r[0]),S[1]=Math.min(Math.max(t.values[1],e[1]),r[1]),S[2]=Math.min(Math.max(t.values[2],e[2]),r[2]),t.space[0]==="h"&&(S=g(S)),S.push(Math.min(Math.max(t.alpha,0),1)),S};function g(P){var S=P[0]/360,t=P[1]/100,e=P[2]/100,r,a,n,o,i,s=0;if(t===0)return i=e*255,[i,i,i];for(a=e<.5?e*(1+t):e+t-e*t,r=2*e-a,o=[0,0,0];s<3;)n=S+1/3*-(s-1),n<0?n++:n>1&&n--,i=6*n<1?r+(a-r)*6*n:2*n<1?a:3*n<2?r+(a-r)*(2/3-n)*6:r,o[s++]=i*255;return o}}),m3=Ft((Q,$)=>{$.exports=c;function c(g,P,S){return PS?S:g:gP?P:g}}),Vk=Ft((Q,$)=>{$.exports=function(c){switch(c){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}}),N1=Ft((Q,$)=>{var c=zj(),g=m3(),P=Vk();$.exports=function(t,e){(e==="float"||!e)&&(e="array"),e==="uint"&&(e="uint8"),e==="uint_clamped"&&(e="uint8_clamped");var r=P(e),a=new r(4),n=e!=="uint8"&&e!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=c(t),t[0]/=255,t[1]/=255,t[2]/=255),S(t)?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:255,n&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(n?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:1):(a[0]=g(Math.floor(t[0]*255),0,255),a[1]=g(Math.floor(t[1]*255),0,255),a[2]=g(Math.floor(t[2]*255),0,255),a[3]=t[3]==null?255:g(Math.floor(t[3]*255),0,255)),a)};function S(t){return!!(t instanceof Uint8Array||t instanceof Uint8ClampedArray||Array.isArray(t)&&(t[0]>1||t[0]===0)&&(t[1]>1||t[1]===0)&&(t[2]>1||t[2]===0)&&(!t[3]||t[3]>1))}}),Tv=Ft((Q,$)=>{var c=N1();function g(P){return P?c(P):[0,0,0,1]}$.exports=g}),Av=Ft((Q,$)=>{var c=ra(),g=fo(),P=N1(),S=Xc(),t=bi().defaultLine,e=Va().isArrayOrTypedArray,r=P(t),a=1;function n(x,y){var v=x;return v[3]*=y,v}function o(x){if(c(x))return r;var y=P(x);return y.length?y:r}function i(x){return c(x)?x:a}function s(x,y,v){var T=x.color;T&&T._inputArray&&(T=T._inputArray);var u=e(T),b=e(y),_=S.extractOpts(x),C=[],M,E,A,h,p;if(_.colorscale!==void 0?M=S.makeColorScaleFuncFromTrace(x):M=o,u?E=function(w,R){return w[R]===void 0?r:P(M(w[R]))}:E=o,b?A=function(w,R){return w[R]===void 0?a:i(w[R])}:A=i,u||b)for(var k=0;k{$.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}}),Hk=Ft((Q,$)=>{$.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}}),Ij=Ft((Q,$)=>{var c=Xo();function g(t,e,r,a){if(!e||!e.visible)return null;for(var n=c.getComponentMethod("errorbars","makeComputeError")(e),o=new Array(t.length),i=0;i0){var v=a.c2l(x);a._lowerLogErrorBound||(a._lowerLogErrorBound=v),a._lowerErrorBound=Math.min(a._lowerLogErrorBound,v)}}else o[i]=[-s[0]*r,s[1]*r]}return o}function P(t){for(var e=0;e{var c=fp().gl_line3d,g=fp().gl_scatter3d,P=fp().gl_error3d,S=fp().gl_mesh3d,t=fp().delaunay_triangulate,e=bn(),r=Tv(),a=Av().formatColor,n=yg(),o=iS(),i=Hk(),s=Es(),f=Dp().appendArrayPointValue,x=Ij();function y(R,O){this.scene=R,this.uid=O,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var v=y.prototype;v.handlePick=function(R){if(R.object&&(R.object===this.linePlot||R.object===this.delaunayMesh||R.object===this.textMarkers||R.object===this.scatterPlot)){var O=R.index=R.data.index;return R.object.highlight&&R.object.highlight(null),this.scatterPlot&&(R.object=this.scatterPlot,this.scatterPlot.highlight(R.data)),R.textLabel="",this.textLabels&&(e.isArrayOrTypedArray(this.textLabels)?(this.textLabels[O]||this.textLabels[O]===0)&&(R.textLabel=this.textLabels[O]):R.textLabel=this.textLabels),R.traceCoordinate=[this.data.x[O],this.data.y[O],this.data.z[O]],!0}};function T(R,O,N){var V=(N+1)%3,H=(N+2)%3,F=[],U=[],W;for(W=0;W-1?-1:R.indexOf("right")>-1?1:0}function _(R){return R==null?0:R.indexOf("top")>-1?-1:R.indexOf("bottom")>-1?1:0}function C(R){var O=0,N=0,V=[O,N];if(Array.isArray(R))for(var H=0;H=0){var X=T(W.position,W.delaunayColor,W.delaunayAxis);X.opacity=R.opacity,this.delaunayMesh?this.delaunayMesh.update(X):(X.gl=O,this.delaunayMesh=S(X),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},v.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function w(R,O){var N=new y(R,O.uid);return N.update(O),N}$.exports=w}),aS=Ft((Q,$)=>{var c=tf(),g=Ea(),P=Tc(),S=fh().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=$u(),a=$o(),n=iS(),o=Hk(),i=Ta().extendFlat,s=Yc().overrideAll,f=G0(),x=c.line,y=c.marker,v=y.line,T=i({width:x.width,dash:{valType:"enumerated",values:f(n),dflt:"solid"}},P("line"));function u(_){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var b=$.exports=s({x:c.x,y:c.y,z:{valType:"data_array"},text:i({},c.text,{}),texttemplate:e(),texttemplatefallback:r({editType:"calc"}),hovertext:i({},c.hovertext,{}),hovertemplate:t(),hovertemplatefallback:r(),xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z"),mode:i({},c.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:u(),y:u(),z:u()},connectgaps:c.connectgaps,line:T,marker:i({symbol:{valType:"enumerated",values:f(o),dflt:"circle",arrayOk:!0},size:i({},y.size,{dflt:8}),sizeref:y.sizeref,sizemin:y.sizemin,sizemode:y.sizemode,opacity:i({},y.opacity,{arrayOk:!1}),colorbar:y.colorbar,line:i({width:i({},v.width,{arrayOk:!1})},P("marker.line"))},P("marker")),textposition:i({},c.textposition,{dflt:"top center"}),textfont:g({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:a.opacity,hoverinfo:i({},a.hoverinfo)},"calc","nested");b.x.editType=b.y.editType=b.z.editType="calc+clearAxisTypes"}),Dj=Ft((Q,$)=>{var c=Xo(),g=bn(),P=Ac(),S=s0(),t=I0(),e=x0(),r=aS();$.exports=function(n,o,i,s){function f(C,M){return g.coerce(n,o,r,C,M)}var x=a(n,o,f,s);if(!x){o.visible=!1;return}f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("xhoverformat"),f("yhoverformat"),f("zhoverformat"),f("mode"),P.hasMarkers(o)&&S(n,o,i,s,f,{noSelect:!0,noAngle:!0}),P.hasLines(o)&&(f("connectgaps"),t(n,o,i,s,f)),P.hasText(o)&&(f("texttemplate"),f("texttemplatefallback"),e(n,o,s,f,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var y=(o.line||{}).color,v=(o.marker||{}).color;f("surfaceaxis")>=0&&f("surfacecolor",y||v);for(var T=["x","y","z"],u=0;u<3;++u){var b="projection."+T[u];f(b+".show")&&(f(b+".opacity"),f(b+".scale"))}var _=c.getComponentMethod("errorbars","supplyDefaults");_(n,o,y||v||i,{axis:"z"}),_(n,o,y||v||i,{axis:"y",inherit:"z"}),_(n,o,y||v||i,{axis:"x",inherit:"z"})};function a(n,o,i,s){var f=0,x=i("x"),y=i("y"),v=i("z"),T=c.getComponentMethod("calendars","handleTraceDefaults");return T(n,o,["x","y","z"],s),x&&y&&v&&(f=Math.min(x.length,y.length,v.length),o._length=o._xlength=o._ylength=o._zlength=f),f}}),Fj=Ft((Q,$)=>{var c=ct(),g=F0();$.exports=function(P,S){var t=[{x:!1,y:!1,trace:S,t:{}}];return c(t,S),g(P,S),t}}),Rj=Ft((Q,$)=>{$.exports=c;function c(g,P){if(typeof g!="string")throw new TypeError("must specify type string");if(P=P||{},typeof document>"u"&&!P.canvas)return null;var S=P.canvas||document.createElement("canvas");typeof P.width=="number"&&(S.width=P.width),typeof P.height=="number"&&(S.height=P.height);var t=P,e;try{var r=[g];g.indexOf("webgl")===0&&r.push("experimental-"+g);for(var a=0;a{var c=Rj();$.exports=function(g){return c("webgl",g)}}),oS=Ft((Q,$)=>{var c=li(),g=function(){};$.exports=function(P){for(var S in P)typeof P[S]=="function"&&(P[S]=g);P.destroy=function(){P.container.parentNode.removeChild(P.container)};var t=document.createElement("div");t.className="no-webgl",t.style.cursor="pointer",t.style.fontSize="24px",t.style.color=c.defaults[0],t.style.position="absolute",t.style.left=t.style.top="0px",t.style.width=t.style.height="100%",t.style["background-color"]=c.lightLine,t.style["z-index"]=30;var e=document.createElement("p");return e.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",e.style.position="relative",e.style.top="50%",e.style.left="50%",e.style.height="30%",e.style.width="50%",e.style.margin="-15% 0 0 -25%",t.appendChild(e),P.container.appendChild(t),P.container.style.background="#FFFFFF",P.container.onclick=function(){window.open("https://get.webgl.org")},!1}}),Nj=Ft((Q,$)=>{var c=Tv(),g=bn(),P=["xaxis","yaxis","zaxis"];function S(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}var t=S.prototype;t.merge=function(r,a){for(var n=this,o=0;o<3;++o){var i=a[P[o]];if(!i.visible){n.tickEnable[o]=!1,n.labelEnable[o]=!1,n.lineEnable[o]=!1,n.lineTickEnable[o]=!1,n.gridEnable[o]=!1,n.zeroEnable[o]=!1,n.backgroundEnable[o]=!1;continue}n.labels[o]=r._meta?g.templateString(i.title.text,r._meta):i.title.text,"font"in i.title&&(i.title.font.color&&(n.labelColor[o]=c(i.title.font.color)),i.title.font.family&&(n.labelFont[o]=i.title.font.family),i.title.font.size&&(n.labelSize[o]=i.title.font.size),i.title.font.weight&&(n.labelFontWeight[o]=i.title.font.weight),i.title.font.style&&(n.labelFontStyle[o]=i.title.font.style),i.title.font.variant&&(n.labelFontVariant[o]=i.title.font.variant)),"showline"in i&&(n.lineEnable[o]=i.showline),"linecolor"in i&&(n.lineColor[o]=c(i.linecolor)),"linewidth"in i&&(n.lineWidth[o]=i.linewidth),"showgrid"in i&&(n.gridEnable[o]=i.showgrid),"gridcolor"in i&&(n.gridColor[o]=c(i.gridcolor)),"gridwidth"in i&&(n.gridWidth[o]=i.gridwidth),i.type==="log"?n.zeroEnable[o]=!1:"zeroline"in i&&(n.zeroEnable[o]=i.zeroline),"zerolinecolor"in i&&(n.zeroLineColor[o]=c(i.zerolinecolor)),"zerolinewidth"in i&&(n.zeroLineWidth[o]=i.zerolinewidth),"ticks"in i&&i.ticks?n.lineTickEnable[o]=!0:n.lineTickEnable[o]=!1,"ticklen"in i&&(n.lineTickLength[o]=n._defaultLineTickLength[o]=i.ticklen),"tickcolor"in i&&(n.lineTickColor[o]=c(i.tickcolor)),"tickwidth"in i&&(n.lineTickWidth[o]=i.tickwidth),"tickangle"in i&&(n.tickAngle[o]=i.tickangle==="auto"?-3600:Math.PI*-i.tickangle/180),"showticklabels"in i&&(n.tickEnable[o]=i.showticklabels),"tickfont"in i&&(i.tickfont.color&&(n.tickColor[o]=c(i.tickfont.color)),i.tickfont.family&&(n.tickFont[o]=i.tickfont.family),i.tickfont.size&&(n.tickSize[o]=i.tickfont.size),i.tickfont.weight&&(n.tickFontWeight[o]=i.tickfont.weight),i.tickfont.style&&(n.tickFontStyle[o]=i.tickfont.style),i.tickfont.variant&&(n.tickFontVariant[o]=i.tickfont.variant)),"mirror"in i?["ticks","all","allticks"].indexOf(i.mirror)!==-1?(n.lineTickMirror[o]=!0,n.lineMirror[o]=!0):i.mirror===!0?(n.lineTickMirror[o]=!1,n.lineMirror[o]=!0):(n.lineTickMirror[o]=!1,n.lineMirror[o]=!1):n.lineMirror[o]=!1,"showbackground"in i&&i.showbackground!==!1?(n.backgroundEnable[o]=!0,n.backgroundColor[o]=c(i.backgroundcolor)):n.backgroundEnable[o]=!1}};function e(r,a){var n=new S;return n.merge(r,a),n}$.exports=e}),jj=Ft((Q,$)=>{var c=Tv(),g=["xaxis","yaxis","zaxis"];function P(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}var S=P.prototype;S.merge=function(e){for(var r=0;r<3;++r){var a=e[g[r]];if(!a.visible){this.enabled[r]=!1,this.drawSides[r]=!1;continue}this.enabled[r]=a.showspikes,this.colors[r]=c(a.spikecolor),this.drawSides[r]=a.spikesides,this.lineWidth[r]=a.spikethickness}};function t(e){var r=new P;return r.merge(e),r}$.exports=t}),Uj=Ft((Q,$)=>{$.exports=t;var c=Es(),g=bn(),P=["xaxis","yaxis","zaxis"];function S(e){for(var r=new Array(3),a=0;a<3;++a){for(var n=e[a],o=new Array(n.length),i=0;i/g," "));o[i]=y,s.tickmode=f}}r.ticks=o;for(var i=0;i<3;++i){.5*(e.glplot.bounds[0][i]+e.glplot.bounds[1][i]);for(var v=0;v<2;++v)r.bounds[v][i]=e.glplot.bounds[v][i]}e.contourLevels=S(o)}}),Vj=Ft((Q,$)=>{var c=fp().gl_plot3d,g=c.createCamera,P=c.createScene,S=Bj(),t=C_(),e=Xo(),r=bn(),a=r.preserveDrawingBuffer(),n=Es(),o=Qh(),i=Tv(),s=oS(),f=kM(),x=Nj(),y=jj(),v=Uj(),T=Y0().applyAutorangeOptions,u,b,_=!1;function C(N,V){var H=document.createElement("div"),F=N.container;this.graphDiv=N.graphDiv;var U=document.createElementNS("http://www.w3.org/2000/svg","svg");U.style.position="absolute",U.style.top=U.style.left="0px",U.style.width=U.style.height="100%",U.style["z-index"]=20,U.style["pointer-events"]="none",H.appendChild(U),this.svgContainer=U,H.id=N.id,H.style.position="absolute",H.style.top=H.style.left="0px",H.style.width=H.style.height="100%",F.appendChild(H),this.fullLayout=V,this.id=N.id||"scene",this.fullSceneLayout=V[this.id],this.plotArgs=[[],{},{}],this.axesOptions=x(V,V[this.id]),this.spikeOptions=y(V[this.id]),this.container=H,this.staticMode=!!N.staticPlot,this.pixelRatio=this.pixelRatio||N.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=e.getComponentMethod("annotations3d","convert"),this.drawAnnotations=e.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var M=C.prototype;M.prepareOptions=function(){var N=this,V={canvas:N.canvas,gl:N.gl,glOptions:{preserveDrawingBuffer:a,premultipliedAlpha:!0,antialias:!0},container:N.container,axes:N.axesOptions,spikes:N.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:N.camera,pixelRatio:N.pixelRatio};if(N.staticMode){if(!b&&(u=document.createElement("canvas"),b=S({canvas:u,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!b))throw new Error("error creating static canvas/context for image server");V.gl=b,V.canvas=u}return V};var E=!0;M.tryCreatePlot=function(){var N=this,V=N.prepareOptions(),H=!0;try{N.glplot=P(V)}catch{if(N.staticMode||!E||a)H=!1;else{r.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{a=V.glOptions.preserveDrawingBuffer=!0,N.glplot=P(V)}catch{a=V.glOptions.preserveDrawingBuffer=!1,H=!1}}}return E=!1,H},M.initializeGLCamera=function(){var N=this,V=N.fullSceneLayout.camera,H=V.projection.type==="orthographic";N.camera=g(N.container,{center:[V.center.x,V.center.y,V.center.z],eye:[V.eye.x,V.eye.y,V.eye.z],up:[V.up.x,V.up.y,V.up.z],_ortho:H,zoomMin:.01,zoomMax:100,mode:"orbit"})},M.initializeGLPlot=function(){var N=this;N.initializeGLCamera();var V=N.tryCreatePlot();if(!V)return s(N);N.traces={},N.make4thDimension();var H=N.graphDiv,F=H.layout,U=function(){var q={};return N.isCameraChanged(F)&&(q[N.id+".camera"]=N.getCamera()),N.isAspectChanged(F)&&(q[N.id+".aspectratio"]=N.glplot.getAspectratio(),F[N.id].aspectmode!=="manual"&&(N.fullSceneLayout.aspectmode=F[N.id].aspectmode=q[N.id+".aspectmode"]="manual")),q},W=function(q){if(q.fullSceneLayout.dragmode!==!1){var X=U();q.saveLayout(F),q.graphDiv.emit("plotly_relayout",X)}};return N.glplot.canvas&&(N.glplot.canvas.addEventListener("mouseup",function(){W(N)}),N.glplot.canvas.addEventListener("touchstart",function(){_=!0}),N.glplot.canvas.addEventListener("wheel",function(q){if(H._context._scrollZoom.gl3d){if(N.camera._ortho){var X=q.deltaX>q.deltaY?1.1:.9090909090909091,lt=N.glplot.getAspectratio();N.glplot.setAspectratio({x:X*lt.x,y:X*lt.y,z:X*lt.z})}W(N)}},t?{passive:!1}:!1),N.glplot.canvas.addEventListener("mousemove",function(){if(N.fullSceneLayout.dragmode!==!1&&N.camera.mouseListener.buttons!==0){var q=U();N.graphDiv.emit("plotly_relayouting",q)}}),N.staticMode||N.glplot.canvas.addEventListener("webglcontextlost",function(q){H&&H.emit&&H.emit("plotly_webglcontextlost",{event:q,layer:N.id})},!1)),N.glplot.oncontextloss=function(){N.recoverContext()},N.glplot.onrender=function(){N.render()},!0},M.render=function(){var N=this,V=N.graphDiv,H,F=N.svgContainer,U=N.container.getBoundingClientRect();V._fullLayout._calcInverseTransform(V);var W=V._fullLayout._invScaleX,q=V._fullLayout._invScaleY,X=U.width*W,lt=U.height*q;F.setAttributeNS(null,"viewBox","0 0 "+X+" "+lt),F.setAttributeNS(null,"width",X),F.setAttributeNS(null,"height",lt),v(N),N.glplot.axes.update(N.axesOptions);for(var yt=Object.keys(N.traces),pt=null,st=N.glplot.selection,tt=0;tt")):H.type==="isosurface"||H.type==="volume"?(it.valueLabel=n.hoverLabelText(N._mockAxis,N._mockAxis.d2l(st.traceCoordinate[3]),H.valuehoverformat),zt.push("value: "+it.valueLabel),st.textLabel&&zt.push(st.textLabel),wt=zt.join("
")):wt=st.textLabel;var Pt={x:st.traceCoordinate[0],y:st.traceCoordinate[1],z:st.traceCoordinate[2],data:at._input,fullData:at,curveNumber:at.index,pointNumber:vt};o.appendArrayPointValue(Pt,at,vt),H._module.eventData&&(Pt=at._module.eventData(Pt,st,at,{},vt));var Wt={points:[Pt]};if(N.fullSceneLayout.hovermode){var Ht=[];o.loneHover({trace:at,x:(.5+.5*rt[0]/rt[3])*X,y:(.5-.5*rt[1]/rt[3])*lt,xLabel:it.xLabel,yLabel:it.yLabel,zLabel:it.zLabel,text:wt,name:pt.name,color:o.castHoverOption(at,vt,"bgcolor")||pt.color,borderColor:o.castHoverOption(at,vt,"bordercolor"),fontFamily:o.castHoverOption(at,vt,"font.family"),fontSize:o.castHoverOption(at,vt,"font.size"),fontColor:o.castHoverOption(at,vt,"font.color"),nameLength:o.castHoverOption(at,vt,"namelength"),textAlign:o.castHoverOption(at,vt,"align"),hovertemplate:r.castOption(at,vt,"hovertemplate"),hovertemplateLabels:r.extendFlat({},Pt,it),eventData:[Pt]},{container:F,gd:V,inOut_bbox:Ht}),Pt.bbox=Ht[0]}st.distance<5&&(st.buttons||_)?V.emit("plotly_click",Wt):V.emit("plotly_hover",Wt),this.oldEventData=Wt}else o.loneUnhover(F),this.oldEventData&&V.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;N.drawAnnotations(N)},M.recoverContext=function(){var N=this;N.glplot.dispose();var V=function(){if(N.glplot.gl.isContextLost()){requestAnimationFrame(V);return}if(!N.initializeGLPlot()){r.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}N.plot.apply(N,N.plotArgs)};requestAnimationFrame(V)};var A=["xaxis","yaxis","zaxis"];function h(N,V,H){for(var F=N.fullSceneLayout,U=0;U<3;U++){var W=A[U],q=W.charAt(0),X=F[W],lt=V[q],yt=V[q+"calendar"],pt=V["_"+q+"length"];if(!r.isArrayOrTypedArray(lt))H[0][U]=Math.min(H[0][U],0),H[1][U]=Math.max(H[1][U],pt-1);else for(var st,tt=0;tt<(pt||lt.length);tt++)if(r.isArrayOrTypedArray(lt[tt]))for(var dt=0;dtat[1][q])at[0][q]=-1,at[1][q]=1;else{var ge=at[1][q]-at[0][q];at[0][q]-=ge/32,at[1][q]+=ge/32}if(Y=[at[0][q],at[1][q]],Y=T(Y,lt),at[0][q]=Y[0],at[1][q]=Y[1],lt.isReversed()){var he=at[0][q];at[0][q]=at[1][q],at[1][q]=he}}else Y=lt.range,at[0][q]=lt.r2l(Y[0]),at[1][q]=lt.r2l(Y[1]);at[0][q]===at[1][q]&&(at[0][q]-=1,at[1][q]+=1),vt[q]=at[1][q]-at[0][q],lt.range=[at[0][q],at[1][q]],lt.limitRange(),F.glplot.setBounds(q,{min:lt.range[0]*dt[q],max:lt.range[1]*dt[q]})}var de,se=pt.aspectmode;if(se==="cube")de=[1,1,1];else if(se==="manual"){var Tt=pt.aspectratio;de=[Tt.x,Tt.y,Tt.z]}else if(se==="auto"||se==="data"){var Lt=[1,1,1];for(q=0;q<3;++q){lt=pt[A[q]],yt=lt.type;var Mt=it[yt];Lt[q]=Math.pow(Mt.acc,1/Mt.count)/dt[q]}se==="data"||Math.max.apply(null,Lt)/Math.min.apply(null,Lt)<=4?de=Lt:de=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");pt.aspectratio.x=st.aspectratio.x=de[0],pt.aspectratio.y=st.aspectratio.y=de[1],pt.aspectratio.z=st.aspectratio.z=de[2],F.glplot.setAspectratio(pt.aspectratio),F.viewInitial.aspectratio||(F.viewInitial.aspectratio={x:pt.aspectratio.x,y:pt.aspectratio.y,z:pt.aspectratio.z}),F.viewInitial.aspectmode||(F.viewInitial.aspectmode=pt.aspectmode);var te=pt.domain||null,ve=V._size||null;if(te&&ve){var oe=F.container.style;oe.position="absolute",oe.left=ve.l+te.x[0]*ve.w+"px",oe.top=ve.t+(1-te.y[1])*ve.h+"px",oe.width=ve.w*(te.x[1]-te.x[0])+"px",oe.height=ve.h*(te.y[1]-te.y[0])+"px"}F.glplot.redraw()}},M.destroy=function(){var N=this;N.glplot&&(N.camera.mouseListener.enabled=!1,N.container.removeEventListener("wheel",N.camera.wheelListener),N.camera=null,N.glplot.dispose(),N.container.parentNode.removeChild(N.container),N.glplot=null)};function k(N){return[[N.eye.x,N.eye.y,N.eye.z],[N.center.x,N.center.y,N.center.z],[N.up.x,N.up.y,N.up.z]]}function w(N){return{up:{x:N.up[0],y:N.up[1],z:N.up[2]},center:{x:N.center[0],y:N.center[1],z:N.center[2]},eye:{x:N.eye[0],y:N.eye[1],z:N.eye[2]},projection:{type:N._ortho===!0?"orthographic":"perspective"}}}M.getCamera=function(){var N=this;return N.camera.view.recalcMatrix(N.camera.view.lastT()),w(N.camera)},M.setViewport=function(N){var V=this,H=N.camera;V.camera.lookAt.apply(this,k(H)),V.glplot.setAspectratio(N.aspectratio);var F=H.projection.type==="orthographic",U=V.camera._ortho;F!==U&&(V.glplot.redraw(),V.glplot.clearRGBA(),V.glplot.dispose(),V.initializeGLPlot())},M.isCameraChanged=function(N){var V=this,H=V.getCamera(),F=r.nestedProperty(N,V.id+".camera"),U=F.get();function W(yt,pt,st,tt){var dt=["up","center","eye"],rt=["x","y","z"];return pt[dt[st]]&&yt[dt[st]][rt[tt]]===pt[dt[st]][rt[tt]]}var q=!1;if(U===void 0)q=!0;else{for(var X=0;X<3;X++)for(var lt=0;lt<3;lt++)if(!W(H,U,X,lt)){q=!0;break}(!U.projection||H.projection&&H.projection.type!==U.projection.type)&&(q=!0)}return q},M.isAspectChanged=function(N){var V=this,H=V.glplot.getAspectratio(),F=r.nestedProperty(N,V.id+".aspectratio"),U=F.get();return U===void 0||U.x!==H.x||U.y!==H.y||U.z!==H.z},M.saveLayout=function(N){var V=this,H=V.fullLayout,F,U,W,q,X,lt,yt=V.isCameraChanged(N),pt=V.isAspectChanged(N),st=yt||pt;if(st){var tt={};if(yt&&(F=V.getCamera(),U=r.nestedProperty(N,V.id+".camera"),W=U.get(),tt[V.id+".camera"]=W),pt&&(q=V.glplot.getAspectratio(),X=r.nestedProperty(N,V.id+".aspectratio"),lt=X.get(),tt[V.id+".aspectratio"]=lt),e.call("_storeDirectGUIEdit",N,H._preGUI,tt),yt){U.set(F);var dt=r.nestedProperty(H,V.id+".camera");dt.set(F)}if(pt){X.set(q);var rt=r.nestedProperty(H,V.id+".aspectratio");rt.set(q),V.glplot.redraw()}}return st},M.updateFx=function(N,V){var H=this,F=H.camera;if(F)if(N==="orbit")F.mode="orbit",F.keyBindingMode="rotate";else if(N==="turntable"){F.up=[0,0,1],F.mode="turntable",F.keyBindingMode="rotate";var U=H.graphDiv,W=U._fullLayout,q=H.fullSceneLayout.camera,X=q.up.x,lt=q.up.y,yt=q.up.z;if(yt/Math.sqrt(X*X+lt*lt+yt*yt)<.999){var pt=H.id+".camera.up",st={x:0,y:0,z:1},tt={};tt[pt]=st;var dt=U.layout;e.call("_storeDirectGUIEdit",dt,W._preGUI,tt),q.up=st,r.nestedProperty(dt,pt).set(st)}}else F.keyBindingMode=N;H.fullSceneLayout.hovermode=V};function R(N,V,H){for(var F=0,U=H-1;F0)for(var X=255/q,lt=0;lt<3;++lt)N[W+lt]=Math.min(X*N[W+lt],255)}}M.toImage=function(N){var V=this;N||(N="png"),V.staticMode&&V.container.appendChild(u),V.glplot.redraw();var H=V.glplot.gl,F=H.drawingBufferWidth,U=H.drawingBufferHeight;H.bindFramebuffer(H.FRAMEBUFFER,null);var W=new Uint8Array(F*U*4);H.readPixels(0,0,F,U,H.RGBA,H.UNSIGNED_BYTE,W),R(W,F,U),O(W,F,U);var q=document.createElement("canvas");q.width=F,q.height=U;var X=q.getContext("2d",{willReadFrequently:!0}),lt=X.createImageData(F,U);lt.data.set(W),X.putImageData(lt,0,0);var yt;switch(N){case"jpeg":yt=q.toDataURL("image/jpeg");break;case"webp":yt=q.toDataURL("image/webp");break;default:yt=q.toDataURL("image/png")}return V.staticMode&&V.container.removeChild(u),yt},M.setConvert=function(){for(var N=this,V=0;V<3;V++){var H=N.fullSceneLayout[A[V]];n.setConvert(H,N.fullLayout),H.setScale=r.noop}},M.make4thDimension=function(){var N=this,V=N.graphDiv,H=V._fullLayout;N._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},n.setConvert(N._mockAxis,H)},$.exports=C}),Hj=Ft((Q,$)=>{$.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}),sS=Ft((Q,$)=>{var c=li(),g=Ad(),P=Ta().extendFlat,S=Yc().overrideAll;$.exports=S({visible:g.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:c.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:g.color,categoryorder:g.categoryorder,categoryarray:g.categoryarray,title:{text:g.title.text,font:g.title.font},type:P({},g.type,{values:["-","linear","log","date","category"]}),autotypenumbers:g.autotypenumbers,autorange:g.autorange,autorangeoptions:{minallowed:g.autorangeoptions.minallowed,maxallowed:g.autorangeoptions.maxallowed,clipmin:g.autorangeoptions.clipmin,clipmax:g.autorangeoptions.clipmax,include:g.autorangeoptions.include,editType:"plot"},rangemode:g.rangemode,minallowed:g.minallowed,maxallowed:g.maxallowed,range:P({},g.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:g.minor.tickmode,nticks:g.nticks,tick0:g.tick0,dtick:g.dtick,tickvals:g.tickvals,ticktext:g.ticktext,ticks:g.ticks,mirror:g.mirror,ticklen:g.ticklen,tickwidth:g.tickwidth,tickcolor:g.tickcolor,showticklabels:g.showticklabels,labelalias:g.labelalias,tickfont:g.tickfont,tickangle:g.tickangle,tickprefix:g.tickprefix,showtickprefix:g.showtickprefix,ticksuffix:g.ticksuffix,showticksuffix:g.showticksuffix,showexponent:g.showexponent,exponentformat:g.exponentformat,minexponent:g.minexponent,separatethousands:g.separatethousands,tickformat:g.tickformat,tickformatstops:g.tickformatstops,hoverformat:g.hoverformat,showline:g.showline,linecolor:g.linecolor,linewidth:g.linewidth,showgrid:g.showgrid,gridcolor:P({},g.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:g.gridwidth,zeroline:g.zeroline,zerolinecolor:g.zerolinecolor,zerolinewidth:g.zerolinewidth},"plot","from-root")}),lS=Ft((Q,$)=>{var c=sS(),g=Nh().attributes,P=Ta().extendFlat,S=bn().counterRegex;function t(e,r,a){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:r,editType:"camera"},z:{valType:"number",dflt:a,editType:"camera"},editType:"camera"}}$.exports={_arrayAttrRegexps:[S("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:P(t(0,0,1),{}),center:P(t(0,0,0),{}),eye:P(t(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:g({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:c,yaxis:c,zaxis:c,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot"}}),Wj=Ft((Q,$)=>{var c=fo().mix,g=bn(),P=pu(),S=sS(),t=wp(),e=Ky(),r=["xaxis","yaxis","zaxis"],a=13600/187;$.exports=function(n,o,i){var s,f;function x(T,u){return g.coerce(s,f,S,T,u)}for(var y=0;y{var c=bn(),g=li(),P=Xo(),S=P1(),t=Wj(),e=lS(),r=ud().getSubplotData,a="gl3d";$.exports=function(o,i,s){var f=i._basePlotModules.length>1;function x(y){if(!f){var v=c.validate(o[y],e[y]);if(v)return o[y]}}S(o,i,s,{type:a,attributes:e,handleDefaults:n,fullLayout:i,font:i.font,fullData:s,getDfltFromLayout:x,autotypenumbersDflt:i.autotypenumbers,paper_bgcolor:i.paper_bgcolor,calendar:i.calendar})};function n(o,i,s,f){for(var x=s("bgcolor"),y=g.combine(x,f.paper_bgcolor),v=["up","center","eye"],T=0;T.999)&&(M="turntable")}else M="turntable";s("dragmode",M),s("hovermode",f.getDfltFromLayout("hovermode"))}}),j1=Ft(Q=>{var $=Yc().overrideAll,c=Ao(),g=Vj(),P=ud().getSubplotData,S=bn(),t=Op(),e="gl3d",r="scene";Q.name=e,Q.attr=r,Q.idRoot=r,Q.idRegex=Q.attrRegex=S.counterRegex("scene"),Q.attributes=Hj(),Q.layoutAttributes=lS(),Q.baseLayoutAttrOverrides=$({hoverlabel:c.hoverlabel},"plot","nested"),Q.supplyLayoutDefaults=qj(),Q.plot=function(a){for(var n=a._fullLayout,o=a._fullData,i=n._subplots[e],s=0;s{$.exports={plot:Oj(),attributes:aS(),markerSymbols:Hk(),supplyDefaults:Dj(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:Fj(),moduleType:"trace",name:"scatter3d",basePlotModule:j1(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}}),$j=Ft((Q,$)=>{$.exports=Zj()}),g3=Ft((Q,$)=>{var c=li(),g=Tc(),P=fh().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:t}=$u(),e=$o(),r=Ta().extendFlat,a=Yc().overrideAll;function n(s){return{valType:"boolean",dflt:!1}}function o(s){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:n(),y:n(),z:n()},color:{valType:"color",dflt:c.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:c.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var i=$.exports=a(r({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:S(),hovertemplatefallback:t(),xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},g("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:o(),y:o(),z:o()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05,description:"Represents the level that incident rays are reflected in a single direction, causing shine."},roughness:{valType:"number",min:0,max:1,dflt:.5,description:"Alters specular reflection; the rougher the surface, the wider and less contrasty the shine."},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:r({},e.hoverinfo),showlegend:r({},e.showlegend,{dflt:!1})}),"calc","nested");i.x.editType=i.y.editType=i.z.editType="calc+clearAxisTypes"}),uS=Ft((Q,$)=>{var c=Xo(),g=bn(),P=mc(),S=g3(),t=.1;function e(o,i){for(var s=[],f=32,x=0;x{var c=Jd();$.exports=function(g,P){P.surfacecolor?c(g,P,{vals:P.surfacecolor,containerStr:"",cLetter:"c"}):c(g,P,{vals:P.z,containerStr:"",cLetter:"c"})}}),Yj=Ft((Q,$)=>{var c=fp().gl_surface3d,g=fp().ndarray,P=fp().ndarray_linear_interpolate.d2,S=N6(),t=j6(),e=bn().isArrayOrTypedArray,r=Av().parseColorScale,a=Tv(),n=Xc().extractOpts;function o(k,w,R){this.scene=k,this.uid=R,this.surface=w,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var i=o.prototype;i.getXat=function(k,w,R,O){var N=e(this.data.x)?e(this.data.x[0])?this.data.x[w][k]:this.data.x[k]:k;return R===void 0?N:O.d2l(N,0,R)},i.getYat=function(k,w,R,O){var N=e(this.data.y)?e(this.data.y[0])?this.data.y[w][k]:this.data.y[w]:w;return R===void 0?N:O.d2l(N,0,R)},i.getZat=function(k,w,R,O){var N=this.data.z[w][k];return N===null&&this.data.connectgaps&&this.data._interpolatedZ&&(N=this.data._interpolatedZ[w][k]),R===void 0?N:O.d2l(N,0,R)},i.handlePick=function(k){if(k.object===this.surface){var w=(k.data.index[0]-1)/this.dataScaleX-1,R=(k.data.index[1]-1)/this.dataScaleY-1,O=Math.max(Math.min(Math.round(w),this.data.z[0].length-1),0),N=Math.max(Math.min(Math.round(R),this.data._ylength-1),0);k.index=[O,N],k.traceCoordinate=[this.getXat(O,N),this.getYat(O,N),this.getZat(O,N)],k.dataCoordinate=[this.getXat(O,N,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(O,N,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(O,N,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var V=0;V<3;V++){var H=k.dataCoordinate[V];H!=null&&(k.dataCoordinate[V]*=this.scene.dataScale[V])}var F=this.data.hovertext||this.data.text;return e(F)&&F[N]&&F[N][O]!==void 0?k.textLabel=F[N][O]:F?k.textLabel=F:k.textLabel="",k.data.dataCoordinate=k.dataCoordinate.slice(),this.surface.highlight(k.data),this.scene.glplot.spikes.position=k.dataCoordinate,!0}};function s(k){var w=k[0].rgb,R=k[k.length-1].rgb;return w[0]===R[0]&&w[1]===R[1]&&w[2]===R[2]&&w[3]===R[3]}var f=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function x(k,w){if(k0){R=f[O];break}return R}function T(k,w){if(!(k<1||w<1)){for(var R=y(k),O=y(w),N=1,V=0;VC;)O--,O/=v(O),O++,O<_&&(O=C);var N=Math.round(O/k);return N>1?N:1};function M(k,w,R){var O=R[8]+R[2]*w[0]+R[5]*w[1];return k[0]=(R[6]+R[0]*w[0]+R[3]*w[1])/O,k[1]=(R[7]+R[1]*w[0]+R[4]*w[1])/O,k}function E(k,w,R){return A(k,w,M,R),k}function A(k,w,R,O){for(var N=[0,0],V=k.shape[0],H=k.shape[1],F=0;F0&&this.contourStart[O]!==null&&this.contourEnd[O]!==null&&this.contourEnd[O]>this.contourStart[O]))for(w[O]=!0,N=this.contourStart[O];Nlt&&(this.minValues[W]=lt),this.maxValues[W]{$.exports={attributes:g3(),supplyDefaults:uS().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:Gj(),plot:Yj(),moduleType:"trace",name:"surface",basePlotModule:j1(),categories:["gl3d","2dMap","showLegend"],meta:{}}}),Xj=Ft((Q,$)=>{$.exports=Kj()}),cb=Ft((Q,$)=>{var c=Tc(),g=fh().axisHoverFormat,{hovertemplateAttrs:P,templatefallbackAttrs:S}=$u(),t=g3(),e=$o(),r=Ta().extendFlat;$.exports=r({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:P({editType:"calc"}),hovertemplatefallback:S({editType:"calc"}),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"}},c("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:t.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:r({},t.contours.x.show,{}),color:t.contours.x.color,width:t.contours.x.width,editType:"calc"},lightposition:{x:r({},t.lightposition.x,{dflt:1e5}),y:r({},t.lightposition.y,{dflt:1e5}),z:r({},t.lightposition.z,{dflt:0}),editType:"calc"},lighting:r({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",description:"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry."},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc",description:"Epsilon for face normals calculation avoids math issues arising from degenerate geometry."},editType:"calc"},t.lighting),hoverinfo:r({},e.hoverinfo,{editType:"calc"}),showlegend:r({},e.showlegend,{dflt:!1})})}),Wk=Ft((Q,$)=>{var c=Tc(),g=fh().axisHoverFormat,{hovertemplateAttrs:P,templatefallbackAttrs:S}=$u(),t=cb(),e=$o(),r=Ta().extendFlat,a=Yc().overrideAll;function n(s){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function o(s){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var i=$.exports=a(r({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:n(),y:n(),z:n()},caps:{x:o(),y:o(),z:o()},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:P(),hovertemplatefallback:S(),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),valuehoverformat:g("value",1),showlegend:r({},e.showlegend,{dflt:!1})},c("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:t.opacity,lightposition:t.lightposition,lighting:t.lighting,flatshading:t.flatshading,contour:t.contour,hoverinfo:r({},e.hoverinfo)}),"calc","nested");i.flatshading.dflt=!0,i.lighting.facenormalsepsilon.dflt=0,i.x.editType=i.y.editType=i.z.editType=i.value.editType="calc+clearAxisTypes"}),cS=Ft((Q,$)=>{var c=bn(),g=Xo(),P=Wk(),S=mc();function t(r,a,n,o){function i(s,f){return c.coerce(r,a,P,s,f)}e(r,a,n,o,i)}function e(r,a,n,o,i){var s=i("isomin"),f=i("isomax");f!=null&&s!==void 0&&s!==null&&s>f&&(a.isomin=null,a.isomax=null);var x=i("x"),y=i("y"),v=i("z"),T=i("value");if(!x||!x.length||!y||!y.length||!v||!v.length||!T||!T.length){a.visible=!1;return}var u=g.getComponentMethod("calendars","handleTraceDefaults");u(r,a,["x","y","z"],o),i("valuehoverformat"),["x","y","z"].forEach(function(M){i(M+"hoverformat");var E="caps."+M,A=i(E+".show");A&&i(E+".fill");var h="slices."+M,p=i(h+".show");p&&(i(h+".fill"),i(h+".locations"))});var b=i("spaceframe.show");b&&i("spaceframe.fill");var _=i("surface.show");_&&(i("surface.count"),i("surface.fill"),i("surface.pattern"));var C=i("contour.show");C&&(i("contour.color"),i("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(M){i(M)}),S(r,a,o,i,{prefix:"",cLetter:"c"}),a._length=null}$.exports={supplyDefaults:t,supplyIsoDefaults:e}}),qk=Ft((Q,$)=>{var c=bn(),g=Jd();function P(r,a){a._len=Math.min(a.u.length,a.v.length,a.w.length,a.x.length,a.y.length,a.z.length),a._u=e(a.u,a._len),a._v=e(a.v,a._len),a._w=e(a.w,a._len),a._x=e(a.x,a._len),a._y=e(a.y,a._len),a._z=e(a.z,a._len);var n=S(a);a._gridFill=n.fill,a._Xs=n.Xs,a._Ys=n.Ys,a._Zs=n.Zs,a._len=n.len;var o=0,i,s,f;a.starts&&(i=e(a.starts.x||[]),s=e(a.starts.y||[]),f=e(a.starts.z||[]),o=Math.min(i.length,s.length,f.length)),a._startsX=i||[],a._startsY=s||[],a._startsZ=f||[];var x=0,y=1/0,v;for(v=0;v1&&(p=a[i-1],w=n[i-1],O=o[i-1]),s=0;sp?"-":"+")+"x"),C=C.replace("y",(k>w?"-":"+")+"y"),C=C.replace("z",(R>O?"-":"+")+"z");var F=function(){i=0,N=[],V=[],H=[]};(!i||i{var c=Jd(),g=qk().processGrid,P=qk().filter;$.exports=function(S,t){t._len=Math.min(t.x.length,t.y.length,t.z.length,t.value.length),t._x=P(t.x,t._len),t._y=P(t.y,t._len),t._z=P(t.z,t._len),t._value=P(t.value,t._len);var e=g(t);t._gridFill=e.fill,t._Xs=e.Xs,t._Ys=e.Ys,t._Zs=e.Zs,t._len=e.len;for(var r=1/0,a=-1/0,n=0;n{$.exports=function(c,g,P,S){S=S||c.length;for(var t=new Array(S),e=0;e{var c=fp().gl_mesh3d,g=Av().parseColorScale,P=bn().isArrayOrTypedArray,S=Tv(),t=Xc().extractOpts,e=hb(),r=function(f,x){for(var y=x.length-1;y>0;y--){var v=Math.min(x[y],x[y-1]),T=Math.max(x[y],x[y-1]);if(T>v&&v-1}function ft(Ce,$t){return Ce===null?$t:Ce}function ut(Ce,$t,ne){yt();var Ct=[$t],gt=[ne];if(at>=1)Ct=[$t],gt=[ne];else if(at>0){var St=it($t,ne);Ct=St.xyzv,gt=St.abc}for(var Nt=0;Nt-1?ne[le]:lt(we,Ue,qe);Ar>-1?ee[le]=Ar:ee[le]=st(we,Ue,qe,ft(Ce,ar))}tt(ee[0],ee[1],ee[2])}}function wt(Ce,$t,ne){var Ct=function(gt,St,Nt){ut(Ce,[$t[gt],$t[St],$t[Nt]],[ne[gt],ne[St],ne[Nt]])};Ct(0,1,2),Ct(2,3,0)}function zt(Ce,$t,ne){var Ct=function(gt,St,Nt){ut(Ce,[$t[gt],$t[St],$t[Nt]],[ne[gt],ne[St],ne[Nt]])};Ct(0,1,2),Ct(3,0,1),Ct(2,3,0),Ct(1,2,3)}function Pt(Ce,$t,ne,Ct){var gt=Ce[3];gtCt&&(gt=Ct);for(var St=(Ce[3]-gt)/(Ce[3]-$t[3]+1e-9),Nt=[],ee=0;ee<4;ee++)Nt[ee]=(1-St)*Ce[ee]+St*$t[ee];return Nt}function Wt(Ce,$t,ne){return Ce>=$t&&Ce<=ne}function Ht(Ce){var $t=.001*(F-H);return Ce>=H-$t&&Ce<=F+$t}function Jt(Ce){for(var $t=[],ne=0;ne<4;ne++){var Ct=Ce[ne];$t.push([f._x[Ct],f._y[Ct],f._z[Ct],f._value[Ct]])}return $t}var ge=3;function he(Ce,$t,ne,Ct,gt,St){St||(St=1),ne=[-1,-1,-1];var Nt=!1,ee=[Wt($t[0][3],Ct,gt),Wt($t[1][3],Ct,gt),Wt($t[2][3],Ct,gt)];if(!ee[0]&&!ee[1]&&!ee[2])return!1;var le=function(Ue,qe,ar){return Ht(qe[0][3])&&Ht(qe[1][3])&&Ht(qe[2][3])?(ut(Ue,qe,ar),!0):Stee?[N,St]:[St,V];cr($t,le[0],le[1])}}var we=[[Math.min(H,V),Math.max(H,V)],[Math.min(N,F),Math.max(N,F)]];["x","y","z"].forEach(function(Ue){for(var qe=[],ar=0;ar0&&(Hn.push(ii.id),Ue==="x"?Kn.push([ii.distRatio,0,0]):Ue==="y"?Kn.push([0,ii.distRatio,0]):Kn.push([0,0,ii.distRatio]))}else Ue==="x"?Vn=br(1,p-1):Ue==="y"?Vn=br(1,k-1):Vn=br(1,w-1);Hn.length>0&&(Ue==="x"?qe[Ar]=ur(Ce,Hn,Tr,pr,Kn,qe[Ar]):Ue==="y"?qe[Ar]=jr(Ce,Hn,Tr,pr,Kn,qe[Ar]):qe[Ar]=Hr(Ce,Hn,Tr,pr,Kn,qe[Ar]),Ar++),Vn.length>0&&(Ue==="x"?qe[Ar]=ve(Ce,Vn,Tr,pr,qe[Ar]):Ue==="y"?qe[Ar]=oe(Ce,Vn,Tr,pr,qe[Ar]):qe[Ar]=Te(Ce,Vn,Tr,pr,qe[Ar]),Ar++)}var qn=f.caps[Ue];qn.show&&qn.fill&&(vt(qn.fill),Ue==="x"?qe[Ar]=ve(Ce,[0,p-1],Tr,pr,qe[Ar]):Ue==="y"?qe[Ar]=oe(Ce,[0,k-1],Tr,pr,qe[Ar]):qe[Ar]=Te(Ce,[0,w-1],Tr,pr,qe[Ar]),Ar++)}}),_===0&&pt(),f._meshX=U,f._meshY=W,f._meshZ=q,f._meshIntensity=X,f._Xs=E,f._Ys=A,f._Zs=h}return rn(),f}function s(f,x){var y=f.glplot.gl,v=c({gl:y}),T=new a(f,v,x.uid);return v._trace=T,T.update(x),f.glplot.add(v),T}$.exports={findNearestOnAxis:r,generateIsoMeshes:i,createIsosurfaceTrace:s}}),Jj=Ft((Q,$)=>{$.exports={attributes:Wk(),supplyDefaults:cS().supplyDefaults,calc:hS(),colorbar:{min:"cmin",max:"cmax"},plot:Zk().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:j1(),categories:["gl3d","showLegend"],meta:{}}}),Qj=Ft((Q,$)=>{$.exports=Jj()}),fS=Ft((Q,$)=>{var c=Tc(),g=Wk(),P=g3(),S=$o(),t=Ta().extendFlat,e=Yc().overrideAll,r=$.exports=e(t({x:g.x,y:g.y,z:g.z,value:g.value,isomin:g.isomin,isomax:g.isomax,surface:g.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:g.slices,caps:g.caps,text:g.text,hovertext:g.hovertext,xhoverformat:g.xhoverformat,yhoverformat:g.yhoverformat,zhoverformat:g.zhoverformat,valuehoverformat:g.valuehoverformat,hovertemplate:g.hovertemplate,hovertemplatefallback:g.hovertemplatefallback},c("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:g.colorbar,opacity:g.opacity,opacityscale:P.opacityscale,lightposition:g.lightposition,lighting:g.lighting,flatshading:g.flatshading,contour:g.contour,hoverinfo:t({},S.hoverinfo),showlegend:t({},S.showlegend,{dflt:!1})}),"calc","nested");r.x.editType=r.y.editType=r.z.editType=r.value.editType="calc+clearAxisTypes"}),tU=Ft((Q,$)=>{var c=bn(),g=fS(),P=cS().supplyIsoDefaults,S=uS().opacityscaleDefaults;$.exports=function(t,e,r,a){function n(o,i){return c.coerce(t,e,g,o,i)}P(t,e,r,a,n),S(t,e,a,n)}}),eU=Ft((Q,$)=>{var c=fp().gl_mesh3d,g=Av().parseColorScale,P=bn().isArrayOrTypedArray,S=Tv(),t=Xc().extractOpts,e=hb(),r=Zk().findNearestOnAxis,a=Zk().generateIsoMeshes;function n(s,f,x){this.scene=s,this.uid=x,this.mesh=f,this.name="",this.data=null,this.showContour=!1}var o=n.prototype;o.handlePick=function(s){if(s.object===this.mesh){var f=s.data.index,x=this.data._meshX[f],y=this.data._meshY[f],v=this.data._meshZ[f],T=this.data._Ys.length,u=this.data._Zs.length,b=r(x,this.data._Xs).id,_=r(y,this.data._Ys).id,C=r(v,this.data._Zs).id,M=s.index=C+u*_+u*T*b;s.traceCoordinate=[this.data._meshX[M],this.data._meshY[M],this.data._meshZ[M],this.data._value[M]];var E=this.data.hovertext||this.data.text;return P(E)&&E[M]!==void 0?s.textLabel=E[M]:E&&(s.textLabel=E),!0}},o.update=function(s){var f=this.scene,x=f.fullSceneLayout;this.data=a(s);function y(_,C,M,E){return C.map(function(A){return _.d2l(A,0,E)*M})}var v=e(y(x.xaxis,s._meshX,f.dataScale[0],s.xcalendar),y(x.yaxis,s._meshY,f.dataScale[1],s.ycalendar),y(x.zaxis,s._meshZ,f.dataScale[2],s.zcalendar)),T=e(s._meshI,s._meshJ,s._meshK),u={positions:v,cells:T,lightPosition:[s.lightposition.x,s.lightposition.y,s.lightposition.z],ambient:s.lighting.ambient,diffuse:s.lighting.diffuse,specular:s.lighting.specular,roughness:s.lighting.roughness,fresnel:s.lighting.fresnel,vertexNormalsEpsilon:s.lighting.vertexnormalsepsilon,faceNormalsEpsilon:s.lighting.facenormalsepsilon,opacity:s.opacity,opacityscale:s.opacityscale,contourEnable:s.contour.show,contourColor:S(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},b=t(s);u.vertexIntensity=s._meshIntensity,u.vertexIntensityBounds=[b.min,b.max],u.colormap=g(s),this.mesh.update(u)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function i(s,f){var x=s.glplot.gl,y=c({gl:x}),v=new n(s,y,f.uid);return y._trace=v,v.update(f),s.glplot.add(y),v}$.exports=i}),rU=Ft((Q,$)=>{$.exports={attributes:fS(),supplyDefaults:tU(),calc:hS(),colorbar:{min:"cmin",max:"cmax"},plot:eU(),moduleType:"trace",name:"volume",basePlotModule:j1(),categories:["gl3d","showLegend"],meta:{}}}),nU=Ft((Q,$)=>{$.exports=rU()}),iU=Ft((Q,$)=>{var c=Xo(),g=bn(),P=mc(),S=cb();$.exports=function(t,e,r,a){function n(x,y){return g.coerce(t,e,S,x,y)}function o(x){var y=x.map(function(v){var T=n(v);return T&&g.isArrayOrTypedArray(T)?T:null});return y.every(function(v){return v&&v.length===y[0].length})&&y}var i=o(["x","y","z"]);if(!i){e.visible=!1;return}if(o(["i","j","k"]),e.i&&(!e.j||!e.k)||e.j&&(!e.k||!e.i)||e.k&&(!e.i||!e.j)){e.visible=!1;return}var s=c.getComponentMethod("calendars","handleTraceDefaults");s(t,e,["x","y","z"],a),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(x){n(x)});var f=n("contour.show");f&&(n("contour.color"),n("contour.width")),"intensity"in t?(n("intensity"),n("intensitymode"),P(t,e,a,n,{prefix:"",cLetter:"c"})):(e.showscale=!1,"facecolor"in t?n("facecolor"):"vertexcolor"in t?n("vertexcolor"):n("color",r)),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),n("xhoverformat"),n("yhoverformat"),n("zhoverformat"),e._length=null}}),aU=Ft((Q,$)=>{var c=Jd();$.exports=function(g,P){P.intensity&&c(g,P,{vals:P.intensity,containerStr:"",cLetter:"c"})}}),oU=Ft((Q,$)=>{var c=fp().gl_mesh3d,g=fp().delaunay_triangulate,P=fp().alpha_shape,S=fp().convex_hull,t=Av().parseColorScale,e=bn().isArrayOrTypedArray,r=Tv(),a=Xc().extractOpts,n=hb();function o(u,b,_){this.scene=u,this.uid=_,this.mesh=b,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var i=o.prototype;i.handlePick=function(u){if(u.object===this.mesh){var b=u.index=u.data.index;u.data._cellCenter?u.traceCoordinate=u.data.dataCoordinate:u.traceCoordinate=[this.data.x[b],this.data.y[b],this.data.z[b]];var _=this.data.hovertext||this.data.text;return e(_)&&_[b]!==void 0?u.textLabel=_[b]:_&&(u.textLabel=_),!0}};function s(u){for(var b=[],_=u.length,C=0;C<_;C++)b[C]=r(u[C]);return b}function f(u,b,_,C){for(var M=[],E=b.length,A=0;A=b-.5)return!1;return!0}i.update=function(u){var b=this.scene,_=b.fullSceneLayout;this.data=u;var C=u.x.length,M=n(f(_.xaxis,u.x,b.dataScale[0],u.xcalendar),f(_.yaxis,u.y,b.dataScale[1],u.ycalendar),f(_.zaxis,u.z,b.dataScale[2],u.zcalendar)),E;if(u.i&&u.j&&u.k){if(u.i.length!==u.j.length||u.j.length!==u.k.length||!v(u.i,C)||!v(u.j,C)||!v(u.k,C))return;E=n(x(u.i),x(u.j),x(u.k))}else u.alphahull===0?E=S(M):u.alphahull>0?E=P(u.alphahull,M):E=y(u.delaunayaxis,M);var A={positions:M,cells:E,lightPosition:[u.lightposition.x,u.lightposition.y,u.lightposition.z],ambient:u.lighting.ambient,diffuse:u.lighting.diffuse,specular:u.lighting.specular,roughness:u.lighting.roughness,fresnel:u.lighting.fresnel,vertexNormalsEpsilon:u.lighting.vertexnormalsepsilon,faceNormalsEpsilon:u.lighting.facenormalsepsilon,opacity:u.opacity,contourEnable:u.contour.show,contourColor:r(u.contour.color).slice(0,3),contourWidth:u.contour.width,useFacetNormals:u.flatshading};if(u.intensity){var h=a(u);this.color="#fff";var p=u.intensitymode;A[p+"Intensity"]=u.intensity,A[p+"IntensityBounds"]=[h.min,h.max],A.colormap=t(u)}else u.vertexcolor?(this.color=u.vertexcolor[0],A.vertexColors=s(u.vertexcolor)):u.facecolor?(this.color=u.facecolor[0],A.cellColors=s(u.facecolor)):(this.color=u.color,A.meshColor=r(u.color));this.mesh.update(A)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function T(u,b){var _=u.glplot.gl,C=c({gl:_}),M=new o(u,C,b.uid);return C._trace=M,M.update(b),u.glplot.add(C),M}$.exports=T}),sU=Ft((Q,$)=>{$.exports={attributes:cb(),supplyDefaults:iU(),calc:aU(),colorbar:{min:"cmin",max:"cmax"},plot:oU(),moduleType:"trace",name:"mesh3d",basePlotModule:j1(),categories:["gl3d","showLegend"],meta:{}}}),lU=Ft((Q,$)=>{$.exports=sU()}),dS=Ft((Q,$)=>{var c=Tc(),g=fh().axisHoverFormat,{hovertemplateAttrs:P,templatefallbackAttrs:S}=$u(),t=cb(),e=$o(),r=Ta().extendFlat,a={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:P({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:S({editType:"calc"}),uhoverformat:g("u",1),vhoverformat:g("v",1),whoverformat:g("w",1),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),showlegend:r({},e.showlegend,{dflt:!1})};r(a,c("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var n=["opacity","lightposition","lighting"];n.forEach(function(o){a[o]=t[o]}),a.hoverinfo=r({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),$.exports=a}),uU=Ft((Q,$)=>{var c=bn(),g=mc(),P=dS();$.exports=function(S,t,e,r){function a(v,T){return c.coerce(S,t,P,v,T)}var n=a("u"),o=a("v"),i=a("w"),s=a("x"),f=a("y"),x=a("z");if(!n||!n.length||!o||!o.length||!i||!i.length||!s||!s.length||!f||!f.length||!x||!x.length){t.visible=!1;return}var y=a("sizemode");a("sizeref",y==="raw"?1:.5),a("anchor"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),g(S,t,r,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}),cU=Ft((Q,$)=>{var c=Jd();$.exports=function(g,P){for(var S=P.u,t=P.v,e=P.w,r=Math.min(P.x.length,P.y.length,P.z.length,S.length,t.length,e.length),a=-1/0,n=1/0,o=0;o{var c=fp().gl_cone3d,g=fp().gl_cone3d.createConeMesh,P=bn().simpleMap,S=Av().parseColorScale,t=Xc().extractOpts,e=bn().isArrayOrTypedArray,r=hb();function a(y,v){this.scene=y,this.uid=v,this.mesh=null,this.data=null}var n=a.prototype;n.handlePick=function(y){if(y.object===this.mesh){var v=y.index=y.data.index,T=this.data.x[v],u=this.data.y[v],b=this.data.z[v],_=this.data.u[v],C=this.data.v[v],M=this.data.w[v];y.traceCoordinate=[T,u,b,_,C,M,Math.sqrt(_*_+C*C+M*M)];var E=this.data.hovertext||this.data.text;return e(E)&&E[v]!==void 0?y.textLabel=E[v]:E&&(y.textLabel=E),!0}};var o={xaxis:0,yaxis:1,zaxis:2},i={tip:1,tail:0,cm:.25,center:.5},s={tip:1,tail:1,cm:.75,center:.5};function f(y,v){var T=y.fullSceneLayout,u=y.dataScale,b={};function _(h,p){var k=T[p],w=u[o[p]];return P(h,function(R){return k.d2l(R)*w})}b.vectors=r(_(v.u,"xaxis"),_(v.v,"yaxis"),_(v.w,"zaxis"),v._len),b.positions=r(_(v.x,"xaxis"),_(v.y,"yaxis"),_(v.z,"zaxis"),v._len);var C=t(v);b.colormap=S(v),b.vertexIntensityBounds=[C.min/v._normMax,C.max/v._normMax],b.coneOffset=i[v.anchor];var M=v.sizemode;M==="scaled"?b.coneSize=v.sizeref||.5:M==="absolute"?b.coneSize=v.sizeref&&v._normMax?v.sizeref/v._normMax:.5:M==="raw"&&(b.coneSize=v.sizeref),b.coneSizemode=M;var E=c(b),A=v.lightposition;return E.lightPosition=[A.x,A.y,A.z],E.ambient=v.lighting.ambient,E.diffuse=v.lighting.diffuse,E.specular=v.lighting.specular,E.roughness=v.lighting.roughness,E.fresnel=v.lighting.fresnel,E.opacity=v.opacity,v._pad=s[v.anchor]*E.vectorScale*E.coneScale*v._normMax,E}n.update=function(y){this.data=y;var v=f(this.scene,y);this.mesh.update(v)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function x(y,v){var T=y.glplot.gl,u=f(y,v),b=g(T,u),_=new a(y,v.uid);return _.mesh=b,_.data=v,b._trace=_,y.glplot.add(b),_}$.exports=x}),fU=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"cone",basePlotModule:j1(),categories:["gl3d","showLegend"],attributes:dS(),supplyDefaults:uU(),colorbar:{min:"cmin",max:"cmax"},calc:cU(),plot:hU(),eventData:function(c,g){return c.norm=g.traceCoordinate[6],c},meta:{}}}),dU=Ft((Q,$)=>{$.exports=fU()}),pS=Ft((Q,$)=>{var c=Tc(),g=fh().axisHoverFormat,{hovertemplateAttrs:P,templatefallbackAttrs:S}=$u(),t=cb(),e=$o(),r=Ta().extendFlat,a={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:P({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:S({editType:"calc"}),uhoverformat:g("u",1),vhoverformat:g("v",1),whoverformat:g("w",1),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),showlegend:r({},e.showlegend,{dflt:!1})};r(a,c("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var n=["opacity","lightposition","lighting"];n.forEach(function(o){a[o]=t[o]}),a.hoverinfo=r({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),$.exports=a}),pU=Ft((Q,$)=>{var c=bn(),g=mc(),P=pS();$.exports=function(S,t,e,r){function a(y,v){return c.coerce(S,t,P,y,v)}var n=a("u"),o=a("v"),i=a("w"),s=a("x"),f=a("y"),x=a("z");if(!n||!n.length||!o||!o.length||!i||!i.length||!s||!s.length||!f||!f.length||!x||!x.length){t.visible=!1;return}a("starts.x"),a("starts.y"),a("starts.z"),a("maxdisplayed"),a("sizeref"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),g(S,t,r,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}),mU=Ft((Q,$)=>{var c=fp().gl_streamtube3d,g=c.createTubeMesh,P=bn(),S=Av().parseColorScale,t=Xc().extractOpts,e=hb(),r={xaxis:0,yaxis:1,zaxis:2};function a(x,y){this.scene=x,this.uid=y,this.mesh=null,this.data=null}var n=a.prototype;n.handlePick=function(x){var y=this.scene.fullSceneLayout,v=this.scene.dataScale;function T(_,C){var M=y[C],E=v[r[C]];return M.l2c(_)/E}if(x.object===this.mesh){var u=x.data.position,b=x.data.velocity;return x.traceCoordinate=[T(u[0],"xaxis"),T(u[1],"yaxis"),T(u[2],"zaxis"),T(b[0],"xaxis"),T(b[1],"yaxis"),T(b[2],"zaxis"),x.data.intensity*this.data._normMax,x.data.divergence],x.textLabel=this.data.hovertext||this.data.text,!0}};function o(x){var y=x.length,v;return y>2?v=x.slice(1,y-1):y===2?v=[(x[0]+x[1])/2]:v=x,v}function i(x){var y=x.length;return y===1?[.5,.5]:[x[1]-x[0],x[y-1]-x[y-2]]}function s(x,y){var v=x.fullSceneLayout,T=x.dataScale,u=y._len,b={};function _(st,tt){var dt=v[tt],rt=T[r[tt]];return P.simpleMap(st,function(at){return dt.d2l(at)*rt})}if(b.vectors=e(_(y._u,"xaxis"),_(y._v,"yaxis"),_(y._w,"zaxis"),u),!u)return{positions:[],cells:[]};var C=_(y._Xs,"xaxis"),M=_(y._Ys,"yaxis"),E=_(y._Zs,"zaxis");b.meshgrid=[C,M,E],b.gridFill=y._gridFill;var A=y._slen;if(A)b.startingPositions=e(_(y._startsX,"xaxis"),_(y._startsY,"yaxis"),_(y._startsZ,"zaxis"));else{for(var h=M[0],p=o(C),k=o(E),w=new Array(p.length*k.length),R=0,O=0;O{$.exports={moduleType:"trace",name:"streamtube",basePlotModule:j1(),categories:["gl3d","showLegend"],attributes:pS(),supplyDefaults:pU(),colorbar:{min:"cmin",max:"cmax"},calc:qk().calc,plot:mU(),eventData:function(c,g){return c.tubex=c.x,c.tubey=c.y,c.tubez=c.z,c.tubeu=g.traceCoordinate[3],c.tubev=g.traceCoordinate[4],c.tubew=g.traceCoordinate[5],c.norm=g.traceCoordinate[6],c.divergence=g.traceCoordinate[7],delete c.x,delete c.y,delete c.z,c},meta:{}}}),vU=Ft((Q,$)=>{$.exports=gU()}),dx=Ft((Q,$)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=z0(),t=tf(),e=$o(),r=Tc(),a=Td().dash,n=Ta().extendFlat,o=Yc().overrideAll,i=t.marker,s=t.line,f=i.line;$.exports=o({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3"},geojson:{valType:"any",editType:"calc"},featureidkey:{valType:"string",editType:"calc",dflt:"id"},mode:n({},t.mode,{dflt:"markers"}),text:n({},t.text,{}),texttemplate:g({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:P({editType:"plot"}),hovertext:n({},t.hovertext,{}),textfont:t.textfont,textposition:t.textposition,line:{color:s.color,width:s.width,dash:a},connectgaps:t.connectgaps,marker:n({symbol:i.symbol,opacity:i.opacity,angle:i.angle,angleref:n({},i.angleref,{values:["previous","up","north"]}),standoff:i.standoff,size:i.size,sizeref:i.sizeref,sizemin:i.sizemin,sizemode:i.sizemode,colorbar:i.colorbar,line:n({width:f.width},r("marker.line")),gradient:i.gradient},r("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:S(),selected:t.selected,unselected:t.unselected,hoverinfo:n({},e.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:c(),hovertemplatefallback:P()},"calc","nested")}),yU=Ft((Q,$)=>{var c=bn(),g=Ac(),P=s0(),S=I0(),t=x0(),e=O0(),r=dx(),a=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");$.exports=function(n,o,i,s){function f(C,M){return c.coerce(n,o,r,C,M)}var x=f("locations"),y;if(x&&x.length){var v=f("geojson"),T;(typeof v=="string"&&v!==""||c.isPlainObject(v))&&(T="geojson-id");var u=f("locationmode",T);u==="country names"&&c.warn(a),u==="geojson-id"&&f("featureidkey"),y=x.length}else{var b=f("lon")||[],_=f("lat")||[];y=Math.min(b.length,_.length)}if(!y){o.visible=!1;return}o._length=y,f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("mode"),g.hasMarkers(o)&&P(n,o,i,s,f,{gradient:!0}),g.hasLines(o)&&(S(n,o,i,s,f),f("connectgaps")),g.hasText(o)&&(f("texttemplate"),f("texttemplatefallback"),t(n,o,s,f)),f("fill"),o.fill!=="none"&&e(n,o,i,f),c.coerceSelectionMarkerOpacity(o,f)}}),xU=Ft((Q,$)=>{var c=Es();$.exports=function(g,P,S){var t={},e=S[P.geo]._subplot,r=e.mockAxis,a=g.lonlat;return t.lonLabel=c.tickText(r,r.c2l(a[0]),!0).text,t.latLabel=c.tickText(r,r.c2l(a[1]),!0).text,t}}),$k=Ft((Q,$)=>{var c=ra(),g=Da().BADNUM,P=F0(),S=ct(),t=Bt(),e=bn().isArrayOrTypedArray,r=bn()._;function a(n){return n&&typeof n=="string"}$.exports=function(n,o){var i=e(o.locations),s=i?o.locations.length:o._length,f=new Array(s),x;o.geojson?x=function(_){return a(_)||c(_)}:x=a;for(var y=0;y{Q.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr","equal earth":"equalEarth",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"},Q.axesNames=["lonaxis","lataxis"],Q.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},Q.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},Q.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]},antarctica:{lonaxisRange:[-180,180],lataxisRange:[-90,-60],projType:"equirectangular",projRotate:[0,0,0]},oceania:{lonaxisRange:[-180,180],lataxisRange:[-50,25],projType:"equirectangular",projRotate:[0,0,0]}},Q.clipPad=.001,Q.precision=.1,Q.landColor="#F0DC82",Q.waterColor="#3399FF",Q.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},Q.sphereSVG={type:"Sphere"},Q.fillLayers={ocean:1,land:1,lakes:1},Q.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},Q.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],Q.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],Q.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}}),mS=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q):(c=c||self,g(c.topojson=c.topojson||{}))})(Q,function(c){function g(_){return _}function P(_){if(_==null)return g;var C,M,E=_.scale[0],A=_.scale[1],h=_.translate[0],p=_.translate[1];return function(k,w){w||(C=M=0);var R=2,O=k.length,N=new Array(O);for(N[0]=(C+=k[0])*E+h,N[1]=(M+=k[1])*A+p;Rh&&(h=R[0]),R[1]p&&(p=R[1])}function w(R){switch(R.type){case"GeometryCollection":R.geometries.forEach(w);break;case"Point":k(R.coordinates);break;case"MultiPoint":R.coordinates.forEach(k);break}}_.arcs.forEach(function(R){for(var O=-1,N=R.length,V;++Oh&&(h=V[0]),V[1]p&&(p=V[1])});for(M in _.objects)w(_.objects[M]);return[E,A,h,p]}function t(_,C){for(var M,E=_.length,A=E-C;A<--E;)M=_[A],_[A++]=_[E],_[E]=M}function e(_,C){return typeof C=="string"&&(C=_.objects[C]),C.type==="GeometryCollection"?{type:"FeatureCollection",features:C.geometries.map(function(M){return r(_,M)})}:r(_,C)}function r(_,C){var M=C.id,E=C.bbox,A=C.properties==null?{}:C.properties,h=a(_,C);return M==null&&E==null?{type:"Feature",properties:A,geometry:h}:E==null?{type:"Feature",id:M,properties:A,geometry:h}:{type:"Feature",id:M,bbox:E,properties:A,geometry:h}}function a(_,C){var M=P(_.transform),E=_.arcs;function A(O,N){N.length&&N.pop();for(var V=E[O<0?~O:O],H=0,F=V.length;H1)E=s(_,C,M);else for(A=0,E=new Array(h=_.arcs.length);A1)for(var N=1,V=k(R[0]),H,F;NV&&(F=R[0],R[0]=R[N],R[N]=F,V=H);return R}).filter(function(w){return w.length>0})}}function v(_,C){for(var M=0,E=_.length;M>>1;_[A]=2))throw new Error("n must be ≥2");w=_.bbox||S(_);var M=w[0],E=w[1],A=w[2],h=w[3],p;C={scale:[A-M?(A-M)/(p-1):1,h-E?(h-E)/(p-1):1],translate:[M,E]}}else w=_.bbox;var k=u(C),w,R,O=_.objects,N={};function V(U){return k(U)}function H(U){var W;switch(U.type){case"GeometryCollection":W={type:"GeometryCollection",geometries:U.geometries.map(H)};break;case"Point":W={type:"Point",coordinates:V(U.coordinates)};break;case"MultiPoint":W={type:"MultiPoint",coordinates:U.coordinates.map(V)};break;default:return U}return U.id!=null&&(W.id=U.id),U.bbox!=null&&(W.bbox=U.bbox),U.properties!=null&&(W.properties=U.properties),W}function F(U){var W=0,q=1,X=U.length,lt,yt=new Array(X);for(yt[0]=k(U[0],0);++W{var c=$.exports={},g=v3().locationmodeToLayer,P=mS().feature;c.getTopojsonName=function(S){return[S.scope.replace(/ /g,"-"),"_",S.resolution.toString(),"m"].join("")},c.getTopojsonPath=function(S,t){return S+=S.endsWith("/")?"":"/",`${S}${t}.json`},c.getTopojsonFeatures=function(S,t){var e=g[S.locationmode],r=t.objects[e];return P(t,r).features}}),U1=Ft(Q=>{var $=Da().BADNUM;Q.calcTraceToLineCoords=function(c){for(var g=c[0].trace,P=g.connectgaps,S=[],t=[],e=0;e0&&(S.push(t),t=[])}return t.length>0&&S.push(t),S},Q.makeLine=function(c){return c.length===1?{type:"LineString",coordinates:c[0]}:{type:"MultiLineString",coordinates:c}},Q.makePolygon=function(c){if(c.length===1)return{type:"Polygon",coordinates:c};for(var g=new Array(c.length),P=0;P{$.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|ç)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|ã)o.?tom(e|é)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}}),Yk=Ft(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var $=63710088e-1,c={centimeters:$*100,centimetres:$*100,degrees:360/(2*Math.PI),feet:$*3.28084,inches:$*39.37,kilometers:$/1e3,kilometres:$/1e3,meters:$,metres:$,miles:$/1609.344,millimeters:$*1e3,millimetres:$*1e3,nauticalmiles:$/1852,radians:1,yards:$*1.0936},g={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function P(O,N,V={}){let H={type:"Feature"};return(V.id===0||V.id)&&(H.id=V.id),V.bbox&&(H.bbox=V.bbox),H.properties=N||{},H.geometry=O,H}function S(O,N,V={}){switch(O){case"Point":return t(N).geometry;case"LineString":return n(N).geometry;case"Polygon":return r(N).geometry;case"MultiPoint":return f(N).geometry;case"MultiLineString":return s(N).geometry;case"MultiPolygon":return x(N).geometry;default:throw new Error(O+" is invalid")}}function t(O,N,V={}){if(!O)throw new Error("coordinates is required");if(!Array.isArray(O))throw new Error("coordinates must be an Array");if(O.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!p(O[0])||!p(O[1]))throw new Error("coordinates must contain numbers");return P({type:"Point",coordinates:O},N,V)}function e(O,N,V={}){return i(O.map(H=>t(H,N)),V)}function r(O,N,V={}){for(let H of O){if(H.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(H[H.length-1].length!==H[0].length)throw new Error("First and last Position are not equivalent.");for(let F=0;Fr(H,N)),V)}function n(O,N,V={}){if(O.length<2)throw new Error("coordinates must be an array of two or more positions");return P({type:"LineString",coordinates:O},N,V)}function o(O,N,V={}){return i(O.map(H=>n(H,N)),V)}function i(O,N={}){let V={type:"FeatureCollection"};return N.id&&(V.id=N.id),N.bbox&&(V.bbox=N.bbox),V.features=O,V}function s(O,N,V={}){return P({type:"MultiLineString",coordinates:O},N,V)}function f(O,N,V={}){return P({type:"MultiPoint",coordinates:O},N,V)}function x(O,N,V={}){return P({type:"MultiPolygon",coordinates:O},N,V)}function y(O,N,V={}){return P({type:"GeometryCollection",geometries:O},N,V)}function v(O,N=0){if(N&&!(N>=0))throw new Error("precision must be a positive number");let V=Math.pow(10,N||0);return Math.round(O*V)/V}function T(O,N="kilometers"){let V=c[N];if(!V)throw new Error(N+" units is invalid");return O*V}function u(O,N="kilometers"){let V=c[N];if(!V)throw new Error(N+" units is invalid");return O/V}function b(O,N){return M(u(O,N))}function _(O){let N=O%360;return N<0&&(N+=360),N}function C(O){return O=O%360,O>180?O-360:O<-180?O+360:O}function M(O){return O%(2*Math.PI)*180/Math.PI}function E(O){return O%360*Math.PI/180}function A(O,N="kilometers",V="kilometers"){if(!(O>=0))throw new Error("length must be a positive number");return T(u(O,N),V)}function h(O,N="meters",V="kilometers"){if(!(O>=0))throw new Error("area must be a positive number");let H=g[N];if(!H)throw new Error("invalid original units");let F=g[V];if(!F)throw new Error("invalid final units");return O/H*F}function p(O){return!isNaN(O)&&O!==null&&!Array.isArray(O)}function k(O){return O!==null&&typeof O=="object"&&!Array.isArray(O)}function w(O){if(!O)throw new Error("bbox is required");if(!Array.isArray(O))throw new Error("bbox must be an Array");if(O.length!==4&&O.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");O.forEach(N=>{if(!p(N))throw new Error("bbox must only contain numbers")})}function R(O){if(!O)throw new Error("id is required");if(["string","number"].indexOf(typeof O)===-1)throw new Error("id must be a number or a string")}Q.areaFactors=g,Q.azimuthToBearing=C,Q.bearingToAzimuth=_,Q.convertArea=h,Q.convertLength=A,Q.degreesToRadians=E,Q.earthRadius=$,Q.factors=c,Q.feature=P,Q.featureCollection=i,Q.geometry=S,Q.geometryCollection=y,Q.isNumber=p,Q.isObject=k,Q.lengthToDegrees=b,Q.lengthToRadians=u,Q.lineString=n,Q.lineStrings=o,Q.multiLineString=s,Q.multiPoint=f,Q.multiPolygon=x,Q.point=t,Q.points=e,Q.polygon=r,Q.polygons=a,Q.radiansToDegrees=M,Q.radiansToLength=T,Q.round=v,Q.validateBBox=w,Q.validateId=R}),Kk=Ft(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var $=Yk();function c(u,b,_){if(u!==null)for(var C,M,E,A,h,p,k,w=0,R=0,O,N=u.type,V=N==="FeatureCollection",H=N==="Feature",F=V?u.features.length:1,U=0;Up||V>k||H>w){h=R,p=C,k=V,w=H,E=0;return}var F=$.lineString.call(void 0,[h,R],_.properties);if(b(F,C,M,H,E)===!1)return!1;E++,h=R})===!1)return!1}}})}function f(u,b,_){var C=_,M=!1;return s(u,function(E,A,h,p,k){M===!1&&_===void 0?C=E:C=b(C,E,A,h,p,k),M=!0}),C}function x(u,b){if(!u)throw new Error("geojson is required");o(u,function(_,C,M){if(_.geometry!==null){var E=_.geometry.type,A=_.geometry.coordinates;switch(E){case"LineString":if(b(_,C,M,0,0)===!1)return!1;break;case"Polygon":for(var h=0;h{Object.defineProperty(Q,"__esModule",{value:!0});var $=Yk(),c=Kk();function g(n){return c.geomReduce.call(void 0,n,(o,i)=>o+P(i),0)}function P(n){let o=0,i;switch(n.type){case"Polygon":return S(n.coordinates);case"MultiPolygon":for(i=0;i0){o+=Math.abs(r(n[0]));for(let i=1;i=o?(s+2)%o:s+2],v=f[0]*e,T=x[1]*e,u=y[0]*e;i+=(u-v)*Math.sin(T),s++}return i*t}var a=g;Q.area=g,Q.default=a}),wU=Ft(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var $=Yk(),c=Kk();function g(S,t={}){let e=0,r=0,a=0;return c.coordEach.call(void 0,S,function(n){e+=n[0],r+=n[1],a++},!0),$.point.call(void 0,[e/a,r/a],t.properties)}var P=g;Q.centroid=g,Q.default=P}),kU=Ft(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var $=Kk();function c(P,S={}){if(P.bbox!=null&&S.recompute!==!0)return P.bbox;let t=[1/0,1/0,-1/0,-1/0];return $.coordEach.call(void 0,P,e=>{t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]{var c=un(),g=_U(),{area:P}=bU(),{centroid:S}=wU(),{bbox:t}=kU(),e=_1(),r=Ko(),a=Ei(),n=ss(),o=mm(),i=Object.keys(g),s={"ISO-3":e,"USA-states":e,"country names":f};function f(C){for(var M=0;M0&&N[V+1][0]<0)return V;return null}switch(A==="RUS"||A==="FJI"?p=function(N){var V;if(O(N)===null)V=N;else for(V=new Array(N.length),R=0;RV?H[F++]=[N[R][0]+360,N[R][1]]:R===V?(H[F++]=N[R],H[F++]=[N[R][0],-90]):H[F++]=N[R];var U=o.tester(H);U.pts.pop(),h.push(U)}:p=function(N){h.push(o.tester(N))},M.type){case"MultiPolygon":for(k=0;k0?U.properties.ct=u(U):U.properties.ct=[NaN,NaN],H.fIn=N,H.fOut=U,h.push(U)}else r.log(["Location",H.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete A[V]}switch(E.type){case"FeatureCollection":var R=E.features;for(p=0;ph&&(h=w,E=k)}else E=M;return S(E).geometry.coordinates}function b(C){var M=window.PlotlyGeoAssets||{},E=[];function A(R){return new Promise(function(O,N){c.json(R,function(V,H){if(V){delete M[R];var F=V.status===404?'GeoJSON at URL "'+R+'" does not exist.':"Unexpected error while fetching from "+R;return N(new Error(F))}return M[R]=H,O(H)})})}function h(R){return new Promise(function(O,N){var V=0,H=setInterval(function(){if(M[R]&&M[R]!=="pending")return clearInterval(H),O(M[R]);if(V>100)return clearInterval(H),N("Unexpected error while fetching from "+R);V++},50)})}for(var p=0;p{var c=un(),g=js(),P=li(),S=xl(),t=S.stylePoints,e=S.styleText;$.exports=function(a,n){n&&r(a,n)};function r(a,n){var o=n[0].trace,i=n[0].node3;i.style("opacity",n[0].trace.opacity),t(i,o,a),e(i,o,a),i.selectAll("path.js-line").style("fill","none").each(function(s){var f=c.select(this),x=s.trace,y=x.line||{};f.call(P.stroke,y.color).call(g.dashLine,y.dash||"",y.width||0),x.fill!=="none"&&f.call(P.fill,x.fillcolor)})}}),vS=Ft((Q,$)=>{var c=un(),g=bn(),P=Gk().getTopojsonFeatures,S=U1(),t=V1(),e=Y0().findExtremes,r=Da().BADNUM,a=me().calcMarkerSize,n=Ac(),o=gS();function i(f,x,y){var v=x.layers.frontplot.select(".scatterlayer"),T=g.makeTraceGroups(v,y,"trace scattergeo");function u(b,_){b.lonlat[0]===r&&c.select(_).remove()}T.selectAll("*").remove(),T.each(function(b){var _=c.select(this),C=b[0].trace;if(n.hasLines(C)||C.fill!=="none"){var M=S.calcTraceToLineCoords(b),E=C.fill!=="none"?S.makePolygon(M):S.makeLine(M);_.selectAll("path.js-line").data([{geojson:E,trace:C}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}n.hasMarkers(C)&&_.selectAll("path.point").data(g.identity).enter().append("path").classed("point",!0).each(function(A){u(A,this)}),n.hasText(C)&&_.selectAll("g").data(g.identity).enter().append("g").append("text").each(function(A){u(A,this)}),o(f,b)})}function s(f,x){var y=f[0].trace,v=x[y.geo],T=v._subplot,u=y._length,b,_;if(g.isArrayOrTypedArray(y.locations)){var C=y.locationmode,M=C==="geojson-id"?t.extractTraceFeature(f):P(y,T.topojson);for(b=0;b{var c=Qh(),g=Da().BADNUM,P=Du(),S=bn().fillText,t=dx();$.exports=function(r,a,n){var o=r.cd,i=o[0].trace,s=r.xa,f=r.ya,x=r.subplot,y=x.projection.isLonLatOverEdges,v=x.project;function T(A){var h=A.lonlat;if(h[0]===g||y(h))return 1/0;var p=v(h),k=v([a,n]),w=Math.abs(p[0]-k[0]),R=Math.abs(p[1]-k[1]),O=Math.max(3,A.mrc||0);return Math.max(Math.sqrt(w*w+R*R)-O,1-3/O)}if(c.getClosest(o,T,r),r.index!==!1){var u=o[r.index],b=u.lonlat,_=[s.c2p(b),f.c2p(b)],C=u.mrc||1;r.x0=_[0]-C,r.x1=_[0]+C,r.y0=_[1]-C,r.y1=_[1]+C,r.loc=u.loc,r.lon=b[0],r.lat=b[1];var M={};M[i.geo]={_subplot:x};var E=i._module.formatLabels(u,i,M);return r.lonLabel=E.lonLabel,r.latLabel=E.latLabel,r.color=P(i,u),r.extraText=e(i,u,r,o[0].t.labels),r.hovertemplate=i.hovertemplate,[r]}};function e(r,a,n,o){if(r.hovertemplate)return;var i=a.hi||r.hoverinfo,s=i==="all"?t.hoverinfo.flags:i.split("+"),f=s.indexOf("location")!==-1&&Array.isArray(r.locations),x=s.indexOf("lon")!==-1,y=s.indexOf("lat")!==-1,v=s.indexOf("text")!==-1,T=[];function u(b){return b+"°"}return f?T.push(a.loc):x&&y?T.push("("+u(n.latLabel)+", "+u(n.lonLabel)+")"):x?T.push(o.lon+u(n.lonLabel)):y&&T.push(o.lat+u(n.latLabel)),v&&S(a,r,T),T.join("
")}}),AU=Ft((Q,$)=>{$.exports=function(c,g,P,S,t){c.lon=g.lon,c.lat=g.lat,c.location=g.loc?g.loc:null;var e=S[t];return e.fIn&&e.fIn.properties&&(c.properties=e.fIn.properties),c}}),MU=Ft((Q,$)=>{var c=Ac(),g=Da().BADNUM;$.exports=function(P,S){var t=P.cd,e=P.xaxis,r=P.yaxis,a=[],n=t[0].trace,o,i,s,f,x,y=!c.hasMarkers(n)&&!c.hasText(n);if(y)return[];if(S===!1)for(x=0;x{(function(c,g){g(typeof Q=="object"&&typeof $<"u"?Q:c.d3=c.d3||{})})(Q,function(c){function g(rt,at){return rtat?1:rt>=at?0:NaN}function P(rt){return rt.length===1&&(rt=S(rt)),{left:function(at,vt,it,Y){for(it==null&&(it=0),Y==null&&(Y=at.length);it>>1;rt(at[ft],vt)<0?it=ft+1:Y=ft}return it},right:function(at,vt,it,Y){for(it==null&&(it=0),Y==null&&(Y=at.length);it>>1;rt(at[ft],vt)>0?Y=ft:it=ft+1}return it}}}function S(rt){return function(at,vt){return g(rt(at),vt)}}var t=P(g),e=t.right,r=t.left;function a(rt,at){at==null&&(at=n);for(var vt=0,it=rt.length-1,Y=rt[0],ft=new Array(it<0?0:it);vtrt?1:at>=rt?0:NaN}function s(rt){return rt===null?NaN:+rt}function f(rt,at){var vt=rt.length,it=0,Y=-1,ft=0,ut,wt,zt=0;if(at==null)for(;++Y1)return zt/(it-1)}function x(rt,at){var vt=f(rt,at);return vt&&Math.sqrt(vt)}function y(rt,at){var vt=rt.length,it=-1,Y,ft,ut;if(at==null){for(;++it=Y)for(ft=ut=Y;++itY&&(ft=Y),ut=Y)for(ft=ut=Y;++itY&&(ft=Y),ut0)return[rt];if((it=at0)for(rt=Math.ceil(rt/wt),at=Math.floor(at/wt),ut=new Array(ft=Math.ceil(at-rt+1));++Y=0?(ft>=M?10:ft>=E?5:ft>=A?2:1)*Math.pow(10,Y):-Math.pow(10,-Y)/(ft>=M?10:ft>=E?5:ft>=A?2:1)}function k(rt,at,vt){var it=Math.abs(at-rt)/Math.max(0,vt),Y=Math.pow(10,Math.floor(Math.log(it)/Math.LN10)),ft=it/Y;return ft>=M?Y*=10:ft>=E?Y*=5:ft>=A&&(Y*=2),atHt;)Jt.pop(),--ge;var he=new Array(ge+1),de;for(ft=0;ft<=ge;++ft)de=he[ft]=[],de.x0=ft>0?Jt[ft-1]:Wt,de.x1=ft=1)return+vt(rt[it-1],it-1,rt);var it,Y=(it-1)*at,ft=Math.floor(Y),ut=+vt(rt[ft],ft,rt),wt=+vt(rt[ft+1],ft+1,rt);return ut+(wt-ut)*(Y-ft)}}function N(rt,at,vt){return rt=u.call(rt,s).sort(g),Math.ceil((vt-at)/(2*(O(rt,.75)-O(rt,.25))*Math.pow(rt.length,-1/3)))}function V(rt,at,vt){return Math.ceil((vt-at)/(3.5*x(rt)*Math.pow(rt.length,-1/3)))}function H(rt,at){var vt=rt.length,it=-1,Y,ft;if(at==null){for(;++it=Y)for(ft=Y;++itft&&(ft=Y)}else for(;++it=Y)for(ft=Y;++itft&&(ft=Y);return ft}function F(rt,at){var vt=rt.length,it=vt,Y=-1,ft,ut=0;if(at==null)for(;++Y=0;)for(ut=rt[at],vt=ut.length;--vt>=0;)ft[--Y]=ut[vt];return ft}function q(rt,at){var vt=rt.length,it=-1,Y,ft;if(at==null){for(;++it=Y)for(ft=Y;++itY&&(ft=Y)}else for(;++it=Y)for(ft=Y;++itY&&(ft=Y);return ft}function X(rt,at){for(var vt=at.length,it=new Array(vt);vt--;)it[vt]=rt[at[vt]];return it}function lt(rt,at){if(vt=rt.length){var vt,it=0,Y=0,ft,ut=rt[Y];for(at==null&&(at=g);++it{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q,y3()):(c=c||self,g(c.d3=c.d3||{},c.d3))})(Q,function(c,g){function P(){return new S}function S(){this.reset()}S.prototype={constructor:S,reset:function(){this.s=this.t=0},add:function(mr){e(t,mr,this.t),e(this,t.s,this.s),this.s?this.t+=t.t:this.s=t.t},valueOf:function(){return this.s}};var t=new S;function e(mr,Ur,_n){var cn=mr.s=Ur+_n,Wn=cn-Ur,hi=cn-Wn;mr.t=Ur-hi+(_n-Wn)}var r=1e-6,a=1e-12,n=Math.PI,o=n/2,i=n/4,s=n*2,f=180/n,x=n/180,y=Math.abs,v=Math.atan,T=Math.atan2,u=Math.cos,b=Math.ceil,_=Math.exp,C=Math.log,M=Math.pow,E=Math.sin,A=Math.sign||function(mr){return mr>0?1:mr<0?-1:0},h=Math.sqrt,p=Math.tan;function k(mr){return mr>1?0:mr<-1?n:Math.acos(mr)}function w(mr){return mr>1?o:mr<-1?-o:Math.asin(mr)}function R(mr){return(mr=E(mr/2))*mr}function O(){}function N(mr,Ur){mr&&H.hasOwnProperty(mr.type)&&H[mr.type](mr,Ur)}var V={Feature:function(mr,Ur){N(mr.geometry,Ur)},FeatureCollection:function(mr,Ur){for(var _n=mr.features,cn=-1,Wn=_n.length;++cn=0?1:-1,Wn=cn*_n,hi=u(Ur),ea=E(Ur),ga=tt*ea,Ra=st*hi+ga*u(Wn),$a=ga*cn*E(Wn);q.add(T($a,Ra)),pt=mr,st=hi,tt=ea}function Y(mr){return X.reset(),W(mr,dt),X*2}function ft(mr){return[T(mr[1],mr[0]),w(mr[2])]}function ut(mr){var Ur=mr[0],_n=mr[1],cn=u(_n);return[cn*u(Ur),cn*E(Ur),E(_n)]}function wt(mr,Ur){return mr[0]*Ur[0]+mr[1]*Ur[1]+mr[2]*Ur[2]}function zt(mr,Ur){return[mr[1]*Ur[2]-mr[2]*Ur[1],mr[2]*Ur[0]-mr[0]*Ur[2],mr[0]*Ur[1]-mr[1]*Ur[0]]}function Pt(mr,Ur){mr[0]+=Ur[0],mr[1]+=Ur[1],mr[2]+=Ur[2]}function Wt(mr,Ur){return[mr[0]*Ur,mr[1]*Ur,mr[2]*Ur]}function Ht(mr){var Ur=h(mr[0]*mr[0]+mr[1]*mr[1]+mr[2]*mr[2]);mr[0]/=Ur,mr[1]/=Ur,mr[2]/=Ur}var Jt,ge,he,de,se,Tt,Lt,Mt,te=P(),ve,oe,Te={point:He,lineStart:cr,lineEnd:ur,polygonStart:function(){Te.point=jr,Te.lineStart=Hr,Te.lineEnd=br,te.reset(),dt.polygonStart()},polygonEnd:function(){dt.polygonEnd(),Te.point=He,Te.lineStart=cr,Te.lineEnd=ur,q<0?(Jt=-(he=180),ge=-(de=90)):te>r?de=90:te<-r&&(ge=-90),oe[0]=Jt,oe[1]=he},sphere:function(){Jt=-(he=180),ge=-(de=90)}};function He(mr,Ur){ve.push(oe=[Jt=mr,he=mr]),Urde&&(de=Ur)}function Ge(mr,Ur){var _n=ut([mr*x,Ur*x]);if(Mt){var cn=zt(Mt,_n),Wn=[cn[1],-cn[0],0],hi=zt(Wn,cn);Ht(hi),hi=ft(hi);var ea=mr-se,ga=ea>0?1:-1,Ra=hi[0]*f*ga,$a,ua=y(ea)>180;ua^(ga*sede&&(de=$a)):(Ra=(Ra+360)%360-180,ua^(ga*sede&&(de=Ur))),ua?mrKr(Jt,he)&&(he=mr):Kr(mr,he)>Kr(Jt,he)&&(Jt=mr):he>=Jt?(mrhe&&(he=mr)):mr>se?Kr(Jt,mr)>Kr(Jt,he)&&(he=mr):Kr(mr,he)>Kr(Jt,he)&&(Jt=mr)}else ve.push(oe=[Jt=mr,he=mr]);Urde&&(de=Ur),Mt=_n,se=mr}function cr(){Te.point=Ge}function ur(){oe[0]=Jt,oe[1]=he,Te.point=He,Mt=null}function jr(mr,Ur){if(Mt){var _n=mr-se;te.add(y(_n)>180?_n+(_n>0?360:-360):_n)}else Tt=mr,Lt=Ur;dt.point(mr,Ur),Ge(mr,Ur)}function Hr(){dt.lineStart()}function br(){jr(Tt,Lt),dt.lineEnd(),y(te)>r&&(Jt=-(he=180)),oe[0]=Jt,oe[1]=he,Mt=null}function Kr(mr,Ur){return(Ur-=mr)<0?Ur+360:Ur}function rn(mr,Ur){return mr[0]-Ur[0]}function Ce(mr,Ur){return mr[0]<=mr[1]?mr[0]<=Ur&&Ur<=mr[1]:UrKr(cn[0],cn[1])&&(cn[1]=Wn[1]),Kr(Wn[0],cn[1])>Kr(cn[0],cn[1])&&(cn[0]=Wn[0])):hi.push(cn=Wn);for(ea=-1/0,_n=hi.length-1,Ur=0,cn=hi[_n];Ur<=_n;cn=Wn,++Ur)Wn=hi[Ur],(ga=Kr(cn[1],Wn[0]))>ea&&(ea=ga,Jt=Wn[0],he=cn[1])}return ve=oe=null,Jt===1/0||ge===1/0?[[NaN,NaN],[NaN,NaN]]:[[Jt,ge],[he,de]]}var ne,Ct,gt,St,Nt,ee,le,we,Ue,qe,ar,Ar,Tr,pr,Jr,Vn,Hn={sphere:O,point:Kn,lineStart:ii,lineEnd:Hi,polygonStart:function(){Hn.lineStart=We,Hn.lineEnd=rr},polygonEnd:function(){Hn.lineStart=ii,Hn.lineEnd=Hi}};function Kn(mr,Ur){mr*=x,Ur*=x;var _n=u(Ur);Ci(_n*u(mr),_n*E(mr),E(Ur))}function Ci(mr,Ur,_n){++ne,gt+=(mr-gt)/ne,St+=(Ur-St)/ne,Nt+=(_n-Nt)/ne}function ii(){Hn.point=qn}function qn(mr,Ur){mr*=x,Ur*=x;var _n=u(Ur);pr=_n*u(mr),Jr=_n*E(mr),Vn=E(Ur),Hn.point=oa,Ci(pr,Jr,Vn)}function oa(mr,Ur){mr*=x,Ur*=x;var _n=u(Ur),cn=_n*u(mr),Wn=_n*E(mr),hi=E(Ur),ea=T(h((ea=Jr*hi-Vn*Wn)*ea+(ea=Vn*cn-pr*hi)*ea+(ea=pr*Wn-Jr*cn)*ea),pr*cn+Jr*Wn+Vn*hi);Ct+=ea,ee+=ea*(pr+(pr=cn)),le+=ea*(Jr+(Jr=Wn)),we+=ea*(Vn+(Vn=hi)),Ci(pr,Jr,Vn)}function Hi(){Hn.point=Kn}function We(){Hn.point=fr}function rr(){xr(Ar,Tr),Hn.point=Kn}function fr(mr,Ur){Ar=mr,Tr=Ur,mr*=x,Ur*=x,Hn.point=xr;var _n=u(Ur);pr=_n*u(mr),Jr=_n*E(mr),Vn=E(Ur),Ci(pr,Jr,Vn)}function xr(mr,Ur){mr*=x,Ur*=x;var _n=u(Ur),cn=_n*u(mr),Wn=_n*E(mr),hi=E(Ur),ea=Jr*hi-Vn*Wn,ga=Vn*cn-pr*hi,Ra=pr*Wn-Jr*cn,$a=h(ea*ea+ga*ga+Ra*Ra),ua=w($a),za=$a&&-ua/$a;Ue+=za*ea,qe+=za*ga,ar+=za*Ra,Ct+=ua,ee+=ua*(pr+(pr=cn)),le+=ua*(Jr+(Jr=Wn)),we+=ua*(Vn+(Vn=hi)),Ci(pr,Jr,Vn)}function Qr(mr){ne=Ct=gt=St=Nt=ee=le=we=Ue=qe=ar=0,W(mr,Hn);var Ur=Ue,_n=qe,cn=ar,Wn=Ur*Ur+_n*_n+cn*cn;return Wnn?mr+Math.round(-mr/s)*s:mr,Ur]}Mn.invert=Mn;function ci(mr,Ur,_n){return(mr%=s)?Ur||_n?wn(Pi(mr),Di(Ur,_n)):Pi(mr):Ur||_n?Di(Ur,_n):Mn}function xi(mr){return function(Ur,_n){return Ur+=mr,[Ur>n?Ur-s:Ur<-n?Ur+s:Ur,_n]}}function Pi(mr){var Ur=xi(mr);return Ur.invert=xi(-mr),Ur}function Di(mr,Ur){var _n=u(mr),cn=E(mr),Wn=u(Ur),hi=E(Ur);function ea(ga,Ra){var $a=u(Ra),ua=u(ga)*$a,za=E(ga)*$a,wa=E(Ra),Ji=wa*_n+ua*cn;return[T(za*Wn-Ji*hi,ua*_n-wa*cn),w(Ji*Wn+za*hi)]}return ea.invert=function(ga,Ra){var $a=u(Ra),ua=u(ga)*$a,za=E(ga)*$a,wa=E(Ra),Ji=wa*Wn-za*hi;return[T(za*Wn+wa*hi,ua*_n+Ji*cn),w(Ji*_n-ua*cn)]},ea}function Zi(mr){mr=ci(mr[0]*x,mr[1]*x,mr.length>2?mr[2]*x:0);function Ur(_n){return _n=mr(_n[0]*x,_n[1]*x),_n[0]*=f,_n[1]*=f,_n}return Ur.invert=function(_n){return _n=mr.invert(_n[0]*x,_n[1]*x),_n[0]*=f,_n[1]*=f,_n},Ur}function ui(mr,Ur,_n,cn,Wn,hi){if(_n){var ea=u(Ur),ga=E(Ur),Ra=cn*_n;Wn==null?(Wn=Ur+cn*s,hi=Ur-Ra/2):(Wn=Pa(ea,Wn),hi=Pa(ea,hi),(cn>0?Wnhi)&&(Wn+=cn*s));for(var $a,ua=Wn;cn>0?ua>hi:ua1&&mr.push(mr.pop().concat(mr.shift()))},result:function(){var _n=mr;return mr=[],Ur=null,_n}}}function Pe(mr,Ur){return y(mr[0]-Ur[0])=0;--ga)Wn.point((za=ua[ga])[0],za[1]);else cn(wa.x,wa.p.x,-1,Wn);wa=wa.p}wa=wa.o,ua=wa.z,Ji=!Ji}while(!wa.v);Wn.lineEnd()}}}function $r(mr){if(Ur=mr.length){for(var Ur,_n=0,cn=mr[0],Wn;++_n=0?1:-1,Hl=iu*Pl,au=Hl>n,ml=rs*ds;if(Br.add(T(ml*iu*E(Hl),Zo*tl+ml*u(Hl))),ea+=au?Pl+iu*s:Pl,au^Ji>=_n^no>=_n){var qu=zt(ut(wa),ut(fs));Ht(qu);var Lu=zt(hi,qu);Ht(Lu);var uu=(au^Pl>=0?-1:1)*w(Lu[2]);(cn>uu||cn===uu&&(qu[0]||qu[1]))&&(ga+=au^Pl>=0?1:-1)}}return(ea<-r||ea0){for(Ra||(Wn.polygonStart(),Ra=!0),Wn.lineStart(),tl=0;tl1&&qa&2&&ds.push(ds.pop().concat(ds.shift())),ua.push(ds.filter(Ee))}}return wa}}function Ee(mr){return mr.length>1}function dr(mr,Ur){return((mr=mr.x)[0]<0?mr[1]-o-r:o-mr[1])-((Ur=Ur.x)[0]<0?Ur[1]-o-r:o-Ur[1])}var Vr=an(function(){return!0},yn,Xn,[-n,-o]);function yn(mr){var Ur=NaN,_n=NaN,cn=NaN,Wn;return{lineStart:function(){mr.lineStart(),Wn=1},point:function(hi,ea){var ga=hi>0?n:-n,Ra=y(hi-Ur);y(Ra-n)0?o:-o),mr.point(cn,_n),mr.lineEnd(),mr.lineStart(),mr.point(ga,_n),mr.point(hi,_n),Wn=0):cn!==ga&&Ra>=n&&(y(Ur-cn)r?v((E(Ur)*(hi=u(cn))*E(_n)-E(cn)*(Wn=u(Ur))*E(mr))/(Wn*hi*ea)):(Ur+cn)/2}function Xn(mr,Ur,_n,cn){var Wn;if(mr==null)Wn=_n*o,cn.point(-n,Wn),cn.point(0,Wn),cn.point(n,Wn),cn.point(n,0),cn.point(n,-Wn),cn.point(0,-Wn),cn.point(-n,-Wn),cn.point(-n,0),cn.point(-n,Wn);else if(y(mr[0]-Ur[0])>r){var hi=mr[0]0,Wn=y(Ur)>r;function hi(ua,za,wa,Ji){ui(Ji,mr,_n,wa,ua,za)}function ea(ua,za){return u(ua)*u(za)>Ur}function ga(ua){var za,wa,Ji,eo,rs;return{lineStart:function(){eo=Ji=!1,rs=1},point:function(Zo,os){var fs=[Zo,os],no,qa=ea(Zo,os),ds=cn?qa?0:$a(Zo,os):qa?$a(Zo+(Zo<0?n:-n),os):0;if(!za&&(eo=Ji=qa)&&ua.lineStart(),qa!==Ji&&(no=Ra(za,fs),(!no||Pe(za,no)||Pe(fs,no))&&(fs[2]=1)),qa!==Ji)rs=0,qa?(ua.lineStart(),no=Ra(fs,za),ua.point(no[0],no[1])):(no=Ra(za,fs),ua.point(no[0],no[1],2),ua.lineEnd()),za=no;else if(Wn&&za&&cn^qa){var tl;!(ds&wa)&&(tl=Ra(fs,za,!0))&&(rs=0,cn?(ua.lineStart(),ua.point(tl[0][0],tl[0][1]),ua.point(tl[1][0],tl[1][1]),ua.lineEnd()):(ua.point(tl[1][0],tl[1][1]),ua.lineEnd(),ua.lineStart(),ua.point(tl[0][0],tl[0][1],3)))}qa&&(!za||!Pe(za,fs))&&ua.point(fs[0],fs[1]),za=fs,Ji=qa,wa=ds},lineEnd:function(){Ji&&ua.lineEnd(),za=null},clean:function(){return rs|(eo&&Ji)<<1}}}function Ra(ua,za,wa){var Ji=ut(ua),eo=ut(za),rs=[1,0,0],Zo=zt(Ji,eo),os=wt(Zo,Zo),fs=Zo[0],no=os-fs*fs;if(!no)return!wa&&ua;var qa=Ur*os/no,ds=-Ur*fs/no,tl=zt(rs,Zo),Pl=Wt(rs,qa),iu=Wt(Zo,ds);Pt(Pl,iu);var Hl=tl,au=wt(Pl,Hl),ml=wt(Hl,Hl),qu=au*au-ml*(wt(Pl,Pl)-1);if(!(qu<0)){var Lu=h(qu),uu=Wt(Hl,(-au-Lu)/ml);if(Pt(uu,Pl),uu=ft(uu),!wa)return uu;var zo=ua[0],Ms=za[0],$l=ua[1],Fl=za[1],vc;Ms0^uu[1]<(y(uu[0]-zo)n^(zo<=uu[0]&&uu[0]<=Ms)){var Wc=Wt(Hl,(-au+Lu)/ml);return Pt(Wc,Pl),[uu,ft(Wc)]}}}function $a(ua,za){var wa=cn?mr:n-mr,Ji=0;return ua<-wa?Ji|=1:ua>wa&&(Ji|=2),za<-wa?Ji|=4:za>wa&&(Ji|=8),Ji}return an(ea,ga,hi,cn?[0,-mr]:[-n,mr-n])}function En(mr,Ur,_n,cn,Wn,hi){var ea=mr[0],ga=mr[1],Ra=Ur[0],$a=Ur[1],ua=0,za=1,wa=Ra-ea,Ji=$a-ga,eo;if(eo=_n-ea,!(!wa&&eo>0)){if(eo/=wa,wa<0){if(eo0){if(eo>za)return;eo>ua&&(ua=eo)}if(eo=Wn-ea,!(!wa&&eo<0)){if(eo/=wa,wa<0){if(eo>za)return;eo>ua&&(ua=eo)}else if(wa>0){if(eo0)){if(eo/=Ji,Ji<0){if(eo0){if(eo>za)return;eo>ua&&(ua=eo)}if(eo=hi-ga,!(!Ji&&eo<0)){if(eo/=Ji,Ji<0){if(eo>za)return;eo>ua&&(ua=eo)}else if(Ji>0){if(eo0&&(mr[0]=ea+ua*wa,mr[1]=ga+ua*Ji),za<1&&(Ur[0]=ea+za*wa,Ur[1]=ga+za*Ji),!0}}}}}var Zn=1e9,Ca=-Zn;function Ri(mr,Ur,_n,cn){function Wn($a,ua){return mr<=$a&&$a<=_n&&Ur<=ua&&ua<=cn}function hi($a,ua,za,wa){var Ji=0,eo=0;if($a==null||(Ji=ea($a,za))!==(eo=ea(ua,za))||Ra($a,ua)<0^za>0)do wa.point(Ji===0||Ji===3?mr:_n,Ji>1?cn:Ur);while((Ji=(Ji+za+4)%4)!==eo);else wa.point(ua[0],ua[1])}function ea($a,ua){return y($a[0]-mr)0?0:3:y($a[0]-_n)0?2:1:y($a[1]-Ur)0?1:0:ua>0?3:2}function ga($a,ua){return Ra($a.x,ua.x)}function Ra($a,ua){var za=ea($a,1),wa=ea(ua,1);return za!==wa?za-wa:za===0?ua[1]-$a[1]:za===1?$a[0]-ua[0]:za===2?$a[1]-ua[1]:ua[0]-$a[0]}return function($a){var ua=$a,za=ze(),wa,Ji,eo,rs,Zo,os,fs,no,qa,ds,tl,Pl={point:iu,lineStart:qu,lineEnd:Lu,polygonStart:au,polygonEnd:ml};function iu(zo,Ms){Wn(zo,Ms)&&ua.point(zo,Ms)}function Hl(){for(var zo=0,Ms=0,$l=Ji.length;Ms<$l;++Ms)for(var Fl=Ji[Ms],vc=1,Hc=Fl.length,Pc=Fl[0],Ph,Wc,zh=Pc[0],Iu=Pc[1];vccn&&(zh-Ph)*(cn-Wc)>(Iu-Wc)*(mr-Ph)&&++zo:Iu<=cn&&(zh-Ph)*(cn-Wc)<(Iu-Wc)*(mr-Ph)&&--zo;return zo}function au(){ua=za,wa=[],Ji=[],tl=!0}function ml(){var zo=Hl(),Ms=tl&&zo,$l=(wa=g.merge(wa)).length;(Ms||$l)&&($a.polygonStart(),Ms&&($a.lineStart(),hi(null,null,1,$a),$a.lineEnd()),$l&&qr(wa,ga,zo,hi,$a),$a.polygonEnd()),ua=$a,wa=Ji=eo=null}function qu(){Pl.point=uu,Ji&&Ji.push(eo=[]),ds=!0,qa=!1,fs=no=NaN}function Lu(){wa&&(uu(rs,Zo),os&&qa&&za.rejoin(),wa.push(za.result())),Pl.point=iu,qa&&ua.lineEnd()}function uu(zo,Ms){var $l=Wn(zo,Ms);if(Ji&&eo.push([zo,Ms]),ds)rs=zo,Zo=Ms,os=$l,ds=!1,$l&&(ua.lineStart(),ua.point(zo,Ms));else if($l&&qa)ua.point(zo,Ms);else{var Fl=[fs=Math.max(Ca,Math.min(Zn,fs)),no=Math.max(Ca,Math.min(Zn,no))],vc=[zo=Math.max(Ca,Math.min(Zn,zo)),Ms=Math.max(Ca,Math.min(Zn,Ms))];En(Fl,vc,mr,Ur,_n,cn)?(qa||(ua.lineStart(),ua.point(Fl[0],Fl[1])),ua.point(vc[0],vc[1]),$l||ua.lineEnd(),tl=!1):$l&&(ua.lineStart(),ua.point(zo,Ms),tl=!1)}fs=zo,no=Ms,qa=$l}return Pl}}function Ja(){var mr=0,Ur=0,_n=960,cn=500,Wn,hi,ea;return ea={stream:function(ga){return Wn&&hi===ga?Wn:Wn=Ri(mr,Ur,_n,cn)(hi=ga)},extent:function(ga){return arguments.length?(mr=+ga[0][0],Ur=+ga[0][1],_n=+ga[1][0],cn=+ga[1][1],Wn=hi=null,ea):[[mr,Ur],[_n,cn]]}}}var Xa=P(),Io,po,Do,Ia={sphere:O,point:O,lineStart:gs,lineEnd:O,polygonStart:O,polygonEnd:O};function gs(){Ia.point=ll,Ia.lineEnd=is}function is(){Ia.point=Ia.lineEnd=O}function ll(mr,Ur){mr*=x,Ur*=x,Io=mr,po=E(Ur),Do=u(Ur),Ia.point=Ho}function Ho(mr,Ur){mr*=x,Ur*=x;var _n=E(Ur),cn=u(Ur),Wn=y(mr-Io),hi=u(Wn),ea=E(Wn),ga=cn*ea,Ra=Do*_n-po*cn*hi,$a=po*_n+Do*cn*hi;Xa.add(T(h(ga*ga+Ra*Ra),$a)),Io=mr,po=_n,Do=cn}function Gs(mr){return Xa.reset(),W(mr,Ia),+Xa}var as=[null,null],ul={type:"LineString",coordinates:as};function Js(mr,Ur){return as[0]=mr,as[1]=Ur,Gs(ul)}var Rl={Feature:function(mr,Ur){return Cs(mr.geometry,Ur)},FeatureCollection:function(mr,Ur){for(var _n=mr.features,cn=-1,Wn=_n.length;++cn0&&(Wn=Js(mr[hi],mr[hi-1]),Wn>0&&_n<=Wn&&cn<=Wn&&(_n+cn-Wn)*(1-Math.pow((_n-cn)/Wn,2))r}).map(wa)).concat(g.range(b(hi/$a)*$a,Wn,$a).filter(function(no){return y(no%za)>r}).map(Ji))}return os.lines=function(){return fs().map(function(no){return{type:"LineString",coordinates:no}})},os.outline=function(){return{type:"Polygon",coordinates:[eo(cn).concat(rs(ea).slice(1),eo(_n).reverse().slice(1),rs(ga).reverse().slice(1))]}},os.extent=function(no){return arguments.length?os.extentMajor(no).extentMinor(no):os.extentMinor()},os.extentMajor=function(no){return arguments.length?(cn=+no[0][0],_n=+no[1][0],ga=+no[0][1],ea=+no[1][1],cn>_n&&(no=cn,cn=_n,_n=no),ga>ea&&(no=ga,ga=ea,ea=no),os.precision(Zo)):[[cn,ga],[_n,ea]]},os.extentMinor=function(no){return arguments.length?(Ur=+no[0][0],mr=+no[1][0],hi=+no[0][1],Wn=+no[1][1],Ur>mr&&(no=Ur,Ur=mr,mr=no),hi>Wn&&(no=hi,hi=Wn,Wn=no),os.precision(Zo)):[[Ur,hi],[mr,Wn]]},os.step=function(no){return arguments.length?os.stepMajor(no).stepMinor(no):os.stepMinor()},os.stepMajor=function(no){return arguments.length?(ua=+no[0],za=+no[1],os):[ua,za]},os.stepMinor=function(no){return arguments.length?(Ra=+no[0],$a=+no[1],os):[Ra,$a]},os.precision=function(no){return arguments.length?(Zo=+no,wa=La(hi,Wn,90),Ji=uo(Ur,mr,Zo),eo=La(ga,ea,90),rs=uo(cn,_n,Zo),os):Zo},os.extentMajor([[-180,-90+r],[180,90-r]]).extentMinor([[-180,-80-r],[180,80+r]])}function Kl(){return Hs()()}function Go(mr,Ur){var _n=mr[0]*x,cn=mr[1]*x,Wn=Ur[0]*x,hi=Ur[1]*x,ea=u(cn),ga=E(cn),Ra=u(hi),$a=E(hi),ua=ea*u(_n),za=ea*E(_n),wa=Ra*u(Wn),Ji=Ra*E(Wn),eo=2*w(h(R(hi-cn)+ea*Ra*R(Wn-_n))),rs=E(eo),Zo=eo?function(os){var fs=E(os*=eo)/rs,no=E(eo-os)/rs,qa=no*ua+fs*wa,ds=no*za+fs*Ji,tl=no*ga+fs*$a;return[T(ds,qa)*f,T(tl,h(qa*qa+ds*ds))*f]}:function(){return[_n*f,cn*f]};return Zo.distance=eo,Zo}function ql(mr){return mr}var il=P(),Cl=P(),Fu,ao,Ts,Ls,nu={point:O,lineStart:O,lineEnd:O,polygonStart:function(){nu.lineStart=cl,nu.lineEnd=Gu},polygonEnd:function(){nu.lineStart=nu.lineEnd=nu.point=O,il.add(y(Cl)),Cl.reset()},result:function(){var mr=il/2;return il.reset(),mr}};function cl(){nu.point=Qo}function Qo(mr,Ur){nu.point=Mu,Fu=Ts=mr,ao=Ls=Ur}function Mu(mr,Ur){Cl.add(Ls*mr-Ts*Ur),Ts=mr,Ls=Ur}function Gu(){Mu(Fu,ao)}var _l=1/0,Ol=_l,Xl=-_l,tu=Xl,ac={point:ph,lineStart:O,lineEnd:O,polygonStart:O,polygonEnd:O,result:function(){var mr=[[_l,Ol],[Xl,tu]];return Xl=tu=-(Ol=_l=1/0),mr}};function ph(mr,Ur){mr<_l&&(_l=mr),mr>Xl&&(Xl=mr),Urtu&&(tu=Ur)}var Jc=0,ah=0,Nf=0,Sf=0,Dl=0,Bc=0,jf=0,hc=0,oc=0,fc,oh,su,sc,el={point:Zl,lineStart:Mh,lineEnd:xu,polygonStart:function(){el.lineStart=Cd,el.lineEnd=Qs},polygonEnd:function(){el.point=Zl,el.lineStart=Mh,el.lineEnd=xu},result:function(){var mr=oc?[jf/oc,hc/oc]:Bc?[Sf/Bc,Dl/Bc]:Nf?[Jc/Nf,ah/Nf]:[NaN,NaN];return Jc=ah=Nf=Sf=Dl=Bc=jf=hc=oc=0,mr}};function Zl(mr,Ur){Jc+=mr,ah+=Ur,++Nf}function Mh(){el.point=Lc}function Lc(mr,Ur){el.point=jh,Zl(su=mr,sc=Ur)}function jh(mr,Ur){var _n=mr-su,cn=Ur-sc,Wn=h(_n*_n+cn*cn);Sf+=Wn*(su+mr)/2,Dl+=Wn*(sc+Ur)/2,Bc+=Wn,Zl(su=mr,sc=Ur)}function xu(){el.point=Zl}function Cd(){el.point=Wd}function Qs(){Ll(fc,oh)}function Wd(mr,Ur){el.point=Ll,Zl(fc=su=mr,oh=sc=Ur)}function Ll(mr,Ur){var _n=mr-su,cn=Ur-sc,Wn=h(_n*_n+cn*cn);Sf+=Wn*(su+mr)/2,Dl+=Wn*(sc+Ur)/2,Bc+=Wn,Wn=sc*mr-su*Ur,jf+=Wn*(su+mr),hc+=Wn*(sc+Ur),oc+=Wn*3,Zl(su=mr,sc=Ur)}function Jo(mr){this._context=mr}Jo.prototype={_radius:4.5,pointRadius:function(mr){return this._radius=mr,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(mr,Ur){switch(this._point){case 0:{this._context.moveTo(mr,Ur),this._point=1;break}case 1:{this._context.lineTo(mr,Ur);break}default:{this._context.moveTo(mr+this._radius,Ur),this._context.arc(mr,Ur,this._radius,0,s);break}}},result:O};var lf=P(),sh,ec,Uf,Uh,yf,lc={point:O,lineStart:function(){lc.point=hd},lineEnd:function(){sh&&$f(ec,Uf),lc.point=O},polygonStart:function(){sh=!0},polygonEnd:function(){sh=null},result:function(){var mr=+lf;return lf.reset(),mr}};function hd(mr,Ur){lc.point=$f,ec=Uh=mr,Uf=yf=Ur}function $f(mr,Ur){Uh-=mr,yf-=Ur,lf.add(h(Uh*Uh+yf*yf)),Uh=mr,yf=Ur}function xf(){this._string=[]}xf.prototype={_radius:4.5,_circle:Vh(4.5),pointRadius:function(mr){return(mr=+mr)!==this._radius&&(this._radius=mr,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(mr,Ur){switch(this._point){case 0:{this._string.push("M",mr,",",Ur),this._point=1;break}case 1:{this._string.push("L",mr,",",Ur);break}default:{this._circle==null&&(this._circle=Vh(this._radius)),this._string.push("M",mr,",",Ur,this._circle);break}}},result:function(){if(this._string.length){var mr=this._string.join("");return this._string=[],mr}else return null}};function Vh(mr){return"m0,"+mr+"a"+mr+","+mr+" 0 1,1 0,"+-2*mr+"a"+mr+","+mr+" 0 1,1 0,"+2*mr+"z"}function Vf(mr,Ur){var _n=4.5,cn,Wn;function hi(ea){return ea&&(typeof _n=="function"&&Wn.pointRadius(+_n.apply(this,arguments)),W(ea,cn(Wn))),Wn.result()}return hi.area=function(ea){return W(ea,cn(nu)),nu.result()},hi.measure=function(ea){return W(ea,cn(lc)),lc.result()},hi.bounds=function(ea){return W(ea,cn(ac)),ac.result()},hi.centroid=function(ea){return W(ea,cn(el)),el.result()},hi.projection=function(ea){return arguments.length?(cn=ea==null?(mr=null,ql):(mr=ea).stream,hi):mr},hi.context=function(ea){return arguments.length?(Wn=ea==null?(Ur=null,new xf):new Jo(Ur=ea),typeof _n!="function"&&Wn.pointRadius(_n),hi):Ur},hi.pointRadius=function(ea){return arguments.length?(_n=typeof ea=="function"?ea:(Wn.pointRadius(+ea),+ea),hi):_n},hi.projection(mr).context(Ur)}function Hf(mr){return{stream:lh(mr)}}function lh(mr){return function(Ur){var _n=new Gf;for(var cn in mr)_n[cn]=mr[cn];return _n.stream=Ur,_n}}function Gf(){}Gf.prototype={constructor:Gf,point:function(mr,Ur){this.stream.point(mr,Ur)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Sh(mr,Ur,_n){var cn=mr.clipExtent&&mr.clipExtent();return mr.scale(150).translate([0,0]),cn!=null&&mr.clipExtent(null),W(_n,mr.stream(ac)),Ur(ac.result()),cn!=null&&mr.clipExtent(cn),mr}function mh(mr,Ur,_n){return Sh(mr,function(cn){var Wn=Ur[1][0]-Ur[0][0],hi=Ur[1][1]-Ur[0][1],ea=Math.min(Wn/(cn[1][0]-cn[0][0]),hi/(cn[1][1]-cn[0][1])),ga=+Ur[0][0]+(Wn-ea*(cn[1][0]+cn[0][0]))/2,Ra=+Ur[0][1]+(hi-ea*(cn[1][1]+cn[0][1]))/2;mr.scale(150*ea).translate([ga,Ra])},_n)}function uc(mr,Ur,_n){return mh(mr,[[0,0],Ur],_n)}function ef(mr,Ur,_n){return Sh(mr,function(cn){var Wn=+Ur,hi=Wn/(cn[1][0]-cn[0][0]),ea=(Wn-hi*(cn[1][0]+cn[0][0]))/2,ga=-hi*cn[0][1];mr.scale(150*hi).translate([ea,ga])},_n)}function Wf(mr,Ur,_n){return Sh(mr,function(cn){var Wn=+Ur,hi=Wn/(cn[1][1]-cn[0][1]),ea=-hi*cn[0][0],ga=(Wn-hi*(cn[1][1]+cn[0][1]))/2;mr.scale(150*hi).translate([ea,ga])},_n)}var Jl=16,Ef=u(30*x);function Ld(mr,Ur){return+Ur?_f(mr,Ur):Yf(mr)}function Yf(mr){return lh({point:function(Ur,_n){Ur=mr(Ur,_n),this.stream.point(Ur[0],Ur[1])}})}function _f(mr,Ur){function _n(cn,Wn,hi,ea,ga,Ra,$a,ua,za,wa,Ji,eo,rs,Zo){var os=$a-cn,fs=ua-Wn,no=os*os+fs*fs;if(no>4*Ur&&rs--){var qa=ea+wa,ds=ga+Ji,tl=Ra+eo,Pl=h(qa*qa+ds*ds+tl*tl),iu=w(tl/=Pl),Hl=y(y(tl)-1)Ur||y((os*Lu+fs*uu)/no-.5)>.3||ea*wa+ga*Ji+Ra*eo2?zo[2]%360*x:0,Lu()):[ga*f,Ra*f,$a*f]},ml.angle=function(zo){return arguments.length?(za=zo%360*x,Lu()):za*f},ml.reflectX=function(zo){return arguments.length?(wa=zo?-1:1,Lu()):wa<0},ml.reflectY=function(zo){return arguments.length?(Ji=zo?-1:1,Lu()):Ji<0},ml.precision=function(zo){return arguments.length?(tl=Ld(Pl,ds=zo*zo),uu()):h(ds)},ml.fitExtent=function(zo,Ms){return mh(ml,zo,Ms)},ml.fitSize=function(zo,Ms){return uc(ml,zo,Ms)},ml.fitWidth=function(zo,Ms){return ef(ml,zo,Ms)},ml.fitHeight=function(zo,Ms){return Wf(ml,zo,Ms)};function Lu(){var zo=zu(_n,0,0,wa,Ji,za).apply(null,Ur(hi,ea)),Ms=(za?zu:Xf)(_n,cn-zo[0],Wn-zo[1],wa,Ji,za);return ua=ci(ga,Ra,$a),Pl=wn(Ur,Ms),iu=wn(ua,Pl),tl=Ld(Pl,ds),uu()}function uu(){return Hl=au=null,ml}return function(){return Ur=mr.apply(this,arguments),ml.invert=Ur.invert&&qu,Lu()}}function lu(mr){var Ur=0,_n=n/3,cn=Hh(mr),Wn=cn(Ur,_n);return Wn.parallels=function(hi){return arguments.length?cn(Ur=hi[0]*x,_n=hi[1]*x):[Ur*f,_n*f]},Wn}function Eh(mr){var Ur=u(mr);function _n(cn,Wn){return[cn*Ur,E(Wn)/Ur]}return _n.invert=function(cn,Wn){return[cn/Ur,w(Wn*Ur)]},_n}function Sc(mr,Ur){var _n=E(mr),cn=(_n+E(Ur))/2;if(y(cn)=.12&&Zo<.234&&rs>=-.425&&rs<-.214?Wn:Zo>=.166&&Zo<.234&&rs>=-.214&&rs<-.115?ea:_n).invert(wa)},ua.stream=function(wa){return mr&&Ur===wa?mr:mr=uf([_n.stream(Ur=wa),Wn.stream(wa),ea.stream(wa)])},ua.precision=function(wa){return arguments.length?(_n.precision(wa),Wn.precision(wa),ea.precision(wa),za()):_n.precision()},ua.scale=function(wa){return arguments.length?(_n.scale(wa),Wn.scale(wa*.35),ea.scale(wa),ua.translate(_n.translate())):_n.scale()},ua.translate=function(wa){if(!arguments.length)return _n.translate();var Ji=_n.scale(),eo=+wa[0],rs=+wa[1];return cn=_n.translate(wa).clipExtent([[eo-.455*Ji,rs-.238*Ji],[eo+.455*Ji,rs+.238*Ji]]).stream($a),hi=Wn.translate([eo-.307*Ji,rs+.201*Ji]).clipExtent([[eo-.425*Ji+r,rs+.12*Ji+r],[eo-.214*Ji-r,rs+.234*Ji-r]]).stream($a),ga=ea.translate([eo-.205*Ji,rs+.212*Ji]).clipExtent([[eo-.214*Ji+r,rs+.166*Ji+r],[eo-.115*Ji-r,rs+.234*Ji-r]]).stream($a),za()},ua.fitExtent=function(wa,Ji){return mh(ua,wa,Ji)},ua.fitSize=function(wa,Ji){return uc(ua,wa,Ji)},ua.fitWidth=function(wa,Ji){return ef(ua,wa,Ji)},ua.fitHeight=function(wa,Ji){return Wf(ua,wa,Ji)};function za(){return mr=Ur=null,ua}return ua.scale(1070)}function Wh(mr){return function(Ur,_n){var cn=u(Ur),Wn=u(_n),hi=mr(cn*Wn);return[hi*Wn*E(Ur),hi*E(_n)]}}function Cf(mr){return function(Ur,_n){var cn=h(Ur*Ur+_n*_n),Wn=mr(cn),hi=E(Wn),ea=u(Wn);return[T(Ur*hi,cn*ea),w(cn&&_n*hi/cn)]}}var Pd=Wh(function(mr){return h(2/(1+mr))});Pd.invert=Cf(function(mr){return 2*w(mr/2)});function Qd(){return jc(Pd).scale(124.75).clipAngle(180-.001)}var cf=Wh(function(mr){return(mr=k(mr))&&mr/E(mr)});cf.invert=Cf(function(mr){return mr});function Lf(){return jc(cf).scale(79.4188).clipAngle(180-.001)}function wc(mr,Ur){return[mr,C(p((o+Ur)/2))]}wc.invert=function(mr,Ur){return[mr,2*v(_(Ur))-o]};function hf(){return Qc(wc).scale(961/s)}function Qc(mr){var Ur=jc(mr),_n=Ur.center,cn=Ur.scale,Wn=Ur.translate,hi=Ur.clipExtent,ea=null,ga,Ra,$a;Ur.scale=function(za){return arguments.length?(cn(za),ua()):cn()},Ur.translate=function(za){return arguments.length?(Wn(za),ua()):Wn()},Ur.center=function(za){return arguments.length?(_n(za),ua()):_n()},Ur.clipExtent=function(za){return arguments.length?(za==null?ea=ga=Ra=$a=null:(ea=+za[0][0],ga=+za[0][1],Ra=+za[1][0],$a=+za[1][1]),ua()):ea==null?null:[[ea,ga],[Ra,$a]]};function ua(){var za=n*cn(),wa=Ur(Zi(Ur.rotate()).invert([0,0]));return hi(ea==null?[[wa[0]-za,wa[1]-za],[wa[0]+za,wa[1]+za]]:mr===wc?[[Math.max(wa[0]-za,ea),ga],[Math.min(wa[0]+za,Ra),$a]]:[[ea,Math.max(wa[1]-za,ga)],[Ra,Math.min(wa[1]+za,$a)]])}return ua()}function ff(mr){return p((o+mr)/2)}function Pf(mr,Ur){var _n=u(mr),cn=mr===Ur?E(mr):C(_n/u(Ur))/C(ff(Ur)/ff(mr)),Wn=_n*M(ff(mr),cn)/cn;if(!cn)return wc;function hi(ea,ga){Wn>0?ga<-o+r&&(ga=-o+r):ga>o-r&&(ga=o-r);var Ra=Wn/M(ff(ga),cn);return[Ra*E(cn*ea),Wn-Ra*u(cn*ea)]}return hi.invert=function(ea,ga){var Ra=Wn-ga,$a=A(cn)*h(ea*ea+Ra*Ra),ua=T(ea,y(Ra))*A(Ra);return Ra*cn<0&&(ua-=n*A(ea)*A(Ra)),[ua/cn,2*v(M(Wn/$a,1/cn))-o]},hi}function vh(){return lu(Pf).scale(109.5).parallels([30,30])}function bu(mr,Ur){return[mr,Ur]}bu.invert=bu;function Ch(){return jc(bu).scale(152.63)}function Vc(mr,Ur){var _n=u(mr),cn=mr===Ur?E(mr):(_n-u(Ur))/(Ur-mr),Wn=_n/cn+mr;if(y(cn)r&&--cn>0);return[mr/(.8707+(hi=_n*_n)*(-.131979+hi*(-.013791+hi*hi*hi*(.003971-.001529*hi)))),_n]};function yh(){return jc(Lh).scale(175.295)}function Ru(mr,Ur){return[u(Ur)*E(mr),E(Ur)]}Ru.invert=Cf(w);function eu(){return jc(Ru).scale(249.5).clipAngle(90+r)}function xh(mr,Ur){var _n=u(Ur),cn=1+u(mr)*_n;return[_n*E(mr)/cn,E(Ur)/cn]}xh.invert=Cf(function(mr){return 2*v(mr)});function df(){return jc(xh).scale(250).clipAngle(142)}function _h(mr,Ur){return[C(p((o+Ur)/2)),-mr]}_h.invert=function(mr,Ur){return[-Ur,2*v(_(mr))-o]};function qf(){var mr=Qc(_h),Ur=mr.center,_n=mr.rotate;return mr.center=function(cn){return arguments.length?Ur([-cn[1],cn[0]]):(cn=Ur(),[cn[1],-cn[0]])},mr.rotate=function(cn){return arguments.length?_n([cn[0],cn[1],cn.length>2?cn[2]+90:90]):(cn=_n(),[cn[0],cn[1],cn[2]-90])},_n([0,0,90]).scale(159.155)}c.geoAlbers=_u,c.geoAlbersUsa=gh,c.geoArea=Y,c.geoAzimuthalEqualArea=Qd,c.geoAzimuthalEqualAreaRaw=Pd,c.geoAzimuthalEquidistant=Lf,c.geoAzimuthalEquidistantRaw=cf,c.geoBounds=$t,c.geoCentroid=Qr,c.geoCircle=Wa,c.geoClipAntimeridian=Vr,c.geoClipCircle=Pn,c.geoClipExtent=Ja,c.geoClipRectangle=Ri,c.geoConicConformal=vh,c.geoConicConformalRaw=Pf,c.geoConicEqualArea=Uc,c.geoConicEqualAreaRaw=Sc,c.geoConicEquidistant=fd,c.geoConicEquidistantRaw=Vc,c.geoContains=Ns,c.geoDistance=Js,c.geoEqualEarth=zd,c.geoEqualEarthRaw=wf,c.geoEquirectangular=Ch,c.geoEquirectangularRaw=bu,c.geoGnomonic=Jf,c.geoGnomonicRaw=gc,c.geoGraticule=Hs,c.geoGraticule10=Kl,c.geoIdentity=eh,c.geoInterpolate=Go,c.geoLength=Gs,c.geoMercator=hf,c.geoMercatorRaw=wc,c.geoNaturalEarth1=yh,c.geoNaturalEarth1Raw=Lh,c.geoOrthographic=eu,c.geoOrthographicRaw=Ru,c.geoPath=Vf,c.geoProjection=jc,c.geoProjectionMutator=Hh,c.geoRotation=Zi,c.geoStereographic=df,c.geoStereographicRaw=xh,c.geoStream=W,c.geoTransform=Hf,c.geoTransverseMercator=qf,c.geoTransverseMercatorRaw=_h,Object.defineProperty(c,"__esModule",{value:!0})})}),SU=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q,yS(),y3()):g(c.d3=c.d3||{},c.d3,c.d3)})(Q,function(c,g,P){var S=Math.abs,t=Math.atan,e=Math.atan2,r=Math.cos,a=Math.exp,n=Math.floor,o=Math.log,i=Math.max,s=Math.min,f=Math.pow,x=Math.round,y=Math.sign||function(Xt){return Xt>0?1:Xt<0?-1:0},v=Math.sin,T=Math.tan,u=1e-6,b=1e-12,_=Math.PI,C=_/2,M=_/4,E=Math.SQRT1_2,A=V(2),h=V(_),p=_*2,k=180/_,w=_/180;function R(Xt){return Xt?Xt/Math.sin(Xt):1}function O(Xt){return Xt>1?C:Xt<-1?-C:Math.asin(Xt)}function N(Xt){return Xt>1?0:Xt<-1?_:Math.acos(Xt)}function V(Xt){return Xt>0?Math.sqrt(Xt):0}function H(Xt){return Xt=a(2*Xt),(Xt-1)/(Xt+1)}function F(Xt){return(a(Xt)-a(-Xt))/2}function U(Xt){return(a(Xt)+a(-Xt))/2}function W(Xt){return o(Xt+V(Xt*Xt+1))}function q(Xt){return o(Xt+V(Xt*Xt-1))}function X(Xt){var ae=T(Xt/2),xe=2*o(r(Xt/2))/(ae*ae);function Ae(je,Ie){var Ze=r(je),wr=r(Ie),Ir=v(Ie),Nr=wr*Ze,tn=-((1-Nr?o((1+Nr)/2)/(1-Nr):-.5)+xe/(1+Nr));return[tn*wr*v(je),tn*Ir]}return Ae.invert=function(je,Ie){var Ze=V(je*je+Ie*Ie),wr=-Xt/2,Ir=50,Nr;if(!Ze)return[0,0];do{var tn=wr/2,mn=r(tn),zn=v(tn),Bn=zn/mn,ri=-o(S(mn));wr-=Nr=(2/Bn*ri-xe*Bn-Ze)/(-ri/(zn*zn)+1-xe/(2*mn*mn))*(mn<0?.7:1)}while(S(Nr)>u&&--Ir>0);var Fi=v(wr);return[e(je*Fi,Ze*r(wr)),O(Ie*Fi/Ze)]},Ae}function lt(){var Xt=C,ae=g.geoProjectionMutator(X),xe=ae(Xt);return xe.radius=function(Ae){return arguments.length?ae(Xt=Ae*w):Xt*k},xe.scale(179.976).clipAngle(147)}function yt(Xt,ae){var xe=r(ae),Ae=R(N(xe*r(Xt/=2)));return[2*xe*v(Xt)*Ae,v(ae)*Ae]}yt.invert=function(Xt,ae){if(!(Xt*Xt+4*ae*ae>_*_+u)){var xe=Xt,Ae=ae,je=25;do{var Ie=v(xe),Ze=v(xe/2),wr=r(xe/2),Ir=v(Ae),Nr=r(Ae),tn=v(2*Ae),mn=Ir*Ir,zn=Nr*Nr,Bn=Ze*Ze,ri=1-zn*wr*wr,Fi=ri?N(Nr*wr)*V(da=1/ri):da=0,da,ha=2*Fi*Nr*Ze-Xt,ka=Fi*Ir-ae,io=da*(zn*Bn+Fi*Nr*wr*mn),Ro=da*(.5*Ie*tn-Fi*2*Ir*Ze),Mo=da*.25*(tn*Ze-Fi*Ir*zn*Ie),hs=da*(mn*wr+Fi*Bn*Nr),hl=Ro*Mo-hs*io;if(!hl)break;var vl=(ka*Ro-ha*hs)/hl,Os=(ha*Mo-ka*io)/hl;xe-=vl,Ae-=Os}while((S(vl)>u||S(Os)>u)&&--je>0);return[xe,Ae]}};function pt(){return g.geoProjection(yt).scale(152.63)}function st(Xt){var ae=v(Xt),xe=r(Xt),Ae=Xt>=0?1:-1,je=T(Ae*Xt),Ie=(1+ae-xe)/2;function Ze(wr,Ir){var Nr=r(Ir),tn=r(wr/=2);return[(1+Nr)*v(wr),(Ae*Ir>-e(tn,je)-.001?0:-Ae*10)+Ie+v(Ir)*xe-(1+Nr)*ae*tn]}return Ze.invert=function(wr,Ir){var Nr=0,tn=0,mn=50;do{var zn=r(Nr),Bn=v(Nr),ri=r(tn),Fi=v(tn),da=1+ri,ha=da*Bn-wr,ka=Ie+Fi*xe-da*ae*zn-Ir,io=da*zn/2,Ro=-Bn*Fi,Mo=ae*da*Bn/2,hs=xe*ri+ae*zn*Fi,hl=Ro*Mo-hs*io,vl=(ka*Ro-ha*hs)/hl/2,Os=(ha*Mo-ka*io)/hl;S(Os)>2&&(Os/=2),Nr-=vl,tn-=Os}while((S(vl)>u||S(Os)>u)&&--mn>0);return Ae*tn>-e(r(Nr),je)-.001?[Nr*2,tn]:null},Ze}function tt(){var Xt=20*w,ae=Xt>=0?1:-1,xe=T(ae*Xt),Ae=g.geoProjectionMutator(st),je=Ae(Xt),Ie=je.stream;return je.parallel=function(Ze){return arguments.length?(xe=T((ae=(Xt=Ze*w)>=0?1:-1)*Xt),Ae(Xt)):Xt*k},je.stream=function(Ze){var wr=je.rotate(),Ir=Ie(Ze),Nr=(je.rotate([0,0]),Ie(Ze)),tn=je.precision();return je.rotate(wr),Ir.sphere=function(){Nr.polygonStart(),Nr.lineStart();for(var mn=ae*-180;ae*mn<180;mn+=ae*90)Nr.point(mn,ae*90);if(Xt)for(;ae*(mn-=3*ae*tn)>=-180;)Nr.point(mn,ae*-e(r(mn*w/2),xe)*k);Nr.lineEnd(),Nr.polygonEnd()},Ir},je.scale(218.695).center([0,28.0974])}function dt(Xt,ae){var xe=T(ae/2),Ae=V(1-xe*xe),je=1+Ae*r(Xt/=2),Ie=v(Xt)*Ae/je,Ze=xe/je,wr=Ie*Ie,Ir=Ze*Ze;return[4/3*Ie*(3+wr-3*Ir),4/3*Ze*(3+3*wr-Ir)]}dt.invert=function(Xt,ae){if(Xt*=3/8,ae*=3/8,!Xt&&S(ae)>1)return null;var xe=Xt*Xt,Ae=ae*ae,je=1+xe+Ae,Ie=V((je-V(je*je-4*ae*ae))/2),Ze=O(Ie)/3,wr=Ie?q(S(ae/Ie))/3:W(S(Xt))/3,Ir=r(Ze),Nr=U(wr),tn=Nr*Nr-Ir*Ir;return[y(Xt)*2*e(F(wr)*Ir,.25-tn),y(ae)*2*e(Nr*v(Ze),.25+tn)]};function rt(){return g.geoProjection(dt).scale(66.1603)}var at=V(8),vt=o(1+A);function it(Xt,ae){var xe=S(ae);return xeb&&--Ae>0);return[Xt/(r(xe)*(at-1/v(xe))),y(ae)*xe]};function Y(){return g.geoProjection(it).scale(112.314)}function ft(Xt){var ae=2*_/Xt;function xe(Ae,je){var Ie=g.geoAzimuthalEquidistantRaw(Ae,je);if(S(Ae)>C){var Ze=e(Ie[1],Ie[0]),wr=V(Ie[0]*Ie[0]+Ie[1]*Ie[1]),Ir=ae*x((Ze-C)/ae)+C,Nr=e(v(Ze-=Ir),2-r(Ze));Ze=Ir+O(_/wr*v(Nr))-Nr,Ie[0]=wr*r(Ze),Ie[1]=wr*v(Ze)}return Ie}return xe.invert=function(Ae,je){var Ie=V(Ae*Ae+je*je);if(Ie>C){var Ze=e(je,Ae),wr=ae*x((Ze-C)/ae)+C,Ir=Ze>wr?-1:1,Nr=Ie*r(wr-Ze),tn=1/T(Ir*N((Nr-_)/V(_*(_-2*Nr)+Ie*Ie)));Ze=wr+2*t((tn+Ir*V(tn*tn-3))/3),Ae=Ie*r(Ze),je=Ie*v(Ze)}return g.geoAzimuthalEquidistantRaw.invert(Ae,je)},xe}function ut(){var Xt=5,ae=g.geoProjectionMutator(ft),xe=ae(Xt),Ae=xe.stream,je=.01,Ie=-r(je*w),Ze=v(je*w);return xe.lobes=function(wr){return arguments.length?ae(Xt=+wr):Xt},xe.stream=function(wr){var Ir=xe.rotate(),Nr=Ae(wr),tn=(xe.rotate([0,0]),Ae(wr));return xe.rotate(Ir),Nr.sphere=function(){tn.polygonStart(),tn.lineStart();for(var mn=0,zn=360/Xt,Bn=2*_/Xt,ri=90-180/Xt,Fi=C;mn0&&S(je)>u);return Ae<0?NaN:xe}function Ht(Xt,ae,xe){return ae===void 0&&(ae=40),xe===void 0&&(xe=b),function(Ae,je,Ie,Ze){var wr,Ir,Nr;Ie=Ie===void 0?0:+Ie,Ze=Ze===void 0?0:+Ze;for(var tn=0;tnwr){Ie-=Ir/=2,Ze-=Nr/=2;continue}wr=ri;var Fi=(Ie>0?-1:1)*xe,da=(Ze>0?-1:1)*xe,ha=Xt(Ie+Fi,Ze),ka=Xt(Ie,Ze+da),io=(ha[0]-mn[0])/Fi,Ro=(ha[1]-mn[1])/Fi,Mo=(ka[0]-mn[0])/da,hs=(ka[1]-mn[1])/da,hl=hs*io-Ro*Mo,vl=(S(hl)<.5?.5:1)/hl;if(Ir=(Bn*Mo-zn*hs)*vl,Nr=(zn*Ro-Bn*io)*vl,Ie+=Ir,Ze+=Nr,S(Ir)0&&(wr[1]*=1+Ir/1.5*wr[0]*wr[0]),wr}return Ae.invert=Ht(Ae),Ae}function ge(){return g.geoProjection(Jt()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function he(Xt,ae){var xe=Xt*v(ae),Ae=30,je;do ae-=je=(ae+v(ae)-xe)/(1+r(ae));while(S(je)>u&&--Ae>0);return ae/2}function de(Xt,ae,xe){function Ae(je,Ie){return[Xt*je*r(Ie=he(xe,Ie)),ae*v(Ie)]}return Ae.invert=function(je,Ie){return Ie=O(Ie/ae),[je/(Xt*r(Ie)),O((2*Ie+v(2*Ie))/xe)]},Ae}var se=de(A/C,A,_);function Tt(){return g.geoProjection(se).scale(169.529)}var Lt=2.00276,Mt=1.11072;function te(Xt,ae){var xe=he(_,ae);return[Lt*Xt/(1/r(ae)+Mt/r(xe)),(ae+A*v(xe))/Lt]}te.invert=function(Xt,ae){var xe=Lt*ae,Ae=ae<0?-M:M,je=25,Ie,Ze;do Ze=xe-A*v(Ae),Ae-=Ie=(v(2*Ae)+2*Ae-_*v(Ze))/(2*r(2*Ae)+2+_*r(Ze)*A*r(Ae));while(S(Ie)>u&&--je>0);return Ze=xe-A*v(Ae),[Xt*(1/r(Ze)+Mt/r(Ae))/Lt,Ze]};function ve(){return g.geoProjection(te).scale(160.857)}function oe(Xt){var ae=0,xe=g.geoProjectionMutator(Xt),Ae=xe(ae);return Ae.parallel=function(je){return arguments.length?xe(ae=je*w):ae*k},Ae}function Te(Xt,ae){return[Xt*r(ae),ae]}Te.invert=function(Xt,ae){return[Xt/r(ae),ae]};function He(){return g.geoProjection(Te).scale(152.63)}function Ge(Xt){if(!Xt)return Te;var ae=1/T(Xt);function xe(Ae,je){var Ie=ae+Xt-je,Ze=Ie&&Ae*r(je)/Ie;return[Ie*v(Ze),ae-Ie*r(Ze)]}return xe.invert=function(Ae,je){var Ie=V(Ae*Ae+(je=ae-je)*je),Ze=ae+Xt-Ie;return[Ie/r(Ze)*e(Ae,je),Ze]},xe}function cr(){return oe(Ge).scale(123.082).center([0,26.1441]).parallel(45)}function ur(Xt){function ae(xe,Ae){var je=C-Ae,Ie=je&&xe*Xt*v(je)/je;return[je*v(Ie)/Xt,C-je*r(Ie)]}return ae.invert=function(xe,Ae){var je=xe*Xt,Ie=C-Ae,Ze=V(je*je+Ie*Ie),wr=e(je,Ie);return[(Ze?Ze/v(Ze):1)*wr/Xt,C-Ze]},ae}function jr(){var Xt=.5,ae=g.geoProjectionMutator(ur),xe=ae(Xt);return xe.fraction=function(Ae){return arguments.length?ae(Xt=+Ae):Xt},xe.scale(158.837)}var Hr=de(1,4/_,_);function br(){return g.geoProjection(Hr).scale(152.63)}function Kr(Xt,ae,xe,Ae,je,Ie){var Ze=r(Ie),wr;if(S(Xt)>1||S(Ie)>1)wr=N(xe*je+ae*Ae*Ze);else{var Ir=v(Xt/2),Nr=v(Ie/2);wr=2*O(V(Ir*Ir+ae*Ae*Nr*Nr))}return S(wr)>u?[wr,e(Ae*v(Ie),ae*je-xe*Ae*Ze)]:[0,0]}function rn(Xt,ae,xe){return N((Xt*Xt+ae*ae-xe*xe)/(2*Xt*ae))}function Ce(Xt){return Xt-2*_*n((Xt+_)/(2*_))}function $t(Xt,ae,xe){for(var Ae=[[Xt[0],Xt[1],v(Xt[1]),r(Xt[1])],[ae[0],ae[1],v(ae[1]),r(ae[1])],[xe[0],xe[1],v(xe[1]),r(xe[1])]],je=Ae[2],Ie,Ze=0;Ze<3;++Ze,je=Ie)Ie=Ae[Ze],je.v=Kr(Ie[1]-je[1],je[3],je[2],Ie[3],Ie[2],Ie[0]-je[0]),je.point=[0,0];var wr=rn(Ae[0].v[0],Ae[2].v[0],Ae[1].v[0]),Ir=rn(Ae[0].v[0],Ae[1].v[0],Ae[2].v[0]),Nr=_-wr;Ae[2].point[1]=0,Ae[0].point[0]=-(Ae[1].point[0]=Ae[0].v[0]/2);var tn=[Ae[2].point[0]=Ae[0].point[0]+Ae[2].v[0]*r(wr),2*(Ae[0].point[1]=Ae[1].point[1]=Ae[2].v[0]*v(wr))];function mn(zn,Bn){var ri=v(Bn),Fi=r(Bn),da=new Array(3),ha;for(ha=0;ha<3;++ha){var ka=Ae[ha];if(da[ha]=Kr(Bn-ka[1],ka[3],ka[2],Fi,ri,zn-ka[0]),!da[ha][0])return ka.point;da[ha][1]=Ce(da[ha][1]-ka.v[1])}var io=tn.slice();for(ha=0;ha<3;++ha){var Ro=ha==2?0:ha+1,Mo=rn(Ae[ha].v[0],da[ha][0],da[Ro][0]);da[ha][1]<0&&(Mo=-Mo),ha?ha==1?(Mo=Ir-Mo,io[0]-=da[ha][0]*r(Mo),io[1]-=da[ha][0]*v(Mo)):(Mo=Nr-Mo,io[0]+=da[ha][0]*r(Mo),io[1]+=da[ha][0]*v(Mo)):(io[0]+=da[ha][0]*r(Mo),io[1]-=da[ha][0]*v(Mo))}return io[0]/=3,io[1]/=3,io}return mn}function ne(Xt){return Xt[0]*=w,Xt[1]*=w,Xt}function Ct(){return gt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function gt(Xt,ae,xe){var Ae=g.geoCentroid({type:"MultiPoint",coordinates:[Xt,ae,xe]}),je=[-Ae[0],-Ae[1]],Ie=g.geoRotation(je),Ze=$t(ne(Ie(Xt)),ne(Ie(ae)),ne(Ie(xe)));Ze.invert=Ht(Ze);var wr=g.geoProjection(Ze).rotate(je),Ir=wr.center;return delete wr.rotate,wr.center=function(Nr){return arguments.length?Ir(Ie(Nr)):Ie.invert(Ir())},wr.clipAngle(90)}function St(Xt,ae){var xe=V(1-v(ae));return[2/h*Xt*xe,h*(1-xe)]}St.invert=function(Xt,ae){var xe=(xe=ae/h-1)*xe;return[xe>0?Xt*V(_/xe)/2:0,O(1-xe)]};function Nt(){return g.geoProjection(St).scale(95.6464).center([0,30])}function ee(Xt){var ae=T(Xt);function xe(Ae,je){return[Ae,(Ae?Ae/v(Ae):1)*(v(je)*r(Ae)-ae*r(je))]}return xe.invert=ae?function(Ae,je){Ae&&(je*=v(Ae)/Ae);var Ie=r(Ae);return[Ae,2*e(V(Ie*Ie+ae*ae-je*je)-Ie,ae-je)]}:function(Ae,je){return[Ae,O(Ae?je*T(Ae)/Ae:je)]},xe}function le(){return oe(ee).scale(249.828).clipAngle(90)}var we=V(3);function Ue(Xt,ae){return[we*Xt*(2*r(2*ae/3)-1)/h,we*h*v(ae/3)]}Ue.invert=function(Xt,ae){var xe=3*O(ae/(we*h));return[h*Xt/(we*(2*r(2*xe/3)-1)),xe]};function qe(){return g.geoProjection(Ue).scale(156.19)}function ar(Xt){var ae=r(Xt);function xe(Ae,je){return[Ae*ae,v(je)/ae]}return xe.invert=function(Ae,je){return[Ae/ae,O(je*ae)]},xe}function Ar(){return oe(ar).parallel(38.58).scale(195.044)}function Tr(Xt){var ae=r(Xt);function xe(Ae,je){return[Ae*ae,(1+ae)*T(je/2)]}return xe.invert=function(Ae,je){return[Ae/ae,t(je/(1+ae))*2]},xe}function pr(){return oe(Tr).scale(124.75)}function Jr(Xt,ae){var xe=V(8/(3*_));return[xe*Xt*(1-S(ae)/_),xe*ae]}Jr.invert=function(Xt,ae){var xe=V(8/(3*_)),Ae=ae/xe;return[Xt/(xe*(1-S(Ae)/_)),Ae]};function Vn(){return g.geoProjection(Jr).scale(165.664)}function Hn(Xt,ae){var xe=V(4-3*v(S(ae)));return[2/V(6*_)*Xt*xe,y(ae)*V(2*_/3)*(2-xe)]}Hn.invert=function(Xt,ae){var xe=2-S(ae)/V(2*_/3);return[Xt*V(6*_)/(2*xe),y(ae)*O((4-xe*xe)/3)]};function Kn(){return g.geoProjection(Hn).scale(165.664)}function Ci(Xt,ae){var xe=V(_*(4+_));return[2/xe*Xt*(1+V(1-4*ae*ae/(_*_))),4/xe*ae]}Ci.invert=function(Xt,ae){var xe=V(_*(4+_))/2;return[Xt*xe/(1+V(1-ae*ae*(4+_)/(4*_))),ae*xe/2]};function ii(){return g.geoProjection(Ci).scale(180.739)}function qn(Xt,ae){var xe=(2+C)*v(ae);ae/=2;for(var Ae=0,je=1/0;Ae<10&&S(je)>u;Ae++){var Ie=r(ae);ae-=je=(ae+v(ae)*(Ie+2)-xe)/(2*Ie*(1+Ie))}return[2/V(_*(4+_))*Xt*(1+r(ae)),2*V(_/(4+_))*v(ae)]}qn.invert=function(Xt,ae){var xe=ae*V((4+_)/_)/2,Ae=O(xe),je=r(Ae);return[Xt/(2/V(_*(4+_))*(1+je)),O((Ae+xe*(je+2))/(2+C))]};function oa(){return g.geoProjection(qn).scale(180.739)}function Hi(Xt,ae){return[Xt*(1+r(ae))/V(2+_),2*ae/V(2+_)]}Hi.invert=function(Xt,ae){var xe=V(2+_),Ae=ae*xe/2;return[xe*Xt/(1+r(Ae)),Ae]};function We(){return g.geoProjection(Hi).scale(173.044)}function rr(Xt,ae){for(var xe=(1+C)*v(ae),Ae=0,je=1/0;Ae<10&&S(je)>u;Ae++)ae-=je=(ae+v(ae)-xe)/(1+r(ae));return xe=V(2+_),[Xt*(1+r(ae))/xe,2*ae/xe]}rr.invert=function(Xt,ae){var xe=1+C,Ae=V(xe/2);return[Xt*2*Ae/(1+r(ae*=Ae)),O((ae+v(ae))/xe)]};function fr(){return g.geoProjection(rr).scale(173.044)}var xr=3+2*A;function Qr(Xt,ae){var xe=v(Xt/=2),Ae=r(Xt),je=V(r(ae)),Ie=r(ae/=2),Ze=v(ae)/(Ie+A*Ae*je),wr=V(2/(1+Ze*Ze)),Ir=V((A*Ie+(Ae+xe)*je)/(A*Ie+(Ae-xe)*je));return[xr*(wr*(Ir-1/Ir)-2*o(Ir)),xr*(wr*Ze*(Ir+1/Ir)-2*t(Ze))]}Qr.invert=function(Xt,ae){if(!(Ie=dt.invert(Xt/1.2,ae*1.065)))return null;var xe=Ie[0],Ae=Ie[1],je=20,Ie;Xt/=xr,ae/=xr;do{var Ze=xe/2,wr=Ae/2,Ir=v(Ze),Nr=r(Ze),tn=v(wr),mn=r(wr),zn=r(Ae),Bn=V(zn),ri=tn/(mn+A*Nr*Bn),Fi=ri*ri,da=V(2/(1+Fi)),ha=A*mn+(Nr+Ir)*Bn,ka=A*mn+(Nr-Ir)*Bn,io=ha/ka,Ro=V(io),Mo=Ro-1/Ro,hs=Ro+1/Ro,hl=da*Mo-2*o(Ro)-Xt,vl=da*ri*hs-2*t(ri)-ae,Os=tn&&E*Bn*Ir*Fi/tn,bl=(A*Nr*mn+Bn)/(2*(mn+A*Nr*Bn)*(mn+A*Nr*Bn)*Bn),Su=-.5*ri*da*da*da,mu=Su*Os,Ws=Su*bl,qs=(qs=2*mn+A*Bn*(Nr-Ir))*qs*Ro,Yu=(A*Nr*mn*Bn+zn)/qs,dc=-(A*Ir*tn)/(Bn*qs),Zc=Mo*mu-2*Yu/Ro+da*(Yu+Yu/io),At=Mo*Ws-2*dc/Ro+da*(dc+dc/io),jt=ri*hs*mu-2*Os/(1+Fi)+da*hs*Os+da*ri*(Yu-Yu/io),ue=ri*hs*Ws-2*bl/(1+Fi)+da*hs*bl+da*ri*(dc-dc/io),Me=At*jt-ue*Zc;if(!Me)break;var Le=(vl*At-hl*ue)/Me,Be=(hl*jt-vl*Zc)/Me;xe-=Le,Ae=i(-C,s(C,Ae-Be))}while((S(Le)>u||S(Be)>u)&&--je>0);return S(S(Ae)-C)Ae){var mn=V(tn),zn=e(Nr,Ir),Bn=xe*x(zn/xe),ri=zn-Bn,Fi=Xt*r(ri),da=(Xt*v(ri)-ri*v(Fi))/(C-Fi),ha=Pe(ri,da),ka=(_-Xt)/Rr(ha,Fi,_);Ir=mn;var io=50,Ro;do Ir-=Ro=(Xt+Rr(ha,Fi,Ir)*ka-mn)/(ha(Ir)*ka);while(S(Ro)>u&&--io>0);Nr=ri*v(Ir),IrAe){var Ir=V(wr),Nr=e(Ze,Ie),tn=xe*x(Nr/xe),mn=Nr-tn;Ie=Ir*r(mn),Ze=Ir*v(mn);for(var zn=Ie-C,Bn=v(Ie),ri=Ze/Bn,Fi=Ieu||S(ri)>u)&&--Fi>0);return[mn,zn]},Ir}var Br=$r(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Gr(){return g.geoProjection(Br).scale(149.995)}var dn=$r(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function an(){return g.geoProjection(dn).scale(153.93)}var Ee=$r(5/6*_,-.62636,-.0344,0,1.3493,-.05524,0,.045);function dr(){return g.geoProjection(Ee).scale(130.945)}function Vr(Xt,ae){var xe=Xt*Xt,Ae=ae*ae;return[Xt*(1-.162388*Ae)*(.87-952426e-9*xe*xe),ae*(1+Ae/12)]}Vr.invert=function(Xt,ae){var xe=Xt,Ae=ae,je=50,Ie;do{var Ze=Ae*Ae;Ae-=Ie=(Ae*(1+Ze/12)-ae)/(1+Ze/4)}while(S(Ie)>u&&--je>0);je=50,Xt/=1-.162388*Ze;do{var wr=(wr=xe*xe)*wr;xe-=Ie=(xe*(.87-952426e-9*wr)-Xt)/(.87-.00476213*wr)}while(S(Ie)>u&&--je>0);return[xe,Ae]};function yn(){return g.geoProjection(Vr).scale(131.747)}var Fn=$r(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Xn(){return g.geoProjection(Fn).scale(131.087)}function Pn(Xt){var ae=Xt(C,0)[0]-Xt(-C,0)[0];function xe(Ae,je){var Ie=Ae>0?-.5:.5,Ze=Xt(Ae+Ie*_,je);return Ze[0]-=Ie*ae,Ze}return Xt.invert&&(xe.invert=function(Ae,je){var Ie=Ae>0?-.5:.5,Ze=Xt.invert(Ae+Ie*ae,je),wr=Ze[0]-Ie*_;return wr<-_?wr+=2*_:wr>_&&(wr-=2*_),Ze[0]=wr,Ze}),xe}function En(Xt,ae){var xe=y(Xt),Ae=y(ae),je=r(ae),Ie=r(Xt)*je,Ze=v(Xt)*je,wr=v(Ae*ae);Xt=S(e(Ze,wr)),ae=O(Ie),S(Xt-C)>u&&(Xt%=C);var Ir=Zn(Xt>_/4?C-Xt:Xt,ae);return Xt>_/4&&(wr=Ir[0],Ir[0]=-Ir[1],Ir[1]=-wr),Ir[0]*=xe,Ir[1]*=-Ae,Ir}En.invert=function(Xt,ae){S(Xt)>1&&(Xt=y(Xt)*2-Xt),S(ae)>1&&(ae=y(ae)*2-ae);var xe=y(Xt),Ae=y(ae),je=-xe*Xt,Ie=-Ae*ae,Ze=Ie/je<1,wr=Ca(Ze?Ie:je,Ze?je:Ie),Ir=wr[0],Nr=wr[1],tn=r(Nr);return Ze&&(Ir=-C-Ir),[xe*(e(v(Ir)*tn,-v(Nr))+_),Ae*O(r(Ir)*tn)]};function Zn(Xt,ae){if(ae===C)return[0,0];var xe=v(ae),Ae=xe*xe,je=Ae*Ae,Ie=1+je,Ze=1+3*je,wr=1-je,Ir=O(1/V(Ie)),Nr=wr+Ae*Ie*Ir,tn=(1-xe)/Nr,mn=V(tn),zn=tn*Ie,Bn=V(zn),ri=mn*wr,Fi,da;if(Xt===0)return[0,-(ri+Ae*Bn)];var ha=r(ae),ka=1/ha,io=2*xe*ha,Ro=(-3*Ae+Ir*Ze)*io,Mo=(-Nr*ha-(1-xe)*Ro)/(Nr*Nr),hs=.5*Mo/mn,hl=wr*hs-2*Ae*mn*io,vl=Ae*Ie*Mo+tn*Ze*io,Os=-ka*io,bl=-ka*vl,Su=-2*ka*hl,mu=4*Xt/_,Ws;if(Xt>.222*_||ae<_/4&&Xt>.175*_){if(Fi=(ri+Ae*V(zn*(1+je)-ri*ri))/(1+je),Xt>_/4)return[Fi,Fi];var qs=Fi,Yu=.5*Fi;Fi=.5*(Yu+qs),da=50;do{var dc=V(zn-Fi*Fi),Zc=Fi*(Su+Os*dc)+bl*O(Fi/Bn)-mu;if(!Zc)break;Zc<0?Yu=Fi:qs=Fi,Fi=.5*(Yu+qs)}while(S(qs-Yu)>u&&--da>0)}else{Fi=u,da=25;do{var At=Fi*Fi,jt=V(zn-At),ue=Su+Os*jt,Me=Fi*ue+bl*O(Fi/Bn)-mu,Le=ue+(bl-Os*At)/jt;Fi-=Ws=jt?Me/Le:0}while(S(Ws)>u&&--da>0)}return[Fi,-ri-Ae*V(zn-Fi*Fi)]}function Ca(Xt,ae){for(var xe=0,Ae=1,je=.5,Ie=50;;){var Ze=je*je,wr=V(je),Ir=O(1/V(1+Ze)),Nr=1-Ze+je*(1+Ze)*Ir,tn=(1-wr)/Nr,mn=V(tn),zn=tn*(1+Ze),Bn=mn*(1-Ze),ri=zn-Xt*Xt,Fi=V(ri),da=ae+Bn+je*Fi;if(S(Ae-xe)0?xe=je:Ae=je,je=.5*(xe+Ae)}if(!Ie)return null;var ha=O(wr),ka=r(ha),io=1/ka,Ro=2*wr*ka,Mo=(-3*je+Ir*(1+3*Ze))*Ro,hs=(-Nr*ka-(1-wr)*Mo)/(Nr*Nr),hl=.5*hs/mn,vl=(1-Ze)*hl-2*je*mn*Ro,Os=-2*io*vl,bl=-io*Ro,Su=-io*(je*(1+Ze)*hs+tn*(1+3*Ze)*Ro);return[_/4*(Xt*(Os+bl*Fi)+Su*O(Xt/V(zn))),ha]}function Ri(){return g.geoProjection(Pn(En)).scale(239.75)}function Ja(Xt,ae,xe){var Ae,je,Ie;return Xt?(Ae=Xa(Xt,xe),ae?(je=Xa(ae,1-xe),Ie=je[1]*je[1]+xe*Ae[0]*Ae[0]*je[0]*je[0],[[Ae[0]*je[2]/Ie,Ae[1]*Ae[2]*je[0]*je[1]/Ie],[Ae[1]*je[1]/Ie,-Ae[0]*Ae[2]*je[0]*je[2]/Ie],[Ae[2]*je[1]*je[2]/Ie,-xe*Ae[0]*Ae[1]*je[0]/Ie]]):[[Ae[0],0],[Ae[1],0],[Ae[2],0]]):(je=Xa(ae,1-xe),[[0,je[0]/je[1]],[1/je[1],0],[je[2]/je[1],0]])}function Xa(Xt,ae){var xe,Ae,je,Ie,Ze;if(ae=1-u)return xe=(1-ae)/4,Ae=U(Xt),Ie=H(Xt),je=1/Ae,Ze=Ae*F(Xt),[Ie+xe*(Ze-Xt)/(Ae*Ae),je-xe*Ie*je*(Ze-Xt),je+xe*Ie*je*(Ze+Xt),2*t(a(Xt))-C+xe*(Ze-Xt)/Ae];var wr=[1,0,0,0,0,0,0,0,0],Ir=[V(ae),0,0,0,0,0,0,0,0],Nr=0;for(Ae=V(1-ae),Ze=1;S(Ir[Nr]/wr[Nr])>u&&Nr<8;)xe=wr[Nr++],Ir[Nr]=(xe-Ae)/2,wr[Nr]=(xe+Ae)/2,Ae=V(xe*Ae),Ze*=2;je=Ze*wr[Nr]*Xt;do Ie=Ir[Nr]*v(Ae=je)/wr[Nr],je=(O(Ie)+je)/2;while(--Nr);return[v(je),Ie=r(je),Ie/r(je-Ae),je]}function Io(Xt,ae,xe){var Ae=S(Xt),je=S(ae),Ie=F(je);if(Ae){var Ze=1/v(Ae),wr=1/(T(Ae)*T(Ae)),Ir=-(wr+xe*(Ie*Ie*Ze*Ze)-1+xe),Nr=(xe-1)*wr,tn=(-Ir+V(Ir*Ir-4*Nr))/2;return[po(t(1/V(tn)),xe)*y(Xt),po(t(V((tn/wr-1)/xe)),1-xe)*y(ae)]}return[0,po(t(Ie),1-xe)*y(ae)]}function po(Xt,ae){if(!ae)return Xt;if(ae===1)return o(T(Xt/2+M));for(var xe=1,Ae=V(1-ae),je=V(ae),Ie=0;S(je)>u;Ie++){if(Xt%_){var Ze=t(Ae*T(Xt)/xe);Ze<0&&(Ze+=_),Xt+=Ze+~~(Xt/_)*_}else Xt+=Xt;je=(xe+Ae)/2,Ae=V(xe*Ae),je=((xe=je)-Ae)/2}return Xt/(f(2,Ie)*xe)}function Do(Xt,ae){var xe=(A-1)/(A+1),Ae=V(1-xe*xe),je=po(C,Ae*Ae),Ie=-1,Ze=o(T(_/4+S(ae)/2)),wr=a(Ie*Ze)/V(xe),Ir=Ia(wr*r(Ie*Xt),wr*v(Ie*Xt)),Nr=Io(Ir[0],Ir[1],Ae*Ae);return[-Nr[1],(ae>=0?1:-1)*(.5*je-Nr[0])]}function Ia(Xt,ae){var xe=Xt*Xt,Ae=ae+1,je=1-xe-ae*ae;return[.5*((Xt>=0?C:-C)-e(je,2*Xt)),-.25*o(je*je+4*xe)+.5*o(Ae*Ae+xe)]}function gs(Xt,ae){var xe=ae[0]*ae[0]+ae[1]*ae[1];return[(Xt[0]*ae[0]+Xt[1]*ae[1])/xe,(Xt[1]*ae[0]-Xt[0]*ae[1])/xe]}Do.invert=function(Xt,ae){var xe=(A-1)/(A+1),Ae=V(1-xe*xe),je=po(C,Ae*Ae),Ie=-1,Ze=Ja(.5*je-ae,-Xt,Ae*Ae),wr=gs(Ze[0],Ze[1]),Ir=e(wr[1],wr[0])/Ie;return[Ir,2*t(a(.5/Ie*o(xe*wr[0]*wr[0]+xe*wr[1]*wr[1])))-C]};function is(){return g.geoProjection(Pn(Do)).scale(151.496)}function ll(Xt){var ae=v(Xt),xe=r(Xt),Ae=Ho(Xt);Ae.invert=Ho(-Xt);function je(Ie,Ze){var wr=Ae(Ie,Ze);Ie=wr[0],Ze=wr[1];var Ir=v(Ze),Nr=r(Ze),tn=r(Ie),mn=N(ae*Ir+xe*Nr*tn),zn=v(mn),Bn=S(zn)>u?mn/zn:1;return[Bn*xe*v(Ie),(S(Ie)>C?Bn:-Bn)*(ae*Nr-xe*Ir*tn)]}return je.invert=function(Ie,Ze){var wr=V(Ie*Ie+Ze*Ze),Ir=-v(wr),Nr=r(wr),tn=wr*Nr,mn=-Ze*Ir,zn=wr*ae,Bn=V(tn*tn+mn*mn-zn*zn),ri=e(tn*zn+mn*Bn,mn*zn-tn*Bn),Fi=(wr>C?-1:1)*e(Ie*Ir,wr*r(ri)*Nr+Ze*v(ri)*Ir);return Ae.invert(Fi,ri)},je}function Ho(Xt){var ae=v(Xt),xe=r(Xt);return function(Ae,je){var Ie=r(je),Ze=r(Ae)*Ie,wr=v(Ae)*Ie,Ir=v(je);return[e(wr,Ze*xe-Ir*ae),O(Ir*xe+Ze*ae)]}}function Gs(){var Xt=0,ae=g.geoProjectionMutator(ll),xe=ae(Xt),Ae=xe.rotate,je=xe.stream,Ie=g.geoCircle();return xe.parallel=function(Ze){if(!arguments.length)return Xt*k;var wr=xe.rotate();return ae(Xt=Ze*w).rotate(wr)},xe.rotate=function(Ze){return arguments.length?(Ae.call(xe,[Ze[0],Ze[1]-Xt*k]),Ie.center([-Ze[0],-Ze[1]]),xe):(Ze=Ae.call(xe),Ze[1]+=Xt*k,Ze)},xe.stream=function(Ze){return Ze=je(Ze),Ze.sphere=function(){Ze.polygonStart();var wr=.01,Ir=Ie.radius(90-wr)().coordinates[0],Nr=Ir.length-1,tn=-1,mn;for(Ze.lineStart();++tn=0;)Ze.point((mn=Ir[tn])[0],mn[1]);Ze.lineEnd(),Ze.polygonEnd()},Ze},xe.scale(79.4187).parallel(45).clipAngle(180-.001)}var as=3,ul=O(1-1/as)*k,Js=ar(0);function Rl(Xt){var ae=ul*w,xe=St(_,ae)[0]-St(-_,ae)[0],Ae=Js(0,ae)[1],je=St(0,ae)[1],Ie=h-je,Ze=p/Xt,wr=4/p,Ir=Ae+Ie*Ie*4/p;function Nr(tn,mn){var zn,Bn=S(mn);if(Bn>ae){var ri=s(Xt-1,i(0,n((tn+_)/Ze)));tn+=_*(Xt-1)/Xt-ri*Ze,zn=St(tn,Bn),zn[0]=zn[0]*p/xe-p*(Xt-1)/(2*Xt)+ri*p/Xt,zn[1]=Ae+(zn[1]-je)*4*Ie/p,mn<0&&(zn[1]=-zn[1])}else zn=Js(tn,mn);return zn[0]*=wr,zn[1]/=Ir,zn}return Nr.invert=function(tn,mn){tn/=wr,mn*=Ir;var zn=S(mn);if(zn>Ae){var Bn=s(Xt-1,i(0,n((tn+_)/Ze)));tn=(tn+_*(Xt-1)/Xt-Bn*Ze)*xe/p;var ri=St.invert(tn,.25*(zn-Ae)*p/Ie+je);return ri[0]-=_*(Xt-1)/Xt-Bn*Ze,mn<0&&(ri[1]=-ri[1]),ri}return Js.invert(tn,mn)},Nr}function ls(Xt,ae){return[Xt,ae&1?90-u:ul]}function Cs(Xt,ae){return[Xt,ae&1?-90+u:-ul]}function Co(Xt){return[Xt[0]*(1-u),Xt[1]]}function ks(Xt){var ae=[].concat(P.range(-180,180+Xt/2,Xt).map(ls),P.range(180,-180-Xt/2,-Xt).map(Cs));return{type:"Polygon",coordinates:[Xt===180?ae.map(Co):ae]}}function kl(){var Xt=4,ae=g.geoProjectionMutator(Rl),xe=ae(Xt),Ae=xe.stream;return xe.lobes=function(je){return arguments.length?ae(Xt=+je):Xt},xe.stream=function(je){var Ie=xe.rotate(),Ze=Ae(je),wr=(xe.rotate([0,0]),Ae(je));return xe.rotate(Ie),Ze.sphere=function(){g.geoStream(ks(180/Xt),wr)},Ze},xe.scale(239.75)}function Vl(Xt){var ae=1+Xt,xe=v(1/ae),Ae=O(xe),je=2*V(_/(Ie=_+4*Ae*ae)),Ie,Ze=.5*je*(ae+V(Xt*(2+Xt))),wr=Xt*Xt,Ir=ae*ae;function Nr(tn,mn){var zn=1-v(mn),Bn,ri;if(zn&&zn<2){var Fi=C-mn,da=25,ha;do{var ka=v(Fi),io=r(Fi),Ro=Ae+e(ka,ae-io),Mo=1+Ir-2*ae*io;Fi-=ha=(Fi-wr*Ae-ae*ka+Mo*Ro-.5*zn*Ie)/(2*ae*ka*Ro)}while(S(ha)>b&&--da>0);Bn=je*V(Mo),ri=tn*Ro/_}else Bn=je*(Xt+zn),ri=tn*Ae/_;return[Bn*v(ri),Ze-Bn*r(ri)]}return Nr.invert=function(tn,mn){var zn=tn*tn+(mn-=Ze)*mn,Bn=(1+Ir-zn/(je*je))/(2*ae),ri=N(Bn),Fi=v(ri),da=Ae+e(Fi,ae-Bn);return[O(tn/V(zn))*_/da,O(1-2*(ri-wr*Ae-ae*Fi+(1+Ir-2*ae*Bn)*da)/Ie)]},Nr}function Yl(){var Xt=1,ae=g.geoProjectionMutator(Vl),xe=ae(Xt);return xe.ratio=function(Ae){return arguments.length?ae(Xt=+Ae):Xt},xe.scale(167.774).center([0,18.67])}var Ns=.7109889596207567,La=.0528035274542;function uo(Xt,ae){return ae>-Ns?(Xt=se(Xt,ae),Xt[1]+=La,Xt):Te(Xt,ae)}uo.invert=function(Xt,ae){return ae>-Ns?se.invert(Xt,ae-La):Te.invert(Xt,ae)};function Hs(){return g.geoProjection(uo).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Kl(Xt,ae){return S(ae)>Ns?(Xt=se(Xt,ae),Xt[1]-=ae>0?La:-La,Xt):Te(Xt,ae)}Kl.invert=function(Xt,ae){return S(ae)>Ns?se.invert(Xt,ae+(ae>0?La:-La)):Te.invert(Xt,ae)};function Go(){return g.geoProjection(Kl).scale(152.63)}function ql(Xt,ae,xe,Ae){var je=V(4*_/(2*xe+(1+Xt-ae/2)*v(2*xe)+(Xt+ae)/2*v(4*xe)+ae/2*v(6*xe))),Ie=V(Ae*v(xe)*V((1+Xt*r(2*xe)+ae*r(4*xe))/(1+Xt+ae))),Ze=xe*Ir(1);function wr(mn){return V(1+Xt*r(2*mn)+ae*r(4*mn))}function Ir(mn){var zn=mn*xe;return(2*zn+(1+Xt-ae/2)*v(2*zn)+(Xt+ae)/2*v(4*zn)+ae/2*v(6*zn))/xe}function Nr(mn){return wr(mn)*v(mn)}var tn=function(mn,zn){var Bn=xe*Wt(Ir,Ze*v(zn)/xe,zn/_);isNaN(Bn)&&(Bn=xe*y(zn));var ri=je*wr(Bn);return[ri*Ie*mn/_*r(Bn),ri/Ie*v(Bn)]};return tn.invert=function(mn,zn){var Bn=Wt(Nr,zn*Ie/je);return[mn*_/(r(Bn)*je*Ie*wr(Bn)),O(xe*Ir(Bn/xe)/Ze)]},xe===0&&(je=V(Ae/_),tn=function(mn,zn){return[mn*je,v(zn)/je]},tn.invert=function(mn,zn){return[mn/je,O(zn*je)]}),tn}function il(){var Xt=1,ae=0,xe=45*w,Ae=2,je=g.geoProjectionMutator(ql),Ie=je(Xt,ae,xe,Ae);return Ie.a=function(Ze){return arguments.length?je(Xt=+Ze,ae,xe,Ae):Xt},Ie.b=function(Ze){return arguments.length?je(Xt,ae=+Ze,xe,Ae):ae},Ie.psiMax=function(Ze){return arguments.length?je(Xt,ae,xe=+Ze*w,Ae):xe*k},Ie.ratio=function(Ze){return arguments.length?je(Xt,ae,xe,Ae=+Ze):Ae},Ie.scale(180.739)}function Cl(Xt,ae,xe,Ae,je,Ie,Ze,wr,Ir,Nr,tn){if(tn.nanEncountered)return NaN;var mn,zn,Bn,ri,Fi,da,ha,ka,io,Ro;if(mn=xe-ae,zn=Xt(ae+mn*.25),Bn=Xt(xe-mn*.25),isNaN(zn)){tn.nanEncountered=!0;return}if(isNaN(Bn)){tn.nanEncountered=!0;return}return ri=mn*(Ae+4*zn+je)/12,Fi=mn*(je+4*Bn+Ie)/12,da=ri+Fi,Ro=(da-Ze)/15,Nr>Ir?(tn.maxDepthCount++,da+Ro):Math.abs(Ro)>1;do Ir[da]>Bn?Fi=da:ri=da,da=ri+Fi>>1;while(da>ri);var ha=Ir[da+1]-Ir[da];return ha&&(ha=(Bn-Ir[da+1])/ha),(da+1+ha)/Ze}var mn=2*tn(1)/_*Ie/xe,zn=function(Bn,ri){var Fi=tn(S(v(ri))),da=Ae(Fi)*Bn;return Fi/=mn,[da,ri>=0?Fi:-Fi]};return zn.invert=function(Bn,ri){var Fi;return ri*=mn,S(ri)<1&&(Fi=y(ri)*O(je(S(ri))*Ie)),[Bn/Ae(S(ri)),Fi]},zn}function Ts(){var Xt=0,ae=2.5,xe=1.183136,Ae=g.geoProjectionMutator(ao),je=Ae(Xt,ae,xe);return je.alpha=function(Ie){return arguments.length?Ae(Xt=+Ie,ae,xe):Xt},je.k=function(Ie){return arguments.length?Ae(Xt,ae=+Ie,xe):ae},je.gamma=function(Ie){return arguments.length?Ae(Xt,ae,xe=+Ie):xe},je.scale(152.63)}function Ls(Xt,ae){return S(Xt[0]-ae[0])=0;--Ir)xe=Xt[1][Ir],Ae=xe[0][0],je=xe[0][1],Ie=xe[1][1],Ze=xe[2][0],wr=xe[2][1],ae.push(nu([[Ze-u,wr-u],[Ze-u,Ie+u],[Ae+u,Ie+u],[Ae+u,je-u]],30));return{type:"Polygon",coordinates:[P.merge(ae)]}}function Qo(Xt,ae,xe){var Ae,je;function Ie(Ir,Nr){for(var tn=Nr<0?-1:1,mn=ae[+(Nr<0)],zn=0,Bn=mn.length-1;znmn[zn][2][0];++zn);var ri=Xt(Ir-mn[zn][1][0],Nr);return ri[0]+=Xt(mn[zn][1][0],tn*Nr>tn*mn[zn][0][1]?mn[zn][0][1]:Nr)[0],ri}xe?Ie.invert=xe(Ie):Xt.invert&&(Ie.invert=function(Ir,Nr){for(var tn=je[+(Nr<0)],mn=ae[+(Nr<0)],zn=0,Bn=tn.length;znri&&(Fi=Bn,Bn=ri,ri=Fi),[[mn,Bn],[zn,ri]]})}),Ze):ae.map(function(Nr){return Nr.map(function(tn){return[[tn[0][0]*k,tn[0][1]*k],[tn[1][0]*k,tn[1][1]*k],[tn[2][0]*k,tn[2][1]*k]]})})},ae!=null&&Ze.lobes(ae),Ze}var Mu=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Gu(){return Qo(te,Mu).scale(160.857)}var _l=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Ol(){return Qo(Kl,_l).scale(152.63)}var Xl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function tu(){return Qo(se,Xl).scale(169.529)}var ac=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function ph(){return Qo(se,ac).scale(169.529).rotate([20,0])}var Jc=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function ah(){return Qo(uo,Jc,Ht).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Nf=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function Sf(){return Qo(Te,Nf).scale(152.63).rotate([-20,0])}function Dl(Xt,ae){return[3/p*Xt*V(_*_/3-ae*ae),ae]}Dl.invert=function(Xt,ae){return[p/3*Xt/V(_*_/3-ae*ae),ae]};function Bc(){return g.geoProjection(Dl).scale(158.837)}function jf(Xt){function ae(xe,Ae){if(S(S(Ae)-C)2)return null;xe/=2,Ae/=2;var Ie=xe*xe,Ze=Ae*Ae,wr=2*Ae/(1+Ie+Ze);return wr=f((1+wr)/(1-wr),1/Xt),[e(2*xe,1-Ie-Ze)/Xt,O((wr-1)/(wr+1))]},ae}function hc(){var Xt=.5,ae=g.geoProjectionMutator(jf),xe=ae(Xt);return xe.spacing=function(Ae){return arguments.length?ae(Xt=+Ae):Xt},xe.scale(124.75)}var oc=_/A;function fc(Xt,ae){return[Xt*(1+V(r(ae)))/2,ae/(r(ae/2)*r(Xt/6))]}fc.invert=function(Xt,ae){var xe=S(Xt),Ae=S(ae),je=u,Ie=C;Aeu||S(da)>u)&&--je>0);return je&&[xe,Ae]};function sc(){return g.geoProjection(su).scale(139.98)}function el(Xt,ae){return[v(Xt)/r(ae),T(ae)*r(Xt)]}el.invert=function(Xt,ae){var xe=Xt*Xt,Ae=ae*ae,je=Ae+1,Ie=xe+je,Ze=Xt?E*V((Ie-V(Ie*Ie-4*xe))/xe):1/V(je);return[O(Xt*Ze),y(ae)*N(Ze)]};function Zl(){return g.geoProjection(el).scale(144.049).clipAngle(90-.001)}function Mh(Xt){var ae=r(Xt),xe=T(M+Xt/2);function Ae(je,Ie){var Ze=Ie-Xt,wr=S(Ze)=0;)tn=Xt[Nr],mn=tn[0]+wr*(Bn=mn)-Ir*zn,zn=tn[1]+wr*zn+Ir*Bn;return mn=wr*(Bn=mn)-Ir*zn,zn=wr*zn+Ir*Bn,[mn,zn]}return xe.invert=function(Ae,je){var Ie=20,Ze=Ae,wr=je;do{for(var Ir=ae,Nr=Xt[Ir],tn=Nr[0],mn=Nr[1],zn=0,Bn=0,ri;--Ir>=0;)Nr=Xt[Ir],zn=tn+Ze*(ri=zn)-wr*Bn,Bn=mn+Ze*Bn+wr*ri,tn=Nr[0]+Ze*(ri=tn)-wr*mn,mn=Nr[1]+Ze*mn+wr*ri;zn=tn+Ze*(ri=zn)-wr*Bn,Bn=mn+Ze*Bn+wr*ri,tn=Ze*(ri=tn)-wr*mn-Ae,mn=Ze*mn+wr*ri-je;var Fi=zn*zn+Bn*Bn,da,ha;Ze-=da=(tn*zn+mn*Bn)/Fi,wr-=ha=(mn*zn-tn*Bn)/Fi}while(S(da)+S(ha)>u*u&&--Ie>0);if(Ie){var ka=V(Ze*Ze+wr*wr),io=2*t(ka*.5),Ro=v(io);return[e(Ze*Ro,ka*r(io)),ka?O(wr*Ro/ka):0]}},xe}var Qs=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Wd=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ll=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Jo=[[.9245,0],[0,0],[.01943,0]],lf=[[.721316,0],[0,0],[-.00881625,-.00617325]];function sh(){return lc(Qs,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function ec(){return lc(Wd,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Uf(){return lc(Ll,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Uh(){return lc(Jo,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function yf(){return lc(lf,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function lc(Xt,ae){var xe=g.geoProjection(Cd(Xt)).rotate(ae).clipAngle(90),Ae=g.geoRotation(ae),je=xe.center;return delete xe.rotate,xe.center=function(Ie){return arguments.length?je(Ae(Ie)):Ae.invert(je())},xe}var hd=V(6),$f=V(7);function xf(Xt,ae){var xe=O(7*v(ae)/(3*hd));return[hd*Xt*(2*r(2*xe/3)-1)/$f,9*v(xe/3)/$f]}xf.invert=function(Xt,ae){var xe=3*O(ae*$f/9);return[Xt*$f/(hd*(2*r(2*xe/3)-1)),O(v(xe)*3*hd/7)]};function Vh(){return g.geoProjection(xf).scale(164.859)}function Vf(Xt,ae){for(var xe=(1+E)*v(ae),Ae=ae,je=0,Ie;je<25&&(Ae-=Ie=(v(Ae/2)+v(Ae)-xe)/(.5*r(Ae/2)+r(Ae)),!(S(Ie)b&&--Ae>0);return Ie=xe*xe,Ze=Ie*Ie,wr=Ie*Ze,[Xt/(.84719-.13063*Ie+wr*wr*(-.04515+.05494*Ie-.02326*Ze+.00331*wr)),xe]};function mh(){return g.geoProjection(Sh).scale(175.295)}function uc(Xt,ae){return[Xt*(1+r(ae))/2,2*(ae-T(ae/2))]}uc.invert=function(Xt,ae){for(var xe=ae/2,Ae=0,je=1/0;Ae<10&&S(je)>u;++Ae){var Ie=r(ae/2);ae-=je=(ae-T(ae/2)-xe)/(1-.5/(Ie*Ie))}return[2*Xt/(1+r(ae)),ae]};function ef(){return g.geoProjection(uc).scale(152.63)}var Wf=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Jl(){return Qo(wt(1/0),Wf).rotate([20,0]).scale(152.63)}function Ef(Xt,ae){var xe=v(ae),Ae=r(ae),je=y(Xt);if(Xt===0||S(ae)===C)return[0,ae];if(ae===0)return[Xt,0];if(S(Xt)===C)return[Xt*Ae,C*xe];var Ie=_/(2*Xt)-2*Xt/_,Ze=2*ae/_,wr=(1-Ze*Ze)/(xe-Ze),Ir=Ie*Ie,Nr=wr*wr,tn=1+Ir/Nr,mn=1+Nr/Ir,zn=(Ie*xe/wr-Ie/2)/tn,Bn=(Nr*xe/Ir+wr/2)/mn,ri=zn*zn+Ae*Ae/tn,Fi=Bn*Bn-(Nr*xe*xe/Ir+wr*xe-1)/mn;return[C*(zn+V(ri)*je),C*(Bn+V(Fi<0?0:Fi)*y(-ae*Ie)*je)]}Ef.invert=function(Xt,ae){Xt/=C,ae/=C;var xe=Xt*Xt,Ae=ae*ae,je=xe+Ae,Ie=_*_;return[Xt?(je-1+V((1-je)*(1-je)+4*xe))/(2*Xt)*C:0,Wt(function(Ze){return je*(_*v(Ze)-2*Ze)*_+4*Ze*Ze*(ae-v(Ze))+2*_*Ze-Ie*ae},0)]};function Ld(){return g.geoProjection(Ef).scale(127.267)}var Yf=1.0148,_f=.23185,Kf=-.14499,Nc=.02406,Xf=Yf,zu=5*_f,jc=7*Kf,Hh=9*Nc,lu=1.790857183;function Eh(Xt,ae){var xe=ae*ae;return[Xt,ae*(Yf+xe*xe*(_f+xe*(Kf+Nc*xe)))]}Eh.invert=function(Xt,ae){ae>lu?ae=lu:ae<-lu&&(ae=-lu);var xe=ae,Ae;do{var je=xe*xe;xe-=Ae=(xe*(Yf+je*je*(_f+je*(Kf+Nc*je)))-ae)/(Xf+je*je*(zu+je*(jc+Hh*je)))}while(S(Ae)>u);return[Xt,xe]};function Sc(){return g.geoProjection(Eh).scale(139.319)}function Uc(Xt,ae){if(S(ae)u&&--je>0);return Ze=T(Ae),[(S(ae)=0;)if(Ae=ae[wr],xe[0]===Ae[0]&&xe[1]===Ae[1]){if(Ie)return[Ie,xe];Ie=xe}}}function Qc(Xt){for(var ae=Xt.length,xe=[],Ae=Xt[ae-1],je=0;je0?[-Ae[0],0]:[180-Ae[0],180])};var ae=vh.map(function(xe){return{face:xe,project:Xt(xe)}});return[-1,0,0,1,0,1,4,5].forEach(function(xe,Ae){var je=ae[xe];je&&(je.children||(je.children=[])).push(ae[Ae])}),cf(ae[0],function(xe,Ae){return ae[xe<-_/2?Ae<0?6:4:xe<0?Ae<0?2:0:xe<_/2?Ae<0?3:1:Ae<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function vu(Xt){Xt=Xt||function(Ze){var wr=Ze.length===6?g.geoCentroid({type:"MultiPoint",coordinates:Ze}):Ze[0];return g.geoGnomonic().scale(1).translate([0,0]).rotate([-wr[0],-wr[1]])};var ae=vh.map(function(Ze){for(var wr=Ze.map(rf),Ir=wr.length,Nr=wr[Ir-1],tn,mn=[],zn=0;znAe^Bn>Ae&&xe<(zn-Nr)*(Ae-tn)/(Bn-tn)+Nr&&(je=!je)}return je}function gc(Xt,ae){var xe=ae.stream,Ae;if(!xe)throw new Error("invalid projection");switch(Xt&&Xt.type){case"Feature":Ae=eh;break;case"FeatureCollection":Ae=Jf;break;default:Ae=yh;break}return Ae(Xt,xe)}function Jf(Xt,ae){return{type:"FeatureCollection",features:Xt.features.map(function(xe){return eh(xe,ae)})}}function eh(Xt,ae){return{type:"Feature",id:Xt.id,properties:Xt.properties,geometry:yh(Xt.geometry,ae)}}function Lh(Xt,ae){return{type:"GeometryCollection",geometries:Xt.geometries.map(function(xe){return yh(xe,ae)})}}function yh(Xt,ae){if(!Xt)return null;if(Xt.type==="GeometryCollection")return Lh(Xt,ae);var xe;switch(Xt.type){case"Point":xe=xh;break;case"MultiPoint":xe=xh;break;case"LineString":xe=df;break;case"MultiLineString":xe=df;break;case"Polygon":xe=_h;break;case"MultiPolygon":xe=_h;break;case"Sphere":xe=_h;break;default:return null}return g.geoStream(Xt,ae(xe)),xe.result()}var Ru=[],eu=[],xh={point:function(Xt,ae){Ru.push([Xt,ae])},result:function(){var Xt=Ru.length?Ru.length<2?{type:"Point",coordinates:Ru[0]}:{type:"MultiPoint",coordinates:Ru}:null;return Ru=[],Xt}},df={lineStart:Zh,point:function(Xt,ae){Ru.push([Xt,ae])},lineEnd:function(){Ru.length&&(eu.push(Ru),Ru=[])},result:function(){var Xt=eu.length?eu.length<2?{type:"LineString",coordinates:eu[0]}:{type:"MultiLineString",coordinates:eu}:null;return eu=[],Xt}},_h={polygonStart:Zh,lineStart:Zh,point:function(Xt,ae){Ru.push([Xt,ae])},lineEnd:function(){var Xt=Ru.length;if(Xt){do Ru.push(Ru[0].slice());while(++Xt<4);eu.push(Ru),Ru=[]}},polygonEnd:Zh,result:function(){if(!eu.length)return null;var Xt=[],ae=[];return eu.forEach(function(xe){wf(xe)?Xt.push([xe]):ae.push(xe)}),ae.forEach(function(xe){var Ae=xe[0];Xt.some(function(je){if(zd(je[0],Ae))return je.push(xe),!0})||Xt.push([xe])}),eu=[],Xt.length?Xt.length>1?{type:"MultiPolygon",coordinates:Xt}:{type:"Polygon",coordinates:Xt[0]}:null}};function qf(Xt){var ae=Xt(C,0)[0]-Xt(-C,0)[0];function xe(Ae,je){var Ie=S(Ae)0?Ae-_:Ae+_,je),wr=(Ze[0]-Ze[1])*E,Ir=(Ze[0]+Ze[1])*E;if(Ie)return[wr,Ir];var Nr=ae*E,tn=wr>0^Ir>0?-1:1;return[tn*wr-y(Ir)*Nr,tn*Ir-y(wr)*Nr]}return Xt.invert&&(xe.invert=function(Ae,je){var Ie=(Ae+je)*E,Ze=(je-Ae)*E,wr=S(Ie)<.5*ae&&S(Ze)<.5*ae;if(!wr){var Ir=ae*E,Nr=Ie>0^Ze>0?-1:1,tn=-Nr*Ae+(Ze>0?1:-1)*Ir,mn=-Nr*je+(Ie>0?1:-1)*Ir;Ie=(-tn-mn)*E,Ze=(tn-mn)*E}var zn=Xt.invert(Ie,Ze);return wr||(zn[0]+=Ie>0?_:-_),zn}),g.geoProjection(xe).rotate([-90,-90,45]).clipAngle(180-.001)}function mr(){return qf(En).scale(176.423)}function Ur(){return qf(Do).scale(111.48)}function _n(Xt,ae){if(!(0<=(ae=+ae)&&ae<=20))throw new Error("invalid digits");function xe(Nr){var tn=Nr.length,mn=2,zn=new Array(tn);for(zn[0]=+Nr[0].toFixed(ae),zn[1]=+Nr[1].toFixed(ae);mn2||Bn[0]!=tn[0]||Bn[1]!=tn[1])&&(mn.push(Bn),tn=Bn)}return mn.length===1&&Nr.length>1&&mn.push(xe(Nr[Nr.length-1])),mn}function Ie(Nr){return Nr.map(je)}function Ze(Nr){if(Nr==null)return Nr;var tn;switch(Nr.type){case"GeometryCollection":tn={type:"GeometryCollection",geometries:Nr.geometries.map(Ze)};break;case"Point":tn={type:"Point",coordinates:xe(Nr.coordinates)};break;case"MultiPoint":tn={type:Nr.type,coordinates:Ae(Nr.coordinates)};break;case"LineString":tn={type:Nr.type,coordinates:je(Nr.coordinates)};break;case"MultiLineString":case"Polygon":tn={type:Nr.type,coordinates:Ie(Nr.coordinates)};break;case"MultiPolygon":tn={type:"MultiPolygon",coordinates:Nr.coordinates.map(Ie)};break;default:return Nr}return Nr.bbox!=null&&(tn.bbox=Nr.bbox),tn}function wr(Nr){var tn={type:"Feature",properties:Nr.properties,geometry:Ze(Nr.geometry)};return Nr.id!=null&&(tn.id=Nr.id),Nr.bbox!=null&&(tn.bbox=Nr.bbox),tn}if(Xt!=null)switch(Xt.type){case"Feature":return wr(Xt);case"FeatureCollection":{var Ir={type:"FeatureCollection",features:Xt.features.map(wr)};return Xt.bbox!=null&&(Ir.bbox=Xt.bbox),Ir}default:return Ze(Xt)}return Xt}function cn(Xt){var ae=v(Xt);function xe(Ae,je){var Ie=ae?T(Ae*ae/2)/ae:Ae/2;if(!je)return[2*Ie,-Xt];var Ze=2*t(Ie*v(je)),wr=1/T(je);return[v(Ze)*wr,je+(1-r(Ze))*wr-Xt]}return xe.invert=function(Ae,je){if(S(je+=Xt)u&&--wr>0);var zn=Ae*(Nr=T(Ze)),Bn=T(S(je)0?C:-C)*(Ir+je*(tn-Ze)/2+je*je*(tn-2*Ir+Ze)/2)]}ea.invert=function(Xt,ae){var xe=ae/C,Ae=xe*90,je=s(18,S(Ae/5)),Ie=i(0,n(je));do{var Ze=hi[Ie][1],wr=hi[Ie+1][1],Ir=hi[s(19,Ie+2)][1],Nr=Ir-Ze,tn=Ir-2*wr+Ze,mn=2*(S(xe)-wr)/Nr,zn=tn/Nr,Bn=mn*(1-zn*mn*(1-2*zn*mn));if(Bn>=0||Ie===1){Ae=(ae>=0?5:-5)*(Bn+je);var ri=50,Fi;do je=s(18,S(Ae)/5),Ie=n(je),Bn=je-Ie,Ze=hi[Ie][1],wr=hi[Ie+1][1],Ir=hi[s(19,Ie+2)][1],Ae-=(Fi=(ae>=0?C:-C)*(wr+Bn*(Ir-Ze)/2+Bn*Bn*(Ir-2*wr+Ze)/2)-ae)*k;while(S(Fi)>b&&--ri>0);break}}while(--Ie>=0);var da=hi[Ie][0],ha=hi[Ie+1][0],ka=hi[s(19,Ie+2)][0];return[Xt/(ha+Bn*(ka-da)/2+Bn*Bn*(ka-2*ha+da)/2),Ae*w]};function ga(){return g.geoProjection(ea).scale(152.63)}function Ra(Xt){function ae(xe,Ae){var je=r(Ae),Ie=(Xt-1)/(Xt-je*r(xe));return[Ie*je*v(xe),Ie*v(Ae)]}return ae.invert=function(xe,Ae){var je=xe*xe+Ae*Ae,Ie=V(je),Ze=(Xt-V(1-je*(Xt+1)/(Xt-1)))/((Xt-1)/Ie+Ie/(Xt-1));return[e(xe*Ze,Ie*V(1-Ze*Ze)),Ie?O(Ae*Ze/Ie):0]},ae}function $a(Xt,ae){var xe=Ra(Xt);if(!ae)return xe;var Ae=r(ae),je=v(ae);function Ie(Ze,wr){var Ir=xe(Ze,wr),Nr=Ir[1],tn=Nr*je/(Xt-1)+Ae;return[Ir[0]*Ae/tn,Nr/tn]}return Ie.invert=function(Ze,wr){var Ir=(Xt-1)/(Xt-1-wr*je);return xe.invert(Ir*Ze,Ir*wr*Ae)},Ie}function ua(){var Xt=2,ae=0,xe=g.geoProjectionMutator($a),Ae=xe(Xt,ae);return Ae.distance=function(je){return arguments.length?xe(Xt=+je,ae):Xt},Ae.tilt=function(je){return arguments.length?xe(Xt,ae=je*w):ae*k},Ae.scale(432.147).clipAngle(N(1/Xt)*k-1e-6)}var za=1e-4,wa=1e4,Ji=-180,eo=Ji+za,rs=180,Zo=rs-za,os=-90,fs=os+za,no=90,qa=no-za;function ds(Xt){return Xt.length>0}function tl(Xt){return Math.floor(Xt*wa)/wa}function Pl(Xt){return Xt===os||Xt===no?[0,Xt]:[Ji,tl(Xt)]}function iu(Xt){var ae=Xt[0],xe=Xt[1],Ae=!1;return ae<=eo?(ae=Ji,Ae=!0):ae>=Zo&&(ae=rs,Ae=!0),xe<=fs?(xe=os,Ae=!0):xe>=qa&&(xe=no,Ae=!0),Ae?[ae,xe]:Xt}function Hl(Xt){return Xt.map(iu)}function au(Xt,ae,xe){for(var Ae=0,je=Xt.length;Ae=Zo||tn<=fs||tn>=qa){Ie[Ze]=iu(Ir);for(var mn=Ze+1;mneo&&Bnfs&&ri=wr)break;xe.push({index:-1,polygon:ae,ring:Ie=Ie.slice(mn-1)}),Ie[0]=Pl(Ie[0][1]),Ze=-1,wr=Ie.length}}}}function ml(Xt){var ae,xe=Xt.length,Ae={},je={},Ie,Ze,wr,Ir,Nr;for(ae=0;ae0?_-wr:wr)*k],Nr=g.geoProjection(Xt(Ze)).rotate(Ir),tn=g.geoRotation(Ir),mn=Nr.center;return delete Nr.rotate,Nr.center=function(zn){return arguments.length?mn(tn(zn)):tn.invert(mn())},Nr.clipAngle(90)}function Fl(Xt){var ae=r(Xt);function xe(Ae,je){var Ie=g.geoGnomonicRaw(Ae,je);return Ie[0]*=ae,Ie}return xe.invert=function(Ae,je){return g.geoGnomonicRaw.invert(Ae/ae,je)},xe}function vc(){return Hc([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Hc(Xt,ae){return $l(Fl,Xt,ae)}function Pc(Xt){if(!(Xt*=2))return g.geoAzimuthalEquidistantRaw;var ae=-Xt/2,xe=-ae,Ae=Xt*Xt,je=T(xe),Ie=.5/v(xe);function Ze(wr,Ir){var Nr=N(r(Ir)*r(wr-ae)),tn=N(r(Ir)*r(wr-xe)),mn=Ir<0?-1:1;return Nr*=Nr,tn*=tn,[(Nr-tn)/(2*Xt),mn*V(4*Ae*tn-(Ae-Nr+tn)*(Ae-Nr+tn))/(2*Xt)]}return Ze.invert=function(wr,Ir){var Nr=Ir*Ir,tn=r(V(Nr+(zn=wr+ae)*zn)),mn=r(V(Nr+(zn=wr+xe)*zn)),zn,Bn;return[e(Bn=tn-mn,zn=(tn+mn)*je),(Ir<0?-1:1)*N(V(zn*zn+Bn*Bn)*Ie)]},Ze}function Ph(){return Wc([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Wc(Xt,ae){return $l(Pc,Xt,ae)}function zh(Xt,ae){if(S(ae)u&&--wr>0);return[y(Xt)*(V(je*je+4)+je)*_/4,C*Ze]};function Zf(){return g.geoProjection(Zu).scale(127.16)}function qt(Xt,ae,xe,Ae,je){function Ie(Ze,wr){var Ir=xe*v(Ae*wr),Nr=V(1-Ir*Ir),tn=V(2/(1+Nr*r(Ze*=je)));return[Xt*Nr*tn*v(Ze),ae*Ir*tn]}return Ie.invert=function(Ze,wr){var Ir=Ze/Xt,Nr=wr/ae,tn=V(Ir*Ir+Nr*Nr),mn=2*O(tn/2);return[e(Ze*T(mn),Xt*tn)/je,tn&&O(wr*v(mn)/(ae*xe*tn))/Ae]},Ie}function I(Xt,ae,xe,Ae){var je=_/3;Xt=i(Xt,u),ae=i(ae,u),Xt=s(Xt,C),ae=s(ae,_-u),xe=i(xe,0),xe=s(xe,100-u),Ae=i(Ae,u);var Ie=xe/100+1,Ze=Ae/100,wr=N(Ie*r(je))/je,Ir=v(Xt)/v(wr*C),Nr=ae/_,tn=V(Ze*v(Xt/2)/v(ae/2)),mn=tn/V(Nr*Ir*wr),zn=1/(tn*V(Nr*Ir*wr));return qt(mn,zn,Ir,wr,Nr)}function ht(){var Xt=65*w,ae=60*w,xe=20,Ae=200,je=g.geoProjectionMutator(I),Ie=je(Xt,ae,xe,Ae);return Ie.poleline=function(Ze){return arguments.length?je(Xt=+Ze*w,ae,xe,Ae):Xt*k},Ie.parallels=function(Ze){return arguments.length?je(Xt,ae=+Ze*w,xe,Ae):ae*k},Ie.inflation=function(Ze){return arguments.length?je(Xt,ae,xe=+Ze,Ae):xe},Ie.ratio=function(Ze){return arguments.length?je(Xt,ae,xe,Ae=+Ze):Ae},Ie.scale(163.775)}function Et(){return ht().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var It=4*_+3*V(3),Vt=2*V(2*_*V(3)/It),ke=de(Vt*V(3)/_,Vt,It/6);function Oe(){return g.geoProjection(ke).scale(176.84)}function Ke(Xt,ae){return[Xt*V(1-3*ae*ae/(_*_)),ae]}Ke.invert=function(Xt,ae){return[Xt/V(1-3*ae*ae/(_*_)),ae]};function gr(){return g.geoProjection(Ke).scale(152.63)}function Or(Xt,ae){var xe=r(ae),Ae=r(Xt)*xe,je=1-Ae,Ie=r(Xt=e(v(Xt)*xe,-v(ae))),Ze=v(Xt);return xe=V(1-Ae*Ae),[Ze*xe-Ie*je,-Ie*xe-Ze*je]}Or.invert=function(Xt,ae){var xe=(Xt*Xt+ae*ae)/-2,Ae=V(-xe*(2+xe)),je=ae*xe+Xt*Ae,Ie=Xt*xe-ae*Ae,Ze=V(Ie*Ie+je*je);return[e(Ae*je,Ze*(1+xe)),Ze?-O(Ae*Ie/Ze):0]};function Dr(){return g.geoProjection(Or).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function ln(Xt,ae){var xe=yt(Xt,ae);return[(xe[0]+Xt/C)/2,(xe[1]+ae)/2]}ln.invert=function(Xt,ae){var xe=Xt,Ae=ae,je=25;do{var Ie=r(Ae),Ze=v(Ae),wr=v(2*Ae),Ir=Ze*Ze,Nr=Ie*Ie,tn=v(xe),mn=r(xe/2),zn=v(xe/2),Bn=zn*zn,ri=1-Nr*mn*mn,Fi=ri?N(Ie*mn)*V(da=1/ri):da=0,da,ha=.5*(2*Fi*Ie*zn+xe/C)-Xt,ka=.5*(Fi*Ze+Ae)-ae,io=.5*da*(Nr*Bn+Fi*Ie*mn*Ir)+.5/C,Ro=da*(tn*wr/4-Fi*Ze*zn),Mo=.125*da*(wr*zn-Fi*Ze*Nr*tn),hs=.5*da*(Ir*mn+Fi*Bn*Ie)+.5,hl=Ro*Mo-hs*io,vl=(ka*Ro-ha*hs)/hl,Os=(ha*Mo-ka*io)/hl;xe-=vl,Ae-=Os}while((S(vl)>u||S(Os)>u)&&--je>0);return[xe,Ae]};function Sn(){return g.geoProjection(ln).scale(158.837)}c.geoNaturalEarth=g.geoNaturalEarth1,c.geoNaturalEarthRaw=g.geoNaturalEarth1Raw,c.geoAiry=lt,c.geoAiryRaw=X,c.geoAitoff=pt,c.geoAitoffRaw=yt,c.geoArmadillo=tt,c.geoArmadilloRaw=st,c.geoAugust=rt,c.geoAugustRaw=dt,c.geoBaker=Y,c.geoBakerRaw=it,c.geoBerghaus=ut,c.geoBerghausRaw=ft,c.geoBertin1953=ge,c.geoBertin1953Raw=Jt,c.geoBoggs=ve,c.geoBoggsRaw=te,c.geoBonne=cr,c.geoBonneRaw=Ge,c.geoBottomley=jr,c.geoBottomleyRaw=ur,c.geoBromley=br,c.geoBromleyRaw=Hr,c.geoChamberlin=gt,c.geoChamberlinRaw=$t,c.geoChamberlinAfrica=Ct,c.geoCollignon=Nt,c.geoCollignonRaw=St,c.geoCraig=le,c.geoCraigRaw=ee,c.geoCraster=qe,c.geoCrasterRaw=Ue,c.geoCylindricalEqualArea=Ar,c.geoCylindricalEqualAreaRaw=ar,c.geoCylindricalStereographic=pr,c.geoCylindricalStereographicRaw=Tr,c.geoEckert1=Vn,c.geoEckert1Raw=Jr,c.geoEckert2=Kn,c.geoEckert2Raw=Hn,c.geoEckert3=ii,c.geoEckert3Raw=Ci,c.geoEckert4=oa,c.geoEckert4Raw=qn,c.geoEckert5=We,c.geoEckert5Raw=Hi,c.geoEckert6=fr,c.geoEckert6Raw=rr,c.geoEisenlohr=Cn,c.geoEisenlohrRaw=Qr,c.geoFahey=ci,c.geoFaheyRaw=Mn,c.geoFoucaut=Pi,c.geoFoucautRaw=xi,c.geoFoucautSinusoidal=Zi,c.geoFoucautSinusoidalRaw=Di,c.geoGilbert=Wa,c.geoGingery=qr,c.geoGingeryRaw=ze,c.geoGinzburg4=Gr,c.geoGinzburg4Raw=Br,c.geoGinzburg5=an,c.geoGinzburg5Raw=dn,c.geoGinzburg6=dr,c.geoGinzburg6Raw=Ee,c.geoGinzburg8=yn,c.geoGinzburg8Raw=Vr,c.geoGinzburg9=Xn,c.geoGinzburg9Raw=Fn,c.geoGringorten=Ri,c.geoGringortenRaw=En,c.geoGuyou=is,c.geoGuyouRaw=Do,c.geoHammer=Pt,c.geoHammerRaw=wt,c.geoHammerRetroazimuthal=Gs,c.geoHammerRetroazimuthalRaw=ll,c.geoHealpix=kl,c.geoHealpixRaw=Rl,c.geoHill=Yl,c.geoHillRaw=Vl,c.geoHomolosine=Go,c.geoHomolosineRaw=Kl,c.geoHufnagel=il,c.geoHufnagelRaw=ql,c.geoHyperelliptical=Ts,c.geoHyperellipticalRaw=ao,c.geoInterrupt=Qo,c.geoInterruptedBoggs=Gu,c.geoInterruptedHomolosine=Ol,c.geoInterruptedMollweide=tu,c.geoInterruptedMollweideHemispheres=ph,c.geoInterruptedSinuMollweide=ah,c.geoInterruptedSinusoidal=Sf,c.geoKavrayskiy7=Bc,c.geoKavrayskiy7Raw=Dl,c.geoLagrange=hc,c.geoLagrangeRaw=jf,c.geoLarrivee=oh,c.geoLarriveeRaw=fc,c.geoLaskowski=sc,c.geoLaskowskiRaw=su,c.geoLittrow=Zl,c.geoLittrowRaw=el,c.geoLoximuthal=Lc,c.geoLoximuthalRaw=Mh,c.geoMiller=xu,c.geoMillerRaw=jh,c.geoModifiedStereographic=lc,c.geoModifiedStereographicRaw=Cd,c.geoModifiedStereographicAlaska=sh,c.geoModifiedStereographicGs48=ec,c.geoModifiedStereographicGs50=Uf,c.geoModifiedStereographicMiller=Uh,c.geoModifiedStereographicLee=yf,c.geoMollweide=Tt,c.geoMollweideRaw=se,c.geoMtFlatPolarParabolic=Vh,c.geoMtFlatPolarParabolicRaw=xf,c.geoMtFlatPolarQuartic=Hf,c.geoMtFlatPolarQuarticRaw=Vf,c.geoMtFlatPolarSinusoidal=Gf,c.geoMtFlatPolarSinusoidalRaw=lh,c.geoNaturalEarth2=mh,c.geoNaturalEarth2Raw=Sh,c.geoNellHammer=ef,c.geoNellHammerRaw=uc,c.geoInterruptedQuarticAuthalic=Jl,c.geoNicolosi=Ld,c.geoNicolosiRaw=Ef,c.geoPatterson=Sc,c.geoPattersonRaw=Eh,c.geoPolyconic=_u,c.geoPolyconicRaw=Uc,c.geoPolyhedral=cf,c.geoPolyhedralButterfly=bu,c.geoPolyhedralCollignon=fd,c.geoPolyhedralWaterman=vu,c.geoProject=gc,c.geoGringortenQuincuncial=mr,c.geoPeirceQuincuncial=Ur,c.geoPierceQuincuncial=Ur,c.geoQuantize=_n,c.geoQuincuncial=qf,c.geoRectangularPolyconic=Wn,c.geoRectangularPolyconicRaw=cn,c.geoRobinson=ga,c.geoRobinsonRaw=ea,c.geoSatellite=ua,c.geoSatelliteRaw=$a,c.geoSinuMollweide=Hs,c.geoSinuMollweideRaw=uo,c.geoSinusoidal=He,c.geoSinusoidalRaw=Te,c.geoStitch=uu,c.geoTimes=Ms,c.geoTimesRaw=zo,c.geoTwoPointAzimuthal=Hc,c.geoTwoPointAzimuthalRaw=Fl,c.geoTwoPointAzimuthalUsa=vc,c.geoTwoPointEquidistant=Wc,c.geoTwoPointEquidistantRaw=Pc,c.geoTwoPointEquidistantUsa=Ph,c.geoVanDerGrinten=Iu,c.geoVanDerGrintenRaw=zh,c.geoVanDerGrinten2=es,c.geoVanDerGrinten2Raw=Ih,c.geoVanDerGrinten3=qc,c.geoVanDerGrinten3Raw=zs,c.geoVanDerGrinten4=Zf,c.geoVanDerGrinten4Raw=Zu,c.geoWagner=ht,c.geoWagner7=Et,c.geoWagnerRaw=I,c.geoWagner4=Oe,c.geoWagner4Raw=ke,c.geoWagner6=gr,c.geoWagner6Raw=Ke,c.geoWiechel=Dr,c.geoWiechelRaw=Or,c.geoWinkel3=Sn,c.geoWinkel3Raw=ln,Object.defineProperty(c,"__esModule",{value:!0})})}),EU=Ft((Q,$)=>{var c=un(),g=bn(),P=Xo(),S=Math.PI/180,t=180/Math.PI,e={cursor:"pointer"},r={cursor:"auto"};function a(k,w){var R=k.projection,O;return w._isScoped?O=i:w._isClipped?O=f:O=s,O(k,R)}$.exports=a;function n(k,w){return c.behavior.zoom().translate(w.translate()).scale(w.scale())}function o(k,w,R){var O=k.id,N=k.graphDiv,V=N.layout,H=V[O],F=N._fullLayout,U=F[O],W={},q={};function X(lt,yt){W[O+"."+lt]=g.nestedProperty(H,lt).get(),P.call("_storeDirectGUIEdit",V,F._preGUI,W);var pt=g.nestedProperty(U,lt);pt.get()!==yt&&(pt.set(yt),g.nestedProperty(H,lt).set(yt),q[O+"."+lt]=yt)}R(X),X("projection.scale",w.scale()/k.fitScale),X("fitbounds",!1),N.emit("plotly_relayout",q)}function i(k,w){var R=n(k,w);function O(){c.select(this).style(e)}function N(){w.scale(c.event.scale).translate(c.event.translate),k.render(!0);var F=w.invert(k.midPt);k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":w.scale()/k.fitScale,"geo.center.lon":F[0],"geo.center.lat":F[1]})}function V(F){var U=w.invert(k.midPt);F("center.lon",U[0]),F("center.lat",U[1])}function H(){c.select(this).style(r),o(k,w,V)}return R.on("zoomstart",O).on("zoom",N).on("zoomend",H),R}function s(k,w){var R=n(k,w),O=2,N,V,H,F,U,W,q,X,lt;function yt(at){return w.invert(at)}function pt(at){var vt=yt(at);if(!vt)return!0;var it=w(vt);return Math.abs(it[0]-at[0])>O||Math.abs(it[1]-at[1])>O}function st(){c.select(this).style(e),N=c.mouse(this),V=w.rotate(),H=w.translate(),F=V,U=yt(N)}function tt(){if(W=c.mouse(this),pt(N)){R.scale(w.scale()),R.translate(w.translate());return}w.scale(c.event.scale),w.translate([H[0],c.event.translate[1]]),U?yt(W)&&(X=yt(W),q=[F[0]+(X[0]-U[0]),V[1],V[2]],w.rotate(q),F=q):(N=W,U=yt(N)),lt=!0,k.render(!0);var at=w.rotate(),vt=w.invert(k.midPt);k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":w.scale()/k.fitScale,"geo.center.lon":vt[0],"geo.center.lat":vt[1],"geo.projection.rotation.lon":-at[0]})}function dt(){c.select(this).style(r),lt&&o(k,w,rt)}function rt(at){var vt=w.rotate(),it=w.invert(k.midPt);at("projection.rotation.lon",-vt[0]),at("center.lon",it[0]),at("center.lat",it[1])}return R.on("zoomstart",st).on("zoom",tt).on("zoomend",dt),R}function f(k,w){w.rotate(),w.scale();var R=n(k,w),O=p(R,"zoomstart","zoom","zoomend"),N=0,V=R.on,H;R.on("zoomstart",function(){c.select(this).style(e);var X=c.mouse(this),lt=w.rotate(),yt=lt,pt=w.translate(),st=y(lt);H=x(w,X),V.call(R,"zoom",function(){var tt=c.mouse(this);if(w.scale(c.event.scale),!H)X=tt,H=x(w,X);else if(x(w,tt)){w.rotate(lt).translate(pt);var dt=x(w,tt),rt=T(H,dt),at=M(v(st,rt)),vt=u(at,H,yt);(!isFinite(vt[0])||!isFinite(vt[1])||!isFinite(vt[2]))&&(vt=yt),w.rotate(vt),yt=vt}U(O.of(this,arguments))}),F(O.of(this,arguments))}).on("zoomend",function(){c.select(this).style(r),V.call(R,"zoom",null),W(O.of(this,arguments)),o(k,w,q)}).on("zoom.redraw",function(){k.render(!0);var X=w.rotate();k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":w.scale()/k.fitScale,"geo.projection.rotation.lon":-X[0],"geo.projection.rotation.lat":-X[1]})});function F(X){N++||X({type:"zoomstart"})}function U(X){X({type:"zoom"})}function W(X){--N||X({type:"zoomend"})}function q(X){var lt=w.rotate();X("projection.rotation.lon",-lt[0]),X("projection.rotation.lat",-lt[1])}return c.rebind(R,O,"on")}function x(k,w){var R=k.invert(w);return R&&isFinite(R[0])&&isFinite(R[1])&&E(R)}function y(k){var w=.5*k[0]*S,R=.5*k[1]*S,O=.5*k[2]*S,N=Math.sin(w),V=Math.cos(w),H=Math.sin(R),F=Math.cos(R),U=Math.sin(O),W=Math.cos(O);return[V*F*W+N*H*U,N*F*W-V*H*U,V*H*W+N*F*U,V*F*U-N*H*W]}function v(k,w){var R=k[0],O=k[1],N=k[2],V=k[3],H=w[0],F=w[1],U=w[2],W=w[3];return[R*H-O*F-N*U-V*W,R*F+O*H+N*W-V*U,R*U-O*W+N*H+V*F,R*W+O*U-N*F+V*H]}function T(k,w){if(!(!k||!w)){var R=h(k,w),O=Math.sqrt(A(R,R)),N=.5*Math.acos(Math.max(-1,Math.min(1,A(k,w)))),V=Math.sin(N)/O;return O&&[Math.cos(N),R[2]*V,-R[1]*V,R[0]*V]}}function u(k,w,R){var O=C(w,2,k[0]);O=C(O,1,k[1]),O=C(O,0,k[2]-R[2]);var N=w[0],V=w[1],H=w[2],F=O[0],U=O[1],W=O[2],q=Math.atan2(V,N)*t,X=Math.sqrt(N*N+V*V),lt,yt;Math.abs(U)>X?(yt=(U>0?90:-90)-q,lt=0):(yt=Math.asin(U/X)*t-q,lt=Math.sqrt(X*X-U*U));var pt=180-yt-2*q,st=(Math.atan2(W,F)-Math.atan2(H,lt))*t,tt=(Math.atan2(W,F)-Math.atan2(H,-lt))*t,dt=b(R[0],R[1],yt,st),rt=b(R[0],R[1],pt,tt);return dt<=rt?[yt,st,R[2]]:[pt,tt,R[2]]}function b(k,w,R,O){var N=_(R-k),V=_(O-w);return Math.sqrt(N*N+V*V)}function _(k){return(k%360+540)%360-180}function C(k,w,R){var O=R*S,N=k.slice(),V=w===0?1:0,H=w===2?1:2,F=Math.cos(O),U=Math.sin(O);return N[V]=k[V]*F-k[H]*U,N[H]=k[H]*F+k[V]*U,N}function M(k){return[Math.atan2(2*(k[0]*k[1]+k[2]*k[3]),1-2*(k[1]*k[1]+k[2]*k[2]))*t,Math.asin(Math.max(-1,Math.min(1,2*(k[0]*k[2]-k[3]*k[1]))))*t,Math.atan2(2*(k[0]*k[3]+k[1]*k[2]),1-2*(k[2]*k[2]+k[3]*k[3]))*t]}function E(k){var w=k[0]*S,R=k[1]*S,O=Math.cos(R);return[O*Math.cos(w),O*Math.sin(w),Math.sin(R)]}function A(k,w){for(var R=0,O=0,N=k.length;O{var c=un(),g=yS(),P=g.geoPath,S=g.geoDistance,t=SU(),e=Xo(),r=bn(),a=r.strTranslate,n=li(),o=js(),i=Qh(),s=Kc(),f=Es(),x=Y0().getAutoRange,y=up(),v=vf().prepSelect,T=vf().clearOutline,u=vf().selectOnClick,b=EU(),_=v3(),C=V1(),M=Gk(),E=mS().feature;function A(R){this.id=R.id,this.graphDiv=R.graphDiv,this.container=R.container,this.topojsonURL=R.topojsonURL,this.isStatic=R.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var h=A.prototype;$.exports=function(R){return new A(R)},h.plot=function(R,O,N,V){var H=this;if(V)return H.update(R,O,!0);H._geoCalcData=R,H._fullLayout=O;var F=O[this.id],U=[],W=!1;for(var q in _.layerNameToAdjective)if(q!=="frame"&&F["show"+q]){W=!0;break}for(var X=!1,lt=0;lt0&&U._module.calcGeoJSON(F,O)}if(!N){var W=this.updateProjection(R,O);if(W)return;(!this.viewInitial||this.scope!==V.scope)&&this.saveViewInitial(V)}this.scope=V.scope,this.updateBaseLayers(O,V),this.updateDims(O,V),this.updateFx(O,V),s.generalUpdatePerTraceModule(this.graphDiv,this,R,V);var q=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=q.selectAll(".point"),this.dataPoints.text=q.selectAll("text"),this.dataPaths.line=q.selectAll(".js-line");var X=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=X.selectAll("path"),this._render()},h.updateProjection=function(R,O){var N=this.graphDiv,V=O[this.id],H=O._size,F=V.domain,U=V.projection,W=V.lonaxis,q=V.lataxis,X=W._ax,lt=q._ax,yt=this.projection=p(V),pt=[[H.l+H.w*F.x[0],H.t+H.h*(1-F.y[1])],[H.l+H.w*F.x[1],H.t+H.h*(1-F.y[0])]],st=V.center||{},tt=U.rotation||{},dt=W.range||[],rt=q.range||[];if(V.fitbounds){X._length=pt[1][0]-pt[0][0],lt._length=pt[1][1]-pt[0][1],X.range=x(N,X),lt.range=x(N,lt);var at=(X.range[0]+X.range[1])/2,vt=(lt.range[0]+lt.range[1])/2;if(V._isScoped)st={lon:at,lat:vt};else if(V._isClipped){st={lon:at,lat:vt},tt={lon:at,lat:vt,roll:tt.roll};var it=U.type,Y=_.lonaxisSpan[it]/2||180,ft=_.lataxisSpan[it]/2||90;dt=[at-Y,at+Y],rt=[vt-ft,vt+ft]}else st={lon:at,lat:vt},tt={lon:at,lat:tt.lat,roll:tt.roll}}yt.center([st.lon-tt.lon,st.lat-tt.lat]).rotate([-tt.lon,-tt.lat,tt.roll]).parallels(U.parallels);var ut=w(dt,rt);yt.fitExtent(pt,ut);var wt=this.bounds=yt.getBounds(ut),zt=this.fitScale=yt.scale(),Pt=yt.translate();if(V.fitbounds){var Wt=yt.getBounds(w(X.range,lt.range)),Ht=Math.min((wt[1][0]-wt[0][0])/(Wt[1][0]-Wt[0][0]),(wt[1][1]-wt[0][1])/(Wt[1][1]-Wt[0][1]));isFinite(Ht)?yt.scale(Ht*zt):r.warn("Something went wrong during"+this.id+"fitbounds computations.")}else yt.scale(U.scale*zt);var Jt=this.midPt=[(wt[0][0]+wt[1][0])/2,(wt[0][1]+wt[1][1])/2];if(yt.translate([Pt[0]+(Jt[0]-Pt[0]),Pt[1]+(Jt[1]-Pt[1])]).clipExtent(wt),V._isAlbersUsa){var ge=yt([st.lon,st.lat]),he=yt.translate();yt.translate([he[0]-(ge[0]-he[0]),he[1]-(ge[1]-he[1])])}},h.updateBaseLayers=function(R,O){var N=this,V=N.topojson,H=N.layers,F=N.basePaths;function U(pt){return pt==="lonaxis"||pt==="lataxis"}function W(pt){return!!_.lineLayers[pt]}function q(pt){return!!_.fillLayers[pt]}var X=this.hasChoropleth?_.layersForChoropleth:_.layers,lt=X.filter(function(pt){return W(pt)||q(pt)?O["show"+pt]:U(pt)?O[pt].showgrid:!0}),yt=N.framework.selectAll(".layer").data(lt,String);yt.exit().each(function(pt){delete H[pt],delete F[pt],c.select(this).remove()}),yt.enter().append("g").attr("class",function(pt){return"layer "+pt}).each(function(pt){var st=H[pt]=c.select(this);pt==="bg"?N.bgRect=st.append("rect").style("pointer-events","all"):U(pt)?F[pt]=st.append("path").style("fill","none"):pt==="backplot"?st.append("g").classed("choroplethlayer",!0):pt==="frontplot"?st.append("g").classed("scatterlayer",!0):W(pt)?F[pt]=st.append("path").style("fill","none").style("stroke-miterlimit",2):q(pt)&&(F[pt]=st.append("path").style("stroke","none"))}),yt.order(),yt.each(function(pt){var st=F[pt],tt=_.layerNameToAdjective[pt];pt==="frame"?st.datum(_.sphereSVG):W(pt)||q(pt)?st.datum(E(V,V.objects[pt])):U(pt)&&st.datum(k(pt,O,R)).call(n.stroke,O[pt].gridcolor).call(o.dashLine,O[pt].griddash,O[pt].gridwidth),W(pt)?st.call(n.stroke,O[tt+"color"]).call(o.dashLine,"",O[tt+"width"]):q(pt)&&st.call(n.fill,O[tt+"color"])})},h.updateDims=function(R,O){var N=this.bounds,V=(O.framewidth||0)/2,H=N[0][0]-V,F=N[0][1]-V,U=N[1][0]-H+V,W=N[1][1]-F+V;o.setRect(this.clipRect,H,F,U,W),this.bgRect.call(o.setRect,H,F,U,W).call(n.fill,O.bgcolor),this.xaxis._offset=H,this.xaxis._length=U,this.yaxis._offset=F,this.yaxis._length=W},h.updateFx=function(R,O){var N=this,V=N.graphDiv,H=N.bgRect,F=R.dragmode,U=R.clickmode;if(N.isStatic)return;function W(){var yt=N.viewInitial,pt={};for(var st in yt)pt[N.id+"."+st]=yt[st];e.call("_guiRelayout",V,pt),V.emit("plotly_doubleclick",null)}function q(yt){return N.projection.invert([yt[0]+N.xaxis._offset,yt[1]+N.yaxis._offset])}var X=function(yt,pt){if(pt.isRect){var st=yt.range={};st[N.id]=[q([pt.xmin,pt.ymin]),q([pt.xmax,pt.ymax])]}else{var tt=yt.lassoPoints={};tt[N.id]=pt.map(q)}},lt={element:N.bgRect.node(),gd:V,plotinfo:{id:N.id,xaxis:N.xaxis,yaxis:N.yaxis,fillRangeItems:X},xaxes:[N.xaxis],yaxes:[N.yaxis],subplot:N.id,clickFn:function(yt){yt===2&&T(V)}};F==="pan"?(H.node().onmousedown=null,H.call(b(N,O)),H.on("dblclick.zoom",W),V._context._scrollZoom.geo||H.on("wheel.zoom",null)):(F==="select"||F==="lasso")&&(H.on(".zoom",null),lt.prepFn=function(yt,pt,st){v(yt,pt,st,lt,F)},y.init(lt)),H.on("mousemove",function(){var yt=N.projection.invert(r.getPositionFromD3Event());if(!yt)return y.unhover(V,c.event);N.xaxis.p2c=function(){return yt[0]},N.yaxis.p2c=function(){return yt[1]},i.hover(V,c.event,N.id)}),H.on("mouseout",function(){V._dragging||y.unhover(V,c.event)}),H.on("click",function(){F!=="select"&&F!=="lasso"&&(U.indexOf("select")>-1&&u(c.event,V,[N.xaxis],[N.yaxis],N.id,lt),U.indexOf("event")>-1&&i.click(V,c.event))})},h.makeFramework=function(){var R=this,O=R.graphDiv,N=O._fullLayout,V="clip"+N._uid+R.id;R.clipDef=N._clips.append("clipPath").attr("id",V),R.clipRect=R.clipDef.append("rect"),R.framework=c.select(R.container).append("g").attr("class","geo "+R.id).call(o.setClipUrl,V,O),R.project=function(H){var F=R.projection(H);return F?[F[0]-R.xaxis._offset,F[1]-R.yaxis._offset]:[null,null]},R.xaxis={_id:"x",c2p:function(H){return R.project(H)[0]}},R.yaxis={_id:"y",c2p:function(H){return R.project(H)[1]}},R.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},f.setConvert(R.mockAxis,N)},h.saveViewInitial=function(R){var O=R.center||{},N=R.projection,V=N.rotation||{};this.viewInitial={fitbounds:R.fitbounds,"projection.scale":N.scale};var H;R._isScoped?H={"center.lon":O.lon,"center.lat":O.lat}:R._isClipped?H={"projection.rotation.lon":V.lon,"projection.rotation.lat":V.lat}:H={"center.lon":O.lon,"center.lat":O.lat,"projection.rotation.lon":V.lon},r.extendFlat(this.viewInitial,H)},h.render=function(R){this._hasMarkerAngles&&R?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},h._render=function(){var R=this.projection,O=R.getPath(),N;function V(F){var U=R(F.lonlat);return U?a(U[0],U[1]):null}function H(F){return R.isLonLatOverEdges(F.lonlat)?"none":null}for(N in this.basePaths)this.basePaths[N].attr("d",O);for(N in this.dataPaths)this.dataPaths[N].attr("d",function(F){return O(F.geojson)});for(N in this.dataPoints)this.dataPoints[N].attr("display",H).attr("transform",V)};function p(R){var O=R.projection,N=O.type,V=_.projNames[N];V="geo"+r.titleCase(V);for(var H=g[V]||t[V],F=H(),U=R._isSatellite?Math.acos(1/O.distance)*180/Math.PI:R._isClipped?_.lonaxisSpan[N]/2:null,W=["center","rotate","parallels","clipExtent"],q=function(yt){return yt?F:[]},X=0;Xtt}else return!1},F.getPath=function(){return P().projection(F)},F.getBounds=function(yt){return F.getPath().bounds(yt)},F.precision(_.precision),R._isSatellite&&F.tilt(O.tilt).distance(O.distance),U&&F.clipAngle(U-_.clipPad),F}function k(R,O,N){var V=1e-6,H=2.5,F=O[R],U=_.scopeDefaults[O.scope],W,q,X;R==="lonaxis"?(W=U.lonaxisRange,q=U.lataxisRange,X=function(vt,it){return[vt,it]}):R==="lataxis"&&(W=U.lataxisRange,q=U.lonaxisRange,X=function(vt,it){return[it,vt]});var lt={type:"linear",range:[W[0],W[1]-V],tick0:F.tick0,dtick:F.dtick};f.setConvert(lt,N);var yt=f.calcTicks(lt);!O.isScoped&&R==="lonaxis"&&yt.pop();for(var pt=yt.length,st=new Array(pt),tt=0;tt0&&H<0&&(H+=360);var W=(H-V)/4;return{type:"Polygon",coordinates:[[[V,F],[V,U],[V+W,U],[V+2*W,U],[V+3*W,U],[H,U],[H,F],[H-W,F],[H-2*W,F],[H-3*W,F],[V,F]]]}}}),xS=Ft((Q,$)=>{var c=bi(),g=Nh().attributes,P=Td().dash,S=v3(),t=Yc().overrideAll,e=G0(),r={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:c.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:P},a=$.exports=t({domain:g({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:e(S.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:e(S.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:c.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:S.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:S.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:S.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:S.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:c.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:c.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:c.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:c.background},lonaxis:r,lataxis:r},"plot","from-root");a.uirevision={valType:"any",editType:"none"}}),LU=Ft((Q,$)=>{var c=bn(),g=P1(),P=ud().getSubplotData,S=v3(),t=xS(),e=S.axesNames;$.exports=function(a,n,o){g(a,n,o,{type:"geo",attributes:t,handleDefaults:r,fullData:o,partition:"y"})};function r(a,n,o,i){var s=P(i.fullData,"geo",i.id),f=s.map(function(rt){return rt.index}),x=o("resolution"),y=o("scope"),v=S.scopeDefaults[y],T=o("projection.type",v.projType),u=n._isAlbersUsa=T==="albers usa";u&&(y=n.scope="usa");var b=n._isScoped=y!=="world",_=n._isSatellite=T==="satellite",C=n._isConic=T.indexOf("conic")!==-1||T==="albers",M=n._isClipped=!!S.lonaxisSpan[T];if(a.visible===!1){var E=c.extendDeep({},n._template);E.showcoastlines=!1,E.showcountries=!1,E.showframe=!1,E.showlakes=!1,E.showland=!1,E.showocean=!1,E.showrivers=!1,E.showsubunits=!1,E.lonaxis&&(E.lonaxis.showgrid=!1),E.lataxis&&(E.lataxis.showgrid=!1),n._template=E}for(var A=o("visible"),h,p=0;p0&&q<0&&(q+=360);var X=(W+q)/2,lt;if(!u){var yt=b?v.projRotate:[X,0,0];lt=o("projection.rotation.lon",yt[0]),o("projection.rotation.lat",yt[1]),o("projection.rotation.roll",yt[2]),h=o("showcoastlines",!b&&A),h&&(o("coastlinecolor"),o("coastlinewidth")),h=o("showocean",A?void 0:!1),h&&o("oceancolor")}var pt,st;if(u?(pt=-96.6,st=38.7):(pt=b?X:lt,st=(U[0]+U[1])/2),o("center.lon",pt),o("center.lat",st),_&&(o("projection.tilt"),o("projection.distance")),C){var tt=v.projParallels||[0,60];o("projection.parallels",tt)}o("projection.scale"),h=o("showland",A?void 0:!1),h&&o("landcolor"),h=o("showlakes",A?void 0:!1),h&&o("lakecolor"),h=o("showrivers",A?void 0:!1),h&&(o("rivercolor"),o("riverwidth")),h=o("showcountries",b&&y!=="usa"&&A),h&&(o("countrycolor"),o("countrywidth")),(y==="usa"||y==="north america"&&x===50)&&(o("showsubunits",A),o("subunitcolor"),o("subunitwidth")),b||(h=o("showframe",A),h&&(o("framecolor"),o("framewidth"))),o("bgcolor");var dt=o("fitbounds");dt&&(delete n.projection.scale,b?(delete n.center.lon,delete n.center.lat):M?(delete n.center.lon,delete n.center.lat,delete n.projection.rotation.lon,delete n.projection.rotation.lat,delete n.lonaxis.range,delete n.lataxis.range):(delete n.center.lon,delete n.center.lat,delete n.projection.rotation.lon))}}),_S=Ft((Q,$)=>{var c=ud().getSubplotCalcData,g=bn().counterRegex,P=CU(),S="geo",t=g(S),e={};e[S]={valType:"subplotid",dflt:S,editType:"calc"};function r(o){for(var i=o._fullLayout,s=o.calcdata,f=i._subplots[S],x=0;x{$.exports={attributes:dx(),supplyDefaults:yU(),colorbar:xo(),formatLabels:xU(),calc:$k(),calcGeoJSON:vS().calcGeoJSON,plot:vS().plot,style:gS(),styleOnSelect:xl().styleOnSelect,hoverPoints:TU(),eventData:AU(),selectPoints:MU(),moduleType:"trace",name:"scattergeo",basePlotModule:_S(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}}),zU=Ft((Q,$)=>{$.exports=PU()}),fb=Ft((Q,$)=>{var{hovertemplateAttrs:c,templatefallbackAttrs:g}=$u(),P=dx(),S=Tc(),t=$o(),e=bi().defaultLine,r=Ta().extendFlat,a=P.marker.line;$.exports=r({locations:{valType:"data_array",editType:"calc"},locationmode:P.locationmode,z:{valType:"data_array",editType:"calc"},geojson:r({},P.geojson,{}),featureidkey:P.featureidkey,text:r({},P.text,{}),hovertext:r({},P.hovertext,{}),marker:{line:{color:r({},a.color,{dflt:e}),width:r({},a.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:P.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:P.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:r({},t.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:c(),hovertemplatefallback:g(),showlegend:r({},t.showlegend,{dflt:!1})},S("",{cLetter:"z",editTypeOverride:"calc"}))}),IU=Ft((Q,$)=>{var c=bn(),g=mc(),P=fb(),S=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");$.exports=function(t,e,r,a){function n(v,T){return c.coerce(t,e,P,v,T)}var o=n("locations"),i=n("z");if(!(o&&o.length&&c.isArrayOrTypedArray(i)&&i.length)){e.visible=!1;return}e._length=Math.min(o.length,i.length);var s=n("geojson"),f;(typeof s=="string"&&s!==""||c.isPlainObject(s))&&(f="geojson-id");var x=n("locationmode",f);x==="country names"&&c.warn(S),x==="geojson-id"&&n("featureidkey"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback");var y=n("marker.line.width");y&&n("marker.line.color"),n("marker.opacity"),g(t,e,a,n,{prefix:"",cLetter:"z"}),c.coerceSelectionMarkerOpacity(e,n)}}),Xk=Ft((Q,$)=>{var c=ra(),g=Da().BADNUM,P=Jd(),S=ct(),t=Bt();function e(r){return r&&typeof r=="string"}$.exports=function(r,a){var n=a._length,o=new Array(n),i;a.geojson?i=function(v){return e(v)||c(v)}:i=e;for(var s=0;s{var c=un(),g=li(),P=js(),S=Xc();function t(a,n){n&&e(a,n)}function e(a,n){var o=n[0].trace,i=n[0].node3,s=i.selectAll(".choroplethlocation"),f=o.marker||{},x=f.line||{},y=S.makeColorScaleFuncFromTrace(o);s.each(function(v){c.select(this).attr("fill",y(v.z)).call(g.stroke,v.mlc||x.color).call(P.dashLine,"",v.mlw||x.width||0).style("opacity",f.opacity)}),P.selectedPointStyle(s,o)}function r(a,n){var o=n[0].node3,i=n[0].trace;i.selectedpoints?P.selectedPointStyle(o.selectAll(".choroplethlocation"),i):e(a,n)}$.exports={style:t,styleOnSelect:r}}),bS=Ft((Q,$)=>{var c=un(),g=bn(),P=V1(),S=Gk().getTopojsonFeatures,t=Y0().findExtremes,e=Jk().style;function r(n,o,i){var s=o.layers.backplot.select(".choroplethlayer");g.makeTraceGroups(s,i,"trace choropleth").each(function(f){var x=c.select(this),y=x.selectAll("path.choroplethlocation").data(g.identity);y.enter().append("path").classed("choroplethlocation",!0),y.exit().remove(),e(n,f)})}function a(n,o){for(var i=n[0].trace,s=o[i.geo],f=s._subplot,x=i.locationmode,y=i._length,v=x==="geojson-id"?P.extractTraceFeature(n):S(i,f.topojson),T=[],u=[],b=0;b{var c=Es(),g=fb(),P=bn().fillText;$.exports=function(t,e,r){var a=t.cd,n=a[0].trace,o=t.subplot,i,s,f,x,y=[e,r],v=[e+360,r];for(s=0;s")}}}),tT=Ft((Q,$)=>{$.exports=function(c,g,P,S,t){c.location=g.location,c.z=g.z;var e=S[t];return e.fIn&&e.fIn.properties&&(c.properties=e.fIn.properties),c.ct=e.ct,c}}),eT=Ft((Q,$)=>{$.exports=function(c,g){var P=c.cd,S=c.xaxis,t=c.yaxis,e=[],r,a,n,o,i;if(g===!1)for(r=0;r{$.exports={attributes:fb(),supplyDefaults:IU(),colorbar:L1(),calc:Xk(),calcGeoJSON:bS().calcGeoJSON,plot:bS().plot,style:Jk().style,styleOnSelect:Jk().styleOnSelect,hoverPoints:Qk(),eventData:tT(),selectPoints:eT(),moduleType:"trace",name:"choropleth",basePlotModule:_S(),categories:["geo","noOpacity","showLegend"],meta:{}}}),DU=Ft((Q,$)=>{$.exports=OU()}),rT=Ft((Q,$)=>{var c=Xo(),g=bn(),P=Du();function S(e,r,a,n){var o=e.cd,i=o[0].t,s=o[0].trace,f=e.xa,x=e.ya,y=i.x,v=i.y,T=f.c2p(r),u=x.c2p(a),b=e.distance,_;if(i.tree){var C=f.p2c(T-b),M=f.p2c(T+b),E=x.p2c(u-b),A=x.p2c(u+b);n==="x"?_=i.tree.range(Math.min(C,M),Math.min(x._rl[0],x._rl[1]),Math.max(C,M),Math.max(x._rl[0],x._rl[1])):_=i.tree.range(Math.min(C,M),Math.min(E,A),Math.max(C,M),Math.max(E,A))}else _=i.ids;var h,p,k,w,R,O,N,V,H,F=b;if(n==="x"){var U=!!s.xperiodalignment,W=!!s.yperiodalignment;for(R=0;R<_.length;R++){if(h=_[R],k=y[h],O=Math.abs(f.c2p(k)-T),U){var q=f.c2p(s._xStarts[h]),X=f.c2p(s._xEnds[h]);O=T>=Math.min(q,X)&&T<=Math.max(q,X)?0:1/0}if(O=Math.min(lt,yt)&&u<=Math.max(lt,yt)?0:1/0}H=Math.sqrt(O*O+N*N),p=_[R]}}}else for(R=_.length-1;R>-1;R--)h=_[R],k=y[h],w=v[h],O=f.c2p(k)-T,N=x.c2p(w)-u,V=Math.sqrt(O*O+N*N),V{var c=20;$.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:c,SYMBOL_STROKE:c/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}}),x3=Ft((Q,$)=>{var c=$o(),g=Ea(),P=z0(),S=tf(),t=fh().axisHoverFormat,e=Tc(),r=G0(),a=Ta().extendFlat,n=Yc().overrideAll,o=H1().DASHES,i=S.line,s=S.marker,f=s.line,x=$.exports=n({x:S.x,x0:S.x0,dx:S.dx,y:S.y,y0:S.y0,dy:S.dy,xperiod:S.xperiod,yperiod:S.yperiod,xperiod0:S.xperiod0,yperiod0:S.yperiod0,xperiodalignment:S.xperiodalignment,yperiodalignment:S.yperiodalignment,xhoverformat:t("x"),yhoverformat:t("y"),text:S.text,hovertext:S.hovertext,textposition:S.textposition,textfont:g({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,noNumericWeightValues:!0,variantValues:["normal","small-caps"]}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:i.color,width:i.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:r(o),dflt:"solid"}},marker:a({},e("marker"),{symbol:s.symbol,angle:s.angle,size:s.size,sizeref:s.sizeref,sizemin:s.sizemin,sizemode:s.sizemode,opacity:s.opacity,colorbar:s.colorbar,line:a({},e("marker.line"),{width:f.width})}),connectgaps:S.connectgaps,fill:a({},S.fill,{dflt:"none"}),fillcolor:P(),selected:{marker:S.selected.marker,textfont:S.selected.textfont},unselected:{marker:S.unselected.marker,textfont:S.unselected.textfont},opacity:c.opacity},"calc","nested");x.x.editType=x.y.editType=x.x0.editType=x.y0.editType="calc+clearAxisTypes",x.hovertemplate=S.hovertemplate,x.hovertemplatefallback=S.hovertemplatefallback,x.texttemplate=S.texttemplate,x.texttemplatefallback=S.texttemplatefallback}),nT=Ft(Q=>{var $=H1();Q.isOpenSymbol=function(c){return typeof c=="string"?$.OPEN_RE.test(c):c%200>100},Q.isDotSymbol=function(c){return typeof c=="string"?$.DOT_RE.test(c):c>200}}),FU=Ft((Q,$)=>{var c=bn(),g=Xo(),P=nT(),S=x3(),t=vm(),e=Ac(),r=Nm(),a=Fp(),n=s0(),o=I0(),i=O0(),s=x0();$.exports=function(f,x,y,v){function T(h,p){return c.coerce(f,x,S,h,p)}var u=f.marker?P.isOpenSymbol(f.marker.symbol):!1,b=e.isBubble(f),_=r(f,x,v,T);if(!_){x.visible=!1;return}a(f,x,v,T),T("xhoverformat"),T("yhoverformat");var C=_{var c=Vs();$.exports=function(g,P,S){var t=g.i;return"x"in g||(g.x=P._x[t]),"y"in g||(g.y=P._y[t]),c(g,P,S)}}),BU=Ft((Q,$)=>{function c(r,a,n,o,i){for(var s=i+1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y>=0?(s=f,i=f-1):o=f+1}return s}function g(r,a,n,o,i){for(var s=i+1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y>0?(s=f,i=f-1):o=f+1}return s}function P(r,a,n,o,i){for(var s=o-1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y<0?(s=f,o=f+1):i=f-1}return s}function S(r,a,n,o,i){for(var s=o-1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y<=0?(s=f,o=f+1):i=f-1}return s}function t(r,a,n,o,i){for(;o<=i;){var s=o+i>>>1,f=r[s],x=n!==void 0?n(f,a):f-a;if(x===0)return s;x<=0?o=s+1:i=s-1}return-1}function e(r,a,n,o,i,s){return typeof n=="function"?s(r,a,n,o===void 0?0:o|0,i===void 0?r.length-1:i|0):s(r,a,void 0,n===void 0?0:n|0,o===void 0?r.length-1:o|0)}$.exports={ge:function(r,a,n,o,i){return e(r,a,n,o,i,c)},gt:function(r,a,n,o,i){return e(r,a,n,o,i,g)},lt:function(r,a,n,o,i){return e(r,a,n,o,i,P)},le:function(r,a,n,o,i){return e(r,a,n,o,i,S)},eq:function(r,a,n,o,i){return e(r,a,n,o,i,t)}}}),Cg=Ft((Q,$)=>{$.exports=function(P,S,t){var e={},r,a;if(typeof S=="string"&&(S=g(S)),Array.isArray(S)){var n={};for(a=0;a{var c=Cg();$.exports=g;function g(P){var S;return arguments.length>1&&(P=arguments),typeof P=="string"?P=P.split(/\s/).map(parseFloat):typeof P=="number"&&(P=[P]),P.length&&typeof P[0]=="number"?P.length===1?S={width:P[0],height:P[0],x:0,y:0}:P.length===2?S={width:P[0],height:P[1],x:0,y:0}:S={x:P[0],y:P[1],width:P[2]-P[0]||0,height:P[3]-P[1]||0}:P&&(P=c(P,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),S={x:P.left||0,y:P.top||0},P.width==null?P.right?S.width=P.right-S.x:S.width=0:S.width=P.width,P.height==null?P.bottom?S.height=P.bottom-S.y:S.height=0:S.height=P.height),S}}),px=Ft((Q,$)=>{$.exports=c;function c(g,P){if(!g||g.length==null)throw Error("Argument should be an array");P==null?P=1:P=Math.floor(P);for(var S=Array(P*2),t=0;te&&(e=g[a]),g[a]{$.exports=function(){for(var c=0;c{var c=Vk();$.exports=g;function g(P,S,t){if(!P)throw new TypeError("must specify data as first parameter");if(t=+(t||0)|0,Array.isArray(P)&&P[0]&&typeof P[0][0]=="number"){var e=P[0].length,r=P.length*e,a,n,o,i;(!S||typeof S=="string")&&(S=new(c(S||"float32"))(r+t));var s=S.length-t;if(r!==s)throw new Error("source length "+r+" ("+e+"x"+P.length+") does not match destination length "+s);for(a=0,o=t;a{$.exports=function(c){var g=typeof c;return c!==null&&(g==="object"||g==="function")}}),UU=Ft((Q,$)=>{$.exports=Math.log2||function(c){return Math.log(c)*Math.LOG2E}}),VU=Ft((Q,$)=>{var c=BU(),g=m3(),P=db(),S=px(),t=Cg(),e=NU(),r=mx(),a=jU(),n=Vk(),o=UU(),i=1073741824;$.exports=function(f,x){x||(x={}),f=r(f,"float64"),x=t(x,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let y=e(x.maxDepth,255),v=e(x.bounds,S(f,2));v[0]===v[2]&&v[2]++,v[1]===v[3]&&v[3]++;let T=s(f,v),u=f.length>>>1,b;x.dtype||(x.dtype="array"),typeof x.dtype=="string"?b=new(n(x.dtype))(u):x.dtype&&(b=x.dtype,Array.isArray(b)&&(b.length=u));for(let R=0;Ry||F>i){for(let at=0;atft||q>ut||X=yt||it===Y)return;let wt=_[vt];Y===void 0&&(Y=wt.length);for(let se=it;se=V&&Lt<=F&&Mt>=H&&Mt<=U&&pt.push(Tt)}let zt=C[vt],Pt=zt[it*4+0],Wt=zt[it*4+1],Ht=zt[it*4+2],Jt=zt[it*4+3],ge=tt(zt,it+1),he=at*.5,de=vt+1;st(dt,rt,he,de,Pt,Wt||Ht||Jt||ge),st(dt,rt+he,he,de,Wt,Ht||Jt||ge),st(dt+he,rt,he,de,Ht,Jt||ge),st(dt+he,rt+he,he,de,Jt,ge)}function tt(dt,rt){let at=null,vt=0;for(;at===null;)if(at=dt[rt*4+vt],vt++,vt>dt.length)return null;return at}return pt}function k(R,O,N,V,H){let F=[];for(let U=0;U{$.exports=VU()}),wS=Ft((Q,$)=>{$.exports=c;function c(g){var P=0,S=0,t=0,e=0;return g.map(function(r){r=r.slice();var a=r[0],n=a.toUpperCase();if(a!=n)switch(r[0]=n,a){case"a":r[6]+=t,r[7]+=e;break;case"v":r[1]+=e;break;case"h":r[1]+=t;break;default:for(var o=1;o{Object.defineProperty(Q,"__esModule",{value:!0});var c=function(){function a(n,o){var i=[],s=!0,f=!1,x=void 0;try{for(var y=n[Symbol.iterator](),v;!(s=(v=y.next()).done)&&(i.push(v.value),!(o&&i.length===o));s=!0);}catch(T){f=!0,x=T}finally{try{!s&&y.return&&y.return()}finally{if(f)throw x}}return i}return function(n,o){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return a(n,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g=Math.PI*2,P=function(a,n,o,i,s,f,x){var y=a.x,v=a.y;y*=n,v*=o;var T=i*y-s*v,u=s*y+i*v;return{x:T+f,y:u+x}},S=function(a,n){var o=n===1.5707963267948966?.551915024494:n===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(n/4),i=Math.cos(a),s=Math.sin(a),f=Math.cos(a+n),x=Math.sin(a+n);return[{x:i-s*o,y:s+i*o},{x:f+x*o,y:x-f*o},{x:f,y:x}]},t=function(a,n,o,i){var s=a*i-n*o<0?-1:1,f=a*o+n*i;return f>1&&(f=1),f<-1&&(f=-1),s*Math.acos(f)},e=function(a,n,o,i,s,f,x,y,v,T,u,b){var _=Math.pow(s,2),C=Math.pow(f,2),M=Math.pow(u,2),E=Math.pow(b,2),A=_*C-_*E-C*M;A<0&&(A=0),A/=_*E+C*M,A=Math.sqrt(A)*(x===y?-1:1);var h=A*s/f*b,p=A*-f/s*u,k=T*h-v*p+(a+o)/2,w=v*h+T*p+(n+i)/2,R=(u-h)/s,O=(b-p)/f,N=(-u-h)/s,V=(-b-p)/f,H=t(1,0,R,O),F=t(R,O,N,V);return y===0&&F>0&&(F-=g),y===1&&F<0&&(F+=g),[k,w,H,F]},r=function(a){var n=a.px,o=a.py,i=a.cx,s=a.cy,f=a.rx,x=a.ry,y=a.xAxisRotation,v=y===void 0?0:y,T=a.largeArcFlag,u=T===void 0?0:T,b=a.sweepFlag,_=b===void 0?0:b,C=[];if(f===0||x===0)return[];var M=Math.sin(v*g/360),E=Math.cos(v*g/360),A=E*(n-i)/2+M*(o-s)/2,h=-M*(n-i)/2+E*(o-s)/2;if(A===0&&h===0)return[];f=Math.abs(f),x=Math.abs(x);var p=Math.pow(A,2)/Math.pow(f,2)+Math.pow(h,2)/Math.pow(x,2);p>1&&(f*=Math.sqrt(p),x*=Math.sqrt(p));var k=e(n,o,i,s,f,x,u,_,M,E,A,h),w=c(k,4),R=w[0],O=w[1],N=w[2],V=w[3],H=Math.abs(V)/(g/4);Math.abs(1-H)<1e-7&&(H=1);var F=Math.max(Math.ceil(H),1);V/=F;for(var U=0;U{$.exports=g;var c=HU();function g(t){for(var e,r=[],a=0,n=0,o=0,i=0,s=null,f=null,x=0,y=0,v=0,T=t.length;v4?(a=u[u.length-4],n=u[u.length-3]):(a=x,n=y),r.push(u)}return r}function P(t,e,r,a){return["C",t,e,r,a,r,a]}function S(t,e,r,a,n,o){return["C",t/3+2/3*r,e/3+2/3*a,n/3+2/3*r,o/3+2/3*a,n,o]}}),kS=Ft((Q,$)=>{$.exports=function(c){return typeof c!="string"?!1:(c=c.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(c)&&/[\dz]$/i.test(c)&&c.length>4))}}),qU=Ft((Q,$)=>{var c=A1(),g=wS(),P=WU(),S=kS(),t=Yw();$.exports=e;function e(r){if(Array.isArray(r)&&r.length===1&&typeof r[0]=="string"&&(r=r[0]),typeof r=="string"&&(t(S(r),"String is not an SVG path."),r=c(r)),t(Array.isArray(r),"Argument should be a string or an array of path segments."),r=g(r),r=P(r),!r.length)return[0,0,0,0];for(var a=[1/0,1/0,-1/0,-1/0],n=0,o=r.length;na[2]&&(a[2]=i[s+0]),i[s+1]>a[3]&&(a[3]=i[s+1]);return a}}),ZU=Ft((Q,$)=>{var c=Math.PI,g=a(120);$.exports=P;function P(n){for(var o,i=[],s=0,f=0,x=0,y=0,v=null,T=null,u=0,b=0,_=0,C=n.length;_7&&(i.push(M.splice(0,7)),M.unshift("C"));break;case"S":var A=u,h=b;(o=="C"||o=="S")&&(A+=A-s,h+=h-f),M=["C",A,h,M[1],M[2],M[3],M[4]];break;case"T":o=="Q"||o=="T"?(v=u*2-v,T=b*2-T):(v=u,T=b),M=t(u,b,v,T,M[1],M[2]);break;case"Q":v=M[1],T=M[2],M=t(u,b,M[1],M[2],M[3],M[4]);break;case"L":M=S(u,b,M[1],M[2]);break;case"H":M=S(u,b,M[1],b);break;case"V":M=S(u,b,u,M[1]);break;case"Z":M=S(u,b,x,y);break}o=E,u=M[M.length-2],b=M[M.length-1],M.length>4?(s=M[M.length-4],f=M[M.length-3]):(s=u,f=b),i.push(M)}return i}function S(n,o,i,s){return["C",n,o,i,s,i,s]}function t(n,o,i,s,f,x){return["C",n/3+2/3*i,o/3+2/3*s,f/3+2/3*i,x/3+2/3*s,f,x]}function e(n,o,i,s,f,x,y,v,T,u){if(u)w=u[0],R=u[1],p=u[2],k=u[3];else{var b=r(n,o,-f);n=b.x,o=b.y,b=r(v,T,-f),v=b.x,T=b.y;var _=(n-v)/2,C=(o-T)/2,M=_*_/(i*i)+C*C/(s*s);M>1&&(M=Math.sqrt(M),i=M*i,s=M*s);var E=i*i,A=s*s,h=(x==y?-1:1)*Math.sqrt(Math.abs((E*A-E*C*C-A*_*_)/(E*C*C+A*_*_)));h==1/0&&(h=1);var p=h*i*C/s+(n+v)/2,k=h*-s*_/i+(o+T)/2,w=Math.asin(((o-k)/s).toFixed(9)),R=Math.asin(((T-k)/s).toFixed(9));w=nR&&(w=w-c*2),!y&&R>w&&(R=R-c*2)}if(Math.abs(R-w)>g){var O=R,N=v,V=T;R=w+g*(y&&R>w?1:-1),v=p+i*Math.cos(R),T=k+s*Math.sin(R);var H=e(v,T,i,s,f,0,y,N,V,[R,O,p,k])}var F=Math.tan((R-w)/4),U=4/3*i*F,W=4/3*s*F,q=[2*n-(n+U*Math.sin(w)),2*o-(o-W*Math.cos(w)),v+U*Math.sin(R),T-W*Math.cos(R),v,T];if(u)return q;H&&(q=q.concat(H));for(var X=0;X{var c=wS(),g=ZU(),P={M:"moveTo",C:"bezierCurveTo"};$.exports=function(S,t){S.beginPath(),g(c(t)).forEach(function(e){var r=e[0],a=e.slice(1);S[P[r]].apply(S,a)}),S.closePath()}}),GU=Ft((Q,$)=>{var c=m3();$.exports=P;var g=1e20;function P(e,r){r||(r={});var a=r.cutoff==null?.25:r.cutoff,n=r.radius==null?8:r.radius,o=r.channel||0,i,s,f,x,y,v,T,u,b,_,C;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!r.width||!r.height)throw Error("For raw data width and height should be provided by options");i=r.width,s=r.height,x=e,r.stride?v=r.stride:v=Math.floor(e.length/i/s)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(u=e,T=u.getContext("2d"),i=u.width,s=u.height,b=T.getImageData(0,0,i,s),x=b.data,v=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(u=e.canvas,T=e,i=u.width,s=u.height,b=T.getImageData(0,0,i,s),x=b.data,v=4):window.ImageData&&e instanceof window.ImageData&&(b=e,i=e.width,s=e.height,x=b.data,v=4);if(f=Math.max(i,s),window.Uint8ClampedArray&&x instanceof window.Uint8ClampedArray||window.Uint8Array&&x instanceof window.Uint8Array)for(y=x,x=Array(i*s),_=0,C=y.length;_{var c=qU(),g=A1(),P=$U(),S=kS(),t=GU(),e=document.createElement("canvas"),r=e.getContext("2d");$.exports=a;function a(i,s){if(!S(i))throw Error("Argument should be valid svg path string");s||(s={});var f,x;s.shape?(f=s.shape[0],x=s.shape[1]):(f=e.width=s.w||s.width||200,x=e.height=s.h||s.height||200);var y=Math.min(f,x),v=s.stroke||0,T=s.viewbox||s.viewBox||c(i),u=[f/(T[2]-T[0]),x/(T[3]-T[1])],b=Math.min(u[0]||0,u[1]||0)/2;if(r.fillStyle="black",r.fillRect(0,0,f,x),r.fillStyle="white",v&&(typeof v!="number"&&(v=1),v>0?r.strokeStyle="white":r.strokeStyle="black",r.lineWidth=Math.abs(v)),r.translate(f*.5,x*.5),r.scale(b,b),o()){var _=new Path2D(i);r.fill(_),v&&r.stroke(_)}else{var C=g(i);P(r,C),r.fill(),v&&r.stroke()}r.setTransform(1,0,0,1,0,0);var M=t(r,{cutoff:s.cutoff!=null?s.cutoff:.5,radius:s.radius!=null?s.radius:y*.5});return M}var n;function o(){if(n!=null)return n;var i=document.createElement("canvas").getContext("2d");if(i.canvas.width=i.canvas.height=1,!window.Path2D)return n=!1;var s=new Path2D("M0,0h1v1h-1v-1Z");i.fillStyle="black",i.fill(s);var f=i.getImageData(0,0,1,1);return n=f&&f.data&&f.data[3]===255}}),gx=Ft((Q,$)=>{var c=ra(),g=YU(),P=N1(),S=Xo(),t=bn(),e=t.isArrayOrTypedArray,r=js(),a=Rc(),n=Av().formatColor,o=Ac(),i=yg(),s=nT(),f=H1(),x=co().DESELECTDIM,y={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=Dp().appendArrayPointValue;function T(H,F){var U,W={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},q=H._context.plotGlPixelRatio;if(F.visible!==!0)return W;if(o.hasText(F)&&(W.text=u(H,F),W.textSel=M(H,F,F.selected),W.textUnsel=M(H,F,F.unselected)),o.hasMarkers(F)&&(W.marker=_(H,F),W.markerSel=C(H,F,F.selected),W.markerUnsel=C(H,F,F.unselected),!F.unselected&&e(F.marker.opacity))){var X=F.marker.opacity;for(W.markerUnsel.opacity=new Array(X.length),U=0;U500?"bold":"normal":H}function _(H,F){var U=F._length,W=F.marker,q={},X,lt=e(W.symbol),yt=e(W.angle),pt=e(W.color),st=e(W.line.color),tt=e(W.opacity),dt=e(W.size),rt=e(W.line.width),at;if(lt||(at=s.isOpenSymbol(W.symbol)),lt||pt||st||tt||yt){q.symbols=new Array(U),q.angles=new Array(U),q.colors=new Array(U),q.borderColors=new Array(U);var vt=W.symbol,it=W.angle,Y=n(W,W.opacity,U),ft=n(W.line,W.opacity,U);if(!e(ft[0])){var ut=ft;for(ft=Array(U),X=0;Xf.TOO_MANY_POINTS||o.hasMarkers(F)?"rect":"round";if(st&&F.connectgaps){var dt=X[0],rt=X[1];for(lt=0;lt1?pt[lt]:pt[0]:pt,at=e(st)?st.length>1?st[lt]:st[0]:st,vt=y[rt],it=y[at],Y=tt?tt/.8+1:0,ft=-it*Y-it*.5;X.offset[lt]=[vt*Y/dt,ft/dt]}}return X}$.exports={style:T,markerStyle:_,markerSelection:C,linePositions:O,errorBarPositions:N,textPosition:V}}),TS=Ft((Q,$)=>{var c=bn();$.exports=function(g,P){var S=P._scene,t={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},e={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return P._scene||(S=P._scene={},S.init=function(){c.extendFlat(S,e,t)},S.init(),S.update=function(r){var a=c.repeat(r,S.count);if(S.fill2d&&S.fill2d.update(a),S.scatter2d&&S.scatter2d.update(a),S.line2d&&S.line2d.update(a),S.error2d&&S.error2d.update(a.concat(a)),S.select2d&&S.select2d.update(a),S.glText)for(var n=0;n{var c=iT(),g=bn(),P=Rc(),S=Y0().findExtremes,t=D0(),e=me(),r=e.calcMarkerSize,a=e.calcAxisExpansion,n=e.setFirstScatter,o=F0(),i=gx(),s=TS(),f=Da().BADNUM,x=H1().TOO_MANY_POINTS;$.exports=function(T,u){var b=T._fullLayout,_=u._xA=P.getFromId(T,u.xaxis,"x"),C=u._yA=P.getFromId(T,u.yaxis,"y"),M=b._plots[u.xaxis+u.yaxis],E=u._length,A=E>=x,h=E*2,p={},k,w=_.makeCalcdata(u,"x"),R=C.makeCalcdata(u,"y"),O=t(u,_,"x",w),N=t(u,C,"y",R),V=O.vals,H=N.vals;u._x=V,u._y=H,u.xperiodalignment&&(u._origX=w,u._xStarts=O.starts,u._xEnds=O.ends),u.yperiodalignment&&(u._origY=R,u._yStarts=N.starts,u._yEnds=N.ends);var F=new Array(h),U=new Array(E);for(k=0;k1&&g.extendFlat(E.line,i.linePositions(T,b,_)),E.errorX||E.errorY){var A=i.errorBarPositions(T,b,_,C,M);E.errorX&&g.extendFlat(E.errorX,A.x),E.errorY&&g.extendFlat(E.errorY,A.y)}return E.text&&(g.extendFlat(E.text,{positions:_},i.textPosition(T,b,E.text,E.marker)),g.extendFlat(E.textSel,{positions:_},i.textPosition(T,b,E.text,E.markerSel)),g.extendFlat(E.textUnsel,{positions:_},i.textPosition(T,b,E.text,E.markerUnsel))),E}}),AS=Ft((Q,$)=>{var c=bn(),g=li(),P=co().DESELECTDIM;function S(t){var e=t[0],r=e.trace,a=e.t,n=a._scene,o=a.index,i=n.selectBatch[o],s=n.unselectBatch[o],f=n.textOptions[o],x=n.textSelectedOptions[o]||{},y=n.textUnselectedOptions[o]||{},v=c.extendFlat({},f),T,u;if(i.length||s.length){var b=x.color,_=y.color,C=f.color,M=c.isArrayOrTypedArray(C);for(v.color=new Array(r._length),T=0;T{var c=Ac(),g=AS().styleTextSelection;$.exports=function(P,S){var t=P.cd,e=P.xaxis,r=P.yaxis,a=[],n=t[0].trace,o=t[0].t,i=n._length,s=o.x,f=o.y,x=o._scene,y=o.index;if(!x)return a;var v=c.hasText(n),T=c.hasMarkers(n),u=!T&&!v;if(n.visible!==!0||u)return a;var b=[],_=[];if(S!==!1&&!S.degenerate)for(var C=0;C{var c=rT();$.exports={moduleType:"trace",name:"scattergl",basePlotModule:Mf(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:x3(),supplyDefaults:FU(),crossTraceDefaults:Pw(),colorbar:xo(),formatLabels:RU(),calc:KU(),hoverPoints:c.hoverPoints,selectPoints:MS(),meta:{}}}),JU=Ft((Q,$)=>{var c=m3();$.exports=g,$.exports.to=g,$.exports.from=P;function g(S,t){t==null&&(t=!0);var e=S[0],r=S[1],a=S[2],n=S[3];n==null&&(n=t?1:255),t&&(e*=255,r*=255,a*=255,n*=255),e=c(e,0,255)&255,r=c(r,0,255)&255,a=c(a,0,255)&255,n=c(n,0,255)&255;var o=e*16777216+(r<<16)+(a<<8)+n;return o}function P(S,t){S=+S;var e=S>>>24,r=(S&16711680)>>>16,a=(S&65280)>>>8,n=S&255;return t===!1?[e,r,a,n]:[e/255,r/255,a/255,n/255]}}),Ed=Ft((Q,$)=>{var c=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;function S(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function t(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var r={},a=0;a<10;a++)r["_"+String.fromCharCode(a)]=a;var n=Object.getOwnPropertyNames(r).map(function(i){return r[i]});if(n.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(i){o[i]=i}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}$.exports=t()?Object.assign:function(e,r){for(var a,n=S(e),o,i=1;i{$.exports=function(c){typeof c=="string"&&(c=[c]);for(var g=[].slice.call(arguments,1),P=[],S=0;S{$.exports=function(c,g,P){Array.isArray(P)||(P=[].slice.call(arguments,2));for(var S=0,t=P.length;S{$.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))}),aT=Ft((Q,$)=>{$.exports=P,$.exports.float32=$.exports.float=P,$.exports.fract32=$.exports.fract=g;var c=new Float32Array(1);function g(S,t){if(S.length){if(S instanceof Float32Array)return new Float32Array(S.length);t instanceof Float32Array||(t=P(S));for(var e=0,r=t.length;e{function c(k,w){var R=k==null?null:typeof Symbol<"u"&&k[Symbol.iterator]||k["@@iterator"];if(R!=null){var O,N,V,H,F=[],U=!0,W=!1;try{if(V=(R=R.call(k)).next,w!==0)for(;!(U=(O=V.call(R)).done)&&(F.push(O.value),F.length!==w);U=!0);}catch(q){W=!0,N=q}finally{try{if(!U&&R.return!=null&&(H=R.return(),Object(H)!==H))return}finally{if(W)throw N}}return F}}function g(k,w){return t(k)||c(k,w)||r(k,w)||o()}function P(k){return S(k)||e(k)||r(k)||n()}function S(k){if(Array.isArray(k))return a(k)}function t(k){if(Array.isArray(k))return k}function e(k){if(typeof Symbol<"u"&&k[Symbol.iterator]!=null||k["@@iterator"]!=null)return Array.from(k)}function r(k,w){if(k){if(typeof k=="string")return a(k,w);var R=Object.prototype.toString.call(k).slice(8,-1);if(R==="Object"&&k.constructor&&(R=k.constructor.name),R==="Map"||R==="Set")return Array.from(k);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return a(k,w)}}function a(k,w){(w==null||w>k.length)&&(w=k.length);for(var R=0,O=new Array(w);R 1.0 + delta) { + discard; + } + + alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius); + + float borderRadius = fragBorderRadius; + float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius); + vec4 color = mix(fragColor, fragBorderColor, ratio); + color.a *= alpha * opacity; + gl_FragColor = color; +} +`]),pt.vert=v([`precision highp float; +#define GLSLIFY 1 + +attribute float x, y, xFract, yFract; +attribute float size, borderSize; +attribute vec4 colorId, borderColorId; +attribute float isActive; + +// \`invariant\` effectively turns off optimizations for the position. +// We need this because -fast-math on M1 Macs is re-ordering +// floating point operations in a way that causes floating point +// precision limits to put points in the wrong locations. +invariant gl_Position; + +uniform bool constPointSize; +uniform float pixelRatio; +uniform vec2 paletteSize, scale, scaleFract, translate, translateFract; +uniform sampler2D paletteTexture; + +const float maxSize = 100.; + +varying vec4 fragColor, fragBorderColor; +varying float fragBorderRadius, fragWidth; + +float pointSizeScale = (constPointSize) ? 2. : pixelRatio; + +bool isDirect = (paletteSize.x < 1.); + +vec4 getColor(vec4 id) { + return isDirect ? id / 255. : texture2D(paletteTexture, + vec2( + (id.x + .5) / paletteSize.x, + (id.y + .5) / paletteSize.y + ) + ); +} + +void main() { + // ignore inactive points + if (isActive == 0.) return; + + vec2 position = vec2(x, y); + vec2 positionFract = vec2(xFract, yFract); + + vec4 color = getColor(colorId); + vec4 borderColor = getColor(borderColorId); + + float size = size * maxSize / 255.; + float borderSize = borderSize * maxSize / 255.; + + gl_PointSize = (size + borderSize) * pointSizeScale; + + vec2 pos = (position + translate) * scale + + (positionFract + translateFract) * scale + + (position + translate) * scaleFract + + (positionFract + translateFract) * scaleFract; + + gl_Position = vec4(pos * 2. - 1., 0., 1.); + + fragBorderRadius = 1. - 2. * borderSize / (size + borderSize); + fragColor = color; + fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; + fragWidth = 1. / gl_PointSize; +} +`]),_&&(pt.frag=pt.frag.replace("smoothstep","smoothStep"),yt.frag=yt.frag.replace("smoothstep","smoothStep")),this.drawCircle=k(pt)}A.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},A.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},A.prototype.draw=function(){for(var k=this,w=arguments.length,R=new Array(w),O=0;OTt)?de.tree=x(he,{bounds:oe}):Tt&&Tt.length&&(de.tree=Tt),de.tree){var Te={primitive:"points",usage:"static",data:de.tree,type:"uint32"};de.elements?de.elements(Te):de.elements=H.elements(Te)}var He=C.float32(he);Lt({data:He,usage:"dynamic"});var Ge=C.fract32(he,He);return Mt({data:Ge,usage:"dynamic"}),te({data:new Uint8Array(ve),type:"uint8",usage:"stream"}),he}},{marker:function(he,de,se){var Tt=de.activation;if(Tt.forEach(function(Ge){return Ge&&Ge.destroy&&Ge.destroy()}),Tt.length=0,!he||typeof he[0]=="number"){var Lt=k.addMarker(he);Tt[Lt]=!0}else{for(var Mt=[],te=0,ve=Math.min(he.length,de.count);te=0)return N;var V;if(k instanceof Uint8Array||k instanceof Uint8ClampedArray)V=k;else{V=new Uint8Array(k.length);for(var H=0,F=k.length;HO*4&&(this.tooManyColors=!0),this.updatePalette(R),N.length===1?N[0]:N},A.prototype.updatePalette=function(k){if(!this.tooManyColors){var w=this.maxColors,R=this.paletteTexture,O=Math.ceil(k.length*.25/w);if(O>1){k=k.slice();for(var N=k.length*.25%w;N{$.exports=c,$.exports.default=c;function c(H,F,U){U=U||2;var W=F&&F.length,q=W?F[0]*U:H.length,X=g(H,0,q,U,!0),lt=[];if(!X||X.next===X.prev)return lt;var yt,pt,st,tt,dt,rt,at;if(W&&(X=n(H,F,X,U)),H.length>80*U){yt=st=H[0],pt=tt=H[1];for(var vt=U;vtst&&(st=dt),rt>tt&&(tt=rt);at=Math.max(st-yt,tt-pt),at=at!==0?32767/at:0}return S(X,lt,U,yt,pt,at,0),lt}function g(H,F,U,W,q){var X,lt;if(q===V(H,F,U,W)>0)for(X=F;X=F;X-=W)lt=R(X,H[X],H[X+1],lt);return lt&&C(lt,lt.next)&&(O(lt),lt=lt.next),lt}function P(H,F){if(!H)return H;F||(F=H);var U=H,W;do if(W=!1,!U.steiner&&(C(U,U.next)||_(U.prev,U,U.next)===0)){if(O(U),U=F=U.prev,U===U.next)break;W=!0}else U=U.next;while(W||U!==F);return F}function S(H,F,U,W,q,X,lt){if(H){!lt&&X&&x(H,W,q,X);for(var yt=H,pt,st;H.prev!==H.next;){if(pt=H.prev,st=H.next,X?e(H,W,q,X):t(H)){F.push(pt.i/U|0),F.push(H.i/U|0),F.push(st.i/U|0),O(H),H=st.next,yt=st.next;continue}if(H=st,H===yt){lt?lt===1?(H=r(P(H),F,U),S(H,F,U,W,q,X,2)):lt===2&&a(H,F,U,W,q,X):S(P(H),F,U,W,q,X,1);break}}}}function t(H){var F=H.prev,U=H,W=H.next;if(_(F,U,W)>=0)return!1;for(var q=F.x,X=U.x,lt=W.x,yt=F.y,pt=U.y,st=W.y,tt=qX?q>lt?q:lt:X>lt?X:lt,at=yt>pt?yt>st?yt:st:pt>st?pt:st,vt=W.next;vt!==F;){if(vt.x>=tt&&vt.x<=rt&&vt.y>=dt&&vt.y<=at&&u(q,yt,X,pt,lt,st,vt.x,vt.y)&&_(vt.prev,vt,vt.next)>=0)return!1;vt=vt.next}return!0}function e(H,F,U,W){var q=H.prev,X=H,lt=H.next;if(_(q,X,lt)>=0)return!1;for(var yt=q.x,pt=X.x,st=lt.x,tt=q.y,dt=X.y,rt=lt.y,at=ytpt?yt>st?yt:st:pt>st?pt:st,Y=tt>dt?tt>rt?tt:rt:dt>rt?dt:rt,ft=v(at,vt,F,U,W),ut=v(it,Y,F,U,W),wt=H.prevZ,zt=H.nextZ;wt&&wt.z>=ft&&zt&&zt.z<=ut;){if(wt.x>=at&&wt.x<=it&&wt.y>=vt&&wt.y<=Y&&wt!==q&&wt!==lt&&u(yt,tt,pt,dt,st,rt,wt.x,wt.y)&&_(wt.prev,wt,wt.next)>=0||(wt=wt.prevZ,zt.x>=at&&zt.x<=it&&zt.y>=vt&&zt.y<=Y&&zt!==q&&zt!==lt&&u(yt,tt,pt,dt,st,rt,zt.x,zt.y)&&_(zt.prev,zt,zt.next)>=0))return!1;zt=zt.nextZ}for(;wt&&wt.z>=ft;){if(wt.x>=at&&wt.x<=it&&wt.y>=vt&&wt.y<=Y&&wt!==q&&wt!==lt&&u(yt,tt,pt,dt,st,rt,wt.x,wt.y)&&_(wt.prev,wt,wt.next)>=0)return!1;wt=wt.prevZ}for(;zt&&zt.z<=ut;){if(zt.x>=at&&zt.x<=it&&zt.y>=vt&&zt.y<=Y&&zt!==q&&zt!==lt&&u(yt,tt,pt,dt,st,rt,zt.x,zt.y)&&_(zt.prev,zt,zt.next)>=0)return!1;zt=zt.nextZ}return!0}function r(H,F,U){var W=H;do{var q=W.prev,X=W.next.next;!C(q,X)&&M(q,W,W.next,X)&&p(q,X)&&p(X,q)&&(F.push(q.i/U|0),F.push(W.i/U|0),F.push(X.i/U|0),O(W),O(W.next),W=H=X),W=W.next}while(W!==H);return P(W)}function a(H,F,U,W,q,X){var lt=H;do{for(var yt=lt.next.next;yt!==lt.prev;){if(lt.i!==yt.i&&b(lt,yt)){var pt=w(lt,yt);lt=P(lt,lt.next),pt=P(pt,pt.next),S(lt,F,U,W,q,X,0),S(pt,F,U,W,q,X,0);return}yt=yt.next}lt=lt.next}while(lt!==H)}function n(H,F,U,W){var q=[],X,lt,yt,pt,st;for(X=0,lt=F.length;X=U.next.y&&U.next.y!==U.y){var yt=U.x+(q-U.y)*(U.next.x-U.x)/(U.next.y-U.y);if(yt<=W&&yt>X&&(X=yt,lt=U.x=U.x&&U.x>=st&&W!==U.x&&u(qlt.x||U.x===lt.x&&f(lt,U)))&&(lt=U,dt=rt)),U=U.next;while(U!==pt);return lt}function f(H,F){return _(H.prev,H,F.prev)<0&&_(F.next,H,H.next)<0}function x(H,F,U,W){var q=H;do q.z===0&&(q.z=v(q.x,q.y,F,U,W)),q.prevZ=q.prev,q.nextZ=q.next,q=q.next;while(q!==H);q.prevZ.nextZ=null,q.prevZ=null,y(q)}function y(H){var F,U,W,q,X,lt,yt,pt,st=1;do{for(U=H,H=null,X=null,lt=0;U;){for(lt++,W=U,yt=0,F=0;F0||pt>0&&W;)yt!==0&&(pt===0||!W||U.z<=W.z)?(q=U,U=U.nextZ,yt--):(q=W,W=W.nextZ,pt--),X?X.nextZ=q:H=q,q.prevZ=X,X=q;U=W}X.nextZ=null,st*=2}while(lt>1);return H}function v(H,F,U,W,q){return H=(H-U)*q|0,F=(F-W)*q|0,H=(H|H<<8)&16711935,H=(H|H<<4)&252645135,H=(H|H<<2)&858993459,H=(H|H<<1)&1431655765,F=(F|F<<8)&16711935,F=(F|F<<4)&252645135,F=(F|F<<2)&858993459,F=(F|F<<1)&1431655765,H|F<<1}function T(H){var F=H,U=H;do(F.x=(H-lt)*(X-yt)&&(H-lt)*(W-yt)>=(U-lt)*(F-yt)&&(U-lt)*(X-yt)>=(q-lt)*(W-yt)}function b(H,F){return H.next.i!==F.i&&H.prev.i!==F.i&&!h(H,F)&&(p(H,F)&&p(F,H)&&k(H,F)&&(_(H.prev,H,F.prev)||_(H,F.prev,F))||C(H,F)&&_(H.prev,H,H.next)>0&&_(F.prev,F,F.next)>0)}function _(H,F,U){return(F.y-H.y)*(U.x-F.x)-(F.x-H.x)*(U.y-F.y)}function C(H,F){return H.x===F.x&&H.y===F.y}function M(H,F,U,W){var q=A(_(H,F,U)),X=A(_(H,F,W)),lt=A(_(U,W,H)),yt=A(_(U,W,F));return!!(q!==X&<!==yt||q===0&&E(H,U,F)||X===0&&E(H,W,F)||lt===0&&E(U,H,W)||yt===0&&E(U,F,W))}function E(H,F,U){return F.x<=Math.max(H.x,U.x)&&F.x>=Math.min(H.x,U.x)&&F.y<=Math.max(H.y,U.y)&&F.y>=Math.min(H.y,U.y)}function A(H){return H>0?1:H<0?-1:0}function h(H,F){var U=H;do{if(U.i!==H.i&&U.next.i!==H.i&&U.i!==F.i&&U.next.i!==F.i&&M(U,U.next,H,F))return!0;U=U.next}while(U!==H);return!1}function p(H,F){return _(H.prev,H,H.next)<0?_(H,F,H.next)>=0&&_(H,H.prev,F)>=0:_(H,F,H.prev)<0||_(H,H.next,F)<0}function k(H,F){var U=H,W=!1,q=(H.x+F.x)/2,X=(H.y+F.y)/2;do U.y>X!=U.next.y>X&&U.next.y!==U.y&&q<(U.next.x-U.x)*(X-U.y)/(U.next.y-U.y)+U.x&&(W=!W),U=U.next;while(U!==H);return W}function w(H,F){var U=new N(H.i,H.x,H.y),W=new N(F.i,F.x,F.y),q=H.next,X=F.prev;return H.next=F,F.prev=H,U.next=q,q.prev=U,W.next=U,U.prev=W,X.next=W,W.prev=X,W}function R(H,F,U,W){var q=new N(H,F,U);return W?(q.next=W.next,q.prev=W,W.next.prev=q,W.next=q):(q.prev=q,q.next=q),q}function O(H){H.next.prev=H.prev,H.prev.next=H.next,H.prevZ&&(H.prevZ.nextZ=H.nextZ),H.nextZ&&(H.nextZ.prevZ=H.prevZ)}function N(H,F,U){this.i=H,this.x=F,this.y=U,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}c.deviation=function(H,F,U,W){var q=F&&F.length,X=q?F[0]*U:H.length,lt=Math.abs(V(H,0,X,U));if(q)for(var yt=0,pt=F.length;yt0&&(W+=H[q-1].length,U.holes.push(W))}return U}}),rV=Ft((Q,$)=>{var c=px();$.exports=g;function g(P,S,t){if(!P||P.length==null)throw Error("Argument should be an array");S==null&&(S=1),t==null&&(t=c(P,S));for(var e=0;e{$.exports=function(){var c,g;if(typeof WeakMap!="function")return!1;try{c=new WeakMap([[g={},"one"],[{},"two"],[{},"three"]])}catch{return!1}return!(String(c)!=="[object WeakMap]"||typeof c.set!="function"||c.set({},1)!==c||typeof c.delete!="function"||typeof c.has!="function"||c.get(g)!=="one")}}),iV=Ft((Q,$)=>{$.exports=function(){}}),W1=Ft((Q,$)=>{var c=iV()();$.exports=function(g){return g!==c&&g!==null}}),CS=Ft((Q,$)=>{var c=Object.create,g=Object.getPrototypeOf,P={};$.exports=function(){var S=Object.setPrototypeOf,t=arguments[0]||c;return typeof S!="function"?!1:g(S(t(null),P))===P}}),LS=Ft((Q,$)=>{var c=W1(),g={function:!0,object:!0};$.exports=function(P){return c(P)&&g[typeof P]||!1}}),Mv=Ft((Q,$)=>{var c=W1();$.exports=function(g){if(!c(g))throw new TypeError("Cannot use null or undefined");return g}}),aV=Ft((Q,$)=>{var c=Object.create,g;CS()()||(g=PS()),$.exports=function(){var P,S,t;return!g||g.level!==1?c:(P={},S={},t={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(e){if(e==="__proto__"){S[e]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}S[e]=t}),Object.defineProperties(P,S),Object.defineProperty(g,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:P}),function(e,r){return c(e===null?P:e,r)})}()}),PS=Ft((Q,$)=>{var c=LS(),g=Mv(),P=Object.prototype.isPrototypeOf,S=Object.defineProperty,t={configurable:!0,enumerable:!1,writable:!0,value:void 0},e;e=function(r,a){if(g(r),a===null||c(a))return r;throw new TypeError("Prototype must be null or an object")},$.exports=function(r){var a,n;return r?(r.level===2?r.set?(n=r.set,a=function(o,i){return n.call(e(o,i),i),o}):a=function(o,i){return e(o,i).__proto__=i,o}:a=function o(i,s){var f;return e(i,s),f=P.call(o.nullPolyfill,i),f&&delete o.nullPolyfill.__proto__,s===null&&(s=o.nullPolyfill),i.__proto__=s,f&&S(o.nullPolyfill,"__proto__",t),i},Object.defineProperty(a,"level",{configurable:!1,enumerable:!1,writable:!1,value:r.level})):null}(function(){var r=Object.create(null),a={},n,o=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(o){try{n=o.set,n.call(r,a)}catch{}if(Object.getPrototypeOf(r)===a)return{set:n,level:2}}return r.__proto__=a,Object.getPrototypeOf(r)===a?{level:2}:(r={},r.__proto__=a,Object.getPrototypeOf(r)===a?{level:1}:!1)}()),aV()}),oT=Ft((Q,$)=>{$.exports=CS()()?Object.setPrototypeOf:PS()}),oV=Ft((Q,$)=>{var c=LS();$.exports=function(g){if(!c(g))throw new TypeError(g+" is not an Object");return g}}),sV=Ft((Q,$)=>{var c=Object.create(null),g=Math.random;$.exports=function(){var P;do P=g().toString(36).slice(2);while(c[P]);return P}}),vx=Ft((Q,$)=>{var c=void 0;$.exports=function(g){return g!==c&&g!==null}}),sT=Ft((Q,$)=>{var c=vx(),g={object:!0,function:!0,undefined:!0};$.exports=function(P){return c(P)?hasOwnProperty.call(g,typeof P):!1}}),lV=Ft((Q,$)=>{var c=sT();$.exports=function(g){if(!c(g))return!1;try{return g.constructor?g.constructor.prototype===g:!1}catch{return!1}}}),uV=Ft((Q,$)=>{var c=lV();$.exports=function(g){if(typeof g!="function"||!hasOwnProperty.call(g,"length"))return!1;try{if(typeof g.length!="number"||typeof g.call!="function"||typeof g.apply!="function")return!1}catch{return!1}return!c(g)}}),zS=Ft((Q,$)=>{var c=uV(),g=/^\s*class[\s{/}]/,P=Function.prototype.toString;$.exports=function(S){return!(!c(S)||g.test(P.call(S)))}}),cV=Ft((Q,$)=>{$.exports=function(){var c=Object.assign,g;return typeof c!="function"?!1:(g={foo:"raz"},c(g,{bar:"dwa"},{trzy:"trzy"}),g.foo+g.bar+g.trzy==="razdwatrzy")}}),hV=Ft((Q,$)=>{$.exports=function(){try{return Object.keys("primitive"),!0}catch{return!1}}}),fV=Ft((Q,$)=>{var c=W1(),g=Object.keys;$.exports=function(P){return g(c(P)?Object(P):P)}}),dV=Ft((Q,$)=>{$.exports=hV()()?Object.keys:fV()}),pV=Ft((Q,$)=>{var c=dV(),g=Mv(),P=Math.max;$.exports=function(S,t){var e,r,a=P(arguments.length,2),n;for(S=Object(g(S)),n=function(o){try{S[o]=t[o]}catch(i){e||(e=i)}},r=1;r{$.exports=cV()()?Object.assign:pV()}),IS=Ft((Q,$)=>{var c=W1(),g=Array.prototype.forEach,P=Object.create,S=function(t,e){var r;for(r in t)e[r]=t[r]};$.exports=function(t){var e=P(null);return g.call(arguments,function(r){c(r)&&S(Object(r),e)}),e}}),mV=Ft((Q,$)=>{var c="razdwatrzy";$.exports=function(){return typeof c.contains!="function"?!1:c.contains("dwa")===!0&&c.contains("foo")===!1}}),gV=Ft((Q,$)=>{var c=String.prototype.indexOf;$.exports=function(g){return c.call(this,g,arguments[1])>-1}}),OS=Ft((Q,$)=>{$.exports=mV()()?String.prototype.contains:gV()}),Sv=Ft((Q,$)=>{var c=vx(),g=zS(),P=lT(),S=IS(),t=OS(),e=$.exports=function(r,a){var n,o,i,s,f;return arguments.length<2||typeof r!="string"?(s=a,a=r,r=null):s=arguments[2],c(r)?(n=t.call(r,"c"),o=t.call(r,"e"),i=t.call(r,"w")):(n=i=!0,o=!1),f={value:a,configurable:n,enumerable:o,writable:i},s?P(S(s),f):f};e.gs=function(r,a,n){var o,i,s,f;return typeof r!="string"?(s=n,n=a,a=r,r=null):s=arguments[3],c(a)?g(a)?c(n)?g(n)||(s=n,n=void 0):n=void 0:(s=a,a=n=void 0):a=void 0,c(r)?(o=t.call(r,"c"),i=t.call(r,"e")):(o=!0,i=!1),f={get:a,set:n,configurable:o,enumerable:i},s?P(S(s),f):f}}),_3=Ft((Q,$)=>{var c=Object.prototype.toString,g=c.call(function(){return arguments}());$.exports=function(P){return c.call(P)===g}}),b3=Ft((Q,$)=>{var c=Object.prototype.toString,g=c.call("");$.exports=function(P){return typeof P=="string"||P&&typeof P=="object"&&(P instanceof String||c.call(P)===g)||!1}}),vV=Ft((Q,$)=>{$.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}),yV=Ft((Q,$)=>{var c=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};$.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return c()}try{return __global__||c()}finally{delete Object.prototype.__global__}}()}),w3=Ft((Q,$)=>{$.exports=vV()()?globalThis:yV()}),xV=Ft((Q,$)=>{var c=w3(),g={object:!0,symbol:!0};$.exports=function(){var P=c.Symbol,S;if(typeof P!="function")return!1;S=P("test symbol");try{String(S)}catch{return!1}return!(!g[typeof P.iterator]||!g[typeof P.toPrimitive]||!g[typeof P.toStringTag])}}),_V=Ft((Q,$)=>{$.exports=function(c){return c?typeof c=="symbol"?!0:!c.constructor||c.constructor.name!=="Symbol"?!1:c[c.constructor.toStringTag]==="Symbol":!1}}),DS=Ft((Q,$)=>{var c=_V();$.exports=function(g){if(!c(g))throw new TypeError(g+" is not a symbol");return g}}),bV=Ft((Q,$)=>{var c=Sv(),g=Object.create,P=Object.defineProperty,S=Object.prototype,t=g(null);$.exports=function(e){for(var r=0,a,n;t[e+(r||"")];)++r;return e+=r||"",t[e]=!0,a="@@"+e,P(S,a,c.gs(null,function(o){n||(n=!0,P(this,a,c(o)),n=!1)})),a}}),wV=Ft((Q,$)=>{var c=Sv(),g=w3().Symbol;$.exports=function(P){return Object.defineProperties(P,{hasInstance:c("",g&&g.hasInstance||P("hasInstance")),isConcatSpreadable:c("",g&&g.isConcatSpreadable||P("isConcatSpreadable")),iterator:c("",g&&g.iterator||P("iterator")),match:c("",g&&g.match||P("match")),replace:c("",g&&g.replace||P("replace")),search:c("",g&&g.search||P("search")),species:c("",g&&g.species||P("species")),split:c("",g&&g.split||P("split")),toPrimitive:c("",g&&g.toPrimitive||P("toPrimitive")),toStringTag:c("",g&&g.toStringTag||P("toStringTag")),unscopables:c("",g&&g.unscopables||P("unscopables"))})}}),kV=Ft((Q,$)=>{var c=Sv(),g=DS(),P=Object.create(null);$.exports=function(S){return Object.defineProperties(S,{for:c(function(t){return P[t]?P[t]:P[t]=S(String(t))}),keyFor:c(function(t){var e;g(t);for(e in P)if(P[e]===t)return e})})}}),TV=Ft((Q,$)=>{var c=Sv(),g=DS(),P=w3().Symbol,S=bV(),t=wV(),e=kV(),r=Object.create,a=Object.defineProperties,n=Object.defineProperty,o,i,s;if(typeof P=="function")try{String(P()),s=!0}catch{}else P=null;i=function(f){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return o(f)},$.exports=o=function f(x){var y;if(this instanceof f)throw new TypeError("Symbol is not a constructor");return s?P(x):(y=r(i.prototype),x=x===void 0?"":String(x),a(y,{__description__:c("",x),__name__:c("",S(x))}))},t(o),e(o),a(i.prototype,{constructor:c(o),toString:c("",function(){return this.__name__})}),a(o.prototype,{toString:c(function(){return"Symbol ("+g(this).__description__+")"}),valueOf:c(function(){return g(this)})}),n(o.prototype,o.toPrimitive,c("",function(){var f=g(this);return typeof f=="symbol"?f:f.toString()})),n(o.prototype,o.toStringTag,c("c","Symbol")),n(i.prototype,o.toStringTag,c("c",o.prototype[o.toStringTag])),n(i.prototype,o.toPrimitive,c("c",o.prototype[o.toPrimitive]))}),q1=Ft((Q,$)=>{$.exports=xV()()?w3().Symbol:TV()}),AV=Ft((Q,$)=>{var c=Mv();$.exports=function(){return c(this).length=0,this}}),pb=Ft((Q,$)=>{$.exports=function(c){if(typeof c!="function")throw new TypeError(c+" is not a function");return c}}),MV=Ft((Q,$)=>{var c=vx(),g=sT(),P=Object.prototype.toString;$.exports=function(S){if(!c(S))return null;if(g(S)){var t=S.toString;if(typeof t!="function"||t===P)return null}try{return""+S}catch{return null}}}),SV=Ft((Q,$)=>{$.exports=function(c){try{return c.toString()}catch{try{return String(c)}catch{return null}}}}),EV=Ft((Q,$)=>{var c=SV(),g=/[\n\r\u2028\u2029]/g;$.exports=function(P){var S=c(P);return S===null?"":(S.length>100&&(S=S.slice(0,99)+"…"),S=S.replace(g,function(t){switch(t){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),S)}}),FS=Ft((Q,$)=>{var c=vx(),g=sT(),P=MV(),S=EV(),t=function(e,r){return e.replace("%v",S(r))};$.exports=function(e,r,a){if(!g(a))throw new TypeError(t(r,e));if(!c(e)){if("default"in a)return a.default;if(a.isOptional)return null}var n=P(a.errorMessage);throw c(n)||(n=r),new TypeError(t(n,e))}}),CV=Ft((Q,$)=>{var c=FS(),g=vx();$.exports=function(P){return g(P)?P:c(P,"Cannot use %v",arguments[1])}}),LV=Ft((Q,$)=>{var c=FS(),g=zS();$.exports=function(P){return g(P)?P:c(P,"%v is not a plain function",arguments[1])}}),PV=Ft((Q,$)=>{$.exports=function(){var c=Array.from,g,P;return typeof c!="function"?!1:(g=["raz","dwa"],P=c(g),!!(P&&P!==g&&P[1]==="dwa"))}}),zV=Ft((Q,$)=>{var c=Object.prototype.toString,g=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);$.exports=function(P){return typeof P=="function"&&g(c.call(P))}}),IV=Ft((Q,$)=>{$.exports=function(){var c=Math.sign;return typeof c!="function"?!1:c(10)===1&&c(-20)===-1}}),OV=Ft((Q,$)=>{$.exports=function(c){return c=Number(c),isNaN(c)||c===0?c:c>0?1:-1}}),DV=Ft((Q,$)=>{$.exports=IV()()?Math.sign:OV()}),FV=Ft((Q,$)=>{var c=DV(),g=Math.abs,P=Math.floor;$.exports=function(S){return isNaN(S)?0:(S=Number(S),S===0||!isFinite(S)?S:c(S)*P(g(S)))}}),RV=Ft((Q,$)=>{var c=FV(),g=Math.max;$.exports=function(P){return g(0,c(P))}}),BV=Ft((Q,$)=>{var c=q1().iterator,g=_3(),P=zV(),S=RV(),t=pb(),e=Mv(),r=W1(),a=b3(),n=Array.isArray,o=Function.prototype.call,i={configurable:!0,enumerable:!0,writable:!0,value:null},s=Object.defineProperty;$.exports=function(f){var x=arguments[1],y=arguments[2],v,T,u,b,_,C,M,E,A,h;if(f=Object(e(f)),r(x)&&t(x),!this||this===Array||!P(this)){if(!x){if(g(f))return _=f.length,_!==1?Array.apply(null,f):(b=new Array(1),b[0]=f[0],b);if(n(f)){for(b=new Array(_=f.length),T=0;T<_;++T)b[T]=f[T];return b}}b=[]}else v=this;if(!n(f)){if((A=f[c])!==void 0){for(M=t(A).call(f),v&&(b=new v),E=M.next(),T=0;!E.done;)h=x?o.call(x,y,E.value,T):E.value,v?(i.value=h,s(b,T,i)):b[T]=h,E=M.next(),++T;_=T}else if(a(f)){for(_=f.length,v&&(b=new v),T=0,u=0;T<_;++T)h=f[T],T+1<_&&(C=h.charCodeAt(0),C>=55296&&C<=56319&&(h+=f[++T])),h=x?o.call(x,y,h,u):h,v?(i.value=h,s(b,u,i)):b[u]=h,++u;_=u}}if(_===void 0)for(_=S(f.length),v&&(b=new v(_)),T=0;T<_;++T)h=x?o.call(x,y,f[T],T):f[T],v?(i.value=h,s(b,T,i)):b[T]=h;return v&&(i.value=null,b.length=_),b}}),NV=Ft((Q,$)=>{$.exports=PV()()?Array.from:BV()}),jV=Ft((Q,$)=>{var c=NV(),g=lT(),P=Mv();$.exports=function(S){var t=Object(P(S)),e=arguments[1],r=Object(arguments[2]);if(t!==S&&!e)return t;var a={};return e?c(e,function(n){(r.ensure||n in S)&&(a[n]=S[n])}):g(a,S),a}}),UV=Ft((Q,$)=>{var c=pb(),g=Mv(),P=Function.prototype.bind,S=Function.prototype.call,t=Object.keys,e=Object.prototype.propertyIsEnumerable;$.exports=function(r,a){return function(n,o){var i,s=arguments[2],f=arguments[3];return n=Object(g(n)),c(o),i=t(n),f&&i.sort(typeof f=="function"?P.call(f,n):void 0),typeof r!="function"&&(r=i[r]),S.call(r,i,function(x,y){return e.call(n,x)?S.call(o,s,n[x],x,n,y):a})}}}),VV=Ft((Q,$)=>{$.exports=UV()("forEach")}),HV=Ft((Q,$)=>{var c=pb(),g=VV(),P=Function.prototype.call;$.exports=function(S,t){var e={},r=arguments[2];return c(t),g(S,function(a,n,o,i){e[n]=P.call(t,r,a,n,o,i)}),e}}),WV=Ft((Q,$)=>{var c=vx(),g=CV(),P=LV(),S=jV(),t=IS(),e=HV(),r=Function.prototype.bind,a=Object.defineProperty,n=Object.prototype.hasOwnProperty,o;o=function(i,s,f){var x=g(s)&&P(s.value),y;return y=S(s),delete y.writable,delete y.value,y.get=function(){return!f.overwriteDefinition&&n.call(this,i)?x:(s.value=r.call(x,f.resolveContext?f.resolveContext(this):this),a(this,i,s),this[i])},y},$.exports=function(i){var s=t(arguments[1]);return c(s.resolveContext)&&P(s.resolveContext),e(i,function(f,x){return o(x,f,s)})}}),RS=Ft((Q,$)=>{var c=AV(),g=lT(),P=pb(),S=Mv(),t=Sv(),e=WV(),r=q1(),a=Object.defineProperty,n=Object.defineProperties,o;$.exports=o=function(i,s){if(!(this instanceof o))throw new TypeError("Constructor requires 'new'");n(this,{__list__:t("w",S(i)),__context__:t("w",s),__nextIndex__:t("w",0)}),s&&(P(s.on),s.on("_add",this._onAdd),s.on("_delete",this._onDelete),s.on("_clear",this._onClear))},delete o.prototype.constructor,n(o.prototype,g({_next:t(function(){var i;if(this.__list__){if(this.__redo__&&(i=this.__redo__.shift(),i!==void 0))return i;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){a(this,"__redo__",t("c",[i]));return}this.__redo__.forEach(function(s,f){s>=i&&(this.__redo__[f]=++s)},this),this.__redo__.push(i)}}),_onDelete:t(function(i){var s;i>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(s=this.__redo__.indexOf(i),s!==-1&&this.__redo__.splice(s,1),this.__redo__.forEach(function(f,x){f>i&&(this.__redo__[x]=--f)},this)))}),_onClear:t(function(){this.__redo__&&c.call(this.__redo__),this.__nextIndex__=0})}))),a(o.prototype,r.iterator,t(function(){return this}))}),qV=Ft((Q,$)=>{var c=oT(),g=OS(),P=Sv(),S=q1(),t=RS(),e=Object.defineProperty,r;r=$.exports=function(a,n){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");t.call(this,a),n?g.call(n,"key+value")?n="key+value":g.call(n,"key")?n="key":n="value":n="value",e(this,"__kind__",P("",n))},c&&c(r,t),delete r.prototype.constructor,r.prototype=Object.create(t.prototype,{_resolve:P(function(a){return this.__kind__==="value"?this.__list__[a]:this.__kind__==="key+value"?[a,this.__list__[a]]:a})}),e(r.prototype,S.toStringTag,P("c","Array Iterator"))}),ZV=Ft((Q,$)=>{var c=oT(),g=Sv(),P=q1(),S=RS(),t=Object.defineProperty,e;e=$.exports=function(r){if(!(this instanceof e))throw new TypeError("Constructor requires 'new'");r=String(r),S.call(this,r),t(this,"__length__",g("",r.length))},c&&c(e,S),delete e.prototype.constructor,e.prototype=Object.create(S.prototype,{_next:g(function(){if(this.__list__){if(this.__nextIndex__=55296&&n<=56319?a+this.__list__[this.__nextIndex__++]:a)})}),t(e.prototype,P.toStringTag,g("c","String Iterator"))}),$V=Ft((Q,$)=>{var c=_3(),g=W1(),P=b3(),S=q1().iterator,t=Array.isArray;$.exports=function(e){return g(e)?t(e)||P(e)||c(e)?!0:typeof e[S]=="function":!1}}),GV=Ft((Q,$)=>{var c=$V();$.exports=function(g){if(!c(g))throw new TypeError(g+" is not iterable");return g}}),BS=Ft((Q,$)=>{var c=_3(),g=b3(),P=qV(),S=ZV(),t=GV(),e=q1().iterator;$.exports=function(r){return typeof t(r)[e]=="function"?r[e]():c(r)?new P(r):g(r)?new S(r):new P(r)}}),YV=Ft((Q,$)=>{var c=_3(),g=pb(),P=b3(),S=BS(),t=Array.isArray,e=Function.prototype.call,r=Array.prototype.some;$.exports=function(a,n){var o,i=arguments[2],s,f,x,y,v,T,u;if(t(a)||c(a)?o="array":P(a)?o="string":a=S(a),g(n),f=function(){x=!0},o==="array"){r.call(a,function(b){return e.call(n,i,b,f),x});return}if(o==="string"){for(v=a.length,y=0;y=55296&&u<=56319&&(T+=a[++y])),e.call(n,i,T,f),!x);++y);return}for(s=a.next();!s.done;){if(e.call(n,i,s.value,f),x)return;s=a.next()}}}),KV=Ft((Q,$)=>{$.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}),XV=Ft((Q,$)=>{var c=W1(),g=oT(),P=oV(),S=Mv(),t=sV(),e=Sv(),r=BS(),a=YV(),n=q1().toStringTag,o=KV(),i=Array.isArray,s=Object.defineProperty,f=Object.prototype.hasOwnProperty,x=Object.getPrototypeOf,y;$.exports=y=function(){var v=arguments[0],T;if(!(this instanceof y))throw new TypeError("Constructor requires 'new'");return T=o&&g&&WeakMap!==y?g(new WeakMap,x(this)):this,c(v)&&(i(v)||(v=r(v))),s(T,"__weakMapData__",e("c","$weakMap$"+t())),v&&a(v,function(u){S(u),T.set(u[0],u[1])}),T},o&&(g&&g(y,WeakMap),y.prototype=Object.create(WeakMap.prototype,{constructor:e(y)})),Object.defineProperties(y.prototype,{delete:e(function(v){return f.call(P(v),this.__weakMapData__)?(delete v[this.__weakMapData__],!0):!1}),get:e(function(v){if(f.call(P(v),this.__weakMapData__))return v[this.__weakMapData__]}),has:e(function(v){return f.call(P(v),this.__weakMapData__)}),set:e(function(v,T){return s(P(v),this.__weakMapData__,e("c",T)),this}),toString:e(function(){return"[object WeakMap]"})}),s(y.prototype,n,e("c","WeakMap"))}),NS=Ft((Q,$)=>{$.exports=nV()()?WeakMap:XV()}),JV=Ft((Q,$)=>{$.exports=function(c,g,P){if(typeof Array.prototype.findIndex=="function")return c.findIndex(g,P);if(typeof g!="function")throw new TypeError("predicate must be a function");var S=Object(c),t=S.length;if(t===0)return-1;for(var e=0;e{var c=N1(),g=px(),P=Ed(),S=Cg(),t=mx(),e=eV(),r=rV(),{float32:a,fract32:n}=aT(),o=NS(),i=db(),s=JV(),f=` +precision highp float; + +attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract; +attribute vec4 color; +attribute float lineEnd, lineTop; + +uniform vec2 scale, scaleFract, translate, translateFract; +uniform float thickness, pixelRatio, id, depth; +uniform vec4 viewport; + +varying vec4 fragColor; +varying vec2 tangent; + +vec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) { + // the order is important + return position * scale + translate + + positionFract * scale + translateFract + + position * scaleFract + + positionFract * scaleFract; +} + +void main() { + float lineStart = 1. - lineEnd; + float lineOffset = lineTop * 2. - 1.; + + vec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract); + tangent = normalize(diff * scale * viewport.zw); + vec2 normal = vec2(-tangent.y, tangent.x); + + vec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart + + project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd + + + thickness * normal * .5 * lineOffset / viewport.zw; + + gl_Position = vec4(position * 2.0 - 1.0, depth, 1); + + fragColor = color / 255.; +} +`,x=` +precision highp float; + +uniform float dashLength, pixelRatio, thickness, opacity, id; +uniform sampler2D dashTexture; + +varying vec4 fragColor; +varying vec2 tangent; + +void main() { + float alpha = 1.; + + float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25; + float dash = texture2D(dashTexture, vec2(t, .5)).r; + + gl_FragColor = fragColor; + gl_FragColor.a *= alpha * opacity * dash; +} +`,y=` +precision highp float; + +attribute vec2 position, positionFract; + +uniform vec4 color; +uniform vec2 scale, scaleFract, translate, translateFract; +uniform float pixelRatio, id; +uniform vec4 viewport; +uniform float opacity; + +varying vec4 fragColor; + +const float MAX_LINES = 256.; + +void main() { + float depth = (MAX_LINES - 4. - id) / (MAX_LINES); + + vec2 position = position * scale + translate + + positionFract * scale + translateFract + + position * scaleFract + + positionFract * scaleFract; + + gl_Position = vec4(position * 2.0 - 1.0, depth, 1); + + fragColor = color / 255.; + fragColor.a *= opacity; +} +`,v=` +precision highp float; +varying vec4 fragColor; + +void main() { + gl_FragColor = fragColor; +} +`,T=` +precision highp float; + +attribute vec2 aCoord, bCoord, nextCoord, prevCoord; +attribute vec4 aColor, bColor; +attribute float lineEnd, lineTop; + +uniform vec2 scale, translate; +uniform float thickness, pixelRatio, id, depth; +uniform vec4 viewport; +uniform float miterLimit, miterMode; + +varying vec4 fragColor; +varying vec4 startCutoff, endCutoff; +varying vec2 tangent; +varying vec2 startCoord, endCoord; +varying float enableStartMiter, enableEndMiter; + +const float REVERSE_THRESHOLD = -.875; +const float MIN_DIFF = 1e-6; + +// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead +// TODO: precalculate dot products, normalize things beforehead etc. +// TODO: refactor to rectangular algorithm + +float distToLine(vec2 p, vec2 a, vec2 b) { + vec2 diff = b - a; + vec2 perp = normalize(vec2(-diff.y, diff.x)); + return dot(p - a, perp); +} + +bool isNaN( float val ){ + return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true; +} + +void main() { + vec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord; + + vec2 adjustedScale; + adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x; + adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y; + + vec2 scaleRatio = adjustedScale * viewport.zw; + vec2 normalWidth = thickness / scaleRatio; + + float lineStart = 1. - lineEnd; + float lineBot = 1. - lineTop; + + fragColor = (lineStart * aColor + lineEnd * bColor) / 255.; + + if (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return; + + if (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord); + if (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord); + + + vec2 prevDiff = aCoord - prevCoord; + vec2 currDiff = bCoord - aCoord; + vec2 nextDiff = nextCoord - bCoord; + + vec2 prevTangent = normalize(prevDiff * scaleRatio); + vec2 currTangent = normalize(currDiff * scaleRatio); + vec2 nextTangent = normalize(nextDiff * scaleRatio); + + vec2 prevNormal = vec2(-prevTangent.y, prevTangent.x); + vec2 currNormal = vec2(-currTangent.y, currTangent.x); + vec2 nextNormal = vec2(-nextTangent.y, nextTangent.x); + + vec2 startJoinDirection = normalize(prevTangent - currTangent); + vec2 endJoinDirection = normalize(currTangent - nextTangent); + + // collapsed/unidirectional segment cases + // FIXME: there should be more elegant solution + vec2 prevTanDiff = abs(prevTangent - currTangent); + vec2 nextTanDiff = abs(nextTangent - currTangent); + if (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) { + startJoinDirection = currNormal; + } + if (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) { + endJoinDirection = currNormal; + } + if (aCoord == bCoord) { + endJoinDirection = startJoinDirection; + currNormal = prevNormal; + currTangent = prevTangent; + } + + tangent = currTangent; + + //calculate join shifts relative to normals + float startJoinShift = dot(currNormal, startJoinDirection); + float endJoinShift = dot(currNormal, endJoinDirection); + + float startMiterRatio = abs(1. / startJoinShift); + float endMiterRatio = abs(1. / endJoinShift); + + vec2 startJoin = startJoinDirection * startMiterRatio; + vec2 endJoin = endJoinDirection * endMiterRatio; + + vec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin; + startTopJoin = sign(startJoinShift) * startJoin * .5; + startBotJoin = -startTopJoin; + + endTopJoin = sign(endJoinShift) * endJoin * .5; + endBotJoin = -endTopJoin; + + vec2 aTopCoord = aCoord + normalWidth * startTopJoin; + vec2 bTopCoord = bCoord + normalWidth * endTopJoin; + vec2 aBotCoord = aCoord + normalWidth * startBotJoin; + vec2 bBotCoord = bCoord + normalWidth * endBotJoin; + + //miter anti-clipping + float baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x))); + float abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x))); + + //prevent close to reverse direction switch + bool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) < length(normalWidth * currNormal); + bool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) < length(normalWidth * currNormal); + + if (prevReverse) { + //make join rectangular + vec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5; + float normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.); + aBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5; + aTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5; + } + else if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) { + //handle miter clipping + bTopCoord -= normalWidth * endTopJoin; + bTopCoord += normalize(endTopJoin * normalWidth) * baClipping; + } + + if (nextReverse) { + //make join rectangular + vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5; + float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.); + bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5; + bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5; + } + else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) { + //handle miter clipping + aBotCoord -= normalWidth * startBotJoin; + aBotCoord += normalize(startBotJoin * normalWidth) * abClipping; + } + + vec2 aTopPosition = (aTopCoord) * adjustedScale + translate; + vec2 aBotPosition = (aBotCoord) * adjustedScale + translate; + + vec2 bTopPosition = (bTopCoord) * adjustedScale + translate; + vec2 bBotPosition = (bBotCoord) * adjustedScale + translate; + + //position is normalized 0..1 coord on the screen + vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd; + + startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy; + endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy; + + gl_Position = vec4(position * 2.0 - 1.0, depth, 1); + + enableStartMiter = step(dot(currTangent, prevTangent), .5); + enableEndMiter = step(dot(currTangent, nextTangent), .5); + + //bevel miter cutoffs + if (miterMode == 1.) { + if (enableStartMiter == 1.) { + vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5; + startCutoff = vec4(aCoord, aCoord); + startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; + startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + startCutoff += viewport.xyxy; + startCutoff += startMiterWidth.xyxy; + } + + if (enableEndMiter == 1.) { + vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5; + endCutoff = vec4(bCoord, bCoord); + endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; + endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + endCutoff += viewport.xyxy; + endCutoff += endMiterWidth.xyxy; + } + } + + //round miter cutoffs + else if (miterMode == 2.) { + if (enableStartMiter == 1.) { + vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5; + startCutoff = vec4(aCoord, aCoord); + startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; + startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + startCutoff += viewport.xyxy; + startCutoff += startMiterWidth.xyxy; + } + + if (enableEndMiter == 1.) { + vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5; + endCutoff = vec4(bCoord, bCoord); + endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; + endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + endCutoff += viewport.xyxy; + endCutoff += endMiterWidth.xyxy; + } + } +} +`,u=` +precision highp float; + +uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode; +uniform sampler2D dashTexture; + +varying vec4 fragColor; +varying vec2 tangent; +varying vec4 startCutoff, endCutoff; +varying vec2 startCoord, endCoord; +varying float enableStartMiter, enableEndMiter; + +float distToLine(vec2 p, vec2 a, vec2 b) { + vec2 diff = b - a; + vec2 perp = normalize(vec2(-diff.y, diff.x)); + return dot(p - a, perp); +} + +void main() { + float alpha = 1., distToStart, distToEnd; + float cutoff = thickness * .5; + + //bevel miter + if (miterMode == 1.) { + if (enableStartMiter == 1.) { + distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); + if (distToStart < -1.) { + discard; + return; + } + alpha *= min(max(distToStart + 1., 0.), 1.); + } + + if (enableEndMiter == 1.) { + distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); + if (distToEnd < -1.) { + discard; + return; + } + alpha *= min(max(distToEnd + 1., 0.), 1.); + } + } + + // round miter + else if (miterMode == 2.) { + if (enableStartMiter == 1.) { + distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); + if (distToStart < 0.) { + float radius = length(gl_FragCoord.xy - startCoord); + + if(radius > cutoff + .5) { + discard; + return; + } + + alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); + } + } + + if (enableEndMiter == 1.) { + distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); + if (distToEnd < 0.) { + float radius = length(gl_FragCoord.xy - endCoord); + + if(radius > cutoff + .5) { + discard; + return; + } + + alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); + } + } + } + + float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25; + float dash = texture2D(dashTexture, vec2(t, .5)).r; + + gl_FragColor = fragColor; + gl_FragColor.a *= alpha * opacity * dash; +} +`;$.exports=b;function b(_,C){if(!(this instanceof b))return new b(_,C);if(typeof _=="function"?(C||(C={}),C.regl=_):C=_,C.length&&(C.positions=C),_=C.regl,!_.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=_._gl,this.regl=_,this.passes=[],this.shaders=b.shaders.has(_)?b.shaders.get(_):b.shaders.set(_,b.createShaders(_)).get(_),this.update(C)}b.dashMult=2,b.maxPatternLength=256,b.precisionThreshold=3e6,b.maxPoints=1e4,b.maxLines=2048,b.shaders=new o,b.createShaders=function(_){let C=_.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),M={primitive:"triangle strip",instances:_.prop("count"),count:4,offset:0,uniforms:{miterMode:(h,p)=>p.join==="round"?2:1,miterLimit:_.prop("miterLimit"),scale:_.prop("scale"),scaleFract:_.prop("scaleFract"),translateFract:_.prop("translateFract"),translate:_.prop("translate"),thickness:_.prop("thickness"),dashTexture:_.prop("dashTexture"),opacity:_.prop("opacity"),pixelRatio:_.context("pixelRatio"),id:_.prop("id"),dashLength:_.prop("dashLength"),viewport:(h,p)=>[p.viewport.x,p.viewport.y,h.viewportWidth,h.viewportHeight],depth:_.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(h,p)=>!p.overlay},stencil:{enable:!1},scissor:{enable:!0,box:_.prop("viewport")},viewport:_.prop("viewport")},E=_(P({vert:f,frag:x,attributes:{lineEnd:{buffer:C,divisor:0,stride:8,offset:0},lineTop:{buffer:C,divisor:0,stride:8,offset:4},aCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:_.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:_.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:_.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},M)),A;try{A=_(P({cull:{enable:!0,face:"back"},vert:T,frag:u,attributes:{lineEnd:{buffer:C,divisor:0,stride:8,offset:0},lineTop:{buffer:C,divisor:0,stride:8,offset:4},aColor:{buffer:_.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:_.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},M))}catch{A=E}return{fill:_({primitive:"triangle",elements:(h,p)=>p.triangles,offset:0,vert:y,frag:v,uniforms:{scale:_.prop("scale"),color:_.prop("fill"),scaleFract:_.prop("scaleFract"),translateFract:_.prop("translateFract"),translate:_.prop("translate"),opacity:_.prop("opacity"),pixelRatio:_.context("pixelRatio"),id:_.prop("id"),viewport:(h,p)=>[p.viewport.x,p.viewport.y,h.viewportWidth,h.viewportHeight]},attributes:{position:{buffer:_.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:_.prop("positionFractBuffer"),stride:8,offset:8}},blend:M.blend,depth:{enable:!1},scissor:M.scissor,stencil:M.stencil,viewport:M.viewport}),rect:E,miter:A}},b.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},b.prototype.render=function(..._){_.length&&this.update(..._),this.draw()},b.prototype.draw=function(..._){return(_.length?_:this.passes).forEach((C,M)=>{if(C&&Array.isArray(C))return this.draw(...C);typeof C=="number"&&(C=this.passes[C]),C&&C.count>1&&C.opacity&&(this.regl._refresh(),C.fill&&C.triangles&&C.triangles.length>2&&this.shaders.fill(C),C.thickness&&(C.scale[0]*C.viewport.width>b.precisionThreshold||C.scale[1]*C.viewport.height>b.precisionThreshold?this.shaders.rect(C):C.join==="rect"||!C.join&&(C.thickness<=2||C.count>=b.maxPoints)?this.shaders.rect(C):this.shaders.miter(C)))}),this},b.prototype.update=function(_){if(!_)return;_.length!=null?typeof _[0]=="number"&&(_=[{positions:_}]):Array.isArray(_)||(_=[_]);let{regl:C,gl:M}=this;if(_.forEach((A,h)=>{let p=this.passes[h];if(A!==void 0){if(A===null){this.passes[h]=null;return}if(typeof A[0]=="number"&&(A={positions:A}),A=S(A,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),p||(this.passes[h]=p={id:h,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:C.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:C.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:C.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:C.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},A=P({},b.defaults,A)),A.thickness!=null&&(p.thickness=parseFloat(A.thickness)),A.opacity!=null&&(p.opacity=parseFloat(A.opacity)),A.miterLimit!=null&&(p.miterLimit=parseFloat(A.miterLimit)),A.overlay!=null&&(p.overlay=!!A.overlay,hpt-st),X=[],lt=0,yt=p.hole!=null?p.hole[0]:null;if(yt!=null){let pt=s(q,st=>st>=yt);q=q.slice(0,pt),q.push(yt)}for(let pt=0;ptrt-yt+(q[pt]-lt)),dt=e(st,tt);dt=dt.map(rt=>rt+lt+(rt+lt{_.colorBuffer.destroy(),_.positionBuffer.destroy(),_.dashTexture.destroy()}),this.passes.length=0,this}}),QV=Ft((Q,$)=>{var c=px(),g=N1(),P=SS(),S=Cg(),t=Ed(),e=mx(),{float32:r,fract32:a}=aT();$.exports=o;var n=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function o(i,s){if(typeof i=="function"?(s||(s={}),s.regl=i):s=i,s.length&&(s.positions=s),i=s.regl,!i.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let f=i._gl,x,y,v,T,u,b,_={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},C=[];return T=i.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),y=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),u=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),b=i.buffer({usage:"static",type:"float",data:n}),h(s),x=i({vert:` + precision highp float; + + attribute vec2 position, positionFract; + attribute vec4 error; + attribute vec4 color; + + attribute vec2 direction, lineOffset, capOffset; + + uniform vec4 viewport; + uniform float lineWidth, capSize; + uniform vec2 scale, scaleFract, translate, translateFract; + + varying vec4 fragColor; + + void main() { + fragColor = color / 255.; + + vec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset; + + vec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw; + + vec2 position = position + dxy; + + vec2 pos = (position + translate) * scale + + (positionFract + translateFract) * scale + + (position + translate) * scaleFract + + (positionFract + translateFract) * scaleFract; + + pos += pixelOffset / viewport.zw; + + gl_Position = vec4(pos * 2. - 1., 0, 1); + } + `,frag:` + precision highp float; + + varying vec4 fragColor; + + uniform float opacity; + + void main() { + gl_FragColor = fragColor; + gl_FragColor.a *= opacity; + } + `,uniforms:{range:i.prop("range"),lineWidth:i.prop("lineWidth"),capSize:i.prop("capSize"),opacity:i.prop("opacity"),scale:i.prop("scale"),translate:i.prop("translate"),scaleFract:i.prop("scaleFract"),translateFract:i.prop("translateFract"),viewport:(k,w)=>[w.viewport.x,w.viewport.y,k.viewportWidth,k.viewportHeight]},attributes:{color:{buffer:T,offset:(k,w)=>w.offset*4,divisor:1},position:{buffer:y,offset:(k,w)=>w.offset*8,divisor:1},positionFract:{buffer:v,offset:(k,w)=>w.offset*8,divisor:1},error:{buffer:u,offset:(k,w)=>w.offset*16,divisor:1},direction:{buffer:b,stride:24,offset:0},lineOffset:{buffer:b,stride:24,offset:8},capOffset:{buffer:b,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:i.prop("viewport")},viewport:i.prop("viewport"),stencil:!1,instances:i.prop("count"),count:n.length}),t(M,{update:h,draw:E,destroy:p,regl:i,gl:f,canvas:f.canvas,groups:C}),M;function M(k){k?h(k):k===null&&p(),E()}function E(k){if(typeof k=="number")return A(k);k&&!Array.isArray(k)&&(k=[k]),i._refresh(),C.forEach((w,R)=>{if(w){if(k&&(k[R]?w.draw=!0:w.draw=!1),!w.draw){w.draw=!0;return}A(R)}})}function A(k){typeof k=="number"&&(k=C[k]),k!=null&&k&&k.count&&k.color&&k.opacity&&k.positions&&k.positions.length>1&&(k.scaleRatio=[k.scale[0]*k.viewport.width,k.scale[1]*k.viewport.height],x(k),k.after&&k.after(k))}function h(k){if(!k)return;k.length!=null?typeof k[0]=="number"&&(k=[{positions:k}]):Array.isArray(k)||(k=[k]);let w=0,R=0;if(M.groups=C=k.map((V,H)=>{let F=C[H];if(V)typeof V=="function"?V={after:V}:typeof V[0]=="number"&&(V={positions:V});else return F;return V=S(V,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),F||(C[H]=F={id:H,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},V=t({},_,V)),P(F,V,[{lineWidth:U=>+U*.5,capSize:U=>+U*.5,opacity:parseFloat,errors:U=>(U=e(U),R+=U.length,U),positions:(U,W)=>(U=e(U,"float64"),W.count=Math.floor(U.length/2),W.bounds=c(U,2),W.offset=w,w+=W.count,U)},{color:(U,W)=>{let q=W.count;if(U||(U="transparent"),!Array.isArray(U)||typeof U[0]=="number"){let lt=U;U=Array(q);for(let yt=0;yt{let X=W.bounds;return U||(U=X),W.scale=[1/(U[2]-U[0]),1/(U[3]-U[1])],W.translate=[-U[0],-U[1]],W.scaleFract=a(W.scale),W.translateFract=a(W.translate),U},viewport:U=>{let W;return Array.isArray(U)?W={x:U[0],y:U[1],width:U[2]-U[0],height:U[3]-U[1]}:U?(W={x:U.x||U.left||0,y:U.y||U.top||0},U.right?W.width=U.right-W.x:W.width=U.w||U.width||0,U.bottom?W.height=U.bottom-W.y:W.height=U.h||U.height||0):W={x:0,y:0,width:f.drawingBufferWidth,height:f.drawingBufferHeight},W}}]),F}),w||R){let V=C.reduce((W,q,X)=>W+(q?q.count:0),0),H=new Float64Array(V*2),F=new Uint8Array(V*4),U=new Float32Array(V*4);C.forEach((W,q)=>{if(!W)return;let{positions:X,count:lt,offset:yt,color:pt,errors:st}=W;lt&&(F.set(pt,yt*4),U.set(st,yt*4),H.set(X,yt*2))});var O=r(H);y(O);var N=a(H,O);v(N),T(F),u(U)}}function p(){y.destroy(),v.destroy(),T.destroy(),u.destroy(),b.destroy()}}}),tH=Ft((Q,$)=>{var c=/[\'\"]/;$.exports=function(g){return g?(c.test(g.charAt(0))&&(g=g.substr(1)),c.test(g.charAt(g.length-1))&&(g=g.substr(0,g.length-1)),g):""}}),US=Ft((Q,$)=>{$.exports=["inherit","initial","unset"]}),VS=Ft((Q,$)=>{$.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}),HS=Ft((Q,$)=>{$.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}),WS=Ft((Q,$)=>{$.exports=["normal","italic","oblique"]}),qS=Ft((Q,$)=>{$.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}),eH=Ft((Q,$)=>{function c(S,t){if(typeof S!="string")return[S];var e=[S];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var r=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],a=t.escape||"___",n=!!t.flat;r.forEach(function(s){var f=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),x=[];function y(v,T,u){var b=e.push(v.slice(s[0].length,-s[1].length))-1;return x.push(b),a+b+a}e.forEach(function(v,T){for(var u,b=0;v!=u;)if(u=v,v=v.replace(f,y),b++>1e4)throw Error("References have circular dependency. Please, check them.");e[T]=v}),x=x.reverse(),e=e.map(function(v){return x.forEach(function(T){v=v.replace(new RegExp("(\\"+a+T+"\\"+a+")","g"),s[0]+"$1"+s[1])}),v})});var o=new RegExp("\\"+a+"([0-9]+)\\"+a);function i(s,f,x){for(var y=[],v,T=0;v=o.exec(s);){if(T++>1e4)throw Error("Circular references in parenthesis");y.push(s.slice(0,v.index)),y.push(i(f[v[1]],f)),s=s.slice(v.index+v[0].length)}return y.push(s),y}return n?e:i(e[0],e)}function g(S,t){if(t&&t.flat){var e=t&&t.escape||"___",r=S[0],a;if(!r)return"";for(var n=new RegExp("\\"+e+"([0-9]+)\\"+e),o=0;r!=a;){if(o++>1e4)throw Error("Circular references in "+S);a=r,r=r.replace(n,i)}return r}return S.reduce(function s(f,x){return Array.isArray(x)&&(x=x.reduce(s,"")),f+x},"");function i(s,f){if(S[f]==null)throw Error("Reference "+f+"is undefined");return S[f]}}function P(S,t){return Array.isArray(S)?g(S,t):c(S,t)}P.parse=c,P.stringify=g,$.exports=P}),rH=Ft((Q,$)=>{var c=eH();$.exports=function(g,P,S){if(g==null)throw Error("First argument should be a string");if(P==null)throw Error("Separator should be a string or a RegExp");S?(typeof S=="string"||Array.isArray(S))&&(S={ignore:S}):S={},S.escape==null&&(S.escape=!0),S.ignore==null?S.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:(typeof S.ignore=="string"&&(S.ignore=[S.ignore]),S.ignore=S.ignore.map(function(s){return s.length===1&&(s=s+s),s}));var t=c.parse(g,{flat:!0,brackets:S.ignore}),e=t[0],r=e.split(P);if(S.escape){for(var a=[],n=0;n{$.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]}),ZS=Ft((Q,$)=>{var c=nH();$.exports={isSize:function(g){return/^[\d\.]/.test(g)||g.indexOf("/")!==-1||c.indexOf(g)!==-1}}}),iH=Ft((Q,$)=>{var c=tH(),g=US(),P=VS(),S=HS(),t=WS(),e=qS(),r=rH(),a=ZS().isSize;$.exports=o;var n=o.cache={};function o(s){if(typeof s!="string")throw new Error("Font argument must be a string.");if(n[s])return n[s];if(s==="")throw new Error("Cannot parse an empty string.");if(P.indexOf(s)!==-1)return n[s]={system:s};for(var f={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},x=r(s,/\s+/),y;y=x.shift();){if(g.indexOf(y)!==-1)return["style","variant","weight","stretch"].forEach(function(T){f[T]=y}),n[s]=f;if(t.indexOf(y)!==-1){f.style=y;continue}if(y==="normal"||y==="small-caps"){f.variant=y;continue}if(e.indexOf(y)!==-1){f.stretch=y;continue}if(S.indexOf(y)!==-1){f.weight=y;continue}if(a(y)){var v=r(y,"/");if(f.size=v[0],v[1]!=null?f.lineHeight=i(v[1]):x[0]==="/"&&(x.shift(),f.lineHeight=i(x.shift())),!x.length)throw new Error("Missing required font-family.");return f.family=r(x.join(" "),/\s*,\s*/).map(c),n[s]=f}throw new Error("Unknown or unsupported font token: "+y)}throw new Error("Missing required font-size.")}function i(s){var f=parseFloat(s);return f.toString()===s?f:s}}),$S=Ft((Q,$)=>{var c=Cg(),g=ZS().isSize,P=s(US()),S=s(VS()),t=s(HS()),e=s(WS()),r=s(qS()),a={normal:1,"small-caps":1},n={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},o={size:"1rem",family:"serif"};$.exports=function(f){if(f=c(f,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),f.system)return f.system&&i(f.system,S),f.system;if(i(f.style,e),i(f.variant,a),i(f.weight,t),i(f.stretch,r),f.size==null&&(f.size=o.size),typeof f.size=="number"&&(f.size+="px"),!g)throw Error("Bad size value `"+f.size+"`");f.family||(f.family=o.family),Array.isArray(f.family)&&(f.family.length||(f.family=[o.family]),f.family=f.family.map(function(y){return n[y]?y:'"'+y+'"'}).join(", "));var x=[];return x.push(f.style),f.variant!==f.style&&x.push(f.variant),f.weight!==f.variant&&f.weight!==f.style&&x.push(f.weight),f.stretch!==f.weight&&f.stretch!==f.variant&&f.stretch!==f.style&&x.push(f.stretch),x.push(f.size+(f.lineHeight==null||f.lineHeight==="normal"||f.lineHeight+""=="1"?"":"/"+f.lineHeight)),x.push(f.family),x.filter(Boolean).join(" ")};function i(f,x){if(f&&!x[f]&&!P[f])throw Error("Unknown keyword `"+f+"`");return f}function s(f){for(var x={},y=0;y{$.exports={parse:iH(),stringify:$S()}}),oH=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?$.exports=g():c.createREGL=g()})(Q,function(){var c=function(_e,kr){for(var Lr=Object.keys(kr),Dn=0;Dn1&&kr===Lr&&(kr==='"'||kr==="'"))return['"'+r(_e.substr(1,_e.length-2))+'"'];var Dn=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(_e);if(Dn)return a(_e.substr(0,Dn.index)).concat(a(Dn[1])).concat(a(_e.substr(Dn.index+Dn[0].length)));var oi=_e.split(".");if(oi.length===1)return['"'+r(_e)+'"'];for(var Jn=[],gn=0;gn"u"?1:window.devicePixelRatio,va=!1,Za={},Ba=function(hn){},ta=function(){};if(typeof kr=="string"?Lr=document.querySelector(kr):typeof kr=="object"&&(b(kr)?Lr=kr:_(kr)?(Jn=kr,oi=Jn.canvas):("gl"in kr?Jn=kr.gl:"canvas"in kr?oi=M(kr.canvas):"container"in kr&&(Dn=M(kr.container)),"attributes"in kr&&(gn=kr.attributes),"extensions"in kr&&(ni=C(kr.extensions)),"optionalExtensions"in kr&&(Yi=C(kr.optionalExtensions)),"onDone"in kr&&(Ba=kr.onDone),"profile"in kr&&(va=!!kr.profile),"pixelRatio"in kr&&(Ui=+kr.pixelRatio),"cachedCode"in kr&&(Za=kr.cachedCode))),Lr&&(Lr.nodeName.toLowerCase()==="canvas"?oi=Lr:Dn=Lr),!Jn){if(!oi){var wi=T(Dn||document.body,Ba,Ui);if(!wi)return null;oi=wi.canvas,ta=wi.onDestroy}gn.premultipliedAlpha===void 0&&(gn.premultipliedAlpha=!0),Jn=u(oi,gn)}return Jn?{gl:Jn,canvas:oi,container:Dn,extensions:ni,optionalExtensions:Yi,pixelRatio:Ui,profile:va,cachedCode:Za,onDone:Ba,onDestroy:ta}:(ta(),Ba("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function A(_e,kr){var Lr={};function Dn(gn){var ni=gn.toLowerCase(),Yi;try{Yi=Lr[ni]=_e.getExtension(ni)}catch{}return!!Yi}for(var oi=0;oi65535)<<4,_e>>>=kr,Lr=(_e>255)<<3,_e>>>=Lr,kr|=Lr,Lr=(_e>15)<<2,_e>>>=Lr,kr|=Lr,Lr=(_e>3)<<1,_e>>>=Lr,kr|=Lr,kr|_e>>1}function U(){var _e=h(8,function(){return[]});function kr(Jn){var gn=H(Jn),ni=_e[F(gn)>>2];return ni.length>0?ni.pop():new ArrayBuffer(gn)}function Lr(Jn){_e[F(Jn.byteLength)>>2].push(Jn)}function Dn(Jn,gn){var ni=null;switch(Jn){case p:ni=new Int8Array(kr(gn),0,gn);break;case k:ni=new Uint8Array(kr(gn),0,gn);break;case w:ni=new Int16Array(kr(2*gn),0,gn);break;case R:ni=new Uint16Array(kr(2*gn),0,gn);break;case O:ni=new Int32Array(kr(4*gn),0,gn);break;case N:ni=new Uint32Array(kr(4*gn),0,gn);break;case V:ni=new Float32Array(kr(4*gn),0,gn);break;default:return null}return ni.length!==gn?ni.subarray(0,gn):ni}function oi(Jn){Lr(Jn.buffer)}return{alloc:kr,free:Lr,allocType:Dn,freeType:oi}}var W=U();W.zero=U();var q=3408,X=3410,lt=3411,yt=3412,pt=3413,st=3414,tt=3415,dt=33901,rt=33902,at=3379,vt=3386,it=34921,Y=36347,ft=36348,ut=35661,wt=35660,zt=34930,Pt=36349,Wt=34076,Ht=34024,Jt=7936,ge=7937,he=7938,de=35724,se=34047,Tt=36063,Lt=34852,Mt=3553,te=34067,ve=34069,oe=33984,Te=6408,He=5126,Ge=5121,cr=36160,ur=36053,jr=36064,Hr=16384,br=function(_e,kr){var Lr=1;kr.ext_texture_filter_anisotropic&&(Lr=_e.getParameter(se));var Dn=1,oi=1;kr.webgl_draw_buffers&&(Dn=_e.getParameter(Lt),oi=_e.getParameter(Tt));var Jn=!!kr.oes_texture_float;if(Jn){var gn=_e.createTexture();_e.bindTexture(Mt,gn),_e.texImage2D(Mt,0,Te,1,1,0,Te,He,null);var ni=_e.createFramebuffer();if(_e.bindFramebuffer(cr,ni),_e.framebufferTexture2D(cr,jr,Mt,gn,0),_e.bindTexture(Mt,null),_e.checkFramebufferStatus(cr)!==ur)Jn=!1;else{_e.viewport(0,0,1,1),_e.clearColor(1,0,0,1),_e.clear(Hr);var Yi=W.allocType(He,4);_e.readPixels(0,0,1,1,Te,He,Yi),_e.getError()?Jn=!1:(_e.deleteFramebuffer(ni),_e.deleteTexture(gn),Jn=Yi[0]===1),W.freeType(Yi)}}var Ui=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),va=!0;if(!Ui){var Za=_e.createTexture(),Ba=W.allocType(Ge,36);_e.activeTexture(oe),_e.bindTexture(te,Za),_e.texImage2D(ve,0,Te,3,3,0,Te,Ge,Ba),W.freeType(Ba),_e.bindTexture(te,null),_e.deleteTexture(Za),va=!_e.getError()}return{colorBits:[_e.getParameter(X),_e.getParameter(lt),_e.getParameter(yt),_e.getParameter(pt)],depthBits:_e.getParameter(st),stencilBits:_e.getParameter(tt),subpixelBits:_e.getParameter(q),extensions:Object.keys(kr).filter(function(ta){return!!kr[ta]}),maxAnisotropic:Lr,maxDrawbuffers:Dn,maxColorAttachments:oi,pointSizeDims:_e.getParameter(dt),lineWidthDims:_e.getParameter(rt),maxViewportDims:_e.getParameter(vt),maxCombinedTextureUnits:_e.getParameter(ut),maxCubeMapSize:_e.getParameter(Wt),maxRenderbufferSize:_e.getParameter(Ht),maxTextureUnits:_e.getParameter(zt),maxTextureSize:_e.getParameter(at),maxAttributes:_e.getParameter(it),maxVertexUniforms:_e.getParameter(Y),maxVertexTextureUnits:_e.getParameter(wt),maxVaryingVectors:_e.getParameter(ft),maxFragmentUniforms:_e.getParameter(Pt),glsl:_e.getParameter(de),renderer:_e.getParameter(ge),vendor:_e.getParameter(Jt),version:_e.getParameter(he),readFloat:Jn,npotTextureCube:va}},Kr=function(_e){return _e instanceof Uint8Array||_e instanceof Uint16Array||_e instanceof Uint32Array||_e instanceof Int8Array||_e instanceof Int16Array||_e instanceof Int32Array||_e instanceof Float32Array||_e instanceof Float64Array||_e instanceof Uint8ClampedArray};function rn(_e){return!!_e&&typeof _e=="object"&&Array.isArray(_e.shape)&&Array.isArray(_e.stride)&&typeof _e.offset=="number"&&_e.shape.length===_e.stride.length&&(Array.isArray(_e.data)||Kr(_e.data))}var Ce=function(_e){return Object.keys(_e).map(function(kr){return _e[kr]})},$t={shape:ee,flatten:Nt};function ne(_e,kr,Lr){for(var Dn=0;Dn0){var Ua;if(Array.isArray(Nn[0])){ca=qn(Nn);for(var vi=1,ti=1;ti0){if(typeof vi[0]=="number"){var qi=W.allocType(Qn.dtype,vi.length);Qr(qi,vi),ca(qi,Sa),W.freeType(qi)}else if(Array.isArray(vi[0])||Kr(vi[0])){pa=qn(vi);var $i=ii(vi,pa,Qn.dtype);ca($i,Sa),W.freeType($i)}}}else if(rn(vi)){pa=vi.shape;var _a=vi.stride,Po=0,wo=0,xa=0,Oa=0;pa.length===1?(Po=pa[0],wo=1,xa=_a[0],Oa=0):pa.length===2&&(Po=pa[0],wo=pa[1],xa=_a[0],Oa=_a[1]);var ho=Array.isArray(vi.data)?Qn.dtype:xr(vi.data),So=W.allocType(ho,Po*wo);Cn(So,vi.data,Po,wo,xa,Oa,vi.offset),ca(So,Sa),W.freeType(So)}return Ma}return Oi||Ma(hn),Ma._reglType="buffer",Ma._buffer=Qn,Ma.subdata=Ua,Lr.profile&&(Ma.stats=Qn.stats),Ma.destroy=function(){Ba(Qn)},Ma}function wi(){Ce(Jn).forEach(function(hn){hn.buffer=_e.createBuffer(),_e.bindBuffer(hn.type,hn.buffer),_e.bufferData(hn.type,hn.persistentData||hn.byteLength,hn.usage)})}return Lr.profile&&(kr.getTotalBufferSize=function(){var hn=0;return Object.keys(Jn).forEach(function(Nn){hn+=Jn[Nn].stats.size}),hn}),{create:ta,createStream:Yi,destroyStream:Ui,clear:function(){Ce(Jn).forEach(Ba),ni.forEach(Ba)},getBuffer:function(hn){return hn&&hn._buffer instanceof gn?hn._buffer:null},restore:wi,_initBuffer:Za}}var Mn=0,ci=0,xi=1,Pi=1,Di=4,Zi=4,ui={points:Mn,point:ci,lines:xi,line:Pi,triangles:Di,triangle:Zi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Pa=0,Wa=1,ze=4,Pe=5120,Rr=5121,qr=5122,$r=5123,Br=5124,Gr=5125,dn=34963,an=35040,Ee=35044;function dr(_e,kr,Lr,Dn){var oi={},Jn=0,gn={uint8:Rr,uint16:$r};kr.oes_element_index_uint&&(gn.uint32=Gr);function ni(wi){this.id=Jn++,oi[this.id]=this,this.buffer=wi,this.primType=ze,this.vertCount=0,this.type=0}ni.prototype.bind=function(){this.buffer.bind()};var Yi=[];function Ui(wi){var hn=Yi.pop();return hn||(hn=new ni(Lr.create(null,dn,!0,!1)._buffer)),Za(hn,wi,an,-1,-1,0,0),hn}function va(wi){Yi.push(wi)}function Za(wi,hn,Nn,Oi,_i,Qn,Ma){wi.buffer.bind();var ca;if(hn){var Ua=Ma;!Ma&&(!Kr(hn)||rn(hn)&&!Kr(hn.data))&&(Ua=kr.oes_element_index_uint?Gr:$r),Lr._initBuffer(wi.buffer,hn,Nn,Ua,3)}else _e.bufferData(dn,Qn,Nn),wi.buffer.dtype=ca||Rr,wi.buffer.usage=Nn,wi.buffer.dimension=3,wi.buffer.byteLength=Qn;if(ca=Ma,!Ma){switch(wi.buffer.dtype){case Rr:case Pe:ca=Rr;break;case $r:case qr:ca=$r;break;case Gr:case Br:ca=Gr;break}wi.buffer.dtype=ca}wi.type=ca;var vi=_i;vi<0&&(vi=wi.buffer.byteLength,ca===$r?vi>>=1:ca===Gr&&(vi>>=2)),wi.vertCount=vi;var ti=Oi;if(Oi<0){ti=ze;var Sa=wi.buffer.dimension;Sa===1&&(ti=Pa),Sa===2&&(ti=Wa),Sa===3&&(ti=ze)}wi.primType=ti}function Ba(wi){Dn.elementsCount--,delete oi[wi.id],wi.buffer.destroy(),wi.buffer=null}function ta(wi,hn){var Nn=Lr.create(null,dn,!0),Oi=new ni(Nn._buffer);Dn.elementsCount++;function _i(Qn){if(!Qn)Nn(),Oi.primType=ze,Oi.vertCount=0,Oi.type=Rr;else if(typeof Qn=="number")Nn(Qn),Oi.primType=ze,Oi.vertCount=Qn|0,Oi.type=Rr;else{var Ma=null,ca=Ee,Ua=-1,vi=-1,ti=0,Sa=0;Array.isArray(Qn)||Kr(Qn)||rn(Qn)?Ma=Qn:("data"in Qn&&(Ma=Qn.data),"usage"in Qn&&(ca=Ci[Qn.usage]),"primitive"in Qn&&(Ua=ui[Qn.primitive]),"count"in Qn&&(vi=Qn.count|0),"type"in Qn&&(Sa=gn[Qn.type]),"length"in Qn?ti=Qn.length|0:(ti=vi,Sa===$r||Sa===qr?ti*=2:(Sa===Gr||Sa===Br)&&(ti*=4))),Za(Oi,Ma,ca,Ua,vi,ti,Sa)}return _i}return _i(wi),_i._reglType="elements",_i._elements=Oi,_i.subdata=function(Qn,Ma){return Nn.subdata(Qn,Ma),_i},_i.destroy=function(){Ba(Oi)},_i}return{create:ta,createStream:Ui,destroyStream:va,getElements:function(wi){return typeof wi=="function"&&wi._elements instanceof ni?wi._elements:null},clear:function(){Ce(oi).forEach(Ba)}}}var Vr=new Float32Array(1),yn=new Uint32Array(Vr.buffer),Fn=5123;function Xn(_e){for(var kr=W.allocType(Fn,_e.length),Lr=0;Lr<_e.length;++Lr)if(isNaN(_e[Lr]))kr[Lr]=65535;else if(_e[Lr]===1/0)kr[Lr]=31744;else if(_e[Lr]===-1/0)kr[Lr]=64512;else{Vr[0]=_e[Lr];var Dn=yn[0],oi=Dn>>>31<<15,Jn=(Dn<<1>>>24)-127,gn=Dn>>13&1023;if(Jn<-24)kr[Lr]=oi;else if(Jn<-14){var ni=-14-Jn;kr[Lr]=oi+(gn+1024>>ni)}else Jn>15?kr[Lr]=oi+31744:kr[Lr]=oi+(Jn+15<<10)+gn}return kr}function Pn(_e){return Array.isArray(_e)||Kr(_e)}var En=34467,Zn=3553,Ca=34067,Ri=34069,Ja=6408,Xa=6406,Io=6407,po=6409,Do=6410,Ia=32854,gs=32855,is=36194,ll=32819,Ho=32820,Gs=33635,as=34042,ul=6402,Js=34041,Rl=35904,ls=35906,Cs=36193,Co=33776,ks=33777,kl=33778,Vl=33779,Yl=35986,Ns=35987,La=34798,uo=35840,Hs=35841,Kl=35842,Go=35843,ql=36196,il=5121,Cl=5123,Fu=5125,ao=5126,Ts=10242,Ls=10243,nu=10497,cl=33071,Qo=33648,Mu=10240,Gu=10241,_l=9728,Ol=9729,Xl=9984,tu=9985,ac=9986,ph=9987,Jc=33170,ah=4352,Nf=4353,Sf=4354,Dl=34046,Bc=3317,jf=37440,hc=37441,oc=37443,fc=37444,oh=33984,su=[Xl,ac,tu,ph],sc=[0,po,Do,Io,Ja],el={};el[po]=el[Xa]=el[ul]=1,el[Js]=el[Do]=2,el[Io]=el[Rl]=3,el[Ja]=el[ls]=4;function Zl(_e){return"[object "+_e+"]"}var Mh=Zl("HTMLCanvasElement"),Lc=Zl("OffscreenCanvas"),jh=Zl("CanvasRenderingContext2D"),xu=Zl("ImageBitmap"),Cd=Zl("HTMLImageElement"),Qs=Zl("HTMLVideoElement"),Wd=Object.keys(le).concat([Mh,Lc,jh,xu,Cd,Qs]),Ll=[];Ll[il]=1,Ll[ao]=4,Ll[Cs]=2,Ll[Cl]=2,Ll[Fu]=4;var Jo=[];Jo[Ia]=2,Jo[gs]=2,Jo[is]=2,Jo[Js]=4,Jo[Co]=.5,Jo[ks]=.5,Jo[kl]=1,Jo[Vl]=1,Jo[Yl]=.5,Jo[Ns]=1,Jo[La]=1,Jo[uo]=.5,Jo[Hs]=.25,Jo[Kl]=.5,Jo[Go]=.25,Jo[ql]=.5;function lf(_e){return Array.isArray(_e)&&(_e.length===0||typeof _e[0]=="number")}function sh(_e){if(!Array.isArray(_e))return!1;var kr=_e.length;return!(kr===0||!Pn(_e[0]))}function ec(_e){return Object.prototype.toString.call(_e)}function Uf(_e){return ec(_e)===Mh}function Uh(_e){return ec(_e)===Lc}function yf(_e){return ec(_e)===jh}function lc(_e){return ec(_e)===xu}function hd(_e){return ec(_e)===Cd}function $f(_e){return ec(_e)===Qs}function xf(_e){if(!_e)return!1;var kr=ec(_e);return Wd.indexOf(kr)>=0?!0:lf(_e)||sh(_e)||rn(_e)}function Vh(_e){return le[Object.prototype.toString.call(_e)]|0}function Vf(_e,kr){var Lr=kr.length;switch(_e.type){case il:case Cl:case Fu:case ao:var Dn=W.allocType(_e.type,Lr);Dn.set(kr),_e.data=Dn;break;case Cs:_e.data=Xn(kr);break}}function Hf(_e,kr){return W.allocType(_e.type===Cs?ao:_e.type,kr)}function lh(_e,kr){_e.type===Cs?(_e.data=Xn(kr),W.freeType(kr)):_e.data=kr}function Gf(_e,kr,Lr,Dn,oi,Jn){for(var gn=_e.width,ni=_e.height,Yi=_e.channels,Ui=gn*ni*Yi,va=Hf(_e,Ui),Za=0,Ba=0;Ba=1;)ni+=gn*Yi*Yi,Yi/=2;return ni}else return gn*Lr*Dn}function mh(_e,kr,Lr,Dn,oi,Jn,gn){var ni={"don't care":ah,"dont care":ah,nice:Sf,fast:Nf},Yi={repeat:nu,clamp:cl,mirror:Qo},Ui={nearest:_l,linear:Ol},va=c({mipmap:ph,"nearest mipmap nearest":Xl,"linear mipmap nearest":tu,"nearest mipmap linear":ac,"linear mipmap linear":ph},Ui),Za={none:0,browser:fc},Ba={uint8:il,rgba4:ll,rgb565:Gs,"rgb5 a1":Ho},ta={alpha:Xa,luminance:po,"luminance alpha":Do,rgb:Io,rgba:Ja,rgba4:Ia,"rgb5 a1":gs,rgb565:is},wi={};kr.ext_srgb&&(ta.srgb=Rl,ta.srgba=ls),kr.oes_texture_float&&(Ba.float32=Ba.float=ao),kr.oes_texture_half_float&&(Ba.float16=Ba["half float"]=Cs),kr.webgl_depth_texture&&(c(ta,{depth:ul,"depth stencil":Js}),c(Ba,{uint16:Cl,uint32:Fu,"depth stencil":as})),kr.webgl_compressed_texture_s3tc&&c(wi,{"rgb s3tc dxt1":Co,"rgba s3tc dxt1":ks,"rgba s3tc dxt3":kl,"rgba s3tc dxt5":Vl}),kr.webgl_compressed_texture_atc&&c(wi,{"rgb atc":Yl,"rgba atc explicit alpha":Ns,"rgba atc interpolated alpha":La}),kr.webgl_compressed_texture_pvrtc&&c(wi,{"rgb pvrtc 4bppv1":uo,"rgb pvrtc 2bppv1":Hs,"rgba pvrtc 4bppv1":Kl,"rgba pvrtc 2bppv1":Go}),kr.webgl_compressed_texture_etc1&&(wi["rgb etc1"]=ql);var hn=Array.prototype.slice.call(_e.getParameter(En));Object.keys(wi).forEach(function(Z){var ot=wi[Z];hn.indexOf(ot)>=0&&(ta[Z]=ot)});var Nn=Object.keys(ta);Lr.textureFormats=Nn;var Oi=[];Object.keys(ta).forEach(function(Z){var ot=ta[Z];Oi[ot]=Z});var _i=[];Object.keys(Ba).forEach(function(Z){var ot=Ba[Z];_i[ot]=Z});var Qn=[];Object.keys(Ui).forEach(function(Z){var ot=Ui[Z];Qn[ot]=Z});var Ma=[];Object.keys(va).forEach(function(Z){var ot=va[Z];Ma[ot]=Z});var ca=[];Object.keys(Yi).forEach(function(Z){var ot=Yi[Z];ca[ot]=Z});var Ua=Nn.reduce(function(Z,ot){var et=ta[ot];return et===po||et===Xa||et===po||et===Do||et===ul||et===Js||kr.ext_srgb&&(et===Rl||et===ls)?Z[et]=et:et===gs||ot.indexOf("rgba")>=0?Z[et]=Ja:Z[et]=Io,Z},{});function vi(){this.internalformat=Ja,this.format=Ja,this.type=il,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=fc,this.width=0,this.height=0,this.channels=0}function ti(Z,ot){Z.internalformat=ot.internalformat,Z.format=ot.format,Z.type=ot.type,Z.compressed=ot.compressed,Z.premultiplyAlpha=ot.premultiplyAlpha,Z.flipY=ot.flipY,Z.unpackAlignment=ot.unpackAlignment,Z.colorSpace=ot.colorSpace,Z.width=ot.width,Z.height=ot.height,Z.channels=ot.channels}function Sa(Z,ot){if(!(typeof ot!="object"||!ot)){if("premultiplyAlpha"in ot&&(Z.premultiplyAlpha=ot.premultiplyAlpha),"flipY"in ot&&(Z.flipY=ot.flipY),"alignment"in ot&&(Z.unpackAlignment=ot.alignment),"colorSpace"in ot&&(Z.colorSpace=Za[ot.colorSpace]),"type"in ot){var et=ot.type;Z.type=Ba[et]}var xt=Z.width,Ut=Z.height,fe=Z.channels,ye=!1;"shape"in ot?(xt=ot.shape[0],Ut=ot.shape[1],ot.shape.length===3&&(fe=ot.shape[2],ye=!0)):("radius"in ot&&(xt=Ut=ot.radius),"width"in ot&&(xt=ot.width),"height"in ot&&(Ut=ot.height),"channels"in ot&&(fe=ot.channels,ye=!0)),Z.width=xt|0,Z.height=Ut|0,Z.channels=fe|0;var Yt=!1;if("format"in ot){var ce=ot.format,Se=Z.internalformat=ta[ce];Z.format=Ua[Se],ce in Ba&&("type"in ot||(Z.type=Ba[ce])),ce in wi&&(Z.compressed=!0),Yt=!0}!ye&&Yt?Z.channels=el[Z.format]:ye&&!Yt&&Z.channels!==sc[Z.format]&&(Z.format=Z.internalformat=sc[Z.channels])}}function pa(Z){_e.pixelStorei(jf,Z.flipY),_e.pixelStorei(hc,Z.premultiplyAlpha),_e.pixelStorei(oc,Z.colorSpace),_e.pixelStorei(Bc,Z.unpackAlignment)}function qi(){vi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function $i(Z,ot){var et=null;if(xf(ot)?et=ot:ot&&(Sa(Z,ot),"x"in ot&&(Z.xOffset=ot.x|0),"y"in ot&&(Z.yOffset=ot.y|0),xf(ot.data)&&(et=ot.data)),ot.copy){var xt=oi.viewportWidth,Ut=oi.viewportHeight;Z.width=Z.width||xt-Z.xOffset,Z.height=Z.height||Ut-Z.yOffset,Z.needsCopy=!0}else if(!et)Z.width=Z.width||1,Z.height=Z.height||1,Z.channels=Z.channels||4;else if(Kr(et))Z.channels=Z.channels||4,Z.data=et,!("type"in ot)&&Z.type===il&&(Z.type=Vh(et));else if(lf(et))Z.channels=Z.channels||4,Vf(Z,et),Z.alignment=1,Z.needsFree=!0;else if(rn(et)){var fe=et.data;!Array.isArray(fe)&&Z.type===il&&(Z.type=Vh(fe));var ye=et.shape,Yt=et.stride,ce,Se,nr,Ye,tr,lr;ye.length===3?(nr=ye[2],lr=Yt[2]):(nr=1,lr=1),ce=ye[0],Se=ye[1],Ye=Yt[0],tr=Yt[1],Z.alignment=1,Z.width=ce,Z.height=Se,Z.channels=nr,Z.format=Z.internalformat=sc[nr],Z.needsFree=!0,Gf(Z,fe,Ye,tr,lr,et.offset)}else if(Uf(et)||Uh(et)||yf(et))Uf(et)||Uh(et)?Z.element=et:Z.element=et.canvas,Z.width=Z.element.width,Z.height=Z.element.height,Z.channels=4;else if(lc(et))Z.element=et,Z.width=et.width,Z.height=et.height,Z.channels=4;else if(hd(et))Z.element=et,Z.width=et.naturalWidth,Z.height=et.naturalHeight,Z.channels=4;else if($f(et))Z.element=et,Z.width=et.videoWidth,Z.height=et.videoHeight,Z.channels=4;else if(sh(et)){var hr=Z.width||et[0].length,Ve=Z.height||et.length,Xe=Z.channels;Pn(et[0][0])?Xe=Xe||et[0][0].length:Xe=Xe||1;for(var $e=$t.shape(et),Cr=1,on=0;on<$e.length;++on)Cr*=$e[on];var fn=Hf(Z,Cr);$t.flatten(et,$e,"",fn),lh(Z,fn),Z.alignment=1,Z.width=hr,Z.height=Ve,Z.channels=Xe,Z.format=Z.internalformat=sc[Xe],Z.needsFree=!0}Z.type===ao||Z.type}function _a(Z,ot,et){var xt=Z.element,Ut=Z.data,fe=Z.internalformat,ye=Z.format,Yt=Z.type,ce=Z.width,Se=Z.height;pa(Z),xt?_e.texImage2D(ot,et,ye,ye,Yt,xt):Z.compressed?_e.compressedTexImage2D(ot,et,fe,ce,Se,0,Ut):Z.needsCopy?(Dn(),_e.copyTexImage2D(ot,et,ye,Z.xOffset,Z.yOffset,ce,Se,0)):_e.texImage2D(ot,et,ye,ce,Se,0,ye,Yt,Ut||null)}function Po(Z,ot,et,xt,Ut){var fe=Z.element,ye=Z.data,Yt=Z.internalformat,ce=Z.format,Se=Z.type,nr=Z.width,Ye=Z.height;pa(Z),fe?_e.texSubImage2D(ot,Ut,et,xt,ce,Se,fe):Z.compressed?_e.compressedTexSubImage2D(ot,Ut,et,xt,Yt,nr,Ye,ye):Z.needsCopy?(Dn(),_e.copyTexSubImage2D(ot,Ut,et,xt,Z.xOffset,Z.yOffset,nr,Ye)):_e.texSubImage2D(ot,Ut,et,xt,nr,Ye,ce,Se,ye)}var wo=[];function xa(){return wo.pop()||new qi}function Oa(Z){Z.needsFree&&W.freeType(Z.data),qi.call(Z),wo.push(Z)}function ho(){vi.call(this),this.genMipmaps=!1,this.mipmapHint=ah,this.mipmask=0,this.images=Array(16)}function So(Z,ot,et){var xt=Z.images[0]=xa();Z.mipmask=1,xt.width=Z.width=ot,xt.height=Z.height=et,xt.channels=Z.channels=4}function ts(Z,ot){var et=null;if(xf(ot))et=Z.images[0]=xa(),ti(et,Z),$i(et,ot),Z.mipmask=1;else if(Sa(Z,ot),Array.isArray(ot.mipmap))for(var xt=ot.mipmap,Ut=0;Ut>=Ut,et.height>>=Ut,$i(et,xt[Ut]),Z.mipmask|=1<=0&&!("faces"in ot)&&(Z.genMipmaps=!0)}if("mag"in ot){var xt=ot.mag;Z.magFilter=Ui[xt]}var Ut=Z.wrapS,fe=Z.wrapT;if("wrap"in ot){var ye=ot.wrap;typeof ye=="string"?Ut=fe=Yi[ye]:Array.isArray(ye)&&(Ut=Yi[ye[0]],fe=Yi[ye[1]])}else{if("wrapS"in ot){var Yt=ot.wrapS;Ut=Yi[Yt]}if("wrapT"in ot){var ce=ot.wrapT;fe=Yi[ce]}}if(Z.wrapS=Ut,Z.wrapT=fe,"anisotropic"in ot&&(ot.anisotropic,Z.anisotropic=ot.anisotropic),"mipmap"in ot){var Se=!1;switch(typeof ot.mipmap){case"string":Z.mipmapHint=ni[ot.mipmap],Z.genMipmaps=!0,Se=!0;break;case"boolean":Se=Z.genMipmaps=ot.mipmap;break;case"object":Z.genMipmaps=!1,Se=!0;break}Se&&!("min"in ot)&&(Z.minFilter=Xl)}}function pc(Z,ot){_e.texParameteri(ot,Gu,Z.minFilter),_e.texParameteri(ot,Mu,Z.magFilter),_e.texParameteri(ot,Ts,Z.wrapS),_e.texParameteri(ot,Ls,Z.wrapT),kr.ext_texture_filter_anisotropic&&_e.texParameteri(ot,Dl,Z.anisotropic),Z.genMipmaps&&(_e.hint(Jc,Z.mipmapHint),_e.generateMipmap(ot))}var yc=0,yu={},hu=Lr.maxTextureUnits,ku=Array(hu).map(function(){return null});function Bo(Z){vi.call(this),this.mipmask=0,this.internalformat=Ja,this.id=yc++,this.refCount=1,this.target=Z,this.texture=_e.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new fl,gn.profile&&(this.stats={size:0})}function Tu(Z){_e.activeTexture(oh),_e.bindTexture(Z.target,Z.texture)}function ol(){var Z=ku[0];Z?_e.bindTexture(Z.target,Z.texture):_e.bindTexture(Zn,null)}function Cu(Z){var ot=Z.texture,et=Z.unit,xt=Z.target;et>=0&&(_e.activeTexture(oh+et),_e.bindTexture(xt,null),ku[et]=null),_e.deleteTexture(ot),Z.texture=null,Z.params=null,Z.pixels=null,Z.refCount=0,delete yu[Z.id],Jn.textureCount--}c(Bo.prototype,{bind:function(){var Z=this;Z.bindCount+=1;var ot=Z.unit;if(ot<0){for(var et=0;et0)continue;xt.unit=-1}ku[et]=Z,ot=et;break}gn.profile&&Jn.maxTextureUnits>tr)-nr,lr.height=lr.height||(et.height>>tr)-Ye,Tu(et),Po(lr,Zn,nr,Ye,tr),ol(),Oa(lr),xt}function fe(ye,Yt){var ce=ye|0,Se=Yt|0||ce;if(ce===et.width&&Se===et.height)return xt;xt.width=et.width=ce,xt.height=et.height=Se,Tu(et);for(var nr=0;et.mipmask>>nr;++nr){var Ye=ce>>nr,tr=Se>>nr;if(!Ye||!tr)break;_e.texImage2D(Zn,nr,et.format,Ye,tr,0,et.format,et.type,null)}return ol(),gn.profile&&(et.stats.size=Sh(et.internalformat,et.type,ce,Se,!1,!1)),xt}return xt(Z,ot),xt.subimage=Ut,xt.resize=fe,xt._reglType="texture2d",xt._texture=et,gn.profile&&(xt.stats=et.stats),xt.destroy=function(){et.decRef()},xt}function Eo(Z,ot,et,xt,Ut,fe){var ye=new Bo(Ca);yu[ye.id]=ye,Jn.cubeCount++;var Yt=new Array(6);function ce(Ye,tr,lr,hr,Ve,Xe){var $e,Cr=ye.texInfo;for(fl.call(Cr),$e=0;$e<6;++$e)Yt[$e]=us();if(typeof Ye=="number"||!Ye){var on=Ye|0||1;for($e=0;$e<6;++$e)So(Yt[$e],on,on)}else if(typeof Ye=="object")if(tr)ts(Yt[0],Ye),ts(Yt[1],tr),ts(Yt[2],lr),ts(Yt[3],hr),ts(Yt[4],Ve),ts(Yt[5],Xe);else if(Eu(Cr,Ye),Sa(ye,Ye),"faces"in Ye){var fn=Ye.faces;for($e=0;$e<6;++$e)ti(Yt[$e],ye),ts(Yt[$e],fn[$e])}else for($e=0;$e<6;++$e)ts(Yt[$e],Ye);for(ti(ye,Yt[0]),Cr.genMipmaps?ye.mipmask=(Yt[0].width<<1)-1:ye.mipmask=Yt[0].mipmask,ye.internalformat=Yt[0].internalformat,ce.width=Yt[0].width,ce.height=Yt[0].height,Tu(ye),$e=0;$e<6;++$e)Nl(Yt[$e],Ri+$e);for(pc(Cr,Ca),ol(),gn.profile&&(ye.stats.size=Sh(ye.internalformat,ye.type,ce.width,ce.height,Cr.genMipmaps,!0)),ce.format=Oi[ye.internalformat],ce.type=_i[ye.type],ce.mag=Qn[Cr.magFilter],ce.min=Ma[Cr.minFilter],ce.wrapS=ca[Cr.wrapS],ce.wrapT=ca[Cr.wrapT],$e=0;$e<6;++$e)wu(Yt[$e]);return ce}function Se(Ye,tr,lr,hr,Ve){var Xe=lr|0,$e=hr|0,Cr=Ve|0,on=xa();return ti(on,ye),on.width=0,on.height=0,$i(on,tr),on.width=on.width||(ye.width>>Cr)-Xe,on.height=on.height||(ye.height>>Cr)-$e,Tu(ye),Po(on,Ri+Ye,Xe,$e,Cr),ol(),Oa(on),ce}function nr(Ye){var tr=Ye|0;if(tr!==ye.width){ce.width=ye.width=tr,ce.height=ye.height=tr,Tu(ye);for(var lr=0;lr<6;++lr)for(var hr=0;ye.mipmask>>hr;++hr)_e.texImage2D(Ri+lr,hr,ye.format,tr>>hr,tr>>hr,0,ye.format,ye.type,null);return ol(),gn.profile&&(ye.stats.size=Sh(ye.internalformat,ye.type,ce.width,ce.height,!1,!0)),ce}}return ce(Z,ot,et,xt,Ut,fe),ce.subimage=Se,ce.resize=nr,ce._reglType="textureCube",ce._texture=ye,gn.profile&&(ce.stats=ye.stats),ce.destroy=function(){ye.decRef()},ce}function Ss(){for(var Z=0;Z>xt,et.height>>xt,0,et.internalformat,et.type,null);else for(var Ut=0;Ut<6;++Ut)_e.texImage2D(Ri+Ut,xt,et.internalformat,et.width>>xt,et.height>>xt,0,et.internalformat,et.type,null);pc(et.texInfo,et.target)})}function yl(){for(var Z=0;Z=0?wu=!0:Yi.indexOf(fl)>=0&&(wu=!1))),("depthTexture"in Bo||"depthStencilTexture"in Bo)&&(ku=!!(Bo.depthTexture||Bo.depthStencilTexture)),"depth"in Bo&&(typeof Bo.depth=="boolean"?Nl=Bo.depth:(yc=Bo.depth,Al=!1)),"stencil"in Bo&&(typeof Bo.stencil=="boolean"?Al=Bo.stencil:(yu=Bo.stencil,Nl=!1)),"depthStencil"in Bo&&(typeof Bo.depthStencil=="boolean"?Nl=Al=Bo.depthStencil:(hu=Bo.depthStencil,Nl=!1,Al=!1))}var ol=null,Cu=null,xc=null,Eo=null;if(Array.isArray(us))ol=us.map(wi);else if(us)ol=[wi(us)];else for(ol=new Array(pc),ho=0;ho0&&(Oa.depth=$i[0].depth,Oa.stencil=$i[0].stencil,Oa.depthStencil=$i[0].depthStencil),$i[xa]?$i[xa](Oa):$i[xa]=ti(Oa)}return c(_a,{width:ho,height:ho,color:fl})}function Po(wo){var xa,Oa=wo|0;if(Oa===_a.width)return _a;var ho=_a.color;for(xa=0;xa=ho.byteLength?So.subdata(ho):(So.destroy(),ti.buffers[wo]=null)),ti.buffers[wo]||(So=ti.buffers[wo]=oi.create(xa,Pf,!1,!0)),Oa.buffer=oi.getBuffer(So),Oa.size=Oa.buffer.dimension|0,Oa.normalized=!1,Oa.type=Oa.buffer.dtype,Oa.offset=0,Oa.stride=0,Oa.divisor=0,Oa.state=1,_a[wo]=1}else oi.getBuffer(xa)?(Oa.buffer=oi.getBuffer(xa),Oa.size=Oa.buffer.dimension|0,Oa.normalized=!1,Oa.type=Oa.buffer.dtype,Oa.offset=0,Oa.stride=0,Oa.divisor=0,Oa.state=1):oi.getBuffer(xa.buffer)?(Oa.buffer=oi.getBuffer(xa.buffer),Oa.size=(+xa.size||Oa.buffer.dimension)|0,Oa.normalized=!!xa.normalized||!1,"type"in xa?Oa.type=Vn[xa.type]:Oa.type=Oa.buffer.dtype,Oa.offset=(xa.offset||0)|0,Oa.stride=(xa.stride||0)|0,Oa.divisor=(xa.divisor||0)|0,Oa.state=1):"x"in xa&&(Oa.x=+xa.x||0,Oa.y=+xa.y||0,Oa.z=+xa.z||0,Oa.w=+xa.w||0,Oa.state=2)}for(var ts=0;ts1)for(var pa=0;pahn&&(hn=Nn.stats.uniformsCount)}),hn},Lr.getMaxAttributesCount=function(){var hn=0;return va.forEach(function(Nn){Nn.stats.attributesCount>hn&&(hn=Nn.stats.attributesCount)}),hn});function wi(){oi={},Jn={};for(var hn=0;hn>>4&15)+kr.charAt(Dn&15);return Lr}function Lh(_e){for(var kr="",Lr=-1,Dn,oi;++Lr<_e.length;)Dn=_e.charCodeAt(Lr),oi=Lr+1<_e.length?_e.charCodeAt(Lr+1):0,55296<=Dn&&Dn<=56319&&56320<=oi&&oi<=57343&&(Dn=65536+((Dn&1023)<<10)+(oi&1023),Lr++),Dn<=127?kr+=String.fromCharCode(Dn):Dn<=2047?kr+=String.fromCharCode(192|Dn>>>6&31,128|Dn&63):Dn<=65535?kr+=String.fromCharCode(224|Dn>>>12&15,128|Dn>>>6&63,128|Dn&63):Dn<=2097151&&(kr+=String.fromCharCode(240|Dn>>>18&7,128|Dn>>>12&63,128|Dn>>>6&63,128|Dn&63));return kr}function yh(_e){for(var kr=Array(_e.length>>2),Lr=0;Lr>5]|=(_e.charCodeAt(Lr/8)&255)<<24-Lr%32;return kr}function Ru(_e){for(var kr="",Lr=0;Lr<_e.length*32;Lr+=8)kr+=String.fromCharCode(_e[Lr>>5]>>>24-Lr%32&255);return kr}function eu(_e,kr){return _e>>>kr|_e<<32-kr}function xh(_e,kr){return _e>>>kr}function df(_e,kr,Lr){return _e&kr^~_e&Lr}function _h(_e,kr,Lr){return _e&kr^_e&Lr^kr&Lr}function qf(_e){return eu(_e,2)^eu(_e,13)^eu(_e,22)}function mr(_e){return eu(_e,6)^eu(_e,11)^eu(_e,25)}function Ur(_e){return eu(_e,7)^eu(_e,18)^xh(_e,3)}function _n(_e){return eu(_e,17)^eu(_e,19)^xh(_e,10)}var cn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Wn(_e,kr){var Lr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Dn=new Array(64),oi,Jn,gn,ni,Yi,Ui,va,Za,Ba,ta,wi,hn;for(_e[kr>>5]|=128<<24-kr%32,_e[(kr+64>>9<<4)+15]=kr,Ba=0;Ba<_e.length;Ba+=16){for(oi=Lr[0],Jn=Lr[1],gn=Lr[2],ni=Lr[3],Yi=Lr[4],Ui=Lr[5],va=Lr[6],Za=Lr[7],ta=0;ta<64;ta++)ta<16?Dn[ta]=_e[ta+Ba]:Dn[ta]=hi(hi(hi(_n(Dn[ta-2]),Dn[ta-7]),Ur(Dn[ta-15])),Dn[ta-16]),wi=hi(hi(hi(hi(Za,mr(Yi)),df(Yi,Ui,va)),cn[ta]),Dn[ta]),hn=hi(qf(oi),_h(oi,Jn,gn)),Za=va,va=Ui,Ui=Yi,Yi=hi(ni,wi),ni=gn,gn=Jn,Jn=oi,oi=hi(wi,hn);Lr[0]=hi(oi,Lr[0]),Lr[1]=hi(Jn,Lr[1]),Lr[2]=hi(gn,Lr[2]),Lr[3]=hi(ni,Lr[3]),Lr[4]=hi(Yi,Lr[4]),Lr[5]=hi(Ui,Lr[5]),Lr[6]=hi(va,Lr[6]),Lr[7]=hi(Za,Lr[7])}return Lr}function hi(_e,kr){var Lr=(_e&65535)+(kr&65535),Dn=(_e>>16)+(kr>>16)+(Lr>>16);return Dn<<16|Lr&65535}function ea(_e){return Array.prototype.slice.call(_e)}function ga(_e){return ea(_e).join("")}function Ra(_e){var kr=_e&&_e.cache,Lr=0,Dn=[],oi=[],Jn=[];function gn(wi,hn){var Nn=hn&&hn.stable;if(!Nn){for(var Oi=0;Oi0&&(wi.push(_i,"="),wi.push.apply(wi,ea(arguments)),wi.push(";")),_i}return c(hn,{def:Oi,toString:function(){return ga([Nn.length>0?"var "+Nn.join(",")+";":"",ga(wi)])}})}function Yi(){var wi=ni(),hn=ni(),Nn=wi.toString,Oi=hn.toString;function _i(Qn,Ma){hn(Qn,Ma,"=",wi.def(Qn,Ma),";")}return c(function(){wi.apply(wi,ea(arguments))},{def:wi.def,entry:wi,exit:hn,save:_i,set:function(Qn,Ma,ca){_i(Qn,Ma),wi(Qn,Ma,"=",ca,";")},toString:function(){return Nn()+Oi()}})}function Ui(){var wi=ga(arguments),hn=Yi(),Nn=Yi(),Oi=hn.toString,_i=Nn.toString;return c(hn,{then:function(){return hn.apply(hn,ea(arguments)),this},else:function(){return Nn.apply(Nn,ea(arguments)),this},toString:function(){var Qn=_i();return Qn&&(Qn="else{"+Qn+"}"),ga(["if(",wi,"){",Oi(),"}",Qn])}})}var va=ni(),Za={};function Ba(wi,hn){var Nn=[];function Oi(){var Ua="a"+Nn.length;return Nn.push(Ua),Ua}hn=hn||0;for(var _i=0;_i":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},mi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ti={cw:ue,ccw:Me};function Ii(_e){return Array.isArray(_e)||Kr(_e)||rn(_e)}function Wi(_e){return _e.sort(function(kr,Lr){return kr===Zu?-1:Lr===Zu?1:kr=1,Dn>=2,kr)}else if(Lr===os){var oi=_e.data;return new Yn(oi.thisDep,oi.contextDep,oi.propDep,kr)}else{if(Lr===fs)return new Yn(!1,!1,!1,kr);if(Lr===no){for(var Jn=!1,gn=!1,ni=!1,Yi=0;Yi<_e.data.length;++Yi){var Ui=_e.data[Yi];if(Ui.type===eo)ni=!0;else if(Ui.type===rs)gn=!0;else if(Ui.type===Zo)Jn=!0;else if(Ui.type===Ji){Jn=!0;var va=Ui.data;va>=1&&(gn=!0),va>=2&&(ni=!0)}else Ui.type===os&&(Jn=Jn||Ui.data.thisDep,gn=gn||Ui.data.contextDep,ni=ni||Ui.data.propDep)}return new Yn(Jn,gn,ni,kr)}else return new Yn(Lr===Zo,Lr===rs,Lr===eo,kr)}}var Lo=new Yn(!1,!1,!1,function(){});function Fo(_e,kr,Lr,Dn,oi,Jn,gn,ni,Yi,Ui,va,Za,Ba,ta,wi,hn){var Nn=Ui.Record,Oi={add:32774,subtract:32778,"reverse subtract":32779};Lr.ext_blend_minmax&&(Oi.min=Le,Oi.max=Be);var _i=Lr.angle_instanced_arrays,Qn=Lr.webgl_draw_buffers,Ma=Lr.oes_vertex_array_object,ca={dirty:!0,profile:hn.profile},Ua={},vi=[],ti={},Sa={};function pa(Yt){return Yt.replace(".","_")}function qi(Yt,ce,Se){var nr=pa(Yt);vi.push(Yt),Ua[nr]=ca[nr]=!!Se,ti[nr]=ce}function $i(Yt,ce,Se){var nr=pa(Yt);vi.push(Yt),Array.isArray(Se)?(ca[nr]=Se.slice(),Ua[nr]=Se.slice()):ca[nr]=Ua[nr]=Se,Sa[nr]=ce}function _a(Yt){return!!isNaN(Yt)}qi(qa,Nr),qi(ds,Ir),$i(tl,"blendColor",[0,0,0,0]),$i(Pl,"blendEquationSeparate",[Xr,Xr]),$i(iu,"blendFuncSeparate",[en,Mr,en,Mr]),qi(Hl,mn,!0),$i(au,"depthFunc",vn),$i(ml,"depthRange",[0,1]),$i(qu,"depthMask",!0),$i(Lu,Lu,[!0,!0,!0,!0]),qi(uu,wr),$i(zo,"cullFace",jt),$i(Ms,Ms,Me),$i($l,$l,1),qi(Fl,Bn),$i(vc,"polygonOffset",[0,0]),qi(Hc,ri),qi(Pc,Fi),$i(Ph,"sampleCoverage",[1,!1]),qi(Wc,tn),$i(zh,"stencilMask",-1),$i(Iu,"stencilFunc",[sr,0,-1]),$i(Ih,"stencilOpSeparate",[At,ir,ir,ir]),$i(es,"stencilOpSeparate",[jt,ir,ir,ir]),qi(zs,zn),$i(qc,"scissor",[0,0,_e.drawingBufferWidth,_e.drawingBufferHeight]),$i(Zu,Zu,[0,0,_e.drawingBufferWidth,_e.drawingBufferHeight]);var Po={gl:_e,context:Ba,strings:kr,next:Ua,current:ca,draw:Za,elements:Jn,buffer:oi,shader:va,attributes:Ui.state,vao:Ui,uniforms:Yi,framebuffer:ni,extensions:Lr,timer:ta,isBufferArgs:Ii},wo={primTypes:ui,compareFuncs:Un,blendFuncs:Bi,blendEquations:Oi,stencilOps:mi,glTypes:Vn,orientationType:Ti};Qn&&(wo.backBuffer=[jt],wo.drawBuffer=h(Dn.maxDrawbuffers,function(Yt){return Yt===0?[0]:h(Yt,function(ce){return On+ce})}));var xa=0;function Oa(){var Yt=Ra({cache:wi}),ce=Yt.link,Se=Yt.global;Yt.id=xa++,Yt.batchId="0";var nr=ce(Po),Ye=Yt.shared={props:"a0"};Object.keys(Po).forEach(function(Xe){Ye[Xe]=Se.def(nr,".",Xe)});var tr=Yt.next={},lr=Yt.current={};Object.keys(Sa).forEach(function(Xe){Array.isArray(ca[Xe])&&(tr[Xe]=Se.def(Ye.next,".",Xe),lr[Xe]=Se.def(Ye.current,".",Xe))});var hr=Yt.constants={};Object.keys(wo).forEach(function(Xe){hr[Xe]=Se.def(JSON.stringify(wo[Xe]))}),Yt.invoke=function(Xe,$e){switch($e.type){case Ji:var Cr=["this",Ye.context,Ye.props,Yt.batchId];return Xe.def(ce($e.data),".call(",Cr.slice(0,Math.max($e.data.length+1,4)),")");case eo:return Xe.def(Ye.props,$e.data);case rs:return Xe.def(Ye.context,$e.data);case Zo:return Xe.def("this",$e.data);case os:return $e.data.append(Yt,Xe),$e.data.ref;case fs:return $e.data.toString();case no:return $e.data.map(function(on){return Yt.invoke(Xe,on)})}},Yt.attribCache={};var Ve={};return Yt.scopeAttrib=function(Xe){var $e=kr.id(Xe);if($e in Ve)return Ve[$e];var Cr=Ui.scope[$e];Cr||(Cr=Ui.scope[$e]=new Nn);var on=Ve[$e]=ce(Cr);return on},Yt}function ho(Yt){var ce=Yt.static,Se=Yt.dynamic,nr;if(Zf in ce){var Ye=!!ce[Zf];nr=Ha(function(lr,hr){return Ye}),nr.enable=Ye}else if(Zf in Se){var tr=Se[Zf];nr=ro(tr,function(lr,hr){return lr.invoke(hr,tr)})}return nr}function So(Yt,ce){var Se=Yt.static,nr=Yt.dynamic;if(qt in Se){var Ye=Se[qt];return Ye?(Ye=ni.getFramebuffer(Ye),Ha(function(lr,hr){var Ve=lr.link(Ye),Xe=lr.shared;hr.set(Xe.framebuffer,".next",Ve);var $e=Xe.context;return hr.set($e,"."+Dr,Ve+".width"),hr.set($e,"."+ln,Ve+".height"),Ve})):Ha(function(lr,hr){var Ve=lr.shared;hr.set(Ve.framebuffer,".next","null");var Xe=Ve.context;return hr.set(Xe,"."+Dr,Xe+"."+xe),hr.set(Xe,"."+ln,Xe+"."+Ae),"null"})}else if(qt in nr){var tr=nr[qt];return ro(tr,function(lr,hr){var Ve=lr.invoke(hr,tr),Xe=lr.shared,$e=Xe.framebuffer,Cr=hr.def($e,".getFramebuffer(",Ve,")");hr.set($e,".next",Cr);var on=Xe.context;return hr.set(on,"."+Dr,Cr+"?"+Cr+".width:"+on+"."+xe),hr.set(on,"."+ln,Cr+"?"+Cr+".height:"+on+"."+Ae),Cr})}else return null}function ts(Yt,ce,Se){var nr=Yt.static,Ye=Yt.dynamic;function tr(Ve){if(Ve in nr){var Xe=nr[Ve],$e=!0,Cr=Xe.x|0,on=Xe.y|0,fn,fi;return"width"in Xe?fn=Xe.width|0:$e=!1,"height"in Xe?fi=Xe.height|0:$e=!1,new Yn(!$e&&ce&&ce.thisDep,!$e&&ce&&ce.contextDep,!$e&&ce&&ce.propDep,function(Mi,di){var Ki=Mi.shared.context,Ai=fn;"width"in Xe||(Ai=di.def(Ki,".",Dr,"-",Cr));var Si=fi;return"height"in Xe||(Si=di.def(Ki,".",ln,"-",on)),[Cr,on,Ai,Si]})}else if(Ve in Ye){var si=Ye[Ve],Gn=ro(si,function(Mi,di){var Ki=Mi.invoke(di,si),Ai=Mi.shared.context,Si=di.def(Ki,".x|0"),sa=di.def(Ki,".y|0"),Qa=di.def('"width" in ',Ki,"?",Ki,".width|0:","(",Ai,".",Dr,"-",Si,")"),so=di.def('"height" in ',Ki,"?",Ki,".height|0:","(",Ai,".",ln,"-",sa,")");return[Si,sa,Qa,so]});return ce&&(Gn.thisDep=Gn.thisDep||ce.thisDep,Gn.contextDep=Gn.contextDep||ce.contextDep,Gn.propDep=Gn.propDep||ce.propDep),Gn}else return ce?new Yn(ce.thisDep,ce.contextDep,ce.propDep,function(Mi,di){var Ki=Mi.shared.context;return[0,0,di.def(Ki,".",Dr),di.def(Ki,".",ln)]}):null}var lr=tr(Zu);if(lr){var hr=lr;lr=new Yn(lr.thisDep,lr.contextDep,lr.propDep,function(Ve,Xe){var $e=hr.append(Ve,Xe),Cr=Ve.shared.context;return Xe.set(Cr,"."+Sn,$e[2]),Xe.set(Cr,"."+Xt,$e[3]),$e})}return{viewport:lr,scissor_box:tr(qc)}}function Nl(Yt,ce){var Se=Yt.static,nr=typeof Se[ht]=="string"&&typeof Se[I]=="string";if(nr){if(Object.keys(ce.dynamic).length>0)return null;var Ye=ce.static,tr=Object.keys(Ye);if(tr.length>0&&typeof Ye[tr[0]]=="number"){for(var lr=[],hr=0;hr"+Si+"?"+$e+".constant["+Si+"]:0;"}).join(""),"}}else{","if(",fn,"(",$e,".buffer)){",Mi,"=",fi,".createStream(",Ie,",",$e,".buffer);","}else{",Mi,"=",fi,".getBuffer(",$e,".buffer);","}",di,'="type" in ',$e,"?",on.glTypes,"[",$e,".type]:",Mi,".dtype;",si.normalized,"=!!",$e,".normalized;");function Ki(Ai){Xe(si[Ai],"=",$e,".",Ai,"|0;")}return Ki("size"),Ki("offset"),Ki("stride"),Ki("divisor"),Xe("}}"),Xe.exit("if(",si.isStream,"){",fi,".destroyStream(",Mi,");","}"),si}Ye[tr]=ro(lr,hr)}),Ye}function pc(Yt){var ce=Yt.static,Se=Yt.dynamic,nr={};return Object.keys(ce).forEach(function(Ye){var tr=ce[Ye];nr[Ye]=Ha(function(lr,hr){return typeof tr=="number"||typeof tr=="boolean"?""+tr:lr.link(tr)})}),Object.keys(Se).forEach(function(Ye){var tr=Se[Ye];nr[Ye]=ro(tr,function(lr,hr){return lr.invoke(hr,tr)})}),nr}function yc(Yt,ce,Se,nr,Ye){Yt.static,Yt.dynamic;var tr=Nl(Yt,ce),lr=So(Yt),hr=ts(Yt,lr),Ve=us(Yt),Xe=wu(Yt),$e=Al(Yt,Ye,tr);function Cr(Mi){var di=hr[Mi];di&&(Xe[Mi]=di)}Cr(Zu),Cr(pa(qc));var on=Object.keys(Xe).length>0,fn={framebuffer:lr,draw:Ve,shader:$e,state:Xe,dirty:on,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(fn.profile=ho(Yt),fn.uniforms=fl(Se),fn.drawVAO=fn.scopeVAO=Ve.vao,!fn.drawVAO&&$e.program&&!tr&&Lr.angle_instanced_arrays&&Ve.static.elements){var fi=!0,si=$e.program.attributes.map(function(Mi){var di=ce.static[Mi];return fi=fi&&!!di,di});if(fi&&si.length>0){var Gn=Ui.getVAO(Ui.createVAO({attributes:si,elements:Ve.static.elements}));fn.drawVAO=new Yn(null,null,null,function(Mi,di){return Mi.link(Gn)}),fn.useVAO=!0}}return tr?fn.useVAO=!0:fn.attributes=Eu(ce),fn.context=pc(nr),fn}function yu(Yt,ce,Se){var nr=Yt.shared,Ye=nr.context,tr=Yt.scope();Object.keys(Se).forEach(function(lr){ce.save(Ye,"."+lr);var hr=Se[lr],Ve=hr.append(Yt,ce);Array.isArray(Ve)?tr(Ye,".",lr,"=[",Ve.join(),"];"):tr(Ye,".",lr,"=",Ve,";")}),ce(tr)}function hu(Yt,ce,Se,nr){var Ye=Yt.shared,tr=Ye.gl,lr=Ye.framebuffer,hr;Qn&&(hr=ce.def(Ye.extensions,".webgl_draw_buffers"));var Ve=Yt.constants,Xe=Ve.drawBuffer,$e=Ve.backBuffer,Cr;Se?Cr=Se.append(Yt,ce):Cr=ce.def(lr,".next"),nr||ce("if(",Cr,"!==",lr,".cur){"),ce("if(",Cr,"){",tr,".bindFramebuffer(",In,",",Cr,".framebuffer);"),Qn&&ce(hr,".drawBuffersWEBGL(",Xe,"[",Cr,".colorAttachments.length]);"),ce("}else{",tr,".bindFramebuffer(",In,",null);"),Qn&&ce(hr,".drawBuffersWEBGL(",$e,");"),ce("}",lr,".cur=",Cr,";"),nr||ce("}")}function ku(Yt,ce,Se){var nr=Yt.shared,Ye=nr.gl,tr=Yt.current,lr=Yt.next,hr=nr.current,Ve=nr.next,Xe=Yt.cond(hr,".dirty");vi.forEach(function($e){var Cr=pa($e);if(!(Cr in Se.state)){var on,fn;if(Cr in lr){on=lr[Cr],fn=tr[Cr];var fi=h(ca[Cr].length,function(Gn){return Xe.def(on,"[",Gn,"]")});Xe(Yt.cond(fi.map(function(Gn,Mi){return Gn+"!=="+fn+"["+Mi+"]"}).join("||")).then(Ye,".",Sa[Cr],"(",fi,");",fi.map(function(Gn,Mi){return fn+"["+Mi+"]="+Gn}).join(";"),";"))}else{on=Xe.def(Ve,".",Cr);var si=Yt.cond(on,"!==",hr,".",Cr);Xe(si),Cr in ti?si(Yt.cond(on).then(Ye,".enable(",ti[Cr],");").else(Ye,".disable(",ti[Cr],");"),hr,".",Cr,"=",on,";"):si(Ye,".",Sa[Cr],"(",on,");",hr,".",Cr,"=",on,";")}}}),Object.keys(Se.state).length===0&&Xe(hr,".dirty=false;"),ce(Xe)}function Bo(Yt,ce,Se,nr){var Ye=Yt.shared,tr=Yt.current,lr=Ye.current,hr=Ye.gl,Ve;Wi(Object.keys(Se)).forEach(function(Xe){var $e=Se[Xe];if(!(nr&&!nr($e))){var Cr=$e.append(Yt,ce);if(ti[Xe]){var on=ti[Xe];ja($e)?(Ve=Yt.link(Cr,{stable:!0}),ce(Yt.cond(Ve).then(hr,".enable(",on,");").else(hr,".disable(",on,");")),ce(lr,".",Xe,"=",Ve,";")):(ce(Yt.cond(Cr).then(hr,".enable(",on,");").else(hr,".disable(",on,");")),ce(lr,".",Xe,"=",Cr,";"))}else if(Pn(Cr)){var fn=tr[Xe];ce(hr,".",Sa[Xe],"(",Cr,");",Cr.map(function(fi,si){return fn+"["+si+"]="+fi}).join(";"),";")}else ja($e)?(Ve=Yt.link(Cr,{stable:!0}),ce(hr,".",Sa[Xe],"(",Ve,");",lr,".",Xe,"=",Ve,";")):ce(hr,".",Sa[Xe],"(",Cr,");",lr,".",Xe,"=",Cr,";")}})}function Tu(Yt,ce){_i&&(Yt.instancing=ce.def(Yt.shared.extensions,".angle_instanced_arrays"))}function ol(Yt,ce,Se,nr,Ye){var tr=Yt.shared,lr=Yt.stats,hr=tr.current,Ve=tr.timer,Xe=Se.profile;function $e(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Cr,on;function fn(Ki){Cr=ce.def(),Ki(Cr,"=",$e(),";"),typeof Ye=="string"?Ki(lr,".count+=",Ye,";"):Ki(lr,".count++;"),ta&&(nr?(on=ce.def(),Ki(on,"=",Ve,".getNumPendingQueries();")):Ki(Ve,".beginQuery(",lr,");"))}function fi(Ki){Ki(lr,".cpuTime+=",$e(),"-",Cr,";"),ta&&(nr?Ki(Ve,".pushScopeStats(",on,",",Ve,".getNumPendingQueries(),",lr,");"):Ki(Ve,".endQuery();"))}function si(Ki){var Ai=ce.def(hr,".profile");ce(hr,".profile=",Ki,";"),ce.exit(hr,".profile=",Ai,";")}var Gn;if(Xe){if(ja(Xe)){Xe.enable?(fn(ce),fi(ce.exit),si("true")):si("false");return}Gn=Xe.append(Yt,ce),si(Gn)}else Gn=ce.def(hr,".profile");var Mi=Yt.block();fn(Mi),ce("if(",Gn,"){",Mi,"}");var di=Yt.block();fi(di),ce.exit("if(",Gn,"){",di,"}")}function Cu(Yt,ce,Se,nr,Ye){var tr=Yt.shared;function lr(Ve){switch(Ve){case ha:case Mo:case Os:return 2;case ka:case hs:case bl:return 3;case io:case hl:case Su:return 4;default:return 1}}function hr(Ve,Xe,$e){var Cr=tr.gl,on=ce.def(Ve,".location"),fn=ce.def(tr.attributes,"[",on,"]"),fi=$e.state,si=$e.buffer,Gn=[$e.x,$e.y,$e.z,$e.w],Mi=["buffer","normalized","offset","stride"];function di(){ce("if(!",fn,".buffer){",Cr,".enableVertexAttribArray(",on,");}");var Ai=$e.type,Si;if($e.size?Si=ce.def($e.size,"||",Xe):Si=Xe,ce("if(",fn,".type!==",Ai,"||",fn,".size!==",Si,"||",Mi.map(function(Qa){return fn+"."+Qa+"!=="+$e[Qa]}).join("||"),"){",Cr,".bindBuffer(",Ie,",",si,".buffer);",Cr,".vertexAttribPointer(",[on,Si,Ai,$e.normalized,$e.stride,$e.offset],");",fn,".type=",Ai,";",fn,".size=",Si,";",Mi.map(function(Qa){return fn+"."+Qa+"="+$e[Qa]+";"}).join(""),"}"),_i){var sa=$e.divisor;ce("if(",fn,".divisor!==",sa,"){",Yt.instancing,".vertexAttribDivisorANGLE(",[on,sa],");",fn,".divisor=",sa,";}")}}function Ki(){ce("if(",fn,".buffer){",Cr,".disableVertexAttribArray(",on,");",fn,".buffer=null;","}if(",$a.map(function(Ai,Si){return fn+"."+Ai+"!=="+Gn[Si]}).join("||"),"){",Cr,".vertexAttrib4f(",on,",",Gn,");",$a.map(function(Ai,Si){return fn+"."+Ai+"="+Gn[Si]+";"}).join(""),"}")}fi===za?di():fi===wa?Ki():(ce("if(",fi,"===",za,"){"),di(),ce("}else{"),Ki(),ce("}"))}nr.forEach(function(Ve){var Xe=Ve.name,$e=Se.attributes[Xe],Cr;if($e){if(!Ye($e))return;Cr=$e.append(Yt,ce)}else{if(!Ye(Lo))return;var on=Yt.scopeAttrib(Xe);Cr={},Object.keys(new Nn).forEach(function(fn){Cr[fn]=ce.def(on,".",fn)})}hr(Yt.link(Ve),lr(Ve.info.type),Cr)})}function xc(Yt,ce,Se,nr,Ye,tr){for(var lr=Yt.shared,hr=lr.gl,Ve,Xe=0;Xe1){for(var Vo=[],vs=[],zl=0;zl>1)",si],");")}function sa(){Se(Gn,".drawArraysInstancedANGLE(",[on,fn,fi,si],");")}$e&&$e!=="null"?di?Si():(Se("if(",$e,"){"),Si(),Se("}else{"),sa(),Se("}")):sa()}function Ai(){function Si(){Se(tr+".drawElements("+[on,fi,Mi,fn+"<<(("+Mi+"-"+ua+")>>1)"]+");")}function sa(){Se(tr+".drawArrays("+[on,fn,fi]+");")}$e&&$e!=="null"?di?Si():(Se("if(",$e,"){"),Si(),Se("}else{"),sa(),Se("}")):sa()}_i&&(typeof si!="number"||si>=0)?typeof si=="string"?(Se("if(",si,">0){"),Ki(),Se("}else if(",si,"<0){"),Ai(),Se("}")):Ki():Ai()}function Ss(Yt,ce,Se,nr,Ye){var tr=Oa(),lr=tr.proc("body",Ye);return _i&&(tr.instancing=lr.def(tr.shared.extensions,".angle_instanced_arrays")),Yt(tr,lr,Se,nr),tr.compile().body}function Ml(Yt,ce,Se,nr){Tu(Yt,ce),Se.useVAO?Se.drawVAO?ce(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,ce),");"):ce(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(ce(Yt.shared.vao,".setVAO(null);"),Cu(Yt,ce,Se,nr.attributes,function(){return!0})),xc(Yt,ce,Se,nr.uniforms,function(){return!0},!1),Eo(Yt,ce,ce,Se)}function yl(Yt,ce){var Se=Yt.proc("draw",1);Tu(Yt,Se),yu(Yt,Se,ce.context),hu(Yt,Se,ce.framebuffer),ku(Yt,Se,ce),Bo(Yt,Se,ce.state),ol(Yt,Se,ce,!1,!0);var nr=ce.shader.progVar.append(Yt,Se);if(Se(Yt.shared.gl,".useProgram(",nr,".program);"),ce.shader.program)Ml(Yt,Se,ce,ce.shader.program);else{Se(Yt.shared.vao,".setVAO(null);");var Ye=Yt.global.def("{}"),tr=Se.def(nr,".id"),lr=Se.def(Ye,"[",tr,"]");Se(Yt.cond(lr).then(lr,".call(this,a0);").else(lr,"=",Ye,"[",tr,"]=",Yt.link(function(hr){return Ss(Ml,Yt,ce,hr,1)}),"(",nr,");",lr,".call(this,a0);"))}Object.keys(ce.state).length>0&&Se(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Se(Yt.shared.vao,".setVAO(null);")}function Z(Yt,ce,Se,nr){Yt.batchId="a1",Tu(Yt,ce);function Ye(){return!0}Cu(Yt,ce,Se,nr.attributes,Ye),xc(Yt,ce,Se,nr.uniforms,Ye,!1),Eo(Yt,ce,ce,Se)}function ot(Yt,ce,Se,nr){Tu(Yt,ce);var Ye=Se.contextDep,tr=ce.def(),lr="a0",hr="a1",Ve=ce.def();Yt.shared.props=Ve,Yt.batchId=tr;var Xe=Yt.scope(),$e=Yt.scope();ce(Xe.entry,"for(",tr,"=0;",tr,"<",hr,";++",tr,"){",Ve,"=",lr,"[",tr,"];",$e,"}",Xe.exit);function Cr(Mi){return Mi.contextDep&&Ye||Mi.propDep}function on(Mi){return!Cr(Mi)}if(Se.needsContext&&yu(Yt,$e,Se.context),Se.needsFramebuffer&&hu(Yt,$e,Se.framebuffer),Bo(Yt,$e,Se.state,Cr),Se.profile&&Cr(Se.profile)&&ol(Yt,$e,Se,!1,!0),nr)Se.useVAO?Se.drawVAO?Cr(Se.drawVAO)?$e(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,$e),");"):Xe(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,Xe),");"):Xe(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(Xe(Yt.shared.vao,".setVAO(null);"),Cu(Yt,Xe,Se,nr.attributes,on),Cu(Yt,$e,Se,nr.attributes,Cr)),xc(Yt,Xe,Se,nr.uniforms,on,!1),xc(Yt,$e,Se,nr.uniforms,Cr,!0),Eo(Yt,Xe,$e,Se);else{var fn=Yt.global.def("{}"),fi=Se.shader.progVar.append(Yt,$e),si=$e.def(fi,".id"),Gn=$e.def(fn,"[",si,"]");$e(Yt.shared.gl,".useProgram(",fi,".program);","if(!",Gn,"){",Gn,"=",fn,"[",si,"]=",Yt.link(function(Mi){return Ss(Z,Yt,Se,Mi,2)}),"(",fi,");}",Gn,".call(this,a0[",tr,"],",tr,");")}}function et(Yt,ce){var Se=Yt.proc("batch",2);Yt.batchId="0",Tu(Yt,Se);var nr=!1,Ye=!0;Object.keys(ce.context).forEach(function(fn){nr=nr||ce.context[fn].propDep}),nr||(yu(Yt,Se,ce.context),Ye=!1);var tr=ce.framebuffer,lr=!1;tr?(tr.propDep?nr=lr=!0:tr.contextDep&&nr&&(lr=!0),lr||hu(Yt,Se,tr)):hu(Yt,Se,null),ce.state.viewport&&ce.state.viewport.propDep&&(nr=!0);function hr(fn){return fn.contextDep&&nr||fn.propDep}ku(Yt,Se,ce),Bo(Yt,Se,ce.state,function(fn){return!hr(fn)}),(!ce.profile||!hr(ce.profile))&&ol(Yt,Se,ce,!1,"a1"),ce.contextDep=nr,ce.needsContext=Ye,ce.needsFramebuffer=lr;var Ve=ce.shader.progVar;if(Ve.contextDep&&nr||Ve.propDep)ot(Yt,Se,ce,null);else{var Xe=Ve.append(Yt,Se);if(Se(Yt.shared.gl,".useProgram(",Xe,".program);"),ce.shader.program)ot(Yt,Se,ce,ce.shader.program);else{Se(Yt.shared.vao,".setVAO(null);");var $e=Yt.global.def("{}"),Cr=Se.def(Xe,".id"),on=Se.def($e,"[",Cr,"]");Se(Yt.cond(on).then(on,".call(this,a0,a1);").else(on,"=",$e,"[",Cr,"]=",Yt.link(function(fn){return Ss(ot,Yt,ce,fn,2)}),"(",Xe,");",on,".call(this,a0,a1);"))}}Object.keys(ce.state).length>0&&Se(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Se(Yt.shared.vao,".setVAO(null);")}function xt(Yt,ce){var Se=Yt.proc("scope",3);Yt.batchId="a2";var nr=Yt.shared,Ye=nr.current;if(yu(Yt,Se,ce.context),ce.framebuffer&&ce.framebuffer.append(Yt,Se),Wi(Object.keys(ce.state)).forEach(function(hr){var Ve=ce.state[hr],Xe=Ve.append(Yt,Se);Pn(Xe)?Xe.forEach(function($e,Cr){_a($e)?Se.set(Yt.next[hr],"["+Cr+"]",$e):Se.set(Yt.next[hr],"["+Cr+"]",Yt.link($e,{stable:!0}))}):ja(Ve)?Se.set(nr.next,"."+hr,Yt.link(Xe,{stable:!0})):Se.set(nr.next,"."+hr,Xe)}),ol(Yt,Se,ce,!0,!0),[Et,ke,Vt,Oe,It].forEach(function(hr){var Ve=ce.draw[hr];if(Ve){var Xe=Ve.append(Yt,Se);_a(Xe)?Se.set(nr.draw,"."+hr,Xe):Se.set(nr.draw,"."+hr,Yt.link(Xe),{stable:!0})}}),Object.keys(ce.uniforms).forEach(function(hr){var Ve=ce.uniforms[hr].append(Yt,Se);Array.isArray(Ve)&&(Ve="["+Ve.map(function(Xe){return _a(Xe)?Xe:Yt.link(Xe,{stable:!0})})+"]"),Se.set(nr.uniforms,"["+Yt.link(kr.id(hr),{stable:!0})+"]",Ve)}),Object.keys(ce.attributes).forEach(function(hr){var Ve=ce.attributes[hr].append(Yt,Se),Xe=Yt.scopeAttrib(hr);Object.keys(new Nn).forEach(function($e){Se.set(Xe,"."+$e,Ve[$e])})}),ce.scopeVAO){var tr=ce.scopeVAO.append(Yt,Se);_a(tr)?Se.set(nr.vao,".targetVAO",tr):Se.set(nr.vao,".targetVAO",Yt.link(tr,{stable:!0}))}function lr(hr){var Ve=ce.shader[hr];if(Ve){var Xe=Ve.append(Yt,Se);_a(Xe)?Se.set(nr.shader,"."+hr,Xe):Se.set(nr.shader,"."+hr,Yt.link(Xe,{stable:!0}))}}lr(I),lr(ht),Object.keys(ce.state).length>0&&(Se(Ye,".dirty=true;"),Se.exit(Ye,".dirty=true;")),Se("a1(",Yt.shared.context,",a0,",Yt.batchId,");")}function Ut(Yt){if(!(typeof Yt!="object"||Pn(Yt))){for(var ce=Object.keys(Yt),Se=0;Se=0;--Eo){var Ss=_a[Eo];Ss&&Ss(ta,null,0)}Lr.flush(),Ui&&Ui.update()}function So(){!Oa&&_a.length>0&&(Oa=x.next(ho))}function ts(){Oa&&(x.cancel(ho),Oa=null)}function Nl(Eo){Eo.preventDefault(),ts(),Po.forEach(function(Ss){Ss()})}function Al(Eo){Lr.getError(),oi.restore(),ca.restore(),Oi.restore(),Ua.restore(),vi.restore(),ti.restore(),Qn.restore(),Ui&&Ui.restore(),Sa.procs.refresh(),So(),wo.forEach(function(Ss){Ss()})}$i&&($i.addEventListener(rl,Nl,!1),$i.addEventListener(ou,Al,!1));function us(){_a.length=0,ts(),$i&&($i.removeEventListener(rl,Nl),$i.removeEventListener(ou,Al)),ca.clear(),ti.clear(),vi.clear(),Qn.clear(),Ua.clear(),_i.clear(),Oi.clear(),Ui&&Ui.clear(),xa.forEach(function(Eo){Eo()})}function wu(Eo){function Ss(Ye){var tr=c({},Ye);delete tr.uniforms,delete tr.attributes,delete tr.context,delete tr.vao,"stencil"in tr&&tr.stencil.op&&(tr.stencil.opBack=tr.stencil.opFront=tr.stencil.op,delete tr.stencil.op);function lr(hr){if(hr in tr){var Ve=tr[hr];delete tr[hr],Object.keys(Ve).forEach(function(Xe){tr[hr+"."+Xe]=Ve[Xe]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in Ye&&(tr.vao=Ye.vao),tr}function Ml(Ye,tr){var lr={},hr={};return Object.keys(Ye).forEach(function(Ve){var Xe=Ye[Ve];if(f.isDynamic(Xe)){hr[Ve]=f.unbox(Xe,Ve);return}else if(tr&&Array.isArray(Xe)){for(var $e=0;$e0)return ye.call(this,Se(Ye|0),Ye|0)}else if(Array.isArray(Ye)){if(Ye.length)return ye.call(this,Ye,Ye.length)}else return fe.call(this,Ye)}return c(nr,{stats:xt,destroy:function(){Ut.destroy()}})}var fl=ti.setFBO=wu({framebuffer:f.define.call(null,Gl,"framebuffer")});function Eu(Eo,Ss){var Ml=0;Sa.procs.poll();var yl=Ss.color;yl&&(Lr.clearColor(+yl[0]||0,+yl[1]||0,+yl[2]||0,+yl[3]||0),Ml|=Ku),"depth"in Ss&&(Lr.clearDepth(+Ss.depth),Ml|=cu),"stencil"in Ss&&(Lr.clearStencil(Ss.stencil|0),Ml|=_o),Lr.clear(Ml)}function pc(Eo){if("framebuffer"in Eo)if(Eo.framebuffer&&Eo.framebuffer_reglType==="framebufferCube")for(var Ss=0;Ss<6;++Ss)fl(c({framebuffer:Eo.framebuffer.faces[Ss]},Eo),Eu);else fl(Eo,Eu);else Eu(null,Eo)}function yc(Eo){_a.push(Eo);function Ss(){var Ml=Ql(_a,Eo);function yl(){var Z=Ql(_a,yl);_a[Z]=_a[_a.length-1],_a.length-=1,_a.length<=0&&ts()}_a[Ml]=yl}return So(),{cancel:Ss}}function yu(){var Eo=qi.viewport,Ss=qi.scissor_box;Eo[0]=Eo[1]=Ss[0]=Ss[1]=0,ta.viewportWidth=ta.framebufferWidth=ta.drawingBufferWidth=Eo[2]=Ss[2]=Lr.drawingBufferWidth,ta.viewportHeight=ta.framebufferHeight=ta.drawingBufferHeight=Eo[3]=Ss[3]=Lr.drawingBufferHeight}function hu(){ta.tick+=1,ta.time=Bo(),yu(),Sa.procs.poll()}function ku(){Ua.refresh(),yu(),Sa.procs.refresh(),Ui&&Ui.update()}function Bo(){return(y()-va)/1e3}ku();function Tu(Eo,Ss){var Ml;switch(Eo){case"frame":return yc(Ss);case"lost":Ml=Po;break;case"restore":Ml=wo;break;case"destroy":Ml=xa;break}return Ml.push(Ss),{cancel:function(){for(var yl=0;yl=0},read:pa,destroy:us,_gl:Lr,_refresh:ku,poll:function(){hu(),Ui&&Ui.update()},now:Bo,stats:gn,getCachedCode:ol,preloadCachedCode:Cu});return kr.onDone(null,xc),xc}return bh})}),sH=Ft((Q,$)=>{var c=Cg();$.exports=function(r){if(r?typeof r=="string"&&(r={container:r}):r={},P(r)?r={container:r}:S(r)?r={container:r}:t(r)?r={gl:r}:r=c(r,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),r.pixelRatio||(r.pixelRatio=window.pixelRatio||1),r.gl)return r.gl;if(r.canvas&&(r.container=r.canvas.parentNode),r.container){if(typeof r.container=="string"){var a=document.querySelector(r.container);if(!a)throw Error("Element "+r.container+" is not found");r.container=a}P(r.container)?(r.canvas=r.container,r.container=r.canvas.parentNode):r.canvas||(r.canvas=e(),r.container.appendChild(r.canvas),g(r))}else if(!r.canvas)if(typeof document<"u")r.container=document.body||document.documentElement,r.canvas=e(),r.container.appendChild(r.canvas),g(r);else throw Error("Not DOM environment. Use headless-gl.");return r.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{r.gl=r.canvas.getContext(n,r.attrs)}catch{}return r.gl}),r.gl};function g(r){if(r.container)if(r.container==document.body)document.body.style.width||(r.canvas.width=r.width||r.pixelRatio*window.innerWidth),document.body.style.height||(r.canvas.height=r.height||r.pixelRatio*window.innerHeight);else{var a=r.container.getBoundingClientRect();r.canvas.width=r.width||a.right-a.left,r.canvas.height=r.height||a.bottom-a.top}}function P(r){return typeof r.getContext=="function"&&"width"in r&&"height"in r}function S(r){return typeof r.nodeName=="string"&&typeof r.appendChild=="function"&&typeof r.getBoundingClientRect=="function"}function t(r){return typeof r.drawArrays=="function"||typeof r.drawElements=="function"}function e(){var r=document.createElement("canvas");return r.style.position="absolute",r.style.top=0,r.style.left=0,r}}),lH=Ft((Q,$)=>{var c=$S(),g=[32,126];$.exports=P;function P(S){S=S||{};var t=S.shape?S.shape:S.canvas?[S.canvas.width,S.canvas.height]:[512,512],e=S.canvas||document.createElement("canvas"),r=S.font,a=typeof S.step=="number"?[S.step,S.step]:S.step||[32,32],n=S.chars||g;if(r&&typeof r!="string"&&(r=c(r)),!Array.isArray(n))n=String(n).split("");else if(n.length===2&&typeof n[0]=="number"&&typeof n[1]=="number"){for(var o=[],i=n[0],s=0;i<=n[1];i++)o[s++]=String.fromCharCode(i);n=o}t=t.slice(),e.width=t[0],e.height=t[1];var f=e.getContext("2d");f.fillStyle="#000",f.fillRect(0,0,e.width,e.height),f.font=r,f.textAlign="center",f.textBaseline="middle",f.fillStyle="#fff";for(var x=a[0]/2,y=a[1]/2,i=0;it[0]-a[0]/2&&(x=a[0]/2,y+=a[1]);return e}}),GS=Ft(Q=>{"use restrict";var $=32;Q.INT_BITS=$,Q.INT_MAX=2147483647,Q.INT_MIN=-1<<$-1,Q.sign=function(P){return(P>0)-(P<0)},Q.abs=function(P){var S=P>>$-1;return(P^S)-S},Q.min=function(P,S){return S^(P^S)&-(P65535)<<4,P>>>=S,t=(P>255)<<3,P>>>=t,S|=t,t=(P>15)<<2,P>>>=t,S|=t,t=(P>3)<<1,P>>>=t,S|=t,S|P>>1},Q.log10=function(P){return P>=1e9?9:P>=1e8?8:P>=1e7?7:P>=1e6?6:P>=1e5?5:P>=1e4?4:P>=1e3?3:P>=100?2:P>=10?1:0},Q.popCount=function(P){return P=P-(P>>>1&1431655765),P=(P&858993459)+(P>>>2&858993459),(P+(P>>>4)&252645135)*16843009>>>24};function c(P){var S=32;return P&=-P,P&&S--,P&65535&&(S-=16),P&16711935&&(S-=8),P&252645135&&(S-=4),P&858993459&&(S-=2),P&1431655765&&(S-=1),S}Q.countTrailingZeros=c,Q.nextPow2=function(P){return P+=P===0,--P,P|=P>>>1,P|=P>>>2,P|=P>>>4,P|=P>>>8,P|=P>>>16,P+1},Q.prevPow2=function(P){return P|=P>>>1,P|=P>>>2,P|=P>>>4,P|=P>>>8,P|=P>>>16,P-(P>>>1)},Q.parity=function(P){return P^=P>>>16,P^=P>>>8,P^=P>>>4,P&=15,27030>>>P&1};var g=new Array(256);(function(P){for(var S=0;S<256;++S){var t=S,e=S,r=7;for(t>>>=1;t;t>>>=1)e<<=1,e|=t&1,--r;P[S]=e<>>8&255]<<16|g[P>>>16&255]<<8|g[P>>>24&255]},Q.interleave2=function(P,S){return P&=65535,P=(P|P<<8)&16711935,P=(P|P<<4)&252645135,P=(P|P<<2)&858993459,P=(P|P<<1)&1431655765,S&=65535,S=(S|S<<8)&16711935,S=(S|S<<4)&252645135,S=(S|S<<2)&858993459,S=(S|S<<1)&1431655765,P|S<<1},Q.deinterleave2=function(P,S){return P=P>>>S&1431655765,P=(P|P>>>1)&858993459,P=(P|P>>>2)&252645135,P=(P|P>>>4)&16711935,P=(P|P>>>16)&65535,P<<16>>16},Q.interleave3=function(P,S,t){return P&=1023,P=(P|P<<16)&4278190335,P=(P|P<<8)&251719695,P=(P|P<<4)&3272356035,P=(P|P<<2)&1227133513,S&=1023,S=(S|S<<16)&4278190335,S=(S|S<<8)&251719695,S=(S|S<<4)&3272356035,S=(S|S<<2)&1227133513,P|=S<<1,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,P|t<<2},Q.deinterleave3=function(P,S){return P=P>>>S&1227133513,P=(P|P>>>2)&3272356035,P=(P|P>>>4)&251719695,P=(P|P>>>8)&4278190335,P=(P|P>>>16)&1023,P<<22>>22},Q.nextCombination=function(P){var S=P|P-1;return S+1|(~S&-~S)-1>>>c(P)+1}}),uH=Ft((Q,$)=>{function c(S,t,e){var r=S[e]|0;if(r<=0)return[];var a=new Array(r),n;if(e===S.length-1)for(n=0;n"u"&&(t=0),typeof S){case"number":if(S>0)return g(S|0,t);break;case"object":if(typeof S.length=="number")return c(S,t,0);break}return[]}$.exports=P}),cH=Ft(Q=>{var $=GS(),c=uH(),g=tx().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:c([32,0]),UINT16:c([32,0]),UINT32:c([32,0]),BIGUINT64:c([32,0]),INT8:c([32,0]),INT16:c([32,0]),INT32:c([32,0]),BIGINT64:c([32,0]),FLOAT:c([32,0]),DOUBLE:c([32,0]),DATA:c([32,0]),UINT8C:c([32,0]),BUFFER:c([32,0])});var P=typeof Uint8ClampedArray<"u",S=typeof BigUint64Array<"u",t=typeof BigInt64Array<"u",e=window.__TYPEDARRAY_POOL;e.UINT8C||(e.UINT8C=c([32,0])),e.BIGUINT64||(e.BIGUINT64=c([32,0])),e.BIGINT64||(e.BIGINT64=c([32,0])),e.BUFFER||(e.BUFFER=c([32,0]));var r=e.DATA,a=e.BUFFER;Q.free=function(h){if(g.isBuffer(h))a[$.log2(h.length)].push(h);else{if(Object.prototype.toString.call(h)!=="[object ArrayBuffer]"&&(h=h.buffer),!h)return;var p=h.length||h.byteLength,k=$.log2(p)|0;r[k].push(h)}};function n(h){if(h){var p=h.length||h.byteLength,k=$.log2(p);r[k].push(h)}}function o(h){n(h.buffer)}Q.freeUint8=Q.freeUint16=Q.freeUint32=Q.freeBigUint64=Q.freeInt8=Q.freeInt16=Q.freeInt32=Q.freeBigInt64=Q.freeFloat32=Q.freeFloat=Q.freeFloat64=Q.freeDouble=Q.freeUint8Clamped=Q.freeDataView=o,Q.freeArrayBuffer=n,Q.freeBuffer=function(h){a[$.log2(h.length)].push(h)},Q.malloc=function(h,p){if(p===void 0||p==="arraybuffer")return i(h);switch(p){case"uint8":return s(h);case"uint16":return f(h);case"uint32":return x(h);case"int8":return y(h);case"int16":return v(h);case"int32":return T(h);case"float":case"float32":return u(h);case"double":case"float64":return b(h);case"uint8_clamped":return _(h);case"bigint64":return M(h);case"biguint64":return C(h);case"buffer":return A(h);case"data":case"dataview":return E(h);default:return null}return null};function i(p){var p=$.nextPow2(p),k=$.log2(p),w=r[k];return w.length>0?w.pop():new ArrayBuffer(p)}Q.mallocArrayBuffer=i;function s(h){return new Uint8Array(i(h),0,h)}Q.mallocUint8=s;function f(h){return new Uint16Array(i(2*h),0,h)}Q.mallocUint16=f;function x(h){return new Uint32Array(i(4*h),0,h)}Q.mallocUint32=x;function y(h){return new Int8Array(i(h),0,h)}Q.mallocInt8=y;function v(h){return new Int16Array(i(2*h),0,h)}Q.mallocInt16=v;function T(h){return new Int32Array(i(4*h),0,h)}Q.mallocInt32=T;function u(h){return new Float32Array(i(4*h),0,h)}Q.mallocFloat32=Q.mallocFloat=u;function b(h){return new Float64Array(i(8*h),0,h)}Q.mallocFloat64=Q.mallocDouble=b;function _(h){return P?new Uint8ClampedArray(i(h),0,h):s(h)}Q.mallocUint8Clamped=_;function C(h){return S?new BigUint64Array(i(8*h),0,h):null}Q.mallocBigUint64=C;function M(h){return t?new BigInt64Array(i(8*h),0,h):null}Q.mallocBigInt64=M;function E(h){return new DataView(i(h),0,h)}Q.mallocDataView=E;function A(h){h=$.nextPow2(h);var p=$.log2(h),k=a[p];return k.length>0?k.pop():new g(h)}Q.mallocBuffer=A,Q.clearCache=function(){for(var h=0;h<32;++h)e.UINT8[h].length=0,e.UINT16[h].length=0,e.UINT32[h].length=0,e.INT8[h].length=0,e.INT16[h].length=0,e.INT32[h].length=0,e.FLOAT[h].length=0,e.DOUBLE[h].length=0,e.BIGUINT64[h].length=0,e.BIGINT64[h].length=0,e.UINT8C[h].length=0,r[h].length=0,a[h].length=0}}),hH=Ft((Q,$)=>{var c=Object.prototype.toString;$.exports=function(g){var P;return c.call(g)==="[object Object]"&&(P=Object.getPrototypeOf(g),P===null||P===Object.getPrototypeOf({}))}}),YS=Ft((Q,$)=>{$.exports=function(c,g){g||(g=[0,""]),c=String(c);var P=parseFloat(c,10);return g[0]=P,g[1]=c.match(/[\d.\-\+]*\s*(.*)/)[1]||"",g}}),fH=Ft((Q,$)=>{var c=YS();$.exports=t;var g=96;function P(e,r){var a=c(getComputedStyle(e).getPropertyValue(r));return a[0]*t(a[1],e)}function S(e,r){var a=document.createElement("div");a.style["font-size"]="128"+e,r.appendChild(a);var n=P(a,"font-size")/128;return r.removeChild(a),n}function t(e,r){switch(r=r||document.body,e=(e||"px").trim().toLowerCase(),(r===window||r===document)&&(r=document.body),e){case"%":return r.clientHeight/100;case"ch":case"ex":return S(e,r);case"em":return P(r,"font-size");case"rem":return P(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return g;case"cm":return g/2.54;case"mm":return g/25.4;case"pt":return g/72;case"pc":return g/6}return 1}}),dH=Ft((Q,$)=>{$.exports=S;var c=S.canvas=document.createElement("canvas"),g=c.getContext("2d"),P=t([32,126]);S.createPairs=t,S.ascii=P;function S(e,r){Array.isArray(e)&&(e=e.join(", "));var a={},n,o=16,i=.05;r&&(r.length===2&&typeof r[0]=="number"?n=t(r):Array.isArray(r)?n=r:(r.o?n=t(r.o):r.pairs&&(n=r.pairs),r.fontSize&&(o=r.fontSize),r.threshold!=null&&(i=r.threshold))),n||(n=P),g.font=o+"px "+e;for(var s=0;so*i){var v=(y-x)/o;a[f]=v*1e3}}return a}function t(e){for(var r=[],a=e[0];a<=e[1];a++)for(var n=String.fromCharCode(a),o=e[0];o{$.exports=c,c.canvas=document.createElement("canvas"),c.cache={};function c(i,e){e||(e={}),(typeof i=="string"||Array.isArray(i))&&(e.family=i);var r=Array.isArray(e.family)?e.family.join(", "):e.family;if(!r)throw Error("`family` must be defined");var a=e.size||e.fontSize||e.em||48,n=e.weight||e.fontWeight||"",o=e.style||e.fontStyle||"",i=[o,n,a].join(" ")+"px "+r,s=e.origin||"top";if(c.cache[r]&&a<=c.cache[r].em)return g(c.cache[r],s);var f=e.canvas||c.canvas,x=f.getContext("2d"),y={upper:e.upper!==void 0?e.upper:"H",lower:e.lower!==void 0?e.lower:"x",descent:e.descent!==void 0?e.descent:"p",ascent:e.ascent!==void 0?e.ascent:"h",tittle:e.tittle!==void 0?e.tittle:"i",overshoot:e.overshoot!==void 0?e.overshoot:"O"},v=Math.ceil(a*1.5);f.height=v,f.width=v*.5,x.font=i;var T="H",u={top:0};x.clearRect(0,0,v,v),x.textBaseline="top",x.fillStyle="black",x.fillText(T,0,0);var b=P(x.getImageData(0,0,v,v));x.clearRect(0,0,v,v),x.textBaseline="bottom",x.fillText(T,0,v);var _=P(x.getImageData(0,0,v,v));u.lineHeight=u.bottom=v-_+b,x.clearRect(0,0,v,v),x.textBaseline="alphabetic",x.fillText(T,0,v);var C=P(x.getImageData(0,0,v,v)),M=v-C-1+b;u.baseline=u.alphabetic=M,x.clearRect(0,0,v,v),x.textBaseline="middle",x.fillText(T,0,v*.5);var E=P(x.getImageData(0,0,v,v));u.median=u.middle=v-E-1+b-v*.5,x.clearRect(0,0,v,v),x.textBaseline="hanging",x.fillText(T,0,v*.5);var A=P(x.getImageData(0,0,v,v));u.hanging=v-A-1+b-v*.5,x.clearRect(0,0,v,v),x.textBaseline="ideographic",x.fillText(T,0,v);var h=P(x.getImageData(0,0,v,v));if(u.ideographic=v-h-1+b,y.upper&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.upper,0,0),u.upper=P(x.getImageData(0,0,v,v)),u.capHeight=u.baseline-u.upper),y.lower&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.lower,0,0),u.lower=P(x.getImageData(0,0,v,v)),u.xHeight=u.baseline-u.lower),y.tittle&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.tittle,0,0),u.tittle=P(x.getImageData(0,0,v,v))),y.ascent&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.ascent,0,0),u.ascent=P(x.getImageData(0,0,v,v))),y.descent&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.descent,0,0),u.descent=S(x.getImageData(0,0,v,v))),y.overshoot){x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.overshoot,0,0);var p=S(x.getImageData(0,0,v,v));u.overshoot=p-M}for(var k in u)u[k]/=a;return u.em=a,c.cache[r]=u,g(u,s)}function g(t,e){var r={};typeof e=="string"&&(e=t[e]);for(var a in t)a!=="em"&&(r[a]=t[a]-e);return r}function P(t){for(var e=t.height,r=t.data,a=3;a0;a-=4)if(r[a]!==0)return Math.floor((a-3)*.25/e)}}),mH=Ft((Q,$)=>{var c=aH(),g=Cg(),P=oH(),S=sH(),t=NS(),e=N1(),r=lH(),a=cH(),n=db(),o=hH(),i=YS(),s=fH(),f=dH(),x=Ed(),y=pH(),v=mx(),T=GS(),u=T.nextPow2,b=new t,_=!1;document.body&&(C=document.body.appendChild(document.createElement("div")),C.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(C).fontStretch&&(_=!0),document.body.removeChild(C));var C,M=function(A){E(A)?(A={regl:A},this.gl=A.regl._gl):this.gl=S(A),this.shader=b.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=A.regl||P({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),b.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(o(A)?A:{})};M.prototype.createShader=function(){var A=this.regl,h=A({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:A.prop("count"),offset:A.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:A.this("sizeBuffer")},width:{offset:0,stride:8,buffer:A.this("sizeBuffer")},char:A.this("charBuffer"),position:A.this("position")},uniforms:{atlasSize:function(k,w){return[w.atlas.width,w.atlas.height]},atlasDim:function(k,w){return[w.atlas.cols,w.atlas.rows]},atlas:function(k,w){return w.atlas.texture},charStep:function(k,w){return w.atlas.step},em:function(k,w){return w.atlas.em},color:A.prop("color"),opacity:A.prop("opacity"),viewport:A.this("viewportArray"),scale:A.this("scale"),align:A.prop("align"),baseline:A.prop("baseline"),translate:A.this("translate"),positionOffset:A.prop("positionOffset")},primitive:"points",viewport:A.this("viewport"),vert:` + precision highp float; + attribute float width, charOffset, char; + attribute vec2 position; + uniform float fontSize, charStep, em, align, baseline; + uniform vec4 viewport; + uniform vec4 color; + uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset; + varying vec2 charCoord, charId; + varying float charWidth; + varying vec4 fontColor; + void main () { + vec2 offset = floor(em * (vec2(align + charOffset, baseline) + + vec2(positionOffset.x, -positionOffset.y))) + / (viewport.zw * scale.xy); + + vec2 position = (position + translate) * scale; + position += offset * scale; + + charCoord = position * viewport.zw + viewport.xy; + + gl_Position = vec4(position * 2. - 1., 0, 1); + + gl_PointSize = charStep; + + charId.x = mod(char, atlasDim.x); + charId.y = floor(char / atlasDim.x); + + charWidth = width * em; + + fontColor = color / 255.; + }`,frag:` + precision highp float; + uniform float fontSize, charStep, opacity; + uniform vec2 atlasSize; + uniform vec4 viewport; + uniform sampler2D atlas; + varying vec4 fontColor; + varying vec2 charCoord, charId; + varying float charWidth; + + float lightness(vec4 color) { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + + void main () { + vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5; + float halfCharStep = floor(charStep * .5 + .5); + + // invert y and shift by 1px (FF expecially needs that) + uv.y = charStep - uv.y; + + // ignore points outside of character bounding box + float halfCharWidth = ceil(charWidth * .5); + if (floor(uv.x) > halfCharStep + halfCharWidth || + floor(uv.x) < halfCharStep - halfCharWidth) return; + + uv += charId * charStep; + uv = uv / atlasSize; + + vec4 color = fontColor; + vec4 mask = texture2D(atlas, uv); + + float maskY = lightness(mask); + // float colorY = lightness(color); + color.a *= maskY; + color.a *= opacity; + + // color.a += .1; + + // antialiasing, see yiq color space y-channel formula + // color.rgb += (1. - color.rgb) * (1. - mask.rgb); + + gl_FragColor = color; + }`}),p={};return{regl:A,draw:h,atlas:p}},M.prototype.update=function(A){var h=this;if(typeof A=="string")A={text:A};else if(!A)return;A=g(A,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0),A.opacity!=null&&(Array.isArray(A.opacity)?this.opacity=A.opacity.map(function(Lt){return parseFloat(Lt)}):this.opacity=parseFloat(A.opacity)),A.viewport!=null&&(this.viewport=n(A.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),A.kerning!=null&&(this.kerning=A.kerning),A.offset!=null&&(typeof A.offset=="number"&&(A.offset=[A.offset,0]),this.positionOffset=v(A.offset)),A.direction&&(this.direction=A.direction),A.range&&(this.range=A.range,this.scale=[1/(A.range[2]-A.range[0]),1/(A.range[3]-A.range[1])],this.translate=[-A.range[0],-A.range[1]]),A.scale&&(this.scale=A.scale),A.translate&&(this.translate=A.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!A.font&&(A.font=M.baseFontSize+"px sans-serif");var p=!1,k=!1;if(A.font&&(Array.isArray(A.font)?A.font:[A.font]).forEach(function(Lt,Mt){if(typeof Lt=="string")try{Lt=c.parse(Lt)}catch{Lt=c.parse(M.baseFontSize+"px "+Lt)}else{var te=Lt.style,ve=Lt.weight,oe=Lt.stretch,Te=Lt.variant;Lt=c.parse(c.stringify(Lt)),te&&(Lt.style=te),ve&&(Lt.weight=ve),oe&&(Lt.stretch=oe),Te&&(Lt.variant=Te)}var He=c.stringify({size:M.baseFontSize,family:Lt.family,stretch:_?Lt.stretch:void 0,variant:Lt.variant,weight:Lt.weight,style:Lt.style}),Ge=i(Lt.size),cr=Math.round(Ge[0]*s(Ge[1]));if(cr!==h.fontSize[Mt]&&(k=!0,h.fontSize[Mt]=cr),(!h.font[Mt]||He!=h.font[Mt].baseString)&&(p=!0,h.font[Mt]=M.fonts[He],!h.font[Mt])){var ur=Lt.family.join(", "),jr=[Lt.style];Lt.style!=Lt.variant&&jr.push(Lt.variant),Lt.variant!=Lt.weight&&jr.push(Lt.weight),_&&Lt.weight!=Lt.stretch&&jr.push(Lt.stretch),h.font[Mt]={baseString:He,family:ur,weight:Lt.weight,stretch:Lt.stretch,style:Lt.style,variant:Lt.variant,width:{},kerning:{},metrics:y(ur,{origin:"top",fontSize:M.baseFontSize,fontStyle:jr.join(" ")})},M.fonts[He]=h.font[Mt]}}),(p||k)&&this.font.forEach(function(Lt,Mt){var te=c.stringify({size:h.fontSize[Mt],family:Lt.family,stretch:_?Lt.stretch:void 0,variant:Lt.variant,weight:Lt.weight,style:Lt.style});if(h.fontAtlas[Mt]=h.shader.atlas[te],!h.fontAtlas[Mt]){var ve=Lt.metrics;h.shader.atlas[te]=h.fontAtlas[Mt]={fontString:te,step:Math.ceil(h.fontSize[Mt]*ve.bottom*.5)*2,em:h.fontSize[Mt],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:h.regl.texture()}}A.text==null&&(A.text=h.text)}),typeof A.text=="string"&&A.position&&A.position.length>2){for(var w=Array(A.position.length*.5),R=0;R2){for(var V=!A.position[0].length,H=a.mallocFloat(this.count*2),F=0,U=0;F1?h.align[Mt]:h.align[0]:h.align;if(typeof te=="number")return te;switch(te){case"right":case"end":return-Lt;case"center":case"centre":case"middle":return-Lt*.5}return 0})),this.baseline==null&&A.baseline==null&&(A.baseline=0),A.baseline!=null&&(this.baseline=A.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(Lt,Mt){var te=(h.font[Mt]||h.font[0]).metrics,ve=0;return ve+=te.bottom*.5,typeof Lt=="number"?ve+=Lt-te.baseline:ve+=-te[Lt],ve*=-1,ve})),A.color!=null)if(A.color||(A.color="transparent"),typeof A.color=="string"||!isNaN(A.color))this.color=e(A.color,"uint8");else{var Pt;if(typeof A.color[0]=="number"&&A.color.length>this.counts.length){var Wt=A.color.length;Pt=a.mallocUint8(Wt);for(var Ht=(A.color.subarray||A.color.slice).bind(A.color),Jt=0;Jt4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(de){var se=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(se);for(var Tt=0;Tt1?this.counts[Tt]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Tt]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Tt*4,Tt*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Tt]:this.opacity,baseline:this.baselineOffset[Tt]!=null?this.baselineOffset[Tt]:this.baselineOffset[0],align:this.align?this.alignOffset[Tt]!=null?this.alignOffset[Tt]:this.alignOffset[0]:0,atlas:this.fontAtlas[Tt]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Tt*2,Tt*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},M.prototype.destroy=function(){},M.prototype.kerning=!0,M.prototype.position={constant:new Float32Array(2)},M.prototype.translate=null,M.prototype.scale=null,M.prototype.font=null,M.prototype.text="",M.prototype.positionOffset=[0,0],M.prototype.opacity=1,M.prototype.color=new Uint8Array([0,0,0,255]),M.prototype.alignOffset=[0,0],M.maxAtlasSize=1024,M.atlasCanvas=document.createElement("canvas"),M.atlasContext=M.atlasCanvas.getContext("2d",{alpha:!1}),M.baseFontSize=64,M.fonts={};function E(A){return typeof A=="function"&&A._gl&&A.prop&&A.texture&&A.buffer}$.exports=M}),gH=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?$.exports=g():c.createREGL=g()})(Q,function(){var c=function(_e,kr){for(var Lr=Object.keys(kr),Dn=0;Dn1&&kr===Lr&&(kr==='"'||kr==="'"))return['"'+r(_e.substr(1,_e.length-2))+'"'];var Dn=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(_e);if(Dn)return a(_e.substr(0,Dn.index)).concat(a(Dn[1])).concat(a(_e.substr(Dn.index+Dn[0].length)));var oi=_e.split(".");if(oi.length===1)return['"'+r(_e)+'"'];for(var Jn=[],gn=0;gn"u"?1:window.devicePixelRatio,va=!1,Za={},Ba=function(hn){},ta=function(){};if(typeof kr=="string"?Lr=document.querySelector(kr):typeof kr=="object"&&(b(kr)?Lr=kr:_(kr)?(Jn=kr,oi=Jn.canvas):("gl"in kr?Jn=kr.gl:"canvas"in kr?oi=M(kr.canvas):"container"in kr&&(Dn=M(kr.container)),"attributes"in kr&&(gn=kr.attributes),"extensions"in kr&&(ni=C(kr.extensions)),"optionalExtensions"in kr&&(Yi=C(kr.optionalExtensions)),"onDone"in kr&&(Ba=kr.onDone),"profile"in kr&&(va=!!kr.profile),"pixelRatio"in kr&&(Ui=+kr.pixelRatio),"cachedCode"in kr&&(Za=kr.cachedCode))),Lr&&(Lr.nodeName.toLowerCase()==="canvas"?oi=Lr:Dn=Lr),!Jn){if(!oi){var wi=T(Dn||document.body,Ba,Ui);if(!wi)return null;oi=wi.canvas,ta=wi.onDestroy}gn.premultipliedAlpha===void 0&&(gn.premultipliedAlpha=!0),Jn=u(oi,gn)}return Jn?{gl:Jn,canvas:oi,container:Dn,extensions:ni,optionalExtensions:Yi,pixelRatio:Ui,profile:va,cachedCode:Za,onDone:Ba,onDestroy:ta}:(ta(),Ba("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function A(_e,kr){var Lr={};function Dn(gn){var ni=gn.toLowerCase(),Yi;try{Yi=Lr[ni]=_e.getExtension(ni)}catch{}return!!Yi}for(var oi=0;oi65535)<<4,_e>>>=kr,Lr=(_e>255)<<3,_e>>>=Lr,kr|=Lr,Lr=(_e>15)<<2,_e>>>=Lr,kr|=Lr,Lr=(_e>3)<<1,_e>>>=Lr,kr|=Lr,kr|_e>>1}function U(){var _e=h(8,function(){return[]});function kr(Jn){var gn=H(Jn),ni=_e[F(gn)>>2];return ni.length>0?ni.pop():new ArrayBuffer(gn)}function Lr(Jn){_e[F(Jn.byteLength)>>2].push(Jn)}function Dn(Jn,gn){var ni=null;switch(Jn){case p:ni=new Int8Array(kr(gn),0,gn);break;case k:ni=new Uint8Array(kr(gn),0,gn);break;case w:ni=new Int16Array(kr(2*gn),0,gn);break;case R:ni=new Uint16Array(kr(2*gn),0,gn);break;case O:ni=new Int32Array(kr(4*gn),0,gn);break;case N:ni=new Uint32Array(kr(4*gn),0,gn);break;case V:ni=new Float32Array(kr(4*gn),0,gn);break;default:return null}return ni.length!==gn?ni.subarray(0,gn):ni}function oi(Jn){Lr(Jn.buffer)}return{alloc:kr,free:Lr,allocType:Dn,freeType:oi}}var W=U();W.zero=U();var q=3408,X=3410,lt=3411,yt=3412,pt=3413,st=3414,tt=3415,dt=33901,rt=33902,at=3379,vt=3386,it=34921,Y=36347,ft=36348,ut=35661,wt=35660,zt=34930,Pt=36349,Wt=34076,Ht=34024,Jt=7936,ge=7937,he=7938,de=35724,se=34047,Tt=36063,Lt=34852,Mt=3553,te=34067,ve=34069,oe=33984,Te=6408,He=5126,Ge=5121,cr=36160,ur=36053,jr=36064,Hr=16384,br=function(_e,kr){var Lr=1;kr.ext_texture_filter_anisotropic&&(Lr=_e.getParameter(se));var Dn=1,oi=1;kr.webgl_draw_buffers&&(Dn=_e.getParameter(Lt),oi=_e.getParameter(Tt));var Jn=!!kr.oes_texture_float;if(Jn){var gn=_e.createTexture();_e.bindTexture(Mt,gn),_e.texImage2D(Mt,0,Te,1,1,0,Te,He,null);var ni=_e.createFramebuffer();if(_e.bindFramebuffer(cr,ni),_e.framebufferTexture2D(cr,jr,Mt,gn,0),_e.bindTexture(Mt,null),_e.checkFramebufferStatus(cr)!==ur)Jn=!1;else{_e.viewport(0,0,1,1),_e.clearColor(1,0,0,1),_e.clear(Hr);var Yi=W.allocType(He,4);_e.readPixels(0,0,1,1,Te,He,Yi),_e.getError()?Jn=!1:(_e.deleteFramebuffer(ni),_e.deleteTexture(gn),Jn=Yi[0]===1),W.freeType(Yi)}}var Ui=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),va=!0;if(!Ui){var Za=_e.createTexture(),Ba=W.allocType(Ge,36);_e.activeTexture(oe),_e.bindTexture(te,Za),_e.texImage2D(ve,0,Te,3,3,0,Te,Ge,Ba),W.freeType(Ba),_e.bindTexture(te,null),_e.deleteTexture(Za),va=!_e.getError()}return{colorBits:[_e.getParameter(X),_e.getParameter(lt),_e.getParameter(yt),_e.getParameter(pt)],depthBits:_e.getParameter(st),stencilBits:_e.getParameter(tt),subpixelBits:_e.getParameter(q),extensions:Object.keys(kr).filter(function(ta){return!!kr[ta]}),maxAnisotropic:Lr,maxDrawbuffers:Dn,maxColorAttachments:oi,pointSizeDims:_e.getParameter(dt),lineWidthDims:_e.getParameter(rt),maxViewportDims:_e.getParameter(vt),maxCombinedTextureUnits:_e.getParameter(ut),maxCubeMapSize:_e.getParameter(Wt),maxRenderbufferSize:_e.getParameter(Ht),maxTextureUnits:_e.getParameter(zt),maxTextureSize:_e.getParameter(at),maxAttributes:_e.getParameter(it),maxVertexUniforms:_e.getParameter(Y),maxVertexTextureUnits:_e.getParameter(wt),maxVaryingVectors:_e.getParameter(ft),maxFragmentUniforms:_e.getParameter(Pt),glsl:_e.getParameter(de),renderer:_e.getParameter(ge),vendor:_e.getParameter(Jt),version:_e.getParameter(he),readFloat:Jn,npotTextureCube:va}},Kr=function(_e){return _e instanceof Uint8Array||_e instanceof Uint16Array||_e instanceof Uint32Array||_e instanceof Int8Array||_e instanceof Int16Array||_e instanceof Int32Array||_e instanceof Float32Array||_e instanceof Float64Array||_e instanceof Uint8ClampedArray};function rn(_e){return!!_e&&typeof _e=="object"&&Array.isArray(_e.shape)&&Array.isArray(_e.stride)&&typeof _e.offset=="number"&&_e.shape.length===_e.stride.length&&(Array.isArray(_e.data)||Kr(_e.data))}var Ce=function(_e){return Object.keys(_e).map(function(kr){return _e[kr]})},$t={shape:ee,flatten:Nt};function ne(_e,kr,Lr){for(var Dn=0;Dn0){var Ua;if(Array.isArray(Nn[0])){ca=qn(Nn);for(var vi=1,ti=1;ti0){if(typeof vi[0]=="number"){var qi=W.allocType(Qn.dtype,vi.length);Qr(qi,vi),ca(qi,Sa),W.freeType(qi)}else if(Array.isArray(vi[0])||Kr(vi[0])){pa=qn(vi);var $i=ii(vi,pa,Qn.dtype);ca($i,Sa),W.freeType($i)}}}else if(rn(vi)){pa=vi.shape;var _a=vi.stride,Po=0,wo=0,xa=0,Oa=0;pa.length===1?(Po=pa[0],wo=1,xa=_a[0],Oa=0):pa.length===2&&(Po=pa[0],wo=pa[1],xa=_a[0],Oa=_a[1]);var ho=Array.isArray(vi.data)?Qn.dtype:xr(vi.data),So=W.allocType(ho,Po*wo);Cn(So,vi.data,Po,wo,xa,Oa,vi.offset),ca(So,Sa),W.freeType(So)}return Ma}return Oi||Ma(hn),Ma._reglType="buffer",Ma._buffer=Qn,Ma.subdata=Ua,Lr.profile&&(Ma.stats=Qn.stats),Ma.destroy=function(){Ba(Qn)},Ma}function wi(){Ce(Jn).forEach(function(hn){hn.buffer=_e.createBuffer(),_e.bindBuffer(hn.type,hn.buffer),_e.bufferData(hn.type,hn.persistentData||hn.byteLength,hn.usage)})}return Lr.profile&&(kr.getTotalBufferSize=function(){var hn=0;return Object.keys(Jn).forEach(function(Nn){hn+=Jn[Nn].stats.size}),hn}),{create:ta,createStream:Yi,destroyStream:Ui,clear:function(){Ce(Jn).forEach(Ba),ni.forEach(Ba)},getBuffer:function(hn){return hn&&hn._buffer instanceof gn?hn._buffer:null},restore:wi,_initBuffer:Za}}var Mn=0,ci=0,xi=1,Pi=1,Di=4,Zi=4,ui={points:Mn,point:ci,lines:xi,line:Pi,triangles:Di,triangle:Zi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Pa=0,Wa=1,ze=4,Pe=5120,Rr=5121,qr=5122,$r=5123,Br=5124,Gr=5125,dn=34963,an=35040,Ee=35044;function dr(_e,kr,Lr,Dn){var oi={},Jn=0,gn={uint8:Rr,uint16:$r};kr.oes_element_index_uint&&(gn.uint32=Gr);function ni(wi){this.id=Jn++,oi[this.id]=this,this.buffer=wi,this.primType=ze,this.vertCount=0,this.type=0}ni.prototype.bind=function(){this.buffer.bind()};var Yi=[];function Ui(wi){var hn=Yi.pop();return hn||(hn=new ni(Lr.create(null,dn,!0,!1)._buffer)),Za(hn,wi,an,-1,-1,0,0),hn}function va(wi){Yi.push(wi)}function Za(wi,hn,Nn,Oi,_i,Qn,Ma){wi.buffer.bind();var ca;if(hn){var Ua=Ma;!Ma&&(!Kr(hn)||rn(hn)&&!Kr(hn.data))&&(Ua=kr.oes_element_index_uint?Gr:$r),Lr._initBuffer(wi.buffer,hn,Nn,Ua,3)}else _e.bufferData(dn,Qn,Nn),wi.buffer.dtype=ca||Rr,wi.buffer.usage=Nn,wi.buffer.dimension=3,wi.buffer.byteLength=Qn;if(ca=Ma,!Ma){switch(wi.buffer.dtype){case Rr:case Pe:ca=Rr;break;case $r:case qr:ca=$r;break;case Gr:case Br:ca=Gr;break}wi.buffer.dtype=ca}wi.type=ca;var vi=_i;vi<0&&(vi=wi.buffer.byteLength,ca===$r?vi>>=1:ca===Gr&&(vi>>=2)),wi.vertCount=vi;var ti=Oi;if(Oi<0){ti=ze;var Sa=wi.buffer.dimension;Sa===1&&(ti=Pa),Sa===2&&(ti=Wa),Sa===3&&(ti=ze)}wi.primType=ti}function Ba(wi){Dn.elementsCount--,delete oi[wi.id],wi.buffer.destroy(),wi.buffer=null}function ta(wi,hn){var Nn=Lr.create(null,dn,!0),Oi=new ni(Nn._buffer);Dn.elementsCount++;function _i(Qn){if(!Qn)Nn(),Oi.primType=ze,Oi.vertCount=0,Oi.type=Rr;else if(typeof Qn=="number")Nn(Qn),Oi.primType=ze,Oi.vertCount=Qn|0,Oi.type=Rr;else{var Ma=null,ca=Ee,Ua=-1,vi=-1,ti=0,Sa=0;Array.isArray(Qn)||Kr(Qn)||rn(Qn)?Ma=Qn:("data"in Qn&&(Ma=Qn.data),"usage"in Qn&&(ca=Ci[Qn.usage]),"primitive"in Qn&&(Ua=ui[Qn.primitive]),"count"in Qn&&(vi=Qn.count|0),"type"in Qn&&(Sa=gn[Qn.type]),"length"in Qn?ti=Qn.length|0:(ti=vi,Sa===$r||Sa===qr?ti*=2:(Sa===Gr||Sa===Br)&&(ti*=4))),Za(Oi,Ma,ca,Ua,vi,ti,Sa)}return _i}return _i(wi),_i._reglType="elements",_i._elements=Oi,_i.subdata=function(Qn,Ma){return Nn.subdata(Qn,Ma),_i},_i.destroy=function(){Ba(Oi)},_i}return{create:ta,createStream:Ui,destroyStream:va,getElements:function(wi){return typeof wi=="function"&&wi._elements instanceof ni?wi._elements:null},clear:function(){Ce(oi).forEach(Ba)}}}var Vr=new Float32Array(1),yn=new Uint32Array(Vr.buffer),Fn=5123;function Xn(_e){for(var kr=W.allocType(Fn,_e.length),Lr=0;Lr<_e.length;++Lr)if(isNaN(_e[Lr]))kr[Lr]=65535;else if(_e[Lr]===1/0)kr[Lr]=31744;else if(_e[Lr]===-1/0)kr[Lr]=64512;else{Vr[0]=_e[Lr];var Dn=yn[0],oi=Dn>>>31<<15,Jn=(Dn<<1>>>24)-127,gn=Dn>>13&1023;if(Jn<-24)kr[Lr]=oi;else if(Jn<-14){var ni=-14-Jn;kr[Lr]=oi+(gn+1024>>ni)}else Jn>15?kr[Lr]=oi+31744:kr[Lr]=oi+(Jn+15<<10)+gn}return kr}function Pn(_e){return Array.isArray(_e)||Kr(_e)}var En=34467,Zn=3553,Ca=34067,Ri=34069,Ja=6408,Xa=6406,Io=6407,po=6409,Do=6410,Ia=32854,gs=32855,is=36194,ll=32819,Ho=32820,Gs=33635,as=34042,ul=6402,Js=34041,Rl=35904,ls=35906,Cs=36193,Co=33776,ks=33777,kl=33778,Vl=33779,Yl=35986,Ns=35987,La=34798,uo=35840,Hs=35841,Kl=35842,Go=35843,ql=36196,il=5121,Cl=5123,Fu=5125,ao=5126,Ts=10242,Ls=10243,nu=10497,cl=33071,Qo=33648,Mu=10240,Gu=10241,_l=9728,Ol=9729,Xl=9984,tu=9985,ac=9986,ph=9987,Jc=33170,ah=4352,Nf=4353,Sf=4354,Dl=34046,Bc=3317,jf=37440,hc=37441,oc=37443,fc=37444,oh=33984,su=[Xl,ac,tu,ph],sc=[0,po,Do,Io,Ja],el={};el[po]=el[Xa]=el[ul]=1,el[Js]=el[Do]=2,el[Io]=el[Rl]=3,el[Ja]=el[ls]=4;function Zl(_e){return"[object "+_e+"]"}var Mh=Zl("HTMLCanvasElement"),Lc=Zl("OffscreenCanvas"),jh=Zl("CanvasRenderingContext2D"),xu=Zl("ImageBitmap"),Cd=Zl("HTMLImageElement"),Qs=Zl("HTMLVideoElement"),Wd=Object.keys(le).concat([Mh,Lc,jh,xu,Cd,Qs]),Ll=[];Ll[il]=1,Ll[ao]=4,Ll[Cs]=2,Ll[Cl]=2,Ll[Fu]=4;var Jo=[];Jo[Ia]=2,Jo[gs]=2,Jo[is]=2,Jo[Js]=4,Jo[Co]=.5,Jo[ks]=.5,Jo[kl]=1,Jo[Vl]=1,Jo[Yl]=.5,Jo[Ns]=1,Jo[La]=1,Jo[uo]=.5,Jo[Hs]=.25,Jo[Kl]=.5,Jo[Go]=.25,Jo[ql]=.5;function lf(_e){return Array.isArray(_e)&&(_e.length===0||typeof _e[0]=="number")}function sh(_e){if(!Array.isArray(_e))return!1;var kr=_e.length;return!(kr===0||!Pn(_e[0]))}function ec(_e){return Object.prototype.toString.call(_e)}function Uf(_e){return ec(_e)===Mh}function Uh(_e){return ec(_e)===Lc}function yf(_e){return ec(_e)===jh}function lc(_e){return ec(_e)===xu}function hd(_e){return ec(_e)===Cd}function $f(_e){return ec(_e)===Qs}function xf(_e){if(!_e)return!1;var kr=ec(_e);return Wd.indexOf(kr)>=0?!0:lf(_e)||sh(_e)||rn(_e)}function Vh(_e){return le[Object.prototype.toString.call(_e)]|0}function Vf(_e,kr){var Lr=kr.length;switch(_e.type){case il:case Cl:case Fu:case ao:var Dn=W.allocType(_e.type,Lr);Dn.set(kr),_e.data=Dn;break;case Cs:_e.data=Xn(kr);break}}function Hf(_e,kr){return W.allocType(_e.type===Cs?ao:_e.type,kr)}function lh(_e,kr){_e.type===Cs?(_e.data=Xn(kr),W.freeType(kr)):_e.data=kr}function Gf(_e,kr,Lr,Dn,oi,Jn){for(var gn=_e.width,ni=_e.height,Yi=_e.channels,Ui=gn*ni*Yi,va=Hf(_e,Ui),Za=0,Ba=0;Ba=1;)ni+=gn*Yi*Yi,Yi/=2;return ni}else return gn*Lr*Dn}function mh(_e,kr,Lr,Dn,oi,Jn,gn){var ni={"don't care":ah,"dont care":ah,nice:Sf,fast:Nf},Yi={repeat:nu,clamp:cl,mirror:Qo},Ui={nearest:_l,linear:Ol},va=c({mipmap:ph,"nearest mipmap nearest":Xl,"linear mipmap nearest":tu,"nearest mipmap linear":ac,"linear mipmap linear":ph},Ui),Za={none:0,browser:fc},Ba={uint8:il,rgba4:ll,rgb565:Gs,"rgb5 a1":Ho},ta={alpha:Xa,luminance:po,"luminance alpha":Do,rgb:Io,rgba:Ja,rgba4:Ia,"rgb5 a1":gs,rgb565:is},wi={};kr.ext_srgb&&(ta.srgb=Rl,ta.srgba=ls),kr.oes_texture_float&&(Ba.float32=Ba.float=ao),kr.oes_texture_half_float&&(Ba.float16=Ba["half float"]=Cs),kr.webgl_depth_texture&&(c(ta,{depth:ul,"depth stencil":Js}),c(Ba,{uint16:Cl,uint32:Fu,"depth stencil":as})),kr.webgl_compressed_texture_s3tc&&c(wi,{"rgb s3tc dxt1":Co,"rgba s3tc dxt1":ks,"rgba s3tc dxt3":kl,"rgba s3tc dxt5":Vl}),kr.webgl_compressed_texture_atc&&c(wi,{"rgb atc":Yl,"rgba atc explicit alpha":Ns,"rgba atc interpolated alpha":La}),kr.webgl_compressed_texture_pvrtc&&c(wi,{"rgb pvrtc 4bppv1":uo,"rgb pvrtc 2bppv1":Hs,"rgba pvrtc 4bppv1":Kl,"rgba pvrtc 2bppv1":Go}),kr.webgl_compressed_texture_etc1&&(wi["rgb etc1"]=ql);var hn=Array.prototype.slice.call(_e.getParameter(En));Object.keys(wi).forEach(function(Z){var ot=wi[Z];hn.indexOf(ot)>=0&&(ta[Z]=ot)});var Nn=Object.keys(ta);Lr.textureFormats=Nn;var Oi=[];Object.keys(ta).forEach(function(Z){var ot=ta[Z];Oi[ot]=Z});var _i=[];Object.keys(Ba).forEach(function(Z){var ot=Ba[Z];_i[ot]=Z});var Qn=[];Object.keys(Ui).forEach(function(Z){var ot=Ui[Z];Qn[ot]=Z});var Ma=[];Object.keys(va).forEach(function(Z){var ot=va[Z];Ma[ot]=Z});var ca=[];Object.keys(Yi).forEach(function(Z){var ot=Yi[Z];ca[ot]=Z});var Ua=Nn.reduce(function(Z,ot){var et=ta[ot];return et===po||et===Xa||et===po||et===Do||et===ul||et===Js||kr.ext_srgb&&(et===Rl||et===ls)?Z[et]=et:et===gs||ot.indexOf("rgba")>=0?Z[et]=Ja:Z[et]=Io,Z},{});function vi(){this.internalformat=Ja,this.format=Ja,this.type=il,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=fc,this.width=0,this.height=0,this.channels=0}function ti(Z,ot){Z.internalformat=ot.internalformat,Z.format=ot.format,Z.type=ot.type,Z.compressed=ot.compressed,Z.premultiplyAlpha=ot.premultiplyAlpha,Z.flipY=ot.flipY,Z.unpackAlignment=ot.unpackAlignment,Z.colorSpace=ot.colorSpace,Z.width=ot.width,Z.height=ot.height,Z.channels=ot.channels}function Sa(Z,ot){if(!(typeof ot!="object"||!ot)){if("premultiplyAlpha"in ot&&(Z.premultiplyAlpha=ot.premultiplyAlpha),"flipY"in ot&&(Z.flipY=ot.flipY),"alignment"in ot&&(Z.unpackAlignment=ot.alignment),"colorSpace"in ot&&(Z.colorSpace=Za[ot.colorSpace]),"type"in ot){var et=ot.type;Z.type=Ba[et]}var xt=Z.width,Ut=Z.height,fe=Z.channels,ye=!1;"shape"in ot?(xt=ot.shape[0],Ut=ot.shape[1],ot.shape.length===3&&(fe=ot.shape[2],ye=!0)):("radius"in ot&&(xt=Ut=ot.radius),"width"in ot&&(xt=ot.width),"height"in ot&&(Ut=ot.height),"channels"in ot&&(fe=ot.channels,ye=!0)),Z.width=xt|0,Z.height=Ut|0,Z.channels=fe|0;var Yt=!1;if("format"in ot){var ce=ot.format,Se=Z.internalformat=ta[ce];Z.format=Ua[Se],ce in Ba&&("type"in ot||(Z.type=Ba[ce])),ce in wi&&(Z.compressed=!0),Yt=!0}!ye&&Yt?Z.channels=el[Z.format]:ye&&!Yt&&Z.channels!==sc[Z.format]&&(Z.format=Z.internalformat=sc[Z.channels])}}function pa(Z){_e.pixelStorei(jf,Z.flipY),_e.pixelStorei(hc,Z.premultiplyAlpha),_e.pixelStorei(oc,Z.colorSpace),_e.pixelStorei(Bc,Z.unpackAlignment)}function qi(){vi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function $i(Z,ot){var et=null;if(xf(ot)?et=ot:ot&&(Sa(Z,ot),"x"in ot&&(Z.xOffset=ot.x|0),"y"in ot&&(Z.yOffset=ot.y|0),xf(ot.data)&&(et=ot.data)),ot.copy){var xt=oi.viewportWidth,Ut=oi.viewportHeight;Z.width=Z.width||xt-Z.xOffset,Z.height=Z.height||Ut-Z.yOffset,Z.needsCopy=!0}else if(!et)Z.width=Z.width||1,Z.height=Z.height||1,Z.channels=Z.channels||4;else if(Kr(et))Z.channels=Z.channels||4,Z.data=et,!("type"in ot)&&Z.type===il&&(Z.type=Vh(et));else if(lf(et))Z.channels=Z.channels||4,Vf(Z,et),Z.alignment=1,Z.needsFree=!0;else if(rn(et)){var fe=et.data;!Array.isArray(fe)&&Z.type===il&&(Z.type=Vh(fe));var ye=et.shape,Yt=et.stride,ce,Se,nr,Ye,tr,lr;ye.length===3?(nr=ye[2],lr=Yt[2]):(nr=1,lr=1),ce=ye[0],Se=ye[1],Ye=Yt[0],tr=Yt[1],Z.alignment=1,Z.width=ce,Z.height=Se,Z.channels=nr,Z.format=Z.internalformat=sc[nr],Z.needsFree=!0,Gf(Z,fe,Ye,tr,lr,et.offset)}else if(Uf(et)||Uh(et)||yf(et))Uf(et)||Uh(et)?Z.element=et:Z.element=et.canvas,Z.width=Z.element.width,Z.height=Z.element.height,Z.channels=4;else if(lc(et))Z.element=et,Z.width=et.width,Z.height=et.height,Z.channels=4;else if(hd(et))Z.element=et,Z.width=et.naturalWidth,Z.height=et.naturalHeight,Z.channels=4;else if($f(et))Z.element=et,Z.width=et.videoWidth,Z.height=et.videoHeight,Z.channels=4;else if(sh(et)){var hr=Z.width||et[0].length,Ve=Z.height||et.length,Xe=Z.channels;Pn(et[0][0])?Xe=Xe||et[0][0].length:Xe=Xe||1;for(var $e=$t.shape(et),Cr=1,on=0;on<$e.length;++on)Cr*=$e[on];var fn=Hf(Z,Cr);$t.flatten(et,$e,"",fn),lh(Z,fn),Z.alignment=1,Z.width=hr,Z.height=Ve,Z.channels=Xe,Z.format=Z.internalformat=sc[Xe],Z.needsFree=!0}Z.type===ao||Z.type}function _a(Z,ot,et){var xt=Z.element,Ut=Z.data,fe=Z.internalformat,ye=Z.format,Yt=Z.type,ce=Z.width,Se=Z.height;pa(Z),xt?_e.texImage2D(ot,et,ye,ye,Yt,xt):Z.compressed?_e.compressedTexImage2D(ot,et,fe,ce,Se,0,Ut):Z.needsCopy?(Dn(),_e.copyTexImage2D(ot,et,ye,Z.xOffset,Z.yOffset,ce,Se,0)):_e.texImage2D(ot,et,ye,ce,Se,0,ye,Yt,Ut||null)}function Po(Z,ot,et,xt,Ut){var fe=Z.element,ye=Z.data,Yt=Z.internalformat,ce=Z.format,Se=Z.type,nr=Z.width,Ye=Z.height;pa(Z),fe?_e.texSubImage2D(ot,Ut,et,xt,ce,Se,fe):Z.compressed?_e.compressedTexSubImage2D(ot,Ut,et,xt,Yt,nr,Ye,ye):Z.needsCopy?(Dn(),_e.copyTexSubImage2D(ot,Ut,et,xt,Z.xOffset,Z.yOffset,nr,Ye)):_e.texSubImage2D(ot,Ut,et,xt,nr,Ye,ce,Se,ye)}var wo=[];function xa(){return wo.pop()||new qi}function Oa(Z){Z.needsFree&&W.freeType(Z.data),qi.call(Z),wo.push(Z)}function ho(){vi.call(this),this.genMipmaps=!1,this.mipmapHint=ah,this.mipmask=0,this.images=Array(16)}function So(Z,ot,et){var xt=Z.images[0]=xa();Z.mipmask=1,xt.width=Z.width=ot,xt.height=Z.height=et,xt.channels=Z.channels=4}function ts(Z,ot){var et=null;if(xf(ot))et=Z.images[0]=xa(),ti(et,Z),$i(et,ot),Z.mipmask=1;else if(Sa(Z,ot),Array.isArray(ot.mipmap))for(var xt=ot.mipmap,Ut=0;Ut>=Ut,et.height>>=Ut,$i(et,xt[Ut]),Z.mipmask|=1<=0&&!("faces"in ot)&&(Z.genMipmaps=!0)}if("mag"in ot){var xt=ot.mag;Z.magFilter=Ui[xt]}var Ut=Z.wrapS,fe=Z.wrapT;if("wrap"in ot){var ye=ot.wrap;typeof ye=="string"?Ut=fe=Yi[ye]:Array.isArray(ye)&&(Ut=Yi[ye[0]],fe=Yi[ye[1]])}else{if("wrapS"in ot){var Yt=ot.wrapS;Ut=Yi[Yt]}if("wrapT"in ot){var ce=ot.wrapT;fe=Yi[ce]}}if(Z.wrapS=Ut,Z.wrapT=fe,"anisotropic"in ot&&(ot.anisotropic,Z.anisotropic=ot.anisotropic),"mipmap"in ot){var Se=!1;switch(typeof ot.mipmap){case"string":Z.mipmapHint=ni[ot.mipmap],Z.genMipmaps=!0,Se=!0;break;case"boolean":Se=Z.genMipmaps=ot.mipmap;break;case"object":Z.genMipmaps=!1,Se=!0;break}Se&&!("min"in ot)&&(Z.minFilter=Xl)}}function pc(Z,ot){_e.texParameteri(ot,Gu,Z.minFilter),_e.texParameteri(ot,Mu,Z.magFilter),_e.texParameteri(ot,Ts,Z.wrapS),_e.texParameteri(ot,Ls,Z.wrapT),kr.ext_texture_filter_anisotropic&&_e.texParameteri(ot,Dl,Z.anisotropic),Z.genMipmaps&&(_e.hint(Jc,Z.mipmapHint),_e.generateMipmap(ot))}var yc=0,yu={},hu=Lr.maxTextureUnits,ku=Array(hu).map(function(){return null});function Bo(Z){vi.call(this),this.mipmask=0,this.internalformat=Ja,this.id=yc++,this.refCount=1,this.target=Z,this.texture=_e.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new fl,gn.profile&&(this.stats={size:0})}function Tu(Z){_e.activeTexture(oh),_e.bindTexture(Z.target,Z.texture)}function ol(){var Z=ku[0];Z?_e.bindTexture(Z.target,Z.texture):_e.bindTexture(Zn,null)}function Cu(Z){var ot=Z.texture,et=Z.unit,xt=Z.target;et>=0&&(_e.activeTexture(oh+et),_e.bindTexture(xt,null),ku[et]=null),_e.deleteTexture(ot),Z.texture=null,Z.params=null,Z.pixels=null,Z.refCount=0,delete yu[Z.id],Jn.textureCount--}c(Bo.prototype,{bind:function(){var Z=this;Z.bindCount+=1;var ot=Z.unit;if(ot<0){for(var et=0;et0)continue;xt.unit=-1}ku[et]=Z,ot=et;break}gn.profile&&Jn.maxTextureUnits>tr)-nr,lr.height=lr.height||(et.height>>tr)-Ye,Tu(et),Po(lr,Zn,nr,Ye,tr),ol(),Oa(lr),xt}function fe(ye,Yt){var ce=ye|0,Se=Yt|0||ce;if(ce===et.width&&Se===et.height)return xt;xt.width=et.width=ce,xt.height=et.height=Se,Tu(et);for(var nr=0;et.mipmask>>nr;++nr){var Ye=ce>>nr,tr=Se>>nr;if(!Ye||!tr)break;_e.texImage2D(Zn,nr,et.format,Ye,tr,0,et.format,et.type,null)}return ol(),gn.profile&&(et.stats.size=Sh(et.internalformat,et.type,ce,Se,!1,!1)),xt}return xt(Z,ot),xt.subimage=Ut,xt.resize=fe,xt._reglType="texture2d",xt._texture=et,gn.profile&&(xt.stats=et.stats),xt.destroy=function(){et.decRef()},xt}function Eo(Z,ot,et,xt,Ut,fe){var ye=new Bo(Ca);yu[ye.id]=ye,Jn.cubeCount++;var Yt=new Array(6);function ce(Ye,tr,lr,hr,Ve,Xe){var $e,Cr=ye.texInfo;for(fl.call(Cr),$e=0;$e<6;++$e)Yt[$e]=us();if(typeof Ye=="number"||!Ye){var on=Ye|0||1;for($e=0;$e<6;++$e)So(Yt[$e],on,on)}else if(typeof Ye=="object")if(tr)ts(Yt[0],Ye),ts(Yt[1],tr),ts(Yt[2],lr),ts(Yt[3],hr),ts(Yt[4],Ve),ts(Yt[5],Xe);else if(Eu(Cr,Ye),Sa(ye,Ye),"faces"in Ye){var fn=Ye.faces;for($e=0;$e<6;++$e)ti(Yt[$e],ye),ts(Yt[$e],fn[$e])}else for($e=0;$e<6;++$e)ts(Yt[$e],Ye);for(ti(ye,Yt[0]),Cr.genMipmaps?ye.mipmask=(Yt[0].width<<1)-1:ye.mipmask=Yt[0].mipmask,ye.internalformat=Yt[0].internalformat,ce.width=Yt[0].width,ce.height=Yt[0].height,Tu(ye),$e=0;$e<6;++$e)Nl(Yt[$e],Ri+$e);for(pc(Cr,Ca),ol(),gn.profile&&(ye.stats.size=Sh(ye.internalformat,ye.type,ce.width,ce.height,Cr.genMipmaps,!0)),ce.format=Oi[ye.internalformat],ce.type=_i[ye.type],ce.mag=Qn[Cr.magFilter],ce.min=Ma[Cr.minFilter],ce.wrapS=ca[Cr.wrapS],ce.wrapT=ca[Cr.wrapT],$e=0;$e<6;++$e)wu(Yt[$e]);return ce}function Se(Ye,tr,lr,hr,Ve){var Xe=lr|0,$e=hr|0,Cr=Ve|0,on=xa();return ti(on,ye),on.width=0,on.height=0,$i(on,tr),on.width=on.width||(ye.width>>Cr)-Xe,on.height=on.height||(ye.height>>Cr)-$e,Tu(ye),Po(on,Ri+Ye,Xe,$e,Cr),ol(),Oa(on),ce}function nr(Ye){var tr=Ye|0;if(tr!==ye.width){ce.width=ye.width=tr,ce.height=ye.height=tr,Tu(ye);for(var lr=0;lr<6;++lr)for(var hr=0;ye.mipmask>>hr;++hr)_e.texImage2D(Ri+lr,hr,ye.format,tr>>hr,tr>>hr,0,ye.format,ye.type,null);return ol(),gn.profile&&(ye.stats.size=Sh(ye.internalformat,ye.type,ce.width,ce.height,!1,!0)),ce}}return ce(Z,ot,et,xt,Ut,fe),ce.subimage=Se,ce.resize=nr,ce._reglType="textureCube",ce._texture=ye,gn.profile&&(ce.stats=ye.stats),ce.destroy=function(){ye.decRef()},ce}function Ss(){for(var Z=0;Z>xt,et.height>>xt,0,et.internalformat,et.type,null);else for(var Ut=0;Ut<6;++Ut)_e.texImage2D(Ri+Ut,xt,et.internalformat,et.width>>xt,et.height>>xt,0,et.internalformat,et.type,null);pc(et.texInfo,et.target)})}function yl(){for(var Z=0;Z=0?wu=!0:Yi.indexOf(fl)>=0&&(wu=!1))),("depthTexture"in Bo||"depthStencilTexture"in Bo)&&(ku=!!(Bo.depthTexture||Bo.depthStencilTexture)),"depth"in Bo&&(typeof Bo.depth=="boolean"?Nl=Bo.depth:(yc=Bo.depth,Al=!1)),"stencil"in Bo&&(typeof Bo.stencil=="boolean"?Al=Bo.stencil:(yu=Bo.stencil,Nl=!1)),"depthStencil"in Bo&&(typeof Bo.depthStencil=="boolean"?Nl=Al=Bo.depthStencil:(hu=Bo.depthStencil,Nl=!1,Al=!1))}var ol=null,Cu=null,xc=null,Eo=null;if(Array.isArray(us))ol=us.map(wi);else if(us)ol=[wi(us)];else for(ol=new Array(pc),ho=0;ho0&&(Oa.depth=$i[0].depth,Oa.stencil=$i[0].stencil,Oa.depthStencil=$i[0].depthStencil),$i[xa]?$i[xa](Oa):$i[xa]=ti(Oa)}return c(_a,{width:ho,height:ho,color:fl})}function Po(wo){var xa,Oa=wo|0;if(Oa===_a.width)return _a;var ho=_a.color;for(xa=0;xa=ho.byteLength?So.subdata(ho):(So.destroy(),ti.buffers[wo]=null)),ti.buffers[wo]||(So=ti.buffers[wo]=oi.create(xa,Pf,!1,!0)),Oa.buffer=oi.getBuffer(So),Oa.size=Oa.buffer.dimension|0,Oa.normalized=!1,Oa.type=Oa.buffer.dtype,Oa.offset=0,Oa.stride=0,Oa.divisor=0,Oa.state=1,_a[wo]=1}else oi.getBuffer(xa)?(Oa.buffer=oi.getBuffer(xa),Oa.size=Oa.buffer.dimension|0,Oa.normalized=!1,Oa.type=Oa.buffer.dtype,Oa.offset=0,Oa.stride=0,Oa.divisor=0,Oa.state=1):oi.getBuffer(xa.buffer)?(Oa.buffer=oi.getBuffer(xa.buffer),Oa.size=(+xa.size||Oa.buffer.dimension)|0,Oa.normalized=!!xa.normalized||!1,"type"in xa?Oa.type=Vn[xa.type]:Oa.type=Oa.buffer.dtype,Oa.offset=(xa.offset||0)|0,Oa.stride=(xa.stride||0)|0,Oa.divisor=(xa.divisor||0)|0,Oa.state=1):"x"in xa&&(Oa.x=+xa.x||0,Oa.y=+xa.y||0,Oa.z=+xa.z||0,Oa.w=+xa.w||0,Oa.state=2)}for(var ts=0;ts1)for(var pa=0;pahn&&(hn=Nn.stats.uniformsCount)}),hn},Lr.getMaxAttributesCount=function(){var hn=0;return va.forEach(function(Nn){Nn.stats.attributesCount>hn&&(hn=Nn.stats.attributesCount)}),hn});function wi(){oi={},Jn={};for(var hn=0;hn>>4&15)+kr.charAt(Dn&15);return Lr}function Lh(_e){for(var kr="",Lr=-1,Dn,oi;++Lr<_e.length;)Dn=_e.charCodeAt(Lr),oi=Lr+1<_e.length?_e.charCodeAt(Lr+1):0,55296<=Dn&&Dn<=56319&&56320<=oi&&oi<=57343&&(Dn=65536+((Dn&1023)<<10)+(oi&1023),Lr++),Dn<=127?kr+=String.fromCharCode(Dn):Dn<=2047?kr+=String.fromCharCode(192|Dn>>>6&31,128|Dn&63):Dn<=65535?kr+=String.fromCharCode(224|Dn>>>12&15,128|Dn>>>6&63,128|Dn&63):Dn<=2097151&&(kr+=String.fromCharCode(240|Dn>>>18&7,128|Dn>>>12&63,128|Dn>>>6&63,128|Dn&63));return kr}function yh(_e){for(var kr=Array(_e.length>>2),Lr=0;Lr>5]|=(_e.charCodeAt(Lr/8)&255)<<24-Lr%32;return kr}function Ru(_e){for(var kr="",Lr=0;Lr<_e.length*32;Lr+=8)kr+=String.fromCharCode(_e[Lr>>5]>>>24-Lr%32&255);return kr}function eu(_e,kr){return _e>>>kr|_e<<32-kr}function xh(_e,kr){return _e>>>kr}function df(_e,kr,Lr){return _e&kr^~_e&Lr}function _h(_e,kr,Lr){return _e&kr^_e&Lr^kr&Lr}function qf(_e){return eu(_e,2)^eu(_e,13)^eu(_e,22)}function mr(_e){return eu(_e,6)^eu(_e,11)^eu(_e,25)}function Ur(_e){return eu(_e,7)^eu(_e,18)^xh(_e,3)}function _n(_e){return eu(_e,17)^eu(_e,19)^xh(_e,10)}var cn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Wn(_e,kr){var Lr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Dn=new Array(64),oi,Jn,gn,ni,Yi,Ui,va,Za,Ba,ta,wi,hn;for(_e[kr>>5]|=128<<24-kr%32,_e[(kr+64>>9<<4)+15]=kr,Ba=0;Ba<_e.length;Ba+=16){for(oi=Lr[0],Jn=Lr[1],gn=Lr[2],ni=Lr[3],Yi=Lr[4],Ui=Lr[5],va=Lr[6],Za=Lr[7],ta=0;ta<64;ta++)ta<16?Dn[ta]=_e[ta+Ba]:Dn[ta]=hi(hi(hi(_n(Dn[ta-2]),Dn[ta-7]),Ur(Dn[ta-15])),Dn[ta-16]),wi=hi(hi(hi(hi(Za,mr(Yi)),df(Yi,Ui,va)),cn[ta]),Dn[ta]),hn=hi(qf(oi),_h(oi,Jn,gn)),Za=va,va=Ui,Ui=Yi,Yi=hi(ni,wi),ni=gn,gn=Jn,Jn=oi,oi=hi(wi,hn);Lr[0]=hi(oi,Lr[0]),Lr[1]=hi(Jn,Lr[1]),Lr[2]=hi(gn,Lr[2]),Lr[3]=hi(ni,Lr[3]),Lr[4]=hi(Yi,Lr[4]),Lr[5]=hi(Ui,Lr[5]),Lr[6]=hi(va,Lr[6]),Lr[7]=hi(Za,Lr[7])}return Lr}function hi(_e,kr){var Lr=(_e&65535)+(kr&65535),Dn=(_e>>16)+(kr>>16)+(Lr>>16);return Dn<<16|Lr&65535}function ea(_e){return Array.prototype.slice.call(_e)}function ga(_e){return ea(_e).join("")}function Ra(_e){var kr=_e&&_e.cache,Lr=0,Dn=[],oi=[],Jn=[];function gn(wi,hn){var Nn=hn&&hn.stable;if(!Nn){for(var Oi=0;Oi0&&(wi.push(_i,"="),wi.push.apply(wi,ea(arguments)),wi.push(";")),_i}return c(hn,{def:Oi,toString:function(){return ga([Nn.length>0?"var "+Nn.join(",")+";":"",ga(wi)])}})}function Yi(){var wi=ni(),hn=ni(),Nn=wi.toString,Oi=hn.toString;function _i(Qn,Ma){hn(Qn,Ma,"=",wi.def(Qn,Ma),";")}return c(function(){wi.apply(wi,ea(arguments))},{def:wi.def,entry:wi,exit:hn,save:_i,set:function(Qn,Ma,ca){_i(Qn,Ma),wi(Qn,Ma,"=",ca,";")},toString:function(){return Nn()+Oi()}})}function Ui(){var wi=ga(arguments),hn=Yi(),Nn=Yi(),Oi=hn.toString,_i=Nn.toString;return c(hn,{then:function(){return hn.apply(hn,ea(arguments)),this},else:function(){return Nn.apply(Nn,ea(arguments)),this},toString:function(){var Qn=_i();return Qn&&(Qn="else{"+Qn+"}"),ga(["if(",wi,"){",Oi(),"}",Qn])}})}var va=ni(),Za={};function Ba(wi,hn){var Nn=[];function Oi(){var Ua="a"+Nn.length;return Nn.push(Ua),Ua}hn=hn||0;for(var _i=0;_i":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},mi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ti={cw:ue,ccw:Me};function Ii(_e){return Array.isArray(_e)||Kr(_e)||rn(_e)}function Wi(_e){return _e.sort(function(kr,Lr){return kr===Zu?-1:Lr===Zu?1:kr=1,Dn>=2,kr)}else if(Lr===os){var oi=_e.data;return new Yn(oi.thisDep,oi.contextDep,oi.propDep,kr)}else{if(Lr===fs)return new Yn(!1,!1,!1,kr);if(Lr===no){for(var Jn=!1,gn=!1,ni=!1,Yi=0;Yi<_e.data.length;++Yi){var Ui=_e.data[Yi];if(Ui.type===eo)ni=!0;else if(Ui.type===rs)gn=!0;else if(Ui.type===Zo)Jn=!0;else if(Ui.type===Ji){Jn=!0;var va=Ui.data;va>=1&&(gn=!0),va>=2&&(ni=!0)}else Ui.type===os&&(Jn=Jn||Ui.data.thisDep,gn=gn||Ui.data.contextDep,ni=ni||Ui.data.propDep)}return new Yn(Jn,gn,ni,kr)}else return new Yn(Lr===Zo,Lr===rs,Lr===eo,kr)}}var Lo=new Yn(!1,!1,!1,function(){});function Fo(_e,kr,Lr,Dn,oi,Jn,gn,ni,Yi,Ui,va,Za,Ba,ta,wi,hn){var Nn=Ui.Record,Oi={add:32774,subtract:32778,"reverse subtract":32779};Lr.ext_blend_minmax&&(Oi.min=Le,Oi.max=Be);var _i=Lr.angle_instanced_arrays,Qn=Lr.webgl_draw_buffers,Ma=Lr.oes_vertex_array_object,ca={dirty:!0,profile:hn.profile},Ua={},vi=[],ti={},Sa={};function pa(Yt){return Yt.replace(".","_")}function qi(Yt,ce,Se){var nr=pa(Yt);vi.push(Yt),Ua[nr]=ca[nr]=!!Se,ti[nr]=ce}function $i(Yt,ce,Se){var nr=pa(Yt);vi.push(Yt),Array.isArray(Se)?(ca[nr]=Se.slice(),Ua[nr]=Se.slice()):ca[nr]=Ua[nr]=Se,Sa[nr]=ce}function _a(Yt){return!!isNaN(Yt)}qi(qa,Nr),qi(ds,Ir),$i(tl,"blendColor",[0,0,0,0]),$i(Pl,"blendEquationSeparate",[Xr,Xr]),$i(iu,"blendFuncSeparate",[en,Mr,en,Mr]),qi(Hl,mn,!0),$i(au,"depthFunc",vn),$i(ml,"depthRange",[0,1]),$i(qu,"depthMask",!0),$i(Lu,Lu,[!0,!0,!0,!0]),qi(uu,wr),$i(zo,"cullFace",jt),$i(Ms,Ms,Me),$i($l,$l,1),qi(Fl,Bn),$i(vc,"polygonOffset",[0,0]),qi(Hc,ri),qi(Pc,Fi),$i(Ph,"sampleCoverage",[1,!1]),qi(Wc,tn),$i(zh,"stencilMask",-1),$i(Iu,"stencilFunc",[sr,0,-1]),$i(Ih,"stencilOpSeparate",[At,ir,ir,ir]),$i(es,"stencilOpSeparate",[jt,ir,ir,ir]),qi(zs,zn),$i(qc,"scissor",[0,0,_e.drawingBufferWidth,_e.drawingBufferHeight]),$i(Zu,Zu,[0,0,_e.drawingBufferWidth,_e.drawingBufferHeight]);var Po={gl:_e,context:Ba,strings:kr,next:Ua,current:ca,draw:Za,elements:Jn,buffer:oi,shader:va,attributes:Ui.state,vao:Ui,uniforms:Yi,framebuffer:ni,extensions:Lr,timer:ta,isBufferArgs:Ii},wo={primTypes:ui,compareFuncs:Un,blendFuncs:Bi,blendEquations:Oi,stencilOps:mi,glTypes:Vn,orientationType:Ti};Qn&&(wo.backBuffer=[jt],wo.drawBuffer=h(Dn.maxDrawbuffers,function(Yt){return Yt===0?[0]:h(Yt,function(ce){return On+ce})}));var xa=0;function Oa(){var Yt=Ra({cache:wi}),ce=Yt.link,Se=Yt.global;Yt.id=xa++,Yt.batchId="0";var nr=ce(Po),Ye=Yt.shared={props:"a0"};Object.keys(Po).forEach(function(Xe){Ye[Xe]=Se.def(nr,".",Xe)});var tr=Yt.next={},lr=Yt.current={};Object.keys(Sa).forEach(function(Xe){Array.isArray(ca[Xe])&&(tr[Xe]=Se.def(Ye.next,".",Xe),lr[Xe]=Se.def(Ye.current,".",Xe))});var hr=Yt.constants={};Object.keys(wo).forEach(function(Xe){hr[Xe]=Se.def(JSON.stringify(wo[Xe]))}),Yt.invoke=function(Xe,$e){switch($e.type){case Ji:var Cr=["this",Ye.context,Ye.props,Yt.batchId];return Xe.def(ce($e.data),".call(",Cr.slice(0,Math.max($e.data.length+1,4)),")");case eo:return Xe.def(Ye.props,$e.data);case rs:return Xe.def(Ye.context,$e.data);case Zo:return Xe.def("this",$e.data);case os:return $e.data.append(Yt,Xe),$e.data.ref;case fs:return $e.data.toString();case no:return $e.data.map(function(on){return Yt.invoke(Xe,on)})}},Yt.attribCache={};var Ve={};return Yt.scopeAttrib=function(Xe){var $e=kr.id(Xe);if($e in Ve)return Ve[$e];var Cr=Ui.scope[$e];Cr||(Cr=Ui.scope[$e]=new Nn);var on=Ve[$e]=ce(Cr);return on},Yt}function ho(Yt){var ce=Yt.static,Se=Yt.dynamic,nr;if(Zf in ce){var Ye=!!ce[Zf];nr=Ha(function(lr,hr){return Ye}),nr.enable=Ye}else if(Zf in Se){var tr=Se[Zf];nr=ro(tr,function(lr,hr){return lr.invoke(hr,tr)})}return nr}function So(Yt,ce){var Se=Yt.static,nr=Yt.dynamic;if(qt in Se){var Ye=Se[qt];return Ye?(Ye=ni.getFramebuffer(Ye),Ha(function(lr,hr){var Ve=lr.link(Ye),Xe=lr.shared;hr.set(Xe.framebuffer,".next",Ve);var $e=Xe.context;return hr.set($e,"."+Dr,Ve+".width"),hr.set($e,"."+ln,Ve+".height"),Ve})):Ha(function(lr,hr){var Ve=lr.shared;hr.set(Ve.framebuffer,".next","null");var Xe=Ve.context;return hr.set(Xe,"."+Dr,Xe+"."+xe),hr.set(Xe,"."+ln,Xe+"."+Ae),"null"})}else if(qt in nr){var tr=nr[qt];return ro(tr,function(lr,hr){var Ve=lr.invoke(hr,tr),Xe=lr.shared,$e=Xe.framebuffer,Cr=hr.def($e,".getFramebuffer(",Ve,")");hr.set($e,".next",Cr);var on=Xe.context;return hr.set(on,"."+Dr,Cr+"?"+Cr+".width:"+on+"."+xe),hr.set(on,"."+ln,Cr+"?"+Cr+".height:"+on+"."+Ae),Cr})}else return null}function ts(Yt,ce,Se){var nr=Yt.static,Ye=Yt.dynamic;function tr(Ve){if(Ve in nr){var Xe=nr[Ve],$e=!0,Cr=Xe.x|0,on=Xe.y|0,fn,fi;return"width"in Xe?fn=Xe.width|0:$e=!1,"height"in Xe?fi=Xe.height|0:$e=!1,new Yn(!$e&&ce&&ce.thisDep,!$e&&ce&&ce.contextDep,!$e&&ce&&ce.propDep,function(Mi,di){var Ki=Mi.shared.context,Ai=fn;"width"in Xe||(Ai=di.def(Ki,".",Dr,"-",Cr));var Si=fi;return"height"in Xe||(Si=di.def(Ki,".",ln,"-",on)),[Cr,on,Ai,Si]})}else if(Ve in Ye){var si=Ye[Ve],Gn=ro(si,function(Mi,di){var Ki=Mi.invoke(di,si),Ai=Mi.shared.context,Si=di.def(Ki,".x|0"),sa=di.def(Ki,".y|0"),Qa=di.def('"width" in ',Ki,"?",Ki,".width|0:","(",Ai,".",Dr,"-",Si,")"),so=di.def('"height" in ',Ki,"?",Ki,".height|0:","(",Ai,".",ln,"-",sa,")");return[Si,sa,Qa,so]});return ce&&(Gn.thisDep=Gn.thisDep||ce.thisDep,Gn.contextDep=Gn.contextDep||ce.contextDep,Gn.propDep=Gn.propDep||ce.propDep),Gn}else return ce?new Yn(ce.thisDep,ce.contextDep,ce.propDep,function(Mi,di){var Ki=Mi.shared.context;return[0,0,di.def(Ki,".",Dr),di.def(Ki,".",ln)]}):null}var lr=tr(Zu);if(lr){var hr=lr;lr=new Yn(lr.thisDep,lr.contextDep,lr.propDep,function(Ve,Xe){var $e=hr.append(Ve,Xe),Cr=Ve.shared.context;return Xe.set(Cr,"."+Sn,$e[2]),Xe.set(Cr,"."+Xt,$e[3]),$e})}return{viewport:lr,scissor_box:tr(qc)}}function Nl(Yt,ce){var Se=Yt.static,nr=typeof Se[ht]=="string"&&typeof Se[I]=="string";if(nr){if(Object.keys(ce.dynamic).length>0)return null;var Ye=ce.static,tr=Object.keys(Ye);if(tr.length>0&&typeof Ye[tr[0]]=="number"){for(var lr=[],hr=0;hr"+Si+"?"+$e+".constant["+Si+"]:0;"}).join(""),"}}else{","if(",fn,"(",$e,".buffer)){",Mi,"=",fi,".createStream(",Ie,",",$e,".buffer);","}else{",Mi,"=",fi,".getBuffer(",$e,".buffer);","}",di,'="type" in ',$e,"?",on.glTypes,"[",$e,".type]:",Mi,".dtype;",si.normalized,"=!!",$e,".normalized;");function Ki(Ai){Xe(si[Ai],"=",$e,".",Ai,"|0;")}return Ki("size"),Ki("offset"),Ki("stride"),Ki("divisor"),Xe("}}"),Xe.exit("if(",si.isStream,"){",fi,".destroyStream(",Mi,");","}"),si}Ye[tr]=ro(lr,hr)}),Ye}function pc(Yt){var ce=Yt.static,Se=Yt.dynamic,nr={};return Object.keys(ce).forEach(function(Ye){var tr=ce[Ye];nr[Ye]=Ha(function(lr,hr){return typeof tr=="number"||typeof tr=="boolean"?""+tr:lr.link(tr)})}),Object.keys(Se).forEach(function(Ye){var tr=Se[Ye];nr[Ye]=ro(tr,function(lr,hr){return lr.invoke(hr,tr)})}),nr}function yc(Yt,ce,Se,nr,Ye){Yt.static,Yt.dynamic;var tr=Nl(Yt,ce),lr=So(Yt),hr=ts(Yt,lr),Ve=us(Yt),Xe=wu(Yt),$e=Al(Yt,Ye,tr);function Cr(Mi){var di=hr[Mi];di&&(Xe[Mi]=di)}Cr(Zu),Cr(pa(qc));var on=Object.keys(Xe).length>0,fn={framebuffer:lr,draw:Ve,shader:$e,state:Xe,dirty:on,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(fn.profile=ho(Yt),fn.uniforms=fl(Se),fn.drawVAO=fn.scopeVAO=Ve.vao,!fn.drawVAO&&$e.program&&!tr&&Lr.angle_instanced_arrays&&Ve.static.elements){var fi=!0,si=$e.program.attributes.map(function(Mi){var di=ce.static[Mi];return fi=fi&&!!di,di});if(fi&&si.length>0){var Gn=Ui.getVAO(Ui.createVAO({attributes:si,elements:Ve.static.elements}));fn.drawVAO=new Yn(null,null,null,function(Mi,di){return Mi.link(Gn)}),fn.useVAO=!0}}return tr?fn.useVAO=!0:fn.attributes=Eu(ce),fn.context=pc(nr),fn}function yu(Yt,ce,Se){var nr=Yt.shared,Ye=nr.context,tr=Yt.scope();Object.keys(Se).forEach(function(lr){ce.save(Ye,"."+lr);var hr=Se[lr],Ve=hr.append(Yt,ce);Array.isArray(Ve)?tr(Ye,".",lr,"=[",Ve.join(),"];"):tr(Ye,".",lr,"=",Ve,";")}),ce(tr)}function hu(Yt,ce,Se,nr){var Ye=Yt.shared,tr=Ye.gl,lr=Ye.framebuffer,hr;Qn&&(hr=ce.def(Ye.extensions,".webgl_draw_buffers"));var Ve=Yt.constants,Xe=Ve.drawBuffer,$e=Ve.backBuffer,Cr;Se?Cr=Se.append(Yt,ce):Cr=ce.def(lr,".next"),nr||ce("if(",Cr,"!==",lr,".cur){"),ce("if(",Cr,"){",tr,".bindFramebuffer(",In,",",Cr,".framebuffer);"),Qn&&ce(hr,".drawBuffersWEBGL(",Xe,"[",Cr,".colorAttachments.length]);"),ce("}else{",tr,".bindFramebuffer(",In,",null);"),Qn&&ce(hr,".drawBuffersWEBGL(",$e,");"),ce("}",lr,".cur=",Cr,";"),nr||ce("}")}function ku(Yt,ce,Se){var nr=Yt.shared,Ye=nr.gl,tr=Yt.current,lr=Yt.next,hr=nr.current,Ve=nr.next,Xe=Yt.cond(hr,".dirty");vi.forEach(function($e){var Cr=pa($e);if(!(Cr in Se.state)){var on,fn;if(Cr in lr){on=lr[Cr],fn=tr[Cr];var fi=h(ca[Cr].length,function(Gn){return Xe.def(on,"[",Gn,"]")});Xe(Yt.cond(fi.map(function(Gn,Mi){return Gn+"!=="+fn+"["+Mi+"]"}).join("||")).then(Ye,".",Sa[Cr],"(",fi,");",fi.map(function(Gn,Mi){return fn+"["+Mi+"]="+Gn}).join(";"),";"))}else{on=Xe.def(Ve,".",Cr);var si=Yt.cond(on,"!==",hr,".",Cr);Xe(si),Cr in ti?si(Yt.cond(on).then(Ye,".enable(",ti[Cr],");").else(Ye,".disable(",ti[Cr],");"),hr,".",Cr,"=",on,";"):si(Ye,".",Sa[Cr],"(",on,");",hr,".",Cr,"=",on,";")}}}),Object.keys(Se.state).length===0&&Xe(hr,".dirty=false;"),ce(Xe)}function Bo(Yt,ce,Se,nr){var Ye=Yt.shared,tr=Yt.current,lr=Ye.current,hr=Ye.gl,Ve;Wi(Object.keys(Se)).forEach(function(Xe){var $e=Se[Xe];if(!(nr&&!nr($e))){var Cr=$e.append(Yt,ce);if(ti[Xe]){var on=ti[Xe];ja($e)?(Ve=Yt.link(Cr,{stable:!0}),ce(Yt.cond(Ve).then(hr,".enable(",on,");").else(hr,".disable(",on,");")),ce(lr,".",Xe,"=",Ve,";")):(ce(Yt.cond(Cr).then(hr,".enable(",on,");").else(hr,".disable(",on,");")),ce(lr,".",Xe,"=",Cr,";"))}else if(Pn(Cr)){var fn=tr[Xe];ce(hr,".",Sa[Xe],"(",Cr,");",Cr.map(function(fi,si){return fn+"["+si+"]="+fi}).join(";"),";")}else ja($e)?(Ve=Yt.link(Cr,{stable:!0}),ce(hr,".",Sa[Xe],"(",Ve,");",lr,".",Xe,"=",Ve,";")):ce(hr,".",Sa[Xe],"(",Cr,");",lr,".",Xe,"=",Cr,";")}})}function Tu(Yt,ce){_i&&(Yt.instancing=ce.def(Yt.shared.extensions,".angle_instanced_arrays"))}function ol(Yt,ce,Se,nr,Ye){var tr=Yt.shared,lr=Yt.stats,hr=tr.current,Ve=tr.timer,Xe=Se.profile;function $e(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Cr,on;function fn(Ki){Cr=ce.def(),Ki(Cr,"=",$e(),";"),typeof Ye=="string"?Ki(lr,".count+=",Ye,";"):Ki(lr,".count++;"),ta&&(nr?(on=ce.def(),Ki(on,"=",Ve,".getNumPendingQueries();")):Ki(Ve,".beginQuery(",lr,");"))}function fi(Ki){Ki(lr,".cpuTime+=",$e(),"-",Cr,";"),ta&&(nr?Ki(Ve,".pushScopeStats(",on,",",Ve,".getNumPendingQueries(),",lr,");"):Ki(Ve,".endQuery();"))}function si(Ki){var Ai=ce.def(hr,".profile");ce(hr,".profile=",Ki,";"),ce.exit(hr,".profile=",Ai,";")}var Gn;if(Xe){if(ja(Xe)){Xe.enable?(fn(ce),fi(ce.exit),si("true")):si("false");return}Gn=Xe.append(Yt,ce),si(Gn)}else Gn=ce.def(hr,".profile");var Mi=Yt.block();fn(Mi),ce("if(",Gn,"){",Mi,"}");var di=Yt.block();fi(di),ce.exit("if(",Gn,"){",di,"}")}function Cu(Yt,ce,Se,nr,Ye){var tr=Yt.shared;function lr(Ve){switch(Ve){case ha:case Mo:case Os:return 2;case ka:case hs:case bl:return 3;case io:case hl:case Su:return 4;default:return 1}}function hr(Ve,Xe,$e){var Cr=tr.gl,on=ce.def(Ve,".location"),fn=ce.def(tr.attributes,"[",on,"]"),fi=$e.state,si=$e.buffer,Gn=[$e.x,$e.y,$e.z,$e.w],Mi=["buffer","normalized","offset","stride"];function di(){ce("if(!",fn,".buffer){",Cr,".enableVertexAttribArray(",on,");}");var Ai=$e.type,Si;if($e.size?Si=ce.def($e.size,"||",Xe):Si=Xe,ce("if(",fn,".type!==",Ai,"||",fn,".size!==",Si,"||",Mi.map(function(Qa){return fn+"."+Qa+"!=="+$e[Qa]}).join("||"),"){",Cr,".bindBuffer(",Ie,",",si,".buffer);",Cr,".vertexAttribPointer(",[on,Si,Ai,$e.normalized,$e.stride,$e.offset],");",fn,".type=",Ai,";",fn,".size=",Si,";",Mi.map(function(Qa){return fn+"."+Qa+"="+$e[Qa]+";"}).join(""),"}"),_i){var sa=$e.divisor;ce("if(",fn,".divisor!==",sa,"){",Yt.instancing,".vertexAttribDivisorANGLE(",[on,sa],");",fn,".divisor=",sa,";}")}}function Ki(){ce("if(",fn,".buffer){",Cr,".disableVertexAttribArray(",on,");",fn,".buffer=null;","}if(",$a.map(function(Ai,Si){return fn+"."+Ai+"!=="+Gn[Si]}).join("||"),"){",Cr,".vertexAttrib4f(",on,",",Gn,");",$a.map(function(Ai,Si){return fn+"."+Ai+"="+Gn[Si]+";"}).join(""),"}")}fi===za?di():fi===wa?Ki():(ce("if(",fi,"===",za,"){"),di(),ce("}else{"),Ki(),ce("}"))}nr.forEach(function(Ve){var Xe=Ve.name,$e=Se.attributes[Xe],Cr;if($e){if(!Ye($e))return;Cr=$e.append(Yt,ce)}else{if(!Ye(Lo))return;var on=Yt.scopeAttrib(Xe);Cr={},Object.keys(new Nn).forEach(function(fn){Cr[fn]=ce.def(on,".",fn)})}hr(Yt.link(Ve),lr(Ve.info.type),Cr)})}function xc(Yt,ce,Se,nr,Ye,tr){for(var lr=Yt.shared,hr=lr.gl,Ve,Xe=0;Xe1){for(var Vo=[],vs=[],zl=0;zl>1)",si],");")}function sa(){Se(Gn,".drawArraysInstancedANGLE(",[on,fn,fi,si],");")}$e&&$e!=="null"?di?Si():(Se("if(",$e,"){"),Si(),Se("}else{"),sa(),Se("}")):sa()}function Ai(){function Si(){Se(tr+".drawElements("+[on,fi,Mi,fn+"<<(("+Mi+"-"+ua+")>>1)"]+");")}function sa(){Se(tr+".drawArrays("+[on,fn,fi]+");")}$e&&$e!=="null"?di?Si():(Se("if(",$e,"){"),Si(),Se("}else{"),sa(),Se("}")):sa()}_i&&(typeof si!="number"||si>=0)?typeof si=="string"?(Se("if(",si,">0){"),Ki(),Se("}else if(",si,"<0){"),Ai(),Se("}")):Ki():Ai()}function Ss(Yt,ce,Se,nr,Ye){var tr=Oa(),lr=tr.proc("body",Ye);return _i&&(tr.instancing=lr.def(tr.shared.extensions,".angle_instanced_arrays")),Yt(tr,lr,Se,nr),tr.compile().body}function Ml(Yt,ce,Se,nr){Tu(Yt,ce),Se.useVAO?Se.drawVAO?ce(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,ce),");"):ce(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(ce(Yt.shared.vao,".setVAO(null);"),Cu(Yt,ce,Se,nr.attributes,function(){return!0})),xc(Yt,ce,Se,nr.uniforms,function(){return!0},!1),Eo(Yt,ce,ce,Se)}function yl(Yt,ce){var Se=Yt.proc("draw",1);Tu(Yt,Se),yu(Yt,Se,ce.context),hu(Yt,Se,ce.framebuffer),ku(Yt,Se,ce),Bo(Yt,Se,ce.state),ol(Yt,Se,ce,!1,!0);var nr=ce.shader.progVar.append(Yt,Se);if(Se(Yt.shared.gl,".useProgram(",nr,".program);"),ce.shader.program)Ml(Yt,Se,ce,ce.shader.program);else{Se(Yt.shared.vao,".setVAO(null);");var Ye=Yt.global.def("{}"),tr=Se.def(nr,".id"),lr=Se.def(Ye,"[",tr,"]");Se(Yt.cond(lr).then(lr,".call(this,a0);").else(lr,"=",Ye,"[",tr,"]=",Yt.link(function(hr){return Ss(Ml,Yt,ce,hr,1)}),"(",nr,");",lr,".call(this,a0);"))}Object.keys(ce.state).length>0&&Se(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Se(Yt.shared.vao,".setVAO(null);")}function Z(Yt,ce,Se,nr){Yt.batchId="a1",Tu(Yt,ce);function Ye(){return!0}Cu(Yt,ce,Se,nr.attributes,Ye),xc(Yt,ce,Se,nr.uniforms,Ye,!1),Eo(Yt,ce,ce,Se)}function ot(Yt,ce,Se,nr){Tu(Yt,ce);var Ye=Se.contextDep,tr=ce.def(),lr="a0",hr="a1",Ve=ce.def();Yt.shared.props=Ve,Yt.batchId=tr;var Xe=Yt.scope(),$e=Yt.scope();ce(Xe.entry,"for(",tr,"=0;",tr,"<",hr,";++",tr,"){",Ve,"=",lr,"[",tr,"];",$e,"}",Xe.exit);function Cr(Mi){return Mi.contextDep&&Ye||Mi.propDep}function on(Mi){return!Cr(Mi)}if(Se.needsContext&&yu(Yt,$e,Se.context),Se.needsFramebuffer&&hu(Yt,$e,Se.framebuffer),Bo(Yt,$e,Se.state,Cr),Se.profile&&Cr(Se.profile)&&ol(Yt,$e,Se,!1,!0),nr)Se.useVAO?Se.drawVAO?Cr(Se.drawVAO)?$e(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,$e),");"):Xe(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,Xe),");"):Xe(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(Xe(Yt.shared.vao,".setVAO(null);"),Cu(Yt,Xe,Se,nr.attributes,on),Cu(Yt,$e,Se,nr.attributes,Cr)),xc(Yt,Xe,Se,nr.uniforms,on,!1),xc(Yt,$e,Se,nr.uniforms,Cr,!0),Eo(Yt,Xe,$e,Se);else{var fn=Yt.global.def("{}"),fi=Se.shader.progVar.append(Yt,$e),si=$e.def(fi,".id"),Gn=$e.def(fn,"[",si,"]");$e(Yt.shared.gl,".useProgram(",fi,".program);","if(!",Gn,"){",Gn,"=",fn,"[",si,"]=",Yt.link(function(Mi){return Ss(Z,Yt,Se,Mi,2)}),"(",fi,");}",Gn,".call(this,a0[",tr,"],",tr,");")}}function et(Yt,ce){var Se=Yt.proc("batch",2);Yt.batchId="0",Tu(Yt,Se);var nr=!1,Ye=!0;Object.keys(ce.context).forEach(function(fn){nr=nr||ce.context[fn].propDep}),nr||(yu(Yt,Se,ce.context),Ye=!1);var tr=ce.framebuffer,lr=!1;tr?(tr.propDep?nr=lr=!0:tr.contextDep&&nr&&(lr=!0),lr||hu(Yt,Se,tr)):hu(Yt,Se,null),ce.state.viewport&&ce.state.viewport.propDep&&(nr=!0);function hr(fn){return fn.contextDep&&nr||fn.propDep}ku(Yt,Se,ce),Bo(Yt,Se,ce.state,function(fn){return!hr(fn)}),(!ce.profile||!hr(ce.profile))&&ol(Yt,Se,ce,!1,"a1"),ce.contextDep=nr,ce.needsContext=Ye,ce.needsFramebuffer=lr;var Ve=ce.shader.progVar;if(Ve.contextDep&&nr||Ve.propDep)ot(Yt,Se,ce,null);else{var Xe=Ve.append(Yt,Se);if(Se(Yt.shared.gl,".useProgram(",Xe,".program);"),ce.shader.program)ot(Yt,Se,ce,ce.shader.program);else{Se(Yt.shared.vao,".setVAO(null);");var $e=Yt.global.def("{}"),Cr=Se.def(Xe,".id"),on=Se.def($e,"[",Cr,"]");Se(Yt.cond(on).then(on,".call(this,a0,a1);").else(on,"=",$e,"[",Cr,"]=",Yt.link(function(fn){return Ss(ot,Yt,ce,fn,2)}),"(",Xe,");",on,".call(this,a0,a1);"))}}Object.keys(ce.state).length>0&&Se(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Se(Yt.shared.vao,".setVAO(null);")}function xt(Yt,ce){var Se=Yt.proc("scope",3);Yt.batchId="a2";var nr=Yt.shared,Ye=nr.current;if(yu(Yt,Se,ce.context),ce.framebuffer&&ce.framebuffer.append(Yt,Se),Wi(Object.keys(ce.state)).forEach(function(hr){var Ve=ce.state[hr],Xe=Ve.append(Yt,Se);Pn(Xe)?Xe.forEach(function($e,Cr){_a($e)?Se.set(Yt.next[hr],"["+Cr+"]",$e):Se.set(Yt.next[hr],"["+Cr+"]",Yt.link($e,{stable:!0}))}):ja(Ve)?Se.set(nr.next,"."+hr,Yt.link(Xe,{stable:!0})):Se.set(nr.next,"."+hr,Xe)}),ol(Yt,Se,ce,!0,!0),[Et,ke,Vt,Oe,It].forEach(function(hr){var Ve=ce.draw[hr];if(Ve){var Xe=Ve.append(Yt,Se);_a(Xe)?Se.set(nr.draw,"."+hr,Xe):Se.set(nr.draw,"."+hr,Yt.link(Xe),{stable:!0})}}),Object.keys(ce.uniforms).forEach(function(hr){var Ve=ce.uniforms[hr].append(Yt,Se);Array.isArray(Ve)&&(Ve="["+Ve.map(function(Xe){return _a(Xe)?Xe:Yt.link(Xe,{stable:!0})})+"]"),Se.set(nr.uniforms,"["+Yt.link(kr.id(hr),{stable:!0})+"]",Ve)}),Object.keys(ce.attributes).forEach(function(hr){var Ve=ce.attributes[hr].append(Yt,Se),Xe=Yt.scopeAttrib(hr);Object.keys(new Nn).forEach(function($e){Se.set(Xe,"."+$e,Ve[$e])})}),ce.scopeVAO){var tr=ce.scopeVAO.append(Yt,Se);_a(tr)?Se.set(nr.vao,".targetVAO",tr):Se.set(nr.vao,".targetVAO",Yt.link(tr,{stable:!0}))}function lr(hr){var Ve=ce.shader[hr];if(Ve){var Xe=Ve.append(Yt,Se);_a(Xe)?Se.set(nr.shader,"."+hr,Xe):Se.set(nr.shader,"."+hr,Yt.link(Xe,{stable:!0}))}}lr(I),lr(ht),Object.keys(ce.state).length>0&&(Se(Ye,".dirty=true;"),Se.exit(Ye,".dirty=true;")),Se("a1(",Yt.shared.context,",a0,",Yt.batchId,");")}function Ut(Yt){if(!(typeof Yt!="object"||Pn(Yt))){for(var ce=Object.keys(Yt),Se=0;Se=0;--Eo){var Ss=_a[Eo];Ss&&Ss(ta,null,0)}Lr.flush(),Ui&&Ui.update()}function So(){!Oa&&_a.length>0&&(Oa=x.next(ho))}function ts(){Oa&&(x.cancel(ho),Oa=null)}function Nl(Eo){Eo.preventDefault(),ts(),Po.forEach(function(Ss){Ss()})}function Al(Eo){Lr.getError(),oi.restore(),ca.restore(),Oi.restore(),Ua.restore(),vi.restore(),ti.restore(),Qn.restore(),Ui&&Ui.restore(),Sa.procs.refresh(),So(),wo.forEach(function(Ss){Ss()})}$i&&($i.addEventListener(rl,Nl,!1),$i.addEventListener(ou,Al,!1));function us(){_a.length=0,ts(),$i&&($i.removeEventListener(rl,Nl),$i.removeEventListener(ou,Al)),ca.clear(),ti.clear(),vi.clear(),Qn.clear(),Ua.clear(),_i.clear(),Oi.clear(),Ui&&Ui.clear(),xa.forEach(function(Eo){Eo()})}function wu(Eo){function Ss(Ye){var tr=c({},Ye);delete tr.uniforms,delete tr.attributes,delete tr.context,delete tr.vao,"stencil"in tr&&tr.stencil.op&&(tr.stencil.opBack=tr.stencil.opFront=tr.stencil.op,delete tr.stencil.op);function lr(hr){if(hr in tr){var Ve=tr[hr];delete tr[hr],Object.keys(Ve).forEach(function(Xe){tr[hr+"."+Xe]=Ve[Xe]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in Ye&&(tr.vao=Ye.vao),tr}function Ml(Ye,tr){var lr={},hr={};return Object.keys(Ye).forEach(function(Ve){var Xe=Ye[Ve];if(f.isDynamic(Xe)){hr[Ve]=f.unbox(Xe,Ve);return}else if(tr&&Array.isArray(Xe)){for(var $e=0;$e0)return ye.call(this,Se(Ye|0),Ye|0)}else if(Array.isArray(Ye)){if(Ye.length)return ye.call(this,Ye,Ye.length)}else return fe.call(this,Ye)}return c(nr,{stats:xt,destroy:function(){Ut.destroy()}})}var fl=ti.setFBO=wu({framebuffer:f.define.call(null,Gl,"framebuffer")});function Eu(Eo,Ss){var Ml=0;Sa.procs.poll();var yl=Ss.color;yl&&(Lr.clearColor(+yl[0]||0,+yl[1]||0,+yl[2]||0,+yl[3]||0),Ml|=Ku),"depth"in Ss&&(Lr.clearDepth(+Ss.depth),Ml|=cu),"stencil"in Ss&&(Lr.clearStencil(Ss.stencil|0),Ml|=_o),Lr.clear(Ml)}function pc(Eo){if("framebuffer"in Eo)if(Eo.framebuffer&&Eo.framebuffer_reglType==="framebufferCube")for(var Ss=0;Ss<6;++Ss)fl(c({framebuffer:Eo.framebuffer.faces[Ss]},Eo),Eu);else fl(Eo,Eu);else Eu(null,Eo)}function yc(Eo){_a.push(Eo);function Ss(){var Ml=Ql(_a,Eo);function yl(){var Z=Ql(_a,yl);_a[Z]=_a[_a.length-1],_a.length-=1,_a.length<=0&&ts()}_a[Ml]=yl}return So(),{cancel:Ss}}function yu(){var Eo=qi.viewport,Ss=qi.scissor_box;Eo[0]=Eo[1]=Ss[0]=Ss[1]=0,ta.viewportWidth=ta.framebufferWidth=ta.drawingBufferWidth=Eo[2]=Ss[2]=Lr.drawingBufferWidth,ta.viewportHeight=ta.framebufferHeight=ta.drawingBufferHeight=Eo[3]=Ss[3]=Lr.drawingBufferHeight}function hu(){ta.tick+=1,ta.time=Bo(),yu(),Sa.procs.poll()}function ku(){Ua.refresh(),yu(),Sa.procs.refresh(),Ui&&Ui.update()}function Bo(){return(y()-va)/1e3}ku();function Tu(Eo,Ss){var Ml;switch(Eo){case"frame":return yc(Ss);case"lost":Ml=Po;break;case"restore":Ml=wo;break;case"destroy":Ml=xa;break}return Ml.push(Ss),{cancel:function(){for(var yl=0;yl=0},read:pa,destroy:us,_gl:Lr,_refresh:ku,poll:function(){hu(),Ui&&Ui.update()},now:Bo,stats:gn,getCachedCode:ol,preloadCachedCode:Cu});return kr.onDone(null,xc),xc}return bh})}),uT=Ft((Q,$)=>{var c=oS(),g=gH();$.exports=function(P,S,t){var e=P._fullLayout,r=!0;return e._glcanvas.each(function(a){if(a.regl){a.regl.preloadCachedCode(t);return}if(!(a.pick&&!e._has("parcoords"))){try{a.regl=g({canvas:this,attributes:{antialias:!a.pick,preserveDrawingBuffer:!0},pixelRatio:P._context.plotGlPixelRatio||window.devicePixelRatio,extensions:S||[],cachedCode:t||{}})}catch{r=!1}a.regl||(r=!1),r&&this.addEventListener("webglcontextlost",function(n){P&&P.emit&&P.emit("plotly_webglcontextlost",{event:n,layer:a.key})},!1)}}),r||c({container:e._glcontainer.node()}),r}}),KS=Ft((f,$)=>{var c=ES(),g=jS(),P=QV(),S=mH(),t=bn(),e=v0().selectMode,r=uT(),a=Ac(),n=Na(),o=AS().styleTextSelection,i={};function s(x,y,v,T){var u=x._size,b=x.width*T,_=x.height*T,C=u.l*T,M=u.b*T,E=u.r*T,A=u.t*T,h=u.w*T,p=u.h*T;return[C+y.domain[0]*h,M+v.domain[0]*p,b-E-(1-y.domain[1])*h,_-A-(1-v.domain[1])*p]}var f=$.exports=function(x,y,v){if(v.length){var T=x._fullLayout,u=y._scene,b=y.xaxis,_=y.yaxis,C,M;if(u){var E=r(x,["ANGLE_instanced_arrays","OES_element_index_uint"],i);if(!E){u.init();return}var A=u.count,h=T._glcanvas.data()[0].regl;if(n(x,y,v),u.dirty){if((u.line2d||u.error2d)&&!(u.scatter2d||u.fill2d||u.glText)&&h.clear({color:!0,depth:!0}),u.error2d===!0&&(u.error2d=P(h)),u.line2d===!0&&(u.line2d=g(h)),u.scatter2d===!0&&(u.scatter2d=c(h)),u.fill2d===!0&&(u.fill2d=g(h)),u.glText===!0)for(u.glText=new Array(A),C=0;Cu.glText.length){var p=A-u.glText.length;for(C=0;Cft&&(isNaN(Y[ut])||isNaN(Y[ut+1]));)ut-=2;it.positions=Y.slice(ft,ut+2)}return it}),u.line2d.update(u.lineOptions)),u.error2d){var R=(u.errorXOptions||[]).concat(u.errorYOptions||[]);u.error2d.update(R)}u.scatter2d&&u.scatter2d.update(u.markerOptions),u.fillOrder=t.repeat(null,A),u.fill2d&&(u.fillOptions=u.fillOptions.map(function(it,Y){var ft=v[Y];if(!(!it||!ft||!ft[0]||!ft[0].trace)){var ut=ft[0],wt=ut.trace,zt=ut.t,Pt=u.lineOptions[Y],Wt,Ht,Jt=[];wt._ownfill&&Jt.push(Y),wt._nexttrace&&Jt.push(Y+1),Jt.length&&(u.fillOrder[Y]=Jt);var ge=[],he=Pt&&Pt.positions||zt.positions,de,se;if(wt.fill==="tozeroy"){for(de=0;dede&&isNaN(he[se+1]);)se-=2;he[de+1]!==0&&(ge=[he[de],0]),ge=ge.concat(he.slice(de,se+2)),he[se+1]!==0&&(ge=ge.concat([he[se],0]))}else if(wt.fill==="tozerox"){for(de=0;dede&&isNaN(he[se]);)se-=2;he[de]!==0&&(ge=[0,he[de+1]]),ge=ge.concat(he.slice(de,se+2)),he[se]!==0&&(ge=ge.concat([0,he[se+1]]))}else if(wt.fill==="toself"||wt.fill==="tonext"){for(ge=[],Wt=0,it.splitNull=!0,Ht=0;Ht-1;for(C=0;C{var c=XU();c.plot=KS(),$.exports=c}),yH=Ft((Q,$)=>{$.exports=vH()}),XS=Ft((Q,$)=>{var c=tf(),g=Tc(),P=fh().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:t}=$u(),e=x3(),r=ic().idRegex,a=pu().templatedArray,n=Ta().extendFlat,o=c.marker,i=o.line,s=n(g("marker.line",{editTypeOverride:"calc"}),{width:n({},i.width,{editType:"calc"}),editType:"calc"}),f=n(g("marker"),{symbol:o.symbol,angle:o.angle,size:n({},o.size,{editType:"markerSize"}),sizeref:o.sizeref,sizemin:o.sizemin,sizemode:o.sizemode,opacity:o.opacity,colorbar:o.colorbar,line:s,editType:"calc"});f.color.editType=f.cmin.editType=f.cmax.editType="style";function x(y){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:r[y],editType:"plot"}}}$.exports={dimensions:a("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:n({},e.text,{}),hovertext:n({},e.hovertext,{}),hovertemplate:S(),hovertemplatefallback:t(),xhoverformat:P("x"),yhoverformat:P("y"),marker:f,xaxes:x("x"),yaxes:x("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:e.selected.marker,editType:"calc"},unselected:{marker:e.unselected.marker,editType:"calc"},opacity:e.opacity}}),cT=Ft((Q,$)=>{$.exports=function(c,g,P,S){S||(S=1/0);var t,e;for(t=0;t{var c=bn(),g=Md(),P=XS(),S=Ac(),t=s0(),e=cT(),r=nT().isOpenSymbol;$.exports=function(o,i,s,f){function x(M,E){return c.coerce(o,i,P,M,E)}var y=g(o,i,{name:"dimensions",handleItemDefaults:a}),v=x("diagonal.visible"),T=x("showupperhalf"),u=x("showlowerhalf"),b=e(i,y,"values");if(!b||!v&&!T&&!u){i.visible=!1;return}x("text"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),x("xhoverformat"),x("yhoverformat"),t(o,i,s,f,x,{noAngleRef:!0,noStandOff:!0});var _=r(i.marker.symbol),C=S.isBubble(i);x("marker.line.width",_||C?1:0),n(o,i,f,x),c.coerceSelectionMarkerOpacity(i,x)};function a(o,i){function s(x,y){return c.coerce(o,i,P.dimensions,x,y)}s("label");var f=s("values");f&&f.length?s("visible"):i.visible=!1,s("axis.type"),s("axis.matches")}function n(o,i,s,f){var x=i.dimensions,y=x.length,v=i.showupperhalf,T=i.showlowerhalf,u=i.diagonal.visible,b,_,C=new Array(y),M=new Array(y);for(b=0;b_&&v||b<_&&T||b===_&&(u||!T||!v))&&(s._splomSubplots[q]=1)}(!T||!u&&v&&T)&&(s._splomGridDflt.xside="bottom",s._splomGridDflt.yside="left")}}),_H=Ft((Q,$)=>{var c=bn();$.exports=function(g,P){var S=g._fullLayout,t=P.uid,e=S._splomScenes;e||(e=S._splomScenes={});var r={dirty:!0,selectBatch:[],unselectBatch:[]},a={matrix:!1,selectBatch:[],unselectBatch:[]},n=e[P.uid];return n||(n=e[t]=c.extendFlat({},r,a),n.draw=function(){n.matrix&&n.matrix.draw&&(n.selectBatch.length||n.unselectBatch.length?n.matrix.draw(n.unselectBatch,n.selectBatch):n.matrix.draw()),n.dirty=!1},n.destroy=function(){n.matrix&&n.matrix.destroy&&n.matrix.destroy(),n.matrixOptions=null,n.selectBatch=null,n.unselectBatch=null,n=null}),n.dirty||c.extendFlat(n,r),n}}),bH=Ft((Q,$)=>{var c=bn(),g=Rc(),P=me().calcMarkerSize,S=me().calcAxisExpansion,t=F0(),e=gx().markerSelection,r=gx().markerStyle,a=_H(),n=Da().BADNUM,o=H1().TOO_MANY_POINTS;$.exports=function(i,s){var f=s.dimensions,x=s._length,y={},v=y.cdata=[],T=y.data=[],u=s._visibleDims=[],b,_,C,M,E;function A(R,O){for(var N=R.makeCalcdata({v:O.values,vcalendar:s.calendar},"v"),V=0;Vo,k;for(p?k=y.sizeAvg||Math.max(y.size,3):k=P(s,x),_=0;_{(function(){var c,g,P,S,t,e;typeof performance<"u"&&performance!==null&&performance.now?$.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?($.exports=function(){return(c()-t)/1e6},g=process.hrtime,c=function(){var r;return r=g(),r[0]*1e9+r[1]},S=c(),e=process.uptime()*1e9,t=S-e):Date.now?($.exports=function(){return Date.now()-P},P=Date.now()):($.exports=function(){return new Date().getTime()-P},P=new Date().getTime())}).call(Q)}),kH=Ft((Q,$)=>{var c=wH(),g=window,P=["moz","webkit"],S="AnimationFrame",t=g["request"+S],e=g["cancel"+S]||g["cancelRequest"+S];for(r=0;!t&&r{$.exports=function(c,g){var P=typeof c=="number",S=typeof g=="number";P&&!S?(g=c,c=0):!P&&!S&&(c=0,g=0),c=c|0,g=g|0;var t=g-c;if(t<0)throw new Error("array length must be positive");for(var e=new Array(t),r=0,a=c;r{var c=ES(),g=Cg(),P=px(),S=kH(),t=TH(),e=db(),r=mx();$.exports=a;function a(s,f){if(!(this instanceof a))return new a(s);this.traces=[],this.passes={},this.regl=s,this.scatter=c(s),this.canvas=this.scatter.canvas}a.prototype.render=function(...s){return s.length&&this.update(...s),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=S(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,S(()=>{this.dirty=!1})),this)},a.prototype.update=function(...s){if(!s.length)return;for(let y=0;yw||!v.lower&&k{f[T+b]=y})}this.scatter.draw(...f)}return this},a.prototype.destroy=function(){return this.traces.forEach(s=>{s.buffer&&s.buffer.destroy&&s.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function n(s,f,x){let y=s.id!=null?s.id:s,v=f,T=x;return y<<16|(v&255)<<8|T&255}function o(s,f,x){let y,v,T,u,b=s[f],_=s[x];return b.length>2?(b[0],b[2],y=b[1],v=b[3]):b.length?(y=b[0],v=b[1]):(b.x,y=b.y,b.x+b.width,v=b.y+b.height),_.length>2?(T=_[0],u=_[2],_[1],_[3]):_.length?(T=_[0],u=_[1]):(T=_.x,_.y,u=_.x+_.width,_.y+_.height),[T,y,u,v]}function i(s){if(typeof s=="number")return[s,s,s,s];if(s.length===2)return[s[0],s[1],s[0],s[1]];{let f=e(s);return[f.x,f.y,f.x+f.width,f.y+f.height]}}}),MH=Ft((Q,$)=>{var c=AH(),g=bn(),P=Rc(),S=v0().selectMode;$.exports=function(e,r,a){if(a.length)for(var n=0;n-1,H=S(v)||!!o.selectedpoints||V,F=!0;if(H){var U=o._length;if(o.selectedpoints){s.selectBatch=o.selectedpoints;var W=o.selectedpoints,q={};for(b=0;b{Q.getDimIndex=function($,c){for(var g=c._id,P=g.charAt(0),S={x:0,y:1}[P],t=$._visibleDims,e=0;e{var c=JS(),g=rT().calcHover,P=Es().getFromId,S=Ta().extendFlat;function t(r,a,n,o,i){i||(i={});var s=(o||"").charAt(0)==="x",f=(o||"").charAt(0)==="y",x=e(r,a,n);if((s||f)&&i.hoversubplots==="axis"&&x[0])for(var y=(s?r.xa:r.ya)._subplotsWith,v=i.gd,T=S({},r),u=0;u{var c=bn(),g=c.pushUnique,P=Ac(),S=JS();$.exports=function(t,e){var r=t.cd,a=r[0].trace,n=r[0].t,o=t.scene,i=o.matrixOptions.cdata,s=t.xaxis,f=t.yaxis,x=[];if(!o)return x;var y=!P.hasMarkers(a)&&!P.hasText(a);if(a.visible!==!0||y)return x;var v=S.getDimIndex(a,s),T=S.getDimIndex(a,f);if(v===!1||T===!1)return x;var u=n.xpx[v],b=n.ypx[T],_=i[v],C=i[T],M=(t.scene.selectBatch||[]).slice(),E=[];if(e!==!1&&!e.degenerate)for(var A=0;A<_.length;A++)e.contains([u[A],b[A]],null,A,t)?(x.push({pointNumber:A,x:_[A],y:C[A]}),g(M,A)):M.indexOf(A)!==-1?g(M,A):E.push(A);var h=o.matrixOptions;return!M.length&&!E.length?o.matrix.update(h,null):!o.selectBatch.length&&!o.unselectBatch.length&&o.matrix.update(o.unselectedOptions,c.extendFlat({},h,o.selectedOptions,o.viewOpts)),o.selectBatch=M,o.unselectBatch=E,x}}),CH=Ft((Q,$)=>{var c=bn(),g=F0(),P=gx().markerStyle;$.exports=function(S,t){var e=t.trace,r=S._fullLayout._splomScenes[e.uid];if(r){g(S,e),c.extendFlat(r.matrixOptions,P(S,e));var a=c.extendFlat({},r.matrixOptions,r.viewOpts);r.matrix.update(a,null)}}}),LH=Ft((Q,$)=>{var c=Xo(),g=LM();$.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:XS(),supplyDefaults:xH(),colorbar:xo(),calc:bH(),plot:MH(),hoverPoints:SH().hoverPoints,selectPoints:EH(),editStyle:CH(),meta:{}},c.register(g)}),PH=Ft((Q,$)=>{var c=jS(),g=Xo(),P=uT(),S=ud().getModuleCalcData,t=Mf(),e=Rc().getFromId,r=Es().shouldShowZeroLine,a="splom",n={};function o(v){var T=v._fullLayout,u=g.getModule(a),b=S(v.calcdata,u)[0],_=P(v,["ANGLE_instanced_arrays","OES_element_index_uint"],n);_&&(T._hasOnlyLargeSploms&&f(v),u.plot(v,{},b))}function i(v){var T=v.calcdata,u=v._fullLayout;u._hasOnlyLargeSploms&&f(v);for(var b=0;b{var c=LH();c.basePlotModule=PH(),$.exports=c}),IH=Ft((Q,$)=>{$.exports=zH()}),QS=Ft((Q,$)=>{var c=Tc(),g=Ad(),P=Ea(),S=Nh().attributes,t=Ta().extendFlat,e=pu().templatedArray;$.exports={domain:S({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:P({editType:"plot"}),tickfont:P({autoShadowDflt:!0,editType:"plot"}),rangefont:P({editType:"plot"}),dimensions:e("dimension",{label:{valType:"string",editType:"plot"},tickvals:t({},g.tickvals,{editType:"plot"}),ticktext:t({},g.ticktext,{editType:"plot"}),tickformat:t({},g.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:t({editType:"calc"},c("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}}),k3=Ft((Q,$)=>{$.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}}),Lg=Ft((Q,$)=>{var c=_1();function g(P){return[P]}$.exports={keyFun:function(P){return P.key},repeat:g,descend:c,wrap:g,unwrap:function(P){return P[0]}}}),tE=Ft((Q,$)=>{var c=k3(),g=un(),P=Lg().keyFun,S=Lg().repeat,t=bn().sorterAsc,e=bn().strTranslate,r=c.bar.snapRatio;function a(q,X){return q*(1-r)+X*r}var n=c.bar.snapClose;function o(q,X){return q*(1-n)+X*n}function i(q,X,lt,yt){if(s(lt,yt))return lt;var pt=q?-1:1,st=0,tt=X.length-1;if(pt<0){var dt=st;st=tt,tt=dt}for(var rt=X[st],at=rt,vt=st;pt*vt=X[lt][0]&&q<=X[lt][1])return!0;return!1}function f(q){q.attr("x",-c.bar.captureWidth/2).attr("width",c.bar.captureWidth)}function x(q){q.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function y(q){if(!q.brush.filterSpecified)return"0,"+q.height;for(var X=v(q.brush.filter.getConsolidated(),q.height),lt=[0],yt,pt,st,tt=X.length?X[0][0]:null,dt=0;dtq[1]+lt||X=.9*q[1]+.1*q[0]?"n":X<=.9*q[0]+.1*q[1]?"s":"ns"}function u(){g.select(document.body).style("cursor",null)}function b(q){q.attr("stroke-dasharray",y)}function _(q,X){var lt=g.select(q).selectAll(".highlight, .highlight-shadow"),yt=X?lt.transition().duration(c.bar.snapDuration).each("end",X):lt;b(yt)}function C(q,X){var lt=q.brush,yt=lt.filterSpecified,pt=NaN,st={},tt;if(yt){var dt=q.height,rt=lt.filter.getConsolidated(),at=v(rt,dt),vt=NaN,it=NaN,Y=NaN;for(tt=0;tt<=at.length;tt++){var ft=at[tt];if(ft&&ft[0]<=X&&X<=ft[1]){vt=tt;break}else if(it=tt?tt-1:NaN,ft&&ft[0]>X){Y=tt;break}}if(pt=vt,isNaN(pt)&&(isNaN(it)||isNaN(Y)?pt=isNaN(it)?Y:it:pt=X-at[it][1]=Wt[0]&&Pt<=Wt[1]){st.clickableOrdinalRange=Wt;break}}}return st}function M(q,X){g.event.sourceEvent.stopPropagation();var lt=X.height-g.mouse(q)[1]-2*c.verticalPadding,yt=X.unitToPaddedPx.invert(lt),pt=X.brush,st=C(X,lt),tt=st.interval,dt=pt.svgBrush;if(dt.wasDragged=!1,dt.grabbingBar=st.region==="ns",dt.grabbingBar){var rt=tt.map(X.unitToPaddedPx);dt.grabPoint=lt-rt[0]-c.verticalPadding,dt.barLength=rt[1]-rt[0]}dt.clickableOrdinalRange=st.clickableOrdinalRange,dt.stayingIntervals=X.multiselect&&pt.filterSpecified?pt.filter.getConsolidated():[],tt&&(dt.stayingIntervals=dt.stayingIntervals.filter(function(at){return at[0]!==tt[0]&&at[1]!==tt[1]})),dt.startExtent=st.region?tt[st.region==="s"?1:0]:yt,X.parent.inBrushDrag=!0,dt.brushStartCallback()}function E(q,X){g.event.sourceEvent.stopPropagation();var lt=X.height-g.mouse(q)[1]-2*c.verticalPadding,yt=X.brush.svgBrush;yt.wasDragged=!0,yt._dragging=!0,yt.grabbingBar?yt.newExtent=[lt-yt.grabPoint,lt+yt.barLength-yt.grabPoint].map(X.unitToPaddedPx.invert):yt.newExtent=[yt.startExtent,X.unitToPaddedPx.invert(lt)].sort(t),X.brush.filterSpecified=!0,yt.extent=yt.stayingIntervals.concat([yt.newExtent]),yt.brushCallback(X),_(q.parentNode)}function A(q,X){var lt=X.brush,yt=lt.filter,pt=lt.svgBrush;pt._dragging||(h(q,X),E(q,X),X.brush.svgBrush.wasDragged=!1),pt._dragging=!1;var st=g.event;st.sourceEvent.stopPropagation();var tt=pt.grabbingBar;if(pt.grabbingBar=!1,pt.grabLocation=void 0,X.parent.inBrushDrag=!1,u(),!pt.wasDragged){pt.wasDragged=void 0,pt.clickableOrdinalRange?lt.filterSpecified&&X.multiselect?pt.extent.push(pt.clickableOrdinalRange):(pt.extent=[pt.clickableOrdinalRange],lt.filterSpecified=!0):tt?(pt.extent=pt.stayingIntervals,pt.extent.length===0&&N(lt)):N(lt),pt.brushCallback(X),_(q.parentNode),pt.brushEndCallback(lt.filterSpecified?yt.getConsolidated():[]);return}var dt=function(){yt.set(yt.getConsolidated())};if(X.ordinal){var rt=X.unitTickvals;rt[rt.length-1]pt.newExtent[0];pt.extent=pt.stayingIntervals.concat(at?[pt.newExtent]:[]),pt.extent.length||N(lt),pt.brushCallback(X),at?_(q.parentNode,dt):(dt(),_(q.parentNode))}else dt();pt.brushEndCallback(lt.filterSpecified?yt.getConsolidated():[])}function h(q,X){var lt=X.height-g.mouse(q)[1]-2*c.verticalPadding,yt=C(X,lt),pt="crosshair";yt.clickableOrdinalRange?pt="pointer":yt.region&&(pt=yt.region+"-resize"),g.select(document.body).style("cursor",pt)}function p(q){q.on("mousemove",function(X){g.event.preventDefault(),X.parent.inBrushDrag||h(this,X)}).on("mouseleave",function(X){X.parent.inBrushDrag||u()}).call(g.behavior.drag().on("dragstart",function(X){M(this,X)}).on("drag",function(X){E(this,X)}).on("dragend",function(X){A(this,X)}))}function k(q,X){return q[0]-X[0]}function w(q,X,lt){var yt=lt._context.staticPlot,pt=q.selectAll(".background").data(S);pt.enter().append("rect").classed("background",!0).call(f).call(x).style("pointer-events",yt?"none":"auto").attr("transform",e(0,c.verticalPadding)),pt.call(p).attr("height",function(dt){return dt.height-c.verticalPadding});var st=q.selectAll(".highlight-shadow").data(S);st.enter().append("line").classed("highlight-shadow",!0).attr("x",-c.bar.width/2).attr("stroke-width",c.bar.width+c.bar.strokeWidth).attr("stroke",X).attr("opacity",c.bar.strokeOpacity).attr("stroke-linecap","butt"),st.attr("y1",function(dt){return dt.height}).call(b);var tt=q.selectAll(".highlight").data(S);tt.enter().append("line").classed("highlight",!0).attr("x",-c.bar.width/2).attr("stroke-width",c.bar.width-c.bar.strokeWidth).attr("stroke",c.bar.fillColor).attr("opacity",c.bar.fillOpacity).attr("stroke-linecap","butt"),tt.attr("y1",function(dt){return dt.height}).call(b)}function R(q,X,lt){var yt=q.selectAll("."+c.cn.axisBrush).data(S,P);yt.enter().append("g").classed(c.cn.axisBrush,!0),w(yt,X,lt)}function O(q){return q.svgBrush.extent.map(function(X){return X.slice()})}function N(q){q.filterSpecified=!1,q.svgBrush.extent=[[-1/0,1/0]]}function V(q){return function(X){var lt=X.brush,yt=O(lt),pt=yt.slice();lt.filter.set(pt),q()}}function H(q){for(var X=q.slice(),lt=[],yt,pt=X.shift();pt;){for(yt=pt.slice();(pt=X.shift())&&pt[0]<=yt[1];)yt[1]=Math.max(yt[1],pt[1]);lt.push(yt)}return lt.length===1&<[0][0]>lt[0][1]&&(lt=[]),lt}function F(){var q=[],X,lt;return{set:function(yt){q=yt.map(function(pt){return pt.slice().sort(t)}).sort(k),q.length===1&&q[0][0]===-1/0&&q[0][1]===1/0&&(q=[[0,-1]]),X=H(q),lt=q.reduce(function(pt,st){return[Math.min(pt[0],st[0]),Math.max(pt[1],st[1])]},[1/0,-1/0])},get:function(){return q.slice()},getConsolidated:function(){return X},getBounds:function(){return lt}}}function U(q,X,lt,yt,pt,st){var tt=F();return tt.set(lt),{filter:tt,filterSpecified:X,svgBrush:{extent:[],brushStartCallback:yt,brushCallback:V(pt),brushEndCallback:st}}}function W(q,X){if(Array.isArray(q[0])?(q=q.map(function(yt){return yt.sort(t)}),X.multiselect?q=H(q.sort(k)):q=[q[0]]):q=[q.sort(t)],X.tickvals){var lt=X.tickvals.slice().sort(t);if(q=q.map(function(yt){var pt=[i(0,lt,yt[0],[]),i(1,lt,yt[1],[])];if(pt[1]>pt[0])return pt}).filter(function(yt){return yt}),!q.length)return}return q.length>1?q:q[0]}$.exports={makeBrush:U,ensureAxisBrush:R,cleanRanges:W}}),OH=Ft((Q,$)=>{var c=bn(),g=Hd().hasColorscale,P=mc(),S=Nh().defaults,t=Md(),e=Es(),r=QS(),a=tE(),n=k3().maxDimensionCount,o=cT();function i(f,x,y,v,T){var u=T("line.color",y);if(g(f,"line")&&c.isArrayOrTypedArray(u)){if(u.length)return T("line.colorscale"),P(f,x,v,T,{prefix:"line.",cLetter:"c"}),u.length;x.line.color=y}return 1/0}function s(f,x,y,v){function T(M,E){return c.coerce(f,x,r.dimensions,M,E)}var u=T("values"),b=T("visible");if(u&&u.length||(b=x.visible=!1),b){T("label"),T("tickvals"),T("ticktext"),T("tickformat");var _=T("range");x._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:_},e.setConvert(x._ax,v.layout),T("multiselect");var C=T("constraintrange");C&&(x.constraintrange=a.cleanRanges(C,x))}}$.exports=function(f,x,y,v){function T(M,E){return c.coerce(f,x,r,M,E)}var u=f.dimensions;Array.isArray(u)&&u.length>n&&(c.log("parcoords traces support up to "+n+" dimensions at the moment"),u.splice(n));var b=t(f,x,{name:"dimensions",layout:v,handleItemDefaults:s}),_=i(f,x,y,v,T);S(x,v,T),(!Array.isArray(b)||!b.length)&&(x.visible=!1),o(x,b,"values",_);var C=c.extendFlat({},v.font,{size:Math.round(v.font.size/1.2)});c.coerceFont(T,"labelfont",C),c.coerceFont(T,"tickfont",C,{autoShadowDflt:!0}),c.coerceFont(T,"rangefont",C),T("labelangle"),T("labelside"),T("unselected.line.color"),T("unselected.line.opacity")}}),DH=Ft((Q,$)=>{var c=bn().isArrayOrTypedArray,g=Xc(),P=Lg().wrap;$.exports=function(t,e){var r,a;return g.hasColorscale(e,"line")&&c(e.line.color)?(r=e.line.color,a=g.extractOpts(e.line).colorscale,g.calc(t,e,{vals:r,containerStr:"line",cLetter:"c"})):(r=S(e._length),a=[[0,e.line.color],[1,e.line.color]]),P({lineColor:r,cscale:a})};function S(t){for(var e=new Array(t),r=0;r>>16,(Q&65280)>>>8,Q&255],alpha:1};if(typeof Q=="number")return{space:"rgb",values:[Q>>>16,(Q&65280)>>>8,Q&255],alpha:1};if(Q=String(Q).toLowerCase(),hT.default[Q])P=hT.default[Q].slice(),t="rgb";else if(Q==="transparent")S=0,t="rgb",P=[0,0,0];else if(Q[0]==="#"){var e=Q.slice(1),r=e.length,a=r<=4;S=1,a?(P=[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16)],r===4&&(S=parseInt(e[3]+e[3],16)/255)):(P=[parseInt(e[0]+e[1],16),parseInt(e[2]+e[3],16),parseInt(e[4]+e[5],16)],r===8&&(S=parseInt(e[6]+e[7],16)/255)),P[0]||(P[0]=0),P[1]||(P[1]=0),P[2]||(P[2]=0),t="rgb"}else if(g=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(Q)){var n=g[1];t=n.replace(/a$/,"");var o=t==="cmyk"?4:t==="gray"?1:3;P=g[2].trim().split(/\s*[,\/]\s*|\s+/),t==="color"&&(t=P.shift()),P=P.map(function(i,s){if(i[i.length-1]==="%")return i=parseFloat(i)/100,s===3?i:t==="rgb"?i*255:t[0]==="h"||t[0]==="l"&&!s?i*100:t==="lab"?i*125:t==="lch"?s<2?i*150:i*360:t[0]==="o"&&!s?i:t==="oklab"?i*.4:t==="oklch"?s<2?i*.4:i*360:i;if(t[s]==="h"||s===2&&t[t.length-1]==="h"){if(fT[i]!==void 0)return fT[i];if(i.endsWith("deg"))return parseFloat(i);if(i.endsWith("turn"))return parseFloat(i)*360;if(i.endsWith("grad"))return parseFloat(i)*360/400;if(i.endsWith("rad"))return parseFloat(i)*180/Math.PI}return i==="none"?0:parseFloat(i)}),S=P.length>o?P.pop():1}else/[0-9](?:\s|\/|,)/.test(Q)&&(P=Q.match(/([0-9]+)/g).map(function(i){return parseFloat(i)}),t=((c=($=Q.match(/([a-z])/ig))==null?void 0:$.join(""))==null?void 0:c.toLowerCase())||"rgb");return{space:t,values:P,alpha:S}}var hT,eE,fT,RH=An(()=>{hT=jn(nS()),eE=FH,fT={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}),T3,rE=An(()=>{T3={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}),A3,BH=An(()=>{rE(),A3={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(Q){var $=Q[0]/360,c=Q[1]/100,g=Q[2]/100,P,S,t,e,r,a=0;if(c===0)return r=g*255,[r,r,r];for(S=g<.5?g*(1+c):g+c-g*c,P=2*g-S,e=[0,0,0];a<3;)t=$+1/3*-(a-1),t<0?t++:t>1&&t--,r=6*t<1?P+(S-P)*6*t:2*t<1?S:3*t<2?P+(S-P)*(2/3-t)*6:P,e[a++]=r*255;return e}},T3.hsl=function(Q){var $=Q[0]/255,c=Q[1]/255,g=Q[2]/255,P=Math.min($,c,g),S=Math.max($,c,g),t=S-P,e,r,a;return S===P?e=0:$===S?e=(c-g)/t:c===S?e=2+(g-$)/t:g===S&&(e=4+($-c)/t),e=Math.min(e*60,360),e<0&&(e+=360),a=(P+S)/2,S===P?r=0:a<=.5?r=t/(S+P):r=t/(2-S-P),[e,r*100,a*100]}}),nE={};kn(nE,{default:()=>NH});function NH(Q){Array.isArray(Q)&&Q.raw&&(Q=String.raw(...arguments)),Q instanceof Number&&(Q=+Q);var $,c=eE(Q);if(!c.space)return[];let g=c.space[0]==="h"?A3.min:T3.min,P=c.space[0]==="h"?A3.max:T3.max;return $=Array(3),$[0]=Math.min(Math.max(c.values[0],g[0]),P[0]),$[1]=Math.min(Math.max(c.values[1],g[1]),P[1]),$[2]=Math.min(Math.max(c.values[2],g[2]),P[2]),c.space[0]==="h"&&($=A3.rgb($)),$.push(Math.min(Math.max(c.alpha,0),1)),$}var jH=An(()=>{RH(),rE(),BH()}),iE=Ft(Q=>{var $=bn().isTypedArray;Q.convertTypedArray=function(c){return $(c)?Array.prototype.slice.call(c):c},Q.isOrdinal=function(c){return!!c.tickvals},Q.isVisible=function(c){return c.visible||!("visible"in c)}}),UH=Ft((Q,$)=>{var c=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` +`),g=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` +`),P=k3().maxDimensionCount,S=bn(),t=1e-6,e=2048,r=new Uint8Array(4),a=new Uint8Array(4),n={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function o(A){A.read({x:0,y:0,width:1,height:1,data:r})}function i(A,h,p,k,w){var R=A._gl;R.enable(R.SCISSOR_TEST),R.scissor(h,p,k,w),A.clear({color:[0,0,0,0],depth:1})}function s(A,h,p,k,w,R){var O=R.key;function N(V){var H=Math.min(k,w-V*k);V===0&&(window.cancelAnimationFrame(p.currentRafs[O]),delete p.currentRafs[O],i(A,R.scissorX,R.scissorY,R.scissorWidth,R.viewBoxSize[1])),!p.clearOnly&&(R.count=2*H,R.offset=2*V*k,h(R),V*k+H>>8*h)%256/255}function v(A,h,p){for(var k=new Array(A*(P+4)),w=0,R=0;RHt&&(Ht=it[wt].dim1.canvasX,Pt=wt);ut===0&&i(w,0,0,H.canvasWidth,H.canvasHeight);var Jt=tt(p);for(wt=0;wt{var c=un(),g=bn(),P=g.isArrayOrTypedArray,S=g.numberFormat,t=(jH(),ai(nE)).default,e=Es(),r=g.strRotate,a=g.strTranslate,n=tc(),o=js(),i=Xc(),s=Lg(),f=s.keyFun,x=s.repeat,y=s.unwrap,v=iE(),T=k3(),u=tE(),b=UH();function _(yt,pt,st){return g.aggNums(yt,null,pt,st)}function C(yt,pt){return E(_(Math.min,yt,pt),_(Math.max,yt,pt))}function M(yt){var pt=yt.range;return pt?E(pt[0],pt[1]):C(yt.values,yt._length)}function E(yt,pt){return(isNaN(yt)||!isFinite(yt))&&(yt=0),(isNaN(pt)||!isFinite(pt))&&(pt=0),yt===pt&&(yt===0?(yt-=1,pt+=1):(yt*=.9,pt*=1.1)),[yt,pt]}function A(yt,pt){return pt?function(st,tt){var dt=pt[tt];return dt??yt(st)}:yt}function h(yt,pt,st,tt,dt){var rt=M(st);return tt?c.scale.ordinal().domain(tt.map(A(S(st.tickformat),dt))).range(tt.map(function(at){var vt=(at-rt[0])/(rt[1]-rt[0]);return yt-pt+vt*(2*pt-yt)})):c.scale.linear().domain(rt).range([yt-pt,pt])}function p(yt,pt){return c.scale.linear().range([pt,yt-pt])}function k(yt,pt){return c.scale.linear().domain(M(yt)).range([pt,1-pt])}function w(yt){if(yt.tickvals){var pt=M(yt);return c.scale.ordinal().domain(yt.tickvals).range(yt.tickvals.map(function(st){return(st-pt[0])/(pt[1]-pt[0])}))}}function R(yt){var pt=yt.map(function(rt){return rt[0]}),st=yt.map(function(rt){var at=t(rt[1]);return c.rgb("rgb("+at[0]+","+at[1]+","+at[2]+")")}),tt=function(rt){return function(at){return at[rt]}},dt="rgb".split("").map(function(rt){return c.scale.linear().clamp(!0).domain(pt).range(st.map(tt(rt)))});return function(rt){return dt.map(function(at){return at(rt)})}}function O(yt){return yt.dimensions.some(function(pt){return pt.brush.filterSpecified})}function N(yt,pt,st){var tt=y(pt),dt=tt.trace,rt=v.convertTypedArray(tt.lineColor),at=dt.line,vt={color:t(dt.unselected.line.color),opacity:dt.unselected.line.opacity},it=i.extractOpts(at),Y=it.reversescale?i.flipScale(tt.cscale):tt.cscale,ft=dt.domain,ut=dt.dimensions,wt=yt.width,zt=dt.labelangle,Pt=dt.labelside,Wt=dt.labelfont,Ht=dt.tickfont,Jt=dt.rangefont,ge=g.extendDeepNoArrays({},at,{color:rt.map(c.scale.linear().domain(M({values:rt,range:[it.min,it.max],_length:dt._length}))),blockLineCount:T.blockLineCount,canvasOverdrag:T.overdrag*T.canvasPixelRatio}),he=Math.floor(wt*(ft.x[1]-ft.x[0])),de=Math.floor(yt.height*(ft.y[1]-ft.y[0])),se=yt.margin||{l:80,r:80,t:100,b:80},Tt=he,Lt=de;return{key:st,colCount:ut.filter(v.isVisible).length,dimensions:ut,tickDistance:T.tickDistance,unitToColor:R(Y),lines:ge,deselectedLines:vt,labelAngle:zt,labelSide:Pt,labelFont:Wt,tickFont:Ht,rangeFont:Jt,layoutWidth:wt,layoutHeight:yt.height,domain:ft,translateX:ft.x[0]*wt,translateY:yt.height-ft.y[1]*yt.height,pad:se,canvasWidth:Tt*T.canvasPixelRatio+2*ge.canvasOverdrag,canvasHeight:Lt*T.canvasPixelRatio,width:Tt,height:Lt,canvasPixelRatio:T.canvasPixelRatio}}function V(yt,pt,st){var tt=st.width,dt=st.height,rt=st.dimensions,at=st.canvasPixelRatio,vt=function(wt){return tt*wt/Math.max(1,st.colCount-1)},it=T.verticalPadding/dt,Y=p(dt,T.verticalPadding),ft={key:st.key,xScale:vt,model:st,inBrushDrag:!1},ut={};return ft.dimensions=rt.filter(v.isVisible).map(function(wt,zt){var Pt=k(wt,it),Wt=ut[wt.label];ut[wt.label]=(Wt||0)+1;var Ht=wt.label+(Wt?"__"+Wt:""),Jt=wt.constraintrange,ge=Jt&&Jt.length;ge&&!P(Jt[0])&&(Jt=[Jt]);var he=ge?Jt.map(function(He){return He.map(Pt)}):[[-1/0,1/0]],de=function(){var He=ft;He.focusLayer&&He.focusLayer.render(He.panels,!0);var Ge=O(He);!yt.contextShown()&&Ge?(He.contextLayer&&He.contextLayer.render(He.panels,!0),yt.contextShown(!0)):yt.contextShown()&&!Ge&&(He.contextLayer&&He.contextLayer.render(He.panels,!0,!0),yt.contextShown(!1))},se=wt.values;se.length>wt._length&&(se=se.slice(0,wt._length));var Tt=wt.tickvals,Lt;function Mt(He,Ge){return{val:He,text:Lt[Ge]}}function te(He,Ge){return He.val-Ge.val}if(P(Tt)&&Tt.length){g.isTypedArray(Tt)&&(Tt=Array.from(Tt)),Lt=wt.ticktext,!P(Lt)||!Lt.length?Lt=Tt.map(S(wt.tickformat)):Lt.length>Tt.length?Lt=Lt.slice(0,Tt.length):Tt.length>Lt.length&&(Tt=Tt.slice(0,Lt.length));for(var ve=1;ve=He||jr>=Ge)return;var Hr=oe.lineLayer.readPixel(ur,Ge-1-jr),br=Hr[3]!==0,Kr=br?Hr[2]+256*(Hr[1]+256*Hr[0]):null,rn={x:ur,y:jr,clientX:Te.clientX,clientY:Te.clientY,dataIndex:oe.model.key,curveNumber:Kr};Kr!==zt&&(br?tt.hover(rn):tt.unhover&&tt.unhover(rn),zt=Kr)}}),wt.style("opacity",function(oe){return oe.pick?0:1}),at.style("background","rgba(255, 255, 255, 0)");var Wt=at.selectAll("."+T.cn.parcoords).data(ut,f);Wt.exit().remove(),Wt.enter().append("g").classed(T.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Wt.attr("transform",function(oe){return a(oe.model.translateX,oe.model.translateY)});var Ht=Wt.selectAll("."+T.cn.parcoordsControlView).data(x,f);Ht.enter().append("g").classed(T.cn.parcoordsControlView,!0),Ht.attr("transform",function(oe){return a(oe.model.pad.l,oe.model.pad.t)});var Jt=Ht.selectAll("."+T.cn.yAxis).data(function(oe){return oe.dimensions},f);Jt.enter().append("g").classed(T.cn.yAxis,!0),Ht.each(function(oe){W(Jt,oe,it)}),wt.each(function(oe){if(oe.viewModel){!oe.lineLayer||tt?oe.lineLayer=b(this,oe):oe.lineLayer.update(oe),(oe.key||oe.key===0)&&(oe.viewModel[oe.key]=oe.lineLayer);var Te=!oe.context||tt;oe.lineLayer.render(oe.viewModel.panels,Te)}}),Jt.attr("transform",function(oe){return a(oe.xScale(oe.xIndex),0)}),Jt.call(c.behavior.drag().origin(function(oe){return oe}).on("drag",function(oe){var Te=oe.parent;ft.linePickActive(!1),oe.x=Math.max(-T.overdrag,Math.min(oe.model.width+T.overdrag,c.event.x)),oe.canvasX=oe.x*oe.model.canvasPixelRatio,Jt.sort(function(He,Ge){return He.x-Ge.x}).each(function(He,Ge){He.xIndex=Ge,He.x=oe===He?He.x:He.xScale(He.xIndex),He.canvasX=He.x*He.model.canvasPixelRatio}),W(Jt,Te,it),Jt.filter(function(He){return Math.abs(oe.xIndex-He.xIndex)!==0}).attr("transform",function(He){return a(He.xScale(He.xIndex),0)}),c.select(this).attr("transform",a(oe.x,0)),Jt.each(function(He,Ge,cr){cr===oe.parent.key&&(Te.dimensions[Ge]=He)}),Te.contextLayer&&Te.contextLayer.render(Te.panels,!1,!O(Te)),Te.focusLayer.render&&Te.focusLayer.render(Te.panels)}).on("dragend",function(oe){var Te=oe.parent;oe.x=oe.xScale(oe.xIndex),oe.canvasX=oe.x*oe.model.canvasPixelRatio,W(Jt,Te,it),c.select(this).attr("transform",function(He){return a(He.x,0)}),Te.contextLayer&&Te.contextLayer.render(Te.panels,!1,!O(Te)),Te.focusLayer&&Te.focusLayer.render(Te.panels),Te.pickLayer&&Te.pickLayer.render(Te.panels,!0),ft.linePickActive(!0),tt&&tt.axesMoved&&tt.axesMoved(Te.key,Te.dimensions.map(function(He){return He.crossfilterDimensionIndex}))})),Jt.exit().remove();var ge=Jt.selectAll("."+T.cn.axisOverlays).data(x,f);ge.enter().append("g").classed(T.cn.axisOverlays,!0),ge.selectAll("."+T.cn.axis).remove();var he=ge.selectAll("."+T.cn.axis).data(x,f);he.enter().append("g").classed(T.cn.axis,!0),he.each(function(oe){var Te=oe.model.height/oe.model.tickDistance,He=oe.domainScale,Ge=He.domain();c.select(this).call(c.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Te,oe.tickFormat).tickValues(oe.ordinal?Ge:null).tickFormat(function(cr){return v.isOrdinal(oe)?cr:X(oe.model.dimensions[oe.visibleIndex],cr)}).scale(He)),o.font(he.selectAll("text"),oe.model.tickFont)}),he.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),he.selectAll("text").style("cursor","default");var de=ge.selectAll("."+T.cn.axisHeading).data(x,f);de.enter().append("g").classed(T.cn.axisHeading,!0);var se=de.selectAll("."+T.cn.axisTitle).data(x,f);se.enter().append("text").classed(T.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",dt?"none":"auto"),se.text(function(oe){return oe.label}).each(function(oe){var Te=c.select(this);o.font(Te,oe.model.labelFont),n.convertToTspans(Te,yt)}).attr("transform",function(oe){var Te=U(oe.model.labelAngle,oe.model.labelSide),He=T.axisTitleOffset;return(Te.dir>0?"":a(0,2*He+oe.model.height))+r(Te.degrees)+a(-He*Te.dx,-He*Te.dy)}).attr("text-anchor",function(oe){var Te=U(oe.model.labelAngle,oe.model.labelSide),He=Math.abs(Te.dx),Ge=Math.abs(Te.dy);return 2*He>Ge?Te.dir*Te.dx<0?"start":"end":"middle"});var Tt=ge.selectAll("."+T.cn.axisExtent).data(x,f);Tt.enter().append("g").classed(T.cn.axisExtent,!0);var Lt=Tt.selectAll("."+T.cn.axisExtentTop).data(x,f);Lt.enter().append("g").classed(T.cn.axisExtentTop,!0),Lt.attr("transform",a(0,-T.axisExtentOffset));var Mt=Lt.selectAll("."+T.cn.axisExtentTopText).data(x,f);Mt.enter().append("text").classed(T.cn.axisExtentTopText,!0).call(H),Mt.text(function(oe){return lt(oe,!0)}).each(function(oe){o.font(c.select(this),oe.model.rangeFont)});var te=Tt.selectAll("."+T.cn.axisExtentBottom).data(x,f);te.enter().append("g").classed(T.cn.axisExtentBottom,!0),te.attr("transform",function(oe){return a(0,oe.model.height+T.axisExtentOffset)});var ve=te.selectAll("."+T.cn.axisExtentBottomText).data(x,f);ve.enter().append("text").classed(T.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(H),ve.text(function(oe){return lt(oe,!1)}).each(function(oe){o.font(c.select(this),oe.model.rangeFont)}),u.ensureAxisBrush(ge,Y,yt)}}),aE=Ft((r,$)=>{var c=VH(),g=uT(),P=iE().isVisible,S={};function t(a,n,o){var i=n.indexOf(o),s=a.indexOf(i);return s===-1&&(s+=n.length),s}function e(a,n){return function(o,i){return t(a,n,o)-t(a,n,i)}}var r=$.exports=function(a,n){var o=a._fullLayout,i=g(a,[],S);if(i){var s={},f={},x={},y={},v=o._size;n.forEach(function(C,M){var E=C[0].trace;x[M]=E.index;var A=y[M]=E.index;s[M]=a.data[A].dimensions,f[M]=a.data[A].dimensions.slice()});var T=function(C,M,E){var A=f[C][M],h=E.map(function(N){return N.slice()}),p="dimensions["+M+"].constraintrange",k=o._tracePreGUI[a._fullData[x[C]]._fullInput.uid];if(k[p]===void 0){var w=A.constraintrange;k[p]=w||null}var R=a._fullData[x[C]].dimensions[M];h.length?(h.length===1&&(h=h[0]),A.constraintrange=h,R.constraintrange=h.slice(),h=[h]):(delete A.constraintrange,delete R.constraintrange,h=null);var O={};O[p]=h,a.emit("plotly_restyle",[O,[y[C]]])},u=function(C){a.emit("plotly_hover",C)},b=function(C){a.emit("plotly_unhover",C)},_=function(C,M){var E=e(M,f[C].filter(P));s[C].sort(E),f[C].filter(function(A){return!P(A)}).sort(function(A){return f[C].indexOf(A)}).forEach(function(A){s[C].splice(s[C].indexOf(A),1),s[C].splice(f[C].indexOf(A),0,A)}),a.emit("plotly_restyle",[{dimensions:[s[C]]},[y[C]]])};c(a,n,{width:v.w,height:v.h,margin:{t:v.t,r:v.r,b:v.b,l:v.l}},{filterChanged:T,hover:u,unhover:b,axesMoved:_})}};r.reglPrecompiled=S}),HH=Ft(Q=>{var $=un(),c=ud().getModuleCalcData,g=aE(),P=Op();Q.name="parcoords",Q.plot=function(S){var t=c(S.calcdata,"parcoords")[0];t.length&&g(S,t)},Q.clean=function(S,t,e,r){var a=r._has&&r._has("parcoords"),n=t._has&&t._has("parcoords");a&&!n&&(r._paperdiv.selectAll(".parcoords").remove(),r._glimages.selectAll("*").remove())},Q.toSVG=function(S){var t=S._fullLayout._glimages,e=$.select(S).selectAll(".svg-container"),r=e.filter(function(n,o){return o===e.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function a(){var n=this,o=n.toDataURL("image/png"),i=t.append("svg:image");i.attr({xmlns:P.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:n.style.width,height:n.style.height})}r.each(a),window.setTimeout(function(){$.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}),WH=Ft((Q,$)=>{$.exports={attributes:QS(),supplyDefaults:OH(),calc:DH(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:HH(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}),qH=Ft((Q,$)=>{var c=WH();c.plot=aE(),$.exports=c}),ZH=Ft((Q,$)=>{$.exports=qH()}),oE=Ft((Q,$)=>{var c=Ta().extendFlat,g=$o(),P=Ea(),S=Tc(),{hovertemplateAttrs:t,templatefallbackAttrs:e}=$u(),r=Nh().attributes,a=c({editType:"calc"},S("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:t({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:e({editType:"plot"})});$.exports={domain:r({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:c({},g.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:t({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:e({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:P({editType:"calc"}),tickfont:P({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:a,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}}),$H=Ft((Q,$)=>{var c=bn(),g=Hd().hasColorscale,P=mc(),S=Nh().defaults,t=Md(),e=oE(),r=cT(),a=Va().isTypedArraySpec;function n(i,s,f,x,y){y("line.shape"),y("line.hovertemplate"),y("line.hovertemplatefallback");var v=y("line.color",x.colorway[0]);if(g(i,"line")&&c.isArrayOrTypedArray(v)){if(v.length)return y("line.colorscale"),P(i,s,x,y,{prefix:"line.",cLetter:"c"}),v.length;s.line.color=f}return 1/0}function o(i,s){function f(_,C){return c.coerce(i,s,e.dimensions,_,C)}var x=f("values"),y=f("visible");if(x&&x.length||(y=s.visible=!1),y){f("label"),f("displayindex",s._index);var v=i.categoryarray,T=c.isArrayOrTypedArray(v)&&v.length>0||a(v),u;T&&(u="array");var b=f("categoryorder",u);b==="array"?(f("categoryarray"),f("ticktext")):(delete i.categoryarray,delete i.ticktext),!T&&b==="array"&&(s.categoryorder="trace")}}$.exports=function(i,s,f,x){function y(b,_){return c.coerce(i,s,e,b,_)}var v=t(i,s,{name:"dimensions",handleItemDefaults:o}),T=n(i,s,f,x,y);S(s,x,y),(!Array.isArray(v)||!v.length)&&(s.visible=!1),r(s,v,"values",T),y("hoveron"),y("hovertemplate"),y("hovertemplatefallback"),y("arrangement"),y("bundlecolors"),y("sortpaths"),y("counts");var u=x.font;c.coerceFont(y,"labelfont",u,{overrideDflt:{size:Math.round(u.size)}}),c.coerceFont(y,"tickfont",u,{autoShadowDflt:!0,overrideDflt:{size:Math.round(u.size/1.2)}})}}),GH=Ft((Q,$)=>{var c=Lg().wrap,g=Hd().hasColorscale,P=Jd(),S=Cc(),t=js(),e=bn(),r=ra();$.exports=function(u,b){var _=e.filterVisible(b.dimensions);if(_.length===0)return[];var C=_.map(function(st){var tt;if(st.categoryorder==="trace")tt=null;else if(st.categoryorder==="array")tt=st.categoryarray;else{tt=S(st.values);for(var dt=!0,rt=0;rt=u.length||b[u[_]]!==void 0)return!1;b[u[_]]=!0}return!0}}),YH=Ft((Q,$)=>{var c=un(),g=(hx(),ai(B1)).interpolateNumber,P=W_(),S=Qh(),t=bn(),e=t.strTranslate,r=js(),a=fo(),n=tc();function o(at,vt,it,Y){var ft=vt._context.staticPlot,ut=at.map(pt.bind(0,vt,it)),wt=Y.selectAll("g.parcatslayer").data([null]);wt.enter().append("g").attr("class","parcatslayer").style("pointer-events",ft?"none":"all");var zt=wt.selectAll("g.trace.parcats").data(ut,i),Pt=zt.enter().append("g").attr("class","trace parcats");zt.attr("transform",function(Mt){return e(Mt.x,Mt.y)}),Pt.append("g").attr("class","paths");var Wt=zt.select("g.paths"),Ht=Wt.selectAll("path.path").data(function(Mt){return Mt.paths},i);Ht.attr("fill",function(Mt){return Mt.model.color});var Jt=Ht.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Mt){return Mt.model.color}).attr("fill-opacity",0);b(Jt),Ht.attr("d",function(Mt){return Mt.svgD}),Jt.empty()||Ht.sort(f),Ht.exit().remove(),Ht.on("mouseover",x).on("mouseout",y).on("click",u),Pt.append("g").attr("class","dimensions");var ge=zt.select("g.dimensions"),he=ge.selectAll("g.dimension").data(function(Mt){return Mt.dimensions},i);he.enter().append("g").attr("class","dimension"),he.attr("transform",function(Mt){return e(Mt.x,0)}),he.exit().remove();var de=he.selectAll("g.category").data(function(Mt){return Mt.categories},i),se=de.enter().append("g").attr("class","category");de.attr("transform",function(Mt){return e(0,Mt.y)}),se.append("rect").attr("class","catrect").attr("pointer-events","none"),de.select("rect.catrect").attr("fill","none").attr("width",function(Mt){return Mt.width}).attr("height",function(Mt){return Mt.height}),M(se);var Tt=de.selectAll("rect.bandrect").data(function(Mt){return Mt.bands},i);Tt.each(function(){t.raiseToTop(this)}),Tt.attr("fill",function(Mt){return Mt.color});var Lt=Tt.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Mt){return Mt.color}).attr("fill-opacity",0);Tt.attr("fill",function(Mt){return Mt.color}).attr("width",function(Mt){return Mt.width}).attr("height",function(Mt){return Mt.height}).attr("y",function(Mt){return Mt.y}).attr("cursor",function(Mt){return Mt.parcatsViewModel.arrangement==="fixed"?"default":Mt.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),A(Lt),Tt.exit().remove(),se.append("text").attr("class","catlabel").attr("pointer-events","none"),de.select("text.catlabel").attr("text-anchor",function(Mt){return s(Mt)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(Mt){return s(Mt)?Mt.width+5:-5}).attr("y",function(Mt){return Mt.height/2}).text(function(Mt){return Mt.model.categoryLabel}).each(function(Mt){r.font(c.select(this),Mt.parcatsViewModel.categorylabelfont),n.convertToTspans(c.select(this),vt)}),se.append("text").attr("class","dimlabel"),de.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Mt){return Mt.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Mt){return Mt.width/2}).attr("y",-5).text(function(Mt,te){return te===0?Mt.parcatsViewModel.model.dimensions[Mt.model.dimensionInd].dimensionLabel:null}).each(function(Mt){r.font(c.select(this),Mt.parcatsViewModel.labelfont)}),de.selectAll("rect.bandrect").on("mouseover",H).on("mouseout",F),de.exit().remove(),he.call(c.behavior.drag().origin(function(Mt){return{x:Mt.x,y:0}}).on("dragstart",U).on("drag",W).on("dragend",q)),zt.each(function(Mt){Mt.traceSelection=c.select(this),Mt.pathSelection=c.select(this).selectAll("g.paths").selectAll("path.path"),Mt.dimensionSelection=c.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),zt.exit().remove()}$.exports=function(at,vt,it,Y){o(it,at,Y,vt)};function i(at){return at.key}function s(at){var vt=at.parcatsViewModel.dimensions.length,it=at.parcatsViewModel.dimensions[vt-1].model.dimensionInd;return at.model.dimensionInd===it}function f(at,vt){return at.model.rawColor>vt.model.rawColor?1:at.model.rawColor"),Te=c.mouse(ft)[0];S.loneHover({trace:ut,x:de-zt.left+Pt.left,y:se-zt.top+Pt.top,text:oe,color:at.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Tt,idealAlign:Te1&&Wt.displayInd===Pt.dimensions.length-1?(ge=wt.left,he="left"):(ge=wt.left+wt.width,he="right");var de=zt.model.count,se=zt.model.categoryLabel,Tt=de/zt.parcatsViewModel.model.count,Lt={countLabel:de,categoryLabel:se,probabilityLabel:Tt.toFixed(3)},Mt=[];zt.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Mt.push(["Count:",Lt.countLabel].join(" ")),zt.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Mt.push(["P("+Lt.categoryLabel+"):",Lt.probabilityLabel].join(" "));var te=Mt.join("
");return{trace:Ht,x:Y*(ge-vt.left),y:ft*(Jt-vt.top),text:te,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:he,hovertemplate:Ht.hovertemplate,hovertemplateLabels:Lt,eventData:[{data:Ht._input,fullData:Ht,count:de,category:se,probability:Tt}]}}function N(at,vt,it){var Y=[];return c.select(it.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ft=this;Y.push(O(at,vt,ft))}),Y}function V(at,vt,it){at._fullLayout._calcInverseTransform(at);var Y=at._fullLayout._invScaleX,ft=at._fullLayout._invScaleY,ut=it.getBoundingClientRect(),wt=c.select(it).datum(),zt=wt.categoryViewModel,Pt=zt.parcatsViewModel,Wt=Pt.model.dimensions[zt.model.dimensionInd],Ht=Pt.trace,Jt=ut.y+ut.height/2,ge,he;Pt.dimensions.length>1&&Wt.displayInd===Pt.dimensions.length-1?(ge=ut.left,he="left"):(ge=ut.left+ut.width,he="right");var de=zt.model.categoryLabel,se=wt.parcatsViewModel.model.count,Tt=0;wt.categoryViewModel.bands.forEach(function(ur){ur.color===wt.color&&(Tt+=ur.count)});var Lt=zt.model.count,Mt=0;Pt.pathSelection.each(function(ur){ur.model.color===wt.color&&(Mt+=ur.model.count)});var te=Tt/se,ve=Tt/Mt,oe=Tt/Lt,Te={countLabel:Tt,categoryLabel:de,probabilityLabel:te.toFixed(3)},He=[];zt.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&He.push(["Count:",Te.countLabel].join(" ")),zt.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(He.push("P(color ∩ "+de+"): "+Te.probabilityLabel),He.push("P("+de+" | color): "+ve.toFixed(3)),He.push("P(color | "+de+"): "+oe.toFixed(3)));var Ge=He.join("
"),cr=a.mostReadable(wt.color,["black","white"]);return{trace:Ht,x:Y*(ge-vt.left),y:ft*(Jt-vt.top),text:Ge,color:wt.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:cr,fontSize:10,idealAlign:he,hovertemplate:Ht.hovertemplate,hovertemplateLabels:Te,eventData:[{data:Ht._input,fullData:Ht,category:de,count:se,probability:te,categorycount:Lt,colorcount:Mt,bandcolorcount:Tt}]}}function H(at){if(!at.parcatsViewModel.dragDimension&&at.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var vt=c.mouse(this)[1];if(vt<-1)return;var it=at.parcatsViewModel.graphDiv,Y=it._fullLayout,ft=Y._paperdiv.node().getBoundingClientRect(),ut=at.parcatsViewModel.hoveron,wt=this;if(ut==="color"?(k(wt),R(wt,"plotly_hover",c.event)):(p(wt),w(wt,"plotly_hover",c.event)),at.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var zt;ut==="category"?zt=O(it,ft,wt):ut==="color"?zt=V(it,ft,wt):ut==="dimension"&&(zt=N(it,ft,wt)),zt&&S.loneHover(zt,{container:Y._hoverlayer.node(),outerContainer:Y._paper.node(),gd:it})}}}function F(at){var vt=at.parcatsViewModel;if(!vt.dragDimension&&(b(vt.pathSelection),M(vt.dimensionSelection.selectAll("g.category")),A(vt.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),S.loneUnhover(vt.graphDiv._fullLayout._hoverlayer.node()),vt.pathSelection.sort(f),vt.hoverinfoItems.indexOf("skip")===-1)){var it=at.parcatsViewModel.hoveron,Y=this;it==="color"?R(Y,"plotly_unhover",c.event):w(Y,"plotly_unhover",c.event)}}function U(at){at.parcatsViewModel.arrangement!=="fixed"&&(at.dragDimensionDisplayInd=at.model.displayInd,at.initialDragDimensionDisplayInds=at.parcatsViewModel.model.dimensions.map(function(vt){return vt.displayInd}),at.dragHasMoved=!1,at.dragCategoryDisplayInd=null,c.select(this).selectAll("g.category").select("rect.catrect").each(function(vt){var it=c.mouse(this)[0],Y=c.mouse(this)[1];-2<=it&&it<=vt.width+2&&-2<=Y&&Y<=vt.height+2&&(at.dragCategoryDisplayInd=vt.model.displayInd,at.initialDragCategoryDisplayInds=at.model.categories.map(function(ft){return ft.displayInd}),vt.model.dragY=vt.y,t.raiseToTop(this.parentNode),c.select(this.parentNode).selectAll("rect.bandrect").each(function(ft){ft.yHt.y+Ht.height/2&&(ut.model.displayInd=Ht.model.displayInd,Ht.model.displayInd=zt),at.dragCategoryDisplayInd=ut.model.displayInd}if(at.dragCategoryDisplayInd===null||at.parcatsViewModel.arrangement==="freeform"){ft.model.dragX=c.event.x;var Jt=at.parcatsViewModel.dimensions[it],ge=at.parcatsViewModel.dimensions[Y];Jt!==void 0&&ft.model.dragXge.x&&(ft.model.displayInd=ge.model.displayInd,ge.model.displayInd=at.dragDimensionDisplayInd),at.dragDimensionDisplayInd=ft.model.displayInd}dt(at.parcatsViewModel),tt(at.parcatsViewModel),yt(at.parcatsViewModel),lt(at.parcatsViewModel)}}function q(at){if(at.parcatsViewModel.arrangement!=="fixed"&&at.dragDimensionDisplayInd!==null){c.select(this).selectAll("text").attr("font-weight","normal");var vt={},it=X(at.parcatsViewModel),Y=at.parcatsViewModel.model.dimensions.map(function(ge){return ge.displayInd}),ft=at.initialDragDimensionDisplayInds.some(function(ge,he){return ge!==Y[he]});ft&&Y.forEach(function(ge,he){var de=at.parcatsViewModel.model.dimensions[he].containerInd;vt["dimensions["+de+"].displayindex"]=ge});var ut=!1;if(at.dragCategoryDisplayInd!==null){var wt=at.model.categories.map(function(ge){return ge.displayInd});if(ut=at.initialDragCategoryDisplayInds.some(function(ge,he){return ge!==wt[he]}),ut){var zt=at.model.categories.slice().sort(function(ge,he){return ge.displayInd-he.displayInd}),Pt=zt.map(function(ge){return ge.categoryValue}),Wt=zt.map(function(ge){return ge.categoryLabel});vt["dimensions["+at.model.containerInd+"].categoryarray"]=[Pt],vt["dimensions["+at.model.containerInd+"].ticktext"]=[Wt],vt["dimensions["+at.model.containerInd+"].categoryorder"]="array"}}if(at.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!at.dragHasMoved&&at.potentialClickBand&&(at.parcatsViewModel.hoveron==="color"?R(at.potentialClickBand,"plotly_click",c.event.sourceEvent):w(at.potentialClickBand,"plotly_click",c.event.sourceEvent)),at.model.dragX=null,at.dragCategoryDisplayInd!==null){var Ht=at.parcatsViewModel.dimensions[at.dragDimensionDisplayInd].categories[at.dragCategoryDisplayInd];Ht.model.dragY=null,at.dragCategoryDisplayInd=null}at.dragDimensionDisplayInd=null,at.parcatsViewModel.dragDimension=null,at.dragHasMoved=null,at.potentialClickBand=null,dt(at.parcatsViewModel),tt(at.parcatsViewModel);var Jt=c.transition().duration(300).ease("cubic-in-out");Jt.each(function(){yt(at.parcatsViewModel,!0),lt(at.parcatsViewModel,!0)}).each("end",function(){(ft||ut)&&P.restyle(at.parcatsViewModel.graphDiv,vt,[it])})}}function X(at){for(var vt,it=at.graphDiv._fullData,Y=0;Y=0;Pt--)Wt+="C"+wt[Pt]+","+(vt[Pt+1]+Y)+" "+ut[Pt]+","+(vt[Pt]+Y)+" "+(at[Pt]+it[Pt])+","+(vt[Pt]+Y),Wt+="l-"+it[Pt]+",0 ";return Wt+="Z",Wt}function tt(at){var vt=at.dimensions,it=at.model,Y=vt.map(function(br){return br.categories.map(function(Kr){return Kr.y})}),ft=at.model.dimensions.map(function(br){return br.categories.map(function(Kr){return Kr.displayInd})}),ut=at.model.dimensions.map(function(br){return br.displayInd}),wt=at.dimensions.map(function(br){return br.model.dimensionInd}),zt=vt.map(function(br){return br.x}),Pt=vt.map(function(br){return br.width}),Wt=[];for(var Ht in it.paths)it.paths.hasOwnProperty(Ht)&&Wt.push(it.paths[Ht]);function Jt(br){var Kr=br.categoryInds.map(function(Ce,$t){return ft[$t][Ce]}),rn=wt.map(function(Ce){return Kr[Ce]});return rn}Wt.sort(function(br,Kr){var rn=Jt(br),Ce=Jt(Kr);return at.sortpaths==="backward"&&(rn.reverse(),Ce.reverse()),rn.push(br.valueInds[0]),Ce.push(Kr.valueInds[0]),at.bundlecolors&&(rn.unshift(br.rawColor),Ce.unshift(Kr.rawColor)),rnCe?1:0});for(var ge=new Array(Wt.length),he=vt[0].model.count,de=vt[0].categories.map(function(br){return br.height}).reduce(function(br,Kr){return br+Kr}),se=0;se0?Lt=de*(Tt.count/he):Lt=0;for(var Mt=new Array(Y.length),te=0;te1?wt=(at.width-2*it-Y)/(ft-1):wt=0,zt=it,Pt=zt+wt*ut;var Wt=[],Ht=at.model.maxCats,Jt=vt.categories.length,ge=8,he=vt.count,de=at.height-ge*(Ht-1),se,Tt,Lt,Mt,te,ve=(Ht-Jt)*ge/2,oe=vt.categories.map(function(Te){return{displayInd:Te.displayInd,categoryInd:Te.categoryInd}});for(oe.sort(function(Te,He){return Te.displayInd-He.displayInd}),te=0;te0?se=Tt.count/he*de:se=0,Lt={key:Tt.valueInds[0],model:Tt,width:Y,height:se,y:Tt.dragY!==null?Tt.dragY:ve,bands:[],parcatsViewModel:at},ve=ve+se+ge,Wt.push(Lt);return{key:vt.dimensionInd,x:vt.dragX!==null?vt.dragX:Pt,y:0,width:Y,model:vt,categories:Wt,parcatsViewModel:at,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}),sE=Ft((Q,$)=>{var c=YH();$.exports=function(g,P,S,t){var e=g._fullLayout,r=e._paper,a=e._size;c(g,r,P,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},S,t)}}),KH=Ft(Q=>{var $=ud().getModuleCalcData,c=sE(),g="parcats";Q.name=g,Q.plot=function(P,S,t,e){var r=$(P.calcdata,g);if(r.length){var a=r[0];c(P,a,t,e)}},Q.clean=function(P,S,t,e){var r=e._has&&e._has("parcats"),a=S._has&&S._has("parcats");r&&!a&&e._paperdiv.selectAll(".parcats").remove()}}),XH=Ft((Q,$)=>{$.exports={attributes:oE(),supplyDefaults:$H(),calc:GH(),plot:sE(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:KH(),categories:["noOpacity"],meta:{}}}),JH=Ft((Q,$)=>{$.exports=XH()}),Ev=Ft((Q,$)=>{var c=G0(),g="1.13.4",P='© OpenStreetMap contributors',S=['© Carto',P].join(" "),t=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),e=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),r={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:P,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:S,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:S,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:t,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:t,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:e,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},a=c(r);$.exports={requiredVersion:g,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:r,styleValuesNonMapbox:a,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+g+"."].join(` +`),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join(` +`),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",a.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(` +`),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join(` +`),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}}),M3=Ft((Q,$)=>{var c=bn(),g=li().defaultLine,P=Nh().attributes,S=Ea(),t=tf().textposition,e=Yc().overrideAll,r=pu().templatedArray,a=Ev(),n=S({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});n.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var o=$.exports=e({_arrayAttrRegexps:[c.counterRegex("mapbox",".layers",!0)],domain:P({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:a.styleValuesMapbox.concat(a.styleValuesNonMapbox),dflt:a.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:r("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:g},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:g}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:n,textposition:c.extendFlat({},t,{arrayOk:!1})}})},"plot","from-root");o.uirevision={valType:"any",editType:"none"}}),dT=Ft((Q,$)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=z0(),t=dx(),e=tf(),r=M3(),a=$o(),n=Tc(),o=Ta().extendFlat,i=Yc().overrideAll,s=M3(),f=t.line,x=t.marker;$.exports=i({lon:t.lon,lat:t.lat,cluster:{enabled:{valType:"boolean"},maxzoom:o({},s.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:o({},x.opacity,{dflt:1})},mode:o({},e.mode,{dflt:"markers"}),text:o({},e.text,{}),texttemplate:g({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:P({editType:"plot"}),hovertext:o({},e.hovertext,{}),line:{color:f.color,width:f.width},connectgaps:e.connectgaps,marker:o({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:x.opacity,size:x.size,sizeref:x.sizeref,sizemin:x.sizemin,sizemode:x.sizemode},n("marker")),fill:t.fill,fillcolor:S(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:o({},a.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:c(),hovertemplatefallback:P()},"calc","nested")}),lE=Ft((Q,$)=>{var c=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];$.exports={isSupportedFont:function(g){return c.indexOf(g)!==-1}}}),QH=Ft((Q,$)=>{var c=bn(),g=Ac(),P=s0(),S=I0(),t=x0(),e=O0(),r=dT(),a=lE().isSupportedFont;$.exports=function(o,i,s,f){function x(p,k){return c.coerce(o,i,r,p,k)}function y(p,k){return c.coerce2(o,i,r,p,k)}var v=n(o,i,x);if(!v){i.visible=!1;return}if(x("text"),x("texttemplate"),x("texttemplatefallback"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),x("mode"),x("below"),g.hasMarkers(i)){P(o,i,s,f,x,{noLine:!0,noAngle:!0}),x("marker.allowoverlap"),x("marker.angle");var T=i.marker;T.symbol!=="circle"&&(c.isArrayOrTypedArray(T.size)&&(T.size=T.size[0]),c.isArrayOrTypedArray(T.color)&&(T.color=T.color[0]))}g.hasLines(i)&&(S(o,i,s,f,x,{noDash:!0}),x("connectgaps"));var u=y("cluster.maxzoom"),b=y("cluster.step"),_=y("cluster.color",i.marker&&i.marker.color||s),C=y("cluster.size"),M=y("cluster.opacity"),E=u!==!1||b!==!1||_!==!1||C!==!1||M!==!1,A=x("cluster.enabled",E);if(A||g.hasText(i)){var h=f.font.family;t(o,i,f,x,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:a(h)?h:"Open Sans Regular",weight:f.font.weight,style:f.font.style,size:f.font.size,color:f.font.color}})}x("fill"),i.fill!=="none"&&e(o,i,s,x),c.coerceSelectionMarkerOpacity(i,x)};function n(o,i,s){var f=s("lon")||[],x=s("lat")||[],y=Math.min(f.length,x.length);return i._length=y,y}}),uE=Ft((Q,$)=>{var c=Es();$.exports=function(g,P,S){var t={},e=S[P.subplot]._subplot,r=e.mockAxis,a=g.lonlat;return t.lonLabel=c.tickText(r,r.c2l(a[0]),!0).text,t.latLabel=c.tickText(r,r.c2l(a[1]),!0).text,t}}),cE=Ft((Q,$)=>{var c=bn();$.exports=function(g,P){var S=g.split(" "),t=S[0],e=S[1],r=c.isArrayOrTypedArray(P)?c.mean(P):P,a=.5+r/100,n=1.5+r/100,o=["",""],i=[0,0];switch(t){case"top":o[0]="top",i[1]=-n;break;case"bottom":o[0]="bottom",i[1]=n;break}switch(e){case"left":o[1]="right",i[0]=-a;break;case"right":o[1]="left",i[0]=a;break}var s;return o[0]&&o[1]?s=o.join("-"):o[0]?s=o[0]:o[1]?s=o[1]:s="center",{anchor:s,offset:i}}}),tW=Ft((Q,$)=>{var c=ra(),g=bn(),P=Da().BADNUM,S=U1(),t=Xc(),e=js(),r=yg(),a=Ac(),n=lE().isSupportedFont,o=cE(),i=Dp().appendArrayPointValue,s=tc().NEWLINES,f=tc().BR_TAG_ALL;$.exports=function(M,E){var A=E[0].trace,h=A.visible===!0&&A._length!==0,p=A.fill!=="none",k=a.hasLines(A),w=a.hasMarkers(A),R=a.hasText(A),O=w&&A.marker.symbol==="circle",N=w&&A.marker.symbol!=="circle",V=A.cluster&&A.cluster.enabled,H=x("fill"),F=x("line"),U=x("circle"),W=x("symbol"),q={fill:H,line:F,circle:U,symbol:W};if(!h)return q;var X;if((p||k)&&(X=S.calcTraceToLineCoords(E)),p&&(H.geojson=S.makePolygon(X),H.layout.visibility="visible",g.extendFlat(H.paint,{"fill-color":A.fillcolor})),k&&(F.geojson=S.makeLine(X),F.layout.visibility="visible",g.extendFlat(F.paint,{"line-width":A.line.width,"line-color":A.line.color,"line-opacity":A.opacity})),O){var lt=y(E);U.geojson=lt.geojson,U.layout.visibility="visible",V&&(U.filter=["!",["has","point_count"]],q.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":_(A.cluster.color,A.cluster.step),"circle-radius":_(A.cluster.size,A.cluster.step),"circle-opacity":_(A.cluster.opacity,A.cluster.step)}},q.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":C(A),"text-size":12}}),g.extendFlat(U.paint,{"circle-color":lt.mcc,"circle-radius":lt.mrc,"circle-opacity":lt.mo})}if(O&&V&&(U.filter=["!",["has","point_count"]]),(N||R)&&(W.geojson=v(E,M),g.extendFlat(W.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),N&&(g.extendFlat(W.layout,{"icon-size":A.marker.size/10}),"angle"in A.marker&&A.marker.angle!=="auto"&&g.extendFlat(W.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),W.layout["icon-allow-overlap"]=A.marker.allowoverlap,g.extendFlat(W.paint,{"icon-opacity":A.opacity*A.marker.opacity,"icon-color":A.marker.color})),R)){var yt=(A.marker||{}).size,pt=o(A.textposition,yt);g.extendFlat(W.layout,{"text-size":A.textfont.size,"text-anchor":pt.anchor,"text-offset":pt.offset,"text-font":C(A)}),g.extendFlat(W.paint,{"text-color":A.textfont.color,"text-opacity":A.opacity})}return q};function x(M){return{type:M,geojson:S.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function y(M){var E=M[0].trace,A=E.marker,h=E.selectedpoints,p=g.isArrayOrTypedArray(A.color),k=g.isArrayOrTypedArray(A.size),w=g.isArrayOrTypedArray(A.opacity),R;function O(pt){return E.opacity*pt}function N(pt){return pt/2}var V;p&&(t.hasColorscale(E,"marker")?V=t.makeColorScaleFuncFromTrace(A):V=g.identity);var H;k&&(H=r(E));var F;w&&(F=function(pt){var st=c(pt)?+g.constrain(pt,0,1):0;return O(st)});var U=[];for(R=0;R850?R+=" Black":p>750?R+=" Extra Bold":p>650?R+=" Bold":p>550?R+=" Semi Bold":p>450?R+=" Medium":p>350?R+=" Regular":p>250?R+=" Light":p>150?R+=" Extra Light":R+=" Thin"):k.slice(0,2).join(" ")==="Open Sans"?(R="Open Sans",p>750?R+=" Extrabold":p>650?R+=" Bold":p>550?R+=" Semibold":p>350?R+=" Regular":R+=" Light"):k.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(R="Klokantech Noto Sans",k[3]==="CJK"&&(R+=" CJK"),R+=p>500?" Bold":" Regular")),w&&(R+=" Italic"),R==="Open Sans Regular Italic"?R="Open Sans Italic":R==="Open Sans Regular Bold"?R="Open Sans Bold":R==="Open Sans Regular Bold Italic"?R="Open Sans Bold Italic":R==="Klokantech Noto Sans Regular Italic"&&(R="Klokantech Noto Sans Italic"),n(R)||(R=A);var O=R.split(", ");return O}}),eW=Ft((Q,$)=>{var c=bn(),g=tW(),P=Ev().traceLayerPrefix,S={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function t(r,a,n,o){this.type="scattermapbox",this.subplot=r,this.uid=a,this.clusterEnabled=n,this.isHidden=o,this.sourceIds={fill:"source-"+a+"-fill",line:"source-"+a+"-line",circle:"source-"+a+"-circle",symbol:"source-"+a+"-symbol",cluster:"source-"+a+"-circle",clusterCount:"source-"+a+"-circle"},this.layerIds={fill:P+a+"-fill",line:P+a+"-line",circle:P+a+"-circle",symbol:P+a+"-symbol",cluster:P+a+"-cluster",clusterCount:P+a+"-cluster-count"},this.below=null}var e=t.prototype;e.addSource=function(r,a,n){var o={type:"geojson",data:a.geojson};n&&n.enabled&&c.extendFlat(o,{cluster:!0,clusterMaxZoom:n.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[r]);i?i.setData(a.geojson):this.subplot.map.addSource(this.sourceIds[r],o)},e.setSourceData=function(r,a){this.subplot.map.getSource(this.sourceIds[r]).setData(a.geojson)},e.addLayer=function(r,a,n){var o={type:a.type,id:this.layerIds[r],source:this.sourceIds[r],layout:a.layout,paint:a.paint};a.filter&&(o.filter=a.filter);for(var i=this.layerIds[r],s,f=this.subplot.getMapLayers(),x=0;x=0;k--){var w=p[k];o.removeLayer(y.layerIds[w])}h||o.removeSource(y.sourceIds.circle)}function u(h){for(var p=S.nonCluster,k=0;k=0;k--){var w=p[k];o.removeLayer(y.layerIds[w]),h||o.removeSource(y.sourceIds[w])}}function _(h){x?T(h):b(h)}function C(h){f?v(h):u(h)}function M(){for(var h=f?S.cluster:S.nonCluster,p=0;p=0;n--){var o=a[n];r.removeLayer(this.layerIds[o]),r.removeSource(this.sourceIds[o])}},$.exports=function(r,a){var n=a[0].trace,o=n.cluster&&n.cluster.enabled,i=n.visible!==!0,s=new t(r,n.uid,o,i),f=g(r.gd,a),x=s.below=r.belowLookup["trace-"+n.uid],y,v,T;if(o)for(s.addSource("circle",f.circle,n.cluster),y=0;y{var c=Qh(),g=bn(),P=Du(),S=g.fillText,t=Da().BADNUM,e=Ev().traceLayerPrefix;function r(n,o,i){var s=n.cd,f=s[0].trace,x=n.xa,y=n.ya,v=n.subplot,T=[],u=e+f.uid+"-circle",b=f.cluster&&f.cluster.enabled;if(b){var _=v.map.queryRenderedFeatures(null,{layers:[u]});T=_.map(function(H){return H.id})}var C=o>=0?Math.floor((o+180)/360):Math.ceil((o-180)/360),M=C*360,E=o-M;function A(H){var F=H.lonlat;if(F[0]===t||b&&T.indexOf(H.i+1)===-1)return 1/0;var U=g.modHalf(F[0],360),W=F[1],q=v.project([U,W]),X=q.x-x.c2p([E,W]),lt=q.y-y.c2p([U,i]),yt=Math.max(3,H.mrc||0);return Math.max(Math.sqrt(X*X+lt*lt)-yt,1-3/yt)}if(c.getClosest(s,A,n),n.index!==!1){var h=s[n.index],p=h.lonlat,k=[g.modHalf(p[0],360)+M,p[1]],w=x.c2p(k),R=y.c2p(k),O=h.mrc||1;n.x0=w-O,n.x1=w+O,n.y0=R-O,n.y1=R+O;var N={};N[f.subplot]={_subplot:v};var V=f._module.formatLabels(h,f,N);return n.lonLabel=V.lonLabel,n.latLabel=V.latLabel,n.color=P(f,h),n.extraText=a(f,h,s[0].t.labels),n.hovertemplate=f.hovertemplate,[n]}}function a(n,o,i){if(n.hovertemplate)return;var s=o.hi||n.hoverinfo,f=s.split("+"),x=f.indexOf("all")!==-1,y=f.indexOf("lon")!==-1,v=f.indexOf("lat")!==-1,T=o.lonlat,u=[];function b(_){return _+"°"}return x||y&&v?u.push("("+b(T[1])+", "+b(T[0])+")"):y?u.push(i.lon+b(T[0])):v&&u.push(i.lat+b(T[1])),(x||f.indexOf("text")!==-1)&&S(o,n,u),u.join("
")}$.exports={hoverPoints:r,getExtraText:a}}),rW=Ft((Q,$)=>{$.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c}}),nW=Ft((Q,$)=>{var c=bn(),g=Ac(),P=Da().BADNUM;$.exports=function(S,t){var e=S.cd,r=S.xaxis,a=S.yaxis,n=[],o=e[0].trace,i;if(!g.hasMarkers(o))return[];if(t===!1)for(i=0;i{(function(c,g){typeof Q=="object"&&typeof $<"u"?$.exports=g():(c=c||self,c.mapboxgl=g())})(Q,function(){var c,g,P;function S(t,e){if(!c)c=e;else if(!g)g=e;else{var r="var sharedChunk = {}; ("+c+")(sharedChunk); ("+g+")(sharedChunk);",a={};c(a),P=e(a),typeof window<"u"&&(P.workerUrl=window.URL.createObjectURL(new Blob([r],{type:"text/javascript"})))}}return S(["exports"],function(t){function e(m,B){return B={exports:{}},m(B,B.exports),B.exports}var r="1.13.4",a=n;function n(m,B,K,bt){this.cx=3*m,this.bx=3*(K-m)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*B,this.by=3*(bt-B)-this.cy,this.ay=1-this.cy-this.by,this.p1x=m,this.p1y=bt,this.p2x=K,this.p2y=bt}n.prototype.sampleCurveX=function(m){return((this.ax*m+this.bx)*m+this.cx)*m},n.prototype.sampleCurveY=function(m){return((this.ay*m+this.by)*m+this.cy)*m},n.prototype.sampleCurveDerivativeX=function(m){return(3*this.ax*m+2*this.bx)*m+this.cx},n.prototype.solveCurveX=function(m,B){typeof B>"u"&&(B=1e-6);var K,bt,Ot,Zt,ie;for(Ot=m,ie=0;ie<8;ie++){if(Zt=this.sampleCurveX(Ot)-m,Math.abs(Zt)bt)return bt;for(;KZt?K=Ot:bt=Ot,Ot=(bt-K)*.5+K}return Ot},n.prototype.solve=function(m,B){return this.sampleCurveY(this.solveCurveX(m,B))};var o=i;function i(m,B){this.x=m,this.y=B}i.prototype={clone:function(){return new i(this.x,this.y)},add:function(m){return this.clone()._add(m)},sub:function(m){return this.clone()._sub(m)},multByPoint:function(m){return this.clone()._multByPoint(m)},divByPoint:function(m){return this.clone()._divByPoint(m)},mult:function(m){return this.clone()._mult(m)},div:function(m){return this.clone()._div(m)},rotate:function(m){return this.clone()._rotate(m)},rotateAround:function(m,B){return this.clone()._rotateAround(m,B)},matMult:function(m){return this.clone()._matMult(m)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(m){return this.x===m.x&&this.y===m.y},dist:function(m){return Math.sqrt(this.distSqr(m))},distSqr:function(m){var B=m.x-this.x,K=m.y-this.y;return B*B+K*K},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(m){return Math.atan2(this.y-m.y,this.x-m.x)},angleWith:function(m){return this.angleWithSep(m.x,m.y)},angleWithSep:function(m,B){return Math.atan2(this.x*B-this.y*m,this.x*m+this.y*B)},_matMult:function(m){var B=m[0]*this.x+m[1]*this.y,K=m[2]*this.x+m[3]*this.y;return this.x=B,this.y=K,this},_add:function(m){return this.x+=m.x,this.y+=m.y,this},_sub:function(m){return this.x-=m.x,this.y-=m.y,this},_mult:function(m){return this.x*=m,this.y*=m,this},_div:function(m){return this.x/=m,this.y/=m,this},_multByPoint:function(m){return this.x*=m.x,this.y*=m.y,this},_divByPoint:function(m){return this.x/=m.x,this.y/=m.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var m=this.y;return this.y=this.x,this.x=-m,this},_rotate:function(m){var B=Math.cos(m),K=Math.sin(m),bt=B*this.x-K*this.y,Ot=K*this.x+B*this.y;return this.x=bt,this.y=Ot,this},_rotateAround:function(m,B){var K=Math.cos(m),bt=Math.sin(m),Ot=B.x+K*(this.x-B.x)-bt*(this.y-B.y),Zt=B.y+bt*(this.x-B.x)+K*(this.y-B.y);return this.x=Ot,this.y=Zt,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(m){return m instanceof i?m:Array.isArray(m)?new i(m[0],m[1]):m};var s=typeof self<"u"?self:{};function f(m,B){if(Array.isArray(m)){if(!Array.isArray(B)||m.length!==B.length)return!1;for(var K=0;K=1)return 1;var B=m*m,K=B*m;return 4*(m<.5?K:3*(m-B)+K-.75)}function v(m,B,K,bt){var Ot=new a(m,B,K,bt);return function(Zt){return Ot.solve(Zt)}}var T=v(.25,.1,.25,1);function u(m,B,K){return Math.min(K,Math.max(B,m))}function b(m,B,K){var bt=K-B,Ot=((m-B)%bt+bt)%bt+B;return Ot===B?K:Ot}function _(m,B,K){if(!m.length)return K(null,[]);var bt=m.length,Ot=new Array(m.length),Zt=null;m.forEach(function(ie,De){B(ie,function(Je,vr){Je&&(Zt=Je),Ot[De]=vr,--bt===0&&K(Zt,Ot)})})}function C(m){var B=[];for(var K in m)B.push(m[K]);return B}function M(m,B){var K=[];for(var bt in m)bt in B||K.push(bt);return K}function E(m){for(var B=[],K=arguments.length-1;K-- >0;)B[K]=arguments[K+1];for(var bt=0,Ot=B;bt>B/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,m)}return m()}function w(m){return m<=1?1:Math.pow(2,Math.ceil(Math.log(m)/Math.LN2))}function R(m){return m?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(m):!1}function O(m,B){m.forEach(function(K){B[K]&&(B[K]=B[K].bind(B))})}function N(m,B){return m.indexOf(B,m.length-B.length)!==-1}function V(m,B,K){var bt={};for(var Ot in m)bt[Ot]=B.call(K||this,m[Ot],Ot,m);return bt}function H(m,B,K){var bt={};for(var Ot in m)B.call(K||this,m[Ot],Ot,m)&&(bt[Ot]=m[Ot]);return bt}function F(m){return Array.isArray(m)?m.map(F):typeof m=="object"&&m?V(m,F):m}function U(m,B){for(var K=0;K=0)return!0;return!1}var W={};function q(m){W[m]||(typeof console<"u"&&console.warn(m),W[m]=!0)}function X(m,B,K){return(K.y-m.y)*(B.x-m.x)>(B.y-m.y)*(K.x-m.x)}function lt(m){for(var B=0,K=0,bt=m.length,Ot=bt-1,Zt=void 0,ie=void 0;K@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,K={};if(m.replace(B,function(Ot,Zt,ie,De){var Je=ie||De;return K[Zt]=Je?Je.toLowerCase():!0,""}),K["max-age"]){var bt=parseInt(K["max-age"],10);isNaN(bt)?delete K["max-age"]:K["max-age"]=bt}return K}var tt=null;function dt(m){if(tt==null){var B=m.navigator?m.navigator.userAgent:null;tt=!!m.safari||!!(B&&(/\b(iPad|iPhone|iPod)\b/.test(B)||B.match("Safari")&&!B.match("Chrome")))}return tt}function rt(m){try{var B=s[m];return B.setItem("_mapbox_test_",1),B.removeItem("_mapbox_test_"),!0}catch{return!1}}function at(m){return s.btoa(encodeURIComponent(m).replace(/%([0-9A-F]{2})/g,function(B,K){return String.fromCharCode(+("0x"+K))}))}function vt(m){return decodeURIComponent(s.atob(m).split("").map(function(B){return"%"+("00"+B.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var it=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now.bind(Date),Y=s.requestAnimationFrame||s.mozRequestAnimationFrame||s.webkitRequestAnimationFrame||s.msRequestAnimationFrame,ft=s.cancelAnimationFrame||s.mozCancelAnimationFrame||s.webkitCancelAnimationFrame||s.msCancelAnimationFrame,ut,wt,zt={now:it,frame:function(m){var B=Y(m);return{cancel:function(){return ft(B)}}},getImageData:function(m,B){B===void 0&&(B=0);var K=s.document.createElement("canvas"),bt=K.getContext("2d");if(!bt)throw new Error("failed to create canvas 2d context");return K.width=m.width,K.height=m.height,bt.drawImage(m,0,0,m.width,m.height),bt.getImageData(-B,-B,m.width+2*B,m.height+2*B)},resolveURL:function(m){return ut||(ut=s.document.createElement("a")),ut.href=m,ut.href},hardwareConcurrency:s.navigator&&s.navigator.hardwareConcurrency||4,get devicePixelRatio(){return s.devicePixelRatio},get prefersReducedMotion(){return s.matchMedia?(wt==null&&(wt=s.matchMedia("(prefers-reduced-motion: reduce)")),wt.matches):!1}},Pt={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},Wt={supported:!1,testSupport:de},Ht,Jt=!1,ge,he=!1;s.document&&(ge=s.document.createElement("img"),ge.onload=function(){Ht&&se(Ht),Ht=null,he=!0},ge.onerror=function(){Jt=!0,Ht=null},ge.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function de(m){Jt||!ge||(he?se(m):Ht=m)}function se(m){var B=m.createTexture();m.bindTexture(m.TEXTURE_2D,B);try{if(m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,ge),m.isContextLost())return;Wt.supported=!0}catch{}m.deleteTexture(B),Jt=!0}var Tt="01";function Lt(){for(var m="1",B="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",K="",bt=0;bt<10;bt++)K+=B[Math.floor(Math.random()*62)];var Ot=720*60*1e3,Zt=[m,Tt,K].join(""),ie=Date.now()+Ot;return{token:Zt,tokenExpiresAt:ie}}var Mt=function(m,B){this._transformRequestFn=m,this._customAccessToken=B,this._createSkuToken()};Mt.prototype._createSkuToken=function(){var m=Lt();this._skuToken=m.token,this._skuTokenExpiresAt=m.tokenExpiresAt},Mt.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Mt.prototype.transformRequest=function(m,B){return this._transformRequestFn?this._transformRequestFn(m,B)||{url:m}:{url:m}},Mt.prototype.normalizeStyleURL=function(m,B){if(!te(m))return m;var K=cr(m);return K.path="/styles/v1"+K.path,this._makeAPIURL(K,this._customAccessToken||B)},Mt.prototype.normalizeGlyphsURL=function(m,B){if(!te(m))return m;var K=cr(m);return K.path="/fonts/v1"+K.path,this._makeAPIURL(K,this._customAccessToken||B)},Mt.prototype.normalizeSourceURL=function(m,B){if(!te(m))return m;var K=cr(m);return K.path="/v4/"+K.authority+".json",K.params.push("secure"),this._makeAPIURL(K,this._customAccessToken||B)},Mt.prototype.normalizeSpriteURL=function(m,B,K,bt){var Ot=cr(m);return te(m)?(Ot.path="/styles/v1"+Ot.path+"/sprite"+B+K,this._makeAPIURL(Ot,this._customAccessToken||bt)):(Ot.path+=""+B+K,ur(Ot))},Mt.prototype.normalizeTileURL=function(m,B){if(this._isSkuTokenExpired()&&this._createSkuToken(),m&&!te(m))return m;var K=cr(m),bt=/(\.(png|jpg)\d*)(?=$)/,Ot=/^.+\/v4\//,Zt=zt.devicePixelRatio>=2||B===512?"@2x":"",ie=Wt.supported?".webp":"$1";K.path=K.path.replace(bt,""+Zt+ie),K.path=K.path.replace(Ot,"/"),K.path="/v4"+K.path;var De=this._customAccessToken||He(K.params)||Pt.ACCESS_TOKEN;return Pt.REQUIRE_ACCESS_TOKEN&&De&&this._skuToken&&K.params.push("sku="+this._skuToken),this._makeAPIURL(K,De)},Mt.prototype.canonicalizeTileURL=function(m,B){var K="/v4/",bt=/\.[\w]+$/,Ot=cr(m);if(!Ot.path.match(/(^\/v4\/)/)||!Ot.path.match(bt))return m;var Zt="mapbox://tiles/";Zt+=Ot.path.replace(K,"");var ie=Ot.params;return B&&(ie=ie.filter(function(De){return!De.match(/^access_token=/)})),ie.length&&(Zt+="?"+ie.join("&")),Zt},Mt.prototype.canonicalizeTileset=function(m,B){for(var K=B?te(B):!1,bt=[],Ot=0,Zt=m.tiles||[];Ot=0&&m.params.splice(Ot,1)}if(bt.path!=="/"&&(m.path=""+bt.path+m.path),!Pt.REQUIRE_ACCESS_TOKEN)return ur(m);if(B=B||Pt.ACCESS_TOKEN,!B)throw new Error("An API access token is required to use Mapbox GL. "+K);if(B[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+K);return m.params=m.params.filter(function(Zt){return Zt.indexOf("access_token")===-1}),m.params.push("access_token="+B),ur(m)};function te(m){return m.indexOf("mapbox:")===0}var ve=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function oe(m){return ve.test(m)}function Te(m){return m.indexOf("sku=")>0&&oe(m)}function He(m){for(var B=0,K=m;B=1&&s.localStorage.setItem(B,JSON.stringify(this.eventData))}catch{q("Unable to write to LocalStorage")}},br.prototype.processRequests=function(m){},br.prototype.postEvent=function(m,B,K,bt){var Ot=this;if(Pt.EVENTS_URL){var Zt=cr(Pt.EVENTS_URL);Zt.params.push("access_token="+(bt||Pt.ACCESS_TOKEN||""));var ie={event:this.type,created:new Date(m).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:Tt,userId:this.anonId},De=B?E(ie,B):ie,Je={url:ur(Zt),headers:{"Content-Type":"text/plain"},body:JSON.stringify([De])};this.pendingRequest=Mn(Je,function(vr){Ot.pendingRequest=null,K(vr),Ot.saveEventData(),Ot.processRequests(bt)})}},br.prototype.queueRequest=function(m,B){this.queue.push(m),this.processRequests(B)};var Kr=function(m){function B(){m.call(this,"map.load"),this.success={},this.skuToken=""}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.postMapLoadEvent=function(K,bt,Ot,Zt){this.skuToken=Ot,(Pt.EVENTS_URL&&Zt||Pt.ACCESS_TOKEN&&Array.isArray(K)&&K.some(function(ie){return te(ie)||oe(ie)}))&&this.queueRequest({id:bt,timestamp:Date.now()},Zt)},B.prototype.processRequests=function(K){var bt=this;if(!(this.pendingRequest||this.queue.length===0)){var Ot=this.queue.shift(),Zt=Ot.id,ie=Ot.timestamp;Zt&&this.success[Zt]||(this.anonId||this.fetchEventData(),R(this.anonId)||(this.anonId=k()),this.postEvent(ie,{skuToken:this.skuToken},function(De){De||Zt&&(bt.success[Zt]=!0)},K))}},B}(br),rn=function(m){function B(K){m.call(this,"appUserTurnstile"),this._customAccessToken=K}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.postTurnstileEvent=function(K,bt){Pt.EVENTS_URL&&Pt.ACCESS_TOKEN&&Array.isArray(K)&&K.some(function(Ot){return te(Ot)||oe(Ot)})&&this.queueRequest(Date.now(),bt)},B.prototype.processRequests=function(K){var bt=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var Ot=Hr(Pt.ACCESS_TOKEN),Zt=Ot?Ot.u:Pt.ACCESS_TOKEN,ie=Zt!==this.eventData.tokenU;R(this.anonId)||(this.anonId=k(),ie=!0);var De=this.queue.shift();if(this.eventData.lastSuccess){var Je=new Date(this.eventData.lastSuccess),vr=new Date(De),Sr=(De-this.eventData.lastSuccess)/(1440*60*1e3);ie=ie||Sr>=1||Sr<-1||Je.getDate()!==vr.getDate()}else ie=!0;if(!ie)return this.processRequests();this.postEvent(De,{"enabled.telemetry":!1},function(Yr){Yr||(bt.eventData.lastSuccess=De,bt.eventData.tokenU=Zt)},K)}},B}(br),Ce=new rn,$t=Ce.postTurnstileEvent.bind(Ce),ne=new Kr,Ct=ne.postMapLoadEvent.bind(ne),gt="mapbox-tiles",St=500,Nt=50,ee=1e3*60*7,le;function we(){s.caches&&!le&&(le=s.caches.open(gt))}var Ue;function qe(m,B){if(Ue===void 0)try{new Response(new ReadableStream),Ue=!0}catch{Ue=!1}Ue?B(m.body):m.blob().then(B)}function ar(m,B,K){if(we(),!!le){var bt={status:B.status,statusText:B.statusText,headers:new s.Headers};B.headers.forEach(function(ie,De){return bt.headers.set(De,ie)});var Ot=st(B.headers.get("Cache-Control")||"");if(!Ot["no-store"]){Ot["max-age"]&&bt.headers.set("Expires",new Date(K+Ot["max-age"]*1e3).toUTCString());var Zt=new Date(bt.headers.get("Expires")).getTime()-K;ZtDate.now()&&!K["no-cache"]}var Jr=1/0;function Vn(m){Jr++,Jr>Nt&&(m.getActor().send("enforceCacheSizeLimit",St),Jr=0)}function Hn(m){we(),le&&le.then(function(B){B.keys().then(function(K){for(var bt=0;bt=200&&K.status<300||K.status===0)&&K.response!==null){var Ot=K.response;if(m.type==="json")try{Ot=JSON.parse(K.response)}catch(Zt){return B(Zt)}B(null,Ot,K.getResponseHeader("Cache-Control"),K.getResponseHeader("Expires"))}else B(new Hi(K.statusText,K.status,m.url))},K.send(m.body),{cancel:function(){return K.abort()}}}var Qr=function(m,B){if(!rr(m.url)){if(s.fetch&&s.Request&&s.AbortController&&s.Request.prototype.hasOwnProperty("signal"))return fr(m,B);if(pt()&&self.worker&&self.worker.actor){var K=!0;return self.worker.actor.send("getResource",m,B,void 0,K)}}return xr(m,B)},Cn=function(m,B){return Qr(E(m,{type:"json"}),B)},wn=function(m,B){return Qr(E(m,{type:"arrayBuffer"}),B)},Mn=function(m,B){return Qr(E(m,{method:"POST"}),B)};function ci(m){var B=s.document.createElement("a");return B.href=m,B.protocol===s.document.location.protocol&&B.host===s.document.location.host}var xi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Pi(m,B,K,bt){var Ot=new s.Image,Zt=s.URL;Ot.onload=function(){B(null,Ot),Zt.revokeObjectURL(Ot.src),Ot.onload=null,s.requestAnimationFrame(function(){Ot.src=xi})},Ot.onerror=function(){return B(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var ie=new s.Blob([new Uint8Array(m)],{type:"image/png"});Ot.cacheControl=K,Ot.expires=bt,Ot.src=m.byteLength?Zt.createObjectURL(ie):xi}function Di(m,B){var K=new s.Blob([new Uint8Array(m)],{type:"image/png"});s.createImageBitmap(K).then(function(bt){B(null,bt)}).catch(function(bt){B(new Error("Could not load image because of "+bt.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var Zi,ui,Pa=function(){Zi=[],ui=0};Pa();var Wa=function(m,B){if(Wt.supported&&(m.headers||(m.headers={}),m.headers.accept="image/webp,*/*"),ui>=Pt.MAX_PARALLEL_IMAGE_REQUESTS){var K={requestParameters:m,callback:B,cancelled:!1,cancel:function(){this.cancelled=!0}};return Zi.push(K),K}ui++;var bt=!1,Ot=function(){if(!bt)for(bt=!0,ui--;Zi.length&&ui0||this._oneTimeListeners&&this._oneTimeListeners[m]&&this._oneTimeListeners[m].length>0||this._eventedParent&&this._eventedParent.listens(m)},Br.prototype.setEventedParent=function(m,B){return this._eventedParent=m,this._eventedParentData=B,this};var Gr=8,dn={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},an={"*":{type:"source"}},Ee=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],dr={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Vr={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},yn={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Fn={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},Xn={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Pn={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},En={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},Zn=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Ca={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ri={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ja={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Xa={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Io={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},po={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Do={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ia={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},gs={type:"array",value:"*"},is={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},ll={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Ho={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},Gs={type:"array",value:"*",minimum:1},as={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},ul=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],Js={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},Rl={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},ls={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},Cs={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Co={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},ks={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},kl={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Vl={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Yl={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Ns={"*":{type:"string"}},La={$version:Gr,$root:dn,sources:an,source:Ee,source_vector:dr,source_raster:Vr,source_raster_dem:yn,source_geojson:Fn,source_video:Xn,source_image:Pn,layer:En,layout:Zn,layout_background:Ca,layout_fill:Ri,layout_circle:Ja,layout_heatmap:Xa,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Io,layout_symbol:po,layout_raster:Do,layout_hillshade:Ia,filter:gs,filter_operator:is,geometry_type:ll,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:Ho,expression:Gs,light:as,paint:ul,paint_fill:Js,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:Rl,paint_circle:ls,paint_heatmap:Cs,paint_symbol:Co,paint_raster:ks,paint_hillshade:kl,paint_background:Vl,transition:Yl,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:Ns},uo=function(m,B,K,bt){this.message=(m?m+": ":"")+K,bt&&(this.identifier=bt),B!=null&&B.__line__&&(this.line=B.__line__)};function Hs(m){var B=m.key,K=m.value;return K?[new uo(B,K,"constants have been deprecated as of v8")]:[]}function Kl(m){for(var B=[],K=arguments.length-1;K-- >0;)B[K]=arguments[K+1];for(var bt=0,Ot=B;bt":m.itemType.kind==="value"?"array":"array<"+B+">"}else return m.kind}var ac=[Fu,ao,Ts,Ls,nu,_l,cl,Xl(Qo),Ol];function ph(m,B){if(B.kind==="error")return null;if(m.kind==="array"){if(B.kind==="array"&&(B.N===0&&B.itemType.kind==="value"||!ph(m.itemType,B.itemType))&&(typeof m.N!="number"||m.N===B.N))return null}else{if(m.kind===B.kind)return null;if(m.kind==="value")for(var K=0,bt=ac;K255?255:vr}function Ot(vr){return vr<0?0:vr>1?1:vr}function Zt(vr){return vr[vr.length-1]==="%"?bt(parseFloat(vr)/100*255):bt(parseInt(vr))}function ie(vr){return vr[vr.length-1]==="%"?Ot(parseFloat(vr)/100):Ot(parseFloat(vr))}function De(vr,Sr,Yr){return Yr<0?Yr+=1:Yr>1&&(Yr-=1),Yr*6<1?vr+(Sr-vr)*Yr*6:Yr*2<1?Sr:Yr*3<2?vr+(Sr-vr)*(2/3-Yr)*6:vr}function Je(vr){var Sr=vr.replace(/ /g,"").toLowerCase();if(Sr in K)return K[Sr].slice();if(Sr[0]==="#"){if(Sr.length===4){var Yr=parseInt(Sr.substr(1),16);return Yr>=0&&Yr<=4095?[(Yr&3840)>>4|(Yr&3840)>>8,Yr&240|(Yr&240)>>4,Yr&15|(Yr&15)<<4,1]:null}else if(Sr.length===7){var Yr=parseInt(Sr.substr(1),16);return Yr>=0&&Yr<=16777215?[(Yr&16711680)>>16,(Yr&65280)>>8,Yr&255,1]:null}return null}var nn=Sr.indexOf("("),pn=Sr.indexOf(")");if(nn!==-1&&pn+1===Sr.length){var Rn=Sr.substr(0,nn),pi=Sr.substr(nn+1,pn-(nn+1)).split(","),la=1;switch(Rn){case"rgba":if(pi.length!==4)return null;la=ie(pi.pop());case"rgb":return pi.length!==3?null:[Zt(pi[0]),Zt(pi[1]),Zt(pi[2]),la];case"hsla":if(pi.length!==4)return null;la=ie(pi.pop());case"hsl":if(pi.length!==3)return null;var na=(parseFloat(pi[0])%360+360)%360/360,ba=ie(pi[1]),Fa=ie(pi[2]),ya=Fa<=.5?Fa*(ba+1):Fa+ba-Fa*ba,Ka=Fa*2-ya;return[bt(De(Ka,ya,na+1/3)*255),bt(De(Ka,ya,na)*255),bt(De(Ka,ya,na-1/3)*255),la];default:return null}}return null}try{B.parseCSSColor=Je}catch{}}),Sf=Nf.parseCSSColor,Dl=function(m,B,K,bt){bt===void 0&&(bt=1),this.r=m,this.g=B,this.b=K,this.a=bt};Dl.parse=function(m){if(m){if(m instanceof Dl)return m;if(typeof m=="string"){var B=Sf(m);if(B)return new Dl(B[0]/255*B[3],B[1]/255*B[3],B[2]/255*B[3],B[3])}}},Dl.prototype.toString=function(){var m=this.toArray(),B=m[0],K=m[1],bt=m[2],Ot=m[3];return"rgba("+Math.round(B)+","+Math.round(K)+","+Math.round(bt)+","+Ot+")"},Dl.prototype.toArray=function(){var m=this,B=m.r,K=m.g,bt=m.b,Ot=m.a;return Ot===0?[0,0,0,0]:[B*255/Ot,K*255/Ot,bt*255/Ot,Ot]},Dl.black=new Dl(0,0,0,1),Dl.white=new Dl(1,1,1,1),Dl.transparent=new Dl(0,0,0,0),Dl.red=new Dl(1,0,0,1);var Bc=function(m,B,K){m?this.sensitivity=B?"variant":"case":this.sensitivity=B?"accent":"base",this.locale=K,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Bc.prototype.compare=function(m,B){return this.collator.compare(m,B)},Bc.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var jf=function(m,B,K,bt,Ot){this.text=m,this.image=B,this.scale=K,this.fontStack=bt,this.textColor=Ot},hc=function(m){this.sections=m};hc.fromString=function(m){return new hc([new jf(m,null,null,null,null)])},hc.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(m){return m.text.length!==0||m.image&&m.image.name.length!==0})},hc.factory=function(m){return m instanceof hc?m:hc.fromString(m)},hc.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(m){return m.text}).join("")},hc.prototype.serialize=function(){for(var m=["format"],B=0,K=this.sections;B=0&&m<=255&&typeof B=="number"&&B>=0&&B<=255&&typeof K=="number"&&K>=0&&K<=255)){var Ot=typeof bt=="number"?[m,B,K,bt]:[m,B,K];return"Invalid rgba value ["+Ot.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof bt>"u"||typeof bt=="number"&&bt>=0&&bt<=1?null:"Invalid rgba value ["+[m,B,K,bt].join(", ")+"]: 'a' must be between 0 and 1."}function oh(m){if(m===null||typeof m=="string"||typeof m=="boolean"||typeof m=="number"||m instanceof Dl||m instanceof Bc||m instanceof hc||m instanceof oc)return!0;if(Array.isArray(m)){for(var B=0,K=m;B2){var ie=m[1];if(typeof ie!="string"||!(ie in Mh)||ie==="object")return B.error('The item type argument of "array" must be one of string, number, boolean',1);Zt=Mh[ie],K++}else Zt=Qo;var De;if(m.length>3){if(m[2]!==null&&(typeof m[2]!="number"||m[2]<0||m[2]!==Math.floor(m[2])))return B.error('The length argument to "array" must be a positive integer literal',2);De=m[2],K++}bt=Xl(Zt,De)}else bt=Mh[Ot];for(var Je=[];K1)&&B.push(bt)}}return B.concat(this.args.map(function(Ot){return Ot.serialize()}))};var jh=function(m){this.type=_l,this.sections=m};jh.parse=function(m,B){if(m.length<2)return B.error("Expected at least one argument.");var K=m[1];if(!Array.isArray(K)&&typeof K=="object")return B.error("First argument must be an image or text section.");for(var bt=[],Ot=!1,Zt=1;Zt<=m.length-1;++Zt){var ie=m[Zt];if(Ot&&typeof ie=="object"&&!Array.isArray(ie)){Ot=!1;var De=null;if(ie["font-scale"]&&(De=B.parse(ie["font-scale"],1,ao),!De))return null;var Je=null;if(ie["text-font"]&&(Je=B.parse(ie["text-font"],1,Xl(Ts)),!Je))return null;var vr=null;if(ie["text-color"]&&(vr=B.parse(ie["text-color"],1,nu),!vr))return null;var Sr=bt[bt.length-1];Sr.scale=De,Sr.font=Je,Sr.textColor=vr}else{var Yr=B.parse(m[Zt],1,Qo);if(!Yr)return null;var nn=Yr.type.kind;if(nn!=="string"&&nn!=="value"&&nn!=="null"&&nn!=="resolvedImage")return B.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Ot=!0,bt.push({content:Yr,scale:null,font:null,textColor:null})}}return new jh(bt)},jh.prototype.evaluate=function(m){var B=function(K){var bt=K.content.evaluate(m);return su(bt)===Ol?new jf("",bt,null,null,null):new jf(sc(bt),null,K.scale?K.scale.evaluate(m):null,K.font?K.font.evaluate(m).join(","):null,K.textColor?K.textColor.evaluate(m):null)};return new hc(this.sections.map(B))},jh.prototype.eachChild=function(m){for(var B=0,K=this.sections;B-1),K},xu.prototype.eachChild=function(m){m(this.input)},xu.prototype.outputDefined=function(){return!1},xu.prototype.serialize=function(){return["image",this.input.serialize()]};var Cd={"to-boolean":Ls,"to-color":nu,"to-number":ao,"to-string":Ts},Qs=function(m,B){this.type=m,this.args=B};Qs.parse=function(m,B){if(m.length<2)return B.error("Expected at least one argument.");var K=m[0];if((K==="to-boolean"||K==="to-string")&&m.length!==2)return B.error("Expected one argument.");for(var bt=Cd[K],Ot=[],Zt=1;Zt4?K="Invalid rbga value "+JSON.stringify(B)+": expected an array containing either three or four numeric values.":K=fc(B[0],B[1],B[2],B[3]),!K))return new Dl(B[0]/255,B[1]/255,B[2]/255,B[3])}throw new Zl(K||"Could not parse color from value '"+(typeof B=="string"?B:String(JSON.stringify(B)))+"'")}else if(this.type.kind==="number"){for(var De=null,Je=0,vr=this.args;Je=B[2]||m[1]<=B[1]||m[3]>=B[3])}function hd(m,B){var K=Uh(m[0]),bt=yf(m[1]),Ot=Math.pow(2,B.z);return[Math.round(K*Ot*ec),Math.round(bt*Ot*ec)]}function $f(m,B,K){var bt=m[0]-B[0],Ot=m[1]-B[1],Zt=m[0]-K[0],ie=m[1]-K[1];return bt*ie-Zt*Ot===0&&bt*Zt<=0&&Ot*ie<=0}function xf(m,B,K){return B[1]>m[1]!=K[1]>m[1]&&m[0]<(K[0]-B[0])*(m[1]-B[1])/(K[1]-B[1])+B[0]}function Vh(m,B){for(var K=!1,bt=0,Ot=B.length;bt0&&Yr<0||Sr<0&&Yr>0}function Gf(m,B,K,bt){var Ot=[B[0]-m[0],B[1]-m[1]],Zt=[bt[0]-K[0],bt[1]-K[1]];return Hf(Zt,Ot)===0?!1:!!(lh(m,B,K,bt)&&lh(K,bt,m,B))}function Sh(m,B,K){for(var bt=0,Ot=K;btK[2]){var Ot=bt*.5,Zt=m[0]-K[0]>Ot?-bt:K[0]-m[0]>Ot?bt:0;Zt===0&&(Zt=m[0]-K[2]>Ot?-bt:K[2]-m[0]>Ot?bt:0),m[0]+=Zt}Uf(B,m)}function Ef(m){m[0]=m[1]=1/0,m[2]=m[3]=-1/0}function Ld(m,B,K,bt){for(var Ot=Math.pow(2,bt.z)*ec,Zt=[bt.x*ec,bt.y*ec],ie=[],De=0,Je=m;De=0)return!1;var K=!0;return m.eachChild(function(bt){K&&!jc(bt,B)&&(K=!1)}),K}var Hh=function(m,B){this.type=B.type,this.name=m,this.boundExpression=B};Hh.parse=function(m,B){if(m.length!==2||typeof m[1]!="string")return B.error("'var' expression requires exactly one string literal argument.");var K=m[1];return B.scope.has(K)?new Hh(K,B.scope.get(K)):B.error('Unknown variable "'+K+'". Make sure "'+K+'" has been bound in an enclosing "let" expression before using it.',1)},Hh.prototype.evaluate=function(m){return this.boundExpression.evaluate(m)},Hh.prototype.eachChild=function(){},Hh.prototype.outputDefined=function(){return!1},Hh.prototype.serialize=function(){return["var",this.name]};var lu=function(m,B,K,bt,Ot){B===void 0&&(B=[]),bt===void 0&&(bt=new Cl),Ot===void 0&&(Ot=[]),this.registry=m,this.path=B,this.key=B.map(function(Zt){return"["+Zt+"]"}).join(""),this.scope=bt,this.errors=Ot,this.expectedType=K};lu.prototype.parse=function(m,B,K,bt,Ot){return Ot===void 0&&(Ot={}),B?this.concat(B,K,bt)._parse(m,Ot):this._parse(m,Ot)},lu.prototype._parse=function(m,B){(m===null||typeof m=="string"||typeof m=="boolean"||typeof m=="number")&&(m=["literal",m]);function K(vr,Sr,Yr){return Yr==="assert"?new Lc(Sr,[vr]):Yr==="coerce"?new Qs(Sr,[vr]):vr}if(Array.isArray(m)){if(m.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var bt=m[0];if(typeof bt!="string")return this.error("Expression name must be a string, but found "+typeof bt+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var Ot=this.registry[bt];if(Ot){var Zt=Ot.parse(m,this);if(!Zt)return null;if(this.expectedType){var ie=this.expectedType,De=Zt.type;if((ie.kind==="string"||ie.kind==="number"||ie.kind==="boolean"||ie.kind==="object"||ie.kind==="array")&&De.kind==="value")Zt=K(Zt,ie,B.typeAnnotation||"assert");else if((ie.kind==="color"||ie.kind==="formatted"||ie.kind==="resolvedImage")&&(De.kind==="value"||De.kind==="string"))Zt=K(Zt,ie,B.typeAnnotation||"coerce");else if(this.checkSubtype(ie,De))return null}if(!(Zt instanceof el)&&Zt.type.kind!=="resolvedImage"&&Eh(Zt)){var Je=new Ll;try{Zt=new el(Zt.type,Zt.evaluate(Je))}catch(vr){return this.error(vr.message),null}}return Zt}return this.error('Unknown expression "'+bt+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof m>"u"?this.error("'undefined' value invalid. Use null instead."):typeof m=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof m+" instead.")},lu.prototype.concat=function(m,B,K){var bt=typeof m=="number"?this.path.concat(m):this.path,Ot=K?this.scope.concat(K):this.scope;return new lu(this.registry,bt,B||null,Ot,this.errors)},lu.prototype.error=function(m){for(var B=[],K=arguments.length-1;K-- >0;)B[K]=arguments[K+1];var bt=""+this.key+B.map(function(Ot){return"["+Ot+"]"}).join("");this.errors.push(new il(bt,m))},lu.prototype.checkSubtype=function(m,B){var K=ph(m,B);return K&&this.error(K),K};function Eh(m){if(m instanceof Hh)return Eh(m.boundExpression);if(m instanceof Jo&&m.name==="error"||m instanceof sh||m instanceof Nc)return!1;var B=m instanceof Qs||m instanceof Lc,K=!0;return m.eachChild(function(bt){B?K=K&&Eh(bt):K=K&&bt instanceof el}),K?Xf(m)&&jc(m,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function Sc(m,B){for(var K=m.length-1,bt=0,Ot=K,Zt=0,ie,De;bt<=Ot;)if(Zt=Math.floor((bt+Ot)/2),ie=m[Zt],De=m[Zt+1],ie<=B){if(Zt===K||BB)Ot=Zt-1;else throw new Zl("Input is not a number.");return 0}var Uc=function(m,B,K){this.type=m,this.input=B,this.labels=[],this.outputs=[];for(var bt=0,Ot=K;bt=ie)return B.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Je);var Sr=B.parse(De,vr,Ot);if(!Sr)return null;Ot=Ot||Sr.type,bt.push([ie,Sr])}return new Uc(Ot,K,bt)},Uc.prototype.evaluate=function(m){var B=this.labels,K=this.outputs;if(B.length===1)return K[0].evaluate(m);var bt=this.input.evaluate(m);if(bt<=B[0])return K[0].evaluate(m);var Ot=B.length;if(bt>=B[Ot-1])return K[Ot-1].evaluate(m);var Zt=Sc(B,bt);return K[Zt].evaluate(m)},Uc.prototype.eachChild=function(m){m(this.input);for(var B=0,K=this.outputs;B0&&m.push(this.labels[B]),m.push(this.outputs[B].serialize());return m};function _u(m,B,K){return m*(1-K)+B*K}function uf(m,B,K){return new Dl(_u(m.r,B.r,K),_u(m.g,B.g,K),_u(m.b,B.b,K),_u(m.a,B.a,K))}function gh(m,B,K){return m.map(function(bt,Ot){return _u(bt,B[Ot],K)})}var Wh=Object.freeze({__proto__:null,number:_u,color:uf,array:gh}),Cf=.95047,Pd=1,Qd=1.08883,cf=4/29,Lf=6/29,wc=3*Lf*Lf,hf=Lf*Lf*Lf,Qc=Math.PI/180,ff=180/Math.PI;function Pf(m){return m>hf?Math.pow(m,1/3):m/wc+cf}function vh(m){return m>Lf?m*m*m:wc*(m-cf)}function bu(m){return 255*(m<=.0031308?12.92*m:1.055*Math.pow(m,1/2.4)-.055)}function Ch(m){return m/=255,m<=.04045?m/12.92:Math.pow((m+.055)/1.055,2.4)}function Vc(m){var B=Ch(m.r),K=Ch(m.g),bt=Ch(m.b),Ot=Pf((.4124564*B+.3575761*K+.1804375*bt)/Cf),Zt=Pf((.2126729*B+.7151522*K+.072175*bt)/Pd),ie=Pf((.0193339*B+.119192*K+.9503041*bt)/Qd);return{l:116*Zt-16,a:500*(Ot-Zt),b:200*(Zt-ie),alpha:m.a}}function fd(m){var B=(m.l+16)/116,K=isNaN(m.a)?B:B+m.a/500,bt=isNaN(m.b)?B:B-m.b/200;return B=Pd*vh(B),K=Cf*vh(K),bt=Qd*vh(bt),new Dl(bu(3.2404542*K-1.5371385*B-.4985314*bt),bu(-.969266*K+1.8760108*B+.041556*bt),bu(.0556434*K-.2040259*B+1.0572252*bt),m.alpha)}function vu(m,B,K){return{l:_u(m.l,B.l,K),a:_u(m.a,B.a,K),b:_u(m.b,B.b,K),alpha:_u(m.alpha,B.alpha,K)}}function bf(m){var B=Vc(m),K=B.l,bt=B.a,Ot=B.b,Zt=Math.atan2(Ot,bt)*ff;return{h:Zt<0?Zt+360:Zt,c:Math.sqrt(bt*bt+Ot*Ot),l:K,alpha:m.a}}function qh(m){var B=m.h*Qc,K=m.c,bt=m.l;return fd({l:bt,a:Math.cos(B)*K,b:Math.sin(B)*K,alpha:m.alpha})}function th(m,B,K){var bt=B-m;return m+K*(bt>180||bt<-180?bt-360*Math.round(bt/360):bt)}function rf(m,B,K){return{h:th(m.h,B.h,K),c:_u(m.c,B.c,K),l:_u(m.l,B.l,K),alpha:_u(m.alpha,B.alpha,K)}}var Zh={forward:Vc,reverse:fd,interpolate:vu},wf={forward:bf,reverse:qh,interpolate:rf},zd=Object.freeze({__proto__:null,lab:Zh,hcl:wf}),gc=function(m,B,K,bt,Ot){this.type=m,this.operator=B,this.interpolation=K,this.input=bt,this.labels=[],this.outputs=[];for(var Zt=0,ie=Ot;Zt1}))return B.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);bt={name:"cubic-bezier",controlPoints:De}}else return B.error("Unknown interpolation type "+String(bt[0]),1,0);if(m.length-1<4)return B.error("Expected at least 4 arguments, but found only "+(m.length-1)+".");if((m.length-1)%2!==0)return B.error("Expected an even number of arguments.");if(Ot=B.parse(Ot,2,ao),!Ot)return null;var Je=[],vr=null;K==="interpolate-hcl"||K==="interpolate-lab"?vr=nu:B.expectedType&&B.expectedType.kind!=="value"&&(vr=B.expectedType);for(var Sr=0;Sr=Yr)return B.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',pn);var pi=B.parse(nn,Rn,vr);if(!pi)return null;vr=vr||pi.type,Je.push([Yr,pi])}return vr.kind!=="number"&&vr.kind!=="color"&&!(vr.kind==="array"&&vr.itemType.kind==="number"&&typeof vr.N=="number")?B.error("Type "+tu(vr)+" is not interpolatable."):new gc(vr,K,bt,Ot,Je)},gc.prototype.evaluate=function(m){var B=this.labels,K=this.outputs;if(B.length===1)return K[0].evaluate(m);var bt=this.input.evaluate(m);if(bt<=B[0])return K[0].evaluate(m);var Ot=B.length;if(bt>=B[Ot-1])return K[Ot-1].evaluate(m);var Zt=Sc(B,bt),ie=B[Zt],De=B[Zt+1],Je=gc.interpolationFactor(this.interpolation,bt,ie,De),vr=K[Zt].evaluate(m),Sr=K[Zt+1].evaluate(m);return this.operator==="interpolate"?Wh[this.type.kind.toLowerCase()](vr,Sr,Je):this.operator==="interpolate-hcl"?wf.reverse(wf.interpolate(wf.forward(vr),wf.forward(Sr),Je)):Zh.reverse(Zh.interpolate(Zh.forward(vr),Zh.forward(Sr),Je))},gc.prototype.eachChild=function(m){m(this.input);for(var B=0,K=this.outputs;B=K.length)throw new Zl("Array index out of bounds: "+B+" > "+(K.length-1)+".");if(B!==Math.floor(B))throw new Zl("Array index must be an integer, but found "+B+" instead.");return K[B]},yh.prototype.eachChild=function(m){m(this.index),m(this.input)},yh.prototype.outputDefined=function(){return!1},yh.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Ru=function(m,B){this.type=Ls,this.needle=m,this.haystack=B};Ru.parse=function(m,B){if(m.length!==3)return B.error("Expected 2 arguments, but found "+(m.length-1)+" instead.");var K=B.parse(m[1],1,Qo),bt=B.parse(m[2],2,Qo);return!K||!bt?null:Jc(K.type,[Ls,Ts,ao,Fu,Qo])?new Ru(K,bt):B.error("Expected first argument to be of type boolean, string, number or null, but found "+tu(K.type)+" instead")},Ru.prototype.evaluate=function(m){var B=this.needle.evaluate(m),K=this.haystack.evaluate(m);if(!K)return!1;if(!ah(B,["boolean","string","number","null"]))throw new Zl("Expected first argument to be of type boolean, string, number or null, but found "+tu(su(B))+" instead.");if(!ah(K,["string","array"]))throw new Zl("Expected second argument to be of type array or string, but found "+tu(su(K))+" instead.");return K.indexOf(B)>=0},Ru.prototype.eachChild=function(m){m(this.needle),m(this.haystack)},Ru.prototype.outputDefined=function(){return!0},Ru.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var eu=function(m,B,K){this.type=ao,this.needle=m,this.haystack=B,this.fromIndex=K};eu.parse=function(m,B){if(m.length<=2||m.length>=5)return B.error("Expected 3 or 4 arguments, but found "+(m.length-1)+" instead.");var K=B.parse(m[1],1,Qo),bt=B.parse(m[2],2,Qo);if(!K||!bt)return null;if(!Jc(K.type,[Ls,Ts,ao,Fu,Qo]))return B.error("Expected first argument to be of type boolean, string, number or null, but found "+tu(K.type)+" instead");if(m.length===4){var Ot=B.parse(m[3],3,ao);return Ot?new eu(K,bt,Ot):null}else return new eu(K,bt)},eu.prototype.evaluate=function(m){var B=this.needle.evaluate(m),K=this.haystack.evaluate(m);if(!ah(B,["boolean","string","number","null"]))throw new Zl("Expected first argument to be of type boolean, string, number or null, but found "+tu(su(B))+" instead.");if(!ah(K,["string","array"]))throw new Zl("Expected second argument to be of type array or string, but found "+tu(su(K))+" instead.");if(this.fromIndex){var bt=this.fromIndex.evaluate(m);return K.indexOf(B,bt)}return K.indexOf(B)},eu.prototype.eachChild=function(m){m(this.needle),m(this.haystack),this.fromIndex&&m(this.fromIndex)},eu.prototype.outputDefined=function(){return!1},eu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var m=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),m]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var xh=function(m,B,K,bt,Ot,Zt){this.inputType=m,this.type=B,this.input=K,this.cases=bt,this.outputs=Ot,this.otherwise=Zt};xh.parse=function(m,B){if(m.length<5)return B.error("Expected at least 4 arguments, but found only "+(m.length-1)+".");if(m.length%2!==1)return B.error("Expected an even number of arguments.");var K,bt;B.expectedType&&B.expectedType.kind!=="value"&&(bt=B.expectedType);for(var Ot={},Zt=[],ie=2;ieNumber.MAX_SAFE_INTEGER)return vr.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof nn=="number"&&Math.floor(nn)!==nn)return vr.error("Numeric branch labels must be integer values.");if(!K)K=su(nn);else if(vr.checkSubtype(K,su(nn)))return null;if(typeof Ot[String(nn)]<"u")return vr.error("Branch labels must be unique.");Ot[String(nn)]=Zt.length}var pn=B.parse(Je,ie,bt);if(!pn)return null;bt=bt||pn.type,Zt.push(pn)}var Rn=B.parse(m[1],1,Qo);if(!Rn)return null;var pi=B.parse(m[m.length-1],m.length-1,bt);return!pi||Rn.type.kind!=="value"&&B.concat(1).checkSubtype(K,Rn.type)?null:new xh(K,bt,Rn,Ot,Zt,pi)},xh.prototype.evaluate=function(m){var B=this.input.evaluate(m),K=su(B)===this.inputType&&this.outputs[this.cases[B]]||this.otherwise;return K.evaluate(m)},xh.prototype.eachChild=function(m){m(this.input),this.outputs.forEach(m),m(this.otherwise)},xh.prototype.outputDefined=function(){return this.outputs.every(function(m){return m.outputDefined()})&&this.otherwise.outputDefined()},xh.prototype.serialize=function(){for(var m=this,B=["match",this.input.serialize()],K=Object.keys(this.cases).sort(),bt=[],Ot={},Zt=0,ie=K;Zt=5)return B.error("Expected 3 or 4 arguments, but found "+(m.length-1)+" instead.");var K=B.parse(m[1],1,Qo),bt=B.parse(m[2],2,ao);if(!K||!bt)return null;if(!Jc(K.type,[Xl(Qo),Ts,Qo]))return B.error("Expected first argument to be of type array or string, but found "+tu(K.type)+" instead");if(m.length===4){var Ot=B.parse(m[3],3,ao);return Ot?new _h(K.type,K,bt,Ot):null}else return new _h(K.type,K,bt)},_h.prototype.evaluate=function(m){var B=this.input.evaluate(m),K=this.beginIndex.evaluate(m);if(!ah(B,["string","array"]))throw new Zl("Expected first argument to be of type array or string, but found "+tu(su(B))+" instead.");if(this.endIndex){var bt=this.endIndex.evaluate(m);return B.slice(K,bt)}return B.slice(K)},_h.prototype.eachChild=function(m){m(this.input),m(this.beginIndex),this.endIndex&&m(this.endIndex)},_h.prototype.outputDefined=function(){return!1},_h.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var m=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),m]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function qf(m,B){return m==="=="||m==="!="?B.kind==="boolean"||B.kind==="string"||B.kind==="number"||B.kind==="null"||B.kind==="value":B.kind==="string"||B.kind==="number"||B.kind==="value"}function mr(m,B,K){return B===K}function Ur(m,B,K){return B!==K}function _n(m,B,K){return BK}function Wn(m,B,K){return B<=K}function hi(m,B,K){return B>=K}function ea(m,B,K,bt){return bt.compare(B,K)===0}function ga(m,B,K,bt){return!ea(m,B,K,bt)}function Ra(m,B,K,bt){return bt.compare(B,K)<0}function $a(m,B,K,bt){return bt.compare(B,K)>0}function ua(m,B,K,bt){return bt.compare(B,K)<=0}function za(m,B,K,bt){return bt.compare(B,K)>=0}function wa(m,B,K){var bt=m!=="=="&&m!=="!=";return function(){function Ot(Zt,ie,De){this.type=Ls,this.lhs=Zt,this.rhs=ie,this.collator=De,this.hasUntypedArgument=Zt.type.kind==="value"||ie.type.kind==="value"}return Ot.parse=function(Zt,ie){if(Zt.length!==3&&Zt.length!==4)return ie.error("Expected two or three arguments.");var De=Zt[0],Je=ie.parse(Zt[1],1,Qo);if(!Je)return null;if(!qf(De,Je.type))return ie.concat(1).error('"'+De+`" comparisons are not supported for type '`+tu(Je.type)+"'.");var vr=ie.parse(Zt[2],2,Qo);if(!vr)return null;if(!qf(De,vr.type))return ie.concat(2).error('"'+De+`" comparisons are not supported for type '`+tu(vr.type)+"'.");if(Je.type.kind!==vr.type.kind&&Je.type.kind!=="value"&&vr.type.kind!=="value")return ie.error("Cannot compare types '"+tu(Je.type)+"' and '"+tu(vr.type)+"'.");bt&&(Je.type.kind==="value"&&vr.type.kind!=="value"?Je=new Lc(vr.type,[Je]):Je.type.kind!=="value"&&vr.type.kind==="value"&&(vr=new Lc(Je.type,[vr])));var Sr=null;if(Zt.length===4){if(Je.type.kind!=="string"&&vr.type.kind!=="string"&&Je.type.kind!=="value"&&vr.type.kind!=="value")return ie.error("Cannot use collator to compare non-string types.");if(Sr=ie.parse(Zt[3],3,Gu),!Sr)return null}return new Ot(Je,vr,Sr)},Ot.prototype.evaluate=function(Zt){var ie=this.lhs.evaluate(Zt),De=this.rhs.evaluate(Zt);if(bt&&this.hasUntypedArgument){var Je=su(ie),vr=su(De);if(Je.kind!==vr.kind||!(Je.kind==="string"||Je.kind==="number"))throw new Zl('Expected arguments for "'+m+'" to be (string, string) or (number, number), but found ('+Je.kind+", "+vr.kind+") instead.")}if(this.collator&&!bt&&this.hasUntypedArgument){var Sr=su(ie),Yr=su(De);if(Sr.kind!=="string"||Yr.kind!=="string")return B(Zt,ie,De)}return this.collator?K(Zt,ie,De,this.collator.evaluate(Zt)):B(Zt,ie,De)},Ot.prototype.eachChild=function(Zt){Zt(this.lhs),Zt(this.rhs),this.collator&&Zt(this.collator)},Ot.prototype.outputDefined=function(){return!0},Ot.prototype.serialize=function(){var Zt=[m];return this.eachChild(function(ie){Zt.push(ie.serialize())}),Zt},Ot}()}var Ji=wa("==",mr,ea),eo=wa("!=",Ur,ga),rs=wa("<",_n,Ra),Zo=wa(">",cn,$a),os=wa("<=",Wn,ua),fs=wa(">=",hi,za),no=function(m,B,K,bt,Ot){this.type=Ts,this.number=m,this.locale=B,this.currency=K,this.minFractionDigits=bt,this.maxFractionDigits=Ot};no.parse=function(m,B){if(m.length!==3)return B.error("Expected two arguments.");var K=B.parse(m[1],1,ao);if(!K)return null;var bt=m[2];if(typeof bt!="object"||Array.isArray(bt))return B.error("NumberFormat options argument must be an object.");var Ot=null;if(bt.locale&&(Ot=B.parse(bt.locale,1,Ts),!Ot))return null;var Zt=null;if(bt.currency&&(Zt=B.parse(bt.currency,1,Ts),!Zt))return null;var ie=null;if(bt["min-fraction-digits"]&&(ie=B.parse(bt["min-fraction-digits"],1,ao),!ie))return null;var De=null;return bt["max-fraction-digits"]&&(De=B.parse(bt["max-fraction-digits"],1,ao),!De)?null:new no(K,Ot,Zt,ie,De)},no.prototype.evaluate=function(m){return new Intl.NumberFormat(this.locale?this.locale.evaluate(m):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(m):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(m):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(m):void 0}).format(this.number.evaluate(m))},no.prototype.eachChild=function(m){m(this.number),this.locale&&m(this.locale),this.currency&&m(this.currency),this.minFractionDigits&&m(this.minFractionDigits),this.maxFractionDigits&&m(this.maxFractionDigits)},no.prototype.outputDefined=function(){return!1},no.prototype.serialize=function(){var m={};return this.locale&&(m.locale=this.locale.serialize()),this.currency&&(m.currency=this.currency.serialize()),this.minFractionDigits&&(m["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(m["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),m]};var qa=function(m){this.type=ao,this.input=m};qa.parse=function(m,B){if(m.length!==2)return B.error("Expected 1 argument, but found "+(m.length-1)+" instead.");var K=B.parse(m[1],1);return K?K.type.kind!=="array"&&K.type.kind!=="string"&&K.type.kind!=="value"?B.error("Expected argument of type string or array, but found "+tu(K.type)+" instead."):new qa(K):null},qa.prototype.evaluate=function(m){var B=this.input.evaluate(m);if(typeof B=="string"||Array.isArray(B))return B.length;throw new Zl("Expected value to be of type string or array, but found "+tu(su(B))+" instead.")},qa.prototype.eachChild=function(m){m(this.input)},qa.prototype.outputDefined=function(){return!1},qa.prototype.serialize=function(){var m=["length"];return this.eachChild(function(B){m.push(B.serialize())}),m};var ds={"==":Ji,"!=":eo,">":Zo,"<":rs,">=":fs,"<=":os,array:Lc,at:yh,boolean:Lc,case:df,coalesce:eh,collator:sh,format:jh,image:xu,in:Ru,"index-of":eu,interpolate:gc,"interpolate-hcl":gc,"interpolate-lab":gc,length:qa,let:Lh,literal:el,match:xh,number:Lc,"number-format":no,object:Lc,slice:_h,step:Uc,string:Lc,"to-boolean":Qs,"to-color":Qs,"to-number":Qs,"to-string":Qs,var:Hh,within:Nc};function tl(m,B){var K=B[0],bt=B[1],Ot=B[2],Zt=B[3];K=K.evaluate(m),bt=bt.evaluate(m),Ot=Ot.evaluate(m);var ie=Zt?Zt.evaluate(m):1,De=fc(K,bt,Ot,ie);if(De)throw new Zl(De);return new Dl(K/255*ie,bt/255*ie,Ot/255*ie,ie)}function Pl(m,B){return m in B}function iu(m,B){var K=B[m];return typeof K>"u"?null:K}function Hl(m,B,K,bt){for(;K<=bt;){var Ot=K+bt>>1;if(B[Ot]===m)return!0;B[Ot]>m?bt=Ot-1:K=Ot+1}return!1}function au(m){return{type:m}}Jo.register(ds,{error:[Mu,[Ts],function(m,B){var K=B[0];throw new Zl(K.evaluate(m))}],typeof:[Ts,[Qo],function(m,B){var K=B[0];return tu(su(K.evaluate(m)))}],"to-rgba":[Xl(ao,4),[nu],function(m,B){var K=B[0];return K.evaluate(m).toArray()}],rgb:[nu,[ao,ao,ao],tl],rgba:[nu,[ao,ao,ao,ao],tl],has:{type:Ls,overloads:[[[Ts],function(m,B){var K=B[0];return Pl(K.evaluate(m),m.properties())}],[[Ts,cl],function(m,B){var K=B[0],bt=B[1];return Pl(K.evaluate(m),bt.evaluate(m))}]]},get:{type:Qo,overloads:[[[Ts],function(m,B){var K=B[0];return iu(K.evaluate(m),m.properties())}],[[Ts,cl],function(m,B){var K=B[0],bt=B[1];return iu(K.evaluate(m),bt.evaluate(m))}]]},"feature-state":[Qo,[Ts],function(m,B){var K=B[0];return iu(K.evaluate(m),m.featureState||{})}],properties:[cl,[],function(m){return m.properties()}],"geometry-type":[Ts,[],function(m){return m.geometryType()}],id:[Qo,[],function(m){return m.id()}],zoom:[ao,[],function(m){return m.globals.zoom}],"heatmap-density":[ao,[],function(m){return m.globals.heatmapDensity||0}],"line-progress":[ao,[],function(m){return m.globals.lineProgress||0}],accumulated:[Qo,[],function(m){return m.globals.accumulated===void 0?null:m.globals.accumulated}],"+":[ao,au(ao),function(m,B){for(var K=0,bt=0,Ot=B;bt":[Ls,[Ts,Qo],function(m,B){var K=B[0],bt=B[1],Ot=m.properties()[K.value],Zt=bt.value;return typeof Ot==typeof Zt&&Ot>Zt}],"filter-id->":[Ls,[Qo],function(m,B){var K=B[0],bt=m.id(),Ot=K.value;return typeof bt==typeof Ot&&bt>Ot}],"filter-<=":[Ls,[Ts,Qo],function(m,B){var K=B[0],bt=B[1],Ot=m.properties()[K.value],Zt=bt.value;return typeof Ot==typeof Zt&&Ot<=Zt}],"filter-id-<=":[Ls,[Qo],function(m,B){var K=B[0],bt=m.id(),Ot=K.value;return typeof bt==typeof Ot&&bt<=Ot}],"filter->=":[Ls,[Ts,Qo],function(m,B){var K=B[0],bt=B[1],Ot=m.properties()[K.value],Zt=bt.value;return typeof Ot==typeof Zt&&Ot>=Zt}],"filter-id->=":[Ls,[Qo],function(m,B){var K=B[0],bt=m.id(),Ot=K.value;return typeof bt==typeof Ot&&bt>=Ot}],"filter-has":[Ls,[Qo],function(m,B){var K=B[0];return K.value in m.properties()}],"filter-has-id":[Ls,[],function(m){return m.id()!==null&&m.id()!==void 0}],"filter-type-in":[Ls,[Xl(Ts)],function(m,B){var K=B[0];return K.value.indexOf(m.geometryType())>=0}],"filter-id-in":[Ls,[Xl(Qo)],function(m,B){var K=B[0];return K.value.indexOf(m.id())>=0}],"filter-in-small":[Ls,[Ts,Xl(Qo)],function(m,B){var K=B[0],bt=B[1];return bt.value.indexOf(m.properties()[K.value])>=0}],"filter-in-large":[Ls,[Ts,Xl(Qo)],function(m,B){var K=B[0],bt=B[1];return Hl(m.properties()[K.value],bt.value,0,bt.value.length-1)}],all:{type:Ls,overloads:[[[Ls,Ls],function(m,B){var K=B[0],bt=B[1];return K.evaluate(m)&&bt.evaluate(m)}],[au(Ls),function(m,B){for(var K=0,bt=B;K-1}function zo(m){return!!m.expression&&m.expression.interpolated}function Ms(m){return m instanceof Number?"number":m instanceof String?"string":m instanceof Boolean?"boolean":Array.isArray(m)?"array":m===null?"null":typeof m}function $l(m){return typeof m=="object"&&m!==null&&!Array.isArray(m)}function Fl(m){return m}function vc(m,B){var K=B.type==="color",bt=m.stops&&typeof m.stops[0][0]=="object",Ot=bt||m.property!==void 0,Zt=bt||!Ot,ie=m.type||(zo(B)?"exponential":"interval");if(K&&(m=Kl({},m),m.stops&&(m.stops=m.stops.map(function(jo){return[jo[0],Dl.parse(jo[1])]})),m.default?m.default=Dl.parse(m.default):m.default=Dl.parse(B.default)),m.colorSpace&&m.colorSpace!=="rgb"&&!zd[m.colorSpace])throw new Error("Unknown color space: "+m.colorSpace);var De,Je,vr;if(ie==="exponential")De=Wc;else if(ie==="interval")De=Ph;else if(ie==="categorical"){De=Pc,Je=Object.create(null);for(var Sr=0,Yr=m.stops;Sr=m.stops[bt-1][0])return m.stops[bt-1][1];var Ot=Sc(m.stops.map(function(Zt){return Zt[0]}),K);return m.stops[Ot][1]}function Wc(m,B,K){var bt=m.base!==void 0?m.base:1;if(Ms(K)!=="number")return Hc(m.default,B.default);var Ot=m.stops.length;if(Ot===1||K<=m.stops[0][0])return m.stops[0][1];if(K>=m.stops[Ot-1][0])return m.stops[Ot-1][1];var Zt=Sc(m.stops.map(function(Yr){return Yr[0]}),K),ie=Iu(K,bt,m.stops[Zt][0],m.stops[Zt+1][0]),De=m.stops[Zt][1],Je=m.stops[Zt+1][1],vr=Wh[B.type]||Fl;if(m.colorSpace&&m.colorSpace!=="rgb"){var Sr=zd[m.colorSpace];vr=function(Yr,nn){return Sr.reverse(Sr.interpolate(Sr.forward(Yr),Sr.forward(nn),ie))}}return typeof De.evaluate=="function"?{evaluate:function(){for(var Yr=[],nn=arguments.length;nn--;)Yr[nn]=arguments[nn];var pn=De.evaluate.apply(void 0,Yr),Rn=Je.evaluate.apply(void 0,Yr);if(!(pn===void 0||Rn===void 0))return vr(pn,Rn,ie)}}:vr(De,Je,ie)}function zh(m,B,K){return B.type==="color"?K=Dl.parse(K):B.type==="formatted"?K=hc.fromString(K.toString()):B.type==="resolvedImage"?K=oc.fromString(K.toString()):Ms(K)!==B.type&&(B.type!=="enum"||!B.values[K])&&(K=void 0),Hc(K,m.default,B.default)}function Iu(m,B,K,bt){var Ot=bt-K,Zt=m-K;return Ot===0?0:B===1?Zt/Ot:(Math.pow(B,Zt)-1)/(Math.pow(B,Ot)-1)}var Ih=function(m,B){this.expression=m,this._warningHistory={},this._evaluator=new Ll,this._defaultValue=B?It(B):null,this._enumValues=B&&B.type==="enum"?B.values:null};Ih.prototype.evaluateWithoutErrorHandling=function(m,B,K,bt,Ot,Zt){return this._evaluator.globals=m,this._evaluator.feature=B,this._evaluator.featureState=K,this._evaluator.canonical=bt,this._evaluator.availableImages=Ot||null,this._evaluator.formattedSection=Zt,this.expression.evaluate(this._evaluator)},Ih.prototype.evaluate=function(m,B,K,bt,Ot,Zt){this._evaluator.globals=m,this._evaluator.feature=B||null,this._evaluator.featureState=K||null,this._evaluator.canonical=bt,this._evaluator.availableImages=Ot||null,this._evaluator.formattedSection=Zt||null;try{var ie=this.expression.evaluate(this._evaluator);if(ie==null||typeof ie=="number"&&ie!==ie)return this._defaultValue;if(this._enumValues&&!(ie in this._enumValues))throw new Zl("Expected value to be one of "+Object.keys(this._enumValues).map(function(De){return JSON.stringify(De)}).join(", ")+", but found "+JSON.stringify(ie)+" instead.");return ie}catch(De){return this._warningHistory[De.message]||(this._warningHistory[De.message]=!0,typeof console<"u"&&console.warn(De.message)),this._defaultValue}};function es(m){return Array.isArray(m)&&m.length>0&&typeof m[0]=="string"&&m[0]in ds}function zs(m,B){var K=new lu(ds,[],B?Et(B):void 0),bt=K.parse(m,void 0,void 0,void 0,B&&B.type==="string"?{typeAnnotation:"coerce"}:void 0);return bt?ml(new Ih(bt,B)):qu(K.errors)}var qc=function(m,B){this.kind=m,this._styleExpression=B,this.isStateDependent=m!=="constant"&&!zu(B.expression)};qc.prototype.evaluateWithoutErrorHandling=function(m,B,K,bt,Ot,Zt){return this._styleExpression.evaluateWithoutErrorHandling(m,B,K,bt,Ot,Zt)},qc.prototype.evaluate=function(m,B,K,bt,Ot,Zt){return this._styleExpression.evaluate(m,B,K,bt,Ot,Zt)};var Zu=function(m,B,K,bt){this.kind=m,this.zoomStops=K,this._styleExpression=B,this.isStateDependent=m!=="camera"&&!zu(B.expression),this.interpolationType=bt};Zu.prototype.evaluateWithoutErrorHandling=function(m,B,K,bt,Ot,Zt){return this._styleExpression.evaluateWithoutErrorHandling(m,B,K,bt,Ot,Zt)},Zu.prototype.evaluate=function(m,B,K,bt,Ot,Zt){return this._styleExpression.evaluate(m,B,K,bt,Ot,Zt)},Zu.prototype.interpolationFactor=function(m,B,K){return this.interpolationType?gc.interpolationFactor(this.interpolationType,m,B,K):0};function Zf(m,B){if(m=zs(m,B),m.result==="error")return m;var K=m.value.expression,bt=Xf(K);if(!bt&&!Lu(B))return qu([new il("","data expressions not supported")]);var Ot=jc(K,["zoom"]);if(!Ot&&!uu(B))return qu([new il("","zoom expressions not supported")]);var Zt=ht(K);if(!Zt&&!Ot)return qu([new il("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Zt instanceof il)return qu([Zt]);if(Zt instanceof gc&&!zo(B))return qu([new il("",'"interpolate" expressions cannot be used with this property')]);if(!Zt)return ml(bt?new qc("constant",m.value):new qc("source",m.value));var ie=Zt instanceof gc?Zt.interpolation:void 0;return ml(bt?new Zu("camera",m.value,Zt.labels,ie):new Zu("composite",m.value,Zt.labels,ie))}var qt=function(m,B){this._parameters=m,this._specification=B,Kl(this,vc(this._parameters,this._specification))};qt.deserialize=function(m){return new qt(m._parameters,m._specification)},qt.serialize=function(m){return{_parameters:m._parameters,_specification:m._specification}};function I(m,B){if($l(m))return new qt(m,B);if(es(m)){var K=Zf(m,B);if(K.result==="error")throw new Error(K.value.map(function(Ot){return Ot.key+": "+Ot.message}).join(", "));return K.value}else{var bt=m;return typeof m=="string"&&B.type==="color"&&(bt=Dl.parse(m)),{kind:"constant",evaluate:function(){return bt}}}}function ht(m){var B=null;if(m instanceof Lh)B=ht(m.result);else if(m instanceof eh)for(var K=0,bt=m.args;Kbt.maximum?[new uo(B,K,K+" is greater than the maximum value "+bt.maximum)]:[]}function Ke(m){var B=m.valueSpec,K=Go(m.value.type),bt,Ot={},Zt,ie,De=K!=="categorical"&&m.value.property===void 0,Je=!De,vr=Ms(m.value.stops)==="array"&&Ms(m.value.stops[0])==="array"&&Ms(m.value.stops[0][0])==="object",Sr=Vt({key:m.key,value:m.value,valueSpec:m.styleSpec.function,style:m.style,styleSpec:m.styleSpec,objectElementValidators:{stops:Yr,default:Rn}});return K==="identity"&&De&&Sr.push(new uo(m.key,m.value,'missing required property "property"')),K!=="identity"&&!m.value.stops&&Sr.push(new uo(m.key,m.value,'missing required property "stops"')),K==="exponential"&&m.valueSpec.expression&&!zo(m.valueSpec)&&Sr.push(new uo(m.key,m.value,"exponential functions not supported")),m.styleSpec.$version>=8&&(Je&&!Lu(m.valueSpec)?Sr.push(new uo(m.key,m.value,"property functions not supported")):De&&!uu(m.valueSpec)&&Sr.push(new uo(m.key,m.value,"zoom functions not supported"))),(K==="categorical"||vr)&&m.value.property===void 0&&Sr.push(new uo(m.key,m.value,'"property" property is required')),Sr;function Yr(pi){if(K==="identity")return[new uo(pi.key,pi.value,'identity function may not have a "stops" property')];var la=[],na=pi.value;return la=la.concat(ke({key:pi.key,value:na,valueSpec:pi.valueSpec,style:pi.style,styleSpec:pi.styleSpec,arrayElementValidator:nn})),Ms(na)==="array"&&na.length===0&&la.push(new uo(pi.key,na,"array must have at least one stop")),la}function nn(pi){var la=[],na=pi.value,ba=pi.key;if(Ms(na)!=="array")return[new uo(ba,na,"array expected, "+Ms(na)+" found")];if(na.length!==2)return[new uo(ba,na,"array length 2 expected, length "+na.length+" found")];if(vr){if(Ms(na[0])!=="object")return[new uo(ba,na,"object expected, "+Ms(na[0])+" found")];if(na[0].zoom===void 0)return[new uo(ba,na,"object stop key must have zoom")];if(na[0].value===void 0)return[new uo(ba,na,"object stop key must have value")];if(ie&&ie>Go(na[0].zoom))return[new uo(ba,na[0].zoom,"stop zoom values must appear in ascending order")];Go(na[0].zoom)!==ie&&(ie=Go(na[0].zoom),Zt=void 0,Ot={}),la=la.concat(Vt({key:ba+"[0]",value:na[0],valueSpec:{zoom:{}},style:pi.style,styleSpec:pi.styleSpec,objectElementValidators:{zoom:Oe,value:pn}}))}else la=la.concat(pn({key:ba+"[0]",value:na[0],style:pi.style,styleSpec:pi.styleSpec},na));return es(ql(na[1]))?la.concat([new uo(ba+"[1]",na[1],"expressions are not allowed in function stops.")]):la.concat(vl({key:ba+"[1]",value:na[1],valueSpec:B,style:pi.style,styleSpec:pi.styleSpec}))}function pn(pi,la){var na=Ms(pi.value),ba=Go(pi.value),Fa=pi.value!==null?pi.value:la;if(!bt)bt=na;else if(na!==bt)return[new uo(pi.key,Fa,na+" stop domain type must match previous stop domain type "+bt)];if(na!=="number"&&na!=="string"&&na!=="boolean")return[new uo(pi.key,Fa,"stop domain value must be a number, string, or boolean")];if(na!=="number"&&K!=="categorical"){var ya="number expected, "+na+" found";return Lu(B)&&K===void 0&&(ya+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new uo(pi.key,Fa,ya)]}return K==="categorical"&&na==="number"&&(!isFinite(ba)||Math.floor(ba)!==ba)?[new uo(pi.key,Fa,"integer expected, found "+ba)]:K!=="categorical"&&na==="number"&&Zt!==void 0&&ba=2&&m[1]!=="$id"&&m[1]!=="$type";case"in":return m.length>=3&&(typeof m[1]!="string"||Array.isArray(m[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return m.length!==3||Array.isArray(m[1])||Array.isArray(m[2]);case"any":case"all":for(var B=0,K=m.slice(1);BB?1:0}function Ae(m){if(!Array.isArray(m))return!1;if(m[0]==="within")return!0;for(var B=1;B"||B==="<="||B===">="?Ie(m[1],m[2],B):B==="any"?Ze(m.slice(1)):B==="all"?["all"].concat(m.slice(1).map(je)):B==="none"?["all"].concat(m.slice(1).map(je).map(Nr)):B==="in"?wr(m[1],m.slice(2)):B==="!in"?Nr(wr(m[1],m.slice(2))):B==="has"?Ir(m[1]):B==="!has"?Nr(Ir(m[1])):B==="within"?m:!0;return K}function Ie(m,B,K){switch(m){case"$type":return["filter-type-"+K,B];case"$id":return["filter-id-"+K,B];default:return["filter-"+K,m,B]}}function Ze(m){return["any"].concat(m.map(je))}function wr(m,B){if(B.length===0)return!1;switch(m){case"$type":return["filter-type-in",["literal",B]];case"$id":return["filter-id-in",["literal",B]];default:return B.length>200&&!B.some(function(K){return typeof K!=typeof B[0]})?["filter-in-large",m,["literal",B.sort(xe)]]:["filter-in-small",m,["literal",B]]}}function Ir(m){switch(m){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",m]}}function Nr(m){return["!",m]}function tn(m){return Sn(ql(m.value))?gr(Kl({},m,{expressionContext:"filter",valueSpec:{value:"boolean"}})):mn(m)}function mn(m){var B=m.value,K=m.key;if(Ms(B)!=="array")return[new uo(K,B,"array expected, "+Ms(B)+" found")];var bt=m.styleSpec,Ot,Zt=[];if(B.length<1)return[new uo(K,B,"filter array must have at least 1 element")];switch(Zt=Zt.concat(ln({key:K+"[0]",value:B[0],valueSpec:bt.filter_operator,style:m.style,styleSpec:m.styleSpec})),Go(B[0])){case"<":case"<=":case">":case">=":B.length>=2&&Go(B[1])==="$type"&&Zt.push(new uo(K,B,'"$type" cannot be use with operator "'+B[0]+'"'));case"==":case"!=":B.length!==3&&Zt.push(new uo(K,B,'filter array for operator "'+B[0]+'" must have 3 elements'));case"in":case"!in":B.length>=2&&(Ot=Ms(B[1]),Ot!=="string"&&Zt.push(new uo(K+"[1]",B[1],"string expected, "+Ot+" found")));for(var ie=2;ie=Sr[pn+0]&&bt>=Sr[pn+1])?(ie[nn]=!0,Zt.push(vr[nn])):ie[nn]=!1}}},ue.prototype._forEachCell=function(m,B,K,bt,Ot,Zt,ie,De){for(var Je=this._convertToCellCoord(m),vr=this._convertToCellCoord(B),Sr=this._convertToCellCoord(K),Yr=this._convertToCellCoord(bt),nn=Je;nn<=Sr;nn++)for(var pn=vr;pn<=Yr;pn++){var Rn=this.d*pn+nn;if(!(De&&!De(this._convertFromCellCoord(nn),this._convertFromCellCoord(pn),this._convertFromCellCoord(nn+1),this._convertFromCellCoord(pn+1)))&&Ot.call(this,m,B,K,bt,Rn,Zt,ie,De))return}},ue.prototype._convertFromCellCoord=function(m){return(m-this.padding)/this.scale},ue.prototype._convertToCellCoord=function(m){return Math.max(0,Math.min(this.d-1,Math.floor(m*this.scale)+this.padding))},ue.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var m=this.cells,B=jt+this.cells.length+1+1,K=0,bt=0;bt=0)){var Yr=m[Sr];vr[Sr]=Be[Je].shallow.indexOf(Sr)>=0?Yr:Xr(Yr,B)}m instanceof Error&&(vr.message=m.message)}if(vr.$name)throw new Error("$name property is reserved for worker serialization logic.");return Je!=="Object"&&(vr.$name=Je),vr}throw new Error("can't serialize object of type "+typeof m)}function vn(m){if(m==null||typeof m=="boolean"||typeof m=="number"||typeof m=="string"||m instanceof Boolean||m instanceof Number||m instanceof String||m instanceof Date||m instanceof RegExp||Mr(m)||en(m)||ArrayBuffer.isView(m)||m instanceof Me)return m;if(Array.isArray(m))return m.map(vn);if(typeof m=="object"){var B=m.$name||"Object",K=Be[B],bt=K.klass;if(!bt)throw new Error("can't deserialize unregistered class "+B);if(bt.deserialize)return bt.deserialize(m);for(var Ot=Object.create(bt.prototype),Zt=0,ie=Object.keys(m);Zt=0?Je:vn(Je)}}return Ot}throw new Error("can't deserialize object of type "+typeof m)}var In=function(){this.first=!0};In.prototype.update=function(m,B){var K=Math.floor(m);return this.first?(this.first=!1,this.lastIntegerZoom=K,this.lastIntegerZoomTime=0,this.lastZoom=m,this.lastFloorZoom=K,!0):(this.lastFloorZoom>K?(this.lastIntegerZoom=K+1,this.lastIntegerZoomTime=B):this.lastFloorZoom=128&&m<=255},Arabic:function(m){return m>=1536&&m<=1791},"Arabic Supplement":function(m){return m>=1872&&m<=1919},"Arabic Extended-A":function(m){return m>=2208&&m<=2303},"Hangul Jamo":function(m){return m>=4352&&m<=4607},"Unified Canadian Aboriginal Syllabics":function(m){return m>=5120&&m<=5759},Khmer:function(m){return m>=6016&&m<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(m){return m>=6320&&m<=6399},"General Punctuation":function(m){return m>=8192&&m<=8303},"Letterlike Symbols":function(m){return m>=8448&&m<=8527},"Number Forms":function(m){return m>=8528&&m<=8591},"Miscellaneous Technical":function(m){return m>=8960&&m<=9215},"Control Pictures":function(m){return m>=9216&&m<=9279},"Optical Character Recognition":function(m){return m>=9280&&m<=9311},"Enclosed Alphanumerics":function(m){return m>=9312&&m<=9471},"Geometric Shapes":function(m){return m>=9632&&m<=9727},"Miscellaneous Symbols":function(m){return m>=9728&&m<=9983},"Miscellaneous Symbols and Arrows":function(m){return m>=11008&&m<=11263},"CJK Radicals Supplement":function(m){return m>=11904&&m<=12031},"Kangxi Radicals":function(m){return m>=12032&&m<=12255},"Ideographic Description Characters":function(m){return m>=12272&&m<=12287},"CJK Symbols and Punctuation":function(m){return m>=12288&&m<=12351},Hiragana:function(m){return m>=12352&&m<=12447},Katakana:function(m){return m>=12448&&m<=12543},Bopomofo:function(m){return m>=12544&&m<=12591},"Hangul Compatibility Jamo":function(m){return m>=12592&&m<=12687},Kanbun:function(m){return m>=12688&&m<=12703},"Bopomofo Extended":function(m){return m>=12704&&m<=12735},"CJK Strokes":function(m){return m>=12736&&m<=12783},"Katakana Phonetic Extensions":function(m){return m>=12784&&m<=12799},"Enclosed CJK Letters and Months":function(m){return m>=12800&&m<=13055},"CJK Compatibility":function(m){return m>=13056&&m<=13311},"CJK Unified Ideographs Extension A":function(m){return m>=13312&&m<=19903},"Yijing Hexagram Symbols":function(m){return m>=19904&&m<=19967},"CJK Unified Ideographs":function(m){return m>=19968&&m<=40959},"Yi Syllables":function(m){return m>=40960&&m<=42127},"Yi Radicals":function(m){return m>=42128&&m<=42191},"Hangul Jamo Extended-A":function(m){return m>=43360&&m<=43391},"Hangul Syllables":function(m){return m>=44032&&m<=55215},"Hangul Jamo Extended-B":function(m){return m>=55216&&m<=55295},"Private Use Area":function(m){return m>=57344&&m<=63743},"CJK Compatibility Ideographs":function(m){return m>=63744&&m<=64255},"Arabic Presentation Forms-A":function(m){return m>=64336&&m<=65023},"Vertical Forms":function(m){return m>=65040&&m<=65055},"CJK Compatibility Forms":function(m){return m>=65072&&m<=65103},"Small Form Variants":function(m){return m>=65104&&m<=65135},"Arabic Presentation Forms-B":function(m){return m>=65136&&m<=65279},"Halfwidth and Fullwidth Forms":function(m){return m>=65280&&m<=65519}};function Bi(m){for(var B=0,K=m;B=65097&&m<=65103)||On["CJK Compatibility Ideographs"](m)||On["CJK Compatibility"](m)||On["CJK Radicals Supplement"](m)||On["CJK Strokes"](m)||On["CJK Symbols and Punctuation"](m)&&!(m>=12296&&m<=12305)&&!(m>=12308&&m<=12319)&&m!==12336||On["CJK Unified Ideographs Extension A"](m)||On["CJK Unified Ideographs"](m)||On["Enclosed CJK Letters and Months"](m)||On["Hangul Compatibility Jamo"](m)||On["Hangul Jamo Extended-A"](m)||On["Hangul Jamo Extended-B"](m)||On["Hangul Jamo"](m)||On["Hangul Syllables"](m)||On.Hiragana(m)||On["Ideographic Description Characters"](m)||On.Kanbun(m)||On["Kangxi Radicals"](m)||On["Katakana Phonetic Extensions"](m)||On.Katakana(m)&&m!==12540||On["Halfwidth and Fullwidth Forms"](m)&&m!==65288&&m!==65289&&m!==65293&&!(m>=65306&&m<=65310)&&m!==65339&&m!==65341&&m!==65343&&!(m>=65371&&m<=65503)&&m!==65507&&!(m>=65512&&m<=65519)||On["Small Form Variants"](m)&&!(m>=65112&&m<=65118)&&!(m>=65123&&m<=65126)||On["Unified Canadian Aboriginal Syllabics"](m)||On["Unified Canadian Aboriginal Syllabics Extended"](m)||On["Vertical Forms"](m)||On["Yijing Hexagram Symbols"](m)||On["Yi Syllables"](m)||On["Yi Radicals"](m))}function Wi(m){return!!(On["Latin-1 Supplement"](m)&&(m===167||m===169||m===174||m===177||m===188||m===189||m===190||m===215||m===247)||On["General Punctuation"](m)&&(m===8214||m===8224||m===8225||m===8240||m===8241||m===8251||m===8252||m===8258||m===8263||m===8264||m===8265||m===8273)||On["Letterlike Symbols"](m)||On["Number Forms"](m)||On["Miscellaneous Technical"](m)&&(m>=8960&&m<=8967||m>=8972&&m<=8991||m>=8996&&m<=9e3||m===9003||m>=9085&&m<=9114||m>=9150&&m<=9165||m===9167||m>=9169&&m<=9179||m>=9186&&m<=9215)||On["Control Pictures"](m)&&m!==9251||On["Optical Character Recognition"](m)||On["Enclosed Alphanumerics"](m)||On["Geometric Shapes"](m)||On["Miscellaneous Symbols"](m)&&!(m>=9754&&m<=9759)||On["Miscellaneous Symbols and Arrows"](m)&&(m>=11026&&m<=11055||m>=11088&&m<=11097||m>=11192&&m<=11243)||On["CJK Symbols and Punctuation"](m)||On.Katakana(m)||On["Private Use Area"](m)||On["CJK Compatibility Forms"](m)||On["Small Form Variants"](m)||On["Halfwidth and Fullwidth Forms"](m)||m===8734||m===8756||m===8757||m>=9984&&m<=10087||m>=10102&&m<=10131||m===65532||m===65533)}function Yn(m){return!(Ii(m)||Wi(m))}function ja(m){return On.Arabic(m)||On["Arabic Supplement"](m)||On["Arabic Extended-A"](m)||On["Arabic Presentation Forms-A"](m)||On["Arabic Presentation Forms-B"](m)}function Ha(m){return m>=1424&&m<=2303||On["Arabic Presentation Forms-A"](m)||On["Arabic Presentation Forms-B"](m)}function ro(m,B){return!(!B&&Ha(m)||m>=2304&&m<=3583||m>=3840&&m<=4255||On.Khmer(m))}function Lo(m){for(var B=0,K=m;B-1&&(Wo=Uo.error),al&&al(m)};function Ku(){cu.fire(new qr("pluginStateChange",{pluginStatus:Wo,pluginURL:ps}))}var cu=new Br,_o=function(){return Wo},Zs=function(m){return m({pluginStatus:Wo,pluginURL:ps}),cu.on("pluginStateChange",m),m},rl=function(m,B,K){if(K===void 0&&(K=!1),Wo===Uo.deferred||Wo===Uo.loading||Wo===Uo.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");ps=zt.resolveURL(m),Wo=Uo.deferred,al=B,Ku(),K||ou()},ou=function(){if(Wo!==Uo.deferred||!ps)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Wo=Uo.loading,Ku(),ps&&wn({url:ps},function(m){m?Tl(m):(Wo=Uo.loaded,Ku())})},Gl={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Wo===Uo.loaded||Gl.applyArabicShaping!=null},isLoading:function(){return Wo===Uo.loading},setState:function(m){Wo=m.pluginStatus,ps=m.pluginURL},isParsed:function(){return Gl.applyArabicShaping!=null&&Gl.processBidirectionalText!=null&&Gl.processStyledBidirectionalText!=null},getPluginURL:function(){return ps}},rh=function(){!Gl.isLoading()&&!Gl.isLoaded()&&_o()==="deferred"&&ou()},Bl=function(m,B){this.zoom=m,B?(this.now=B.now,this.fadeDuration=B.fadeDuration,this.zoomHistory=B.zoomHistory,this.transition=B.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new In,this.transition={})};Bl.prototype.isSupportedScript=function(m){return Fo(m,Gl.isLoaded())},Bl.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Bl.prototype.getCrossfadeParameters=function(){var m=this.zoom,B=m-Math.floor(m),K=this.crossFadingFactor();return m>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:B+(1-B)*K}:{fromScale:.5,toScale:1,t:1-(1-K)*B}};var Ql=function(m,B){this.property=m,this.value=B,this.expression=I(B===void 0?m.specification.default:B,m.specification)};Ql.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Ql.prototype.possiblyEvaluate=function(m,B,K){return this.property.possiblyEvaluate(this,m,B,K)};var bh=function(m){this.property=m,this.value=new Ql(m,void 0)};bh.prototype.transitioned=function(m,B){return new kr(this.property,this.value,B,E({},m.transition,this.transition),m.now)},bh.prototype.untransitioned=function(){return new kr(this.property,this.value,null,{},0)};var _e=function(m){this._properties=m,this._values=Object.create(m.defaultTransitionablePropertyValues)};_e.prototype.getValue=function(m){return F(this._values[m].value.value)},_e.prototype.setValue=function(m,B){this._values.hasOwnProperty(m)||(this._values[m]=new bh(this._values[m].property)),this._values[m].value=new Ql(this._values[m].property,B===null?void 0:F(B))},_e.prototype.getTransition=function(m){return F(this._values[m].transition)},_e.prototype.setTransition=function(m,B){this._values.hasOwnProperty(m)||(this._values[m]=new bh(this._values[m].property)),this._values[m].transition=F(B)||void 0},_e.prototype.serialize=function(){for(var m={},B=0,K=Object.keys(this._values);Bthis.end)return this.prior=null,Ot;if(this.value.isDataDriven())return this.prior=null,Ot;if(btZt.zoomHistory.lastIntegerZoom?{from:K,to:bt}:{from:Ot,to:bt}},B.prototype.interpolate=function(K){return K},B}(ni),Ui=function(m){this.specification=m};Ui.prototype.possiblyEvaluate=function(m,B,K,bt){if(m.value!==void 0)if(m.expression.kind==="constant"){var Ot=m.expression.evaluate(B,null,{},K,bt);return this._calculate(Ot,Ot,Ot,B)}else return this._calculate(m.expression.evaluate(new Bl(Math.floor(B.zoom-1),B)),m.expression.evaluate(new Bl(Math.floor(B.zoom),B)),m.expression.evaluate(new Bl(Math.floor(B.zoom+1),B)),B)},Ui.prototype._calculate=function(m,B,K,bt){var Ot=bt.zoom;return Ot>bt.zoomHistory.lastIntegerZoom?{from:m,to:B}:{from:K,to:B}},Ui.prototype.interpolate=function(m){return m};var va=function(m){this.specification=m};va.prototype.possiblyEvaluate=function(m,B,K,bt){return!!m.expression.evaluate(B,null,{},K,bt)},va.prototype.interpolate=function(){return!1};var Za=function(m){this.properties=m,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var B in m){var K=m[B];K.specification.overridable&&this.overridableProperties.push(B);var bt=this.defaultPropertyValues[B]=new Ql(K,void 0),Ot=this.defaultTransitionablePropertyValues[B]=new bh(K);this.defaultTransitioningPropertyValues[B]=Ot.untransitioned(),this.defaultPossiblyEvaluatedValues[B]=bt.possiblyEvaluate({})}};sr("DataDrivenProperty",ni),sr("DataConstantProperty",gn),sr("CrossFadedDataDrivenProperty",Yi),sr("CrossFadedProperty",Ui),sr("ColorRampProperty",va);var Ba="-transition",ta=function(m){function B(K,bt){if(m.call(this),this.id=K.id,this.type=K.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},K.type!=="custom"&&(K=K,this.metadata=K.metadata,this.minzoom=K.minzoom,this.maxzoom=K.maxzoom,K.type!=="background"&&(this.source=K.source,this.sourceLayer=K["source-layer"],this.filter=K.filter),bt.layout&&(this._unevaluatedLayout=new Dn(bt.layout)),bt.paint)){this._transitionablePaint=new _e(bt.paint);for(var Ot in K.paint)this.setPaintProperty(Ot,K.paint[Ot],{validate:!1});for(var Zt in K.layout)this.setLayoutProperty(Zt,K.layout[Zt],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Jn(bt.paint)}}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},B.prototype.getLayoutProperty=function(K){return K==="visibility"?this.visibility:this._unevaluatedLayout.getValue(K)},B.prototype.setLayoutProperty=function(K,bt,Ot){if(Ot===void 0&&(Ot={}),bt!=null){var Zt="layers."+this.id+".layout."+K;if(this._validate(dc,Zt,K,bt,Ot))return}if(K==="visibility"){this.visibility=bt;return}this._unevaluatedLayout.setValue(K,bt)},B.prototype.getPaintProperty=function(K){return N(K,Ba)?this._transitionablePaint.getTransition(K.slice(0,-Ba.length)):this._transitionablePaint.getValue(K)},B.prototype.setPaintProperty=function(K,bt,Ot){if(Ot===void 0&&(Ot={}),bt!=null){var Zt="layers."+this.id+".paint."+K;if(this._validate(Yu,Zt,K,bt,Ot))return!1}if(N(K,Ba))return this._transitionablePaint.setTransition(K.slice(0,-Ba.length),bt||void 0),!1;var ie=this._transitionablePaint._values[K],De=ie.property.specification["property-type"]==="cross-faded-data-driven",Je=ie.value.isDataDriven(),vr=ie.value;this._transitionablePaint.setValue(K,bt),this._handleSpecialPaintPropertyUpdate(K);var Sr=this._transitionablePaint._values[K].value,Yr=Sr.isDataDriven();return Yr||Je||De||this._handleOverridablePaintPropertyUpdate(K,vr,Sr)},B.prototype._handleSpecialPaintPropertyUpdate=function(K){},B.prototype._handleOverridablePaintPropertyUpdate=function(K,bt,Ot){return!1},B.prototype.isHidden=function(K){return this.minzoom&&K=this.maxzoom?!0:this.visibility==="none"},B.prototype.updateTransitions=function(K){this._transitioningPaint=this._transitionablePaint.transitioned(K,this._transitioningPaint)},B.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},B.prototype.recalculate=function(K,bt){K.getCrossfadeParameters&&(this._crossfadeParameters=K.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(K,void 0,bt)),this.paint=this._transitioningPaint.possiblyEvaluate(K,void 0,bt)},B.prototype.serialize=function(){var K={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(K.layout=K.layout||{},K.layout.visibility=this.visibility),H(K,function(bt,Ot){return bt!==void 0&&!(Ot==="layout"&&!Object.keys(bt).length)&&!(Ot==="paint"&&!Object.keys(bt).length)})},B.prototype._validate=function(K,bt,Ot,Zt,ie){return ie===void 0&&(ie={}),ie&&ie.validate===!1?!1:Zc(this,K.call(Ws,{key:bt,layerType:this.type,objectKey:Ot,value:Zt,styleSpec:La,style:{glyphs:!0,sprite:!0}}))},B.prototype.is3D=function(){return!1},B.prototype.isTileClipped=function(){return!1},B.prototype.hasOffscreenPass=function(){return!1},B.prototype.resize=function(){},B.prototype.isStateDependent=function(){for(var K in this.paint._values){var bt=this.paint.get(K);if(!(!(bt instanceof oi)||!Lu(bt.property.specification))&&(bt.value.kind==="source"||bt.value.kind==="composite")&&bt.value.isStateDependent)return!0}return!1},B}(Br),wi={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},hn=function(m,B){this._structArray=m,this._pos1=B*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Nn=128,Oi=5,_i=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};_i.serialize=function(m,B){return m._trim(),B&&(m.isTransferred=!0,B.push(m.arrayBuffer)),{length:m.length,arrayBuffer:m.arrayBuffer}},_i.deserialize=function(m){var B=Object.create(this.prototype);return B.arrayBuffer=m.arrayBuffer,B.length=m.length,B.capacity=m.arrayBuffer.byteLength/B.bytesPerElement,B._refreshViews(),B},_i.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},_i.prototype.clear=function(){this.length=0},_i.prototype.resize=function(m){this.reserve(m),this.length=m},_i.prototype.reserve=function(m){if(m>this.capacity){this.capacity=Math.max(m,Math.floor(this.capacity*Oi),Nn),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var B=this.uint8;this._refreshViews(),B&&this.uint8.set(B)}},_i.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function Qn(m,B){B===void 0&&(B=1);var K=0,bt=0,Ot=m.map(function(ie){var De=Ma(ie.type),Je=K=ca(K,Math.max(B,De)),vr=ie.components||1;return bt=Math.max(bt,De),K+=De*vr,{name:ie.name,type:ie.type,components:vr,offset:Je}}),Zt=ca(K,Math.max(bt,B));return{members:Ot,size:Zt,alignment:B}}function Ma(m){return wi[m].BYTES_PER_ELEMENT}function ca(m,B){return Math.ceil(m/B)*B}var Ua=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt){var Ot=this.length;return this.resize(Ot+1),this.emplace(Ot,K,bt)},B.prototype.emplace=function(K,bt,Ot){var Zt=K*2;return this.int16[Zt+0]=bt,this.int16[Zt+1]=Ot,K},B}(_i);Ua.prototype.bytesPerElement=4,sr("StructArrayLayout2i4",Ua);var vi=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt){var ie=this.length;return this.resize(ie+1),this.emplace(ie,K,bt,Ot,Zt)},B.prototype.emplace=function(K,bt,Ot,Zt,ie){var De=K*4;return this.int16[De+0]=bt,this.int16[De+1]=Ot,this.int16[De+2]=Zt,this.int16[De+3]=ie,K},B}(_i);vi.prototype.bytesPerElement=8,sr("StructArrayLayout4i8",vi);var ti=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt,ie,De){var Je=this.length;return this.resize(Je+1),this.emplace(Je,K,bt,Ot,Zt,ie,De)},B.prototype.emplace=function(K,bt,Ot,Zt,ie,De,Je){var vr=K*6;return this.int16[vr+0]=bt,this.int16[vr+1]=Ot,this.int16[vr+2]=Zt,this.int16[vr+3]=ie,this.int16[vr+4]=De,this.int16[vr+5]=Je,K},B}(_i);ti.prototype.bytesPerElement=12,sr("StructArrayLayout2i4i12",ti);var Sa=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt,ie,De){var Je=this.length;return this.resize(Je+1),this.emplace(Je,K,bt,Ot,Zt,ie,De)},B.prototype.emplace=function(K,bt,Ot,Zt,ie,De,Je){var vr=K*4,Sr=K*8;return this.int16[vr+0]=bt,this.int16[vr+1]=Ot,this.uint8[Sr+4]=Zt,this.uint8[Sr+5]=ie,this.uint8[Sr+6]=De,this.uint8[Sr+7]=Je,K},B}(_i);Sa.prototype.bytesPerElement=8,sr("StructArrayLayout2i4ub8",Sa);var pa=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt){var Ot=this.length;return this.resize(Ot+1),this.emplace(Ot,K,bt)},B.prototype.emplace=function(K,bt,Ot){var Zt=K*2;return this.float32[Zt+0]=bt,this.float32[Zt+1]=Ot,K},B}(_i);pa.prototype.bytesPerElement=8,sr("StructArrayLayout2f8",pa);var qi=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt,ie,De,Je,vr,Sr,Yr){var nn=this.length;return this.resize(nn+1),this.emplace(nn,K,bt,Ot,Zt,ie,De,Je,vr,Sr,Yr)},B.prototype.emplace=function(K,bt,Ot,Zt,ie,De,Je,vr,Sr,Yr,nn){var pn=K*10;return this.uint16[pn+0]=bt,this.uint16[pn+1]=Ot,this.uint16[pn+2]=Zt,this.uint16[pn+3]=ie,this.uint16[pn+4]=De,this.uint16[pn+5]=Je,this.uint16[pn+6]=vr,this.uint16[pn+7]=Sr,this.uint16[pn+8]=Yr,this.uint16[pn+9]=nn,K},B}(_i);qi.prototype.bytesPerElement=20,sr("StructArrayLayout10ui20",qi);var $i=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt,ie,De,Je,vr,Sr,Yr,nn,pn){var Rn=this.length;return this.resize(Rn+1),this.emplace(Rn,K,bt,Ot,Zt,ie,De,Je,vr,Sr,Yr,nn,pn)},B.prototype.emplace=function(K,bt,Ot,Zt,ie,De,Je,vr,Sr,Yr,nn,pn,Rn){var pi=K*12;return this.int16[pi+0]=bt,this.int16[pi+1]=Ot,this.int16[pi+2]=Zt,this.int16[pi+3]=ie,this.uint16[pi+4]=De,this.uint16[pi+5]=Je,this.uint16[pi+6]=vr,this.uint16[pi+7]=Sr,this.int16[pi+8]=Yr,this.int16[pi+9]=nn,this.int16[pi+10]=pn,this.int16[pi+11]=Rn,K},B}(_i);$i.prototype.bytesPerElement=24,sr("StructArrayLayout4i4ui4i24",$i);var _a=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,K,bt,Ot)},B.prototype.emplace=function(K,bt,Ot,Zt){var ie=K*3;return this.float32[ie+0]=bt,this.float32[ie+1]=Ot,this.float32[ie+2]=Zt,K},B}(_i);_a.prototype.bytesPerElement=12,sr("StructArrayLayout3f12",_a);var Po=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K){var bt=this.length;return this.resize(bt+1),this.emplace(bt,K)},B.prototype.emplace=function(K,bt){var Ot=K*1;return this.uint32[Ot+0]=bt,K},B}(_i);Po.prototype.bytesPerElement=4,sr("StructArrayLayout1ul4",Po);var wo=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt,ie,De,Je,vr,Sr){var Yr=this.length;return this.resize(Yr+1),this.emplace(Yr,K,bt,Ot,Zt,ie,De,Je,vr,Sr)},B.prototype.emplace=function(K,bt,Ot,Zt,ie,De,Je,vr,Sr,Yr){var nn=K*10,pn=K*5;return this.int16[nn+0]=bt,this.int16[nn+1]=Ot,this.int16[nn+2]=Zt,this.int16[nn+3]=ie,this.int16[nn+4]=De,this.int16[nn+5]=Je,this.uint32[pn+3]=vr,this.uint16[nn+8]=Sr,this.uint16[nn+9]=Yr,K},B}(_i);wo.prototype.bytesPerElement=20,sr("StructArrayLayout6i1ul2ui20",wo);var xa=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt,ie,De){var Je=this.length;return this.resize(Je+1),this.emplace(Je,K,bt,Ot,Zt,ie,De)},B.prototype.emplace=function(K,bt,Ot,Zt,ie,De,Je){var vr=K*6;return this.int16[vr+0]=bt,this.int16[vr+1]=Ot,this.int16[vr+2]=Zt,this.int16[vr+3]=ie,this.int16[vr+4]=De,this.int16[vr+5]=Je,K},B}(_i);xa.prototype.bytesPerElement=12,sr("StructArrayLayout2i2i2i12",xa);var Oa=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt,ie){var De=this.length;return this.resize(De+1),this.emplace(De,K,bt,Ot,Zt,ie)},B.prototype.emplace=function(K,bt,Ot,Zt,ie,De){var Je=K*4,vr=K*8;return this.float32[Je+0]=bt,this.float32[Je+1]=Ot,this.float32[Je+2]=Zt,this.int16[vr+6]=ie,this.int16[vr+7]=De,K},B}(_i);Oa.prototype.bytesPerElement=16,sr("StructArrayLayout2f1f2i16",Oa);var ho=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt){var ie=this.length;return this.resize(ie+1),this.emplace(ie,K,bt,Ot,Zt)},B.prototype.emplace=function(K,bt,Ot,Zt,ie){var De=K*12,Je=K*3;return this.uint8[De+0]=bt,this.uint8[De+1]=Ot,this.float32[Je+1]=Zt,this.float32[Je+2]=ie,K},B}(_i);ho.prototype.bytesPerElement=12,sr("StructArrayLayout2ub2f12",ho);var So=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,K,bt,Ot)},B.prototype.emplace=function(K,bt,Ot,Zt){var ie=K*3;return this.uint16[ie+0]=bt,this.uint16[ie+1]=Ot,this.uint16[ie+2]=Zt,K},B}(_i);So.prototype.bytesPerElement=6,sr("StructArrayLayout3ui6",So);var ts=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt,ie,De,Je,vr,Sr,Yr,nn,pn,Rn,pi,la,na,ba){var Fa=this.length;return this.resize(Fa+1),this.emplace(Fa,K,bt,Ot,Zt,ie,De,Je,vr,Sr,Yr,nn,pn,Rn,pi,la,na,ba)},B.prototype.emplace=function(K,bt,Ot,Zt,ie,De,Je,vr,Sr,Yr,nn,pn,Rn,pi,la,na,ba,Fa){var ya=K*24,Ka=K*12,bo=K*48;return this.int16[ya+0]=bt,this.int16[ya+1]=Ot,this.uint16[ya+2]=Zt,this.uint16[ya+3]=ie,this.uint32[Ka+2]=De,this.uint32[Ka+3]=Je,this.uint32[Ka+4]=vr,this.uint16[ya+10]=Sr,this.uint16[ya+11]=Yr,this.uint16[ya+12]=nn,this.float32[Ka+7]=pn,this.float32[Ka+8]=Rn,this.uint8[bo+36]=pi,this.uint8[bo+37]=la,this.uint8[bo+38]=na,this.uint32[Ka+10]=ba,this.int16[ya+22]=Fa,K},B}(_i);ts.prototype.bytesPerElement=48,sr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ts);var Nl=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt,ie,De,Je,vr,Sr,Yr,nn,pn,Rn,pi,la,na,ba,Fa,ya,Ka,bo,No,jo,xs,_s,Fs,$s,sl){var Rs=this.length;return this.resize(Rs+1),this.emplace(Rs,K,bt,Ot,Zt,ie,De,Je,vr,Sr,Yr,nn,pn,Rn,pi,la,na,ba,Fa,ya,Ka,bo,No,jo,xs,_s,Fs,$s,sl)},B.prototype.emplace=function(K,bt,Ot,Zt,ie,De,Je,vr,Sr,Yr,nn,pn,Rn,pi,la,na,ba,Fa,ya,Ka,bo,No,jo,xs,_s,Fs,$s,sl,Rs){var Us=K*34,Bu=K*17;return this.int16[Us+0]=bt,this.int16[Us+1]=Ot,this.int16[Us+2]=Zt,this.int16[Us+3]=ie,this.int16[Us+4]=De,this.int16[Us+5]=Je,this.int16[Us+6]=vr,this.int16[Us+7]=Sr,this.uint16[Us+8]=Yr,this.uint16[Us+9]=nn,this.uint16[Us+10]=pn,this.uint16[Us+11]=Rn,this.uint16[Us+12]=pi,this.uint16[Us+13]=la,this.uint16[Us+14]=na,this.uint16[Us+15]=ba,this.uint16[Us+16]=Fa,this.uint16[Us+17]=ya,this.uint16[Us+18]=Ka,this.uint16[Us+19]=bo,this.uint16[Us+20]=No,this.uint16[Us+21]=jo,this.uint16[Us+22]=xs,this.uint32[Bu+12]=_s,this.float32[Bu+13]=Fs,this.float32[Bu+14]=$s,this.float32[Bu+15]=sl,this.float32[Bu+16]=Rs,K},B}(_i);Nl.prototype.bytesPerElement=68,sr("StructArrayLayout8i15ui1ul4f68",Nl);var Al=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K){var bt=this.length;return this.resize(bt+1),this.emplace(bt,K)},B.prototype.emplace=function(K,bt){var Ot=K*1;return this.float32[Ot+0]=bt,K},B}(_i);Al.prototype.bytesPerElement=4,sr("StructArrayLayout1f4",Al);var us=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,K,bt,Ot)},B.prototype.emplace=function(K,bt,Ot,Zt){var ie=K*3;return this.int16[ie+0]=bt,this.int16[ie+1]=Ot,this.int16[ie+2]=Zt,K},B}(_i);us.prototype.bytesPerElement=6,sr("StructArrayLayout3i6",us);var wu=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,K,bt,Ot)},B.prototype.emplace=function(K,bt,Ot,Zt){var ie=K*2,De=K*4;return this.uint32[ie+0]=bt,this.uint16[De+2]=Ot,this.uint16[De+3]=Zt,K},B}(_i);wu.prototype.bytesPerElement=8,sr("StructArrayLayout1ul2ui8",wu);var fl=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt){var Ot=this.length;return this.resize(Ot+1),this.emplace(Ot,K,bt)},B.prototype.emplace=function(K,bt,Ot){var Zt=K*2;return this.uint16[Zt+0]=bt,this.uint16[Zt+1]=Ot,K},B}(_i);fl.prototype.bytesPerElement=4,sr("StructArrayLayout2ui4",fl);var Eu=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K){var bt=this.length;return this.resize(bt+1),this.emplace(bt,K)},B.prototype.emplace=function(K,bt){var Ot=K*1;return this.uint16[Ot+0]=bt,K},B}(_i);Eu.prototype.bytesPerElement=2,sr("StructArrayLayout1ui2",Eu);var pc=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt){var ie=this.length;return this.resize(ie+1),this.emplace(ie,K,bt,Ot,Zt)},B.prototype.emplace=function(K,bt,Ot,Zt,ie){var De=K*4;return this.float32[De+0]=bt,this.float32[De+1]=Ot,this.float32[De+2]=Zt,this.float32[De+3]=ie,K},B}(_i);pc.prototype.bytesPerElement=16,sr("StructArrayLayout4f16",pc);var yc=function(m){function B(){m.apply(this,arguments)}m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B;var K={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return K.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},K.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},K.x1.get=function(){return this._structArray.int16[this._pos2+2]},K.y1.get=function(){return this._structArray.int16[this._pos2+3]},K.x2.get=function(){return this._structArray.int16[this._pos2+4]},K.y2.get=function(){return this._structArray.int16[this._pos2+5]},K.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},K.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},K.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},K.anchorPoint.get=function(){return new o(this.anchorPointX,this.anchorPointY)},Object.defineProperties(B.prototype,K),B}(hn);yc.prototype.size=20;var yu=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.get=function(K){return new yc(this,K)},B}(wo);sr("CollisionBoxArray",yu);var hu=function(m){function B(){m.apply(this,arguments)}m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B;var K={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return K.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},K.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},K.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},K.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},K.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},K.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},K.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},K.segment.get=function(){return this._structArray.uint16[this._pos2+10]},K.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},K.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},K.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},K.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},K.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},K.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},K.placedOrientation.set=function(bt){this._structArray.uint8[this._pos1+37]=bt},K.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},K.hidden.set=function(bt){this._structArray.uint8[this._pos1+38]=bt},K.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},K.crossTileID.set=function(bt){this._structArray.uint32[this._pos4+10]=bt},K.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(B.prototype,K),B}(hn);hu.prototype.size=48;var ku=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.get=function(K){return new hu(this,K)},B}(ts);sr("PlacedSymbolArray",ku);var Bo=function(m){function B(){m.apply(this,arguments)}m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B;var K={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return K.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},K.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},K.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},K.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},K.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},K.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},K.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},K.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},K.key.get=function(){return this._structArray.uint16[this._pos2+8]},K.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},K.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},K.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},K.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},K.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},K.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},K.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},K.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},K.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},K.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},K.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},K.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},K.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},K.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},K.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},K.crossTileID.set=function(bt){this._structArray.uint32[this._pos4+12]=bt},K.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},K.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},K.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},K.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(B.prototype,K),B}(hn);Bo.prototype.size=68;var Tu=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.get=function(K){return new Bo(this,K)},B}(Nl);sr("SymbolInstanceArray",Tu);var ol=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.getoffsetX=function(K){return this.float32[K*1+0]},B}(Al);sr("GlyphOffsetArray",ol);var Cu=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.getx=function(K){return this.int16[K*3+0]},B.prototype.gety=function(K){return this.int16[K*3+1]},B.prototype.gettileUnitDistanceFromAnchor=function(K){return this.int16[K*3+2]},B}(us);sr("SymbolLineVertexArray",Cu);var xc=function(m){function B(){m.apply(this,arguments)}m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B;var K={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return K.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},K.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},K.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(B.prototype,K),B}(hn);xc.prototype.size=8;var Eo=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.get=function(K){return new xc(this,K)},B}(wu);sr("FeatureIndexArray",Eo);var Ss=Qn([{name:"a_pos",components:2,type:"Int16"}],4),Ml=Ss.members,yl=function(m){m===void 0&&(m=[]),this.segments=m};yl.prototype.prepareSegment=function(m,B,K,bt){var Ot=this.segments[this.segments.length-1];return m>yl.MAX_VERTEX_ARRAY_LENGTH&&q("Max vertices per segment is "+yl.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+m),(!Ot||Ot.vertexLength+m>yl.MAX_VERTEX_ARRAY_LENGTH||Ot.sortKey!==bt)&&(Ot={vertexOffset:B.length,primitiveOffset:K.length,vertexLength:0,primitiveLength:0},bt!==void 0&&(Ot.sortKey=bt),this.segments.push(Ot)),Ot},yl.prototype.get=function(){return this.segments},yl.prototype.destroy=function(){for(var m=0,B=this.segments;m>>16)*Je&65535)<<16)&4294967295,Sr=Sr<<15|Sr>>>17,Sr=(Sr&65535)*vr+(((Sr>>>16)*vr&65535)<<16)&4294967295,ie^=Sr,ie=ie<<13|ie>>>19,De=(ie&65535)*5+(((ie>>>16)*5&65535)<<16)&4294967295,ie=(De&65535)+27492+(((De>>>16)+58964&65535)<<16);switch(Sr=0,Ot){case 3:Sr^=(K.charCodeAt(Yr+2)&255)<<16;case 2:Sr^=(K.charCodeAt(Yr+1)&255)<<8;case 1:Sr^=K.charCodeAt(Yr)&255,Sr=(Sr&65535)*Je+(((Sr>>>16)*Je&65535)<<16)&4294967295,Sr=Sr<<15|Sr>>>17,Sr=(Sr&65535)*vr+(((Sr>>>16)*vr&65535)<<16)&4294967295,ie^=Sr}return ie^=K.length,ie^=ie>>>16,ie=(ie&65535)*2246822507+(((ie>>>16)*2246822507&65535)<<16)&4294967295,ie^=ie>>>13,ie=(ie&65535)*3266489909+(((ie>>>16)*3266489909&65535)<<16)&4294967295,ie^=ie>>>16,ie>>>0}m.exports=B}),xt=e(function(m){function B(K,bt){for(var Ot=K.length,Zt=bt^Ot,ie=0,De;Ot>=4;)De=K.charCodeAt(ie)&255|(K.charCodeAt(++ie)&255)<<8|(K.charCodeAt(++ie)&255)<<16|(K.charCodeAt(++ie)&255)<<24,De=(De&65535)*1540483477+(((De>>>16)*1540483477&65535)<<16),De^=De>>>24,De=(De&65535)*1540483477+(((De>>>16)*1540483477&65535)<<16),Zt=(Zt&65535)*1540483477+(((Zt>>>16)*1540483477&65535)<<16)^De,Ot-=4,++ie;switch(Ot){case 3:Zt^=(K.charCodeAt(ie+2)&255)<<16;case 2:Zt^=(K.charCodeAt(ie+1)&255)<<8;case 1:Zt^=K.charCodeAt(ie)&255,Zt=(Zt&65535)*1540483477+(((Zt>>>16)*1540483477&65535)<<16)}return Zt^=Zt>>>13,Zt=(Zt&65535)*1540483477+(((Zt>>>16)*1540483477&65535)<<16),Zt^=Zt>>>15,Zt>>>0}m.exports=B}),Ut=et,fe=et,ye=xt;Ut.murmur3=fe,Ut.murmur2=ye;var Yt=function(){this.ids=[],this.positions=[],this.indexed=!1};Yt.prototype.add=function(m,B,K,bt){this.ids.push(Se(m)),this.positions.push(B,K,bt)},Yt.prototype.getPositions=function(m){for(var B=Se(m),K=0,bt=this.ids.length-1;K>1;this.ids[Ot]>=B?bt=Ot:K=Ot+1}for(var Zt=[];this.ids[K]===B;){var ie=this.positions[3*K],De=this.positions[3*K+1],Je=this.positions[3*K+2];Zt.push({index:ie,start:De,end:Je}),K++}return Zt},Yt.serialize=function(m,B){var K=new Float64Array(m.ids),bt=new Uint32Array(m.positions);return nr(K,bt,0,K.length-1),B&&B.push(K.buffer,bt.buffer),{ids:K,positions:bt}},Yt.deserialize=function(m){var B=new Yt;return B.ids=m.ids,B.positions=m.positions,B.indexed=!0,B};var ce=Math.pow(2,53)-1;function Se(m){var B=+m;return!isNaN(B)&&B<=ce?B:Ut(String(m))}function nr(m,B,K,bt){for(;K>1],Zt=K-1,ie=bt+1;;){do Zt++;while(m[Zt]Ot);if(Zt>=ie)break;Ye(m,Zt,ie),Ye(B,3*Zt,3*ie),Ye(B,3*Zt+1,3*ie+1),Ye(B,3*Zt+2,3*ie+2)}ie-Kie.x+1||Jeie.y+1)&&q("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return K}function Ul(m,B){return{type:m.type,id:m.id,properties:m.properties,geometry:B?dl(m):[]}}function _c(m,B,K,bt,Ot){m.emplaceBack(B*2+(bt+1)/2,K*2+(Ot+1)/2)}var Ds=function(m){this.zoom=m.zoom,this.overscaling=m.overscaling,this.layers=m.layers,this.layerIds=this.layers.map(function(B){return B.id}),this.index=m.index,this.hasPattern=!1,this.layoutVertexArray=new Ua,this.indexArray=new So,this.segments=new yl,this.programConfigurations=new Si(m.layers,m.zoom),this.stateDependentLayerIds=this.layers.filter(function(B){return B.isStateDependent()}).map(function(B){return B.id})};Ds.prototype.populate=function(m,B,K){var bt=this.layers[0],Ot=[],Zt=null;bt.type==="circle"&&(Zt=bt.layout.get("circle-sort-key"));for(var ie=0,De=m;ie=Vo||Yr<0||Yr>=Vo)){var nn=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,m.sortKey),pn=nn.vertexLength;_c(this.layoutVertexArray,Sr,Yr,-1,-1),_c(this.layoutVertexArray,Sr,Yr,1,-1),_c(this.layoutVertexArray,Sr,Yr,1,1),_c(this.layoutVertexArray,Sr,Yr,-1,1),this.indexArray.emplaceBack(pn,pn+1,pn+2),this.indexArray.emplaceBack(pn,pn+3,pn+2),nn.vertexLength+=4,nn.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,m,K,{},bt)},sr("CircleBucket",Ds,{omit:["layers"]});function Au(m,B){for(var K=0;K=3){for(var Zt=0;Zt1){if(kp(m,B))return!0;for(var bt=0;bt1?m.distSqr(K):m.distSqr(K.sub(B)._mult(Ot)._add(B))}function Ap(m,B){for(var K=!1,bt,Ot,Zt,ie=0;ieB.y!=Zt.y>B.y&&B.x<(Zt.x-Ot.x)*(B.y-Ot.y)/(Zt.y-Ot.y)+Ot.x&&(K=!K)}return K}function qd(m,B){for(var K=!1,bt=0,Ot=m.length-1;btB.y!=ie.y>B.y&&B.x<(ie.x-Zt.x)*(B.y-Zt.y)/(ie.y-Zt.y)+Zt.x&&(K=!K)}return K}function Q0(m,B,K,bt,Ot){for(var Zt=0,ie=m;Zt=De.x&&Ot>=De.y)return!0}var Je=[new o(B,K),new o(B,Ot),new o(bt,Ot),new o(bt,K)];if(m.length>2)for(var vr=0,Sr=Je;vrOt.x&&B.x>Ot.x||m.yOt.y&&B.y>Ot.y)return!1;var Zt=X(m,B,K[0]);return Zt!==X(m,B,K[1])||Zt!==X(m,B,K[2])||Zt!==X(m,B,K[3])}function Mp(m,B,K){var bt=B.paint.get(m).value;return bt.kind==="constant"?bt.value:K.programConfigurations.get(B.id).getMaxValue(m)}function Sp(m){return Math.sqrt(m[0]*m[0]+m[1]*m[1])}function ep(m,B,K,bt,Ot){if(!B[0]&&!B[1])return m;var Zt=o.convert(B)._mult(Ot);K==="viewport"&&Zt._rotate(-bt);for(var ie=[],De=0;De0&&(Zt=1/Math.sqrt(Zt)),m[0]=B[0]*Zt,m[1]=B[1]*Zt,m[2]=B[2]*Zt,m}function LT(m,B){return m[0]*B[0]+m[1]*B[1]+m[2]*B[2]}function PT(m,B,K){var bt=B[0],Ot=B[1],Zt=B[2],ie=K[0],De=K[1],Je=K[2];return m[0]=Ot*Je-Zt*De,m[1]=Zt*ie-bt*Je,m[2]=bt*De-Ot*ie,m}function zT(m,B,K){var bt=B[0],Ot=B[1],Zt=B[2];return m[0]=bt*K[0]+Ot*K[3]+Zt*K[6],m[1]=bt*K[1]+Ot*K[4]+Zt*K[7],m[2]=bt*K[2]+Ot*K[5]+Zt*K[8],m}var IT=mb;(function(){var m=xx();return function(B,K,bt,Ot,Zt,ie){var De,Je;for(K||(K=3),bt||(bt=0),Ot?Je=Math.min(Ot*K+bt,B.length):Je=B.length,De=bt;Dem.width||Ot.height>m.height||K.x>m.width-Ot.width||K.y>m.height-Ot.height)throw new RangeError("out of range source coordinates for image copy");if(Ot.width>B.width||Ot.height>B.height||bt.x>B.width-Ot.width||bt.y>B.height-Ot.height)throw new RangeError("out of range destination coordinates for image copy");for(var ie=m.data,De=B.data,Je=0;Je80*K){De=vr=m[0],Je=Sr=m[1];for(var Rn=K;Rnvr&&(vr=Yr),nn>Sr&&(Sr=nn);pn=Math.max(vr-De,Sr-Je),pn=pn!==0?1/pn:0}return Fg(Zt,ie,K,De,Je,pn),ie}function xb(m,B,K,bt,Ot){var Zt,ie;if(Ot===Ab(m,B,K,bt)>0)for(Zt=B;Zt=B;Zt-=bt)ie=F3(Zt,m[Zt],m[Zt+1],ie);return ie&&Fv(ie,ie.next)&&(X1(ie),ie=ie.next),ie}function Tm(m,B){if(!m)return m;B||(B=m);var K=m,bt;do if(bt=!1,!K.steiner&&(Fv(K,K.next)||pf(K.prev,K,K.next)===0)){if(X1(K),K=B=K.prev,K===K.next)break;bt=!0}else K=K.next;while(bt||K!==B);return B}function Fg(m,B,K,bt,Ot,Zt,ie){if(m){!ie&&Zt&&bb(m,bt,Ot,Zt);for(var De=m,Je,vr;m.prev!==m.next;){if(Je=m.prev,vr=m.next,Zt?jT(m,bt,Ot,Zt):_b(m)){B.push(Je.i/K),B.push(m.i/K),B.push(vr.i/K),X1(m),m=vr.next,De=vr.next;continue}if(m=vr,m===De){ie?ie===1?(m=UT(Tm(m),B,K),Fg(m,B,K,bt,Ot,Zt,2)):ie===2&&I3(m,B,K,bt,Ot,Zt):Fg(Tm(m),B,K,bt,Ot,Zt,1);break}}}}function _b(m){var B=m.prev,K=m,bt=m.next;if(pf(B,K,bt)>=0)return!1;for(var Ot=m.next.next;Ot!==m.prev;){if(Ym(B.x,B.y,K.x,K.y,bt.x,bt.y,Ot.x,Ot.y)&&pf(Ot.prev,Ot,Ot.next)>=0)return!1;Ot=Ot.next}return!0}function jT(m,B,K,bt){var Ot=m.prev,Zt=m,ie=m.next;if(pf(Ot,Zt,ie)>=0)return!1;for(var De=Ot.xZt.x?Ot.x>ie.x?Ot.x:ie.x:Zt.x>ie.x?Zt.x:ie.x,Sr=Ot.y>Zt.y?Ot.y>ie.y?Ot.y:ie.y:Zt.y>ie.y?Zt.y:ie.y,Yr=wb(De,Je,B,K,bt),nn=wb(vr,Sr,B,K,bt),pn=m.prevZ,Rn=m.nextZ;pn&&pn.z>=Yr&&Rn&&Rn.z<=nn;){if(pn!==m.prev&&pn!==m.next&&Ym(Ot.x,Ot.y,Zt.x,Zt.y,ie.x,ie.y,pn.x,pn.y)&&pf(pn.prev,pn,pn.next)>=0||(pn=pn.prevZ,Rn!==m.prev&&Rn!==m.next&&Ym(Ot.x,Ot.y,Zt.x,Zt.y,ie.x,ie.y,Rn.x,Rn.y)&&pf(Rn.prev,Rn,Rn.next)>=0))return!1;Rn=Rn.nextZ}for(;pn&&pn.z>=Yr;){if(pn!==m.prev&&pn!==m.next&&Ym(Ot.x,Ot.y,Zt.x,Zt.y,ie.x,ie.y,pn.x,pn.y)&&pf(pn.prev,pn,pn.next)>=0)return!1;pn=pn.prevZ}for(;Rn&&Rn.z<=nn;){if(Rn!==m.prev&&Rn!==m.next&&Ym(Ot.x,Ot.y,Zt.x,Zt.y,ie.x,ie.y,Rn.x,Rn.y)&&pf(Rn.prev,Rn,Rn.next)>=0)return!1;Rn=Rn.nextZ}return!0}function UT(m,B,K){var bt=m;do{var Ot=bt.prev,Zt=bt.next.next;!Fv(Ot,Zt)&&Rg(Ot,bt,bt.next,Zt)&&Rv(Ot,Zt)&&Rv(Zt,Ot)&&(B.push(Ot.i/K),B.push(bt.i/K),B.push(Zt.i/K),X1(bt),X1(bt.next),bt=m=Zt),bt=bt.next}while(bt!==m);return Tm(bt)}function I3(m,B,K,bt,Ot,Zt){var ie=m;do{for(var De=ie.next.next;De!==ie.prev;){if(ie.i!==De.i&&HT(ie,De)){var Je=Tb(ie,De);ie=Tm(ie,ie.next),Je=Tm(Je,Je.next),Fg(ie,B,K,bt,Ot,Zt),Fg(Je,B,K,bt,Ot,Zt);return}De=De.next}ie=ie.next}while(ie!==m)}function O3(m,B,K,bt){var Ot=[],Zt,ie,De,Je,vr;for(Zt=0,ie=B.length;Zt=K.next.y&&K.next.y!==K.y){var De=K.x+(Ot-K.y)*(K.next.x-K.x)/(K.next.y-K.y);if(De<=bt&&De>Zt){if(Zt=De,De===bt){if(Ot===K.y)return K;if(Ot===K.next.y)return K.next}ie=K.x=K.x&&K.x>=vr&&bt!==K.x&&Ym(Otie.x||K.x===ie.x&&D3(ie,K)))&&(ie=K,Yr=nn)),K=K.next;while(K!==Je);return ie}function D3(m,B){return pf(m.prev,m,B.prev)<0&&pf(B.next,m,m.next)<0}function bb(m,B,K,bt){var Ot=m;do Ot.z===null&&(Ot.z=wb(Ot.x,Ot.y,B,K,bt)),Ot.prevZ=Ot.prev,Ot.nextZ=Ot.next,Ot=Ot.next;while(Ot!==m);Ot.prevZ.nextZ=null,Ot.prevZ=null,VT(Ot)}function VT(m){var B,K,bt,Ot,Zt,ie,De,Je,vr=1;do{for(K=m,m=null,Zt=null,ie=0;K;){for(ie++,bt=K,De=0,B=0;B0||Je>0&&bt;)De!==0&&(Je===0||!bt||K.z<=bt.z)?(Ot=K,K=K.nextZ,De--):(Ot=bt,bt=bt.nextZ,Je--),Zt?Zt.nextZ=Ot:m=Ot,Ot.prevZ=Zt,Zt=Ot;K=bt}Zt.nextZ=null,vr*=2}while(ie>1);return m}function wb(m,B,K,bt,Ot){return m=32767*(m-K)*Ot,B=32767*(B-bt)*Ot,m=(m|m<<8)&16711935,m=(m|m<<4)&252645135,m=(m|m<<2)&858993459,m=(m|m<<1)&1431655765,B=(B|B<<8)&16711935,B=(B|B<<4)&252645135,B=(B|B<<2)&858993459,B=(B|B<<1)&1431655765,m|B<<1}function Ex(m){var B=m,K=m;do(B.x=0&&(m-ie)*(bt-De)-(K-ie)*(B-De)>=0&&(K-ie)*(Zt-De)-(Ot-ie)*(bt-De)>=0}function HT(m,B){return m.next.i!==B.i&&m.prev.i!==B.i&&!kb(m,B)&&(Rv(m,B)&&Rv(B,m)&&Cx(m,B)&&(pf(m.prev,m,B.prev)||pf(m,B.prev,B))||Fv(m,B)&&pf(m.prev,m,m.next)>0&&pf(B.prev,B,B.next)>0)}function pf(m,B,K){return(B.y-m.y)*(K.x-B.x)-(B.x-m.x)*(K.y-B.y)}function Fv(m,B){return m.x===B.x&&m.y===B.y}function Rg(m,B,K,bt){var Ot=K1(pf(m,B,K)),Zt=K1(pf(m,B,bt)),ie=K1(pf(K,bt,m)),De=K1(pf(K,bt,B));return!!(Ot!==Zt&&ie!==De||Ot===0&&Y1(m,K,B)||Zt===0&&Y1(m,bt,B)||ie===0&&Y1(K,m,bt)||De===0&&Y1(K,B,bt))}function Y1(m,B,K){return B.x<=Math.max(m.x,K.x)&&B.x>=Math.min(m.x,K.x)&&B.y<=Math.max(m.y,K.y)&&B.y>=Math.min(m.y,K.y)}function K1(m){return m>0?1:m<0?-1:0}function kb(m,B){var K=m;do{if(K.i!==m.i&&K.next.i!==m.i&&K.i!==B.i&&K.next.i!==B.i&&Rg(K,K.next,m,B))return!0;K=K.next}while(K!==m);return!1}function Rv(m,B){return pf(m.prev,m,m.next)<0?pf(m,B,m.next)>=0&&pf(m,m.prev,B)>=0:pf(m,B,m.prev)<0||pf(m,m.next,B)<0}function Cx(m,B){var K=m,bt=!1,Ot=(m.x+B.x)/2,Zt=(m.y+B.y)/2;do K.y>Zt!=K.next.y>Zt&&K.next.y!==K.y&&Ot<(K.next.x-K.x)*(Zt-K.y)/(K.next.y-K.y)+K.x&&(bt=!bt),K=K.next;while(K!==m);return bt}function Tb(m,B){var K=new Lx(m.i,m.x,m.y),bt=new Lx(B.i,B.x,B.y),Ot=m.next,Zt=B.prev;return m.next=B,B.prev=m,K.next=Ot,Ot.prev=K,bt.next=K,K.prev=bt,Zt.next=bt,bt.prev=Zt,bt}function F3(m,B,K,bt){var Ot=new Lx(m,B,K);return bt?(Ot.next=bt.next,Ot.prev=bt,bt.next.prev=Ot,bt.next=Ot):(Ot.prev=Ot,Ot.next=Ot),Ot}function X1(m){m.next.prev=m.prev,m.prev.next=m.next,m.prevZ&&(m.prevZ.nextZ=m.nextZ),m.nextZ&&(m.nextZ.prevZ=m.prevZ)}function Lx(m,B,K){this.i=m,this.x=B,this.y=K,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}Sx.deviation=function(m,B,K,bt){var Ot=B&&B.length,Zt=Ot?B[0]*K:m.length,ie=Math.abs(Ab(m,0,Zt,K));if(Ot)for(var De=0,Je=B.length;De0&&(bt+=m[Ot-1].length,K.holes.push(bt))}return K},Mx.default=z3;function WT(m,B,K,bt,Ot){R3(m,B,K,bt||m.length-1,Ot||Mb)}function R3(m,B,K,bt,Ot){for(;bt>K;){if(bt-K>600){var Zt=bt-K+1,ie=B-K+1,De=Math.log(Zt),Je=.5*Math.exp(2*De/3),vr=.5*Math.sqrt(De*Je*(Zt-Je)/Zt)*(ie-Zt/2<0?-1:1),Sr=Math.max(K,Math.floor(B-ie*Je/Zt+vr)),Yr=Math.min(bt,Math.floor(B+(Zt-ie)*Je/Zt+vr));R3(m,B,Sr,Yr,Ot)}var nn=m[B],pn=K,Rn=bt;for(J1(m,K,B),Ot(m[bt],nn)>0&&J1(m,K,bt);pn0;)Rn--}Ot(m[K],nn)===0?J1(m,K,Rn):(Rn++,J1(m,Rn,bt)),Rn<=B&&(K=Rn+1),B<=Rn&&(bt=Rn-1)}}function J1(m,B,K){var bt=m[B];m[B]=m[K],m[K]=bt}function Mb(m,B){return mB?1:0}function em(m,B){var K=m.length;if(K<=1)return[m];for(var bt=[],Ot,Zt,ie=0;ie1)for(var Je=0;Je>3}if(bt--,K===1||K===2)Ot+=m.readSVarint(),Zt+=m.readSVarint(),K===1&&(De&&ie.push(De),De=[]),De.push(new o(Ot,Zt));else if(K===7)De&&De.push(De[0].clone());else throw new Error("unknown command "+K)}return De&&ie.push(De),ie},Bg.prototype.bbox=function(){var m=this._pbf;m.pos=this._geometry;for(var B=m.readVarint()+m.pos,K=1,bt=0,Ot=0,Zt=0,ie=1/0,De=-1/0,Je=1/0,vr=-1/0;m.pos>3}if(bt--,K===1||K===2)Ot+=m.readSVarint(),Zt+=m.readSVarint(),OtDe&&(De=Ot),Ztvr&&(vr=Zt);else if(K!==7)throw new Error("unknown command "+K)}return[ie,Je,De,vr]},Bg.prototype.toGeoJSON=function(m,B,K){var bt=this.extent*Math.pow(2,K),Ot=this.extent*m,Zt=this.extent*B,ie=this.loadGeometry(),De=Bg.types[this.type],Je,vr;function Sr(pn){for(var Rn=0;Rn>3;B=bt===1?m.readString():bt===2?m.readFloat():bt===3?m.readDouble():bt===4?m.readVarint64():bt===5?m.readVarint():bt===6?m.readSVarint():bt===7?m.readBoolean():null}return B}Z3.prototype.feature=function(m){if(m<0||m>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[m];var B=this._pbf.readVarint()+this._pbf.pos;return new Bv(this._pbf,B,this.extent,this._keys,this._values)};var G3=Y3;function Y3(m,B){this.layers=m.readFields(K3,{},B)}function K3(m,B,K){if(m===3){var bt=new Cb(K,K.readVarint()+K.pos);bt.length&&(B[bt.name]=bt)}}var X3=G3,qT=Bv,ZT=Cb,Ng={VectorTile:X3,VectorTileFeature:qT,VectorTileLayer:ZT},Nv=Ng.VectorTileFeature.types,J3=500,jv=Math.pow(2,13);function Uv(m,B,K,bt,Ot,Zt,ie,De){m.emplaceBack(B,K,Math.floor(bt*jv)*2+ie,Ot*jv*2,Zt*jv*2,Math.round(De))}var jp=function(m){this.zoom=m.zoom,this.overscaling=m.overscaling,this.layers=m.layers,this.layerIds=this.layers.map(function(B){return B.id}),this.index=m.index,this.hasPattern=!1,this.layoutVertexArray=new ti,this.indexArray=new So,this.programConfigurations=new Si(m.layers,m.zoom),this.segments=new yl,this.stateDependentLayerIds=this.layers.filter(function(B){return B.isStateDependent()}).map(function(B){return B.id})};jp.prototype.populate=function(m,B,K){this.features=[],this.hasPattern=Px("fill-extrusion",this.layers,B);for(var bt=0,Ot=m;bt=1){var Fa=pi[na-1];if(!Ix(ba,Fa)){nn.vertexLength+4>yl.MAX_VERTEX_ARRAY_LENGTH&&(nn=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var ya=ba.sub(Fa)._perp()._unit(),Ka=Fa.dist(ba);la+Ka>32768&&(la=0),Uv(this.layoutVertexArray,ba.x,ba.y,ya.x,ya.y,0,0,la),Uv(this.layoutVertexArray,ba.x,ba.y,ya.x,ya.y,0,1,la),la+=Ka,Uv(this.layoutVertexArray,Fa.x,Fa.y,ya.x,ya.y,0,0,la),Uv(this.layoutVertexArray,Fa.x,Fa.y,ya.x,ya.y,0,1,la);var bo=nn.vertexLength;this.indexArray.emplaceBack(bo,bo+2,bo+1),this.indexArray.emplaceBack(bo+1,bo+2,bo+3),nn.vertexLength+=4,nn.primitiveLength+=2}}}}if(nn.vertexLength+Je>yl.MAX_VERTEX_ARRAY_LENGTH&&(nn=this.segments.prepareSegment(Je,this.layoutVertexArray,this.indexArray)),Nv[m.type]==="Polygon"){for(var No=[],jo=[],xs=nn.vertexLength,_s=0,Fs=De;_sVo)||m.y===B.y&&(m.y<0||m.y>Vo)}function Ox(m){return m.every(function(B){return B.x<0})||m.every(function(B){return B.x>Vo})||m.every(function(B){return B.y<0})||m.every(function(B){return B.y>Vo})}var $T=new Za({"fill-extrusion-opacity":new gn(La["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new ni(La["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new gn(La["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new gn(La["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Yi(La["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new ni(La["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new ni(La["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new gn(La["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),GT={paint:$T},YT=function(m){function B(K){m.call(this,K,GT)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.createBucket=function(K){return new jp(K)},B.prototype.queryRadius=function(){return Sp(this.paint.get("fill-extrusion-translate"))},B.prototype.is3D=function(){return!0},B.prototype.queryIntersectsFeature=function(K,bt,Ot,Zt,ie,De,Je,vr){var Sr=ep(K,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),De.angle,Je),Yr=this.paint.get("fill-extrusion-height").evaluate(bt,Ot),nn=this.paint.get("fill-extrusion-base").evaluate(bt,Ot),pn=Q3(Sr,vr,De,0),Rn=Lb(Zt,nn,Yr,vr),pi=Rn[0],la=Rn[1];return Xm(pi,la,pn)},B}(ta);function rm(m,B){return m.x*B.x+m.y*B.y}function Id(m,B){if(m.length===1){for(var K=0,bt=B[K++],Ot;!Ot||bt.equals(Ot);)if(Ot=B[K++],!Ot)return 1/0;for(;K=2&&m[Je-1].equals(m[Je-2]);)Je--;for(var vr=0;vr0;if(No&&na>vr){var xs=nn.dist(pn);if(xs>2*Sr){var _s=nn.sub(nn.sub(pn)._mult(Sr/xs)._round());this.updateDistance(pn,_s),this.addCurrentVertex(_s,pi,0,0,Yr),pn=_s}}var Fs=pn&&Rn,$s=Fs?K:De?"butt":bt;if(Fs&&$s==="round"&&(KaOt&&($s="bevel"),$s==="bevel"&&(Ka>2&&($s="flipbevel"),Ka100)ba=la.mult(-1);else{var sl=Ka*pi.add(la).mag()/pi.sub(la).mag();ba._perp()._mult(sl*(jo?-1:1))}this.addCurrentVertex(nn,ba,0,0,Yr),this.addCurrentVertex(nn,ba.mult(-1),0,0,Yr)}else if($s==="bevel"||$s==="fakeround"){var Rs=-Math.sqrt(Ka*Ka-1),Us=jo?Rs:0,Bu=jo?0:Rs;if(pn&&this.addCurrentVertex(nn,pi,Us,Bu,Yr),$s==="fakeround")for(var Oc=Math.round(bo*180/Math.PI/Ib),hh=1;hh2*Sr){var id=nn.add(Rn.sub(nn)._mult(Sr/Kd)._round());this.updateDistance(nn,id),this.addCurrentVertex(id,la,0,0,Yr),nn=id}}}}},$d.prototype.addCurrentVertex=function(m,B,K,bt,Ot,Zt){Zt===void 0&&(Zt=!1);var ie=B.x+B.y*K,De=B.y-B.x*K,Je=-B.x+B.y*bt,vr=-B.y-B.x*bt;this.addHalfVertex(m,ie,De,Zt,!1,K,Ot),this.addHalfVertex(m,Je,vr,Zt,!0,-bt,Ot),this.distance>Dx/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(m,B,K,bt,Ot,Zt))},$d.prototype.addHalfVertex=function(m,B,K,bt,Ot,Zt,ie){var De=m.x,Je=m.y,vr=this.lineClips?this.scaledDistance*(Dx-1):this.scaledDistance,Sr=vr*Vv;if(this.layoutVertexArray.emplaceBack((De<<1)+(bt?1:0),(Je<<1)+(Ot?1:0),Math.round(n5*B)+128,Math.round(n5*K)+128,(Zt===0?0:Zt<0?-1:1)+1|(Sr&63)<<2,Sr>>6),this.lineClips){var Yr=this.scaledDistance-this.lineClips.start,nn=this.lineClips.end-this.lineClips.start,pn=Yr/nn;this.layoutVertexArray2.emplaceBack(pn,this.lineClipsArray.length)}var Rn=ie.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Rn),ie.primitiveLength++),Ot?this.e2=Rn:this.e1=Rn},$d.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},$d.prototype.updateDistance=function(m,B){this.distance+=m.dist(B),this.updateScaledDistance()},sr("LineBucket",$d,{omit:["layers","patternFeatures"]});var Ob=new Za({"line-cap":new gn(La.layout_line["line-cap"]),"line-join":new ni(La.layout_line["line-join"]),"line-miter-limit":new gn(La.layout_line["line-miter-limit"]),"line-round-limit":new gn(La.layout_line["line-round-limit"]),"line-sort-key":new ni(La.layout_line["line-sort-key"])}),Fx=new Za({"line-opacity":new ni(La.paint_line["line-opacity"]),"line-color":new ni(La.paint_line["line-color"]),"line-translate":new gn(La.paint_line["line-translate"]),"line-translate-anchor":new gn(La.paint_line["line-translate-anchor"]),"line-width":new ni(La.paint_line["line-width"]),"line-gap-width":new ni(La.paint_line["line-gap-width"]),"line-offset":new ni(La.paint_line["line-offset"]),"line-blur":new ni(La.paint_line["line-blur"]),"line-dasharray":new Ui(La.paint_line["line-dasharray"]),"line-pattern":new Yi(La.paint_line["line-pattern"]),"line-gradient":new va(La.paint_line["line-gradient"])}),Hv={paint:Fx,layout:Ob},Db=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.possiblyEvaluate=function(K,bt){return bt=new Bl(Math.floor(bt.zoom),{now:bt.now,fadeDuration:bt.fadeDuration,zoomHistory:bt.zoomHistory,transition:bt.transition}),m.prototype.possiblyEvaluate.call(this,K,bt)},B.prototype.evaluate=function(K,bt,Ot,Zt){return bt=E({},bt,{zoom:Math.floor(bt.zoom)}),m.prototype.evaluate.call(this,K,bt,Ot,Zt)},B}(ni),Rx=new Db(Hv.paint.properties["line-width"].specification);Rx.useIntegerZoom=!0;var Fb=function(m){function B(K){m.call(this,K,Hv),this.gradientVersion=0}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._handleSpecialPaintPropertyUpdate=function(K){if(K==="line-gradient"){var bt=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=bt._styleExpression.expression instanceof Uc,this.gradientVersion=(this.gradientVersion+1)%x}},B.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},B.prototype.recalculate=function(K,bt){m.prototype.recalculate.call(this,K,bt),this.paint._values["line-floorwidth"]=Rx.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,K)},B.prototype.createBucket=function(K){return new $d(K)},B.prototype.queryRadius=function(K){var bt=K,Ot=o5(Mp("line-width",this,bt),Mp("line-gap-width",this,bt)),Zt=Mp("line-offset",this,bt);return Ot/2+Math.abs(Zt)+Sp(this.paint.get("line-translate"))},B.prototype.queryIntersectsFeature=function(K,bt,Ot,Zt,ie,De,Je){var vr=ep(K,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),De.angle,Je),Sr=Je/2*o5(this.paint.get("line-width").evaluate(bt,Ot),this.paint.get("line-gap-width").evaluate(bt,Ot)),Yr=this.paint.get("line-offset").evaluate(bt,Ot);return Yr&&(Zt=G(Zt,Yr*Je)),Np(vr,Zt,Sr)},B.prototype.isTileClipped=function(){return!0},B}(ta);function o5(m,B){return B>0?B+2*m:m}function G(m,B){for(var K=[],bt=new o(0,0),Ot=0;Ot":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function yr(m){for(var B="",K=0;K>1,Sr=-7,Yr=K?Ot-1:0,nn=K?-1:1,pn=m[B+Yr];for(Yr+=nn,Zt=pn&(1<<-Sr)-1,pn>>=-Sr,Sr+=De;Sr>0;Zt=Zt*256+m[B+Yr],Yr+=nn,Sr-=8);for(ie=Zt&(1<<-Sr)-1,Zt>>=-Sr,Sr+=bt;Sr>0;ie=ie*256+m[B+Yr],Yr+=nn,Sr-=8);if(Zt===0)Zt=1-vr;else{if(Zt===Je)return ie?NaN:(pn?-1:1)*(1/0);ie=ie+Math.pow(2,bt),Zt=Zt-vr}return(pn?-1:1)*ie*Math.pow(2,Zt-bt)},sn=function(m,B,K,bt,Ot,Zt){var ie,De,Je,vr=Zt*8-Ot-1,Sr=(1<>1,nn=Ot===23?Math.pow(2,-24)-Math.pow(2,-77):0,pn=bt?0:Zt-1,Rn=bt?1:-1,pi=B<0||B===0&&1/B<0?1:0;for(B=Math.abs(B),isNaN(B)||B===1/0?(De=isNaN(B)?1:0,ie=Sr):(ie=Math.floor(Math.log(B)/Math.LN2),B*(Je=Math.pow(2,-ie))<1&&(ie--,Je*=2),ie+Yr>=1?B+=nn/Je:B+=nn*Math.pow(2,1-Yr),B*Je>=2&&(ie++,Je/=2),ie+Yr>=Sr?(De=0,ie=Sr):ie+Yr>=1?(De=(B*Je-1)*Math.pow(2,Ot),ie=ie+Yr):(De=B*Math.pow(2,Yr-1)*Math.pow(2,Ot),ie=0));Ot>=8;m[K+pn]=De&255,pn+=Rn,De/=256,Ot-=8);for(ie=ie<0;m[K+pn]=ie&255,pn+=Rn,ie/=256,vr-=8);m[K+pn-Rn]|=pi*128},xn={read:Zr,write:sn},Ln=$n;function $n(m){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(m)?m:new Uint8Array(m||0),this.pos=0,this.type=0,this.length=this.buf.length}$n.Varint=0,$n.Fixed64=1,$n.Bytes=2,$n.Fixed32=5;var ki=65536*65536,Aa=1/ki,Xi=12,ma=typeof TextDecoder>"u"?null:new TextDecoder("utf8");$n.prototype={destroy:function(){this.buf=null},readFields:function(m,B,K){for(K=K||this.length;this.pos>3,Zt=this.pos;this.type=bt&7,m(Ot,B,this),this.pos===Zt&&this.skip(bt)}return B},readMessage:function(m,B){return this.readFields(m,B,this.readVarint()+this.pos)},readFixed32:function(){var m=Ep(this.buf,this.pos);return this.pos+=4,m},readSFixed32:function(){var m=td(this.buf,this.pos);return this.pos+=4,m},readFixed64:function(){var m=Ep(this.buf,this.pos)+Ep(this.buf,this.pos+4)*ki;return this.pos+=8,m},readSFixed64:function(){var m=Ep(this.buf,this.pos)+td(this.buf,this.pos+4)*ki;return this.pos+=8,m},readFloat:function(){var m=xn.read(this.buf,this.pos,!0,23,4);return this.pos+=4,m},readDouble:function(){var m=xn.read(this.buf,this.pos,!0,52,8);return this.pos+=8,m},readVarint:function(m){var B=this.buf,K,bt;return bt=B[this.pos++],K=bt&127,bt<128||(bt=B[this.pos++],K|=(bt&127)<<7,bt<128)||(bt=B[this.pos++],K|=(bt&127)<<14,bt<128)||(bt=B[this.pos++],K|=(bt&127)<<21,bt<128)?K:(bt=B[this.pos],K|=(bt&15)<<28,Ga(K,m,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var m=this.readVarint();return m%2===1?(m+1)/-2:m/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var m=this.readVarint()+this.pos,B=this.pos;return this.pos=m,m-B>=Xi&&ma?pp(this.buf,B,m):dp(this.buf,B,m)},readBytes:function(){var m=this.readVarint()+this.pos,B=this.buf.subarray(this.pos,m);return this.pos=m,B},readPackedVarint:function(m,B){if(this.type!==$n.Bytes)return m.push(this.readVarint(B));var K=To(this);for(m=m||[];this.pos127;);else if(B===$n.Bytes)this.pos=this.readVarint()+this.pos;else if(B===$n.Fixed32)this.pos+=4;else if(B===$n.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+B)},writeTag:function(m,B){this.writeVarint(m<<3|B)},realloc:function(m){for(var B=this.length||16;B268435455||m<0){Sl(m,this);return}this.realloc(4),this.buf[this.pos++]=m&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=(m>>>=7)&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=(m>>>=7)&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=m>>>7&127)))},writeSVarint:function(m){this.writeVarint(m<0?-m*2-1:m*2)},writeBoolean:function(m){this.writeVarint(!!m)},writeString:function(m){m=String(m),this.realloc(m.length*4),this.pos++;var B=this.pos;this.pos=mp(this.buf,m,this.pos);var K=this.pos-B;K>=128&&Ys(B,K,this),this.pos=B-1,this.writeVarint(K),this.pos+=K},writeFloat:function(m){this.realloc(4),xn.write(this.buf,m,this.pos,!0,23,4),this.pos+=4},writeDouble:function(m){this.realloc(8),xn.write(this.buf,m,this.pos,!0,52,8),this.pos+=8},writeBytes:function(m){var B=m.length;this.writeVarint(B),this.realloc(B);for(var K=0;K=128&&Ys(K,bt,this),this.pos=K-1,this.writeVarint(bt),this.pos+=bt},writeMessage:function(m,B,K){this.writeTag(m,$n.Bytes),this.writeRawMessage(B,K)},writePackedVarint:function(m,B){B.length&&this.writeMessage(m,Bs,B)},writePackedSVarint:function(m,B){B.length&&this.writeMessage(m,Is,B)},writePackedBoolean:function(m,B){B.length&&this.writeMessage(m,Ks,B)},writePackedFloat:function(m,B){B.length&&this.writeMessage(m,oo,B)},writePackedDouble:function(m,B){B.length&&this.writeMessage(m,nl,B)},writePackedFixed32:function(m,B){B.length&&this.writeMessage(m,Wl,B)},writePackedSFixed32:function(m,B){B.length&&this.writeMessage(m,uh,B)},writePackedFixed64:function(m,B){B.length&&this.writeMessage(m,nh,B)},writePackedSFixed64:function(m,B){B.length&&this.writeMessage(m,gd,B)},writeBytesField:function(m,B){this.writeTag(m,$n.Bytes),this.writeBytes(B)},writeFixed32Field:function(m,B){this.writeTag(m,$n.Fixed32),this.writeFixed32(B)},writeSFixed32Field:function(m,B){this.writeTag(m,$n.Fixed32),this.writeSFixed32(B)},writeFixed64Field:function(m,B){this.writeTag(m,$n.Fixed64),this.writeFixed64(B)},writeSFixed64Field:function(m,B){this.writeTag(m,$n.Fixed64),this.writeSFixed64(B)},writeVarintField:function(m,B){this.writeTag(m,$n.Varint),this.writeVarint(B)},writeSVarintField:function(m,B){this.writeTag(m,$n.Varint),this.writeSVarint(B)},writeStringField:function(m,B){this.writeTag(m,$n.Bytes),this.writeString(B)},writeFloatField:function(m,B){this.writeTag(m,$n.Fixed32),this.writeFloat(B)},writeDoubleField:function(m,B){this.writeTag(m,$n.Fixed64),this.writeDouble(B)},writeBooleanField:function(m,B){this.writeVarintField(m,!!B)}};function Ga(m,B,K){var bt=K.buf,Ot,Zt;if(Zt=bt[K.pos++],Ot=(Zt&112)>>4,Zt<128||(Zt=bt[K.pos++],Ot|=(Zt&127)<<3,Zt<128)||(Zt=bt[K.pos++],Ot|=(Zt&127)<<10,Zt<128)||(Zt=bt[K.pos++],Ot|=(Zt&127)<<17,Zt<128)||(Zt=bt[K.pos++],Ot|=(Zt&127)<<24,Zt<128)||(Zt=bt[K.pos++],Ot|=(Zt&1)<<31,Zt<128))return As(m,Ot,B);throw new Error("Expected varint not more than 10 bytes")}function To(m){return m.type===$n.Bytes?m.readVarint()+m.pos:m.pos+1}function As(m,B,K){return K?B*4294967296+(m>>>0):(B>>>0)*4294967296+(m>>>0)}function Sl(m,B){var K,bt;if(m>=0?(K=m%4294967296|0,bt=m/4294967296|0):(K=~(-m%4294967296),bt=~(-m/4294967296),K^4294967295?K=K+1|0:(K=0,bt=bt+1|0)),m>=18446744073709552e3||m<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");B.realloc(10),ys(K,bt,B),cs(bt,B)}function ys(m,B,K){K.buf[K.pos++]=m&127|128,m>>>=7,K.buf[K.pos++]=m&127|128,m>>>=7,K.buf[K.pos++]=m&127|128,m>>>=7,K.buf[K.pos++]=m&127|128,m>>>=7,K.buf[K.pos]=m&127}function cs(m,B){var K=(m&7)<<4;B.buf[B.pos++]|=K|((m>>>=3)?128:0),m&&(B.buf[B.pos++]=m&127|((m>>>=7)?128:0),m&&(B.buf[B.pos++]=m&127|((m>>>=7)?128:0),m&&(B.buf[B.pos++]=m&127|((m>>>=7)?128:0),m&&(B.buf[B.pos++]=m&127|((m>>>=7)?128:0),m&&(B.buf[B.pos++]=m&127)))))}function Ys(m,B,K){var bt=B<=16383?1:B<=2097151?2:B<=268435455?3:Math.floor(Math.log(B)/(Math.LN2*7));K.realloc(bt);for(var Ot=K.pos-1;Ot>=m;Ot--)K.buf[Ot+bt]=K.buf[Ot]}function Bs(m,B){for(var K=0;K>>8,m[K+2]=B>>>16,m[K+3]=B>>>24}function td(m,B){return(m[B]|m[B+1]<<8|m[B+2]<<16)+(m[B+3]<<24)}function dp(m,B,K){for(var bt="",Ot=B;Ot239?4:Zt>223?3:Zt>191?2:1;if(Ot+De>K)break;var Je,vr,Sr;De===1?Zt<128&&(ie=Zt):De===2?(Je=m[Ot+1],(Je&192)===128&&(ie=(Zt&31)<<6|Je&63,ie<=127&&(ie=null))):De===3?(Je=m[Ot+1],vr=m[Ot+2],(Je&192)===128&&(vr&192)===128&&(ie=(Zt&15)<<12|(Je&63)<<6|vr&63,(ie<=2047||ie>=55296&&ie<=57343)&&(ie=null))):De===4&&(Je=m[Ot+1],vr=m[Ot+2],Sr=m[Ot+3],(Je&192)===128&&(vr&192)===128&&(Sr&192)===128&&(ie=(Zt&15)<<18|(Je&63)<<12|(vr&63)<<6|Sr&63,(ie<=65535||ie>=1114112)&&(ie=null))),ie===null?(ie=65533,De=1):ie>65535&&(ie-=65536,bt+=String.fromCharCode(ie>>>10&1023|55296),ie=56320|ie&1023),bt+=String.fromCharCode(ie),Ot+=De}return bt}function pp(m,B,K){return ma.decode(m.subarray(B,K))}function mp(m,B,K){for(var bt=0,Ot,Zt;bt55295&&Ot<57344)if(Zt)if(Ot<56320){m[K++]=239,m[K++]=191,m[K++]=189,Zt=Ot;continue}else Ot=Zt-55296<<10|Ot-56320|65536,Zt=null;else{Ot>56319||bt+1===B.length?(m[K++]=239,m[K++]=191,m[K++]=189):Zt=Ot;continue}else Zt&&(m[K++]=239,m[K++]=191,m[K++]=189,Zt=null);Ot<128?m[K++]=Ot:(Ot<2048?m[K++]=Ot>>6|192:(Ot<65536?m[K++]=Ot>>12|224:(m[K++]=Ot>>18|240,m[K++]=Ot>>12&63|128),m[K++]=Ot>>6&63|128),m[K++]=Ot&63|128)}return K}var of=3;function vd(m,B,K){m===1&&K.readMessage(rp,B)}function rp(m,B,K){if(m===3){var bt=K.readMessage(Gd,{}),Ot=bt.id,Zt=bt.bitmap,ie=bt.width,De=bt.height,Je=bt.left,vr=bt.top,Sr=bt.advance;B.push({id:Ot,bitmap:new Qf({width:ie+2*of,height:De+2*of},Zt),metrics:{width:ie,height:De,left:Je,top:vr,advance:Sr}})}}function Gd(m,B,K){m===1?B.id=K.readVarint():m===2?B.bitmap=K.readBytes():m===3?B.width=K.readVarint():m===4?B.height=K.readVarint():m===5?B.left=K.readSVarint():m===6?B.top=K.readSVarint():m===7&&(B.advance=K.readVarint())}function gp(m){return new Ln(m).readFields(vd,[])}var Od=of;function Up(m){for(var B=0,K=0,bt=0,Ot=m;bt=0;pn--){var Rn=De[pn];if(!(nn.w>Rn.w||nn.h>Rn.h)){if(nn.x=Rn.x,nn.y=Rn.y,vr=Math.max(vr,nn.y+nn.h),Je=Math.max(Je,nn.x+nn.w),nn.w===Rn.w&&nn.h===Rn.h){var pi=De.pop();pn=0&&bt>=m&&Vp[this.text.charCodeAt(bt)];bt--)K--;this.text=this.text.substring(m,K),this.sectionIndex=this.sectionIndex.slice(m,K)},ch.prototype.substring=function(m,B){var K=new ch;return K.text=this.text.substring(m,B),K.sectionIndex=this.sectionIndex.slice(m,B),K.sections=this.sections,K},ch.prototype.toString=function(){return this.text},ch.prototype.getMaxScale=function(){var m=this;return this.sectionIndex.reduce(function(B,K){return Math.max(B,m.sections[K].scale)},0)},ch.prototype.addTextSection=function(m,B){this.text+=m.text,this.sections.push(np.forText(m.scale,m.fontStack||B));for(var K=this.sections.length-1,bt=0;bt=U0?null:++this.imageSectionID:(this.imageSectionID=j0,this.imageSectionID)};function Dd(m,B){for(var K=[],bt=m.text,Ot=0,Zt=0,ie=B;Zt=0,Sr=0,Yr=0;Yr0&&ih>xs&&(xs=ih)}else{var Of=K[Fs.fontStack],Kd=Of&&Of[sl];if(Kd&&Kd.rect)Bu=Kd.rect,Us=Kd.metrics;else{var id=B[Fs.fontStack],yp=id&&id[sl];if(!yp)continue;Us=yp.metrics}Rs=(Ka-Fs.scale)*Er}Xu?(m.verticalizable=!0,jo.push({glyph:sl,imageName:Oc,x:nn,y:pn+Rs,vertical:Xu,scale:Fs.scale,fontStack:Fs.fontStack,sectionIndex:$s,metrics:Us,rect:Bu}),nn+=hh*Fs.scale+vr):(jo.push({glyph:sl,imageName:Oc,x:nn,y:pn+Rs,vertical:Xu,scale:Fs.scale,fontStack:Fs.fontStack,sectionIndex:$s,metrics:Us,rect:Bu}),nn+=Us.advance*Fs.scale+vr)}if(jo.length!==0){var xp=nn-vr;Rn=Math.max(xp,Rn),JT(jo,0,jo.length-1,la,xs)}nn=0;var _p=Zt*Ka+xs;No.lineOffset=Math.max(xs,bo),pn+=_p,pi=Math.max(_p,pi),++na}var Rd=pn-kh,Cp=Vb(ie),Lp=Cp.horizontalAlign,yd=Cp.verticalAlign;QT(m.positionedLines,la,Lp,yd,Rn,pi,Zt,Rd,Ot.length),m.top+=-yd*Rd,m.bottom=m.top+Rd,m.left+=-Lp*Rn,m.right=m.left+Rn}function JT(m,B,K,bt,Ot){if(!(!bt&&!Ot))for(var Zt=m[K],ie=Zt.metrics.advance*Zt.scale,De=(m[K].x+ie)*bt,Je=B;Je<=K;Je++)m[Je].x-=De,m[Je].y+=Ot}function QT(m,B,K,bt,Ot,Zt,ie,De,Je){var vr=(B-K)*Ot,Sr=0;Zt!==ie?Sr=-De*bt-kh:Sr=(-bt*Je+.5)*ie;for(var Yr=0,nn=m;Yr-K/2;){if(ie--,ie<0)return!1;De-=m[ie].dist(Zt),Zt=m[ie]}De+=m[ie].dist(m[ie+1]),ie++;for(var Je=[],vr=0;Debt;)vr-=Je.shift().angleDelta;if(vr>Ot)return!1;ie++,De+=Yr.dist(nn)}return!0}function Yd(m){for(var B=0,K=0;Kvr){var Rn=(vr-Je)/pn,pi=_u(Yr.x,nn.x,Rn),la=_u(Yr.y,nn.y,Rn),na=new qv(pi,la,nn.angleTo(Yr),Sr);return na._round(),!ie||u5(m,na,De,ie,B)?na:void 0}Je+=pn}}function jg(m,B,K,bt,Ot,Zt,ie,De,Je){var vr=Hp(bt,Zt,ie),Sr=Jm(bt,Ot),Yr=Sr*ie,nn=m[0].x===0||m[0].x===Je||m[0].y===0||m[0].y===Je;B-Yr=0&&ya=0&&Ka=0&&nn+vr<=Sr){var bo=new qv(ya,Ka,ba,Rn);bo._round(),(!bt||u5(m,bo,Zt,bt,Ot))&&pn.push(bo)}}Yr+=na}return!De&&!pn.length&&!ie&&(pn=H0(m,Yr/2,K,bt,Ot,Zt,ie,!0,Je)),pn}function JE(m,B,K,bt,Ot){for(var Zt=[],ie=0;ie=bt&&Yr.x>=bt)&&(Sr.x>=bt?Sr=new o(bt,Sr.y+(Yr.y-Sr.y)*((bt-Sr.x)/(Yr.x-Sr.x)))._round():Yr.x>=bt&&(Yr=new o(bt,Sr.y+(Yr.y-Sr.y)*((bt-Sr.x)/(Yr.x-Sr.x)))._round()),!(Sr.y>=Ot&&Yr.y>=Ot)&&(Sr.y>=Ot?Sr=new o(Sr.x+(Yr.x-Sr.x)*((Ot-Sr.y)/(Yr.y-Sr.y)),Ot)._round():Yr.y>=Ot&&(Yr=new o(Sr.x+(Yr.x-Sr.x)*((Ot-Sr.y)/(Yr.y-Sr.y)),Ot)._round()),(!Je||!Sr.equals(Je[Je.length-1]))&&(Je=[Sr],Zt.push(Je)),Je.push(Yr)))))}return Zt}var Nx=wh;function QE(m,B,K,bt){var Ot=[],Zt=m.image,ie=Zt.pixelRatio,De=Zt.paddedRect.w-2*Nx,Je=Zt.paddedRect.h-2*Nx,vr=m.right-m.left,Sr=m.bottom-m.top,Yr=Zt.stretchX||[[0,De]],nn=Zt.stretchY||[[0,Je]],pn=function(Dc,Nu){return Dc+Nu[1]-Nu[0]},Rn=Yr.reduce(pn,0),pi=nn.reduce(pn,0),la=De-Rn,na=Je-pi,ba=0,Fa=Rn,ya=0,Ka=pi,bo=0,No=la,jo=0,xs=na;if(Zt.content&&bt){var _s=Zt.content;ba=c5(Yr,0,_s[0]),ya=c5(nn,0,_s[1]),Fa=c5(Yr,_s[0],_s[2]),Ka=c5(nn,_s[1],_s[3]),bo=_s[0]-ba,jo=_s[1]-ya,No=_s[2]-_s[0]-Fa,xs=_s[3]-_s[1]-Ka}var Fs=function(Dc,Nu,Oh,ih){var Of=h5(Dc.stretch-ba,Fa,vr,m.left),Kd=f5(Dc.fixed-bo,No,Dc.stretch,Rn),id=h5(Nu.stretch-ya,Ka,Sr,m.top),yp=f5(Nu.fixed-jo,xs,Nu.stretch,pi),xp=h5(Oh.stretch-ba,Fa,vr,m.left),_p=f5(Oh.fixed-bo,No,Oh.stretch,Rn),Rd=h5(ih.stretch-ya,Ka,Sr,m.top),Cp=f5(ih.fixed-jo,xs,ih.stretch,pi),Lp=new o(Of,id),yd=new o(xp,id),Pp=new o(xp,Rd),T0=new o(Of,Rd),Hg=new o(Kd/ie,yp/ie),Yv=new o(_p/ie,Cp/ie),Kv=B*Math.PI/180;if(Kv){var Xv=Math.sin(Kv),$x=Math.cos(Kv),nm=[$x,-Xv,Xv,$x];Lp._matMult(nm),yd._matMult(nm),T0._matMult(nm),Pp._matMult(nm)}var y5=Dc.stretch+Dc.fixed,u8=Oh.stretch+Oh.fixed,x5=Nu.stretch+Nu.fixed,c8=ih.stretch+ih.fixed,W0={x:Zt.paddedRect.x+Nx+y5,y:Zt.paddedRect.y+Nx+x5,w:u8-y5,h:c8-x5},Gx=No/ie/vr,_5=xs/ie/Sr;return{tl:Lp,tr:yd,bl:T0,br:Pp,tex:W0,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Hg,pixelOffsetBR:Yv,minFontScaleX:Gx,minFontScaleY:_5,isSDF:K}};if(!bt||!Zt.stretchX&&!Zt.stretchY)Ot.push(Fs({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:De+1},{fixed:0,stretch:Je+1}));else for(var $s=tC(Yr,la,Rn),sl=tC(nn,na,pi),Rs=0;Rs<$s.length-1;Rs++)for(var Us=$s[Rs],Bu=$s[Rs+1],Oc=0;Oc0&&(pn=Math.max(10,pn),this.circleDiameter=pn)}else{var Rn=Zt.top*ie-De,pi=Zt.bottom*ie+De,la=Zt.left*ie-De,na=Zt.right*ie+De,ba=Zt.collisionPadding;if(ba&&(la-=ba[0]*ie,Rn-=ba[1]*ie,na+=ba[2]*ie,pi+=ba[3]*ie),vr){var Fa=new o(la,Rn),ya=new o(na,Rn),Ka=new o(la,pi),bo=new o(na,pi),No=vr*Math.PI/180;Fa._rotate(No),ya._rotate(No),Ka._rotate(No),bo._rotate(No),la=Math.min(Fa.x,ya.x,Ka.x,bo.x),na=Math.max(Fa.x,ya.x,Ka.x,bo.x),Rn=Math.min(Fa.y,ya.y,Ka.y,bo.y),pi=Math.max(Fa.y,ya.y,Ka.y,bo.y)}m.emplaceBack(B.x,B.y,la,Rn,na,pi,K,bt,Ot)}this.boxEndIndex=m.length},jx=function(m,B){if(m===void 0&&(m=[]),B===void 0&&(B=a$),this.data=m,this.length=this.data.length,this.compare=B,this.length>0)for(var K=(this.length>>1)-1;K>=0;K--)this._down(K)};jx.prototype.push=function(m){this.data.push(m),this.length++,this._up(this.length-1)},jx.prototype.pop=function(){if(this.length!==0){var m=this.data[0],B=this.data.pop();return this.length--,this.length>0&&(this.data[0]=B,this._down(0)),m}},jx.prototype.peek=function(){return this.data[0]},jx.prototype._up=function(m){for(var B=this,K=B.data,bt=B.compare,Ot=K[m];m>0;){var Zt=m-1>>1,ie=K[Zt];if(bt(Ot,ie)>=0)break;K[m]=ie,m=Zt}K[m]=Ot},jx.prototype._down=function(m){for(var B=this,K=B.data,bt=B.compare,Ot=this.length>>1,Zt=K[m];m=0)break;K[m]=De,m=ie}K[m]=Zt};function a$(m,B){return mB?1:0}function o$(m,B,K){K===void 0&&(K=!1);for(var bt=1/0,Ot=1/0,Zt=-1/0,ie=-1/0,De=m[0],Je=0;JeZt)&&(Zt=vr.x),(!Je||vr.y>ie)&&(ie=vr.y)}var Sr=Zt-bt,Yr=ie-Ot,nn=Math.min(Sr,Yr),pn=nn/2,Rn=new jx([],s$);if(nn===0)return new o(bt,Ot);for(var pi=bt;pina.d||!na.d)&&(na=Fa,K&&console.log("found best %d after %d probes",Math.round(1e4*Fa.d)/1e4,ba)),!(Fa.max-na.d<=B)&&(pn=Fa.h/2,Rn.push(new Ux(Fa.p.x-pn,Fa.p.y-pn,pn,m)),Rn.push(new Ux(Fa.p.x+pn,Fa.p.y-pn,pn,m)),Rn.push(new Ux(Fa.p.x-pn,Fa.p.y+pn,pn,m)),Rn.push(new Ux(Fa.p.x+pn,Fa.p.y+pn,pn,m)),ba+=4)}return K&&(console.log("num probes: "+ba),console.log("best distance: "+na.d)),na.p}function s$(m,B){return B.max-m.max}function Ux(m,B,K,bt){this.p=new o(m,B),this.h=K,this.d=l$(this.p,bt),this.max=this.d+this.h*Math.SQRT2}function l$(m,B){for(var K=!1,bt=1/0,Ot=0;Otm.y!=Sr.y>m.y&&m.x<(Sr.x-vr.x)*(m.y-vr.y)/(Sr.y-vr.y)+vr.x&&(K=!K),bt=Math.min(bt,tp(m,vr,Sr))}return(K?1:-1)*Math.sqrt(bt)}function u$(m){for(var B=0,K=0,bt=0,Ot=m[0],Zt=0,ie=Ot.length,De=ie-1;Zt=Vo||nm.y<0||nm.y>=Vo||f$(m,nm,$x,K,bt,Ot,sl,m.layers[0],m.collisionBoxArray,B.index,B.sourceLayerIndex,m.index,na,Ka,jo,Je,Fa,bo,xs,pn,B,Zt,vr,Sr,ie)};if(_s==="line")for(var Us=0,Bu=JE(B.geometry,0,0,Vo,Vo);Us1){var id=V0(Kd,No,K.vertical||Rn,bt,pi,ba);id&&Rs(Kd,id)}}else if(B.type==="Polygon")for(var yp=0,xp=em(B.geometry,0);yp$v&&q(m.layerIds[0]+': Value for "text-size" is >= '+Wb+'. Reduce your "text-size".')):la.kind==="composite"&&(na=[ed*pn.compositeTextSizes[0].evaluate(ie,{},Rn),ed*pn.compositeTextSizes[1].evaluate(ie,{},Rn)],(na[0]>$v||na[1]>$v)&&q(m.layerIds[0]+': Value for "text-size" is >= '+Wb+'. Reduce your "text-size".')),m.addSymbols(m.text,pi,na,De,Zt,ie,vr,B,Je.lineStartIndex,Je.lineLength,nn,Rn);for(var ba=0,Fa=Sr;ba$v&&q(m.layerIds[0]+': Value for "icon-size" is >= '+Wb+'. Reduce your "icon-size".')):Lp.kind==="composite"&&(yd=[ed*Ka.compositeIconSizes[0].evaluate(ya,{},No),ed*Ka.compositeIconSizes[1].evaluate(ya,{},No)],(yd[0]>$v||yd[1]>$v)&&q(m.layerIds[0]+': Value for "icon-size" is >= '+Wb+'. Reduce your "icon-size".')),m.addSymbols(m.icon,Rd,yd,Fa,ba,ya,!1,B,_s.lineStartIndex,_s.lineLength,-1,No),Xu=m.icon.placedSymbolArray.length-1,Cp&&(Bu=Cp.length*4,m.addSymbols(m.icon,Cp,yd,Fa,ba,ya,$h.vertical,B,_s.lineStartIndex,_s.lineLength,-1,No),Dc=m.icon.placedSymbolArray.length-1)}for(var Pp in bt.horizontal){var T0=bt.horizontal[Pp];if(!Fs){Oh=Ut(T0.text);var Hg=De.layout.get("text-rotate").evaluate(ya,{},No);Fs=new d5(Je,B,vr,Sr,Yr,T0,nn,pn,Rn,Hg)}var Yv=T0.positionedLines.length===1;if(Oc+=rC(m,B,T0,Zt,De,Rn,ya,pi,_s,bt.vertical?$h.horizontal:$h.horizontalOnly,Yv?Object.keys(bt.horizontal):[Pp],Nu,Xu,Ka,No),Yv)break}bt.vertical&&(hh+=rC(m,B,bt.vertical,Zt,De,Rn,ya,pi,_s,$h.vertical,["vertical"],Nu,Dc,Ka,No));var Kv=Fs?Fs.boxStartIndex:m.collisionBoxArray.length,Xv=Fs?Fs.boxEndIndex:m.collisionBoxArray.length,$x=sl?sl.boxStartIndex:m.collisionBoxArray.length,nm=sl?sl.boxEndIndex:m.collisionBoxArray.length,y5=$s?$s.boxStartIndex:m.collisionBoxArray.length,u8=$s?$s.boxEndIndex:m.collisionBoxArray.length,x5=Rs?Rs.boxStartIndex:m.collisionBoxArray.length,c8=Rs?Rs.boxEndIndex:m.collisionBoxArray.length,W0=-1,Gx=function($b,xC){return $b&&$b.circleDiameter?Math.max($b.circleDiameter,xC):xC};W0=Gx(Fs,W0),W0=Gx(sl,W0),W0=Gx($s,W0),W0=Gx(Rs,W0);var _5=W0>-1?1:0;_5&&(W0*=jo/Er),m.glyphOffsetArray.length>=Gc.MAX_GLYPHS&&q("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),ya.sortKey!==void 0&&m.addToSortKeyRanges(m.symbolInstances.length,ya.sortKey),m.symbolInstances.emplaceBack(B.x,B.y,Nu.right>=0?Nu.right:-1,Nu.center>=0?Nu.center:-1,Nu.left>=0?Nu.left:-1,Nu.vertical||-1,Xu,Dc,Oh,Kv,Xv,$x,nm,y5,u8,x5,c8,vr,Oc,hh,Us,Bu,_5,0,nn,ih,Of,W0)}function d$(m,B,K,bt){var Ot=m.compareText;if(!(B in Ot))Ot[B]=[];else for(var Zt=Ot[B],ie=Zt.length-1;ie>=0;ie--)if(bt.dist(Zt[ie])0)&&(Zt.value.kind!=="constant"||Zt.value.value.length>0),vr=De.value.kind!=="constant"||!!De.value.value||Object.keys(De.parameters).length>0,Sr=Ot.get("symbol-sort-key");if(this.features=[],!(!Je&&!vr)){for(var Yr=B.iconDependencies,nn=B.glyphDependencies,pn=B.availableImages,Rn=new Bl(this.zoom),pi=0,la=m;pi=0;for(var Oc=0,hh=jo.sections;Oc=0;De--)Zt[De]={x:B[De].x,y:B[De].y,tileUnitDistanceFromAnchor:Ot},De>0&&(Ot+=B[De-1].dist(B[De]));for(var Je=0;Je0},Gc.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Gc.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Gc.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Gc.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Gc.prototype.addIndicesForPlacedSymbol=function(m,B){for(var K=m.placedSymbolArray.get(B),bt=K.vertexStartIndex+K.numGlyphs*4,Ot=K.vertexStartIndex;Ot1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(m),this.sortedAngle=m,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var K=0,bt=this.symbolInstanceIndexes;K=0&&Je.indexOf(ie)===De&&B.addIndicesForPlacedSymbol(B.text,ie)}),Zt.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Zt.verticalPlacedTextSymbolIndex),Zt.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Zt.placedIconSymbolIndex),Zt.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Zt.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},sr("SymbolBucket",Gc,{omit:["layers","collisionBoxArray","features","compareText"]}),Gc.MAX_GLYPHS=65535,Gc.addDynamicAttributes=i8;function v$(m,B){return B.replace(/{([^{}]+)}/g,function(K,bt){return bt in m?String(m[bt]):""})}var y$=new Za({"symbol-placement":new gn(La.layout_symbol["symbol-placement"]),"symbol-spacing":new gn(La.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new gn(La.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new ni(La.layout_symbol["symbol-sort-key"]),"symbol-z-order":new gn(La.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new gn(La.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new gn(La.layout_symbol["icon-ignore-placement"]),"icon-optional":new gn(La.layout_symbol["icon-optional"]),"icon-rotation-alignment":new gn(La.layout_symbol["icon-rotation-alignment"]),"icon-size":new ni(La.layout_symbol["icon-size"]),"icon-text-fit":new gn(La.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new gn(La.layout_symbol["icon-text-fit-padding"]),"icon-image":new ni(La.layout_symbol["icon-image"]),"icon-rotate":new ni(La.layout_symbol["icon-rotate"]),"icon-padding":new gn(La.layout_symbol["icon-padding"]),"icon-keep-upright":new gn(La.layout_symbol["icon-keep-upright"]),"icon-offset":new ni(La.layout_symbol["icon-offset"]),"icon-anchor":new ni(La.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new gn(La.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new gn(La.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new gn(La.layout_symbol["text-rotation-alignment"]),"text-field":new ni(La.layout_symbol["text-field"]),"text-font":new ni(La.layout_symbol["text-font"]),"text-size":new ni(La.layout_symbol["text-size"]),"text-max-width":new ni(La.layout_symbol["text-max-width"]),"text-line-height":new gn(La.layout_symbol["text-line-height"]),"text-letter-spacing":new ni(La.layout_symbol["text-letter-spacing"]),"text-justify":new ni(La.layout_symbol["text-justify"]),"text-radial-offset":new ni(La.layout_symbol["text-radial-offset"]),"text-variable-anchor":new gn(La.layout_symbol["text-variable-anchor"]),"text-anchor":new ni(La.layout_symbol["text-anchor"]),"text-max-angle":new gn(La.layout_symbol["text-max-angle"]),"text-writing-mode":new gn(La.layout_symbol["text-writing-mode"]),"text-rotate":new ni(La.layout_symbol["text-rotate"]),"text-padding":new gn(La.layout_symbol["text-padding"]),"text-keep-upright":new gn(La.layout_symbol["text-keep-upright"]),"text-transform":new ni(La.layout_symbol["text-transform"]),"text-offset":new ni(La.layout_symbol["text-offset"]),"text-allow-overlap":new gn(La.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new gn(La.layout_symbol["text-ignore-placement"]),"text-optional":new gn(La.layout_symbol["text-optional"])}),x$=new Za({"icon-opacity":new ni(La.paint_symbol["icon-opacity"]),"icon-color":new ni(La.paint_symbol["icon-color"]),"icon-halo-color":new ni(La.paint_symbol["icon-halo-color"]),"icon-halo-width":new ni(La.paint_symbol["icon-halo-width"]),"icon-halo-blur":new ni(La.paint_symbol["icon-halo-blur"]),"icon-translate":new gn(La.paint_symbol["icon-translate"]),"icon-translate-anchor":new gn(La.paint_symbol["icon-translate-anchor"]),"text-opacity":new ni(La.paint_symbol["text-opacity"]),"text-color":new ni(La.paint_symbol["text-color"],{runtimeType:nu,getOverride:function(m){return m.textColor},hasOverride:function(m){return!!m.textColor}}),"text-halo-color":new ni(La.paint_symbol["text-halo-color"]),"text-halo-width":new ni(La.paint_symbol["text-halo-width"]),"text-halo-blur":new ni(La.paint_symbol["text-halo-blur"]),"text-translate":new gn(La.paint_symbol["text-translate"]),"text-translate-anchor":new gn(La.paint_symbol["text-translate-anchor"])}),a8={paint:x$,layout:y$},Wx=function(m){this.type=m.property.overrides?m.property.overrides.runtimeType:Fu,this.defaultValue=m};Wx.prototype.evaluate=function(m){if(m.formattedSection){var B=this.defaultValue.property.overrides;if(B&&B.hasOverride(m.formattedSection))return B.getOverride(m.formattedSection)}return m.feature&&m.featureState?this.defaultValue.evaluate(m.feature,m.featureState):this.defaultValue.property.specification.default},Wx.prototype.eachChild=function(m){if(!this.defaultValue.isConstant()){var B=this.defaultValue.value;m(B._styleExpression.expression)}},Wx.prototype.outputDefined=function(){return!1},Wx.prototype.serialize=function(){return null},sr("FormatSectionOverride",Wx,{omit:["defaultValue"]});var _$=function(m){function B(K){m.call(this,K,a8)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.recalculate=function(K,bt){if(m.prototype.recalculate.call(this,K,bt),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var Ot=this.layout.get("text-writing-mode");if(Ot){for(var Zt=[],ie=0,De=Ot;ie",targetMapId:bt,sourceMapId:Zt.mapId})}}},qx.prototype.receive=function(m){var B=m.data,K=B.id;if(K&&!(B.targetMapId&&this.mapId!==B.targetMapId))if(B.type===""){delete this.tasks[K];var bt=this.cancelCallbacks[K];delete this.cancelCallbacks[K],bt&&bt()}else pt()||B.mustQueue?(this.tasks[K]=B,this.taskQueue.push(K),this.invoker.trigger()):this.processTask(K,B)},qx.prototype.process=function(){if(this.taskQueue.length){var m=this.taskQueue.shift(),B=this.tasks[m];delete this.tasks[m],this.taskQueue.length&&this.invoker.trigger(),B&&this.processTask(m,B)}},qx.prototype.processTask=function(m,B){var K=this;if(B.type===""){var bt=this.callbacks[m];delete this.callbacks[m],bt&&(B.error?bt(vn(B.error)):bt(null,vn(B.data)))}else{var Ot=!1,Zt=dt(this.globalScope)?void 0:[],ie=B.hasCallback?function(Yr,nn){Ot=!0,delete K.cancelCallbacks[m],K.target.postMessage({id:m,type:"",sourceMapId:K.mapId,error:Yr?Xr(Yr):null,data:Xr(nn,Zt)},Zt)}:function(Yr){Ot=!0},De=null,Je=vn(B.data);if(this.parent[B.type])De=this.parent[B.type](B.sourceMapId,Je,ie);else if(this.parent.getWorkerSource){var vr=B.type.split("."),Sr=this.parent.getWorkerSource(B.sourceMapId,vr[0],Je.source);De=Sr[vr[1]](Je,ie)}else ie(new Error("Could not find function "+B.type));!Ot&&De&&De.cancel&&(this.cancelCallbacks[m]=De.cancel)}},qx.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function P$(m,B,K){B=Math.pow(2,K)-B-1;var bt=lC(m*256,B*256,K),Ot=lC((m+1)*256,(B+1)*256,K);return bt[0]+","+bt[1]+","+Ot[0]+","+Ot[1]}function lC(m,B,K){var bt=2*Math.PI*6378137/256/Math.pow(2,K),Ot=m*bt-2*Math.PI*6378137/2,Zt=B*bt-2*Math.PI*6378137/2;return[Ot,Zt]}var rd=function(m,B){m&&(B?this.setSouthWest(m).setNorthEast(B):m.length===4?this.setSouthWest([m[0],m[1]]).setNorthEast([m[2],m[3]]):this.setSouthWest(m[0]).setNorthEast(m[1]))};rd.prototype.setNorthEast=function(m){return this._ne=m instanceof Gh?new Gh(m.lng,m.lat):Gh.convert(m),this},rd.prototype.setSouthWest=function(m){return this._sw=m instanceof Gh?new Gh(m.lng,m.lat):Gh.convert(m),this},rd.prototype.extend=function(m){var B=this._sw,K=this._ne,bt,Ot;if(m instanceof Gh)bt=m,Ot=m;else if(m instanceof rd){if(bt=m._sw,Ot=m._ne,!bt||!Ot)return this}else{if(Array.isArray(m))if(m.length===4||m.every(Array.isArray)){var Zt=m;return this.extend(rd.convert(Zt))}else{var ie=m;return this.extend(Gh.convert(ie))}return this}return!B&&!K?(this._sw=new Gh(bt.lng,bt.lat),this._ne=new Gh(Ot.lng,Ot.lat)):(B.lng=Math.min(bt.lng,B.lng),B.lat=Math.min(bt.lat,B.lat),K.lng=Math.max(Ot.lng,K.lng),K.lat=Math.max(Ot.lat,K.lat)),this},rd.prototype.getCenter=function(){return new Gh((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},rd.prototype.getSouthWest=function(){return this._sw},rd.prototype.getNorthEast=function(){return this._ne},rd.prototype.getNorthWest=function(){return new Gh(this.getWest(),this.getNorth())},rd.prototype.getSouthEast=function(){return new Gh(this.getEast(),this.getSouth())},rd.prototype.getWest=function(){return this._sw.lng},rd.prototype.getSouth=function(){return this._sw.lat},rd.prototype.getEast=function(){return this._ne.lng},rd.prototype.getNorth=function(){return this._ne.lat},rd.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},rd.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},rd.prototype.isEmpty=function(){return!(this._sw&&this._ne)},rd.prototype.contains=function(m){var B=Gh.convert(m),K=B.lng,bt=B.lat,Ot=this._sw.lat<=bt&&bt<=this._ne.lat,Zt=this._sw.lng<=K&&K<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Zt=this._sw.lng>=K&&K>=this._ne.lng),Ot&&Zt},rd.convert=function(m){return!m||m instanceof rd?m:new rd(m)};var uC=63710088e-1,Gh=function(m,B){if(isNaN(m)||isNaN(B))throw new Error("Invalid LngLat object: ("+m+", "+B+")");if(this.lng=+m,this.lat=+B,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Gh.prototype.wrap=function(){return new Gh(b(this.lng,-180,180),this.lat)},Gh.prototype.toArray=function(){return[this.lng,this.lat]},Gh.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Gh.prototype.distanceTo=function(m){var B=Math.PI/180,K=this.lat*B,bt=m.lat*B,Ot=Math.sin(K)*Math.sin(bt)+Math.cos(K)*Math.cos(bt)*Math.cos((m.lng-this.lng)*B),Zt=uC*Math.acos(Math.min(Ot,1));return Zt},Gh.prototype.toBounds=function(m){m===void 0&&(m=0);var B=40075017,K=360*m/B,bt=K/Math.cos(Math.PI/180*this.lat);return new rd(new Gh(this.lng-bt,this.lat-K),new Gh(this.lng+bt,this.lat+K))},Gh.convert=function(m){if(m instanceof Gh)return m;if(Array.isArray(m)&&(m.length===2||m.length===3))return new Gh(Number(m[0]),Number(m[1]));if(!Array.isArray(m)&&typeof m=="object"&&m!==null)return new Gh(Number("lng"in m?m.lng:m.lon),Number(m.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var cC=2*Math.PI*uC;function hC(m){return cC*Math.cos(m*Math.PI/180)}function fC(m){return(180+m)/360}function dC(m){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+m*Math.PI/360)))/360}function pC(m,B){return m/hC(B)}function z$(m){return m*360-180}function s8(m){var B=180-m*360;return 360/Math.PI*Math.atan(Math.exp(B*Math.PI/180))-90}function I$(m,B){return m*hC(s8(B))}function O$(m){return 1/Math.cos(m*Math.PI/180)}var ey=function(m,B,K){K===void 0&&(K=0),this.x=+m,this.y=+B,this.z=+K};ey.fromLngLat=function(m,B){B===void 0&&(B=0);var K=Gh.convert(m);return new ey(fC(K.lng),dC(K.lat),pC(B,K.lat))},ey.prototype.toLngLat=function(){return new Gh(z$(this.x),s8(this.y))},ey.prototype.toAltitude=function(){return I$(this.z,this.y)},ey.prototype.meterInMercatorCoordinateUnits=function(){return 1/cC*O$(s8(this.y))};var ry=function(m,B,K){this.z=m,this.x=B,this.y=K,this.key=Zb(0,m,m,B,K)};ry.prototype.equals=function(m){return this.z===m.z&&this.x===m.x&&this.y===m.y},ry.prototype.url=function(m,B){var K=P$(this.x,this.y,this.z),bt=D$(this.z,this.x,this.y);return m[(this.x+this.y)%m.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(B==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",bt).replace("{bbox-epsg-3857}",K)},ry.prototype.getTilePoint=function(m){var B=Math.pow(2,this.z);return new o((m.x*B-this.x)*Vo,(m.y*B-this.y)*Vo)},ry.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var mC=function(m,B){this.wrap=m,this.canonical=B,this.key=Zb(m,B.z,B.z,B.x,B.y)},nd=function(m,B,K,bt,Ot){this.overscaledZ=m,this.wrap=B,this.canonical=new ry(K,+bt,+Ot),this.key=Zb(B,m,K,bt,Ot)};nd.prototype.equals=function(m){return this.overscaledZ===m.overscaledZ&&this.wrap===m.wrap&&this.canonical.equals(m.canonical)},nd.prototype.scaledTo=function(m){var B=this.canonical.z-m;return m>this.canonical.z?new nd(m,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new nd(m,this.wrap,m,this.canonical.x>>B,this.canonical.y>>B)},nd.prototype.calculateScaledKey=function(m,B){var K=this.canonical.z-m;return m>this.canonical.z?Zb(this.wrap*+B,m,this.canonical.z,this.canonical.x,this.canonical.y):Zb(this.wrap*+B,m,m,this.canonical.x>>K,this.canonical.y>>K)},nd.prototype.isChildOf=function(m){if(m.wrap!==this.wrap)return!1;var B=this.canonical.z-m.canonical.z;return m.overscaledZ===0||m.overscaledZ>B&&m.canonical.y===this.canonical.y>>B},nd.prototype.children=function(m){if(this.overscaledZ>=m)return[new nd(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var B=this.canonical.z+1,K=this.canonical.x*2,bt=this.canonical.y*2;return[new nd(B,this.wrap,B,K,bt),new nd(B,this.wrap,B,K+1,bt),new nd(B,this.wrap,B,K,bt+1),new nd(B,this.wrap,B,K+1,bt+1)]},nd.prototype.isLessThan=function(m){return this.wrapm.wrap?!1:this.overscaledZm.overscaledZ?!1:this.canonical.xm.canonical.x?!1:this.canonical.y0;Zt--)Ot=1<=this.dim+1||B<-1||B>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(B+1)*this.stride+(m+1)},Ug.prototype._unpackMapbox=function(m,B,K){return(m*256*256+B*256+K)/10-1e4},Ug.prototype._unpackTerrarium=function(m,B,K){return m*256+B+K/256-32768},Ug.prototype.getPixels=function(){return new Zd({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Ug.prototype.backfillBorder=function(m,B,K){if(this.dim!==m.dim)throw new Error("dem dimension mismatch");var bt=B*this.dim,Ot=B*this.dim+this.dim,Zt=K*this.dim,ie=K*this.dim+this.dim;switch(B){case-1:bt=Ot-1;break;case 1:Ot=bt+1;break}switch(K){case-1:Zt=ie-1;break;case 1:ie=Zt+1;break}for(var De=-B*this.dim,Je=-K*this.dim,vr=Zt;vr=0&&Sr[3]>=0&&De.insert(ie,Sr[0],Sr[1],Sr[2],Sr[3])}},Vg.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ng.VectorTile(new Ln(this.rawTileData)).layers,this.sourceLayerCoder=new g5(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Vg.prototype.query=function(m,B,K,bt){var Ot=this;this.loadVTLayers();for(var Zt=m.params||{},ie=Vo/m.tileSize/m.scale,De=ae(Zt.filter),Je=m.queryGeometry,vr=m.queryPadding*ie,Sr=vC(Je),Yr=this.grid.query(Sr.minX-vr,Sr.minY-vr,Sr.maxX+vr,Sr.maxY+vr),nn=vC(m.cameraQueryGeometry),pn=this.grid3D.query(nn.minX-vr,nn.minY-vr,nn.maxX+vr,nn.maxY+vr,function(Ka,bo,No,jo){return Q0(m.cameraQueryGeometry,Ka-vr,bo-vr,No+vr,jo+vr)}),Rn=0,pi=pn;Rnbt)Ot=!1;else if(!B)Ot=!0;else if(this.expirationTime=Br.maxzoom)&&Br.visibility!=="none"){f($r,this.zoom,fr);var Gr=ci[Br.id]=Br.createBucket({index:Mn.bucketLayerIDs.length,layers:$r,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ui,sourceID:this.source});Gr.populate(Pa,xi,this.tileID.canonical),Mn.bucketLayerIDs.push($r.map(function(Pn){return Pn.id}))}}}}var dn,an,Ee,dr,Vr=t.mapObject(xi.glyphDependencies,function(Pn){return Object.keys(Pn).map(Number)});Object.keys(Vr).length?xr.send("getGlyphs",{uid:this.uid,stacks:Vr},function(Pn,En){dn||(dn=Pn,an=En,Xn.call(Cn))}):an={};var yn=Object.keys(xi.iconDependencies);yn.length?xr.send("getImages",{icons:yn,source:this.source,tileID:this.tileID,type:"icons"},function(Pn,En){dn||(dn=Pn,Ee=En,Xn.call(Cn))}):Ee={};var Fn=Object.keys(xi.patternDependencies);Fn.length?xr.send("getImages",{icons:Fn,source:this.source,tileID:this.tileID,type:"patterns"},function(Pn,En){dn||(dn=Pn,dr=En,Xn.call(Cn))}):dr={},Xn.call(this);function Xn(){if(dn)return Qr(dn);if(an&&Ee&&dr){var Pn=new i(an),En=new t.ImageAtlas(Ee,dr);for(var Zn in ci){var Ca=ci[Zn];Ca instanceof t.SymbolBucket?(f(Ca.layers,this.zoom,fr),t.performSymbolLayout(Ca,an,Pn.positions,Ee,En.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Ca.hasPattern&&(Ca instanceof t.LineBucket||Ca instanceof t.FillBucket||Ca instanceof t.FillExtrusionBucket)&&(f(Ca.layers,this.zoom,fr),Ca.addFeatures(xi,this.tileID.canonical,En.patternPositions))}this.status="done",Qr(null,{buckets:t.values(ci).filter(function(Ri){return!Ri.isEmpty()}),featureIndex:Mn,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Pn.image,imageAtlas:En,glyphMap:this.returnDependencies?an:null,iconMap:this.returnDependencies?Ee:null,glyphPositions:this.returnDependencies?Pn.positions:null})}}};function f(We,rr,fr){for(var xr=new t.EvaluationParameters(rr),Qr=0,Cn=We;Qr=0!=!!rr&&We.reverse()}var M=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,E=function(We){this._feature=We,this.extent=t.EXTENT,this.type=We.type,this.properties=We.tags,"id"in We&&!isNaN(We.id)&&(this.id=parseInt(We.id,10))};E.prototype.loadGeometry=function(){if(this._feature.type===1){for(var We=[],rr=0,fr=this._feature.geometry;rr"u"&&(xr.push(Mn),ci=xr.length-1,Cn[Mn]=ci),rr.writeVarint(ci);var xi=fr.properties[Mn],Pi=typeof xi;Pi!=="string"&&Pi!=="boolean"&&Pi!=="number"&&(xi=JSON.stringify(xi));var Di=Pi+":"+xi,Zi=wn[Di];typeof Zi>"u"&&(Qr.push(xi),Zi=Qr.length-1,wn[Di]=Zi),rr.writeVarint(Zi)}}function lt(We,rr){return(rr<<3)+(We&7)}function yt(We){return We<<1^We>>31}function pt(We,rr){for(var fr=We.loadGeometry(),xr=We.type,Qr=0,Cn=0,wn=fr.length,Mn=0;Mn>1;dt(We,rr,wn,xr,Qr,Cn%2),tt(We,rr,fr,xr,wn-1,Cn+1),tt(We,rr,fr,wn+1,Qr,Cn+1)}}function dt(We,rr,fr,xr,Qr,Cn){for(;Qr>xr;){if(Qr-xr>600){var wn=Qr-xr+1,Mn=fr-xr+1,ci=Math.log(wn),xi=.5*Math.exp(2*ci/3),Pi=.5*Math.sqrt(ci*xi*(wn-xi)/wn)*(Mn-wn/2<0?-1:1),Di=Math.max(xr,Math.floor(fr-Mn*xi/wn+Pi)),Zi=Math.min(Qr,Math.floor(fr+(wn-Mn)*xi/wn+Pi));dt(We,rr,fr,Di,Zi,Cn)}var ui=rr[2*fr+Cn],Pa=xr,Wa=Qr;for(rt(We,rr,xr,fr),rr[2*Qr+Cn]>ui&&rt(We,rr,xr,Qr);Paui;)Wa--}rr[2*xr+Cn]===ui?rt(We,rr,xr,Wa):(Wa++,rt(We,rr,Wa,Qr)),Wa<=fr&&(xr=Wa+1),fr<=Wa&&(Qr=Wa-1)}}function rt(We,rr,fr,xr){at(We,fr,xr),at(rr,2*fr,2*xr),at(rr,2*fr+1,2*xr+1)}function at(We,rr,fr){var xr=We[rr];We[rr]=We[fr],We[fr]=xr}function vt(We,rr,fr,xr,Qr,Cn,wn){for(var Mn=[0,We.length-1,0],ci=[],xi,Pi;Mn.length;){var Di=Mn.pop(),Zi=Mn.pop(),ui=Mn.pop();if(Zi-ui<=wn){for(var Pa=ui;Pa<=Zi;Pa++)xi=rr[2*Pa],Pi=rr[2*Pa+1],xi>=fr&&xi<=Qr&&Pi>=xr&&Pi<=Cn&&ci.push(We[Pa]);continue}var Wa=Math.floor((ui+Zi)/2);xi=rr[2*Wa],Pi=rr[2*Wa+1],xi>=fr&&xi<=Qr&&Pi>=xr&&Pi<=Cn&&ci.push(We[Wa]);var ze=(Di+1)%2;(Di===0?fr<=xi:xr<=Pi)&&(Mn.push(ui),Mn.push(Wa-1),Mn.push(ze)),(Di===0?Qr>=xi:Cn>=Pi)&&(Mn.push(Wa+1),Mn.push(Zi),Mn.push(ze))}return ci}function it(We,rr,fr,xr,Qr,Cn){for(var wn=[0,We.length-1,0],Mn=[],ci=Qr*Qr;wn.length;){var xi=wn.pop(),Pi=wn.pop(),Di=wn.pop();if(Pi-Di<=Cn){for(var Zi=Di;Zi<=Pi;Zi++)Y(rr[2*Zi],rr[2*Zi+1],fr,xr)<=ci&&Mn.push(We[Zi]);continue}var ui=Math.floor((Di+Pi)/2),Pa=rr[2*ui],Wa=rr[2*ui+1];Y(Pa,Wa,fr,xr)<=ci&&Mn.push(We[ui]);var ze=(xi+1)%2;(xi===0?fr-Qr<=Pa:xr-Qr<=Wa)&&(wn.push(Di),wn.push(ui-1),wn.push(ze)),(xi===0?fr+Qr>=Pa:xr+Qr>=Wa)&&(wn.push(ui+1),wn.push(Pi),wn.push(ze))}return Mn}function Y(We,rr,fr,xr){var Qr=We-fr,Cn=rr-xr;return Qr*Qr+Cn*Cn}var ft=function(We){return We[0]},ut=function(We){return We[1]},wt=function(We,rr,fr,xr,Qr){rr===void 0&&(rr=ft),fr===void 0&&(fr=ut),xr===void 0&&(xr=64),Qr===void 0&&(Qr=Float64Array),this.nodeSize=xr,this.points=We;for(var Cn=We.length<65536?Uint16Array:Uint32Array,wn=this.ids=new Cn(We.length),Mn=this.coords=new Qr(We.length*2),ci=0;ci=xr;xi--){var Pi=+Date.now();Mn=this._cluster(Mn,xi),this.trees[xi]=new wt(Mn,Mt,te,Cn,Float32Array),fr&&console.log("z%d: %d clusters in %dms",xi,Mn.length,+Date.now()-Pi)}return fr&&console.timeEnd("total time"),this},Pt.prototype.getClusters=function(We,rr){var fr=((We[0]+180)%360+360)%360-180,xr=Math.max(-90,Math.min(90,We[1])),Qr=We[2]===180?180:((We[2]+180)%360+360)%360-180,Cn=Math.max(-90,Math.min(90,We[3]));if(We[2]-We[0]>=360)fr=-180,Qr=180;else if(fr>Qr){var wn=this.getClusters([fr,xr,180,Cn],rr),Mn=this.getClusters([-180,xr,Qr,Cn],rr);return wn.concat(Mn)}for(var ci=this.trees[this._limitZoom(rr)],xi=ci.range(he(fr),de(Cn),he(Qr),de(xr)),Pi=[],Di=0,Zi=xi;Dirr&&(Pa+=Rr.numPoints||1)}if(Pa>=Mn){for(var qr=Pi.x*ui,$r=Pi.y*ui,Br=wn&&ui>1?this._map(Pi,!0):null,Gr=(xi<<5)+(rr+1)+this.points.length,dn=0,an=Zi;dn1)for(var yn=0,Fn=Zi;yn>5},Pt.prototype._getOriginZoom=function(We){return(We-this.points.length)%32},Pt.prototype._map=function(We,rr){if(We.numPoints)return rr?Lt({},We.properties):We.properties;var fr=this.points[We.index].properties,xr=this.options.map(fr);return rr&&xr===fr?Lt({},xr):xr};function Wt(We,rr,fr,xr,Qr){return{x:We,y:rr,zoom:1/0,id:fr,parentId:-1,numPoints:xr,properties:Qr}}function Ht(We,rr){var fr=We.geometry.coordinates,xr=fr[0],Qr=fr[1];return{x:he(xr),y:de(Qr),zoom:1/0,index:rr,parentId:-1}}function Jt(We){return{type:"Feature",id:We.id,properties:ge(We),geometry:{type:"Point",coordinates:[se(We.x),Tt(We.y)]}}}function ge(We){var rr=We.numPoints,fr=rr>=1e4?Math.round(rr/1e3)+"k":rr>=1e3?Math.round(rr/100)/10+"k":rr;return Lt(Lt({},We.properties),{cluster:!0,cluster_id:We.id,point_count:rr,point_count_abbreviated:fr})}function he(We){return We/360+.5}function de(We){var rr=Math.sin(We*Math.PI/180),fr=.5-.25*Math.log((1+rr)/(1-rr))/Math.PI;return fr<0?0:fr>1?1:fr}function se(We){return(We-.5)*360}function Tt(We){var rr=(180-We*360)*Math.PI/180;return 360*Math.atan(Math.exp(rr))/Math.PI-90}function Lt(We,rr){for(var fr in rr)We[fr]=rr[fr];return We}function Mt(We){return We.x}function te(We){return We.y}function ve(We,rr,fr,xr){for(var Qr=xr,Cn=fr-rr>>1,wn=fr-rr,Mn,ci=We[rr],xi=We[rr+1],Pi=We[fr],Di=We[fr+1],Zi=rr+3;ZiQr)Mn=Zi,Qr=ui;else if(ui===Qr){var Pa=Math.abs(Zi-Cn);Paxr&&(Mn-rr>3&&ve(We,rr,Mn,xr),We[Mn+2]=Qr,fr-Mn>3&&ve(We,Mn,fr,xr))}function oe(We,rr,fr,xr,Qr,Cn){var wn=Qr-fr,Mn=Cn-xr;if(wn!==0||Mn!==0){var ci=((We-fr)*wn+(rr-xr)*Mn)/(wn*wn+Mn*Mn);ci>1?(fr=Qr,xr=Cn):ci>0&&(fr+=wn*ci,xr+=Mn*ci)}return wn=We-fr,Mn=rr-xr,wn*wn+Mn*Mn}function Te(We,rr,fr,xr){var Qr={id:typeof We>"u"?null:We,type:rr,geometry:fr,tags:xr,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return He(Qr),Qr}function He(We){var rr=We.geometry,fr=We.type;if(fr==="Point"||fr==="MultiPoint"||fr==="LineString")Ge(We,rr);else if(fr==="Polygon"||fr==="MultiLineString")for(var xr=0;xr0&&(xr?wn+=(Qr*xi-ci*Cn)/2:wn+=Math.sqrt(Math.pow(ci-Qr,2)+Math.pow(xi-Cn,2))),Qr=ci,Cn=xi}var Pi=rr.length-3;rr[2]=1,ve(rr,0,Pi,fr),rr[Pi+2]=1,rr.size=Math.abs(wn),rr.start=0,rr.end=rr.size}function br(We,rr,fr,xr){for(var Qr=0;Qr1?1:fr}function Ce(We,rr,fr,xr,Qr,Cn,wn,Mn){if(fr/=rr,xr/=rr,Cn>=fr&&wn=xr)return null;for(var ci=[],xi=0;xi=fr&&Pa=xr)continue;var Wa=[];if(Zi==="Point"||Zi==="MultiPoint")$t(Di,Wa,fr,xr,Qr);else if(Zi==="LineString")ne(Di,Wa,fr,xr,Qr,!1,Mn.lineMetrics);else if(Zi==="MultiLineString")gt(Di,Wa,fr,xr,Qr,!1);else if(Zi==="Polygon")gt(Di,Wa,fr,xr,Qr,!0);else if(Zi==="MultiPolygon")for(var ze=0;ze=fr&&wn<=xr&&(rr.push(We[Cn]),rr.push(We[Cn+1]),rr.push(We[Cn+2]))}}function ne(We,rr,fr,xr,Qr,Cn,wn){for(var Mn=Ct(We),ci=Qr===0?Nt:ee,xi=We.start,Pi,Di,Zi=0;Zifr&&(Di=ci(Mn,ui,Pa,ze,Pe,fr),wn&&(Mn.start=xi+Pi*Di)):Rr>xr?qr=fr&&(Di=ci(Mn,ui,Pa,ze,Pe,fr),$r=!0),qr>xr&&Rr<=xr&&(Di=ci(Mn,ui,Pa,ze,Pe,xr),$r=!0),!Cn&&$r&&(wn&&(Mn.end=xi+Pi*Di),rr.push(Mn),Mn=Ct(We)),wn&&(xi+=Pi)}var Br=We.length-3;ui=We[Br],Pa=We[Br+1],Wa=We[Br+2],Rr=Qr===0?ui:Pa,Rr>=fr&&Rr<=xr&&St(Mn,ui,Pa,Wa),Br=Mn.length-3,Cn&&Br>=3&&(Mn[Br]!==Mn[0]||Mn[Br+1]!==Mn[1])&&St(Mn,Mn[0],Mn[1],Mn[2]),Mn.length&&rr.push(Mn)}function Ct(We){var rr=[];return rr.size=We.size,rr.start=We.start,rr.end=We.end,rr}function gt(We,rr,fr,xr,Qr,Cn){for(var wn=0;wnwn.maxX&&(wn.maxX=Pi),Di>wn.maxY&&(wn.maxY=Di)}return wn}function Tr(We,rr,fr,xr){var Qr=rr.geometry,Cn=rr.type,wn=[];if(Cn==="Point"||Cn==="MultiPoint")for(var Mn=0;Mn0&&rr.size<(Qr?wn:xr)){fr.numPoints+=rr.length/3;return}for(var Mn=[],ci=0;ciwn)&&(fr.numSimplified++,Mn.push(rr[ci]),Mn.push(rr[ci+1])),fr.numPoints++;Qr&&Jr(Mn,Cn),We.push(Mn)}function Jr(We,rr){for(var fr=0,xr=0,Qr=We.length,Cn=Qr-2;xr0===rr)for(xr=0,Qr=We.length;xr24)throw new Error("maxZoom should be in the 0-24 range");if(rr.promoteId&&rr.generateId)throw new Error("promoteId and generateId cannot be used together.");var xr=cr(We,rr);this.tiles={},this.tileCoords=[],fr&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",rr.indexMaxZoom,rr.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),xr=le(xr,rr),xr.length&&this.splitTile(xr,0,0,0),fr&&(xr.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}Hn.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Hn.prototype.splitTile=function(We,rr,fr,xr,Qr,Cn,wn){for(var Mn=[We,rr,fr,xr],ci=this.options,xi=ci.debug;Mn.length;){xr=Mn.pop(),fr=Mn.pop(),rr=Mn.pop(),We=Mn.pop();var Pi=1<1&&console.time("creation"),Zi=this.tiles[Di]=Ar(We,rr,fr,xr,ci),this.tileCoords.push({z:rr,x:fr,y:xr}),xi)){xi>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",rr,fr,xr,Zi.numFeatures,Zi.numPoints,Zi.numSimplified),console.timeEnd("creation"));var ui="z"+rr;this.stats[ui]=(this.stats[ui]||0)+1,this.total++}if(Zi.source=We,Qr){if(rr===ci.maxZoom||rr===Qr)continue;var Pa=1<1&&console.time("clipping");var Wa=.5*ci.buffer/ci.extent,ze=.5-Wa,Pe=.5+Wa,Rr=1+Wa,qr,$r,Br,Gr,dn,an;qr=$r=Br=Gr=null,dn=Ce(We,Pi,fr-Wa,fr+Pe,0,Zi.minX,Zi.maxX,ci),an=Ce(We,Pi,fr+ze,fr+Rr,0,Zi.minX,Zi.maxX,ci),We=null,dn&&(qr=Ce(dn,Pi,xr-Wa,xr+Pe,1,Zi.minY,Zi.maxY,ci),$r=Ce(dn,Pi,xr+ze,xr+Rr,1,Zi.minY,Zi.maxY,ci),dn=null),an&&(Br=Ce(an,Pi,xr-Wa,xr+Pe,1,Zi.minY,Zi.maxY,ci),Gr=Ce(an,Pi,xr+ze,xr+Rr,1,Zi.minY,Zi.maxY,ci),an=null),xi>1&&console.timeEnd("clipping"),Mn.push(qr||[],rr+1,fr*2,xr*2),Mn.push($r||[],rr+1,fr*2,xr*2+1),Mn.push(Br||[],rr+1,fr*2+1,xr*2),Mn.push(Gr||[],rr+1,fr*2+1,xr*2+1)}}},Hn.prototype.getTile=function(We,rr,fr){var xr=this.options,Qr=xr.extent,Cn=xr.debug;if(We<0||We>24)return null;var wn=1<1&&console.log("drilling down to z%d-%d-%d",We,rr,fr);for(var ci=We,xi=rr,Pi=fr,Di;!Di&&ci>0;)ci--,xi=Math.floor(xi/2),Pi=Math.floor(Pi/2),Di=this.tiles[Kn(ci,xi,Pi)];return!Di||!Di.source?null:(Cn>1&&console.log("found parent tile z%d-%d-%d",ci,xi,Pi),Cn>1&&console.time("drilling down"),this.splitTile(Di.source,ci,xi,Pi,We,rr,fr),Cn>1&&console.timeEnd("drilling down"),this.tiles[Mn]?qe(this.tiles[Mn],Qr):null)};function Kn(We,rr,fr){return((1<=0?0:Z.button},r.remove=function(Z){Z.parentNode&&Z.parentNode.removeChild(Z)};function v(Z,ot,et){var xt,Ut,fe,ye=t.browser.devicePixelRatio>1?"@2x":"",Yt=t.getJSON(ot.transformRequest(ot.normalizeSpriteURL(Z,ye,".json"),t.ResourceType.SpriteJSON),function(nr,Ye){Yt=null,fe||(fe=nr,xt=Ye,Se())}),ce=t.getImage(ot.transformRequest(ot.normalizeSpriteURL(Z,ye,".png"),t.ResourceType.SpriteImage),function(nr,Ye){ce=null,fe||(fe=nr,Ut=Ye,Se())});function Se(){if(fe)et(fe);else if(xt&&Ut){var nr=t.browser.getImageData(Ut),Ye={};for(var tr in xt){var lr=xt[tr],hr=lr.width,Ve=lr.height,Xe=lr.x,$e=lr.y,Cr=lr.sdf,on=lr.pixelRatio,fn=lr.stretchX,fi=lr.stretchY,si=lr.content,Gn=new t.RGBAImage({width:hr,height:Ve});t.RGBAImage.copy(nr,Gn,{x:Xe,y:$e},{x:0,y:0},{width:hr,height:Ve}),Ye[tr]={data:Gn,pixelRatio:on,sdf:Cr,stretchX:fn,stretchY:fi,content:si}}et(null,Ye)}}return{cancel:function(){Yt&&(Yt.cancel(),Yt=null),ce&&(ce.cancel(),ce=null)}}}function T(Z){var ot=Z.userImage;if(ot&&ot.render){var et=ot.render();if(et)return Z.data.replace(new Uint8Array(ot.data.buffer)),!0}return!1}var u=1,b=function(Z){function ot(){Z.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return Z&&(ot.__proto__=Z),ot.prototype=Object.create(Z&&Z.prototype),ot.prototype.constructor=ot,ot.prototype.isLoaded=function(){return this.loaded},ot.prototype.setLoaded=function(et){if(this.loaded!==et&&(this.loaded=et,et)){for(var xt=0,Ut=this.requestors;xt=0?1.2:1))}A.prototype.draw=function(Z){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(Z,this.buffer,this.middle);for(var ot=this.ctx.getImageData(0,0,this.size,this.size),et=new Uint8ClampedArray(this.size*this.size),xt=0;xt65535){Se(new Error("glyphs > 65535 not supported"));return}if(tr.ranges[hr]){Se(null,{stack:nr,id:Ye,glyph:lr});return}var Ve=tr.requests[hr];Ve||(Ve=tr.requests[hr]=[],k.loadGlyphRange(nr,hr,et.url,et.requestManager,function(Xe,$e){if($e){for(var Cr in $e)et._doesCharSupportLocalGlyph(+Cr)||(tr.glyphs[+Cr]=$e[+Cr]);tr.ranges[hr]=!0}for(var on=0,fn=Ve;on1&&(ce=Z[++Yt]);var nr=Math.abs(Se-ce.left),Ye=Math.abs(Se-ce.right),tr=Math.min(nr,Ye),lr=void 0,hr=Ut/et*(xt+1);if(ce.isDash){var Ve=xt-Math.abs(hr);lr=Math.sqrt(tr*tr+Ve*Ve)}else lr=xt-Math.sqrt(tr*tr+hr*hr);this.data[ye+Se]=Math.max(0,Math.min(255,lr+128))}},V.prototype.addRegularDash=function(Z){for(var ot=Z.length-1;ot>=0;--ot){var et=Z[ot],xt=Z[ot+1];et.zeroLength?Z.splice(ot,1):xt&&xt.isDash===et.isDash&&(xt.left=et.left,Z.splice(ot,1))}var Ut=Z[0],fe=Z[Z.length-1];Ut.isDash===fe.isDash&&(Ut.left=fe.left-this.width,fe.right=Ut.right+this.width);for(var ye=this.width*this.nextRow,Yt=0,ce=Z[Yt],Se=0;Se1&&(ce=Z[++Yt]);var nr=Math.abs(Se-ce.left),Ye=Math.abs(Se-ce.right),tr=Math.min(nr,Ye),lr=ce.isDash?tr:-tr;this.data[ye+Se]=Math.max(0,Math.min(255,lr+128))}},V.prototype.addDash=function(Z,ot){var et=ot?7:0,xt=2*et+1;if(this.nextRow+xt>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var Ut=0,fe=0;fe=et.minX&&Z.x=et.minY&&Z.y0&&(Se[new t.OverscaledTileID(et.overscaledZ,ye,xt.z,fe,xt.y-1).key]={backfilled:!1},Se[new t.OverscaledTileID(et.overscaledZ,et.wrap,xt.z,xt.x,xt.y-1).key]={backfilled:!1},Se[new t.OverscaledTileID(et.overscaledZ,ce,xt.z,Yt,xt.y-1).key]={backfilled:!1}),xt.y+10&&(Ut.resourceTiming=et._resourceTiming,et._resourceTiming=[]),et.fire(new t.Event("data",Ut))})},ot.prototype.onAdd=function(et){this.map=et,this.load()},ot.prototype.setData=function(et){var xt=this;return this._data=et,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Ut){if(Ut){xt.fire(new t.ErrorEvent(Ut));return}var fe={dataType:"source",sourceDataType:"content"};xt._collectResourceTiming&&xt._resourceTiming&&xt._resourceTiming.length>0&&(fe.resourceTiming=xt._resourceTiming,xt._resourceTiming=[]),xt.fire(new t.Event("data",fe))}),this},ot.prototype.getClusterExpansionZoom=function(et,xt){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:et,source:this.id},xt),this},ot.prototype.getClusterChildren=function(et,xt){return this.actor.send("geojson.getClusterChildren",{clusterId:et,source:this.id},xt),this},ot.prototype.getClusterLeaves=function(et,xt,Ut,fe){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:et,limit:xt,offset:Ut},fe),this},ot.prototype._updateWorkerData=function(et){var xt=this;this._loaded=!1;var Ut=t.extend({},this.workerOptions),fe=this._data;typeof fe=="string"?(Ut.request=this.map._requestManager.transformRequest(t.browser.resolveURL(fe),t.ResourceType.Source),Ut.request.collectResourceTiming=this._collectResourceTiming):Ut.data=JSON.stringify(fe),this.actor.send(this.type+".loadData",Ut,function(ye,Yt){xt._removed||Yt&&Yt.abandoned||(xt._loaded=!0,Yt&&Yt.resourceTiming&&Yt.resourceTiming[xt.id]&&(xt._resourceTiming=Yt.resourceTiming[xt.id].slice(0)),xt.actor.send(xt.type+".coalesce",{source:Ut.source},null),et(ye))})},ot.prototype.loaded=function(){return this._loaded},ot.prototype.loadTile=function(et,xt){var Ut=this,fe=et.actor?"reloadTile":"loadTile";et.actor=this.actor;var ye={type:this.type,uid:et.uid,tileID:et.tileID,zoom:et.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};et.request=this.actor.send(fe,ye,function(Yt,ce){return delete et.request,et.unloadVectorData(),et.aborted?xt(null):Yt?xt(Yt):(et.loadVectorData(ce,Ut.map.painter,fe==="reloadTile"),xt(null))})},ot.prototype.abortTile=function(et){et.request&&(et.request.cancel(),delete et.request),et.aborted=!0},ot.prototype.unloadTile=function(et){et.unloadVectorData(),this.actor.send("removeTile",{uid:et.uid,type:this.type,source:this.id})},ot.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},ot.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},ot.prototype.hasTransition=function(){return!1},ot}(t.Evented),yt=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),pt=function(Z){function ot(et,xt,Ut,fe){Z.call(this),this.id=et,this.dispatcher=Ut,this.coordinates=xt.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(fe),this.options=xt}return Z&&(ot.__proto__=Z),ot.prototype=Object.create(Z&&Z.prototype),ot.prototype.constructor=ot,ot.prototype.load=function(et,xt){var Ut=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),function(fe,ye){Ut._loaded=!0,fe?Ut.fire(new t.ErrorEvent(fe)):ye&&(Ut.image=ye,et&&(Ut.coordinates=et),xt&&xt(),Ut._finishLoading())})},ot.prototype.loaded=function(){return this._loaded},ot.prototype.updateImage=function(et){var xt=this;return!this.image||!et.url?this:(this.options.url=et.url,this.load(et.coordinates,function(){xt.texture=null}),this)},ot.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},ot.prototype.onAdd=function(et){this.map=et,this.load()},ot.prototype.setCoordinates=function(et){var xt=this;this.coordinates=et;var Ut=et.map(t.MercatorCoordinate.fromLngLat);this.tileID=st(Ut),this.minzoom=this.maxzoom=this.tileID.z;var fe=Ut.map(function(ye){return xt.tileID.getTilePoint(ye)._round()});return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(fe[0].x,fe[0].y,0,0),this._boundsArray.emplaceBack(fe[1].x,fe[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(fe[3].x,fe[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(fe[2].x,fe[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},ot.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var et=this.map.painter.context,xt=et.gl;this.boundsBuffer||(this.boundsBuffer=et.createVertexBuffer(this._boundsArray,yt.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new t.Texture(et,this.image,xt.RGBA),this.texture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE));for(var Ut in this.tiles){var fe=this.tiles[Ut];fe.state!=="loaded"&&(fe.state="loaded",fe.texture=this.texture)}}},ot.prototype.loadTile=function(et,xt){this.tileID&&this.tileID.equals(et.tileID.canonical)?(this.tiles[String(et.tileID.wrap)]=et,et.buckets={},xt(null)):(et.state="errored",xt(null))},ot.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},ot.prototype.hasTransition=function(){return!1},ot}(t.Evented);function st(Z){for(var ot=1/0,et=1/0,xt=-1/0,Ut=-1/0,fe=0,ye=Z;fext.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+xt.start(0)+" and "+xt.end(0)+"-second mark."))):this.video.currentTime=et}},ot.prototype.getVideo=function(){return this.video},ot.prototype.onAdd=function(et){this.map||(this.map=et,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},ot.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var et=this.map.painter.context,xt=et.gl;this.boundsBuffer||(this.boundsBuffer=et.createVertexBuffer(this._boundsArray,yt.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE),xt.texSubImage2D(xt.TEXTURE_2D,0,0,0,xt.RGBA,xt.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(et,this.video,xt.RGBA),this.texture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE));for(var Ut in this.tiles){var fe=this.tiles[Ut];fe.state!=="loaded"&&(fe.state="loaded",fe.texture=this.texture)}}},ot.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},ot.prototype.hasTransition=function(){return this.video&&!this.video.paused},ot}(pt),dt=function(Z){function ot(et,xt,Ut,fe){Z.call(this,et,xt,Ut,fe),xt.coordinates?(!Array.isArray(xt.coordinates)||xt.coordinates.length!==4||xt.coordinates.some(function(ye){return!Array.isArray(ye)||ye.length!==2||ye.some(function(Yt){return typeof Yt!="number"})}))&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'missing required property "coordinates"'))),xt.animate&&typeof xt.animate!="boolean"&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'optional "animate" property must be a boolean value'))),xt.canvas?typeof xt.canvas!="string"&&!(xt.canvas instanceof t.window.HTMLCanvasElement)&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'missing required property "canvas"'))),this.options=xt,this.animate=xt.animate!==void 0?xt.animate:!0}return Z&&(ot.__proto__=Z),ot.prototype=Object.create(Z&&Z.prototype),ot.prototype.constructor=ot,ot.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},ot.prototype.getCanvas=function(){return this.canvas},ot.prototype.onAdd=function(et){this.map=et,this.load(),this.canvas&&this.animate&&this.play()},ot.prototype.onRemove=function(){this.pause()},ot.prototype.prepare=function(){var et=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,et=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,et=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var xt=this.map.painter.context,Ut=xt.gl;this.boundsBuffer||(this.boundsBuffer=xt.createVertexBuffer(this._boundsArray,yt.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(et||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(xt,this.canvas,Ut.RGBA,{premultiply:!0});for(var fe in this.tiles){var ye=this.tiles[fe];ye.state!=="loaded"&&(ye.state="loaded",ye.texture=this.texture)}}},ot.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},ot.prototype.hasTransition=function(){return this._playing},ot.prototype._hasInvalidDimensions=function(){for(var et=0,xt=[this.canvas.width,this.canvas.height];etthis.max){var ye=this._getAndRemoveByKey(this.order[0]);ye&&this.onRemove(ye)}return this},Ht.prototype.has=function(Z){return Z.wrapped().key in this.data},Ht.prototype.getAndRemove=function(Z){return this.has(Z)?this._getAndRemoveByKey(Z.wrapped().key):null},Ht.prototype._getAndRemoveByKey=function(Z){var ot=this.data[Z].shift();return ot.timeout&&clearTimeout(ot.timeout),this.data[Z].length===0&&delete this.data[Z],this.order.splice(this.order.indexOf(Z),1),ot.value},Ht.prototype.getByKey=function(Z){var ot=this.data[Z];return ot?ot[0].value:null},Ht.prototype.get=function(Z){if(!this.has(Z))return null;var ot=this.data[Z.wrapped().key][0];return ot.value},Ht.prototype.remove=function(Z,ot){if(!this.has(Z))return this;var et=Z.wrapped().key,xt=ot===void 0?0:this.data[et].indexOf(ot),Ut=this.data[et][xt];return this.data[et].splice(xt,1),Ut.timeout&&clearTimeout(Ut.timeout),this.data[et].length===0&&delete this.data[et],this.onRemove(Ut.value),this.order.splice(this.order.indexOf(et),1),this},Ht.prototype.setMaxSize=function(Z){for(this.max=Z;this.order.length>this.max;){var ot=this._getAndRemoveByKey(this.order[0]);ot&&this.onRemove(ot)}return this},Ht.prototype.filter=function(Z){var ot=[];for(var et in this.data)for(var xt=0,Ut=this.data[et];xt1||(Math.abs(nr)>1&&(Math.abs(nr+tr)===1?nr+=tr:Math.abs(nr-tr)===1&&(nr-=tr)),!(!Se.dem||!ce.dem)&&(ce.dem.backfillBorder(Se.dem,nr,Ye),ce.neighboringTiles&&ce.neighboringTiles[lr]&&(ce.neighboringTiles[lr].backfilled=!0)))}},ot.prototype.getTile=function(et){return this.getTileByID(et.key)},ot.prototype.getTileByID=function(et){return this._tiles[et]},ot.prototype._retainLoadedChildren=function(et,xt,Ut,fe){for(var ye in this._tiles){var Yt=this._tiles[ye];if(!(fe[ye]||!Yt.hasData()||Yt.tileID.overscaledZ<=xt||Yt.tileID.overscaledZ>Ut)){for(var ce=Yt.tileID;Yt&&Yt.tileID.overscaledZ>xt+1;){var Se=Yt.tileID.scaledTo(Yt.tileID.overscaledZ-1);Yt=this._tiles[Se.key],Yt&&Yt.hasData()&&(ce=Se)}for(var nr=ce;nr.overscaledZ>xt;)if(nr=nr.scaledTo(nr.overscaledZ-1),et[nr.key]){fe[ce.key]=ce;break}}}},ot.prototype.findLoadedParent=function(et,xt){if(et.key in this._loadedParentTiles){var Ut=this._loadedParentTiles[et.key];return Ut&&Ut.tileID.overscaledZ>=xt?Ut:null}for(var fe=et.overscaledZ-1;fe>=xt;fe--){var ye=et.scaledTo(fe),Yt=this._getLoadedTile(ye);if(Yt)return Yt}},ot.prototype._getLoadedTile=function(et){var xt=this._tiles[et.key];if(xt&&xt.hasData())return xt;var Ut=this._cache.getByKey(et.wrapped().key);return Ut},ot.prototype.updateCacheSize=function(et){var xt=Math.ceil(et.width/this._source.tileSize)+1,Ut=Math.ceil(et.height/this._source.tileSize)+1,fe=xt*Ut,ye=5,Yt=Math.floor(fe*ye),ce=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Yt):Yt;this._cache.setMaxSize(ce)},ot.prototype.handleWrapJump=function(et){var xt=this._prevLng===void 0?et:this._prevLng,Ut=et-xt,fe=Ut/360,ye=Math.round(fe);if(this._prevLng=et,ye){var Yt={};for(var ce in this._tiles){var Se=this._tiles[ce];Se.tileID=Se.tileID.unwrapTo(Se.tileID.wrap+ye),Yt[Se.tileID.key]=Se}this._tiles=Yt;for(var nr in this._timers)clearTimeout(this._timers[nr]),delete this._timers[nr];for(var Ye in this._tiles){var tr=this._tiles[Ye];this._setTileReloadTimer(Ye,tr)}}},ot.prototype.update=function(et){var xt=this;if(this.transform=et,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(et),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Ut;this.used?this._source.tileID?Ut=et.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(di){return new t.OverscaledTileID(di.canonical.z,di.wrap,di.canonical.z,di.canonical.x,di.canonical.y)}):(Ut=et.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(Ut=Ut.filter(function(di){return xt._source.hasTile(di)}))):Ut=[];var fe=et.coveringZoomLevel(this._source),ye=Math.max(fe-ot.maxOverzooming,this._source.minzoom),Yt=Math.max(fe+ot.maxUnderzooming,this._source.minzoom),ce=this._updateRetainedTiles(Ut,fe);if(ci(this._source.type)){for(var Se={},nr={},Ye=Object.keys(ce),tr=0,lr=Ye;trthis._source.maxzoom){var $e=Ve.children(this._source.maxzoom)[0],Cr=this.getTile($e);if(Cr&&Cr.hasData()){Ut[$e.key]=$e;continue}}else{var on=Ve.children(this._source.maxzoom);if(Ut[on[0].key]&&Ut[on[1].key]&&Ut[on[2].key]&&Ut[on[3].key])continue}for(var fn=Xe.wasRequested(),fi=Ve.overscaledZ-1;fi>=ye;--fi){var si=Ve.scaledTo(fi);if(fe[si.key]||(fe[si.key]=!0,Xe=this.getTile(si),!Xe&&fn&&(Xe=this._addTile(si)),Xe&&(Ut[si.key]=si,fn=Xe.wasRequested(),Xe.hasData())))break}}}return Ut},ot.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var et in this._tiles){for(var xt=[],Ut=void 0,fe=this._tiles[et].tileID;fe.overscaledZ>0;){if(fe.key in this._loadedParentTiles){Ut=this._loadedParentTiles[fe.key];break}xt.push(fe.key);var ye=fe.scaledTo(fe.overscaledZ-1);if(Ut=this._getLoadedTile(ye),Ut)break;fe=ye}for(var Yt=0,ce=xt;Yt0)&&(xt.hasData()&&xt.state!=="reloading"?this._cache.add(xt.tileID,xt,xt.getExpiryTimeout()):(xt.aborted=!0,this._abortTile(xt),this._unloadTile(xt))))},ot.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var et in this._tiles)this._removeTile(et);this._cache.reset()},ot.prototype.tilesIn=function(et,xt,Ut){var fe=this,ye=[],Yt=this.transform;if(!Yt)return ye;for(var ce=Ut?Yt.getCameraQueryGeometry(et):et,Se=et.map(function(fi){return Yt.pointCoordinate(fi)}),nr=ce.map(function(fi){return Yt.pointCoordinate(fi)}),Ye=this.getIds(),tr=1/0,lr=1/0,hr=-1/0,Ve=-1/0,Xe=0,$e=nr;Xe<$e.length;Xe+=1){var Cr=$e[Xe];tr=Math.min(tr,Cr.x),lr=Math.min(lr,Cr.y),hr=Math.max(hr,Cr.x),Ve=Math.max(Ve,Cr.y)}for(var on=function(fi){var si=fe._tiles[Ye[fi]];if(!si.holdingForFade()){var Gn=si.tileID,Mi=Math.pow(2,Yt.zoom-si.tileID.overscaledZ),di=xt*si.queryPadding*t.EXTENT/si.tileSize/Mi,Ki=[Gn.getTilePoint(new t.MercatorCoordinate(tr,lr)),Gn.getTilePoint(new t.MercatorCoordinate(hr,Ve))];if(Ki[0].x-di=0&&Ki[1].y+di>=0){var Ai=Se.map(function(sa){return Gn.getTilePoint(sa)}),Si=nr.map(function(sa){return Gn.getTilePoint(sa)});ye.push({tile:si,tileID:Gn,queryGeometry:Ai,cameraQueryGeometry:Si,scale:Mi})}}},fn=0;fn=t.browser.now())return!0}return!1},ot.prototype.setFeatureState=function(et,xt,Ut){et=et||"_geojsonTileLayer",this._state.updateState(et,xt,Ut)},ot.prototype.removeFeatureState=function(et,xt,Ut){et=et||"_geojsonTileLayer",this._state.removeFeatureState(et,xt,Ut)},ot.prototype.getFeatureState=function(et,xt){return et=et||"_geojsonTileLayer",this._state.getState(et,xt)},ot.prototype.setDependencies=function(et,xt,Ut){var fe=this._tiles[et];fe&&fe.setDependencies(xt,Ut)},ot.prototype.reloadTilesForDependencies=function(et,xt){for(var Ut in this._tiles){var fe=this._tiles[Ut];fe.hasDependency(et,xt)&&this._reloadTile(Ut,"reloading")}this._cache.filter(function(ye){return!ye.hasDependency(et,xt)})},ot}(t.Evented);wn.maxOverzooming=10,wn.maxUnderzooming=3;function Mn(Z,ot){var et=Math.abs(Z.wrap*2)-+(Z.wrap<0),xt=Math.abs(ot.wrap*2)-+(ot.wrap<0);return Z.overscaledZ-ot.overscaledZ||xt-et||ot.canonical.y-Z.canonical.y||ot.canonical.x-Z.canonical.x}function ci(Z){return Z==="raster"||Z==="image"||Z==="video"}function xi(){return new t.window.Worker(yl.workerUrl)}var Pi="mapboxgl_preloaded_worker_pool",Di=function(){this.active={}};Di.prototype.acquire=function(Z){if(!this.workers)for(this.workers=[];this.workers.length0?(xt-fe)/ye:0;return this.points[Ut].mult(1-Yt).add(this.points[ot].mult(Yt))};var En=function(Z,ot,et){var xt=this.boxCells=[],Ut=this.circleCells=[];this.xCellCount=Math.ceil(Z/et),this.yCellCount=Math.ceil(ot/et);for(var fe=0;fethis.width||xt<0||ot>this.height)return Ut?!1:[];var ye=[];if(Z<=0&&ot<=0&&this.width<=et&&this.height<=xt){if(Ut)return!0;for(var Yt=0;Yt0:ye}},En.prototype._queryCircle=function(Z,ot,et,xt,Ut){var fe=Z-et,ye=Z+et,Yt=ot-et,ce=ot+et;if(ye<0||fe>this.width||ce<0||Yt>this.height)return xt?!1:[];var Se=[],nr={hitTest:xt,circle:{x:Z,y:ot,radius:et},seenUids:{box:{},circle:{}}};return this._forEachCell(fe,Yt,ye,ce,this._queryCellCircle,Se,nr,Ut),xt?Se.length>0:Se},En.prototype.query=function(Z,ot,et,xt,Ut){return this._query(Z,ot,et,xt,!1,Ut)},En.prototype.hitTest=function(Z,ot,et,xt,Ut){return this._query(Z,ot,et,xt,!0,Ut)},En.prototype.hitTestCircle=function(Z,ot,et,xt){return this._queryCircle(Z,ot,et,!0,xt)},En.prototype._queryCell=function(Z,ot,et,xt,Ut,fe,ye,Yt){var ce=ye.seenUids,Se=this.boxCells[Ut];if(Se!==null)for(var nr=this.bboxes,Ye=0,tr=Se;Ye=nr[hr+0]&&xt>=nr[hr+1]&&(!Yt||Yt(this.boxKeys[lr]))){if(ye.hitTest)return fe.push(!0),!0;fe.push({key:this.boxKeys[lr],x1:nr[hr],y1:nr[hr+1],x2:nr[hr+2],y2:nr[hr+3]})}}}var Ve=this.circleCells[Ut];if(Ve!==null)for(var Xe=this.circles,$e=0,Cr=Ve;$eye*ye+Yt*Yt},En.prototype._circleAndRectCollide=function(Z,ot,et,xt,Ut,fe,ye){var Yt=(fe-xt)/2,ce=Math.abs(Z-(xt+Yt));if(ce>Yt+et)return!1;var Se=(ye-Ut)/2,nr=Math.abs(ot-(Ut+Se));if(nr>Se+et)return!1;if(ce<=Yt||nr<=Se)return!0;var Ye=ce-Yt,tr=nr-Se;return Ye*Ye+tr*tr<=et*et};function Zn(Z,ot,et,xt,Ut){var fe=t.create();return ot?(t.scale(fe,fe,[1/Ut,1/Ut,1]),et||t.rotateZ(fe,fe,xt.angle)):t.multiply(fe,xt.labelPlaneMatrix,Z),fe}function Ca(Z,ot,et,xt,Ut){if(ot){var fe=t.clone(Z);return t.scale(fe,fe,[Ut,Ut,1]),et||t.rotateZ(fe,fe,-xt.angle),fe}else return xt.glCoordMatrix}function Ri(Z,ot){var et=[Z.x,Z.y,0,1];Gs(et,et,ot);var xt=et[3];return{point:new t.Point(et[0]/xt,et[1]/xt),signedDistanceFromCamera:xt}}function Ja(Z,ot){return .5+.5*(Z/ot)}function Xa(Z,ot){var et=Z[0]/Z[3],xt=Z[1]/Z[3],Ut=et>=-ot[0]&&et<=ot[0]&&xt>=-ot[1]&&xt<=ot[1];return Ut}function Io(Z,ot,et,xt,Ut,fe,ye,Yt){var ce=xt?Z.textSizeData:Z.iconSizeData,Se=t.evaluateSizeForZoom(ce,et.transform.zoom),nr=[256/et.width*2+1,256/et.height*2+1],Ye=xt?Z.text.dynamicLayoutVertexArray:Z.icon.dynamicLayoutVertexArray;Ye.clear();for(var tr=Z.lineVertexArray,lr=xt?Z.text.placedSymbolArray:Z.icon.placedSymbolArray,hr=et.transform.width/et.transform.height,Ve=!1,Xe=0;Xefe)return{useVertical:!0}}return(Z===t.WritingMode.vertical?ot.yet.x)?{needsFlipping:!0}:null}function Ia(Z,ot,et,xt,Ut,fe,ye,Yt,ce,Se,nr,Ye,tr,lr){var hr=ot/24,Ve=Z.lineOffsetX*hr,Xe=Z.lineOffsetY*hr,$e;if(Z.numGlyphs>1){var Cr=Z.glyphStartIndex+Z.numGlyphs,on=Z.lineStartIndex,fn=Z.lineStartIndex+Z.lineLength,fi=po(hr,Yt,Ve,Xe,et,nr,Ye,Z,ce,fe,tr);if(!fi)return{notEnoughRoom:!0};var si=Ri(fi.first.point,ye).point,Gn=Ri(fi.last.point,ye).point;if(xt&&!et){var Mi=Do(Z.writingMode,si,Gn,lr);if(Mi)return Mi}$e=[fi.first];for(var di=Z.glyphStartIndex+1;di0?sa.point:gs(Ye,Si,Ki,1,Ut),so=Do(Z.writingMode,Ki,Qa,lr);if(so)return so}var Vo=is(hr*Yt.getoffsetX(Z.glyphStartIndex),Ve,Xe,et,nr,Ye,Z.segment,Z.lineStartIndex,Z.lineStartIndex+Z.lineLength,ce,fe,tr);if(!Vo)return{notEnoughRoom:!0};$e=[Vo]}for(var vs=0,zl=$e;vs0?1:-1,hr=0;xt&&(lr*=-1,hr=Math.PI),lr<0&&(hr+=Math.PI);for(var Ve=lr>0?Yt+ye:Yt+ye+1,Xe=Ut,$e=Ut,Cr=0,on=0,fn=Math.abs(tr),fi=[];Cr+on<=fn;){if(Ve+=lr,Ve=ce)return null;if($e=Xe,fi.push(Xe),Xe=Ye[Ve],Xe===void 0){var si=new t.Point(Se.getx(Ve),Se.gety(Ve)),Gn=Ri(si,nr);if(Gn.signedDistanceFromCamera>0)Xe=Ye[Ve]=Gn.point;else{var Mi=Ve-lr,di=Cr===0?fe:new t.Point(Se.getx(Mi),Se.gety(Mi));Xe=gs(di,si,$e,fn-Cr+1,nr)}}Cr+=on,on=$e.dist(Xe)}var Ki=(fn-Cr)/on,Ai=Xe.sub($e),Si=Ai.mult(Ki)._add($e);Si._add(Ai._unit()._perp()._mult(et*lr));var sa=hr+Math.atan2(Xe.y-$e.y,Xe.x-$e.x);return fi.push(Si),{point:Si,angle:sa,path:fi}}var ll=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Ho(Z,ot){for(var et=0;et=1;zl--)vs.push(so.path[zl]);for(var jl=1;jl0){for(var Ds=vs[0].clone(),Au=vs[0].clone(),nf=1;nf=Si.x&&Au.x<=sa.x&&Ds.y>=Si.y&&Au.y<=sa.y?_c=[vs]:Au.xsa.x||Au.ysa.y?_c=[]:_c=t.clipLine([vs],Si.x,Si.y,sa.x,sa.y)}for(var zf=0,Np=_c;zf=this.screenRightBoundary||xtthis.screenBottomBoundary},ul.prototype.isInsideGrid=function(Z,ot,et,xt){return et>=0&&Z=0&&ot0){var on;return this.prevPlacement&&this.prevPlacement.variableOffsets[Ye.crossTileID]&&this.prevPlacement.placements[Ye.crossTileID]&&this.prevPlacement.placements[Ye.crossTileID].text&&(on=this.prevPlacement.variableOffsets[Ye.crossTileID].anchor),this.variableOffsets[Ye.crossTileID]={textOffset:Ve,width:et,height:xt,anchor:Z,textBoxScale:Ut,prevAnchor:on},this.markUsedJustification(tr,Z,Ye,lr),tr.allowVerticalPlacement&&(this.markUsedOrientation(tr,lr,Ye),this.placedOrientations[Ye.crossTileID]=lr),{shift:Xe,placedGlyphBoxes:$e}}},Ns.prototype.placeLayerBucketPart=function(Z,ot,et){var xt=this,Ut=Z.parameters,fe=Ut.bucket,ye=Ut.layout,Yt=Ut.posMatrix,ce=Ut.textLabelPlaneMatrix,Se=Ut.labelToScreenMatrix,nr=Ut.textPixelRatio,Ye=Ut.holdingForFade,tr=Ut.collisionBoxArray,lr=Ut.partiallyEvaluatedTextSize,hr=Ut.collisionGroup,Ve=ye.get("text-optional"),Xe=ye.get("icon-optional"),$e=ye.get("text-allow-overlap"),Cr=ye.get("icon-allow-overlap"),on=ye.get("text-rotation-alignment")==="map",fn=ye.get("text-pitch-alignment")==="map",fi=ye.get("icon-text-fit")!=="none",si=ye.get("symbol-z-order")==="viewport-y",Gn=$e&&(Cr||!fe.hasIconData()||Xe),Mi=Cr&&($e||!fe.hasTextData()||Ve);!fe.collisionArrays&&tr&&fe.deserializeCollisionBoxes(tr);var di=function(so,Vo){if(!ot[so.crossTileID]){if(Ye){xt.placements[so.crossTileID]=new Cs(!1,!1,!1);return}var vs=!1,zl=!1,jl=!0,dl=null,Ul={box:null,offscreen:null},_c={box:null,offscreen:null},Ds=null,Au=null,nf=null,zf=0,Np=0,b0=0;Vo.textFeatureIndex?zf=Vo.textFeatureIndex:so.useRuntimeCollisionCircles&&(zf=so.featureIndex),Vo.verticalTextFeatureIndex&&(Np=Vo.verticalTextFeatureIndex);var kp=Vo.textBox;if(kp){var Tp=function(af){var md=t.WritingMode.horizontal;if(fe.allowVerticalPlacement&&!af&&xt.prevPlacement){var bc=xt.prevPlacement.placedOrientations[so.crossTileID];bc&&(xt.placedOrientations[so.crossTileID]=bc,md=bc,xt.markUsedOrientation(fe,md,so))}return md},R0=function(af,md){if(fe.allowVerticalPlacement&&so.numVerticalGlyphVertices>0&&Vo.verticalTextBox)for(var bc=0,Og=fe.writingModes;bc0&&(tp=tp.filter(function(af){return af!==Ap.anchor}),tp.unshift(Ap.anchor))}var qd=function(af,md,bc){for(var Og=af.x2-af.x1,Pv=af.y2-af.y1,yx=so.textBoxScale,zc=fi&&!Cr?md:null,km={box:[],offscreen:!1},xx=$e?tp.length*2:tp.length,Dg=0;Dg=tp.length,zv=xt.attemptAnchorPlacement(N0,af,Og,Pv,yx,on,fn,nr,Yt,hr,mb,so,fe,bc,zc);if(zv&&(km=zv.placedGlyphBoxes,km&&km.box&&km.box.length)){vs=!0,dl=zv.shift;break}}return km},Q0=function(){return qd(kp,Vo.iconBox,t.WritingMode.horizontal)},Hm=function(){var af=Vo.verticalTextBox,md=Ul&&Ul.box&&Ul.box.length;return fe.allowVerticalPlacement&&!md&&so.numVerticalGlyphVertices>0&&af?qd(af,Vo.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}};R0(Q0,Hm),Ul&&(vs=Ul.box,jl=Ul.offscreen);var Mp=Tp(Ul&&Ul.box);if(!vs&&xt.prevPlacement){var Sp=xt.prevPlacement.variableOffsets[so.crossTileID];Sp&&(xt.variableOffsets[so.crossTileID]=Sp,xt.markUsedJustification(fe,Sp.anchor,so,Mp))}}else{var ep=function(af,md){var bc=xt.collisionIndex.placeCollisionBox(af,$e,nr,Yt,hr.predicate);return bc&&bc.box&&bc.box.length&&(xt.markUsedOrientation(fe,md,so),xt.placedOrientations[so.crossTileID]=md),bc},Wm=function(){return ep(kp,t.WritingMode.horizontal)},Pg=function(){var af=Vo.verticalTextBox;return fe.allowVerticalPlacement&&so.numVerticalGlyphVertices>0&&af?ep(af,t.WritingMode.vertical):{box:null,offscreen:null}};R0(Wm,Pg),Tp(Ul&&Ul.box&&Ul.box.length)}}if(Ds=Ul,vs=Ds&&Ds.box&&Ds.box.length>0,jl=Ds&&Ds.offscreen,so.useRuntimeCollisionCircles){var qm=fe.text.placedSymbolArray.get(so.centerJustifiedTextSymbolIndex),dd=t.evaluateSizeForFeature(fe.textSizeData,lr,qm),wm=ye.get("text-padding"),zg=so.collisionCircleDiameter;Au=xt.collisionIndex.placeCollisionCircles($e,qm,fe.lineVertexArray,fe.glyphOffsetArray,dd,Yt,ce,Se,et,fn,hr.predicate,zg,wm),vs=$e||Au.circles.length>0&&!Au.collisionDetected,jl=jl&&Au.offscreen}if(Vo.iconFeatureIndex&&(b0=Vo.iconFeatureIndex),Vo.iconBox){var pd=function(af){var md=fi&&dl?Yl(af,dl.x,dl.y,on,fn,xt.transform.angle):af;return xt.collisionIndex.placeCollisionBox(md,Cr,nr,Yt,hr.predicate)};_c&&_c.box&&_c.box.length&&Vo.verticalIconBox?(nf=pd(Vo.verticalIconBox),zl=nf.box.length>0):(nf=pd(Vo.iconBox),zl=nf.box.length>0),jl=jl&&nf.offscreen}var Zm=Ve||so.numHorizontalGlyphVertices===0&&so.numVerticalGlyphVertices===0,Cv=Xe||so.numIconVertices===0;if(!Zm&&!Cv?zl=vs=zl&&vs:Cv?Zm||(zl=zl&&vs):vs=zl&&vs,vs&&Ds&&Ds.box&&(_c&&_c.box&&Np?xt.collisionIndex.insertCollisionBox(Ds.box,ye.get("text-ignore-placement"),fe.bucketInstanceId,Np,hr.ID):xt.collisionIndex.insertCollisionBox(Ds.box,ye.get("text-ignore-placement"),fe.bucketInstanceId,zf,hr.ID)),zl&&nf&&xt.collisionIndex.insertCollisionBox(nf.box,ye.get("icon-ignore-placement"),fe.bucketInstanceId,b0,hr.ID),Au&&(vs&&xt.collisionIndex.insertCollisionCircles(Au.circles,ye.get("text-ignore-placement"),fe.bucketInstanceId,zf,hr.ID),et)){var Lv=fe.bucketInstanceId,B0=xt.collisionCircleArrays[Lv];B0===void 0&&(B0=xt.collisionCircleArrays[Lv]=new Co);for(var Ig=0;Ig=0;--Ai){var Si=Ki[Ai];di(fe.symbolInstances.get(Si),fe.collisionArrays[Si])}else for(var sa=Z.symbolInstanceStart;sa=0&&(fe>=0&&Se!==fe?Z.text.placedSymbolArray.get(Se).crossTileID=0:Z.text.placedSymbolArray.get(Se).crossTileID=et.crossTileID)}},Ns.prototype.markUsedOrientation=function(Z,ot,et){for(var xt=ot===t.WritingMode.horizontal||ot===t.WritingMode.horizontalOnly?ot:0,Ut=ot===t.WritingMode.vertical?ot:0,fe=[et.leftJustifiedTextSymbolIndex,et.centerJustifiedTextSymbolIndex,et.rightJustifiedTextSymbolIndex],ye=0,Yt=fe;ye0||fn>0,di=Cr.numIconVertices>0,Ki=xt.placedOrientations[Cr.crossTileID],Ai=Ki===t.WritingMode.vertical,Si=Ki===t.WritingMode.horizontal||Ki===t.WritingMode.horizontalOnly;if(Mi){var sa=Fu(Gn.text),Qa=Ai?ao:sa;lr(Z.text,on,Qa);var so=Si?ao:sa;lr(Z.text,fn,so);var Vo=Gn.text.isHidden();[Cr.rightJustifiedTextSymbolIndex,Cr.centerJustifiedTextSymbolIndex,Cr.leftJustifiedTextSymbolIndex].forEach(function(b0){b0>=0&&(Z.text.placedSymbolArray.get(b0).hidden=Vo||Ai?1:0)}),Cr.verticalPlacedTextSymbolIndex>=0&&(Z.text.placedSymbolArray.get(Cr.verticalPlacedTextSymbolIndex).hidden=Vo||Si?1:0);var vs=xt.variableOffsets[Cr.crossTileID];vs&&xt.markUsedJustification(Z,vs.anchor,Cr,Ki);var zl=xt.placedOrientations[Cr.crossTileID];zl&&(xt.markUsedJustification(Z,"left",Cr,zl),xt.markUsedOrientation(Z,zl,Cr))}if(di){var jl=Fu(Gn.icon),dl=!(Ye&&Cr.verticalPlacedIconSymbolIndex&&Ai);if(Cr.placedIconSymbolIndex>=0){var Ul=dl?jl:ao;lr(Z.icon,Cr.numIconVertices,Ul),Z.icon.placedSymbolArray.get(Cr.placedIconSymbolIndex).hidden=Gn.icon.isHidden()}if(Cr.verticalPlacedIconSymbolIndex>=0){var _c=dl?ao:jl;lr(Z.icon,Cr.numVerticalIconVertices,_c),Z.icon.placedSymbolArray.get(Cr.verticalPlacedIconSymbolIndex).hidden=Gn.icon.isHidden()}}if(Z.hasIconCollisionBoxData()||Z.hasTextCollisionBoxData()){var Ds=Z.collisionArrays[$e];if(Ds){var Au=new t.Point(0,0);if(Ds.textBox||Ds.verticalTextBox){var nf=!0;if(ce){var zf=xt.variableOffsets[fi];zf?(Au=Vl(zf.anchor,zf.width,zf.height,zf.textOffset,zf.textBoxScale),Se&&Au._rotate(nr?xt.transform.angle:-xt.transform.angle)):nf=!1}Ds.textBox&&La(Z.textCollisionBox.collisionVertexArray,Gn.text.placed,!nf||Ai,Au.x,Au.y),Ds.verticalTextBox&&La(Z.textCollisionBox.collisionVertexArray,Gn.text.placed,!nf||Si,Au.x,Au.y)}var Np=!!(!Si&&Ds.verticalIconBox);Ds.iconBox&&La(Z.iconCollisionBox.collisionVertexArray,Gn.icon.placed,Np,Ye?Au.x:0,Ye?Au.y:0),Ds.verticalIconBox&&La(Z.iconCollisionBox.collisionVertexArray,Gn.icon.placed,!Np,Ye?Au.x:0,Ye?Au.y:0)}}},Ve=0;VeZ},Ns.prototype.setStale=function(){this.stale=!0};function La(Z,ot,et,xt,Ut){Z.emplaceBack(ot?1:0,et?1:0,xt||0,Ut||0),Z.emplaceBack(ot?1:0,et?1:0,xt||0,Ut||0),Z.emplaceBack(ot?1:0,et?1:0,xt||0,Ut||0),Z.emplaceBack(ot?1:0,et?1:0,xt||0,Ut||0)}var uo=Math.pow(2,25),Hs=Math.pow(2,24),Kl=Math.pow(2,17),Go=Math.pow(2,16),ql=Math.pow(2,9),il=Math.pow(2,8),Cl=Math.pow(2,1);function Fu(Z){if(Z.opacity===0&&!Z.placed)return 0;if(Z.opacity===1&&Z.placed)return 4294967295;var ot=Z.placed?1:0,et=Math.floor(Z.opacity*127);return et*uo+ot*Hs+et*Kl+ot*Go+et*ql+ot*il+et*Cl+ot}var ao=0,Ts=function(Z){this._sortAcrossTiles=Z.layout.get("symbol-z-order")!=="viewport-y"&&Z.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Ts.prototype.continuePlacement=function(Z,ot,et,xt,Ut){for(var fe=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var ye=Z[this._currentPlacementIndex],Yt=ot[ye],ce=this.placement.collisionIndex.transform.zoom;if(Yt.type==="symbol"&&(!Yt.minzoom||Yt.minzoom<=ce)&&(!Yt.maxzoom||Yt.maxzoom>ce)){this._inProgressLayer||(this._inProgressLayer=new Ts(Yt));var Se=this._inProgressLayer.continuePlacement(et[Yt.source],this.placement,this._showCollisionBoxes,Yt,fe);if(Se)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Ls.prototype.commit=function(Z){return this.placement.commit(Z),this.placement};var nu=512/t.EXTENT/2,cl=function(Z,ot,et){this.tileID=Z,this.indexedSymbolInstances={},this.bucketInstanceId=et;for(var xt=0;xtZ.overscaledZ)for(var ce in Yt){var Se=Yt[ce];Se.tileID.isChildOf(Z)&&Se.findMatches(ot.symbolInstances,Z,fe)}else{var nr=Z.scaledTo(Number(ye)),Ye=Yt[nr.key];Ye&&Ye.findMatches(ot.symbolInstances,Z,fe)}}for(var tr=0;tr0)throw new Error("Unimplemented: "+fe.map(function(ye){return ye.command}).join(", ")+".");return Ut.forEach(function(ye){ye.command!=="setTransition"&&xt[ye.command].apply(xt,ye.args)}),this.stylesheet=et,!0},ot.prototype.addImage=function(et,xt){if(this.getImage(et))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(et,xt),this._afterImageUpdated(et)},ot.prototype.updateImage=function(et,xt){this.imageManager.updateImage(et,xt)},ot.prototype.getImage=function(et){return this.imageManager.getImage(et)},ot.prototype.removeImage=function(et){if(!this.getImage(et))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(et),this._afterImageUpdated(et)},ot.prototype._afterImageUpdated=function(et){this._availableImages=this.imageManager.listImages(),this._changedImages[et]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new t.Event("data",{dataType:"style"}))},ot.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},ot.prototype.addSource=function(et,xt,Ut){var fe=this;if(Ut===void 0&&(Ut={}),this._checkLoaded(),this.sourceCaches[et]!==void 0)throw new Error("There is already a source with this ID");if(!xt.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(xt).join(", ")+".");var ye=["vector","raster","geojson","video","image"],Yt=ye.indexOf(xt.type)>=0;if(!(Yt&&this._validate(t.validateStyle.source,"sources."+et,xt,null,Ut))){this.map&&this.map._collectResourceTiming&&(xt.collectResourceTiming=!0);var ce=this.sourceCaches[et]=new wn(et,xt,this.dispatcher);ce.style=this,ce.setEventedParent(this,function(){return{isSourceLoaded:fe.loaded(),source:ce.serialize(),sourceId:et}}),ce.onAdd(this.map),this._changed=!0}},ot.prototype.removeSource=function(et){if(this._checkLoaded(),this.sourceCaches[et]===void 0)throw new Error("There is no source with this ID");for(var xt in this._layers)if(this._layers[xt].source===et)return this.fire(new t.ErrorEvent(new Error('Source "'+et+'" cannot be removed while layer "'+xt+'" is using it.')));var Ut=this.sourceCaches[et];delete this.sourceCaches[et],delete this._updatedSources[et],Ut.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:et})),Ut.setEventedParent(null),Ut.clearTiles(),Ut.onRemove&&Ut.onRemove(this.map),this._changed=!0},ot.prototype.setGeoJSONSourceData=function(et,xt){this._checkLoaded();var Ut=this.sourceCaches[et].getSource();Ut.setData(xt),this._changed=!0},ot.prototype.getSource=function(et){return this.sourceCaches[et]&&this.sourceCaches[et].getSource()},ot.prototype.addLayer=function(et,xt,Ut){Ut===void 0&&(Ut={}),this._checkLoaded();var fe=et.id;if(this.getLayer(fe)){this.fire(new t.ErrorEvent(new Error('Layer with id "'+fe+'" already exists on this map')));return}var ye;if(et.type==="custom"){if(_l(this,t.validateCustomStyleLayer(et)))return;ye=t.createStyleLayer(et)}else{if(typeof et.source=="object"&&(this.addSource(fe,et.source),et=t.clone$1(et),et=t.extend(et,{source:fe})),this._validate(t.validateStyle.layer,"layers."+fe,et,{arrayIndex:-1},Ut))return;ye=t.createStyleLayer(et),this._validateLayer(ye),ye.setEventedParent(this,{layer:{id:fe}}),this._serializedLayers[ye.id]=ye.serialize()}var Yt=xt?this._order.indexOf(xt):this._order.length;if(xt&&Yt===-1){this.fire(new t.ErrorEvent(new Error('Layer with id "'+xt+'" does not exist on this map.')));return}if(this._order.splice(Yt,0,fe),this._layerOrderChanged=!0,this._layers[fe]=ye,this._removedLayers[fe]&&ye.source&&ye.type!=="custom"){var ce=this._removedLayers[fe];delete this._removedLayers[fe],ce.type!==ye.type?this._updatedSources[ye.source]="clear":(this._updatedSources[ye.source]="reload",this.sourceCaches[ye.source].pause())}this._updateLayer(ye),ye.onAdd&&ye.onAdd(this.map)},ot.prototype.moveLayer=function(et,xt){this._checkLoaded(),this._changed=!0;var Ut=this._layers[et];if(!Ut){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be moved.")));return}if(et!==xt){var fe=this._order.indexOf(et);this._order.splice(fe,1);var ye=xt?this._order.indexOf(xt):this._order.length;if(xt&&ye===-1){this.fire(new t.ErrorEvent(new Error('Layer with id "'+xt+'" does not exist on this map.')));return}this._order.splice(ye,0,et),this._layerOrderChanged=!0}},ot.prototype.removeLayer=function(et){this._checkLoaded();var xt=this._layers[et];if(!xt){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be removed.")));return}xt.setEventedParent(null);var Ut=this._order.indexOf(et);this._order.splice(Ut,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[et]=xt,delete this._layers[et],delete this._serializedLayers[et],delete this._updatedLayers[et],delete this._updatedPaintProps[et],xt.onRemove&&xt.onRemove(this.map)},ot.prototype.getLayer=function(et){return this._layers[et]},ot.prototype.hasLayer=function(et){return et in this._layers},ot.prototype.setLayerZoomRange=function(et,xt,Ut){this._checkLoaded();var fe=this.getLayer(et);if(!fe){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot have zoom extent.")));return}fe.minzoom===xt&&fe.maxzoom===Ut||(xt!=null&&(fe.minzoom=xt),Ut!=null&&(fe.maxzoom=Ut),this._updateLayer(fe))},ot.prototype.setFilter=function(et,xt,Ut){Ut===void 0&&(Ut={}),this._checkLoaded();var fe=this.getLayer(et);if(!fe){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be filtered.")));return}if(!t.deepEqual(fe.filter,xt)){if(xt==null){fe.filter=void 0,this._updateLayer(fe);return}this._validate(t.validateStyle.filter,"layers."+fe.id+".filter",xt,null,Ut)||(fe.filter=t.clone$1(xt),this._updateLayer(fe))}},ot.prototype.getFilter=function(et){return t.clone$1(this.getLayer(et).filter)},ot.prototype.setLayoutProperty=function(et,xt,Ut,fe){fe===void 0&&(fe={}),this._checkLoaded();var ye=this.getLayer(et);if(!ye){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be styled.")));return}t.deepEqual(ye.getLayoutProperty(xt),Ut)||(ye.setLayoutProperty(xt,Ut,fe),this._updateLayer(ye))},ot.prototype.getLayoutProperty=function(et,xt){var Ut=this.getLayer(et);if(!Ut){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style.")));return}return Ut.getLayoutProperty(xt)},ot.prototype.setPaintProperty=function(et,xt,Ut,fe){fe===void 0&&(fe={}),this._checkLoaded();var ye=this.getLayer(et);if(!ye){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be styled.")));return}if(!t.deepEqual(ye.getPaintProperty(xt),Ut)){var Yt=ye.setPaintProperty(xt,Ut,fe);Yt&&this._updateLayer(ye),this._changed=!0,this._updatedPaintProps[et]=!0}},ot.prototype.getPaintProperty=function(et,xt){return this.getLayer(et).getPaintProperty(xt)},ot.prototype.setFeatureState=function(et,xt){this._checkLoaded();var Ut=et.source,fe=et.sourceLayer,ye=this.sourceCaches[Ut];if(ye===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+Ut+"' does not exist in the map's style.")));return}var Yt=ye.getSource().type;if(Yt==="geojson"&&fe){this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(Yt==="vector"&&!fe){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}et.id===void 0&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),ye.setFeatureState(fe,et.id,xt)},ot.prototype.removeFeatureState=function(et,xt){this._checkLoaded();var Ut=et.source,fe=this.sourceCaches[Ut];if(fe===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+Ut+"' does not exist in the map's style.")));return}var ye=fe.getSource().type,Yt=ye==="vector"?et.sourceLayer:void 0;if(ye==="vector"&&!Yt){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(xt&&typeof et.id!="string"&&typeof et.id!="number"){this.fire(new t.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}fe.removeFeatureState(Yt,et.id,xt)},ot.prototype.getFeatureState=function(et){this._checkLoaded();var xt=et.source,Ut=et.sourceLayer,fe=this.sourceCaches[xt];if(fe===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+xt+"' does not exist in the map's style.")));return}var ye=fe.getSource().type;if(ye==="vector"&&!Ut){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return et.id===void 0&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),fe.getFeatureState(Ut,et.id)},ot.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},ot.prototype.serialize=function(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,function(et){return et.serialize()}),layers:this._serializeLayers(this._order)},function(et){return et!==void 0})},ot.prototype._updateLayer=function(et){this._updatedLayers[et.id]=!0,et.source&&!this._updatedSources[et.source]&&this.sourceCaches[et.source].getSource().type!=="raster"&&(this._updatedSources[et.source]="reload",this.sourceCaches[et.source].pause()),this._changed=!0},ot.prototype._flattenAndSortRenderedFeatures=function(et){for(var xt=this,Ut=function(Si){return xt._layers[Si].type==="fill-extrusion"},fe={},ye=[],Yt=this._order.length-1;Yt>=0;Yt--){var ce=this._order[Yt];if(Ut(ce)){fe[ce]=Yt;for(var Se=0,nr=et;Se=0;$e--){var Cr=this._order[$e];if(Ut(Cr))for(var on=ye.length-1;on>=0;on--){var fn=ye[on].feature;if(fe[fn.layer.id]<$e)break;Xe.push(fn),ye.pop()}else for(var fi=0,si=et;fi 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`,lc=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,hd=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 +? a_pos +: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`,$f=`#ifdef GL_ES +precision highp float; +#endif +uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,xf="uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}",Vh=`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; +#define PI 3.141592653589793 +void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Vf="uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}",Hf=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,lh=` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,Gf=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Sh=` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,mh=`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,uc=` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`,ef=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Wf=` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`,Jl=`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Ef="uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}",Ld=`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Yf=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`,_f=`#define SDF_PX 8.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Kf=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`,Nc=`#define SDF_PX 8.0 +#define SDF 1.0 +#define ICON 0.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Xf=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`,zu=vu(Jc,ah),jc=vu(Nf,Sf),Hh=vu(Dl,Bc),lu=vu(jf,hc),Eh=vu(oc,fc),Sc=vu(oh,su),Uc=vu(sc,el),_u=vu(Zl,Mh),uf=vu(Lc,jh),gh=vu(xu,Cd),Wh=vu(Qs,Wd),Cf=vu(Ll,Jo),Pd=vu(lf,sh),Qd=vu(ec,Uf),cf=vu(Uh,yf),Lf=vu(lc,hd),wc=vu($f,xf),hf=vu(Vh,Vf),Qc=vu(Hf,lh),ff=vu(Gf,Sh),Pf=vu(mh,uc),vh=vu(ef,Wf),bu=vu(Jl,Ef),Ch=vu(Ld,Yf),Vc=vu(_f,Kf),fd=vu(Nc,Xf);function vu(Z,ot){var et=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,xt=ot.match(/attribute ([\w]+) ([\w]+)/g),Ut=Z.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),fe=ot.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ye=fe?fe.concat(Ut):Ut,Yt={};return Z=Z.replace(et,function(ce,Se,nr,Ye,tr){return Yt[tr]=!0,Se==="define"?` +#ifndef HAS_UNIFORM_u_`+tr+` +varying `+nr+" "+Ye+" "+tr+`; +#else +uniform `+nr+" "+Ye+" u_"+tr+`; +#endif +`:` +#ifdef HAS_UNIFORM_u_`+tr+` + `+nr+" "+Ye+" "+tr+" = u_"+tr+`; +#endif +`}),ot=ot.replace(et,function(ce,Se,nr,Ye,tr){var lr=Ye==="float"?"vec2":"vec4",hr=tr.match(/color/)?"color":lr;return Yt[tr]?Se==="define"?` +#ifndef HAS_UNIFORM_u_`+tr+` +uniform lowp float u_`+tr+`_t; +attribute `+nr+" "+lr+" a_"+tr+`; +varying `+nr+" "+Ye+" "+tr+`; +#else +uniform `+nr+" "+Ye+" u_"+tr+`; +#endif +`:hr==="vec4"?` +#ifndef HAS_UNIFORM_u_`+tr+` + `+tr+" = a_"+tr+`; +#else + `+nr+" "+Ye+" "+tr+" = u_"+tr+`; +#endif +`:` +#ifndef HAS_UNIFORM_u_`+tr+` + `+tr+" = unpack_mix_"+hr+"(a_"+tr+", u_"+tr+`_t); +#else + `+nr+" "+Ye+" "+tr+" = u_"+tr+`; +#endif +`:Se==="define"?` +#ifndef HAS_UNIFORM_u_`+tr+` +uniform lowp float u_`+tr+`_t; +attribute `+nr+" "+lr+" a_"+tr+`; +#else +uniform `+nr+" "+Ye+" u_"+tr+`; +#endif +`:hr==="vec4"?` +#ifndef HAS_UNIFORM_u_`+tr+` + `+nr+" "+Ye+" "+tr+" = a_"+tr+`; +#else + `+nr+" "+Ye+" "+tr+" = u_"+tr+`; +#endif +`:` +#ifndef HAS_UNIFORM_u_`+tr+` + `+nr+" "+Ye+" "+tr+" = unpack_mix_"+hr+"(a_"+tr+", u_"+tr+`_t); +#else + `+nr+" "+Ye+" "+tr+" = u_"+tr+`; +#endif +`}),{fragmentSource:Z,vertexSource:ot,staticAttributes:xt,staticUniforms:ye}}var bf=Object.freeze({__proto__:null,prelude:zu,background:jc,backgroundPattern:Hh,circle:lu,clippingMask:Eh,heatmap:Sc,heatmapTexture:Uc,collisionBox:_u,collisionCircle:uf,debug:gh,fill:Wh,fillOutline:Cf,fillOutlinePattern:Pd,fillPattern:Qd,fillExtrusion:cf,fillExtrusionPattern:Lf,hillshadePrepare:wc,hillshade:hf,line:Qc,lineGradient:ff,linePattern:Pf,lineSDF:vh,raster:bu,symbolIcon:Ch,symbolSDF:Vc,symbolTextAndIcon:fd}),qh=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};qh.prototype.bind=function(Z,ot,et,xt,Ut,fe,ye,Yt){this.context=Z;for(var ce=this.boundPaintVertexBuffers.length!==xt.length,Se=0;!ce&&Se>16,Yt>>16],u_pixel_coord_lower:[ye&65535,Yt&65535]}}function wf(Z,ot,et,xt){var Ut=et.imageManager.getPattern(Z.from.toString()),fe=et.imageManager.getPattern(Z.to.toString()),ye=et.imageManager.getPixelSize(),Yt=ye.width,ce=ye.height,Se=Math.pow(2,xt.tileID.overscaledZ),nr=xt.tileSize*Math.pow(2,et.transform.tileZoom)/Se,Ye=nr*(xt.tileID.canonical.x+xt.tileID.wrap*Se),tr=nr*xt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Ut.tl,u_pattern_br_a:Ut.br,u_pattern_tl_b:fe.tl,u_pattern_br_b:fe.br,u_texsize:[Yt,ce],u_mix:ot.t,u_pattern_size_a:Ut.displaySize,u_pattern_size_b:fe.displaySize,u_scale_a:ot.fromScale,u_scale_b:ot.toScale,u_tile_units_to_pixels:1/Js(xt,1,et.transform.tileZoom),u_pixel_coord_upper:[Ye>>16,tr>>16],u_pixel_coord_lower:[Ye&65535,tr&65535]}}var zd=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_lightpos:new t.Uniform3f(Z,ot.u_lightpos),u_lightintensity:new t.Uniform1f(Z,ot.u_lightintensity),u_lightcolor:new t.Uniform3f(Z,ot.u_lightcolor),u_vertical_gradient:new t.Uniform1f(Z,ot.u_vertical_gradient),u_opacity:new t.Uniform1f(Z,ot.u_opacity)}},gc=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_lightpos:new t.Uniform3f(Z,ot.u_lightpos),u_lightintensity:new t.Uniform1f(Z,ot.u_lightintensity),u_lightcolor:new t.Uniform3f(Z,ot.u_lightcolor),u_vertical_gradient:new t.Uniform1f(Z,ot.u_vertical_gradient),u_height_factor:new t.Uniform1f(Z,ot.u_height_factor),u_image:new t.Uniform1i(Z,ot.u_image),u_texsize:new t.Uniform2f(Z,ot.u_texsize),u_pixel_coord_upper:new t.Uniform2f(Z,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(Z,ot.u_pixel_coord_lower),u_scale:new t.Uniform3f(Z,ot.u_scale),u_fade:new t.Uniform1f(Z,ot.u_fade),u_opacity:new t.Uniform1f(Z,ot.u_opacity)}},Jf=function(Z,ot,et,xt){var Ut=ot.style.light,fe=Ut.properties.get("position"),ye=[fe.x,fe.y,fe.z],Yt=t.create$1();Ut.properties.get("anchor")==="viewport"&&t.fromRotation(Yt,-ot.transform.angle),t.transformMat3(ye,ye,Yt);var ce=Ut.properties.get("color");return{u_matrix:Z,u_lightpos:ye,u_lightintensity:Ut.properties.get("intensity"),u_lightcolor:[ce.r,ce.g,ce.b],u_vertical_gradient:+et,u_opacity:xt}},eh=function(Z,ot,et,xt,Ut,fe,ye){return t.extend(Jf(Z,ot,et,xt),Zh(fe,ot,ye),{u_height_factor:-Math.pow(2,Ut.overscaledZ)/ye.tileSize/8})},Lh=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix)}},yh=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_image:new t.Uniform1i(Z,ot.u_image),u_texsize:new t.Uniform2f(Z,ot.u_texsize),u_pixel_coord_upper:new t.Uniform2f(Z,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(Z,ot.u_pixel_coord_lower),u_scale:new t.Uniform3f(Z,ot.u_scale),u_fade:new t.Uniform1f(Z,ot.u_fade)}},Ru=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_world:new t.Uniform2f(Z,ot.u_world)}},eu=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_world:new t.Uniform2f(Z,ot.u_world),u_image:new t.Uniform1i(Z,ot.u_image),u_texsize:new t.Uniform2f(Z,ot.u_texsize),u_pixel_coord_upper:new t.Uniform2f(Z,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(Z,ot.u_pixel_coord_lower),u_scale:new t.Uniform3f(Z,ot.u_scale),u_fade:new t.Uniform1f(Z,ot.u_fade)}},xh=function(Z){return{u_matrix:Z}},df=function(Z,ot,et,xt){return t.extend(xh(Z),Zh(et,ot,xt))},_h=function(Z,ot){return{u_matrix:Z,u_world:ot}},qf=function(Z,ot,et,xt,Ut){return t.extend(df(Z,ot,et,xt),{u_world:Ut})},mr=function(Z,ot){return{u_camera_to_center_distance:new t.Uniform1f(Z,ot.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(Z,ot.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(Z,ot.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(Z,ot.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(Z,ot.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix)}},Ur=function(Z,ot,et,xt){var Ut=Z.transform,fe,ye;if(xt.paint.get("circle-pitch-alignment")==="map"){var Yt=Js(et,1,Ut.zoom);fe=!0,ye=[Yt,Yt]}else fe=!1,ye=Ut.pixelsToGLUnits;return{u_camera_to_center_distance:Ut.cameraToCenterDistance,u_scale_with_map:+(xt.paint.get("circle-pitch-scale")==="map"),u_matrix:Z.translatePosMatrix(ot.posMatrix,et,xt.paint.get("circle-translate"),xt.paint.get("circle-translate-anchor")),u_pitch_with_map:+fe,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:ye}},_n=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_camera_to_center_distance:new t.Uniform1f(Z,ot.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(Z,ot.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(Z,ot.u_extrude_scale),u_overscale_factor:new t.Uniform1f(Z,ot.u_overscale_factor)}},cn=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_inv_matrix:new t.UniformMatrix4f(Z,ot.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(Z,ot.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(Z,ot.u_viewport_size)}},Wn=function(Z,ot,et){var xt=Js(et,1,ot.zoom),Ut=Math.pow(2,ot.zoom-et.tileID.overscaledZ),fe=et.tileID.overscaleFactor();return{u_matrix:Z,u_camera_to_center_distance:ot.cameraToCenterDistance,u_pixels_to_tile_units:xt,u_extrude_scale:[ot.pixelsToGLUnits[0]/(xt*Ut),ot.pixelsToGLUnits[1]/(xt*Ut)],u_overscale_factor:fe}},hi=function(Z,ot,et){return{u_matrix:Z,u_inv_matrix:ot,u_camera_to_center_distance:et.cameraToCenterDistance,u_viewport_size:[et.width,et.height]}},ea=function(Z,ot){return{u_color:new t.UniformColor(Z,ot.u_color),u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_overlay:new t.Uniform1i(Z,ot.u_overlay),u_overlay_scale:new t.Uniform1f(Z,ot.u_overlay_scale)}},ga=function(Z,ot,et){return et===void 0&&(et=1),{u_matrix:Z,u_color:ot,u_overlay:0,u_overlay_scale:et}},Ra=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix)}},$a=function(Z){return{u_matrix:Z}},ua=function(Z,ot){return{u_extrude_scale:new t.Uniform1f(Z,ot.u_extrude_scale),u_intensity:new t.Uniform1f(Z,ot.u_intensity),u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix)}},za=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_world:new t.Uniform2f(Z,ot.u_world),u_image:new t.Uniform1i(Z,ot.u_image),u_color_ramp:new t.Uniform1i(Z,ot.u_color_ramp),u_opacity:new t.Uniform1f(Z,ot.u_opacity)}},wa=function(Z,ot,et,xt){return{u_matrix:Z,u_extrude_scale:Js(ot,1,et),u_intensity:xt}},Ji=function(Z,ot,et,xt){var Ut=t.create();t.ortho(Ut,0,Z.width,Z.height,0,0,1);var fe=Z.context.gl;return{u_matrix:Ut,u_world:[fe.drawingBufferWidth,fe.drawingBufferHeight],u_image:et,u_color_ramp:xt,u_opacity:ot.paint.get("heatmap-opacity")}},eo=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_image:new t.Uniform1i(Z,ot.u_image),u_latrange:new t.Uniform2f(Z,ot.u_latrange),u_light:new t.Uniform2f(Z,ot.u_light),u_shadow:new t.UniformColor(Z,ot.u_shadow),u_highlight:new t.UniformColor(Z,ot.u_highlight),u_accent:new t.UniformColor(Z,ot.u_accent)}},rs=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_image:new t.Uniform1i(Z,ot.u_image),u_dimension:new t.Uniform2f(Z,ot.u_dimension),u_zoom:new t.Uniform1f(Z,ot.u_zoom),u_unpack:new t.Uniform4f(Z,ot.u_unpack)}},Zo=function(Z,ot,et){var xt=et.paint.get("hillshade-shadow-color"),Ut=et.paint.get("hillshade-highlight-color"),fe=et.paint.get("hillshade-accent-color"),ye=et.paint.get("hillshade-illumination-direction")*(Math.PI/180);et.paint.get("hillshade-illumination-anchor")==="viewport"&&(ye-=Z.transform.angle);var Yt=!Z.options.moving;return{u_matrix:Z.transform.calculatePosMatrix(ot.tileID.toUnwrapped(),Yt),u_image:0,u_latrange:fs(Z,ot.tileID),u_light:[et.paint.get("hillshade-exaggeration"),ye],u_shadow:xt,u_highlight:Ut,u_accent:fe}},os=function(Z,ot){var et=ot.stride,xt=t.create();return t.ortho(xt,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(xt,xt,[0,-t.EXTENT,0]),{u_matrix:xt,u_image:1,u_dimension:[et,et],u_zoom:Z.overscaledZ,u_unpack:ot.getUnpackVector()}};function fs(Z,ot){var et=Math.pow(2,ot.canonical.z),xt=ot.canonical.y;return[new t.MercatorCoordinate(0,xt/et).toLngLat().lat,new t.MercatorCoordinate(0,(xt+1)/et).toLngLat().lat]}var no=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_ratio:new t.Uniform1f(Z,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f(Z,ot.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(Z,ot.u_units_to_pixels)}},qa=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_ratio:new t.Uniform1f(Z,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f(Z,ot.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(Z,ot.u_units_to_pixels),u_image:new t.Uniform1i(Z,ot.u_image),u_image_height:new t.Uniform1f(Z,ot.u_image_height)}},ds=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_texsize:new t.Uniform2f(Z,ot.u_texsize),u_ratio:new t.Uniform1f(Z,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f(Z,ot.u_device_pixel_ratio),u_image:new t.Uniform1i(Z,ot.u_image),u_units_to_pixels:new t.Uniform2f(Z,ot.u_units_to_pixels),u_scale:new t.Uniform3f(Z,ot.u_scale),u_fade:new t.Uniform1f(Z,ot.u_fade)}},tl=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_ratio:new t.Uniform1f(Z,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f(Z,ot.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(Z,ot.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(Z,ot.u_patternscale_a),u_patternscale_b:new t.Uniform2f(Z,ot.u_patternscale_b),u_sdfgamma:new t.Uniform1f(Z,ot.u_sdfgamma),u_image:new t.Uniform1i(Z,ot.u_image),u_tex_y_a:new t.Uniform1f(Z,ot.u_tex_y_a),u_tex_y_b:new t.Uniform1f(Z,ot.u_tex_y_b),u_mix:new t.Uniform1f(Z,ot.u_mix)}},Pl=function(Z,ot,et){var xt=Z.transform;return{u_matrix:qu(Z,ot,et),u_ratio:1/Js(ot,1,xt.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/xt.pixelsToGLUnits[0],1/xt.pixelsToGLUnits[1]]}},iu=function(Z,ot,et,xt){return t.extend(Pl(Z,ot,et),{u_image:0,u_image_height:xt})},Hl=function(Z,ot,et,xt){var Ut=Z.transform,fe=ml(ot,Ut);return{u_matrix:qu(Z,ot,et),u_texsize:ot.imageAtlasTexture.size,u_ratio:1/Js(ot,1,Ut.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[fe,xt.fromScale,xt.toScale],u_fade:xt.t,u_units_to_pixels:[1/Ut.pixelsToGLUnits[0],1/Ut.pixelsToGLUnits[1]]}},au=function(Z,ot,et,xt,Ut){var fe=Z.transform,ye=Z.lineAtlas,Yt=ml(ot,fe),ce=et.layout.get("line-cap")==="round",Se=ye.getDash(xt.from,ce),nr=ye.getDash(xt.to,ce),Ye=Se.width*Ut.fromScale,tr=nr.width*Ut.toScale;return t.extend(Pl(Z,ot,et),{u_patternscale_a:[Yt/Ye,-Se.height/2],u_patternscale_b:[Yt/tr,-nr.height/2],u_sdfgamma:ye.width/(Math.min(Ye,tr)*256*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:Se.y,u_tex_y_b:nr.y,u_mix:Ut.t})};function ml(Z,ot){return 1/Js(Z,1,ot.tileZoom)}function qu(Z,ot,et){return Z.translatePosMatrix(ot.tileID.posMatrix,ot,et.paint.get("line-translate"),et.paint.get("line-translate-anchor"))}var Lu=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_tl_parent:new t.Uniform2f(Z,ot.u_tl_parent),u_scale_parent:new t.Uniform1f(Z,ot.u_scale_parent),u_buffer_scale:new t.Uniform1f(Z,ot.u_buffer_scale),u_fade_t:new t.Uniform1f(Z,ot.u_fade_t),u_opacity:new t.Uniform1f(Z,ot.u_opacity),u_image0:new t.Uniform1i(Z,ot.u_image0),u_image1:new t.Uniform1i(Z,ot.u_image1),u_brightness_low:new t.Uniform1f(Z,ot.u_brightness_low),u_brightness_high:new t.Uniform1f(Z,ot.u_brightness_high),u_saturation_factor:new t.Uniform1f(Z,ot.u_saturation_factor),u_contrast_factor:new t.Uniform1f(Z,ot.u_contrast_factor),u_spin_weights:new t.Uniform3f(Z,ot.u_spin_weights)}},uu=function(Z,ot,et,xt,Ut){return{u_matrix:Z,u_tl_parent:ot,u_scale_parent:et,u_buffer_scale:1,u_fade_t:xt.mix,u_opacity:xt.opacity*Ut.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Ut.paint.get("raster-brightness-min"),u_brightness_high:Ut.paint.get("raster-brightness-max"),u_saturation_factor:$l(Ut.paint.get("raster-saturation")),u_contrast_factor:Ms(Ut.paint.get("raster-contrast")),u_spin_weights:zo(Ut.paint.get("raster-hue-rotate"))}};function zo(Z){Z*=Math.PI/180;var ot=Math.sin(Z),et=Math.cos(Z);return[(2*et+1)/3,(-Math.sqrt(3)*ot-et+1)/3,(Math.sqrt(3)*ot-et+1)/3]}function Ms(Z){return Z>0?1/(1-Z):1+Z}function $l(Z){return Z>0?1-1/(1.001-Z):-Z}var Fl=function(Z,ot){return{u_is_size_zoom_constant:new t.Uniform1i(Z,ot.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(Z,ot.u_is_size_feature_constant),u_size_t:new t.Uniform1f(Z,ot.u_size_t),u_size:new t.Uniform1f(Z,ot.u_size),u_camera_to_center_distance:new t.Uniform1f(Z,ot.u_camera_to_center_distance),u_pitch:new t.Uniform1f(Z,ot.u_pitch),u_rotate_symbol:new t.Uniform1i(Z,ot.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(Z,ot.u_aspect_ratio),u_fade_change:new t.Uniform1f(Z,ot.u_fade_change),u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(Z,ot.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(Z,ot.u_coord_matrix),u_is_text:new t.Uniform1i(Z,ot.u_is_text),u_pitch_with_map:new t.Uniform1i(Z,ot.u_pitch_with_map),u_texsize:new t.Uniform2f(Z,ot.u_texsize),u_texture:new t.Uniform1i(Z,ot.u_texture)}},vc=function(Z,ot){return{u_is_size_zoom_constant:new t.Uniform1i(Z,ot.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(Z,ot.u_is_size_feature_constant),u_size_t:new t.Uniform1f(Z,ot.u_size_t),u_size:new t.Uniform1f(Z,ot.u_size),u_camera_to_center_distance:new t.Uniform1f(Z,ot.u_camera_to_center_distance),u_pitch:new t.Uniform1f(Z,ot.u_pitch),u_rotate_symbol:new t.Uniform1i(Z,ot.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(Z,ot.u_aspect_ratio),u_fade_change:new t.Uniform1f(Z,ot.u_fade_change),u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(Z,ot.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(Z,ot.u_coord_matrix),u_is_text:new t.Uniform1i(Z,ot.u_is_text),u_pitch_with_map:new t.Uniform1i(Z,ot.u_pitch_with_map),u_texsize:new t.Uniform2f(Z,ot.u_texsize),u_texture:new t.Uniform1i(Z,ot.u_texture),u_gamma_scale:new t.Uniform1f(Z,ot.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(Z,ot.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(Z,ot.u_is_halo)}},Hc=function(Z,ot){return{u_is_size_zoom_constant:new t.Uniform1i(Z,ot.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(Z,ot.u_is_size_feature_constant),u_size_t:new t.Uniform1f(Z,ot.u_size_t),u_size:new t.Uniform1f(Z,ot.u_size),u_camera_to_center_distance:new t.Uniform1f(Z,ot.u_camera_to_center_distance),u_pitch:new t.Uniform1f(Z,ot.u_pitch),u_rotate_symbol:new t.Uniform1i(Z,ot.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(Z,ot.u_aspect_ratio),u_fade_change:new t.Uniform1f(Z,ot.u_fade_change),u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(Z,ot.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(Z,ot.u_coord_matrix),u_is_text:new t.Uniform1i(Z,ot.u_is_text),u_pitch_with_map:new t.Uniform1i(Z,ot.u_pitch_with_map),u_texsize:new t.Uniform2f(Z,ot.u_texsize),u_texsize_icon:new t.Uniform2f(Z,ot.u_texsize_icon),u_texture:new t.Uniform1i(Z,ot.u_texture),u_texture_icon:new t.Uniform1i(Z,ot.u_texture_icon),u_gamma_scale:new t.Uniform1f(Z,ot.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(Z,ot.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(Z,ot.u_is_halo)}},Pc=function(Z,ot,et,xt,Ut,fe,ye,Yt,ce,Se){var nr=Ut.transform;return{u_is_size_zoom_constant:+(Z==="constant"||Z==="source"),u_is_size_feature_constant:+(Z==="constant"||Z==="camera"),u_size_t:ot?ot.uSizeT:0,u_size:ot?ot.uSize:0,u_camera_to_center_distance:nr.cameraToCenterDistance,u_pitch:nr.pitch/360*2*Math.PI,u_rotate_symbol:+et,u_aspect_ratio:nr.width/nr.height,u_fade_change:Ut.options.fadeDuration?Ut.symbolFadeChange:1,u_matrix:fe,u_label_plane_matrix:ye,u_coord_matrix:Yt,u_is_text:+ce,u_pitch_with_map:+xt,u_texsize:Se,u_texture:0}},Ph=function(Z,ot,et,xt,Ut,fe,ye,Yt,ce,Se,nr){var Ye=Ut.transform;return t.extend(Pc(Z,ot,et,xt,Ut,fe,ye,Yt,ce,Se),{u_gamma_scale:xt?Math.cos(Ye._pitch)*Ye.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:1})},Wc=function(Z,ot,et,xt,Ut,fe,ye,Yt,ce,Se){return t.extend(Ph(Z,ot,et,xt,Ut,fe,ye,Yt,!0,ce),{u_texsize_icon:Se,u_texture_icon:1})},zh=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_opacity:new t.Uniform1f(Z,ot.u_opacity),u_color:new t.UniformColor(Z,ot.u_color)}},Iu=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_opacity:new t.Uniform1f(Z,ot.u_opacity),u_image:new t.Uniform1i(Z,ot.u_image),u_pattern_tl_a:new t.Uniform2f(Z,ot.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(Z,ot.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(Z,ot.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(Z,ot.u_pattern_br_b),u_texsize:new t.Uniform2f(Z,ot.u_texsize),u_mix:new t.Uniform1f(Z,ot.u_mix),u_pattern_size_a:new t.Uniform2f(Z,ot.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(Z,ot.u_pattern_size_b),u_scale_a:new t.Uniform1f(Z,ot.u_scale_a),u_scale_b:new t.Uniform1f(Z,ot.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(Z,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(Z,ot.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(Z,ot.u_tile_units_to_pixels)}},Ih=function(Z,ot,et){return{u_matrix:Z,u_opacity:ot,u_color:et}},es=function(Z,ot,et,xt,Ut,fe){return t.extend(wf(xt,fe,et,Ut),{u_matrix:Z,u_opacity:ot})},zs={fillExtrusion:zd,fillExtrusionPattern:gc,fill:Lh,fillPattern:yh,fillOutline:Ru,fillOutlinePattern:eu,circle:mr,collisionBox:_n,collisionCircle:cn,debug:ea,clippingMask:Ra,heatmap:ua,heatmapTexture:za,hillshade:eo,hillshadePrepare:rs,line:no,lineGradient:qa,linePattern:ds,lineSDF:tl,raster:Lu,symbolIcon:Fl,symbolSDF:vc,symbolTextAndIcon:Hc,background:zh,backgroundPattern:Iu},qc;function Zu(Z,ot,et,xt,Ut,fe,ye){for(var Yt=Z.context,ce=Yt.gl,Se=Z.useProgram("collisionBox"),nr=[],Ye=0,tr=0,lr=0;lr0){var fn=t.create(),fi=$e;t.mul(fn,Xe.placementInvProjMatrix,Z.transform.glCoordMatrix),t.mul(fn,fn,Xe.placementViewportMatrix),nr.push({circleArray:on,circleOffset:tr,transform:fi,invTransform:fn}),Ye+=on.length/4,tr=Ye}Cr&&Se.draw(Yt,ce.LINES,Kn.disabled,qn.disabled,Z.colorModeForRenderPass(),Qr.disabled,Wn($e,Z.transform,Ve),et.id,Cr.layoutVertexBuffer,Cr.indexBuffer,Cr.segments,null,Z.transform.zoom,null,null,Cr.collisionVertexBuffer)}}if(!(!ye||!nr.length)){var si=Z.useProgram("collisionCircle"),Gn=new t.StructArrayLayout2f1f2i16;Gn.resize(Ye*4),Gn._trim();for(var Mi=0,di=0,Ki=nr;di=0&&(hr[Xe.associatedIconIndex]={shiftedAnchor:sa,angle:Qa})}}if(nr){lr.clear();for(var Vo=Z.icon.placedSymbolArray,vs=0;vs0){var ye=t.browser.now(),Yt=(ye-Z.timeAdded)/fe,ce=ot?(ye-ot.timeAdded)/fe:-1,Se=et.getSource(),nr=Ut.coveringZoomLevel({tileSize:Se.tileSize,roundZoom:Se.roundZoom}),Ye=!ot||Math.abs(ot.tileID.overscaledZ-nr)>Math.abs(Z.tileID.overscaledZ-nr),tr=Ye&&Z.refreshedUponExpiration?1:t.clamp(Ye?Yt:1-ce,0,1);return Z.refreshedUponExpiration&&Yt>=1&&(Z.refreshedUponExpiration=!1),ot?{opacity:1,mix:1-tr}:{opacity:tr,mix:0}}else return{opacity:1,mix:0}}function Nr(Z,ot,et){var xt=et.paint.get("background-color"),Ut=et.paint.get("background-opacity");if(Ut!==0){var fe=Z.context,ye=fe.gl,Yt=Z.transform,ce=Yt.tileSize,Se=et.paint.get("background-pattern");if(!Z.isPatternMissing(Se)){var nr=!Se&&xt.a===1&&Ut===1&&Z.opaquePassEnabledForLayer()?"opaque":"translucent";if(Z.renderPass===nr){var Ye=qn.disabled,tr=Z.depthModeForSublayer(0,nr==="opaque"?Kn.ReadWrite:Kn.ReadOnly),lr=Z.colorModeForRenderPass(),hr=Z.useProgram(Se?"backgroundPattern":"background"),Ve=Yt.coveringTiles({tileSize:ce});Se&&(fe.activeTexture.set(ye.TEXTURE0),Z.imageManager.bind(Z.context));for(var Xe=et.getCrossfadeParameters(),$e=0,Cr=Ve;$e "+et.overscaledZ);var $e=Xe+" "+lr+"kb";hs(Z,$e),ye.draw(xt,Ut.TRIANGLES,Yt,ce,rr.alphaBlended,Qr.disabled,ga(fe,t.Color.transparent,Ve),nr,Z.debugBuffer,Z.quadTriangleIndexBuffer,Z.debugSegments)}function hs(Z,ot){Z.initDebugOverlayCanvas();var et=Z.debugOverlayCanvas,xt=Z.context.gl,Ut=Z.debugOverlayCanvas.getContext("2d");Ut.clearRect(0,0,et.width,et.height),Ut.shadowColor="white",Ut.shadowBlur=2,Ut.lineWidth=1.5,Ut.strokeStyle="white",Ut.textBaseline="top",Ut.font="bold 36px Open Sans, sans-serif",Ut.fillText(ot,5,5),Ut.strokeText(ot,5,5),Z.debugOverlayTexture.update(et),Z.debugOverlayTexture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE)}function hl(Z,ot,et){var xt=Z.context,Ut=et.implementation;if(Z.renderPass==="offscreen"){var fe=Ut.prerender;fe&&(Z.setCustomLayerDefaults(),xt.setColorMode(Z.colorModeForRenderPass()),fe.call(Ut,xt.gl,Z.transform.customLayerMatrix()),xt.setDirty(),Z.setBaseState())}else if(Z.renderPass==="translucent"){Z.setCustomLayerDefaults(),xt.setColorMode(Z.colorModeForRenderPass()),xt.setStencilMode(qn.disabled);var ye=Ut.renderingMode==="3d"?new Kn(Z.context.gl.LEQUAL,Kn.ReadWrite,Z.depthRangeFor3D):Z.depthModeForSublayer(0,Kn.ReadOnly);xt.setDepthMode(ye),Ut.render(xt.gl,Z.transform.customLayerMatrix()),xt.setDirty(),Z.setBaseState(),xt.bindFramebuffer.set(null)}}var vl={symbol:I,circle:Ke,heatmap:gr,line:Sn,fill:Xt,"fill-extrusion":xe,hillshade:je,raster:wr,background:Nr,debug:Ro,custom:hl},Os=function(Z,ot){this.context=new Cn(Z),this.transform=ot,this._tileTextures={},this.setup(),this.numSublayers=wn.maxUnderzooming+wn.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Gu,this.gpuTimers={}};Os.prototype.resize=function(Z,ot){if(this.width=Z*t.browser.devicePixelRatio,this.height=ot*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var et=0,xt=this.style._order;et256&&this.clearStencil(),et.setColorMode(rr.disabled),et.setDepthMode(Kn.disabled);var Ut=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var fe=0,ye=ot;fe256&&this.clearStencil();var Z=this.nextStencilID++,ot=this.context.gl;return new qn({func:ot.NOTEQUAL,mask:255},Z,255,ot.KEEP,ot.KEEP,ot.REPLACE)},Os.prototype.stencilModeForClipping=function(Z){var ot=this.context.gl;return new qn({func:ot.EQUAL,mask:255},this._tileClippingMaskIDs[Z.key],0,ot.KEEP,ot.KEEP,ot.REPLACE)},Os.prototype.stencilConfigForOverlap=function(Z){var ot,et=this.context.gl,xt=Z.sort(function(ce,Se){return Se.overscaledZ-ce.overscaledZ}),Ut=xt[xt.length-1].overscaledZ,fe=xt[0].overscaledZ-Ut+1;if(fe>1){this.currentStencilSource=void 0,this.nextStencilID+fe>256&&this.clearStencil();for(var ye={},Yt=0;Yt=0;this.currentLayer--){var on=this.style._layers[xt[this.currentLayer]],fn=Ut[on.source],fi=Yt[on.source];this._renderTileClippingMasks(on,fi),this.renderLayer(this,fn,on,fi)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?ot.pop():null},Os.prototype.isPatternMissing=function(Z){if(!Z)return!1;if(!Z.from||!Z.to)return!0;var ot=this.imageManager.getPattern(Z.from.toString()),et=this.imageManager.getPattern(Z.to.toString());return!ot||!et},Os.prototype.useProgram=function(Z,ot){this.cache=this.cache||{};var et=""+Z+(ot?ot.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[et]||(this.cache[et]=new rf(this.context,Z,bf[Z],ot,zs[Z],this._showOverdrawInspector)),this.cache[et]},Os.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Os.prototype.setBaseState=function(){var Z=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(Z.FUNC_ADD)},Os.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var Z=this.context.gl;this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,Z.RGBA)}},Os.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var bl=function(Z,ot){this.points=Z,this.planes=ot};bl.fromInvProjectionMatrix=function(Z,ot,et){var xt=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],Ut=Math.pow(2,et),fe=xt.map(function(ce){return t.transformMat4([],ce,Z)}).map(function(ce){return t.scale$1([],ce,1/ce[3]/ot*Ut)}),ye=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Yt=ye.map(function(ce){var Se=t.sub([],fe[ce[0]],fe[ce[1]]),nr=t.sub([],fe[ce[2]],fe[ce[1]]),Ye=t.normalize([],t.cross([],Se,nr)),tr=-t.dot(Ye,fe[ce[1]]);return Ye.concat(tr)});return new bl(fe,Yt)};var Su=function(Z,ot){this.min=Z,this.max=ot,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};Su.prototype.quadrant=function(Z){for(var ot=[Z%2===0,Z<2],et=t.clone$2(this.min),xt=t.clone$2(this.max),Ut=0;Ut=0;if(fe===0)return 0;fe!==ot.length&&(et=!1)}if(et)return 2;for(var Yt=0;Yt<3;Yt++){for(var ce=Number.MAX_VALUE,Se=-Number.MAX_VALUE,nr=0;nrthis.max[Yt]-this.min[Yt])return 0}return 1};var mu=function(Z,ot,et,xt){if(Z===void 0&&(Z=0),ot===void 0&&(ot=0),et===void 0&&(et=0),xt===void 0&&(xt=0),isNaN(Z)||Z<0||isNaN(ot)||ot<0||isNaN(et)||et<0||isNaN(xt)||xt<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=Z,this.bottom=ot,this.left=et,this.right=xt};mu.prototype.interpolate=function(Z,ot,et){return ot.top!=null&&Z.top!=null&&(this.top=t.number(Z.top,ot.top,et)),ot.bottom!=null&&Z.bottom!=null&&(this.bottom=t.number(Z.bottom,ot.bottom,et)),ot.left!=null&&Z.left!=null&&(this.left=t.number(Z.left,ot.left,et)),ot.right!=null&&Z.right!=null&&(this.right=t.number(Z.right,ot.right,et)),this},mu.prototype.getCenter=function(Z,ot){var et=t.clamp((this.left+Z-this.right)/2,0,Z),xt=t.clamp((this.top+ot-this.bottom)/2,0,ot);return new t.Point(et,xt)},mu.prototype.equals=function(Z){return this.top===Z.top&&this.bottom===Z.bottom&&this.left===Z.left&&this.right===Z.right},mu.prototype.clone=function(){return new mu(this.top,this.bottom,this.left,this.right)},mu.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Ws=function(Z,ot,et,xt,Ut){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Ut===void 0?!0:Ut,this._minZoom=Z||0,this._maxZoom=ot||22,this._minPitch=et??0,this._maxPitch=xt??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new mu,this._posMatrixCache={},this._alignedPosMatrixCache={}},qs={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};Ws.prototype.clone=function(){var Z=new Ws(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return Z.tileSize=this.tileSize,Z.latRange=this.latRange,Z.width=this.width,Z.height=this.height,Z._center=this._center,Z.zoom=this.zoom,Z.angle=this.angle,Z._fov=this._fov,Z._pitch=this._pitch,Z._unmodified=this._unmodified,Z._edgeInsets=this._edgeInsets.clone(),Z._calcMatrices(),Z},qs.minZoom.get=function(){return this._minZoom},qs.minZoom.set=function(Z){this._minZoom!==Z&&(this._minZoom=Z,this.zoom=Math.max(this.zoom,Z))},qs.maxZoom.get=function(){return this._maxZoom},qs.maxZoom.set=function(Z){this._maxZoom!==Z&&(this._maxZoom=Z,this.zoom=Math.min(this.zoom,Z))},qs.minPitch.get=function(){return this._minPitch},qs.minPitch.set=function(Z){this._minPitch!==Z&&(this._minPitch=Z,this.pitch=Math.max(this.pitch,Z))},qs.maxPitch.get=function(){return this._maxPitch},qs.maxPitch.set=function(Z){this._maxPitch!==Z&&(this._maxPitch=Z,this.pitch=Math.min(this.pitch,Z))},qs.renderWorldCopies.get=function(){return this._renderWorldCopies},qs.renderWorldCopies.set=function(Z){Z===void 0?Z=!0:Z===null&&(Z=!1),this._renderWorldCopies=Z},qs.worldSize.get=function(){return this.tileSize*this.scale},qs.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},qs.size.get=function(){return new t.Point(this.width,this.height)},qs.bearing.get=function(){return-this.angle/Math.PI*180},qs.bearing.set=function(Z){var ot=-t.wrap(Z,-180,180)*Math.PI/180;this.angle!==ot&&(this._unmodified=!1,this.angle=ot,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},qs.pitch.get=function(){return this._pitch/Math.PI*180},qs.pitch.set=function(Z){var ot=t.clamp(Z,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ot&&(this._unmodified=!1,this._pitch=ot,this._calcMatrices())},qs.fov.get=function(){return this._fov/Math.PI*180},qs.fov.set=function(Z){Z=Math.max(.01,Math.min(60,Z)),this._fov!==Z&&(this._unmodified=!1,this._fov=Z/180*Math.PI,this._calcMatrices())},qs.zoom.get=function(){return this._zoom},qs.zoom.set=function(Z){var ot=Math.min(Math.max(Z,this.minZoom),this.maxZoom);this._zoom!==ot&&(this._unmodified=!1,this._zoom=ot,this.scale=this.zoomScale(ot),this.tileZoom=Math.floor(ot),this.zoomFraction=ot-this.tileZoom,this._constrain(),this._calcMatrices())},qs.center.get=function(){return this._center},qs.center.set=function(Z){Z.lat===this._center.lat&&Z.lng===this._center.lng||(this._unmodified=!1,this._center=Z,this._constrain(),this._calcMatrices())},qs.padding.get=function(){return this._edgeInsets.toJSON()},qs.padding.set=function(Z){this._edgeInsets.equals(Z)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,Z,1),this._calcMatrices())},qs.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Ws.prototype.isPaddingEqual=function(Z){return this._edgeInsets.equals(Z)},Ws.prototype.interpolatePadding=function(Z,ot,et){this._unmodified=!1,this._edgeInsets.interpolate(Z,ot,et),this._constrain(),this._calcMatrices()},Ws.prototype.coveringZoomLevel=function(Z){var ot=(Z.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/Z.tileSize));return Math.max(0,ot)},Ws.prototype.getVisibleUnwrappedCoordinates=function(Z){var ot=[new t.UnwrappedTileID(0,Z)];if(this._renderWorldCopies)for(var et=this.pointCoordinate(new t.Point(0,0)),xt=this.pointCoordinate(new t.Point(this.width,0)),Ut=this.pointCoordinate(new t.Point(this.width,this.height)),fe=this.pointCoordinate(new t.Point(0,this.height)),ye=Math.floor(Math.min(et.x,xt.x,Ut.x,fe.x)),Yt=Math.floor(Math.max(et.x,xt.x,Ut.x,fe.x)),ce=1,Se=ye-ce;Se<=Yt+ce;Se++)Se!==0&&ot.push(new t.UnwrappedTileID(Se,Z));return ot},Ws.prototype.coveringTiles=function(Z){var ot=this.coveringZoomLevel(Z),et=ot;if(Z.minzoom!==void 0&&otZ.maxzoom&&(ot=Z.maxzoom);var xt=t.MercatorCoordinate.fromLngLat(this.center),Ut=Math.pow(2,ot),fe=[Ut*xt.x,Ut*xt.y,0],ye=bl.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,ot),Yt=Z.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Yt=ot);var ce=3,Se=function(Ai){return{aabb:new Su([Ai*Ut,0,0],[(Ai+1)*Ut,Ut,0]),zoom:0,x:0,y:0,wrap:Ai,fullyVisible:!1}},nr=[],Ye=[],tr=ot,lr=Z.reparseOverscaled?et:ot;if(this._renderWorldCopies)for(var hr=1;hr<=3;hr++)nr.push(Se(-hr)),nr.push(Se(hr));for(nr.push(Se(0));nr.length>0;){var Ve=nr.pop(),Xe=Ve.x,$e=Ve.y,Cr=Ve.fullyVisible;if(!Cr){var on=Ve.aabb.intersects(ye);if(on===0)continue;Cr=on===2}var fn=Ve.aabb.distanceX(fe),fi=Ve.aabb.distanceY(fe),si=Math.max(Math.abs(fn),Math.abs(fi)),Gn=ce+(1<Gn&&Ve.zoom>=Yt){Ye.push({tileID:new t.OverscaledTileID(Ve.zoom===tr?lr:Ve.zoom,Ve.wrap,Ve.zoom,Xe,$e),distanceSq:t.sqrLen([fe[0]-.5-Xe,fe[1]-.5-$e])});continue}for(var Mi=0;Mi<4;Mi++){var di=(Xe<<1)+Mi%2,Ki=($e<<1)+(Mi>>1);nr.push({aabb:Ve.aabb.quadrant(Mi),zoom:Ve.zoom+1,x:di,y:Ki,wrap:Ve.wrap,fullyVisible:Cr})}}return Ye.sort(function(Ai,Si){return Ai.distanceSq-Si.distanceSq}).map(function(Ai){return Ai.tileID})},Ws.prototype.resize=function(Z,ot){this.width=Z,this.height=ot,this.pixelsToGLUnits=[2/Z,-2/ot],this._constrain(),this._calcMatrices()},qs.unmodified.get=function(){return this._unmodified},Ws.prototype.zoomScale=function(Z){return Math.pow(2,Z)},Ws.prototype.scaleZoom=function(Z){return Math.log(Z)/Math.LN2},Ws.prototype.project=function(Z){var ot=t.clamp(Z.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(Z.lng)*this.worldSize,t.mercatorYfromLat(ot)*this.worldSize)},Ws.prototype.unproject=function(Z){return new t.MercatorCoordinate(Z.x/this.worldSize,Z.y/this.worldSize).toLngLat()},qs.point.get=function(){return this.project(this.center)},Ws.prototype.setLocationAtPoint=function(Z,ot){var et=this.pointCoordinate(ot),xt=this.pointCoordinate(this.centerPoint),Ut=this.locationCoordinate(Z),fe=new t.MercatorCoordinate(Ut.x-(et.x-xt.x),Ut.y-(et.y-xt.y));this.center=this.coordinateLocation(fe),this._renderWorldCopies&&(this.center=this.center.wrap())},Ws.prototype.locationPoint=function(Z){return this.coordinatePoint(this.locationCoordinate(Z))},Ws.prototype.pointLocation=function(Z){return this.coordinateLocation(this.pointCoordinate(Z))},Ws.prototype.locationCoordinate=function(Z){return t.MercatorCoordinate.fromLngLat(Z)},Ws.prototype.coordinateLocation=function(Z){return Z.toLngLat()},Ws.prototype.pointCoordinate=function(Z){var ot=0,et=[Z.x,Z.y,0,1],xt=[Z.x,Z.y,1,1];t.transformMat4(et,et,this.pixelMatrixInverse),t.transformMat4(xt,xt,this.pixelMatrixInverse);var Ut=et[3],fe=xt[3],ye=et[0]/Ut,Yt=xt[0]/fe,ce=et[1]/Ut,Se=xt[1]/fe,nr=et[2]/Ut,Ye=xt[2]/fe,tr=nr===Ye?0:(ot-nr)/(Ye-nr);return new t.MercatorCoordinate(t.number(ye,Yt,tr)/this.worldSize,t.number(ce,Se,tr)/this.worldSize)},Ws.prototype.coordinatePoint=function(Z){var ot=[Z.x*this.worldSize,Z.y*this.worldSize,0,1];return t.transformMat4(ot,ot,this.pixelMatrix),new t.Point(ot[0]/ot[3],ot[1]/ot[3])},Ws.prototype.getBounds=function(){return new t.LngLatBounds().extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},Ws.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},Ws.prototype.setMaxBounds=function(Z){Z?(this.lngRange=[Z.getWest(),Z.getEast()],this.latRange=[Z.getSouth(),Z.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Ws.prototype.calculatePosMatrix=function(Z,ot){ot===void 0&&(ot=!1);var et=Z.key,xt=ot?this._alignedPosMatrixCache:this._posMatrixCache;if(xt[et])return xt[et];var Ut=Z.canonical,fe=this.worldSize/this.zoomScale(Ut.z),ye=Ut.x+Math.pow(2,Ut.z)*Z.wrap,Yt=t.identity(new Float64Array(16));return t.translate(Yt,Yt,[ye*fe,Ut.y*fe,0]),t.scale(Yt,Yt,[fe/t.EXTENT,fe/t.EXTENT,1]),t.multiply(Yt,ot?this.alignedProjMatrix:this.projMatrix,Yt),xt[et]=new Float32Array(Yt),xt[et]},Ws.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Ws.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var Z=-90,ot=90,et=-180,xt=180,Ut,fe,ye,Yt,ce=this.size,Se=this._unmodified;if(this.latRange){var nr=this.latRange;Z=t.mercatorYfromLat(nr[1])*this.worldSize,ot=t.mercatorYfromLat(nr[0])*this.worldSize,Ut=ot-Zot&&(Yt=ot-Ve)}if(this.lngRange){var Xe=tr.x,$e=ce.x/2;Xe-$ext&&(ye=xt-$e)}(ye!==void 0||Yt!==void 0)&&(this.center=this.unproject(new t.Point(ye!==void 0?ye:tr.x,Yt!==void 0?Yt:tr.y))),this._unmodified=Se,this._constraining=!1}},Ws.prototype._calcMatrices=function(){if(this.height){var Z=this._fov/2,ot=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(Z)*this.height;var et=Math.PI/2+this._pitch,xt=this._fov*(.5+ot.y/this.height),Ut=Math.sin(xt)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-et-xt,.01,Math.PI-.01)),fe=this.point,ye=fe.x,Yt=fe.y,ce=Math.cos(Math.PI/2-this._pitch)*Ut+this.cameraToCenterDistance,Se=ce*1.01,nr=this.height/50,Ye=new Float64Array(16);t.perspective(Ye,this._fov,this.width/this.height,nr,Se),Ye[8]=-ot.x*2/this.width,Ye[9]=ot.y*2/this.height,t.scale(Ye,Ye,[1,-1,1]),t.translate(Ye,Ye,[0,0,-this.cameraToCenterDistance]),t.rotateX(Ye,Ye,this._pitch),t.rotateZ(Ye,Ye,this.angle),t.translate(Ye,Ye,[-ye,-Yt,0]),this.mercatorMatrix=t.scale([],Ye,[this.worldSize,this.worldSize,this.worldSize]),t.scale(Ye,Ye,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=Ye,this.invProjMatrix=t.invert([],this.projMatrix);var tr=this.width%2/2,lr=this.height%2/2,hr=Math.cos(this.angle),Ve=Math.sin(this.angle),Xe=ye-Math.round(ye)+hr*tr+Ve*lr,$e=Yt-Math.round(Yt)+hr*lr+Ve*tr,Cr=new Float64Array(Ye);if(t.translate(Cr,Cr,[Xe>.5?Xe-1:Xe,$e>.5?$e-1:$e,0]),this.alignedProjMatrix=Cr,Ye=t.create(),t.scale(Ye,Ye,[this.width/2,-this.height/2,1]),t.translate(Ye,Ye,[1,-1,0]),this.labelPlaneMatrix=Ye,Ye=t.create(),t.scale(Ye,Ye,[1,-1,1]),t.translate(Ye,Ye,[-1,-1,0]),t.scale(Ye,Ye,[2/this.width,2/this.height,1]),this.glCoordMatrix=Ye,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),Ye=t.invert(new Float64Array(16),this.pixelMatrix),!Ye)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Ye,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Ws.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var Z=this.pointCoordinate(new t.Point(0,0)),ot=[Z.x*this.worldSize,Z.y*this.worldSize,0,1],et=t.transformMat4(ot,ot,this.pixelMatrix);return et[3]/this.cameraToCenterDistance},Ws.prototype.getCameraPoint=function(){var Z=this._pitch,ot=Math.tan(Z)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,ot))},Ws.prototype.getCameraQueryGeometry=function(Z){var ot=this.getCameraPoint();if(Z.length===1)return[Z[0],ot];for(var et=ot.x,xt=ot.y,Ut=ot.x,fe=ot.y,ye=0,Yt=Z;ye=3&&!Z.some(function(et){return isNaN(et)})){var ot=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(Z[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+Z[2],+Z[1]],zoom:+Z[0],bearing:ot,pitch:+(Z[4]||0)}),!0}return!1},dc.prototype._updateHashUnthrottled=function(){var Z=t.window.location.href.replace(/(#.+)?$/,this.getHashString());try{t.window.history.replaceState(t.window.history.state,null,Z)}catch{}};var Zc={linearity:.3,easing:t.bezier(0,0,.3,1)},At=t.extend({deceleration:2500,maxSpeed:1400},Zc),jt=t.extend({deceleration:20,maxSpeed:1400},Zc),ue=t.extend({deceleration:1e3,maxSpeed:360},Zc),Me=t.extend({deceleration:1e3,maxSpeed:90},Zc),Le=function(Z){this._map=Z,this.clear()};Le.prototype.clear=function(){this._inertiaBuffer=[]},Le.prototype.record=function(Z){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:t.browser.now(),settings:Z})},Le.prototype._drainInertiaBuffer=function(){for(var Z=this._inertiaBuffer,ot=t.browser.now(),et=160;Z.length>0&&ot-Z[0].time>et;)Z.shift()},Le.prototype._onMoveEnd=function(Z){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var ot={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},et=0,xt=this._inertiaBuffer;et=this._clickTolerance||this._map.fire(new ir(Z.type,this._map,Z))},Xr.prototype.dblclick=function(Z){return this._firePreventable(new ir(Z.type,this._map,Z))},Xr.prototype.mouseover=function(Z){this._map.fire(new ir(Z.type,this._map,Z))},Xr.prototype.mouseout=function(Z){this._map.fire(new ir(Z.type,this._map,Z))},Xr.prototype.touchstart=function(Z){return this._firePreventable(new Mr(Z.type,this._map,Z))},Xr.prototype.touchmove=function(Z){this._map.fire(new Mr(Z.type,this._map,Z))},Xr.prototype.touchend=function(Z){this._map.fire(new Mr(Z.type,this._map,Z))},Xr.prototype.touchcancel=function(Z){this._map.fire(new Mr(Z.type,this._map,Z))},Xr.prototype._firePreventable=function(Z){if(this._map.fire(Z),Z.defaultPrevented)return{}},Xr.prototype.isEnabled=function(){return!0},Xr.prototype.isActive=function(){return!1},Xr.prototype.enable=function(){},Xr.prototype.disable=function(){};var vn=function(Z){this._map=Z};vn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},vn.prototype.mousemove=function(Z){this._map.fire(new ir(Z.type,this._map,Z))},vn.prototype.mousedown=function(){this._delayContextMenu=!0},vn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new ir("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},vn.prototype.contextmenu=function(Z){this._delayContextMenu?this._contextMenuEvent=Z:this._map.fire(new ir(Z.type,this._map,Z)),this._map.listens("contextmenu")&&Z.preventDefault()},vn.prototype.isEnabled=function(){return!0},vn.prototype.isActive=function(){return!1},vn.prototype.enable=function(){},vn.prototype.disable=function(){};var In=function(Z,ot){this._map=Z,this._el=Z.getCanvasContainer(),this._container=Z.getContainer(),this._clickTolerance=ot.clickTolerance||1};In.prototype.isEnabled=function(){return!!this._enabled},In.prototype.isActive=function(){return!!this._active},In.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},In.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},In.prototype.mousedown=function(Z,ot){this.isEnabled()&&Z.shiftKey&&Z.button===0&&(r.disableDrag(),this._startPos=this._lastPos=ot,this._active=!0)},In.prototype.mousemoveWindow=function(Z,ot){if(this._active){var et=ot;if(!(this._lastPos.equals(et)||!this._box&&et.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=Z.timeStamp),et.length===this.numTouches&&(this.centroid=Bi(ot),this.touches=On(et,ot)))},Ii.prototype.touchmove=function(Z,ot,et){if(!(this.aborted||!this.centroid)){var xt=On(et,ot);for(var Ut in this.touches){var fe=this.touches[Ut],ye=xt[Ut];(!ye||ye.dist(fe)>Ti)&&(this.aborted=!0)}}},Ii.prototype.touchend=function(Z,ot,et){if((!this.centroid||Z.timeStamp-this.startTime>mi)&&(this.aborted=!0),et.length===0){var xt=!this.aborted&&this.centroid;if(this.reset(),xt)return xt}};var Wi=function(Z){this.singleTap=new Ii(Z),this.numTaps=Z.numTaps,this.reset()};Wi.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Wi.prototype.touchstart=function(Z,ot,et){this.singleTap.touchstart(Z,ot,et)},Wi.prototype.touchmove=function(Z,ot,et){this.singleTap.touchmove(Z,ot,et)},Wi.prototype.touchend=function(Z,ot,et){var xt=this.singleTap.touchend(Z,ot,et);if(xt){var Ut=Z.timeStamp-this.lastTime0&&(this._active=!0);var xt=On(et,ot),Ut=new t.Point(0,0),fe=new t.Point(0,0),ye=0;for(var Yt in xt){var ce=xt[Yt],Se=this._touches[Yt];Se&&(Ut._add(ce),fe._add(ce.sub(Se)),ye++,xt[Yt]=ce)}if(this._touches=xt,!(yeMath.abs(Z.x)}var Bl=100,Ql=function(Z){function ot(){Z.apply(this,arguments)}return Z&&(ot.__proto__=Z),ot.prototype=Object.create(Z&&Z.prototype),ot.prototype.constructor=ot,ot.prototype.reset=function(){Z.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},ot.prototype._start=function(et){this._lastPoints=et,rh(et[0].sub(et[1]))&&(this._valid=!1)},ot.prototype._move=function(et,xt,Ut){var fe=et[0].sub(this._lastPoints[0]),ye=et[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(fe,ye,Ut.timeStamp),!!this._valid){this._lastPoints=et,this._active=!0;var Yt=(fe.y+ye.y)/2,ce=-.5;return{pitchDelta:Yt*ce}}},ot.prototype.gestureBeginsVertically=function(et,xt,Ut){if(this._valid!==void 0)return this._valid;var fe=2,ye=et.mag()>=fe,Yt=xt.mag()>=fe;if(!(!ye&&!Yt)){if(!ye||!Yt)return this._firstMove===void 0&&(this._firstMove=Ut),Ut-this._firstMove0==xt.y>0;return rh(et)&&rh(xt)&&ce}},ot}(Tl),bh={panStep:100,bearingStep:15,pitchStep:10},_e=function(){var Z=bh;this._panStep=Z.panStep,this._bearingStep=Z.bearingStep,this._pitchStep=Z.pitchStep,this._rotationDisabled=!1};_e.prototype.reset=function(){this._active=!1},_e.prototype.keydown=function(Z){var ot=this;if(!(Z.altKey||Z.ctrlKey||Z.metaKey)){var et=0,xt=0,Ut=0,fe=0,ye=0;switch(Z.keyCode){case 61:case 107:case 171:case 187:et=1;break;case 189:case 109:case 173:et=-1;break;case 37:Z.shiftKey?xt=-1:(Z.preventDefault(),fe=-1);break;case 39:Z.shiftKey?xt=1:(Z.preventDefault(),fe=1);break;case 38:Z.shiftKey?Ut=1:(Z.preventDefault(),ye=-1);break;case 40:Z.shiftKey?Ut=-1:(Z.preventDefault(),ye=1);break;default:return}return this._rotationDisabled&&(xt=0,Ut=0),{cameraAnimation:function(Yt){var ce=Yt.getZoom();Yt.easeTo({duration:300,easeId:"keyboardHandler",easing:kr,zoom:et?Math.round(ce)+et*(Z.shiftKey?2:1):ce,bearing:Yt.getBearing()+xt*ot._bearingStep,pitch:Yt.getPitch()+Ut*ot._pitchStep,offset:[-fe*ot._panStep,-ye*ot._panStep],center:Yt.getCenter()},{originalEvent:Z})}}}},_e.prototype.enable=function(){this._enabled=!0},_e.prototype.disable=function(){this._enabled=!1,this.reset()},_e.prototype.isEnabled=function(){return this._enabled},_e.prototype.isActive=function(){return this._active},_e.prototype.disableRotation=function(){this._rotationDisabled=!0},_e.prototype.enableRotation=function(){this._rotationDisabled=!1};function kr(Z){return Z*(2-Z)}var Lr=4.000244140625,Dn=1/100,oi=1/450,Jn=2,gn=function(Z,ot){this._map=Z,this._el=Z.getCanvasContainer(),this._handler=ot,this._delta=0,this._defaultZoomRate=Dn,this._wheelZoomRate=oi,t.bindAll(["_onTimeout"],this)};gn.prototype.setZoomRate=function(Z){this._defaultZoomRate=Z},gn.prototype.setWheelZoomRate=function(Z){this._wheelZoomRate=Z},gn.prototype.isEnabled=function(){return!!this._enabled},gn.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},gn.prototype.isZooming=function(){return!!this._zooming},gn.prototype.enable=function(Z){this.isEnabled()||(this._enabled=!0,this._aroundCenter=Z&&Z.around==="center")},gn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},gn.prototype.wheel=function(Z){if(this.isEnabled()){var ot=Z.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?Z.deltaY*40:Z.deltaY,et=t.browser.now(),xt=et-(this._lastWheelEventTime||0);this._lastWheelEventTime=et,ot!==0&&ot%Lr===0?this._type="wheel":ot!==0&&Math.abs(ot)<4?this._type="trackpad":xt>400?(this._type=null,this._lastValue=ot,this._timeout=setTimeout(this._onTimeout,40,Z)):this._type||(this._type=Math.abs(xt*ot)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ot+=this._lastValue)),Z.shiftKey&&ot&&(ot=ot/4),this._type&&(this._lastWheelEvent=Z,this._delta-=ot,this._active||this._start(Z)),Z.preventDefault()}},gn.prototype._onTimeout=function(Z){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Z)},gn.prototype._start=function(Z){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var ot=r.mousePos(this._el,Z);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(ot)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},gn.prototype.renderFrame=function(){var Z=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var ot=this._map.transform;if(this._delta!==0){var et=this._type==="wheel"&&Math.abs(this._delta)>Lr?this._wheelZoomRate:this._defaultZoomRate,xt=Jn/(1+Math.exp(-Math.abs(this._delta*et)));this._delta<0&&xt!==0&&(xt=1/xt);var Ut=typeof this._targetZoom=="number"?ot.zoomScale(this._targetZoom):ot.scale;this._targetZoom=Math.min(ot.maxZoom,Math.max(ot.minZoom,ot.scaleZoom(Ut*xt))),this._type==="wheel"&&(this._startZoom=ot.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var fe=typeof this._targetZoom=="number"?this._targetZoom:ot.zoom,ye=this._startZoom,Yt=this._easing,ce=!1,Se;if(this._type==="wheel"&&ye&&Yt){var nr=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),Ye=Yt(nr);Se=t.number(ye,fe,Ye),nr<1?this._frameId||(this._frameId=!0):ce=!0}else Se=fe,ce=!0;return this._active=!0,ce&&(this._active=!1,this._finishTimeout=setTimeout(function(){Z._zooming=!1,Z._handler._triggerRenderFrame(),delete Z._targetZoom,delete Z._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ce,zoomDelta:Se-ot.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},gn.prototype._smoothOutEasing=function(Z){var ot=t.ease;if(this._prevEase){var et=this._prevEase,xt=(t.browser.now()-et.start)/et.duration,Ut=et.easing(xt+.01)-et.easing(xt),fe=.27/Math.sqrt(Ut*Ut+1e-4)*.01,ye=Math.sqrt(.27*.27-fe*fe);ot=t.bezier(fe,ye,.25,1)}return this._prevEase={start:t.browser.now(),duration:Z,easing:ot},ot},gn.prototype.reset=function(){this._active=!1};var ni=function(Z,ot){this._clickZoom=Z,this._tapZoom=ot};ni.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ni.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ni.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ni.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Yi=function(){this.reset()};Yi.prototype.reset=function(){this._active=!1},Yi.prototype.dblclick=function(Z,ot){return Z.preventDefault(),{cameraAnimation:function(et){et.easeTo({duration:300,zoom:et.getZoom()+(Z.shiftKey?-1:1),around:et.unproject(ot)},{originalEvent:Z})}}},Yi.prototype.enable=function(){this._enabled=!0},Yi.prototype.disable=function(){this._enabled=!1,this.reset()},Yi.prototype.isEnabled=function(){return this._enabled},Yi.prototype.isActive=function(){return this._active};var Ui=function(){this._tap=new Wi({numTouches:1,numTaps:1}),this.reset()};Ui.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Ui.prototype.touchstart=function(Z,ot,et){this._swipePoint||(this._tapTime&&Z.timeStamp-this._tapTime>Un&&this.reset(),this._tapTime?et.length>0&&(this._swipePoint=ot[0],this._swipeTouch=et[0].identifier):this._tap.touchstart(Z,ot,et))},Ui.prototype.touchmove=function(Z,ot,et){if(!this._tapTime)this._tap.touchmove(Z,ot,et);else if(this._swipePoint){if(et[0].identifier!==this._swipeTouch)return;var xt=ot[0],Ut=xt.y-this._swipePoint.y;return this._swipePoint=xt,Z.preventDefault(),this._active=!0,{zoomDelta:Ut/128}}},Ui.prototype.touchend=function(Z,ot,et){if(this._tapTime)this._swipePoint&&et.length===0&&this.reset();else{var xt=this._tap.touchend(Z,ot,et);xt&&(this._tapTime=Z.timeStamp)}},Ui.prototype.touchcancel=function(){this.reset()},Ui.prototype.enable=function(){this._enabled=!0},Ui.prototype.disable=function(){this._enabled=!1,this.reset()},Ui.prototype.isEnabled=function(){return this._enabled},Ui.prototype.isActive=function(){return this._active};var va=function(Z,ot,et){this._el=Z,this._mousePan=ot,this._touchPan=et};va.prototype.enable=function(Z){this._inertiaOptions=Z||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},va.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},va.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},va.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Za=function(Z,ot,et){this._pitchWithRotate=Z.pitchWithRotate,this._mouseRotate=ot,this._mousePitch=et};Za.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Za.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Za.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Za.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Ba=function(Z,ot,et,xt){this._el=Z,this._touchZoom=ot,this._touchRotate=et,this._tapDragZoom=xt,this._rotationDisabled=!1,this._enabled=!0};Ba.prototype.enable=function(Z){this._touchZoom.enable(Z),this._rotationDisabled||this._touchRotate.enable(Z),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Ba.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Ba.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Ba.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Ba.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Ba.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var ta=function(Z){return Z.zoom||Z.drag||Z.pitch||Z.rotate},wi=function(Z){function ot(){Z.apply(this,arguments)}return Z&&(ot.__proto__=Z),ot.prototype=Object.create(Z&&Z.prototype),ot.prototype.constructor=ot,ot}(t.Event);function hn(Z){return Z.panDelta&&Z.panDelta.mag()||Z.zoomDelta||Z.bearingDelta||Z.pitchDelta}var Nn=function(Z,ot){this._map=Z,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Le(Z),this._bearingSnap=ot.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ot),t.bindAll(["handleEvent","handleWindowEvent"],this);var et=this._el;this._listeners=[[et,"touchstart",{passive:!0}],[et,"touchmove",{passive:!1}],[et,"touchend",void 0],[et,"touchcancel",void 0],[et,"mousedown",void 0],[et,"mousemove",void 0],[et,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[et,"mouseover",void 0],[et,"mouseout",void 0],[et,"dblclick",void 0],[et,"click",void 0],[et,"keydown",{capture:!1}],[et,"keyup",void 0],[et,"wheel",{passive:!1}],[et,"contextmenu",void 0],[t.window,"blur",void 0]];for(var xt=0,Ut=this._listeners;xtye?Math.min(2,fn):Math.max(.5,fn),Ai=Math.pow(Ki,1-Mi),Si=fe.unproject(Cr.add(on.mult(Mi*Ai)).mult(di));fe.setLocationAtPoint(fe.renderWorldCopies?Si.wrap():Si,Ve)}Ut._fireMoveEvents(xt)},function(Mi){Ut._afterEase(xt,Mi)},et),this},ot.prototype._prepareEase=function(et,xt,Ut){Ut===void 0&&(Ut={}),this._moving=!0,!xt&&!Ut.moving&&this.fire(new t.Event("movestart",et)),this._zooming&&!Ut.zooming&&this.fire(new t.Event("zoomstart",et)),this._rotating&&!Ut.rotating&&this.fire(new t.Event("rotatestart",et)),this._pitching&&!Ut.pitching&&this.fire(new t.Event("pitchstart",et))},ot.prototype._fireMoveEvents=function(et){this.fire(new t.Event("move",et)),this._zooming&&this.fire(new t.Event("zoom",et)),this._rotating&&this.fire(new t.Event("rotate",et)),this._pitching&&this.fire(new t.Event("pitch",et))},ot.prototype._afterEase=function(et,xt){if(!(this._easeId&&xt&&this._easeId===xt)){delete this._easeId;var Ut=this._zooming,fe=this._rotating,ye=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Ut&&this.fire(new t.Event("zoomend",et)),fe&&this.fire(new t.Event("rotateend",et)),ye&&this.fire(new t.Event("pitchend",et)),this.fire(new t.Event("moveend",et))}},ot.prototype.flyTo=function(et,xt){var Ut=this;if(!et.essential&&t.browser.prefersReducedMotion){var fe=t.pick(et,["center","zoom","bearing","pitch","around"]);return this.jumpTo(fe,xt)}this.stop(),et=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},et);var ye=this.transform,Yt=this.getZoom(),ce=this.getBearing(),Se=this.getPitch(),nr=this.getPadding(),Ye="zoom"in et?t.clamp(+et.zoom,ye.minZoom,ye.maxZoom):Yt,tr="bearing"in et?this._normalizeBearing(et.bearing,ce):ce,lr="pitch"in et?+et.pitch:Se,hr="padding"in et?et.padding:ye.padding,Ve=ye.zoomScale(Ye-Yt),Xe=t.Point.convert(et.offset),$e=ye.centerPoint.add(Xe),Cr=ye.pointLocation($e),on=t.LngLat.convert(et.center||Cr);this._normalizeCenter(on);var fn=ye.project(Cr),fi=ye.project(on).sub(fn),si=et.curve,Gn=Math.max(ye.width,ye.height),Mi=Gn/Ve,di=fi.mag();if("minZoom"in et){var Ki=t.clamp(Math.min(et.minZoom,Yt,Ye),ye.minZoom,ye.maxZoom),Ai=Gn/ye.zoomScale(Ki-Yt);si=Math.sqrt(Ai/di*2)}var Si=si*si;function sa(Ds){var Au=(Mi*Mi-Gn*Gn+(Ds?-1:1)*Si*Si*di*di)/(2*(Ds?Mi:Gn)*Si*di);return Math.log(Math.sqrt(Au*Au+1)-Au)}function Qa(Ds){return(Math.exp(Ds)-Math.exp(-Ds))/2}function so(Ds){return(Math.exp(Ds)+Math.exp(-Ds))/2}function Vo(Ds){return Qa(Ds)/so(Ds)}var vs=sa(0),zl=function(Ds){return so(vs)/so(vs+si*Ds)},jl=function(Ds){return Gn*((so(vs)*Vo(vs+si*Ds)-Qa(vs))/Si)/di},dl=(sa(1)-vs)/si;if(Math.abs(di)<1e-6||!isFinite(dl)){if(Math.abs(Gn-Mi)<1e-6)return this.easeTo(et,xt);var Ul=Miet.maxDuration&&(et.duration=0),this._zooming=!0,this._rotating=ce!==tr,this._pitching=lr!==Se,this._padding=!ye.isPaddingEqual(hr),this._prepareEase(xt,!1),this._ease(function(Ds){var Au=Ds*dl,nf=1/zl(Au);ye.zoom=Ds===1?Ye:Yt+ye.scaleZoom(nf),Ut._rotating&&(ye.bearing=t.number(ce,tr,Ds)),Ut._pitching&&(ye.pitch=t.number(Se,lr,Ds)),Ut._padding&&(ye.interpolatePadding(nr,hr,Ds),$e=ye.centerPoint.add(Xe));var zf=Ds===1?on:ye.unproject(fn.add(fi.mult(jl(Au))).mult(nf));ye.setLocationAtPoint(ye.renderWorldCopies?zf.wrap():zf,$e),Ut._fireMoveEvents(xt)},function(){return Ut._afterEase(xt)},et),this},ot.prototype.isEasing=function(){return!!this._easeFrameId},ot.prototype.stop=function(){return this._stop()},ot.prototype._stop=function(et,xt){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Ut=this._onEaseEnd;delete this._onEaseEnd,Ut.call(this,xt)}if(!et){var fe=this.handlers;fe&&fe.stop(!1)}return this},ot.prototype._ease=function(et,xt,Ut){Ut.animate===!1||Ut.duration===0?(et(1),xt()):(this._easeStart=t.browser.now(),this._easeOptions=Ut,this._onEaseFrame=et,this._onEaseEnd=xt,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},ot.prototype._renderFrameCallback=function(){var et=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(et)),et<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},ot.prototype._normalizeBearing=function(et,xt){et=t.wrap(et,-180,180);var Ut=Math.abs(et-xt);return Math.abs(et-360-xt)180?-360:Ut<-180?360:0}},ot}(t.Evented),_i=function(Z){Z===void 0&&(Z={}),this.options=Z,t.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};_i.prototype.getDefaultPosition=function(){return"bottom-right"},_i.prototype.onAdd=function(Z){var ot=this.options&&this.options.compact;return this._map=Z,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=r.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),ot&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),ot===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},_i.prototype.onRemove=function(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},_i.prototype._setElementTitle=function(Z,ot){var et=this._map._getUIString("AttributionControl."+ot);Z.title=et,Z.setAttribute("aria-label",et)},_i.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},_i.prototype._updateEditLink=function(){var Z=this._editLink;Z||(Z=this._editLink=this._container.querySelector(".mapbox-improve-map"));var ot=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(Z){var et=ot.reduce(function(xt,Ut,fe){return Ut.value&&(xt+=Ut.key+"="+Ut.value+(fe=0)return!1;return!0});var ye=Z.join(" | ");ye!==this._attribHTML&&(this._attribHTML=ye,Z.length?(this._innerContainer.innerHTML=ye,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},_i.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Qn=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};Qn.prototype.onAdd=function(Z){this._map=Z,this._container=r.create("div","mapboxgl-ctrl");var ot=r.create("a","mapboxgl-ctrl-logo");return ot.target="_blank",ot.rel="noopener nofollow",ot.href="https://www.mapbox.com/",ot.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ot.setAttribute("rel","noopener nofollow"),this._container.appendChild(ot),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Qn.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Qn.prototype.getDefaultPosition=function(){return"bottom-left"},Qn.prototype._updateLogo=function(Z){(!Z||Z.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},Qn.prototype._logoRequired=function(){if(this._map.style){var Z=this._map.style.sourceCaches;for(var ot in Z){var et=Z[ot].getSource();if(et.mapbox_logo)return!0}return!1}},Qn.prototype._updateCompact=function(){var Z=this._container.children;if(Z.length){var ot=Z[0];this._map.getCanvasContainer().offsetWidth<250?ot.classList.add("mapboxgl-compact"):ot.classList.remove("mapboxgl-compact")}};var Ma=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Ma.prototype.add=function(Z){var ot=++this._id,et=this._queue;return et.push({callback:Z,id:ot,cancelled:!1}),ot},Ma.prototype.remove=function(Z){for(var ot=this._currentlyRunning,et=ot?this._queue.concat(ot):this._queue,xt=0,Ut=et;xtxt.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(xt.minPitch!=null&&xt.maxPitch!=null&&xt.minPitch>xt.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(xt.minPitch!=null&&xt.minPitch$i)throw new Error("maxPitch must be less than or equal to "+$i);var fe=new Ws(xt.minZoom,xt.maxZoom,xt.minPitch,xt.maxPitch,xt.renderWorldCopies);if(Z.call(this,fe,xt),this._interactive=xt.interactive,this._maxTileCacheSize=xt.maxTileCacheSize,this._failIfMajorPerformanceCaveat=xt.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=xt.preserveDrawingBuffer,this._antialias=xt.antialias,this._trackResize=xt.trackResize,this._bearingSnap=xt.bearingSnap,this._refreshExpiredTiles=xt.refreshExpiredTiles,this._fadeDuration=xt.fadeDuration,this._crossSourceCollisions=xt.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=xt.collectResourceTiming,this._renderTaskQueue=new Ma,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},ca,xt.locale),this._clickTolerance=xt.clickTolerance,this._requestManager=new t.RequestManager(xt.transformRequest,xt.accessToken),typeof xt.container=="string"){if(this._container=t.window.document.getElementById(xt.container),!this._container)throw new Error("Container '"+xt.container+"' not found.")}else if(xt.container instanceof vi)this._container=xt.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(xt.maxBounds&&this.setMaxBounds(xt.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return Ut._update(!1)}),this.on("moveend",function(){return Ut._update(!1)}),this.on("zoom",function(){return Ut._update(!0)}),typeof t.window<"u"&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1),t.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Nn(this,xt);var ye=typeof xt.hash=="string"&&xt.hash||void 0;this._hash=xt.hash&&new dc(ye).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:xt.center,zoom:xt.zoom,bearing:xt.bearing,pitch:xt.pitch}),xt.bounds&&(this.resize(),this.fitBounds(xt.bounds,t.extend({},xt.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=xt.localIdeographFontFamily,xt.style&&this.setStyle(xt.style,{localIdeographFontFamily:xt.localIdeographFontFamily}),xt.attributionControl&&this.addControl(new _i({customAttribution:xt.customAttribution})),this.addControl(new Qn,xt.logoPosition),this.on("style.load",function(){Ut.transform.unmodified&&Ut.jumpTo(Ut.style.stylesheet)}),this.on("data",function(Yt){Ut._update(Yt.dataType==="style"),Ut.fire(new t.Event(Yt.dataType+"data",Yt))}),this.on("dataloading",function(Yt){Ut.fire(new t.Event(Yt.dataType+"dataloading",Yt))})}Z&&(ot.__proto__=Z),ot.prototype=Object.create(Z&&Z.prototype),ot.prototype.constructor=ot;var et={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return ot.prototype._getMapId=function(){return this._mapId},ot.prototype.addControl=function(xt,Ut){if(Ut===void 0&&(xt.getDefaultPosition?Ut=xt.getDefaultPosition():Ut="top-right"),!xt||!xt.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var fe=xt.onAdd(this);this._controls.push(xt);var ye=this._controlPositions[Ut];return Ut.indexOf("bottom")!==-1?ye.insertBefore(fe,ye.firstChild):ye.appendChild(fe),this},ot.prototype.removeControl=function(xt){if(!xt||!xt.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var Ut=this._controls.indexOf(xt);return Ut>-1&&this._controls.splice(Ut,1),xt.onRemove(this),this},ot.prototype.hasControl=function(xt){return this._controls.indexOf(xt)>-1},ot.prototype.resize=function(xt){var Ut=this._containerDimensions(),fe=Ut[0],ye=Ut[1];this._resizeCanvas(fe,ye),this.transform.resize(fe,ye),this.painter.resize(fe,ye);var Yt=!this._moving;return Yt&&(this.stop(),this.fire(new t.Event("movestart",xt)).fire(new t.Event("move",xt))),this.fire(new t.Event("resize",xt)),Yt&&this.fire(new t.Event("moveend",xt)),this},ot.prototype.getBounds=function(){return this.transform.getBounds()},ot.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},ot.prototype.setMaxBounds=function(xt){return this.transform.setMaxBounds(t.LngLatBounds.convert(xt)),this._update()},ot.prototype.setMinZoom=function(xt){if(xt=xt??Sa,xt>=Sa&&xt<=this.transform.maxZoom)return this.transform.minZoom=xt,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=xt,this._update(),this.getZoom()>xt&&this.setZoom(xt),this;throw new Error("maxZoom must be greater than the current minZoom")},ot.prototype.getMaxZoom=function(){return this.transform.maxZoom},ot.prototype.setMinPitch=function(xt){if(xt=xt??qi,xt=qi&&xt<=this.transform.maxPitch)return this.transform.minPitch=xt,this._update(),this.getPitch()$i)throw new Error("maxPitch must be less than or equal to "+$i);if(xt>=this.transform.minPitch)return this.transform.maxPitch=xt,this._update(),this.getPitch()>xt&&this.setPitch(xt),this;throw new Error("maxPitch must be greater than the current minPitch")},ot.prototype.getMaxPitch=function(){return this.transform.maxPitch},ot.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},ot.prototype.setRenderWorldCopies=function(xt){return this.transform.renderWorldCopies=xt,this._update()},ot.prototype.project=function(xt){return this.transform.locationPoint(t.LngLat.convert(xt))},ot.prototype.unproject=function(xt){return this.transform.pointLocation(t.Point.convert(xt))},ot.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},ot.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},ot.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},ot.prototype._createDelegatedListener=function(xt,Ut,fe){var ye=this,Yt;if(xt==="mouseenter"||xt==="mouseover"){var ce=!1,Se=function(Ve){var Xe=ye.getLayer(Ut)?ye.queryRenderedFeatures(Ve.point,{layers:[Ut]}):[];Xe.length?ce||(ce=!0,fe.call(ye,new ir(xt,ye,Ve.originalEvent,{features:Xe}))):ce=!1},nr=function(){ce=!1};return{layer:Ut,listener:fe,delegates:{mousemove:Se,mouseout:nr}}}else if(xt==="mouseleave"||xt==="mouseout"){var Ye=!1,tr=function(Ve){var Xe=ye.getLayer(Ut)?ye.queryRenderedFeatures(Ve.point,{layers:[Ut]}):[];Xe.length?Ye=!0:Ye&&(Ye=!1,fe.call(ye,new ir(xt,ye,Ve.originalEvent)))},lr=function(Ve){Ye&&(Ye=!1,fe.call(ye,new ir(xt,ye,Ve.originalEvent)))};return{layer:Ut,listener:fe,delegates:{mousemove:tr,mouseout:lr}}}else{var hr=function(Ve){var Xe=ye.getLayer(Ut)?ye.queryRenderedFeatures(Ve.point,{layers:[Ut]}):[];Xe.length&&(Ve.features=Xe,fe.call(ye,Ve),delete Ve.features)};return{layer:Ut,listener:fe,delegates:(Yt={},Yt[xt]=hr,Yt)}}},ot.prototype.on=function(xt,Ut,fe){if(fe===void 0)return Z.prototype.on.call(this,xt,Ut);var ye=this._createDelegatedListener(xt,Ut,fe);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[xt]=this._delegatedListeners[xt]||[],this._delegatedListeners[xt].push(ye);for(var Yt in ye.delegates)this.on(Yt,ye.delegates[Yt]);return this},ot.prototype.once=function(xt,Ut,fe){if(fe===void 0)return Z.prototype.once.call(this,xt,Ut);var ye=this._createDelegatedListener(xt,Ut,fe);for(var Yt in ye.delegates)this.once(Yt,ye.delegates[Yt]);return this},ot.prototype.off=function(xt,Ut,fe){var ye=this;if(fe===void 0)return Z.prototype.off.call(this,xt,Ut);var Yt=function(ce){for(var Se=ce[xt],nr=0;nr180;){var ye=et.locationPoint(Z);if(ye.x>=0&&ye.y>=0&&ye.x<=et.width&&ye.y<=et.height)break;Z.lng>et.center.lng?Z.lng-=360:Z.lng+=360}return Z}var ts={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Nl(Z,ot,et){var xt=Z.classList;for(var Ut in ts)xt.remove("mapboxgl-"+et+"-anchor-"+Ut);xt.add("mapboxgl-"+et+"-anchor-"+ot)}var Al=function(Z){function ot(et,xt){if(Z.call(this),(et instanceof t.window.HTMLElement||xt)&&(et=t.extend({element:et},xt)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=et&&et.anchor||"center",this._color=et&&et.color||"#3FB1CE",this._scale=et&&et.scale||1,this._draggable=et&&et.draggable||!1,this._clickTolerance=et&&et.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=et&&et.rotation||0,this._rotationAlignment=et&&et.rotationAlignment||"auto",this._pitchAlignment=et&&et.pitchAlignment&&et.pitchAlignment!=="auto"?et.pitchAlignment:this._rotationAlignment,!et||!et.element){this._defaultMarker=!0,this._element=r.create("div"),this._element.setAttribute("aria-label","Map marker");var Ut=r.createNS("http://www.w3.org/2000/svg","svg"),fe=41,ye=27;Ut.setAttributeNS(null,"display","block"),Ut.setAttributeNS(null,"height",fe+"px"),Ut.setAttributeNS(null,"width",ye+"px"),Ut.setAttributeNS(null,"viewBox","0 0 "+ye+" "+fe);var Yt=r.createNS("http://www.w3.org/2000/svg","g");Yt.setAttributeNS(null,"stroke","none"),Yt.setAttributeNS(null,"stroke-width","1"),Yt.setAttributeNS(null,"fill","none"),Yt.setAttributeNS(null,"fill-rule","evenodd");var ce=r.createNS("http://www.w3.org/2000/svg","g");ce.setAttributeNS(null,"fill-rule","nonzero");var Se=r.createNS("http://www.w3.org/2000/svg","g");Se.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Se.setAttributeNS(null,"fill","#000000");for(var nr=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],Ye=0,tr=nr;Ye=xt}this._isDragging&&(this._pos=et.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new t.Event("dragstart"))),this.fire(new t.Event("drag")))},ot.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new t.Event("dragend")),this._state="inactive"},ot.prototype._addDragHandler=function(et){this._element.contains(et.originalEvent.target)&&(et.preventDefault(),this._positionDelta=et.point.sub(this._pos).add(this._offset),this._pointerdownPos=et.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},ot.prototype.setDraggable=function(et){return this._draggable=!!et,this._map&&(et?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},ot.prototype.isDraggable=function(){return this._draggable},ot.prototype.setRotation=function(et){return this._rotation=et||0,this._update(),this},ot.prototype.getRotation=function(){return this._rotation},ot.prototype.setRotationAlignment=function(et){return this._rotationAlignment=et||"auto",this._update(),this},ot.prototype.getRotationAlignment=function(){return this._rotationAlignment},ot.prototype.setPitchAlignment=function(et){return this._pitchAlignment=et&&et!=="auto"?et:this._rotationAlignment,this._update(),this},ot.prototype.getPitchAlignment=function(){return this._pitchAlignment},ot}(t.Evented),us={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},wu;function fl(Z){wu!==void 0?Z(wu):t.window.navigator.permissions!==void 0?t.window.navigator.permissions.query({name:"geolocation"}).then(function(ot){wu=ot.state!=="denied",Z(wu)}):(wu=!!t.window.navigator.geolocation,Z(wu))}var Eu=0,pc=!1,yc=function(Z){function ot(et){Z.call(this),this.options=t.extend({},us,et),t.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return Z&&(ot.__proto__=Z),ot.prototype=Object.create(Z&&Z.prototype),ot.prototype.constructor=ot,ot.prototype.onAdd=function(et){return this._map=et,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),fl(this._setupUI),this._container},ot.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Eu=0,pc=!1},ot.prototype._isOutOfMapMaxBounds=function(et){var xt=this._map.getMaxBounds(),Ut=et.coords;return xt&&(Ut.longitudext.getEast()||Ut.latitudext.getNorth())},ot.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break}},ot.prototype._onSuccess=function(et){if(this._map){if(this._isOutOfMapMaxBounds(et)){this._setErrorState(),this.fire(new t.Event("outofmaxbounds",et)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=et,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(et),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(et),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",et)),this._finish()}},ot.prototype._updateCamera=function(et){var xt=new t.LngLat(et.coords.longitude,et.coords.latitude),Ut=et.coords.accuracy,fe=this._map.getBearing(),ye=t.extend({bearing:fe},this.options.fitBoundsOptions);this._map.fitBounds(xt.toBounds(Ut),ye,{geolocateSource:!0})},ot.prototype._updateMarker=function(et){if(et){var xt=new t.LngLat(et.coords.longitude,et.coords.latitude);this._accuracyCircleMarker.setLngLat(xt).addTo(this._map),this._userLocationDotMarker.setLngLat(xt).addTo(this._map),this._accuracy=et.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},ot.prototype._updateCircleRadius=function(){var et=this._map._container.clientHeight/2,xt=this._map.unproject([0,et]),Ut=this._map.unproject([1,et]),fe=xt.distanceTo(Ut),ye=Math.ceil(2*this._accuracy/fe);this._circleElement.style.width=ye+"px",this._circleElement.style.height=ye+"px"},ot.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},ot.prototype._onError=function(et){if(this._map){if(this.options.trackUserLocation)if(et.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var xt=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=xt,this._geolocateButton.setAttribute("aria-label",xt),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(et.code===3&&pc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",et)),this._finish()}},ot.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},ot.prototype._setupUI=function(et){var xt=this;if(this._container.addEventListener("contextmenu",function(ye){return ye.preventDefault()}),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",et===!1){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Ut=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Ut,this._geolocateButton.setAttribute("aria-label",Ut)}else{var fe=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=fe,this._geolocateButton.setAttribute("aria-label",fe)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Al(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Al({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(ye){var Yt=ye.originalEvent&&ye.originalEvent.type==="resize";!ye.geolocateSource&&xt._watchState==="ACTIVE_LOCK"&&!Yt&&(xt._watchState="BACKGROUND",xt._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),xt._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),xt.fire(new t.Event("trackuserlocationend")))})},ot.prototype.trigger=function(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Eu--,pc=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"));break}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Eu++;var et;Eu>1?(et={maximumAge:6e5,timeout:0},pc=!0):(et=this.options.positionOptions,pc=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,et)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},ot.prototype._clearWatch=function(){t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},ot}(t.Evented),yu={maxWidth:100,unit:"metric"},hu=function(Z){this.options=t.extend({},yu,Z),t.bindAll(["_onMove","setUnit"],this)};hu.prototype.getDefaultPosition=function(){return"bottom-left"},hu.prototype._onMove=function(){ku(this._map,this._container,this.options)},hu.prototype.onAdd=function(Z){return this._map=Z,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",Z.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},hu.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},hu.prototype.setUnit=function(Z){this.options.unit=Z,ku(this._map,this._container,this.options)};function ku(Z,ot,et){var xt=et&&et.maxWidth||100,Ut=Z._container.clientHeight/2,fe=Z.unproject([0,Ut]),ye=Z.unproject([xt,Ut]),Yt=fe.distanceTo(ye);if(et&&et.unit==="imperial"){var ce=3.2808*Yt;if(ce>5280){var Se=ce/5280;Bo(ot,xt,Se,Z._getUIString("ScaleControl.Miles"))}else Bo(ot,xt,ce,Z._getUIString("ScaleControl.Feet"))}else if(et&&et.unit==="nautical"){var nr=Yt/1852;Bo(ot,xt,nr,Z._getUIString("ScaleControl.NauticalMiles"))}else Yt>=1e3?Bo(ot,xt,Yt/1e3,Z._getUIString("ScaleControl.Kilometers")):Bo(ot,xt,Yt,Z._getUIString("ScaleControl.Meters"))}function Bo(Z,ot,et,xt){var Ut=ol(et),fe=Ut/et;Z.style.width=ot*fe+"px",Z.innerHTML=Ut+" "+xt}function Tu(Z){var ot=Math.pow(10,Math.ceil(-Math.log(Z)/Math.LN10));return Math.round(Z*ot)/ot}function ol(Z){var ot=Math.pow(10,(""+Math.floor(Z)).length-1),et=Z/ot;return et=et>=10?10:et>=5?5:et>=3?3:et>=2?2:et>=1?1:Tu(et),ot*et}var Cu=function(Z){this._fullscreen=!1,Z&&Z.container&&(Z.container instanceof t.window.HTMLElement?this._container=Z.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange")};Cu.prototype.onAdd=function(Z){return this._map=Z,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Cu.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Cu.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Cu.prototype._setupUI=function(){var Z=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",Z).setAttribute("aria-hidden",!0),Z.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Cu.prototype._updateTitle=function(){var Z=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Z),this._fullscreenButton.title=Z},Cu.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Cu.prototype._isFullscreen=function(){return this._fullscreen},Cu.prototype._changeIcon=function(){var Z=t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement;Z===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Cu.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var xc={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Eo=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Ss=function(Z){function ot(et){Z.call(this),this.options=t.extend(Object.create(xc),et),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return Z&&(ot.__proto__=Z),ot.prototype=Object.create(Z&&Z.prototype),ot.prototype.constructor=ot,ot.prototype.addTo=function(et){return this._map&&this.remove(),this._map=et,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new t.Event("open")),this},ot.prototype.isOpen=function(){return!!this._map},ot.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new t.Event("close")),this},ot.prototype.getLngLat=function(){return this._lngLat},ot.prototype.setLngLat=function(et){return this._lngLat=t.LngLat.convert(et),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},ot.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},ot.prototype.getElement=function(){return this._container},ot.prototype.setText=function(et){return this.setDOMContent(t.window.document.createTextNode(et))},ot.prototype.setHTML=function(et){var xt=t.window.document.createDocumentFragment(),Ut=t.window.document.createElement("body"),fe;for(Ut.innerHTML=et;fe=Ut.firstChild,!!fe;)xt.appendChild(fe);return this.setDOMContent(xt)},ot.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},ot.prototype.setMaxWidth=function(et){return this.options.maxWidth=et,this._update(),this},ot.prototype.setDOMContent=function(et){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(et),this._createCloseButton(),this._update(),this._focusFirstElement(),this},ot.prototype.addClassName=function(et){this._container&&this._container.classList.add(et)},ot.prototype.removeClassName=function(et){this._container&&this._container.classList.remove(et)},ot.prototype.setOffset=function(et){return this.options.offset=et,this._update(),this},ot.prototype.toggleClassName=function(et){if(this._container)return this._container.classList.toggle(et)},ot.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},ot.prototype._onMouseUp=function(et){this._update(et.point)},ot.prototype._onMouseMove=function(et){this._update(et.point)},ot.prototype._onDrag=function(et){this._update(et.point)},ot.prototype._update=function(et){var xt=this,Ut=this._lngLat||this._trackPointer;if(!(!this._map||!Ut||!this._content)&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(tr){return xt._container.classList.add(tr)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=So(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!et))){var fe=this._pos=this._trackPointer&&et?et:this._map.project(this._lngLat),ye=this.options.anchor,Yt=Ml(this.options.offset);if(!ye){var ce=this._container.offsetWidth,Se=this._container.offsetHeight,nr;fe.y+Yt.bottom.ythis._map.transform.height-Se?nr=["bottom"]:nr=[],fe.xthis._map.transform.width-ce/2&&nr.push("right"),nr.length===0?ye="bottom":ye=nr.join("-")}var Ye=fe.add(Yt[ye]).round();r.setTransform(this._container,ts[ye]+" translate("+Ye.x+"px,"+Ye.y+"px)"),Nl(this._container,ye,"popup")}},ot.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var et=this._container.querySelector(Eo);et&&et.focus()}},ot.prototype._onClose=function(){this.remove()},ot}(t.Evented);function Ml(Z){if(Z)if(typeof Z=="number"){var ot=Math.round(Math.sqrt(.5*Math.pow(Z,2)));return{center:new t.Point(0,0),top:new t.Point(0,Z),"top-left":new t.Point(ot,ot),"top-right":new t.Point(-ot,ot),bottom:new t.Point(0,-Z),"bottom-left":new t.Point(ot,-ot),"bottom-right":new t.Point(-ot,-ot),left:new t.Point(Z,0),right:new t.Point(-Z,0)}}else if(Z instanceof t.Point||Array.isArray(Z)){var et=t.Point.convert(Z);return{center:et,top:et,"top-left":et,"top-right":et,bottom:et,"bottom-left":et,"bottom-right":et,left:et,right:et}}else return{center:t.Point.convert(Z.center||[0,0]),top:t.Point.convert(Z.top||[0,0]),"top-left":t.Point.convert(Z["top-left"]||[0,0]),"top-right":t.Point.convert(Z["top-right"]||[0,0]),bottom:t.Point.convert(Z.bottom||[0,0]),"bottom-left":t.Point.convert(Z["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(Z["bottom-right"]||[0,0]),left:t.Point.convert(Z.left||[0,0]),right:t.Point.convert(Z.right||[0,0])};else return Ml(new t.Point(0,0))}var yl={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Po,NavigationControl:Oa,GeolocateControl:yc,AttributionControl:_i,ScaleControl:hu,FullscreenControl:Cu,Popup:Ss,Marker:Al,Style:ac,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:Wa,clearPrewarmedResources:ze,get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(Z){t.config.ACCESS_TOKEN=Z},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(Z){t.config.API_URL=Z},get workerCount(){return Di.workerCount},set workerCount(Z){Di.workerCount=Z},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(Z){t.config.MAX_PARALLEL_IMAGE_REQUESTS=Z},clearStorage:function(Z){t.clearTileCache(Z)},workerUrl:""};return yl}),P})}),iW=Ft((Q,$)=>{var c=bn(),g=tc().sanitizeHTML,P=cE(),S=Ev();function t(o,i){this.subplot=o,this.uid=o.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=S.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=t.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=r(o)},e.needsNewImage=function(o){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&o.sourcetype==="image"&&(this.source!==o.source||JSON.stringify(this.coordinates)!==JSON.stringify(o.coordinates))},e.needsNewSource=function(o){return this.sourceType!==o.sourcetype||JSON.stringify(this.source)!==JSON.stringify(o.source)||this.layerType!==o.type},e.needsNewLayer=function(o){return this.layerType!==o.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(o){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:o.source,coordinates:o.coordinates});var s=this.findFollowingMapboxLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},e.updateSource=function(o){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=o.sourcetype,this.source=o.source,!!r(o)){var s=n(o);i.addSource(this.idSource,s)}},e.findFollowingMapboxLayerId=function(o){if(o==="traces")for(var i=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function a(o){var i={},s={};switch(o.type){case"circle":c.extendFlat(s,{"circle-radius":o.circle.radius,"circle-color":o.color,"circle-opacity":o.opacity});break;case"line":c.extendFlat(s,{"line-width":o.line.width,"line-color":o.color,"line-opacity":o.opacity,"line-dasharray":o.line.dash});break;case"fill":c.extendFlat(s,{"fill-color":o.color,"fill-outline-color":o.fill.outlinecolor,"fill-opacity":o.opacity});break;case"symbol":var f=o.symbol,x=P(f.textposition,f.iconsize);c.extendFlat(i,{"icon-image":f.icon+"-15","icon-size":f.iconsize/10,"text-field":f.text,"text-size":f.textfont.size,"text-anchor":x.anchor,"text-offset":x.offset,"symbol-placement":f.placement}),c.extendFlat(s,{"icon-color":o.color,"text-color":f.textfont.color,"text-opacity":o.opacity});break;case"raster":c.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":o.opacity});break}return{layout:i,paint:s}}function n(o){var i=o.sourcetype,s=o.source,f={type:i},x;return i==="geojson"?x="data":i==="vector"?x=typeof s=="string"?"url":"tiles":i==="raster"?(x="tiles",f.tileSize=256):i==="image"&&(x="url",f.coordinates=o.coordinates),f[x]=s,o.sourceattribution&&(f.attribution=g(o.sourceattribution)),f}$.exports=function(o,i,s){var f=new t(o,i);return f.update(s),f}}),aW=Ft((Q,$)=>{var c=hE(),g=bn(),P=V1(),S=Xo(),t=Es(),e=up(),r=Qh(),a=v0(),n=a.drawMode,o=a.selectMode,i=vf().prepSelect,s=vf().clearOutline,f=vf().clearSelectionsCache,x=vf().selectOnClick,y=Ev(),v=iW();function T(E,A){this.id=A,this.gd=E;var h=E._fullLayout,p=E._context;this.container=h._glcontainer.node(),this.isStatic=p.staticPlot,this.uid=h._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(h),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var u=T.prototype;u.plot=function(E,A,h){var p=this,k=A[p.id];p.map&&k.accesstoken!==p.accessToken&&(p.map.remove(),p.map=null,p.styleObj=null,p.traceHash={},p.layerList=[]);var w;p.map?w=new Promise(function(R,O){p.updateMap(E,A,R,O)}):w=new Promise(function(R,O){p.createMap(E,A,R,O)}),h.push(w)},u.createMap=function(E,A,h,p){var k=this,w=A[k.id],R=k.styleObj=_(w.style,A);k.accessToken=w.accesstoken;var O=w.bounds,N=O?[[O.west,O.south],[O.east,O.north]]:null,V=k.map=new c.Map({container:k.div,style:R.style,center:M(w.center),zoom:w.zoom,bearing:w.bearing,pitch:w.pitch,maxBounds:N,interactive:!k.isStatic,preserveDrawingBuffer:k.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new c.AttributionControl({compact:!0}));V._canvas.style.left="0px",V._canvas.style.top="0px",k.rejectOnError(p),k.isStatic||k.initFx(E,A);var H=[];H.push(new Promise(function(F){V.once("load",F)})),H=H.concat(P.fetchTraceGeoData(E)),Promise.all(H).then(function(){k.fillBelowLookup(E,A),k.updateData(E),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.updateMap=function(E,A,h,p){var k=this,w=k.map,R=A[this.id];k.rejectOnError(p);var O=[],N=_(R.style,A);JSON.stringify(k.styleObj)!==JSON.stringify(N)&&(k.styleObj=N,w.setStyle(N.style),k.traceHash={},O.push(new Promise(function(V){w.once("styledata",V)}))),O=O.concat(P.fetchTraceGeoData(E)),Promise.all(O).then(function(){k.fillBelowLookup(E,A),k.updateData(E),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.fillBelowLookup=function(E,A){var h=A[this.id],p=h.layers,k,w,R=this.belowLookup={},O=!1;for(k=0;k1)for(k=0;k-1&&x(N.originalEvent,p,[h.xaxis],[h.yaxis],h.id,O),V.indexOf("event")>-1&&r.click(p,N.originalEvent)}}},u.updateFx=function(E){var A=this,h=A.map,p=A.gd;if(A.isStatic)return;function k(N){var V=A.map.unproject(N);return[V.lng,V.lat]}var w=E.dragmode,R;R=function(N,V){if(V.isRect){var H=N.range={};H[A.id]=[k([V.xmin,V.ymin]),k([V.xmax,V.ymax])]}else{var F=N.lassoPoints={};F[A.id]=V.map(k)}};var O=A.dragOptions;A.dragOptions=g.extendDeep(O||{},{dragmode:E.dragmode,element:A.div,gd:p,plotinfo:{id:A.id,domain:E[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis,fillRangeItems:R},xaxes:[A.xaxis],yaxes:[A.yaxis],subplot:A.id}),h.off("click",A.onClickInPanHandler),o(w)||n(w)?(h.dragPan.disable(),h.on("zoomstart",A.clearOutline),A.dragOptions.prepFn=function(N,V,H){i(N,V,H,A.dragOptions,w)},e.init(A.dragOptions)):(h.dragPan.enable(),h.off("zoomstart",A.clearOutline),A.div.onmousedown=null,A.div.ontouchstart=null,A.div.removeEventListener("touchstart",A.div._ontouchstart),A.onClickInPanHandler=A.onClickInPanFn(A.dragOptions),h.on("click",A.onClickInPanHandler))},u.updateFramework=function(E){var A=E[this.id].domain,h=E._size,p=this.div.style;p.width=h.w*(A.x[1]-A.x[0])+"px",p.height=h.h*(A.y[1]-A.y[0])+"px",p.left=h.l+A.x[0]*h.w+"px",p.top=h.t+(1-A.y[1])*h.h+"px",this.xaxis._offset=h.l+A.x[0]*h.w,this.xaxis._length=h.w*(A.x[1]-A.x[0]),this.yaxis._offset=h.t+(1-A.y[1])*h.h,this.yaxis._length=h.h*(A.y[1]-A.y[0])},u.updateLayers=function(E){var A=E[this.id],h=A.layers,p=this.layerList,k;if(h.length!==p.length){for(k=0;k{var c=bn(),g=P1(),P=Md(),S=M3();$.exports=function(r,a,n){g(r,a,n,{type:"mapbox",attributes:S,handleDefaults:t,partition:"y",accessToken:a._mapboxAccessToken})};function t(r,a,n,o){n("accesstoken",o.accessToken),n("style"),n("center.lon"),n("center.lat"),n("zoom"),n("bearing"),n("pitch");var i=n("bounds.west"),s=n("bounds.east"),f=n("bounds.south"),x=n("bounds.north");(i===void 0||s===void 0||f===void 0||x===void 0)&&delete a.bounds,P(r,a,{name:"layers",handleItemDefaults:e}),a._input=r}function e(r,a){function n(y,v){return c.coerce(r,a,S.layers,y,v)}var o=n("visible");if(o){var i=n("sourcetype"),s=i==="raster"||i==="image";n("source"),n("sourceattribution"),i==="vector"&&n("sourcelayer"),i==="image"&&n("coordinates");var f;s&&(f="raster");var x=n("type",f);s&&x!=="raster"&&(x=a.type="raster",c.log("Source types *raster* and *image* must drawn *raster* layer type.")),n("below"),n("color"),n("opacity"),n("minzoom"),n("maxzoom"),x==="circle"&&n("circle.radius"),x==="line"&&(n("line.width"),n("line.dash")),x==="fill"&&n("fill.outlinecolor"),x==="symbol"&&(n("symbol.icon"),n("symbol.iconsize"),n("symbol.text"),c.coerceFont(n,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),n("symbol.textposition"),n("symbol.placement"))}}}),mT=Ft(Q=>{var $=hE(),c=bn(),g=c.strTranslate,P=c.strScale,S=ud().getSubplotCalcData,t=Op(),e=un(),r=js(),a=tc(),n=aW(),o="mapbox",i=Q.constants=Ev();Q.name=o,Q.attr="subplot",Q.idRoot=o,Q.idRegex=Q.attrRegex=c.counterRegex(o);var s=["mapbox subplots and traces are deprecated!","Please consider switching to `map` subplots and traces.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");Q.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},Q.layoutAttributes=M3(),Q.supplyLayoutDefaults=oW();var f=!0;Q.plot=function(v){f&&(f=!1,c.warn(s));var T=v._fullLayout,u=v.calcdata,b=T._subplots[o];if($.version!==i.requiredVersion)throw new Error(i.wrongVersionErrorMsg);var _=x(v,b);$.accessToken=_;for(var C=0;CH/2){var F=R.split("|").join("
");N.text(F).attr("data-unformatted",F).call(a.convertToTspans,v),V=r.bBox(N.node())}N.attr("transform",g(-3,-V.height+8)),O.insert("rect",".static-attribution").attr({x:-V.width-6,y:-V.height-3,width:V.width+6,height:V.height+3,fill:"rgba(255, 255, 255, 0.75)"});var U=1;V.width+6>H&&(U=H/(V.width+6));var W=[b.l+b.w*M.x[1],b.t+b.h*(1-M.y[0])];O.attr("transform",g(W[0],W[1])+P(U))}};function x(v,T){var u=v._fullLayout,b=v._context;if(b.mapboxAccessToken==="")return"";for(var _=[],C=[],M=!1,E=!1,A=0;A1&&c.warn(i.multipleTokensErrorMsg),_[0]):(C.length&&c.log(["Listed mapbox access token(s)",C.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function y(v){return typeof v=="string"&&(i.styleValuesMapbox.indexOf(v)!==-1||v.indexOf("mapbox://")===0||v.indexOf("stamen")===0)}Q.updateFx=function(v){for(var T=v._fullLayout,u=T._subplots[o],b=0;b{$.exports={attributes:dT(),supplyDefaults:QH(),colorbar:xo(),formatLabels:uE(),calc:$k(),plot:eW(),hoverPoints:pT().hoverPoints,eventData:rW(),selectPoints:nW(),styleOnSelect:function(c,g){if(g){var P=g[0].trace;P._glTrace.update(g)}},moduleType:"trace",name:"scattermapbox",basePlotModule:mT(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}}),lW=Ft((Q,$)=>{$.exports=sW()}),fE=Ft((Q,$)=>{var c=fb(),g=Tc(),{hovertemplateAttrs:P,templatefallbackAttrs:S}=$u(),t=$o(),e=Ta().extendFlat;$.exports=e({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:e({},c.featureidkey,{}),below:{valType:"string",editType:"plot"},text:c.text,hovertext:c.hovertext,marker:{line:{color:e({},c.marker.line.color,{editType:"plot"}),width:e({},c.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:e({},c.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:e({},c.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:e({},c.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:c.hoverinfo,hovertemplate:P({},{keys:["properties"]}),hovertemplatefallback:S(),showlegend:e({},t.showlegend,{dflt:!1})},g("",{cLetter:"z",editTypeOverride:"calc"}))}),uW=Ft((Q,$)=>{var c=bn(),g=mc(),P=fE();$.exports=function(S,t,e,r){function a(f,x){return c.coerce(S,t,P,f,x)}var n=a("locations"),o=a("z"),i=a("geojson");if(!c.isArrayOrTypedArray(n)||!n.length||!c.isArrayOrTypedArray(o)||!o.length||!(typeof i=="string"&&i!==""||c.isPlainObject(i))){t.visible=!1;return}a("featureidkey"),t._length=Math.min(n.length,o.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var s=a("marker.line.width");s&&a("marker.line.color"),a("marker.opacity"),g(S,t,r,a,{prefix:"",cLetter:"z"}),c.coerceSelectionMarkerOpacity(t,a)}}),dE=Ft((Q,$)=>{var c=ra(),g=bn(),P=Xc(),S=js(),t=U1().makeBlank,e=V1();function r(n){var o=n[0].trace,i=o.visible===!0&&o._length!==0,s={layout:{visibility:"none"},paint:{}},f={layout:{visibility:"none"},paint:{}},x=o._opts={fill:s,line:f,geojson:t()};if(!i)return x;var y=e.extractTraceFeature(n);if(!y)return x;var v=P.makeColorScaleFuncFromTrace(o),T=o.marker,u=T.line||{},b;g.isArrayOrTypedArray(T.opacity)&&(b=function(k){var w=k.mo;return c(w)?+g.constrain(w,0,1):0});var _;g.isArrayOrTypedArray(u.color)&&(_=function(k){return k.mlc});var C;g.isArrayOrTypedArray(u.width)&&(C=function(k){return k.mlw});for(var M=0;M{var c=dE().convert,g=dE().convertOnSelect,P=Ev().traceLayerPrefix;function S(e,r){this.type="choroplethmapbox",this.subplot=e,this.uid=r,this.sourceId="source-"+r,this.layerList=[["fill",P+r+"-fill"],["line",P+r+"-line"]],this.below=null}var t=S.prototype;t.update=function(e){this._update(c(e)),e[0].trace._glTrace=this},t.updateOnSelect=function(e){this._update(g(e))},t._update=function(e){var r=this.subplot,a=this.layerList,n=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var o=0;o=0;a--)e.removeLayer(r[a][1])},t.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},$.exports=function(e,r){var a=r[0].trace,n=new S(e,a.uid),o=n.sourceId,i=c(r),s=n.below=e.belowLookup["trace-"+a.uid];return e.map.addSource(o,{type:"geojson",data:i.geojson}),n._addLayers(i,s),r[0].trace._glTrace=n,n}}),hW=Ft((Q,$)=>{$.exports={attributes:fE(),supplyDefaults:uW(),colorbar:L1(),calc:Xk(),plot:cW(),hoverPoints:Qk(),eventData:tT(),selectPoints:eT(),styleOnSelect:function(c,g){if(g){var P=g[0].trace;P._glTrace.updateOnSelect(g)}},getBelow:function(c,g){for(var P=g.getMapLayers(),S=P.length-2;S>=0;S--){var t=P[S].id;if(typeof t=="string"&&t.indexOf("water")===0){for(var e=S+1;e{$.exports=hW()}),pE=Ft((Q,$)=>{var c=Tc(),{hovertemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=$o(),t=dT(),e=Ta().extendFlat;$.exports=e({lon:t.lon,lat:t.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:t.text,hovertext:t.hovertext,hoverinfo:e({},S.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:g(),hovertemplatefallback:P(),showlegend:e({},S.showlegend,{dflt:!1})},c("",{cLetter:"z",editTypeOverride:"calc"}))}),dW=Ft((Q,$)=>{var c=bn(),g=mc(),P=pE();$.exports=function(S,t,e,r){function a(s,f){return c.coerce(S,t,P,s,f)}var n=a("lon")||[],o=a("lat")||[],i=Math.min(n.length,o.length);if(!i){t.visible=!1;return}t._length=i,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),g(S,t,r,a,{prefix:"",cLetter:"z"})}}),pW=Ft((Q,$)=>{var c=ra(),g=bn().isArrayOrTypedArray,P=Da().BADNUM,S=Jd(),t=bn()._;$.exports=function(e,r){for(var a=r._length,n=new Array(a),o=r.z,i=g(o)&&o.length,s=0;s{var c=ra(),g=bn(),P=li(),S=Xc(),t=Da().BADNUM,e=U1().makeBlank;$.exports=function(r){var a=r[0].trace,n=a.visible===!0&&a._length!==0,o={layout:{visibility:"none"},paint:{}},i=a._opts={heatmap:o,geojson:e()};if(!n)return i;var s=[],f,x=a.z,y=a.radius,v=g.isArrayOrTypedArray(x)&&x.length,T=g.isArrayOrTypedArray(y);for(f=0;f0?+y[f]:0),s.push({type:"Feature",geometry:{type:"Point",coordinates:b},properties:_})}}var M=S.extractOpts(a),E=M.reversescale?S.flipScale(M.colorscale):M.colorscale,A=E[0][1],h=P.opacity(A)<1?A:P.addOpacity(A,0),p=["interpolate",["linear"],["heatmap-density"],0,h];for(f=1;f{var c=mW(),g=Ev().traceLayerPrefix;function P(t,e){this.type="densitymapbox",this.subplot=t,this.uid=e,this.sourceId="source-"+e,this.layerList=[["heatmap",g+e+"-heatmap"]],this.below=null}var S=P.prototype;S.update=function(t){var e=this.subplot,r=this.layerList,a=c(t),n=e.belowLookup["trace-"+this.uid];e.map.getSource(this.sourceId).setData(a.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(a,n),this.below=n);for(var o=0;o=0;r--)t.removeLayer(e[r][1])},S.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},$.exports=function(t,e){var r=e[0].trace,a=new P(t,r.uid),n=a.sourceId,o=c(e),i=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(n,{type:"geojson",data:o.geojson}),a._addLayers(o,i),a}}),vW=Ft((Q,$)=>{var c=Es(),g=pT().hoverPoints,P=pT().getExtraText;$.exports=function(S,t,e){var r=g(S,t,e);if(r){var a=r[0],n=a.cd,o=n[0].trace,i=n[a.index];if(delete a.color,"z"in i){var s=a.subplot.mockAxis;a.z=i.z,a.zLabel=c.tickText(s,s.c2l(i.z),"hover").text}return a.extraText=P(o,i,n[0].t.labels),[a]}}}),yW=Ft((Q,$)=>{$.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c.z=g.z,c}}),xW=Ft((Q,$)=>{$.exports={attributes:pE(),supplyDefaults:dW(),colorbar:L1(),formatLabels:uE(),calc:pW(),plot:gW(),hoverPoints:vW(),eventData:yW(),getBelow:function(c,g){for(var P=g.getMapLayers(),S=0;S{$.exports=xW()}),bW=Ft((Q,$)=>{$.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} +{name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":`{name:latin} +{name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} +{name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} +{name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-1",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:14,filter:["all",["==","$type","Point"],["<=","rank",14],["has","name"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} +{name:nonlatin}`,"text-offset":[0,.6],"text-size":11,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{id:"poi-railway",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:13,filter:["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} +{name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9,"icon-optional":!1,"icon-ignore-placement":!1,"icon-allow-overlap":!1,"text-ignore-placement":!1,"text-allow-overlap":!1,"text-optional":!0},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"road_oneway",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"road_oneway_opposite",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==","class","path"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==","$type","LineString"],["in","class","minor","service","track"]],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["in","class","primary","secondary","tertiary","trunk"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-shield",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:8,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:7,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-other",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:9,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"place-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:12,filter:["!in","class","city","town","village","country","continent"],layout:{"text-letter-spacing":.1,"text-size":{base:1.2,stops:[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":`{name:latin} +{name:nonlatin}`,"text-transform":"uppercase","text-max-width":9,visibility:"visible"},paint:{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{id:"place-village",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:10,filter:["==","class","village"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,12],[15,16]]},"text-field":`{name:latin} +{name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":`{name:latin} +{name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} +{name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} +{name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}}),wW=Ft((Q,$)=>{$.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}),Z1=Ft((Q,$)=>{var c=G0(),g=bW(),P=wW(),S='© OpenStreetMap contributors',t="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",e="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",o="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",i={basic:r,streets:r,outdoors:r,light:t,dark:e,satellite:P,"satellite-streets":g,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:S,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":t,"carto-darkmatter":e,"carto-voyager":r,"carto-positron-nolabels":a,"carto-darkmatter-nolabels":n,"carto-voyager-nolabels":o},s=c(i);$.exports={styleValueDflt:"basic",stylesMap:i,styleValuesMap:s,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",s.join(", "),"or use a tile service."].join(` +`),mapOnErrorMsg:"Map error."}}),S3=Ft((Q,$)=>{var c=bn(),g=li().defaultLine,P=Nh().attributes,S=Ea(),t=tf().textposition,e=Yc().overrideAll,r=pu().templatedArray,a=Z1(),n=S({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});n.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var o=$.exports=e({_arrayAttrRegexps:[c.counterRegex("map",".layers",!0)],domain:P({name:"map"}),style:{valType:"any",values:a.styleValuesMap,dflt:a.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:r("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:g},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:g}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:n,textposition:c.extendFlat({},t,{arrayOk:!1})}})},"plot","from-root");o.uirevision={valType:"any",editType:"none"}}),gT=Ft((Q,$)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=z0(),t=dx(),e=tf(),r=S3(),a=$o(),n=Tc(),o=Ta().extendFlat,i=Yc().overrideAll,s=S3(),f=t.line,x=t.marker;$.exports=i({lon:t.lon,lat:t.lat,cluster:{enabled:{valType:"boolean"},maxzoom:o({},s.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:o({},x.opacity,{dflt:1})},mode:o({},e.mode,{dflt:"markers"}),text:o({},e.text,{}),texttemplate:g({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:P({editType:"plot"}),hovertext:o({},e.hovertext,{}),line:{color:f.color,width:f.width},connectgaps:e.connectgaps,marker:o({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:x.opacity,size:x.size,sizeref:x.sizeref,sizemin:x.sizemin,sizemode:x.sizemode},n("marker")),fill:t.fill,fillcolor:S(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:o({},a.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:c(),hovertemplatefallback:P()},"calc","nested")}),mE=Ft((Q,$)=>{var c=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];$.exports={isSupportedFont:function(g){return c.indexOf(g)!==-1}}}),kW=Ft((Q,$)=>{var c=bn(),g=Ac(),P=s0(),S=I0(),t=x0(),e=O0(),r=gT(),a=mE().isSupportedFont;$.exports=function(o,i,s,f){function x(p,k){return c.coerce(o,i,r,p,k)}function y(p,k){return c.coerce2(o,i,r,p,k)}var v=n(o,i,x);if(!v){i.visible=!1;return}if(x("text"),x("texttemplate"),x("texttemplatefallback"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),x("mode"),x("below"),g.hasMarkers(i)){P(o,i,s,f,x,{noLine:!0,noAngle:!0}),x("marker.allowoverlap"),x("marker.angle");var T=i.marker;T.symbol!=="circle"&&(c.isArrayOrTypedArray(T.size)&&(T.size=T.size[0]),c.isArrayOrTypedArray(T.color)&&(T.color=T.color[0]))}g.hasLines(i)&&(S(o,i,s,f,x,{noDash:!0}),x("connectgaps"));var u=y("cluster.maxzoom"),b=y("cluster.step"),_=y("cluster.color",i.marker&&i.marker.color||s),C=y("cluster.size"),M=y("cluster.opacity"),E=u!==!1||b!==!1||_!==!1||C!==!1||M!==!1,A=x("cluster.enabled",E);if(A||g.hasText(i)){var h=f.font.family;t(o,i,f,x,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:a(h)?h:"Open Sans Regular",weight:f.font.weight,style:f.font.style,size:f.font.size,color:f.font.color}})}x("fill"),i.fill!=="none"&&e(o,i,s,x),c.coerceSelectionMarkerOpacity(i,x)};function n(o,i,s){var f=s("lon")||[],x=s("lat")||[],y=Math.min(f.length,x.length);return i._length=y,y}}),gE=Ft((Q,$)=>{var c=Es();$.exports=function(g,P,S){var t={},e=S[P.subplot]._subplot,r=e.mockAxis,a=g.lonlat;return t.lonLabel=c.tickText(r,r.c2l(a[0]),!0).text,t.latLabel=c.tickText(r,r.c2l(a[1]),!0).text,t}}),vE=Ft((Q,$)=>{var c=bn();$.exports=function(g,P){var S=g.split(" "),t=S[0],e=S[1],r=c.isArrayOrTypedArray(P)?c.mean(P):P,a=.5+r/100,n=1.5+r/100,o=["",""],i=[0,0];switch(t){case"top":o[0]="top",i[1]=-n;break;case"bottom":o[0]="bottom",i[1]=n;break}switch(e){case"left":o[1]="right",i[0]=-a;break;case"right":o[1]="left",i[0]=a;break}var s;return o[0]&&o[1]?s=o.join("-"):o[0]?s=o[0]:o[1]?s=o[1]:s="center",{anchor:s,offset:i}}}),TW=Ft((Q,$)=>{var c=ra(),g=bn(),P=Da().BADNUM,S=U1(),t=Xc(),e=js(),r=yg(),a=Ac(),n=mE().isSupportedFont,o=vE(),i=Dp().appendArrayPointValue,s=tc().NEWLINES,f=tc().BR_TAG_ALL;$.exports=function(M,E){var A=E[0].trace,h=A.visible===!0&&A._length!==0,p=A.fill!=="none",k=a.hasLines(A),w=a.hasMarkers(A),R=a.hasText(A),O=w&&A.marker.symbol==="circle",N=w&&A.marker.symbol!=="circle",V=A.cluster&&A.cluster.enabled,H=x("fill"),F=x("line"),U=x("circle"),W=x("symbol"),q={fill:H,line:F,circle:U,symbol:W};if(!h)return q;var X;if((p||k)&&(X=S.calcTraceToLineCoords(E)),p&&(H.geojson=S.makePolygon(X),H.layout.visibility="visible",g.extendFlat(H.paint,{"fill-color":A.fillcolor})),k&&(F.geojson=S.makeLine(X),F.layout.visibility="visible",g.extendFlat(F.paint,{"line-width":A.line.width,"line-color":A.line.color,"line-opacity":A.opacity})),O){var lt=y(E);U.geojson=lt.geojson,U.layout.visibility="visible",V&&(U.filter=["!",["has","point_count"]],q.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":_(A.cluster.color,A.cluster.step),"circle-radius":_(A.cluster.size,A.cluster.step),"circle-opacity":_(A.cluster.opacity,A.cluster.step)}},q.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":C(A),"text-size":12}}),g.extendFlat(U.paint,{"circle-color":lt.mcc,"circle-radius":lt.mrc,"circle-opacity":lt.mo})}if(O&&V&&(U.filter=["!",["has","point_count"]]),(N||R)&&(W.geojson=v(E,M),g.extendFlat(W.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),N&&(g.extendFlat(W.layout,{"icon-size":A.marker.size/10}),"angle"in A.marker&&A.marker.angle!=="auto"&&g.extendFlat(W.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),W.layout["icon-allow-overlap"]=A.marker.allowoverlap,g.extendFlat(W.paint,{"icon-opacity":A.opacity*A.marker.opacity,"icon-color":A.marker.color})),R)){var yt=(A.marker||{}).size,pt=o(A.textposition,yt);g.extendFlat(W.layout,{"text-size":A.textfont.size,"text-anchor":pt.anchor,"text-offset":pt.offset,"text-font":C(A)}),g.extendFlat(W.paint,{"text-color":A.textfont.color,"text-opacity":A.opacity})}return q};function x(M){return{type:M,geojson:S.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function y(M){var E=M[0].trace,A=E.marker,h=E.selectedpoints,p=g.isArrayOrTypedArray(A.color),k=g.isArrayOrTypedArray(A.size),w=g.isArrayOrTypedArray(A.opacity),R;function O(pt){return E.opacity*pt}function N(pt){return pt/2}var V;p&&(t.hasColorscale(E,"marker")?V=t.makeColorScaleFuncFromTrace(A):V=g.identity);var H;k&&(H=r(E));var F;w&&(F=function(pt){var st=c(pt)?+g.constrain(pt,0,1):0;return O(st)});var U=[];for(R=0;R850?R+=" Black":p>750?R+=" Extra Bold":p>650?R+=" Bold":p>550?R+=" Semi Bold":p>450?R+=" Medium":p>350?R+=" Regular":p>250?R+=" Light":p>150?R+=" Extra Light":R+=" Thin"):k.slice(0,2).join(" ")==="Open Sans"?(R="Open Sans",p>750?R+=" Extrabold":p>650?R+=" Bold":p>550?R+=" Semibold":p>350?R+=" Regular":R+=" Light"):k.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(R="Klokantech Noto Sans",k[3]==="CJK"&&(R+=" CJK"),R+=p>500?" Bold":" Regular")),w&&(R+=" Italic"),R==="Open Sans Regular Italic"?R="Open Sans Italic":R==="Open Sans Regular Bold"?R="Open Sans Bold":R==="Open Sans Regular Bold Italic"?R="Open Sans Bold Italic":R==="Klokantech Noto Sans Regular Italic"&&(R="Klokantech Noto Sans Italic"),n(R)||(R=A);var O=R.split(", ");return O}}),AW=Ft((Q,$)=>{var c=bn(),g=TW(),P=Z1().traceLayerPrefix,S={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function t(r,a,n,o){this.type="scattermap",this.subplot=r,this.uid=a,this.clusterEnabled=n,this.isHidden=o,this.sourceIds={fill:"source-"+a+"-fill",line:"source-"+a+"-line",circle:"source-"+a+"-circle",symbol:"source-"+a+"-symbol",cluster:"source-"+a+"-circle",clusterCount:"source-"+a+"-circle"},this.layerIds={fill:P+a+"-fill",line:P+a+"-line",circle:P+a+"-circle",symbol:P+a+"-symbol",cluster:P+a+"-cluster",clusterCount:P+a+"-cluster-count"},this.below=null}var e=t.prototype;e.addSource=function(r,a,n){var o={type:"geojson",data:a.geojson};n&&n.enabled&&c.extendFlat(o,{cluster:!0,clusterMaxZoom:n.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[r]);i?i.setData(a.geojson):this.subplot.map.addSource(this.sourceIds[r],o)},e.setSourceData=function(r,a){this.subplot.map.getSource(this.sourceIds[r]).setData(a.geojson)},e.addLayer=function(r,a,n){var o={type:a.type,id:this.layerIds[r],source:this.sourceIds[r],layout:a.layout,paint:a.paint};a.filter&&(o.filter=a.filter);for(var i=this.layerIds[r],s,f=this.subplot.getMapLayers(),x=0;x=0;k--){var w=p[k];o.removeLayer(y.layerIds[w])}h||o.removeSource(y.sourceIds.circle)}function u(h){for(var p=S.nonCluster,k=0;k=0;k--){var w=p[k];o.removeLayer(y.layerIds[w]),h||o.removeSource(y.sourceIds[w])}}function _(h){x?T(h):b(h)}function C(h){f?v(h):u(h)}function M(){for(var h=f?S.cluster:S.nonCluster,p=0;p=0;n--){var o=a[n];r.removeLayer(this.layerIds[o]),r.removeSource(this.sourceIds[o])}},$.exports=function(r,a){var n=a[0].trace,o=n.cluster&&n.cluster.enabled,i=n.visible!==!0,s=new t(r,n.uid,o,i),f=g(r.gd,a),x=s.below=r.belowLookup["trace-"+n.uid],y,v,T;if(o)for(s.addSource("circle",f.circle,n.cluster),y=0;y{var c=Qh(),g=bn(),P=Du(),S=g.fillText,t=Da().BADNUM,e=Z1().traceLayerPrefix;function r(n,o,i){var s=n.cd,f=s[0].trace,x=n.xa,y=n.ya,v=n.subplot,T=[],u=e+f.uid+"-circle",b=f.cluster&&f.cluster.enabled;if(b){var _=v.map.queryRenderedFeatures(null,{layers:[u]});T=_.map(function(H){return H.id})}var C=o>=0?Math.floor((o+180)/360):Math.ceil((o-180)/360),M=C*360,E=o-M;function A(H){var F=H.lonlat;if(F[0]===t||b&&T.indexOf(H.i+1)===-1)return 1/0;var U=g.modHalf(F[0],360),W=F[1],q=v.project([U,W]),X=q.x-x.c2p([E,W]),lt=q.y-y.c2p([U,i]),yt=Math.max(3,H.mrc||0);return Math.max(Math.sqrt(X*X+lt*lt)-yt,1-3/yt)}if(c.getClosest(s,A,n),n.index!==!1){var h=s[n.index],p=h.lonlat,k=[g.modHalf(p[0],360)+M,p[1]],w=x.c2p(k),R=y.c2p(k),O=h.mrc||1;n.x0=w-O,n.x1=w+O,n.y0=R-O,n.y1=R+O;var N={};N[f.subplot]={_subplot:v};var V=f._module.formatLabels(h,f,N);return n.lonLabel=V.lonLabel,n.latLabel=V.latLabel,n.color=P(f,h),n.extraText=a(f,h,s[0].t.labels),n.hovertemplate=f.hovertemplate,[n]}}function a(n,o,i){if(n.hovertemplate)return;var s=o.hi||n.hoverinfo,f=s.split("+"),x=f.indexOf("all")!==-1,y=f.indexOf("lon")!==-1,v=f.indexOf("lat")!==-1,T=o.lonlat,u=[];function b(_){return _+"°"}return x||y&&v?u.push("("+b(T[1])+", "+b(T[0])+")"):y?u.push(i.lon+b(T[0])):v&&u.push(i.lat+b(T[1])),(x||f.indexOf("text")!==-1)&&S(o,n,u),u.join("
")}$.exports={hoverPoints:r,getExtraText:a}}),MW=Ft((Q,$)=>{$.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c}}),SW=Ft((Q,$)=>{var c=bn(),g=Ac(),P=Da().BADNUM;$.exports=function(S,t){var e=S.cd,r=S.xaxis,a=S.yaxis,n=[],o=e[0].trace,i;if(!g.hasMarkers(o))return[];if(t===!1)for(i=0;i{(function(c,g){typeof Q=="object"&&typeof $<"u"?$.exports=g():(c=typeof globalThis<"u"?globalThis:c||self,c.maplibregl=g())})(Q,function(){var c={},g={};function P(t,e,r){if(g[t]=r,t==="index"){var a="var sharedModule = {}; ("+g.shared+")(sharedModule); ("+g.worker+")(sharedModule);",n={};return g.shared(n),g.index(c,n),typeof window<"u"&&c.setWorkerUrl(window.URL.createObjectURL(new Blob([a],{type:"text/javascript"}))),c}}P("shared",["exports"],function(t){function e(G,D,nt,_t){return new(nt||(nt=Promise))(function(Rt,Kt){function Qt(er){try{Fe(_t.next(er))}catch(yr){Kt(yr)}}function be(er){try{Fe(_t.throw(er))}catch(yr){Kt(yr)}}function Fe(er){var yr;er.done?Rt(er.value):(yr=er.value,yr instanceof nt?yr:new nt(function(Er){Er(yr)})).then(Qt,be)}Fe((_t=_t.apply(G,D||[])).next())})}function r(G){return G&&G.__esModule&&Object.prototype.hasOwnProperty.call(G,"default")?G.default:G}typeof SuppressedError=="function"&&SuppressedError;var a=n;function n(G,D){this.x=G,this.y=D}n.prototype={clone:function(){return new n(this.x,this.y)},add:function(G){return this.clone()._add(G)},sub:function(G){return this.clone()._sub(G)},multByPoint:function(G){return this.clone()._multByPoint(G)},divByPoint:function(G){return this.clone()._divByPoint(G)},mult:function(G){return this.clone()._mult(G)},div:function(G){return this.clone()._div(G)},rotate:function(G){return this.clone()._rotate(G)},rotateAround:function(G,D){return this.clone()._rotateAround(G,D)},matMult:function(G){return this.clone()._matMult(G)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(G){return this.x===G.x&&this.y===G.y},dist:function(G){return Math.sqrt(this.distSqr(G))},distSqr:function(G){var D=G.x-this.x,nt=G.y-this.y;return D*D+nt*nt},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(G){return Math.atan2(this.y-G.y,this.x-G.x)},angleWith:function(G){return this.angleWithSep(G.x,G.y)},angleWithSep:function(G,D){return Math.atan2(this.x*D-this.y*G,this.x*G+this.y*D)},_matMult:function(G){var D=G[2]*this.x+G[3]*this.y;return this.x=G[0]*this.x+G[1]*this.y,this.y=D,this},_add:function(G){return this.x+=G.x,this.y+=G.y,this},_sub:function(G){return this.x-=G.x,this.y-=G.y,this},_mult:function(G){return this.x*=G,this.y*=G,this},_div:function(G){return this.x/=G,this.y/=G,this},_multByPoint:function(G){return this.x*=G.x,this.y*=G.y,this},_divByPoint:function(G){return this.x/=G.x,this.y/=G.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var G=this.y;return this.y=this.x,this.x=-G,this},_rotate:function(G){var D=Math.cos(G),nt=Math.sin(G),_t=nt*this.x+D*this.y;return this.x=D*this.x-nt*this.y,this.y=_t,this},_rotateAround:function(G,D){var nt=Math.cos(G),_t=Math.sin(G),Rt=D.y+_t*(this.x-D.x)+nt*(this.y-D.y);return this.x=D.x+nt*(this.x-D.x)-_t*(this.y-D.y),this.y=Rt,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(G){return G instanceof n?G:Array.isArray(G)?new n(G[0],G[1]):G};var o=r(a),i=s;function s(G,D,nt,_t){this.cx=3*G,this.bx=3*(nt-G)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*D,this.by=3*(_t-D)-this.cy,this.ay=1-this.cy-this.by,this.p1x=G,this.p1y=D,this.p2x=nt,this.p2y=_t}s.prototype={sampleCurveX:function(G){return((this.ax*G+this.bx)*G+this.cx)*G},sampleCurveY:function(G){return((this.ay*G+this.by)*G+this.cy)*G},sampleCurveDerivativeX:function(G){return(3*this.ax*G+2*this.bx)*G+this.cx},solveCurveX:function(G,D){if(D===void 0&&(D=1e-6),G<0)return 0;if(G>1)return 1;for(var nt=G,_t=0;_t<8;_t++){var Rt=this.sampleCurveX(nt)-G;if(Math.abs(Rt)Rt?Qt=nt:be=nt,nt=.5*(be-Qt)+Qt;return nt},solve:function(G,D){return this.sampleCurveY(this.solveCurveX(G,D))}};var f=r(i);let x,y;function v(){return x==null&&(x=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),x}function T(){if(y==null&&(y=!1,v())){let G=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(G){for(let nt=0;nt<25;nt++){let _t=4*nt;G.fillStyle=`rgb(${_t},${_t+1},${_t+2})`,G.fillRect(nt%5,Math.floor(nt/5),1,1)}let D=G.getImageData(0,0,5,5).data;for(let nt=0;nt<100;nt++)if(nt%4!=3&&D[nt]!==nt){y=!0;break}}}return y||!1}function u(G,D,nt,_t){let Rt=new f(G,D,nt,_t);return Kt=>Rt.solve(Kt)}let b=u(.25,.1,.25,1);function _(G,D,nt){return Math.min(nt,Math.max(D,G))}function C(G,D,nt){let _t=nt-D,Rt=((G-D)%_t+_t)%_t+D;return Rt===D?nt:Rt}function M(G,...D){for(let nt of D)for(let _t in nt)G[_t]=nt[_t];return G}let E=1;function A(G,D,nt){let _t={};for(let Rt in G)_t[Rt]=D.call(this,G[Rt],Rt,G);return _t}function h(G,D,nt){let _t={};for(let Rt in G)D.call(this,G[Rt],Rt,G)&&(_t[Rt]=G[Rt]);return _t}function p(G){return Array.isArray(G)?G.map(p):typeof G=="object"&&G?A(G,p):G}let k={};function w(G){k[G]||(typeof console<"u"&&console.warn(G),k[G]=!0)}function R(G,D,nt){return(nt.y-G.y)*(D.x-G.x)>(D.y-G.y)*(nt.x-G.x)}function O(G){return typeof WorkerGlobalScope<"u"&&G!==void 0&&G instanceof WorkerGlobalScope}let N=null;function V(G){return typeof ImageBitmap<"u"&&G instanceof ImageBitmap}let H="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function F(G,D,nt,_t,Rt){return e(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let Kt=new VideoFrame(G,{timestamp:0});try{let Qt=Kt?.format;if(!Qt||!Qt.startsWith("BGR")&&!Qt.startsWith("RGB"))throw new Error(`Unrecognized format ${Qt}`);let be=Qt.startsWith("BGR"),Fe=new Uint8ClampedArray(_t*Rt*4);if(yield Kt.copyTo(Fe,function(er,yr,Er,Zr,sn){let xn=4*Math.max(-yr,0),Ln=(Math.max(0,Er)-Er)*Zr*4+xn,$n=4*Zr,ki=Math.max(0,yr),Aa=Math.max(0,Er);return{rect:{x:ki,y:Aa,width:Math.min(er.width,yr+Zr)-ki,height:Math.min(er.height,Er+sn)-Aa},layout:[{offset:Ln,stride:$n}]}}(G,D,nt,_t,Rt)),be)for(let er=0;erO(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,dt=function(G,D){if(/:\/\//.test(G.url)&&!/^https?:|^file:/.test(G.url)){let _t=yt(G.url);if(_t)return _t(G,D);if(O(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:G,targetMapId:pt},D)}if(!(/^file:/.test(nt=G.url)||/^file:/.test(tt())&&!/^\w+:/.test(nt))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(_t,Rt){return e(this,void 0,void 0,function*(){let Kt=new Request(_t.url,{method:_t.method||"GET",body:_t.body,credentials:_t.credentials,headers:_t.headers,cache:_t.cache,referrer:tt(),signal:Rt.signal});_t.type!=="json"||Kt.headers.has("Accept")||Kt.headers.set("Accept","application/json");let Qt=yield fetch(Kt);if(!Qt.ok){let er=yield Qt.blob();throw new st(Qt.status,Qt.statusText,_t.url,er)}let be;be=_t.type==="arrayBuffer"||_t.type==="image"?Qt.arrayBuffer():_t.type==="json"?Qt.json():Qt.text();let Fe=yield be;if(Rt.signal.aborted)throw X();return{data:Fe,cacheControl:Qt.headers.get("Cache-Control"),expires:Qt.headers.get("Expires")}})}(G,D);if(O(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:G,mustQueue:!0,targetMapId:pt},D)}var nt;return function(_t,Rt){return new Promise((Kt,Qt)=>{var be;let Fe=new XMLHttpRequest;Fe.open(_t.method||"GET",_t.url,!0),_t.type!=="arrayBuffer"&&_t.type!=="image"||(Fe.responseType="arraybuffer");for(let er in _t.headers)Fe.setRequestHeader(er,_t.headers[er]);_t.type==="json"&&(Fe.responseType="text",!((be=_t.headers)===null||be===void 0)&&be.Accept||Fe.setRequestHeader("Accept","application/json")),Fe.withCredentials=_t.credentials==="include",Fe.onerror=()=>{Qt(new Error(Fe.statusText))},Fe.onload=()=>{if(!Rt.signal.aborted)if((Fe.status>=200&&Fe.status<300||Fe.status===0)&&Fe.response!==null){let er=Fe.response;if(_t.type==="json")try{er=JSON.parse(Fe.response)}catch(yr){return void Qt(yr)}Kt({data:er,cacheControl:Fe.getResponseHeader("Cache-Control"),expires:Fe.getResponseHeader("Expires")})}else{let er=new Blob([Fe.response],{type:Fe.getResponseHeader("Content-Type")});Qt(new st(Fe.status,Fe.statusText,_t.url,er))}},Rt.signal.addEventListener("abort",()=>{Fe.abort(),Qt(X())}),Fe.send(_t.body)})}(G,D)};function rt(G){if(!G||G.indexOf("://")<=0||G.indexOf("data:image/")===0||G.indexOf("blob:")===0)return!0;let D=new URL(G),nt=window.location;return D.protocol===nt.protocol&&D.host===nt.host}function at(G,D,nt){nt[G]&&nt[G].indexOf(D)!==-1||(nt[G]=nt[G]||[],nt[G].push(D))}function vt(G,D,nt){if(nt&&nt[G]){let _t=nt[G].indexOf(D);_t!==-1&&nt[G].splice(_t,1)}}class it{constructor(D,nt={}){M(this,nt),this.type=D}}class Y extends it{constructor(D,nt={}){super("error",M({error:D},nt))}}class ft{on(D,nt){return this._listeners=this._listeners||{},at(D,nt,this._listeners),this}off(D,nt){return vt(D,nt,this._listeners),vt(D,nt,this._oneTimeListeners),this}once(D,nt){return nt?(this._oneTimeListeners=this._oneTimeListeners||{},at(D,nt,this._oneTimeListeners),this):new Promise(_t=>this.once(D,_t))}fire(D,nt){typeof D=="string"&&(D=new it(D,nt||{}));let _t=D.type;if(this.listens(_t)){D.target=this;let Rt=this._listeners&&this._listeners[_t]?this._listeners[_t].slice():[];for(let be of Rt)be.call(this,D);let Kt=this._oneTimeListeners&&this._oneTimeListeners[_t]?this._oneTimeListeners[_t].slice():[];for(let be of Kt)vt(_t,be,this._oneTimeListeners),be.call(this,D);let Qt=this._eventedParent;Qt&&(M(D,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Qt.fire(D))}else D instanceof Y&&console.error(D.error);return this}listens(D){return this._listeners&&this._listeners[D]&&this._listeners[D].length>0||this._oneTimeListeners&&this._oneTimeListeners[D]&&this._oneTimeListeners[D].length>0||this._eventedParent&&this._eventedParent.listens(D)}setEventedParent(D,nt){return this._eventedParent=D,this._eventedParentData=nt,this}}var ut={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};let wt=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function zt(G,D){let nt={};for(let _t in G)_t!=="ref"&&(nt[_t]=G[_t]);return wt.forEach(_t=>{_t in D&&(nt[_t]=D[_t])}),nt}function Pt(G,D){if(Array.isArray(G)){if(!Array.isArray(D)||G.length!==D.length)return!1;for(let nt=0;nt`:G.itemType.kind==="value"?"array":`array<${D}>`}return G.kind}let Ct=[oe,Te,He,Ge,cr,br,ur,$t(jr),Kr,rn,Ce];function gt(G,D){if(D.kind==="error")return null;if(G.kind==="array"){if(D.kind==="array"&&(D.N===0&&D.itemType.kind==="value"||!gt(G.itemType,D.itemType))&&(typeof G.N!="number"||G.N===D.N))return null}else{if(G.kind===D.kind)return null;if(G.kind==="value"){for(let nt of Ct)if(!gt(nt,D))return null}}return`Expected ${ne(G)} but found ${ne(D)} instead.`}function St(G,D){return D.some(nt=>nt.kind===G.kind)}function Nt(G,D){return D.some(nt=>nt==="null"?G===null:nt==="array"?Array.isArray(G):nt==="object"?G&&!Array.isArray(G)&&typeof G=="object":nt===typeof G)}function ee(G,D){return G.kind==="array"&&D.kind==="array"?G.itemType.kind===D.itemType.kind&&typeof G.N=="number":G.kind===D.kind}let le=.96422,we=.82521,Ue=4/29,qe=6/29,ar=3*qe*qe,Ar=qe*qe*qe,Tr=Math.PI/180,pr=180/Math.PI;function Jr(G){return(G%=360)<0&&(G+=360),G}function Vn([G,D,nt,_t]){let Rt,Kt,Qt=Kn((.2225045*(G=Hn(G))+.7168786*(D=Hn(D))+.0606169*(nt=Hn(nt)))/1);G===D&&D===nt?Rt=Kt=Qt:(Rt=Kn((.4360747*G+.3850649*D+.1430804*nt)/le),Kt=Kn((.0139322*G+.0971045*D+.7141733*nt)/we));let be=116*Qt-16;return[be<0?0:be,500*(Rt-Qt),200*(Qt-Kt),_t]}function Hn(G){return G<=.04045?G/12.92:Math.pow((G+.055)/1.055,2.4)}function Kn(G){return G>Ar?Math.pow(G,1/3):G/ar+Ue}function Ci([G,D,nt,_t]){let Rt=(G+16)/116,Kt=isNaN(D)?Rt:Rt+D/500,Qt=isNaN(nt)?Rt:Rt-nt/200;return Rt=1*qn(Rt),Kt=le*qn(Kt),Qt=we*qn(Qt),[ii(3.1338561*Kt-1.6168667*Rt-.4906146*Qt),ii(-.9787684*Kt+1.9161415*Rt+.033454*Qt),ii(.0719453*Kt-.2289914*Rt+1.4052427*Qt),_t]}function ii(G){return(G=G<=.00304?12.92*G:1.055*Math.pow(G,1/2.4)-.055)<0?0:G>1?1:G}function qn(G){return G>qe?G*G*G:ar*(G-Ue)}function oa(G){return parseInt(G.padEnd(2,G),16)/255}function Hi(G,D){return We(D?G/100:G,0,1)}function We(G,D,nt){return Math.min(Math.max(D,G),nt)}function rr(G){return!G.some(Number.isNaN)}let fr={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class xr{constructor(D,nt,_t,Rt=1,Kt=!0){this.r=D,this.g=nt,this.b=_t,this.a=Rt,Kt||(this.r*=Rt,this.g*=Rt,this.b*=Rt,Rt||this.overwriteGetter("rgb",[D,nt,_t,Rt]))}static parse(D){if(D instanceof xr)return D;if(typeof D!="string")return;let nt=function(_t){if((_t=_t.toLowerCase().trim())==="transparent")return[0,0,0,0];let Rt=fr[_t];if(Rt){let[Qt,be,Fe]=Rt;return[Qt/255,be/255,Fe/255,1]}if(_t.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(_t)){let Qt=_t.length<6?1:2,be=1;return[oa(_t.slice(be,be+=Qt)),oa(_t.slice(be,be+=Qt)),oa(_t.slice(be,be+=Qt)),oa(_t.slice(be,be+Qt)||"ff")]}if(_t.startsWith("rgb")){let Qt=_t.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Qt){let[be,Fe,er,yr,Er,Zr,sn,xn,Ln,$n,ki,Aa]=Qt,Xi=[yr||" ",sn||" ",$n].join("");if(Xi===" "||Xi===" /"||Xi===",,"||Xi===",,,"){let ma=[er,Zr,Ln].join(""),Ga=ma==="%%%"?100:ma===""?255:0;if(Ga){let To=[We(+Fe/Ga,0,1),We(+Er/Ga,0,1),We(+xn/Ga,0,1),ki?Hi(+ki,Aa):1];if(rr(To))return To}}return}}let Kt=_t.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Kt){let[Qt,be,Fe,er,yr,Er,Zr,sn,xn]=Kt,Ln=[Fe||" ",yr||" ",Zr].join("");if(Ln===" "||Ln===" /"||Ln===",,"||Ln===",,,"){let $n=[+be,We(+er,0,100),We(+Er,0,100),sn?Hi(+sn,xn):1];if(rr($n))return function([ki,Aa,Xi,ma]){function Ga(To){let As=(To+ki/30)%12,Sl=Aa*Math.min(Xi,1-Xi);return Xi-Sl*Math.max(-1,Math.min(As-3,9-As,1))}return ki=Jr(ki),Aa/=100,Xi/=100,[Ga(0),Ga(8),Ga(4),ma]}($n)}}}(D);return nt?new xr(...nt,!1):void 0}get rgb(){let{r:D,g:nt,b:_t,a:Rt}=this,Kt=Rt||1/0;return this.overwriteGetter("rgb",[D/Kt,nt/Kt,_t/Kt,Rt])}get hcl(){return this.overwriteGetter("hcl",function(D){let[nt,_t,Rt,Kt]=Vn(D),Qt=Math.sqrt(_t*_t+Rt*Rt);return[Math.round(1e4*Qt)?Jr(Math.atan2(Rt,_t)*pr):NaN,Qt,nt,Kt]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Vn(this.rgb))}overwriteGetter(D,nt){return Object.defineProperty(this,D,{value:nt}),nt}toString(){let[D,nt,_t,Rt]=this.rgb;return`rgba(${[D,nt,_t].map(Kt=>Math.round(255*Kt)).join(",")},${Rt})`}}xr.black=new xr(0,0,0,1),xr.white=new xr(1,1,1,1),xr.transparent=new xr(0,0,0,0),xr.red=new xr(1,0,0,1);class Qr{constructor(D,nt,_t){this.sensitivity=D?nt?"variant":"case":nt?"accent":"base",this.locale=_t,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(D,nt){return this.collator.compare(D,nt)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Cn{constructor(D,nt,_t,Rt,Kt){this.text=D,this.image=nt,this.scale=_t,this.fontStack=Rt,this.textColor=Kt}}class wn{constructor(D){this.sections=D}static fromString(D){return new wn([new Cn(D,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(D=>D.text.length!==0||D.image&&D.image.name.length!==0)}static factory(D){return D instanceof wn?D:wn.fromString(D)}toString(){return this.sections.length===0?"":this.sections.map(D=>D.text).join("")}}class Mn{constructor(D){this.values=D.slice()}static parse(D){if(D instanceof Mn)return D;if(typeof D=="number")return new Mn([D,D,D,D]);if(Array.isArray(D)&&!(D.length<1||D.length>4)){for(let nt of D)if(typeof nt!="number")return;switch(D.length){case 1:D=[D[0],D[0],D[0],D[0]];break;case 2:D=[D[0],D[1],D[0],D[1]];break;case 3:D=[D[0],D[1],D[2],D[1]]}return new Mn(D)}}toString(){return JSON.stringify(this.values)}}let ci=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class xi{constructor(D){this.values=D.slice()}static parse(D){if(D instanceof xi)return D;if(Array.isArray(D)&&!(D.length<1)&&D.length%2==0){for(let nt=0;nt=0&&G<=255&&typeof D=="number"&&D>=0&&D<=255&&typeof nt=="number"&&nt>=0&&nt<=255?_t===void 0||typeof _t=="number"&&_t>=0&&_t<=1?null:`Invalid rgba value [${[G,D,nt,_t].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof _t=="number"?[G,D,nt,_t]:[G,D,nt]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Zi(G){if(G===null||typeof G=="string"||typeof G=="boolean"||typeof G=="number"||G instanceof xr||G instanceof Qr||G instanceof wn||G instanceof Mn||G instanceof xi||G instanceof Pi)return!0;if(Array.isArray(G)){for(let D of G)if(!Zi(D))return!1;return!0}if(typeof G=="object"){for(let D in G)if(!Zi(G[D]))return!1;return!0}return!1}function ui(G){if(G===null)return oe;if(typeof G=="string")return He;if(typeof G=="boolean")return Ge;if(typeof G=="number")return Te;if(G instanceof xr)return cr;if(G instanceof Qr)return Hr;if(G instanceof wn)return br;if(G instanceof Mn)return Kr;if(G instanceof xi)return Ce;if(G instanceof Pi)return rn;if(Array.isArray(G)){let D=G.length,nt;for(let _t of G){let Rt=ui(_t);if(nt){if(nt===Rt)continue;nt=jr;break}nt=Rt}return $t(nt||jr,D)}return ur}function Pa(G){let D=typeof G;return G===null?"":D==="string"||D==="number"||D==="boolean"?String(G):G instanceof xr||G instanceof wn||G instanceof Mn||G instanceof xi||G instanceof Pi?G.toString():JSON.stringify(G)}class Wa{constructor(D,nt){this.type=D,this.value=nt}static parse(D,nt){if(D.length!==2)return nt.error(`'literal' expression requires exactly one argument, but found ${D.length-1} instead.`);if(!Zi(D[1]))return nt.error("invalid value");let _t=D[1],Rt=ui(_t),Kt=nt.expectedType;return Rt.kind!=="array"||Rt.N!==0||!Kt||Kt.kind!=="array"||typeof Kt.N=="number"&&Kt.N!==0||(Rt=Kt),new Wa(Rt,_t)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ze{constructor(D){this.name="ExpressionEvaluationError",this.message=D}toJSON(){return this.message}}let Pe={string:He,number:Te,boolean:Ge,object:ur};class Rr{constructor(D,nt){this.type=D,this.args=nt}static parse(D,nt){if(D.length<2)return nt.error("Expected at least one argument.");let _t,Rt=1,Kt=D[0];if(Kt==="array"){let be,Fe;if(D.length>2){let er=D[1];if(typeof er!="string"||!(er in Pe)||er==="object")return nt.error('The item type argument of "array" must be one of string, number, boolean',1);be=Pe[er],Rt++}else be=jr;if(D.length>3){if(D[2]!==null&&(typeof D[2]!="number"||D[2]<0||D[2]!==Math.floor(D[2])))return nt.error('The length argument to "array" must be a positive integer literal',2);Fe=D[2],Rt++}_t=$t(be,Fe)}else{if(!Pe[Kt])throw new Error(`Types doesn't contain name = ${Kt}`);_t=Pe[Kt]}let Qt=[];for(;RtD.outputDefined())}}let qr={"to-boolean":Ge,"to-color":cr,"to-number":Te,"to-string":He};class $r{constructor(D,nt){this.type=D,this.args=nt}static parse(D,nt){if(D.length<2)return nt.error("Expected at least one argument.");let _t=D[0];if(!qr[_t])throw new Error(`Can't parse ${_t} as it is not part of the known types`);if((_t==="to-boolean"||_t==="to-string")&&D.length!==2)return nt.error("Expected one argument.");let Rt=qr[_t],Kt=[];for(let Qt=1;Qt4?`Invalid rbga value ${JSON.stringify(nt)}: expected an array containing either three or four numeric values.`:Di(nt[0],nt[1],nt[2],nt[3]),!_t))return new xr(nt[0]/255,nt[1]/255,nt[2]/255,nt[3])}throw new ze(_t||`Could not parse color from value '${typeof nt=="string"?nt:JSON.stringify(nt)}'`)}case"padding":{let nt;for(let _t of this.args){nt=_t.evaluate(D);let Rt=Mn.parse(nt);if(Rt)return Rt}throw new ze(`Could not parse padding from value '${typeof nt=="string"?nt:JSON.stringify(nt)}'`)}case"variableAnchorOffsetCollection":{let nt;for(let _t of this.args){nt=_t.evaluate(D);let Rt=xi.parse(nt);if(Rt)return Rt}throw new ze(`Could not parse variableAnchorOffsetCollection from value '${typeof nt=="string"?nt:JSON.stringify(nt)}'`)}case"number":{let nt=null;for(let _t of this.args){if(nt=_t.evaluate(D),nt===null)return 0;let Rt=Number(nt);if(!isNaN(Rt))return Rt}throw new ze(`Could not convert ${JSON.stringify(nt)} to number.`)}case"formatted":return wn.fromString(Pa(this.args[0].evaluate(D)));case"resolvedImage":return Pi.fromString(Pa(this.args[0].evaluate(D)));default:return Pa(this.args[0].evaluate(D))}}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}let Br=["Unknown","Point","LineString","Polygon"];class Gr{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Br[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(D){let nt=this._parseColorCache[D];return nt||(nt=this._parseColorCache[D]=xr.parse(D)),nt}}class dn{constructor(D,nt,_t=[],Rt,Kt=new ve,Qt=[]){this.registry=D,this.path=_t,this.key=_t.map(be=>`[${be}]`).join(""),this.scope=Kt,this.errors=Qt,this.expectedType=Rt,this._isConstant=nt}parse(D,nt,_t,Rt,Kt={}){return nt?this.concat(nt,_t,Rt)._parse(D,Kt):this._parse(D,Kt)}_parse(D,nt){function _t(Rt,Kt,Qt){return Qt==="assert"?new Rr(Kt,[Rt]):Qt==="coerce"?new $r(Kt,[Rt]):Rt}if(D!==null&&typeof D!="string"&&typeof D!="boolean"&&typeof D!="number"||(D=["literal",D]),Array.isArray(D)){if(D.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let Rt=D[0];if(typeof Rt!="string")return this.error(`Expression name must be a string, but found ${typeof Rt} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let Kt=this.registry[Rt];if(Kt){let Qt=Kt.parse(D,this);if(!Qt)return null;if(this.expectedType){let be=this.expectedType,Fe=Qt.type;if(be.kind!=="string"&&be.kind!=="number"&&be.kind!=="boolean"&&be.kind!=="object"&&be.kind!=="array"||Fe.kind!=="value")if(be.kind!=="color"&&be.kind!=="formatted"&&be.kind!=="resolvedImage"||Fe.kind!=="value"&&Fe.kind!=="string")if(be.kind!=="padding"||Fe.kind!=="value"&&Fe.kind!=="number"&&Fe.kind!=="array")if(be.kind!=="variableAnchorOffsetCollection"||Fe.kind!=="value"&&Fe.kind!=="array"){if(this.checkSubtype(be,Fe))return null}else Qt=_t(Qt,be,nt.typeAnnotation||"coerce");else Qt=_t(Qt,be,nt.typeAnnotation||"coerce");else Qt=_t(Qt,be,nt.typeAnnotation||"coerce");else Qt=_t(Qt,be,nt.typeAnnotation||"assert")}if(!(Qt instanceof Wa)&&Qt.type.kind!=="resolvedImage"&&this._isConstant(Qt)){let be=new Gr;try{Qt=new Wa(Qt.type,Qt.evaluate(be))}catch(Fe){return this.error(Fe.message),null}}return Qt}return this.error(`Unknown expression "${Rt}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(D===void 0?"'undefined' value invalid. Use null instead.":typeof D=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof D} instead.`)}concat(D,nt,_t){let Rt=typeof D=="number"?this.path.concat(D):this.path,Kt=_t?this.scope.concat(_t):this.scope;return new dn(this.registry,this._isConstant,Rt,nt||null,Kt,this.errors)}error(D,...nt){let _t=`${this.key}${nt.map(Rt=>`[${Rt}]`).join("")}`;this.errors.push(new te(_t,D))}checkSubtype(D,nt){let _t=gt(D,nt);return _t&&this.error(_t),_t}}class an{constructor(D,nt){this.type=nt.type,this.bindings=[].concat(D),this.result=nt}evaluate(D){return this.result.evaluate(D)}eachChild(D){for(let nt of this.bindings)D(nt[1]);D(this.result)}static parse(D,nt){if(D.length<4)return nt.error(`Expected at least 3 arguments, but found ${D.length-1} instead.`);let _t=[];for(let Kt=1;Kt=_t.length)throw new ze(`Array index out of bounds: ${nt} > ${_t.length-1}.`);if(nt!==Math.floor(nt))throw new ze(`Array index must be an integer, but found ${nt} instead.`);return _t[nt]}eachChild(D){D(this.index),D(this.input)}outputDefined(){return!1}}class Vr{constructor(D,nt){this.type=Ge,this.needle=D,this.haystack=nt}static parse(D,nt){if(D.length!==3)return nt.error(`Expected 2 arguments, but found ${D.length-1} instead.`);let _t=nt.parse(D[1],1,jr),Rt=nt.parse(D[2],2,jr);return _t&&Rt?St(_t.type,[Ge,He,Te,oe,jr])?new Vr(_t,Rt):nt.error(`Expected first argument to be of type boolean, string, number or null, but found ${ne(_t.type)} instead`):null}evaluate(D){let nt=this.needle.evaluate(D),_t=this.haystack.evaluate(D);if(!_t)return!1;if(!Nt(nt,["boolean","string","number","null"]))throw new ze(`Expected first argument to be of type boolean, string, number or null, but found ${ne(ui(nt))} instead.`);if(!Nt(_t,["string","array"]))throw new ze(`Expected second argument to be of type array or string, but found ${ne(ui(_t))} instead.`);return _t.indexOf(nt)>=0}eachChild(D){D(this.needle),D(this.haystack)}outputDefined(){return!0}}class yn{constructor(D,nt,_t){this.type=Te,this.needle=D,this.haystack=nt,this.fromIndex=_t}static parse(D,nt){if(D.length<=2||D.length>=5)return nt.error(`Expected 3 or 4 arguments, but found ${D.length-1} instead.`);let _t=nt.parse(D[1],1,jr),Rt=nt.parse(D[2],2,jr);if(!_t||!Rt)return null;if(!St(_t.type,[Ge,He,Te,oe,jr]))return nt.error(`Expected first argument to be of type boolean, string, number or null, but found ${ne(_t.type)} instead`);if(D.length===4){let Kt=nt.parse(D[3],3,Te);return Kt?new yn(_t,Rt,Kt):null}return new yn(_t,Rt)}evaluate(D){let nt=this.needle.evaluate(D),_t=this.haystack.evaluate(D);if(!Nt(nt,["boolean","string","number","null"]))throw new ze(`Expected first argument to be of type boolean, string, number or null, but found ${ne(ui(nt))} instead.`);let Rt;if(this.fromIndex&&(Rt=this.fromIndex.evaluate(D)),Nt(_t,["string"])){let Kt=_t.indexOf(nt,Rt);return Kt===-1?-1:[..._t.slice(0,Kt)].length}if(Nt(_t,["array"]))return _t.indexOf(nt,Rt);throw new ze(`Expected second argument to be of type array or string, but found ${ne(ui(_t))} instead.`)}eachChild(D){D(this.needle),D(this.haystack),this.fromIndex&&D(this.fromIndex)}outputDefined(){return!1}}class Fn{constructor(D,nt,_t,Rt,Kt,Qt){this.inputType=D,this.type=nt,this.input=_t,this.cases=Rt,this.outputs=Kt,this.otherwise=Qt}static parse(D,nt){if(D.length<5)return nt.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if(D.length%2!=1)return nt.error("Expected an even number of arguments.");let _t,Rt;nt.expectedType&&nt.expectedType.kind!=="value"&&(Rt=nt.expectedType);let Kt={},Qt=[];for(let er=2;erNumber.MAX_SAFE_INTEGER)return Zr.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof xn=="number"&&Math.floor(xn)!==xn)return Zr.error("Numeric branch labels must be integer values.");if(_t){if(Zr.checkSubtype(_t,ui(xn)))return null}else _t=ui(xn);if(Kt[String(xn)]!==void 0)return Zr.error("Branch labels must be unique.");Kt[String(xn)]=Qt.length}let sn=nt.parse(Er,er,Rt);if(!sn)return null;Rt=Rt||sn.type,Qt.push(sn)}let be=nt.parse(D[1],1,jr);if(!be)return null;let Fe=nt.parse(D[D.length-1],D.length-1,Rt);return Fe?be.type.kind!=="value"&&nt.concat(1).checkSubtype(_t,be.type)?null:new Fn(_t,Rt,be,Kt,Qt,Fe):null}evaluate(D){let nt=this.input.evaluate(D);return(ui(nt)===this.inputType&&this.outputs[this.cases[nt]]||this.otherwise).evaluate(D)}eachChild(D){D(this.input),this.outputs.forEach(D),D(this.otherwise)}outputDefined(){return this.outputs.every(D=>D.outputDefined())&&this.otherwise.outputDefined()}}class Xn{constructor(D,nt,_t){this.type=D,this.branches=nt,this.otherwise=_t}static parse(D,nt){if(D.length<4)return nt.error(`Expected at least 3 arguments, but found only ${D.length-1}.`);if(D.length%2!=0)return nt.error("Expected an odd number of arguments.");let _t;nt.expectedType&&nt.expectedType.kind!=="value"&&(_t=nt.expectedType);let Rt=[];for(let Qt=1;Qtnt.outputDefined())&&this.otherwise.outputDefined()}}class Pn{constructor(D,nt,_t,Rt){this.type=D,this.input=nt,this.beginIndex=_t,this.endIndex=Rt}static parse(D,nt){if(D.length<=2||D.length>=5)return nt.error(`Expected 3 or 4 arguments, but found ${D.length-1} instead.`);let _t=nt.parse(D[1],1,jr),Rt=nt.parse(D[2],2,Te);if(!_t||!Rt)return null;if(!St(_t.type,[$t(jr),He,jr]))return nt.error(`Expected first argument to be of type array or string, but found ${ne(_t.type)} instead`);if(D.length===4){let Kt=nt.parse(D[3],3,Te);return Kt?new Pn(_t.type,_t,Rt,Kt):null}return new Pn(_t.type,_t,Rt)}evaluate(D){let nt=this.input.evaluate(D),_t=this.beginIndex.evaluate(D),Rt;if(this.endIndex&&(Rt=this.endIndex.evaluate(D)),Nt(nt,["string"]))return[...nt].slice(_t,Rt).join("");if(Nt(nt,["array"]))return nt.slice(_t,Rt);throw new ze(`Expected first argument to be of type array or string, but found ${ne(ui(nt))} instead.`)}eachChild(D){D(this.input),D(this.beginIndex),this.endIndex&&D(this.endIndex)}outputDefined(){return!1}}function En(G,D){let nt=G.length-1,_t,Rt,Kt=0,Qt=nt,be=0;for(;Kt<=Qt;)if(be=Math.floor((Kt+Qt)/2),_t=G[be],Rt=G[be+1],_t<=D){if(be===nt||DD))throw new ze("Input is not a number.");Qt=be-1}return 0}class Zn{constructor(D,nt,_t){this.type=D,this.input=nt,this.labels=[],this.outputs=[];for(let[Rt,Kt]of _t)this.labels.push(Rt),this.outputs.push(Kt)}static parse(D,nt){if(D.length-1<4)return nt.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if((D.length-1)%2!=0)return nt.error("Expected an even number of arguments.");let _t=nt.parse(D[1],1,Te);if(!_t)return null;let Rt=[],Kt=null;nt.expectedType&&nt.expectedType.kind!=="value"&&(Kt=nt.expectedType);for(let Qt=1;Qt=be)return nt.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',er);let Er=nt.parse(Fe,yr,Kt);if(!Er)return null;Kt=Kt||Er.type,Rt.push([be,Er])}return new Zn(Kt,_t,Rt)}evaluate(D){let nt=this.labels,_t=this.outputs;if(nt.length===1)return _t[0].evaluate(D);let Rt=this.input.evaluate(D);if(Rt<=nt[0])return _t[0].evaluate(D);let Kt=nt.length;return Rt>=nt[Kt-1]?_t[Kt-1].evaluate(D):_t[En(nt,Rt)].evaluate(D)}eachChild(D){D(this.input);for(let nt of this.outputs)D(nt)}outputDefined(){return this.outputs.every(D=>D.outputDefined())}}function Ca(G){return G&&G.__esModule&&Object.prototype.hasOwnProperty.call(G,"default")?G.default:G}var Ri=Ja;function Ja(G,D,nt,_t){this.cx=3*G,this.bx=3*(nt-G)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*D,this.by=3*(_t-D)-this.cy,this.ay=1-this.cy-this.by,this.p1x=G,this.p1y=D,this.p2x=nt,this.p2y=_t}Ja.prototype={sampleCurveX:function(G){return((this.ax*G+this.bx)*G+this.cx)*G},sampleCurveY:function(G){return((this.ay*G+this.by)*G+this.cy)*G},sampleCurveDerivativeX:function(G){return(3*this.ax*G+2*this.bx)*G+this.cx},solveCurveX:function(G,D){if(D===void 0&&(D=1e-6),G<0)return 0;if(G>1)return 1;for(var nt=G,_t=0;_t<8;_t++){var Rt=this.sampleCurveX(nt)-G;if(Math.abs(Rt)Rt?Qt=nt:be=nt,nt=.5*(be-Qt)+Qt;return nt},solve:function(G,D){return this.sampleCurveY(this.solveCurveX(G,D))}};var Xa=Ca(Ri);function Io(G,D,nt){return G+nt*(D-G)}function po(G,D,nt){return G.map((_t,Rt)=>Io(_t,D[Rt],nt))}let Do={number:Io,color:function(G,D,nt,_t="rgb"){switch(_t){case"rgb":{let[Rt,Kt,Qt,be]=po(G.rgb,D.rgb,nt);return new xr(Rt,Kt,Qt,be,!1)}case"hcl":{let[Rt,Kt,Qt,be]=G.hcl,[Fe,er,yr,Er]=D.hcl,Zr,sn;if(isNaN(Rt)||isNaN(Fe))isNaN(Rt)?isNaN(Fe)?Zr=NaN:(Zr=Fe,Qt!==1&&Qt!==0||(sn=er)):(Zr=Rt,yr!==1&&yr!==0||(sn=Kt));else{let Aa=Fe-Rt;Fe>Rt&&Aa>180?Aa-=360:Fe180&&(Aa+=360),Zr=Rt+nt*Aa}let[xn,Ln,$n,ki]=function([Aa,Xi,ma,Ga]){return Aa=isNaN(Aa)?0:Aa*Tr,Ci([ma,Math.cos(Aa)*Xi,Math.sin(Aa)*Xi,Ga])}([Zr,sn??Io(Kt,er,nt),Io(Qt,yr,nt),Io(be,Er,nt)]);return new xr(xn,Ln,$n,ki,!1)}case"lab":{let[Rt,Kt,Qt,be]=Ci(po(G.lab,D.lab,nt));return new xr(Rt,Kt,Qt,be,!1)}}},array:po,padding:function(G,D,nt){return new Mn(po(G.values,D.values,nt))},variableAnchorOffsetCollection:function(G,D,nt){let _t=G.values,Rt=D.values;if(_t.length!==Rt.length)throw new ze(`Cannot interpolate values of different length. from: ${G.toString()}, to: ${D.toString()}`);let Kt=[];for(let Qt=0;Qt<_t.length;Qt+=2){if(_t[Qt]!==Rt[Qt])throw new ze(`Cannot interpolate values containing mismatched anchors. from[${Qt}]: ${_t[Qt]}, to[${Qt}]: ${Rt[Qt]}`);Kt.push(_t[Qt]);let[be,Fe]=_t[Qt+1],[er,yr]=Rt[Qt+1];Kt.push([Io(be,er,nt),Io(Fe,yr,nt)])}return new xi(Kt)}};class Ia{constructor(D,nt,_t,Rt,Kt){this.type=D,this.operator=nt,this.interpolation=_t,this.input=Rt,this.labels=[],this.outputs=[];for(let[Qt,be]of Kt)this.labels.push(Qt),this.outputs.push(be)}static interpolationFactor(D,nt,_t,Rt){let Kt=0;if(D.name==="exponential")Kt=gs(nt,D.base,_t,Rt);else if(D.name==="linear")Kt=gs(nt,1,_t,Rt);else if(D.name==="cubic-bezier"){let Qt=D.controlPoints;Kt=new Xa(Qt[0],Qt[1],Qt[2],Qt[3]).solve(gs(nt,1,_t,Rt))}return Kt}static parse(D,nt){let[_t,Rt,Kt,...Qt]=D;if(!Array.isArray(Rt)||Rt.length===0)return nt.error("Expected an interpolation type expression.",1);if(Rt[0]==="linear")Rt={name:"linear"};else if(Rt[0]==="exponential"){let er=Rt[1];if(typeof er!="number")return nt.error("Exponential interpolation requires a numeric base.",1,1);Rt={name:"exponential",base:er}}else{if(Rt[0]!=="cubic-bezier")return nt.error(`Unknown interpolation type ${String(Rt[0])}`,1,0);{let er=Rt.slice(1);if(er.length!==4||er.some(yr=>typeof yr!="number"||yr<0||yr>1))return nt.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);Rt={name:"cubic-bezier",controlPoints:er}}}if(D.length-1<4)return nt.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if((D.length-1)%2!=0)return nt.error("Expected an even number of arguments.");if(Kt=nt.parse(Kt,2,Te),!Kt)return null;let be=[],Fe=null;_t==="interpolate-hcl"||_t==="interpolate-lab"?Fe=cr:nt.expectedType&&nt.expectedType.kind!=="value"&&(Fe=nt.expectedType);for(let er=0;er=yr)return nt.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Zr);let xn=nt.parse(Er,sn,Fe);if(!xn)return null;Fe=Fe||xn.type,be.push([yr,xn])}return ee(Fe,Te)||ee(Fe,cr)||ee(Fe,Kr)||ee(Fe,Ce)||ee(Fe,$t(Te))?new Ia(Fe,_t,Rt,Kt,be):nt.error(`Type ${ne(Fe)} is not interpolatable.`)}evaluate(D){let nt=this.labels,_t=this.outputs;if(nt.length===1)return _t[0].evaluate(D);let Rt=this.input.evaluate(D);if(Rt<=nt[0])return _t[0].evaluate(D);let Kt=nt.length;if(Rt>=nt[Kt-1])return _t[Kt-1].evaluate(D);let Qt=En(nt,Rt),be=Ia.interpolationFactor(this.interpolation,Rt,nt[Qt],nt[Qt+1]),Fe=_t[Qt].evaluate(D),er=_t[Qt+1].evaluate(D);switch(this.operator){case"interpolate":return Do[this.type.kind](Fe,er,be);case"interpolate-hcl":return Do.color(Fe,er,be,"hcl");case"interpolate-lab":return Do.color(Fe,er,be,"lab")}}eachChild(D){D(this.input);for(let nt of this.outputs)D(nt)}outputDefined(){return this.outputs.every(D=>D.outputDefined())}}function gs(G,D,nt,_t){let Rt=_t-nt,Kt=G-nt;return Rt===0?0:D===1?Kt/Rt:(Math.pow(D,Kt)-1)/(Math.pow(D,Rt)-1)}class is{constructor(D,nt){this.type=D,this.args=nt}static parse(D,nt){if(D.length<2)return nt.error("Expectected at least one argument.");let _t=null,Rt=nt.expectedType;Rt&&Rt.kind!=="value"&&(_t=Rt);let Kt=[];for(let be of D.slice(1)){let Fe=nt.parse(be,1+Kt.length,_t,void 0,{typeAnnotation:"omit"});if(!Fe)return null;_t=_t||Fe.type,Kt.push(Fe)}if(!_t)throw new Error("No output type");let Qt=Rt&&Kt.some(be=>gt(Rt,be.type));return new is(Qt?jr:_t,Kt)}evaluate(D){let nt,_t=null,Rt=0;for(let Kt of this.args)if(Rt++,_t=Kt.evaluate(D),_t&&_t instanceof Pi&&!_t.available&&(nt||(nt=_t.name),_t=null,Rt===this.args.length&&(_t=nt)),_t!==null)break;return _t}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}function ll(G,D){return G==="=="||G==="!="?D.kind==="boolean"||D.kind==="string"||D.kind==="number"||D.kind==="null"||D.kind==="value":D.kind==="string"||D.kind==="number"||D.kind==="value"}function Ho(G,D,nt,_t){return _t.compare(D,nt)===0}function Gs(G,D,nt){let _t=G!=="=="&&G!=="!=";return class HD{constructor(Kt,Qt,be){this.type=Ge,this.lhs=Kt,this.rhs=Qt,this.collator=be,this.hasUntypedArgument=Kt.type.kind==="value"||Qt.type.kind==="value"}static parse(Kt,Qt){if(Kt.length!==3&&Kt.length!==4)return Qt.error("Expected two or three arguments.");let be=Kt[0],Fe=Qt.parse(Kt[1],1,jr);if(!Fe)return null;if(!ll(be,Fe.type))return Qt.concat(1).error(`"${be}" comparisons are not supported for type '${ne(Fe.type)}'.`);let er=Qt.parse(Kt[2],2,jr);if(!er)return null;if(!ll(be,er.type))return Qt.concat(2).error(`"${be}" comparisons are not supported for type '${ne(er.type)}'.`);if(Fe.type.kind!==er.type.kind&&Fe.type.kind!=="value"&&er.type.kind!=="value")return Qt.error(`Cannot compare types '${ne(Fe.type)}' and '${ne(er.type)}'.`);_t&&(Fe.type.kind==="value"&&er.type.kind!=="value"?Fe=new Rr(er.type,[Fe]):Fe.type.kind!=="value"&&er.type.kind==="value"&&(er=new Rr(Fe.type,[er])));let yr=null;if(Kt.length===4){if(Fe.type.kind!=="string"&&er.type.kind!=="string"&&Fe.type.kind!=="value"&&er.type.kind!=="value")return Qt.error("Cannot use collator to compare non-string types.");if(yr=Qt.parse(Kt[3],3,Hr),!yr)return null}return new HD(Fe,er,yr)}evaluate(Kt){let Qt=this.lhs.evaluate(Kt),be=this.rhs.evaluate(Kt);if(_t&&this.hasUntypedArgument){let Fe=ui(Qt),er=ui(be);if(Fe.kind!==er.kind||Fe.kind!=="string"&&Fe.kind!=="number")throw new ze(`Expected arguments for "${G}" to be (string, string) or (number, number), but found (${Fe.kind}, ${er.kind}) instead.`)}if(this.collator&&!_t&&this.hasUntypedArgument){let Fe=ui(Qt),er=ui(be);if(Fe.kind!=="string"||er.kind!=="string")return D(Kt,Qt,be)}return this.collator?nt(Kt,Qt,be,this.collator.evaluate(Kt)):D(Kt,Qt,be)}eachChild(Kt){Kt(this.lhs),Kt(this.rhs),this.collator&&Kt(this.collator)}outputDefined(){return!0}}}let as=Gs("==",function(G,D,nt){return D===nt},Ho),ul=Gs("!=",function(G,D,nt){return D!==nt},function(G,D,nt,_t){return!Ho(0,D,nt,_t)}),Js=Gs("<",function(G,D,nt){return D",function(G,D,nt){return D>nt},function(G,D,nt,_t){return _t.compare(D,nt)>0}),ls=Gs("<=",function(G,D,nt){return D<=nt},function(G,D,nt,_t){return _t.compare(D,nt)<=0}),Cs=Gs(">=",function(G,D,nt){return D>=nt},function(G,D,nt,_t){return _t.compare(D,nt)>=0});class Co{constructor(D,nt,_t){this.type=Hr,this.locale=_t,this.caseSensitive=D,this.diacriticSensitive=nt}static parse(D,nt){if(D.length!==2)return nt.error("Expected one argument.");let _t=D[1];if(typeof _t!="object"||Array.isArray(_t))return nt.error("Collator options argument must be an object.");let Rt=nt.parse(_t["case-sensitive"]!==void 0&&_t["case-sensitive"],1,Ge);if(!Rt)return null;let Kt=nt.parse(_t["diacritic-sensitive"]!==void 0&&_t["diacritic-sensitive"],1,Ge);if(!Kt)return null;let Qt=null;return _t.locale&&(Qt=nt.parse(_t.locale,1,He),!Qt)?null:new Co(Rt,Kt,Qt)}evaluate(D){return new Qr(this.caseSensitive.evaluate(D),this.diacriticSensitive.evaluate(D),this.locale?this.locale.evaluate(D):null)}eachChild(D){D(this.caseSensitive),D(this.diacriticSensitive),this.locale&&D(this.locale)}outputDefined(){return!1}}class ks{constructor(D,nt,_t,Rt,Kt){this.type=He,this.number=D,this.locale=nt,this.currency=_t,this.minFractionDigits=Rt,this.maxFractionDigits=Kt}static parse(D,nt){if(D.length!==3)return nt.error("Expected two arguments.");let _t=nt.parse(D[1],1,Te);if(!_t)return null;let Rt=D[2];if(typeof Rt!="object"||Array.isArray(Rt))return nt.error("NumberFormat options argument must be an object.");let Kt=null;if(Rt.locale&&(Kt=nt.parse(Rt.locale,1,He),!Kt))return null;let Qt=null;if(Rt.currency&&(Qt=nt.parse(Rt.currency,1,He),!Qt))return null;let be=null;if(Rt["min-fraction-digits"]&&(be=nt.parse(Rt["min-fraction-digits"],1,Te),!be))return null;let Fe=null;return Rt["max-fraction-digits"]&&(Fe=nt.parse(Rt["max-fraction-digits"],1,Te),!Fe)?null:new ks(_t,Kt,Qt,be,Fe)}evaluate(D){return new Intl.NumberFormat(this.locale?this.locale.evaluate(D):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(D):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(D):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(D):void 0}).format(this.number.evaluate(D))}eachChild(D){D(this.number),this.locale&&D(this.locale),this.currency&&D(this.currency),this.minFractionDigits&&D(this.minFractionDigits),this.maxFractionDigits&&D(this.maxFractionDigits)}outputDefined(){return!1}}class kl{constructor(D){this.type=br,this.sections=D}static parse(D,nt){if(D.length<2)return nt.error("Expected at least one argument.");let _t=D[1];if(!Array.isArray(_t)&&typeof _t=="object")return nt.error("First argument must be an image or text section.");let Rt=[],Kt=!1;for(let Qt=1;Qt<=D.length-1;++Qt){let be=D[Qt];if(Kt&&typeof be=="object"&&!Array.isArray(be)){Kt=!1;let Fe=null;if(be["font-scale"]&&(Fe=nt.parse(be["font-scale"],1,Te),!Fe))return null;let er=null;if(be["text-font"]&&(er=nt.parse(be["text-font"],1,$t(He)),!er))return null;let yr=null;if(be["text-color"]&&(yr=nt.parse(be["text-color"],1,cr),!yr))return null;let Er=Rt[Rt.length-1];Er.scale=Fe,Er.font=er,Er.textColor=yr}else{let Fe=nt.parse(D[Qt],1,jr);if(!Fe)return null;let er=Fe.type.kind;if(er!=="string"&&er!=="value"&&er!=="null"&&er!=="resolvedImage")return nt.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Kt=!0,Rt.push({content:Fe,scale:null,font:null,textColor:null})}}return new kl(Rt)}evaluate(D){return new wn(this.sections.map(nt=>{let _t=nt.content.evaluate(D);return ui(_t)===rn?new Cn("",_t,null,null,null):new Cn(Pa(_t),null,nt.scale?nt.scale.evaluate(D):null,nt.font?nt.font.evaluate(D).join(","):null,nt.textColor?nt.textColor.evaluate(D):null)}))}eachChild(D){for(let nt of this.sections)D(nt.content),nt.scale&&D(nt.scale),nt.font&&D(nt.font),nt.textColor&&D(nt.textColor)}outputDefined(){return!1}}class Vl{constructor(D){this.type=rn,this.input=D}static parse(D,nt){if(D.length!==2)return nt.error("Expected two arguments.");let _t=nt.parse(D[1],1,He);return _t?new Vl(_t):nt.error("No image name provided.")}evaluate(D){let nt=this.input.evaluate(D),_t=Pi.fromString(nt);return _t&&D.availableImages&&(_t.available=D.availableImages.indexOf(nt)>-1),_t}eachChild(D){D(this.input)}outputDefined(){return!1}}class Yl{constructor(D){this.type=Te,this.input=D}static parse(D,nt){if(D.length!==2)return nt.error(`Expected 1 argument, but found ${D.length-1} instead.`);let _t=nt.parse(D[1],1);return _t?_t.type.kind!=="array"&&_t.type.kind!=="string"&&_t.type.kind!=="value"?nt.error(`Expected argument of type string or array, but found ${ne(_t.type)} instead.`):new Yl(_t):null}evaluate(D){let nt=this.input.evaluate(D);if(typeof nt=="string")return[...nt].length;if(Array.isArray(nt))return nt.length;throw new ze(`Expected value to be of type string or array, but found ${ne(ui(nt))} instead.`)}eachChild(D){D(this.input)}outputDefined(){return!1}}let Ns=8192;function La(G,D){let nt=(180+G[0])/360,_t=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+G[1]*Math.PI/360)))/360,Rt=Math.pow(2,D.z);return[Math.round(nt*Rt*Ns),Math.round(_t*Rt*Ns)]}function uo(G,D){let nt=Math.pow(2,D.z);return[(Rt=(G[0]/Ns+D.x)/nt,360*Rt-180),(_t=(G[1]/Ns+D.y)/nt,360/Math.PI*Math.atan(Math.exp((180-360*_t)*Math.PI/180))-90)];var _t,Rt}function Hs(G,D){G[0]=Math.min(G[0],D[0]),G[1]=Math.min(G[1],D[1]),G[2]=Math.max(G[2],D[0]),G[3]=Math.max(G[3],D[1])}function Kl(G,D){return!(G[0]<=D[0]||G[2]>=D[2]||G[1]<=D[1]||G[3]>=D[3])}function Go(G,D,nt){let _t=G[0]-D[0],Rt=G[1]-D[1],Kt=G[0]-nt[0],Qt=G[1]-nt[1];return _t*Qt-Kt*Rt==0&&_t*Kt<=0&&Rt*Qt<=0}function ql(G,D,nt,_t){return(Rt=[_t[0]-nt[0],_t[1]-nt[1]])[0]*(Kt=[D[0]-G[0],D[1]-G[1]])[1]-Rt[1]*Kt[0]!=0&&!(!Ls(G,D,nt,_t)||!Ls(nt,_t,G,D));var Rt,Kt}function il(G,D,nt){for(let _t of nt)for(let Rt=0;Rt<_t.length-1;++Rt)if(ql(G,D,_t[Rt],_t[Rt+1]))return!0;return!1}function Cl(G,D,nt=!1){let _t=!1;for(let be of D)for(let Fe=0;Fe(Rt=G)[1]!=(Qt=be[Fe+1])[1]>Rt[1]&&Rt[0]<(Qt[0]-Kt[0])*(Rt[1]-Kt[1])/(Qt[1]-Kt[1])+Kt[0]&&(_t=!_t)}var Rt,Kt,Qt;return _t}function Fu(G,D){for(let nt of D)if(Cl(G,nt))return!0;return!1}function ao(G,D){for(let nt of G)if(!Cl(nt,D))return!1;for(let nt=0;nt0&&be<0||Qt<0&&be>0}function nu(G,D,nt){let _t=[];for(let Rt=0;Rtnt[2]){let Rt=.5*_t,Kt=G[0]-nt[0]>Rt?-_t:nt[0]-G[0]>Rt?_t:0;Kt===0&&(Kt=G[0]-nt[2]>Rt?-_t:nt[2]-G[0]>Rt?_t:0),G[0]+=Kt}Hs(D,G)}function Mu(G,D,nt,_t){let Rt=Math.pow(2,_t.z)*Ns,Kt=[_t.x*Ns,_t.y*Ns],Qt=[];for(let be of G)for(let Fe of be){let er=[Fe.x+Kt[0],Fe.y+Kt[1]];Qo(er,D,nt,Rt),Qt.push(er)}return Qt}function Gu(G,D,nt,_t){let Rt=Math.pow(2,_t.z)*Ns,Kt=[_t.x*Ns,_t.y*Ns],Qt=[];for(let Fe of G){let er=[];for(let yr of Fe){let Er=[yr.x+Kt[0],yr.y+Kt[1]];Hs(D,Er),er.push(Er)}Qt.push(er)}if(D[2]-D[0]<=Rt/2){(be=D)[0]=be[1]=1/0,be[2]=be[3]=-1/0;for(let Fe of Qt)for(let er of Fe)Qo(er,D,nt,Rt)}var be;return Qt}class _l{constructor(D,nt){this.type=Ge,this.geojson=D,this.geometries=nt}static parse(D,nt){if(D.length!==2)return nt.error(`'within' expression requires exactly one argument, but found ${D.length-1} instead.`);if(Zi(D[1])){let _t=D[1];if(_t.type==="FeatureCollection"){let Rt=[];for(let Kt of _t.features){let{type:Qt,coordinates:be}=Kt.geometry;Qt==="Polygon"&&Rt.push(be),Qt==="MultiPolygon"&&Rt.push(...be)}if(Rt.length)return new _l(_t,{type:"MultiPolygon",coordinates:Rt})}else if(_t.type==="Feature"){let Rt=_t.geometry.type;if(Rt==="Polygon"||Rt==="MultiPolygon")return new _l(_t,_t.geometry)}else if(_t.type==="Polygon"||_t.type==="MultiPolygon")return new _l(_t,_t)}return nt.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(D){if(D.geometry()!=null&&D.canonicalID()!=null){if(D.geometryType()==="Point")return function(nt,_t){let Rt=[1/0,1/0,-1/0,-1/0],Kt=[1/0,1/0,-1/0,-1/0],Qt=nt.canonicalID();if(_t.type==="Polygon"){let be=nu(_t.coordinates,Kt,Qt),Fe=Mu(nt.geometry(),Rt,Kt,Qt);if(!Kl(Rt,Kt))return!1;for(let er of Fe)if(!Cl(er,be))return!1}if(_t.type==="MultiPolygon"){let be=cl(_t.coordinates,Kt,Qt),Fe=Mu(nt.geometry(),Rt,Kt,Qt);if(!Kl(Rt,Kt))return!1;for(let er of Fe)if(!Fu(er,be))return!1}return!0}(D,this.geometries);if(D.geometryType()==="LineString")return function(nt,_t){let Rt=[1/0,1/0,-1/0,-1/0],Kt=[1/0,1/0,-1/0,-1/0],Qt=nt.canonicalID();if(_t.type==="Polygon"){let be=nu(_t.coordinates,Kt,Qt),Fe=Gu(nt.geometry(),Rt,Kt,Qt);if(!Kl(Rt,Kt))return!1;for(let er of Fe)if(!ao(er,be))return!1}if(_t.type==="MultiPolygon"){let be=cl(_t.coordinates,Kt,Qt),Fe=Gu(nt.geometry(),Rt,Kt,Qt);if(!Kl(Rt,Kt))return!1;for(let er of Fe)if(!Ts(er,be))return!1}return!0}(D,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Ol=class{constructor(G=[],D=(nt,_t)=>nt<_t?-1:nt>_t?1:0){if(this.data=G,this.length=this.data.length,this.compare=D,this.length>0)for(let nt=(this.length>>1)-1;nt>=0;nt--)this._down(nt)}push(G){this.data.push(G),this._up(this.length++)}pop(){if(this.length===0)return;let G=this.data[0],D=this.data.pop();return--this.length>0&&(this.data[0]=D,this._down(0)),G}peek(){return this.data[0]}_up(G){let{data:D,compare:nt}=this,_t=D[G];for(;G>0;){let Rt=G-1>>1,Kt=D[Rt];if(nt(_t,Kt)>=0)break;D[G]=Kt,G=Rt}D[G]=_t}_down(G){let{data:D,compare:nt}=this,_t=this.length>>1,Rt=D[G];for(;G<_t;){let Kt=1+(G<<1),Qt=Kt+1;if(Qt=0)break;D[G]=D[Kt],G=Kt}D[G]=Rt}};function Xl(G,D,nt,_t,Rt){tu(G,D,nt,_t||G.length-1,Rt||ph)}function tu(G,D,nt,_t,Rt){for(;_t>nt;){if(_t-nt>600){var Kt=_t-nt+1,Qt=D-nt+1,be=Math.log(Kt),Fe=.5*Math.exp(2*be/3),er=.5*Math.sqrt(be*Fe*(Kt-Fe)/Kt)*(Qt-Kt/2<0?-1:1);tu(G,D,Math.max(nt,Math.floor(D-Qt*Fe/Kt+er)),Math.min(_t,Math.floor(D+(Kt-Qt)*Fe/Kt+er)),Rt)}var yr=G[D],Er=nt,Zr=_t;for(ac(G,nt,D),Rt(G[_t],yr)>0&&ac(G,nt,_t);Er0;)Zr--}Rt(G[nt],yr)===0?ac(G,nt,Zr):ac(G,++Zr,_t),Zr<=D&&(nt=Zr+1),D<=Zr&&(_t=Zr-1)}}function ac(G,D,nt){var _t=G[D];G[D]=G[nt],G[nt]=_t}function ph(G,D){return GD?1:0}function Jc(G,D){if(G.length<=1)return[G];let nt=[],_t,Rt;for(let Kt of G){let Qt=Nf(Kt);Qt!==0&&(Kt.area=Math.abs(Qt),Rt===void 0&&(Rt=Qt<0),Rt===Qt<0?(_t&&nt.push(_t),_t=[Kt]):_t.push(Kt))}if(_t&&nt.push(_t),D>1)for(let Kt=0;Kt1?(er=D[Fe+1][0],yr=D[Fe+1][1]):sn>0&&(er+=Er/this.kx*sn,yr+=Zr/this.ky*sn)),Er=this.wrap(nt[0]-er)*this.kx,Zr=(nt[1]-yr)*this.ky;let xn=Er*Er+Zr*Zr;xn180;)D-=360;return D}}function hc(G,D){return D[0]-G[0]}function oc(G){return G[1]-G[0]+1}function fc(G,D){return G[1]>=G[0]&&G[1]G[1])return[null,null];let nt=oc(G);if(D){if(nt===2)return[G,null];let Rt=Math.floor(nt/2);return[[G[0],G[0]+Rt],[G[0]+Rt,G[1]]]}if(nt===1)return[G,null];let _t=Math.floor(nt/2)-1;return[[G[0],G[0]+_t],[G[0]+_t+1,G[1]]]}function su(G,D){if(!fc(D,G.length))return[1/0,1/0,-1/0,-1/0];let nt=[1/0,1/0,-1/0,-1/0];for(let _t=D[0];_t<=D[1];++_t)Hs(nt,G[_t]);return nt}function sc(G){let D=[1/0,1/0,-1/0,-1/0];for(let nt of G)for(let _t of nt)Hs(D,_t);return D}function el(G){return G[0]!==-1/0&&G[1]!==-1/0&&G[2]!==1/0&&G[3]!==1/0}function Zl(G,D,nt){if(!el(G)||!el(D))return NaN;let _t=0,Rt=0;return G[2]D[2]&&(_t=G[0]-D[2]),G[1]>D[3]&&(Rt=G[1]-D[3]),G[3]=_t)return _t;if(Kl(Rt,Kt)){if(Wd(G,D))return 0}else if(Wd(D,G))return 0;let Qt=1/0;for(let be of G)for(let Fe=0,er=be.length,yr=er-1;Fe0;){let Fe=Qt.pop();if(Fe[0]>=Kt)continue;let er=Fe[1],yr=D?50:100;if(oc(er)<=yr){if(!fc(er,G.length))return NaN;if(D){let Er=Qs(G,er,nt,_t);if(isNaN(Er)||Er===0)return Er;Kt=Math.min(Kt,Er)}else for(let Er=er[0];Er<=er[1];++Er){let Zr=Cd(G[Er],nt,_t);if(Kt=Math.min(Kt,Zr),Kt===0)return 0}}else{let Er=oh(er,D);Jo(Qt,Kt,_t,G,be,Er[0]),Jo(Qt,Kt,_t,G,be,Er[1])}}return Kt}function ec(G,D,nt,_t,Rt,Kt=1/0){let Qt=Math.min(Kt,Rt.distance(G[0],nt[0]));if(Qt===0)return Qt;let be=new Ol([[0,[0,G.length-1],[0,nt.length-1]]],hc);for(;be.length>0;){let Fe=be.pop();if(Fe[0]>=Qt)continue;let er=Fe[1],yr=Fe[2],Er=D?50:100,Zr=_t?50:100;if(oc(er)<=Er&&oc(yr)<=Zr){if(!fc(er,G.length)&&fc(yr,nt.length))return NaN;let sn;if(D&&_t)sn=jh(G,er,nt,yr,Rt),Qt=Math.min(Qt,sn);else if(D&&!_t){let xn=G.slice(er[0],er[1]+1);for(let Ln=yr[0];Ln<=yr[1];++Ln)if(sn=Mh(nt[Ln],xn,Rt),Qt=Math.min(Qt,sn),Qt===0)return Qt}else if(!D&&_t){let xn=nt.slice(yr[0],yr[1]+1);for(let Ln=er[0];Ln<=er[1];++Ln)if(sn=Mh(G[Ln],xn,Rt),Qt=Math.min(Qt,sn),Qt===0)return Qt}else sn=xu(G,er,nt,yr,Rt),Qt=Math.min(Qt,sn)}else{let sn=oh(er,D),xn=oh(yr,_t);lf(be,Qt,Rt,G,nt,sn[0],xn[0]),lf(be,Qt,Rt,G,nt,sn[0],xn[1]),lf(be,Qt,Rt,G,nt,sn[1],xn[0]),lf(be,Qt,Rt,G,nt,sn[1],xn[1])}}return Qt}function Uf(G){return G.type==="MultiPolygon"?G.coordinates.map(D=>({type:"Polygon",coordinates:D})):G.type==="MultiLineString"?G.coordinates.map(D=>({type:"LineString",coordinates:D})):G.type==="MultiPoint"?G.coordinates.map(D=>({type:"Point",coordinates:D})):[G]}class Uh{constructor(D,nt){this.type=Te,this.geojson=D,this.geometries=nt}static parse(D,nt){if(D.length!==2)return nt.error(`'distance' expression requires exactly one argument, but found ${D.length-1} instead.`);if(Zi(D[1])){let _t=D[1];if(_t.type==="FeatureCollection")return new Uh(_t,_t.features.map(Rt=>Uf(Rt.geometry)).flat());if(_t.type==="Feature")return new Uh(_t,Uf(_t.geometry));if("type"in _t&&"coordinates"in _t)return new Uh(_t,Uf(_t))}return nt.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(D){if(D.geometry()!=null&&D.canonicalID()!=null){if(D.geometryType()==="Point")return function(nt,_t){let Rt=nt.geometry(),Kt=Rt.flat().map(Fe=>uo([Fe.x,Fe.y],nt.canonical));if(Rt.length===0)return NaN;let Qt=new jf(Kt[0][1]),be=1/0;for(let Fe of _t){switch(Fe.type){case"Point":be=Math.min(be,ec(Kt,!1,[Fe.coordinates],!1,Qt,be));break;case"LineString":be=Math.min(be,ec(Kt,!1,Fe.coordinates,!0,Qt,be));break;case"Polygon":be=Math.min(be,sh(Kt,!1,Fe.coordinates,Qt,be))}if(be===0)return be}return be}(D,this.geometries);if(D.geometryType()==="LineString")return function(nt,_t){let Rt=nt.geometry(),Kt=Rt.flat().map(Fe=>uo([Fe.x,Fe.y],nt.canonical));if(Rt.length===0)return NaN;let Qt=new jf(Kt[0][1]),be=1/0;for(let Fe of _t){switch(Fe.type){case"Point":be=Math.min(be,ec(Kt,!0,[Fe.coordinates],!1,Qt,be));break;case"LineString":be=Math.min(be,ec(Kt,!0,Fe.coordinates,!0,Qt,be));break;case"Polygon":be=Math.min(be,sh(Kt,!0,Fe.coordinates,Qt,be))}if(be===0)return be}return be}(D,this.geometries);if(D.geometryType()==="Polygon")return function(nt,_t){let Rt=nt.geometry();if(Rt.length===0||Rt[0].length===0)return NaN;let Kt=Jc(Rt,0).map(Fe=>Fe.map(er=>er.map(yr=>uo([yr.x,yr.y],nt.canonical)))),Qt=new jf(Kt[0][0][0][1]),be=1/0;for(let Fe of _t)for(let er of Kt){switch(Fe.type){case"Point":be=Math.min(be,sh([Fe.coordinates],!1,er,Qt,be));break;case"LineString":be=Math.min(be,sh(Fe.coordinates,!0,er,Qt,be));break;case"Polygon":be=Math.min(be,Ll(er,Fe.coordinates,Qt,be))}if(be===0)return be}return be}(D,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let yf={"==":as,"!=":ul,">":Rl,"<":Js,">=":Cs,"<=":ls,array:Rr,at:dr,boolean:Rr,case:Xn,coalesce:is,collator:Co,format:kl,image:Vl,in:Vr,"index-of":yn,interpolate:Ia,"interpolate-hcl":Ia,"interpolate-lab":Ia,length:Yl,let:an,literal:Wa,match:Fn,number:Rr,"number-format":ks,object:Rr,slice:Pn,step:Zn,string:Rr,"to-boolean":$r,"to-color":$r,"to-number":$r,"to-string":$r,var:Ee,within:_l,distance:Uh};class lc{constructor(D,nt,_t,Rt){this.name=D,this.type=nt,this._evaluate=_t,this.args=Rt}evaluate(D){return this._evaluate(D,this.args)}eachChild(D){this.args.forEach(D)}outputDefined(){return!1}static parse(D,nt){let _t=D[0],Rt=lc.definitions[_t];if(!Rt)return nt.error(`Unknown expression "${_t}". If you wanted a literal array, use ["literal", [...]].`,0);let Kt=Array.isArray(Rt)?Rt[0]:Rt.type,Qt=Array.isArray(Rt)?[[Rt[1],Rt[2]]]:Rt.overloads,be=Qt.filter(([er])=>!Array.isArray(er)||er.length===D.length-1),Fe=null;for(let[er,yr]of be){Fe=new dn(nt.registry,Vf,nt.path,null,nt.scope);let Er=[],Zr=!1;for(let sn=1;sn{return Zr=Er,Array.isArray(Zr)?`(${Zr.map(ne).join(", ")})`:`(${ne(Zr.type)}...)`;var Zr}).join(" | "),yr=[];for(let Er=1;Er{nt=D?nt&&Vf(_t):nt&&_t instanceof Wa}),!!nt&&Hf(G)&&Gf(G,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Hf(G){if(G instanceof lc&&(G.name==="get"&&G.args.length===1||G.name==="feature-state"||G.name==="has"&&G.args.length===1||G.name==="properties"||G.name==="geometry-type"||G.name==="id"||/^filter-/.test(G.name))||G instanceof _l||G instanceof Uh)return!1;let D=!0;return G.eachChild(nt=>{D&&!Hf(nt)&&(D=!1)}),D}function lh(G){if(G instanceof lc&&G.name==="feature-state")return!1;let D=!0;return G.eachChild(nt=>{D&&!lh(nt)&&(D=!1)}),D}function Gf(G,D){if(G instanceof lc&&D.indexOf(G.name)>=0)return!1;let nt=!0;return G.eachChild(_t=>{nt&&!Gf(_t,D)&&(nt=!1)}),nt}function Sh(G){return{result:"success",value:G}}function mh(G){return{result:"error",value:G}}function uc(G){return G["property-type"]==="data-driven"||G["property-type"]==="cross-faded-data-driven"}function ef(G){return!!G.expression&&G.expression.parameters.indexOf("zoom")>-1}function Wf(G){return!!G.expression&&G.expression.interpolated}function Jl(G){return G instanceof Number?"number":G instanceof String?"string":G instanceof Boolean?"boolean":Array.isArray(G)?"array":G===null?"null":typeof G}function Ef(G){return typeof G=="object"&&G!==null&&!Array.isArray(G)}function Ld(G){return G}function Yf(G,D){let nt=D.type==="color",_t=G.stops&&typeof G.stops[0][0]=="object",Rt=_t||!(_t||G.property!==void 0),Kt=G.type||(Wf(D)?"exponential":"interval");if(nt||D.type==="padding"){let yr=nt?xr.parse:Mn.parse;(G=Mt({},G)).stops&&(G.stops=G.stops.map(Er=>[Er[0],yr(Er[1])])),G.default=yr(G.default?G.default:D.default)}if(G.colorSpace&&(Qt=G.colorSpace)!=="rgb"&&Qt!=="hcl"&&Qt!=="lab")throw new Error(`Unknown color space: "${G.colorSpace}"`);var Qt;let be,Fe,er;if(Kt==="exponential")be=Xf;else if(Kt==="interval")be=Nc;else if(Kt==="categorical"){be=Kf,Fe=Object.create(null);for(let yr of G.stops)Fe[yr[0]]=yr[1];er=typeof G.stops[0][0]}else{if(Kt!=="identity")throw new Error(`Unknown function type "${Kt}"`);be=zu}if(_t){let yr={},Er=[];for(let xn=0;xnxn[0]),evaluate:({zoom:xn},Ln)=>Xf({stops:Zr,base:G.base},D,xn).evaluate(xn,Ln)}}if(Rt){let yr=Kt==="exponential"?{name:"exponential",base:G.base!==void 0?G.base:1}:null;return{kind:"camera",interpolationType:yr,interpolationFactor:Ia.interpolationFactor.bind(void 0,yr),zoomStops:G.stops.map(Er=>Er[0]),evaluate:({zoom:Er})=>be(G,D,Er,Fe,er)}}return{kind:"source",evaluate(yr,Er){let Zr=Er&&Er.properties?Er.properties[G.property]:void 0;return Zr===void 0?_f(G.default,D.default):be(G,D,Zr,Fe,er)}}}function _f(G,D,nt){return G!==void 0?G:D!==void 0?D:nt!==void 0?nt:void 0}function Kf(G,D,nt,_t,Rt){return _f(typeof nt===Rt?_t[nt]:void 0,G.default,D.default)}function Nc(G,D,nt){if(Jl(nt)!=="number")return _f(G.default,D.default);let _t=G.stops.length;if(_t===1||nt<=G.stops[0][0])return G.stops[0][1];if(nt>=G.stops[_t-1][0])return G.stops[_t-1][1];let Rt=En(G.stops.map(Kt=>Kt[0]),nt);return G.stops[Rt][1]}function Xf(G,D,nt){let _t=G.base!==void 0?G.base:1;if(Jl(nt)!=="number")return _f(G.default,D.default);let Rt=G.stops.length;if(Rt===1||nt<=G.stops[0][0])return G.stops[0][1];if(nt>=G.stops[Rt-1][0])return G.stops[Rt-1][1];let Kt=En(G.stops.map(yr=>yr[0]),nt),Qt=function(yr,Er,Zr,sn){let xn=sn-Zr,Ln=yr-Zr;return xn===0?0:Er===1?Ln/xn:(Math.pow(Er,Ln)-1)/(Math.pow(Er,xn)-1)}(nt,_t,G.stops[Kt][0],G.stops[Kt+1][0]),be=G.stops[Kt][1],Fe=G.stops[Kt+1][1],er=Do[D.type]||Ld;return typeof be.evaluate=="function"?{evaluate(...yr){let Er=be.evaluate.apply(void 0,yr),Zr=Fe.evaluate.apply(void 0,yr);if(Er!==void 0&&Zr!==void 0)return er(Er,Zr,Qt,G.colorSpace)}}:er(be,Fe,Qt,G.colorSpace)}function zu(G,D,nt){switch(D.type){case"color":nt=xr.parse(nt);break;case"formatted":nt=wn.fromString(nt.toString());break;case"resolvedImage":nt=Pi.fromString(nt.toString());break;case"padding":nt=Mn.parse(nt);break;default:Jl(nt)===D.type||D.type==="enum"&&D.values[nt]||(nt=void 0)}return _f(nt,G.default,D.default)}lc.register(yf,{error:[{kind:"error"},[He],(G,[D])=>{throw new ze(D.evaluate(G))}],typeof:[He,[jr],(G,[D])=>ne(ui(D.evaluate(G)))],"to-rgba":[$t(Te,4),[cr],(G,[D])=>{let[nt,_t,Rt,Kt]=D.evaluate(G).rgb;return[255*nt,255*_t,255*Rt,Kt]}],rgb:[cr,[Te,Te,Te],hd],rgba:[cr,[Te,Te,Te,Te],hd],has:{type:Ge,overloads:[[[He],(G,[D])=>$f(D.evaluate(G),G.properties())],[[He,ur],(G,[D,nt])=>$f(D.evaluate(G),nt.evaluate(G))]]},get:{type:jr,overloads:[[[He],(G,[D])=>xf(D.evaluate(G),G.properties())],[[He,ur],(G,[D,nt])=>xf(D.evaluate(G),nt.evaluate(G))]]},"feature-state":[jr,[He],(G,[D])=>xf(D.evaluate(G),G.featureState||{})],properties:[ur,[],G=>G.properties()],"geometry-type":[He,[],G=>G.geometryType()],id:[jr,[],G=>G.id()],zoom:[Te,[],G=>G.globals.zoom],"heatmap-density":[Te,[],G=>G.globals.heatmapDensity||0],"line-progress":[Te,[],G=>G.globals.lineProgress||0],accumulated:[jr,[],G=>G.globals.accumulated===void 0?null:G.globals.accumulated],"+":[Te,Vh(Te),(G,D)=>{let nt=0;for(let _t of D)nt+=_t.evaluate(G);return nt}],"*":[Te,Vh(Te),(G,D)=>{let nt=1;for(let _t of D)nt*=_t.evaluate(G);return nt}],"-":{type:Te,overloads:[[[Te,Te],(G,[D,nt])=>D.evaluate(G)-nt.evaluate(G)],[[Te],(G,[D])=>-D.evaluate(G)]]},"/":[Te,[Te,Te],(G,[D,nt])=>D.evaluate(G)/nt.evaluate(G)],"%":[Te,[Te,Te],(G,[D,nt])=>D.evaluate(G)%nt.evaluate(G)],ln2:[Te,[],()=>Math.LN2],pi:[Te,[],()=>Math.PI],e:[Te,[],()=>Math.E],"^":[Te,[Te,Te],(G,[D,nt])=>Math.pow(D.evaluate(G),nt.evaluate(G))],sqrt:[Te,[Te],(G,[D])=>Math.sqrt(D.evaluate(G))],log10:[Te,[Te],(G,[D])=>Math.log(D.evaluate(G))/Math.LN10],ln:[Te,[Te],(G,[D])=>Math.log(D.evaluate(G))],log2:[Te,[Te],(G,[D])=>Math.log(D.evaluate(G))/Math.LN2],sin:[Te,[Te],(G,[D])=>Math.sin(D.evaluate(G))],cos:[Te,[Te],(G,[D])=>Math.cos(D.evaluate(G))],tan:[Te,[Te],(G,[D])=>Math.tan(D.evaluate(G))],asin:[Te,[Te],(G,[D])=>Math.asin(D.evaluate(G))],acos:[Te,[Te],(G,[D])=>Math.acos(D.evaluate(G))],atan:[Te,[Te],(G,[D])=>Math.atan(D.evaluate(G))],min:[Te,Vh(Te),(G,D)=>Math.min(...D.map(nt=>nt.evaluate(G)))],max:[Te,Vh(Te),(G,D)=>Math.max(...D.map(nt=>nt.evaluate(G)))],abs:[Te,[Te],(G,[D])=>Math.abs(D.evaluate(G))],round:[Te,[Te],(G,[D])=>{let nt=D.evaluate(G);return nt<0?-Math.round(-nt):Math.round(nt)}],floor:[Te,[Te],(G,[D])=>Math.floor(D.evaluate(G))],ceil:[Te,[Te],(G,[D])=>Math.ceil(D.evaluate(G))],"filter-==":[Ge,[He,jr],(G,[D,nt])=>G.properties()[D.value]===nt.value],"filter-id-==":[Ge,[jr],(G,[D])=>G.id()===D.value],"filter-type-==":[Ge,[He],(G,[D])=>G.geometryType()===D.value],"filter-<":[Ge,[He,jr],(G,[D,nt])=>{let _t=G.properties()[D.value],Rt=nt.value;return typeof _t==typeof Rt&&_t{let nt=G.id(),_t=D.value;return typeof nt==typeof _t&&nt<_t}],"filter->":[Ge,[He,jr],(G,[D,nt])=>{let _t=G.properties()[D.value],Rt=nt.value;return typeof _t==typeof Rt&&_t>Rt}],"filter-id->":[Ge,[jr],(G,[D])=>{let nt=G.id(),_t=D.value;return typeof nt==typeof _t&&nt>_t}],"filter-<=":[Ge,[He,jr],(G,[D,nt])=>{let _t=G.properties()[D.value],Rt=nt.value;return typeof _t==typeof Rt&&_t<=Rt}],"filter-id-<=":[Ge,[jr],(G,[D])=>{let nt=G.id(),_t=D.value;return typeof nt==typeof _t&&nt<=_t}],"filter->=":[Ge,[He,jr],(G,[D,nt])=>{let _t=G.properties()[D.value],Rt=nt.value;return typeof _t==typeof Rt&&_t>=Rt}],"filter-id->=":[Ge,[jr],(G,[D])=>{let nt=G.id(),_t=D.value;return typeof nt==typeof _t&&nt>=_t}],"filter-has":[Ge,[jr],(G,[D])=>D.value in G.properties()],"filter-has-id":[Ge,[],G=>G.id()!==null&&G.id()!==void 0],"filter-type-in":[Ge,[$t(He)],(G,[D])=>D.value.indexOf(G.geometryType())>=0],"filter-id-in":[Ge,[$t(jr)],(G,[D])=>D.value.indexOf(G.id())>=0],"filter-in-small":[Ge,[He,$t(jr)],(G,[D,nt])=>nt.value.indexOf(G.properties()[D.value])>=0],"filter-in-large":[Ge,[He,$t(jr)],(G,[D,nt])=>function(_t,Rt,Kt,Qt){for(;Kt<=Qt;){let be=Kt+Qt>>1;if(Rt[be]===_t)return!0;Rt[be]>_t?Qt=be-1:Kt=be+1}return!1}(G.properties()[D.value],nt.value,0,nt.value.length-1)],all:{type:Ge,overloads:[[[Ge,Ge],(G,[D,nt])=>D.evaluate(G)&&nt.evaluate(G)],[Vh(Ge),(G,D)=>{for(let nt of D)if(!nt.evaluate(G))return!1;return!0}]]},any:{type:Ge,overloads:[[[Ge,Ge],(G,[D,nt])=>D.evaluate(G)||nt.evaluate(G)],[Vh(Ge),(G,D)=>{for(let nt of D)if(nt.evaluate(G))return!0;return!1}]]},"!":[Ge,[Ge],(G,[D])=>!D.evaluate(G)],"is-supported-script":[Ge,[He],(G,[D])=>{let nt=G.globals&&G.globals.isSupportedScript;return!nt||nt(D.evaluate(G))}],upcase:[He,[He],(G,[D])=>D.evaluate(G).toUpperCase()],downcase:[He,[He],(G,[D])=>D.evaluate(G).toLowerCase()],concat:[He,Vh(jr),(G,D)=>D.map(nt=>Pa(nt.evaluate(G))).join("")],"resolved-locale":[He,[Hr],(G,[D])=>D.evaluate(G).resolvedLocale()]});class jc{constructor(D,nt){var _t;this.expression=D,this._warningHistory={},this._evaluator=new Gr,this._defaultValue=nt?(_t=nt).type==="color"&&Ef(_t.default)?new xr(0,0,0,0):_t.type==="color"?xr.parse(_t.default)||null:_t.type==="padding"?Mn.parse(_t.default)||null:_t.type==="variableAnchorOffsetCollection"?xi.parse(_t.default)||null:_t.default===void 0?null:_t.default:null,this._enumValues=nt&&nt.type==="enum"?nt.values:null}evaluateWithoutErrorHandling(D,nt,_t,Rt,Kt,Qt){return this._evaluator.globals=D,this._evaluator.feature=nt,this._evaluator.featureState=_t,this._evaluator.canonical=Rt,this._evaluator.availableImages=Kt||null,this._evaluator.formattedSection=Qt,this.expression.evaluate(this._evaluator)}evaluate(D,nt,_t,Rt,Kt,Qt){this._evaluator.globals=D,this._evaluator.feature=nt||null,this._evaluator.featureState=_t||null,this._evaluator.canonical=Rt,this._evaluator.availableImages=Kt||null,this._evaluator.formattedSection=Qt||null;try{let be=this.expression.evaluate(this._evaluator);if(be==null||typeof be=="number"&&be!=be)return this._defaultValue;if(this._enumValues&&!(be in this._enumValues))throw new ze(`Expected value to be one of ${Object.keys(this._enumValues).map(Fe=>JSON.stringify(Fe)).join(", ")}, but found ${JSON.stringify(be)} instead.`);return be}catch(be){return this._warningHistory[be.message]||(this._warningHistory[be.message]=!0,typeof console<"u"&&console.warn(be.message)),this._defaultValue}}}function Hh(G){return Array.isArray(G)&&G.length>0&&typeof G[0]=="string"&&G[0]in yf}function lu(G,D){let nt=new dn(yf,Vf,[],D?function(Rt){let Kt={color:cr,string:He,number:Te,enum:He,boolean:Ge,formatted:br,padding:Kr,resolvedImage:rn,variableAnchorOffsetCollection:Ce};return Rt.type==="array"?$t(Kt[Rt.value]||jr,Rt.length):Kt[Rt.type]}(D):void 0),_t=nt.parse(G,void 0,void 0,void 0,D&&D.type==="string"?{typeAnnotation:"coerce"}:void 0);return _t?Sh(new jc(_t,D)):mh(nt.errors)}class Eh{constructor(D,nt){this.kind=D,this._styleExpression=nt,this.isStateDependent=D!=="constant"&&!lh(nt.expression)}evaluateWithoutErrorHandling(D,nt,_t,Rt,Kt,Qt){return this._styleExpression.evaluateWithoutErrorHandling(D,nt,_t,Rt,Kt,Qt)}evaluate(D,nt,_t,Rt,Kt,Qt){return this._styleExpression.evaluate(D,nt,_t,Rt,Kt,Qt)}}class Sc{constructor(D,nt,_t,Rt){this.kind=D,this.zoomStops=_t,this._styleExpression=nt,this.isStateDependent=D!=="camera"&&!lh(nt.expression),this.interpolationType=Rt}evaluateWithoutErrorHandling(D,nt,_t,Rt,Kt,Qt){return this._styleExpression.evaluateWithoutErrorHandling(D,nt,_t,Rt,Kt,Qt)}evaluate(D,nt,_t,Rt,Kt,Qt){return this._styleExpression.evaluate(D,nt,_t,Rt,Kt,Qt)}interpolationFactor(D,nt,_t){return this.interpolationType?Ia.interpolationFactor(this.interpolationType,D,nt,_t):0}}function Uc(G,D){let nt=lu(G,D);if(nt.result==="error")return nt;let _t=nt.value.expression,Rt=Hf(_t);if(!Rt&&!uc(D))return mh([new te("","data expressions not supported")]);let Kt=Gf(_t,["zoom"]);if(!Kt&&!ef(D))return mh([new te("","zoom expressions not supported")]);let Qt=uf(_t);return Qt||Kt?Qt instanceof te?mh([Qt]):Qt instanceof Ia&&!Wf(D)?mh([new te("",'"interpolate" expressions cannot be used with this property')]):Sh(Qt?new Sc(Rt?"camera":"composite",nt.value,Qt.labels,Qt instanceof Ia?Qt.interpolation:void 0):new Eh(Rt?"constant":"source",nt.value)):mh([new te("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class _u{constructor(D,nt){this._parameters=D,this._specification=nt,Mt(this,Yf(this._parameters,this._specification))}static deserialize(D){return new _u(D._parameters,D._specification)}static serialize(D){return{_parameters:D._parameters,_specification:D._specification}}}function uf(G){let D=null;if(G instanceof an)D=uf(G.result);else if(G instanceof is){for(let nt of G.args)if(D=uf(nt),D)break}else(G instanceof Zn||G instanceof Ia)&&G.input instanceof lc&&G.input.name==="zoom"&&(D=G);return D instanceof te||G.eachChild(nt=>{let _t=uf(nt);_t instanceof te?D=_t:!D&&_t?D=new te("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):D&&_t&&D!==_t&&(D=new te("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),D}function gh(G){if(G===!0||G===!1)return!0;if(!Array.isArray(G)||G.length===0)return!1;switch(G[0]){case"has":return G.length>=2&&G[1]!=="$id"&&G[1]!=="$type";case"in":return G.length>=3&&(typeof G[1]!="string"||Array.isArray(G[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return G.length!==3||Array.isArray(G[1])||Array.isArray(G[2]);case"any":case"all":for(let D of G.slice(1))if(!gh(D)&&typeof D!="boolean")return!1;return!0;default:return!0}}let Wh={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Cf(G){if(G==null)return{filter:()=>!0,needGeometry:!1};gh(G)||(G=cf(G));let D=lu(G,Wh);if(D.result==="error")throw new Error(D.value.map(nt=>`${nt.key}: ${nt.message}`).join(", "));return{filter:(nt,_t,Rt)=>D.value.evaluate(nt,_t,{},Rt),needGeometry:Qd(G)}}function Pd(G,D){return GD?1:0}function Qd(G){if(!Array.isArray(G))return!1;if(G[0]==="within"||G[0]==="distance")return!0;for(let D=1;D"||D==="<="||D===">="?Lf(G[1],G[2],D):D==="any"?(nt=G.slice(1),["any"].concat(nt.map(cf))):D==="all"?["all"].concat(G.slice(1).map(cf)):D==="none"?["all"].concat(G.slice(1).map(cf).map(Qc)):D==="in"?wc(G[1],G.slice(2)):D==="!in"?Qc(wc(G[1],G.slice(2))):D==="has"?hf(G[1]):D!=="!has"||Qc(hf(G[1]));var nt}function Lf(G,D,nt){switch(G){case"$type":return[`filter-type-${nt}`,D];case"$id":return[`filter-id-${nt}`,D];default:return[`filter-${nt}`,G,D]}}function wc(G,D){if(D.length===0)return!1;switch(G){case"$type":return["filter-type-in",["literal",D]];case"$id":return["filter-id-in",["literal",D]];default:return D.length>200&&!D.some(nt=>typeof nt!=typeof D[0])?["filter-in-large",G,["literal",D.sort(Pd)]]:["filter-in-small",G,["literal",D]]}}function hf(G){switch(G){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",G]}}function Qc(G){return["!",G]}function ff(G){let D=typeof G;if(D==="number"||D==="boolean"||D==="string"||G==null)return JSON.stringify(G);if(Array.isArray(G)){let Rt="[";for(let Kt of G)Rt+=`${ff(Kt)},`;return`${Rt}]`}let nt=Object.keys(G).sort(),_t="{";for(let Rt=0;Rt_t.maximum?[new Lt(D,nt,`${nt} is greater than the maximum value ${_t.maximum}`)]:[]}function bf(G){let D=G.valueSpec,nt=bu(G.value.type),_t,Rt,Kt,Qt={},be=nt!=="categorical"&&G.value.property===void 0,Fe=!be,er=Jl(G.value.stops)==="array"&&Jl(G.value.stops[0])==="array"&&Jl(G.value.stops[0][0])==="object",yr=Vc({key:G.key,value:G.value,valueSpec:G.styleSpec.function,validateSpec:G.validateSpec,style:G.style,styleSpec:G.styleSpec,objectElementValidators:{stops:function(sn){if(nt==="identity")return[new Lt(sn.key,sn.value,'identity function may not have a "stops" property')];let xn=[],Ln=sn.value;return xn=xn.concat(fd({key:sn.key,value:Ln,valueSpec:sn.valueSpec,validateSpec:sn.validateSpec,style:sn.style,styleSpec:sn.styleSpec,arrayElementValidator:Er})),Jl(Ln)==="array"&&Ln.length===0&&xn.push(new Lt(sn.key,Ln,"array must have at least one stop")),xn},default:function(sn){return sn.validateSpec({key:sn.key,value:sn.value,valueSpec:D,validateSpec:sn.validateSpec,style:sn.style,styleSpec:sn.styleSpec})}}});return nt==="identity"&&be&&yr.push(new Lt(G.key,G.value,'missing required property "property"')),nt==="identity"||G.value.stops||yr.push(new Lt(G.key,G.value,'missing required property "stops"')),nt==="exponential"&&G.valueSpec.expression&&!Wf(G.valueSpec)&&yr.push(new Lt(G.key,G.value,"exponential functions not supported")),G.styleSpec.$version>=8&&(Fe&&!uc(G.valueSpec)?yr.push(new Lt(G.key,G.value,"property functions not supported")):be&&!ef(G.valueSpec)&&yr.push(new Lt(G.key,G.value,"zoom functions not supported"))),nt!=="categorical"&&!er||G.value.property!==void 0||yr.push(new Lt(G.key,G.value,'"property" property is required')),yr;function Er(sn){let xn=[],Ln=sn.value,$n=sn.key;if(Jl(Ln)!=="array")return[new Lt($n,Ln,`array expected, ${Jl(Ln)} found`)];if(Ln.length!==2)return[new Lt($n,Ln,`array length 2 expected, length ${Ln.length} found`)];if(er){if(Jl(Ln[0])!=="object")return[new Lt($n,Ln,`object expected, ${Jl(Ln[0])} found`)];if(Ln[0].zoom===void 0)return[new Lt($n,Ln,"object stop key must have zoom")];if(Ln[0].value===void 0)return[new Lt($n,Ln,"object stop key must have value")];if(Kt&&Kt>bu(Ln[0].zoom))return[new Lt($n,Ln[0].zoom,"stop zoom values must appear in ascending order")];bu(Ln[0].zoom)!==Kt&&(Kt=bu(Ln[0].zoom),Rt=void 0,Qt={}),xn=xn.concat(Vc({key:`${$n}[0]`,value:Ln[0],valueSpec:{zoom:{}},validateSpec:sn.validateSpec,style:sn.style,styleSpec:sn.styleSpec,objectElementValidators:{zoom:vu,value:Zr}}))}else xn=xn.concat(Zr({key:`${$n}[0]`,value:Ln[0],validateSpec:sn.validateSpec,style:sn.style,styleSpec:sn.styleSpec},Ln));return Hh(Ch(Ln[1]))?xn.concat([new Lt(`${$n}[1]`,Ln[1],"expressions are not allowed in function stops.")]):xn.concat(sn.validateSpec({key:`${$n}[1]`,value:Ln[1],valueSpec:D,validateSpec:sn.validateSpec,style:sn.style,styleSpec:sn.styleSpec}))}function Zr(sn,xn){let Ln=Jl(sn.value),$n=bu(sn.value),ki=sn.value!==null?sn.value:xn;if(_t){if(Ln!==_t)return[new Lt(sn.key,ki,`${Ln} stop domain type must match previous stop domain type ${_t}`)]}else _t=Ln;if(Ln!=="number"&&Ln!=="string"&&Ln!=="boolean")return[new Lt(sn.key,ki,"stop domain value must be a number, string, or boolean")];if(Ln!=="number"&&nt!=="categorical"){let Aa=`number expected, ${Ln} found`;return uc(D)&&nt===void 0&&(Aa+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Lt(sn.key,ki,Aa)]}return nt!=="categorical"||Ln!=="number"||isFinite($n)&&Math.floor($n)===$n?nt!=="categorical"&&Ln==="number"&&Rt!==void 0&&$nnew Lt(`${G.key}${_t.key}`,G.value,_t.message));let nt=D.value.expression||D.value._styleExpression.expression;if(G.expressionContext==="property"&&G.propertyKey==="text-font"&&!nt.outputDefined())return[new Lt(G.key,G.value,`Invalid data expression for "${G.propertyKey}". Output values must be contained as literals within the expression.`)];if(G.expressionContext==="property"&&G.propertyType==="layout"&&!lh(nt))return[new Lt(G.key,G.value,'"feature-state" data expressions are not supported with layout properties.')];if(G.expressionContext==="filter"&&!lh(nt))return[new Lt(G.key,G.value,'"feature-state" data expressions are not supported with filters.')];if(G.expressionContext&&G.expressionContext.indexOf("cluster")===0){if(!Gf(nt,["zoom","feature-state"]))return[new Lt(G.key,G.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(G.expressionContext==="cluster-initial"&&!Hf(nt))return[new Lt(G.key,G.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function th(G){let D=G.key,nt=G.value,_t=G.valueSpec,Rt=[];return Array.isArray(_t.values)?_t.values.indexOf(bu(nt))===-1&&Rt.push(new Lt(D,nt,`expected one of [${_t.values.join(", ")}], ${JSON.stringify(nt)} found`)):Object.keys(_t.values).indexOf(bu(nt))===-1&&Rt.push(new Lt(D,nt,`expected one of [${Object.keys(_t.values).join(", ")}], ${JSON.stringify(nt)} found`)),Rt}function rf(G){return gh(Ch(G.value))?qh(Mt({},G,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Zh(G)}function Zh(G){let D=G.value,nt=G.key;if(Jl(D)!=="array")return[new Lt(nt,D,`array expected, ${Jl(D)} found`)];let _t=G.styleSpec,Rt,Kt=[];if(D.length<1)return[new Lt(nt,D,"filter array must have at least 1 element")];switch(Kt=Kt.concat(th({key:`${nt}[0]`,value:D[0],valueSpec:_t.filter_operator,style:G.style,styleSpec:G.styleSpec})),bu(D[0])){case"<":case"<=":case">":case">=":D.length>=2&&bu(D[1])==="$type"&&Kt.push(new Lt(nt,D,`"$type" cannot be use with operator "${D[0]}"`));case"==":case"!=":D.length!==3&&Kt.push(new Lt(nt,D,`filter array for operator "${D[0]}" must have 3 elements`));case"in":case"!in":D.length>=2&&(Rt=Jl(D[1]),Rt!=="string"&&Kt.push(new Lt(`${nt}[1]`,D[1],`string expected, ${Rt} found`)));for(let Qt=2;Qt{er in nt&&D.push(new Lt(_t,nt[er],`"${er}" is prohibited for ref layers`))}),Rt.layers.forEach(er=>{bu(er.id)===be&&(Fe=er)}),Fe?Fe.ref?D.push(new Lt(_t,nt.ref,"ref cannot reference another ref layer")):Qt=bu(Fe.type):D.push(new Lt(_t,nt.ref,`ref layer "${be}" not found`))}else if(Qt!=="background")if(nt.source){let Fe=Rt.sources&&Rt.sources[nt.source],er=Fe&&bu(Fe.type);Fe?er==="vector"&&Qt==="raster"?D.push(new Lt(_t,nt.source,`layer "${nt.id}" requires a raster source`)):er!=="raster-dem"&&Qt==="hillshade"?D.push(new Lt(_t,nt.source,`layer "${nt.id}" requires a raster-dem source`)):er==="raster"&&Qt!=="raster"?D.push(new Lt(_t,nt.source,`layer "${nt.id}" requires a vector source`)):er!=="vector"||nt["source-layer"]?er==="raster-dem"&&Qt!=="hillshade"?D.push(new Lt(_t,nt.source,"raster-dem source can only be used with layer type 'hillshade'.")):Qt!=="line"||!nt.paint||!nt.paint["line-gradient"]||er==="geojson"&&Fe.lineMetrics||D.push(new Lt(_t,nt,`layer "${nt.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):D.push(new Lt(_t,nt,`layer "${nt.id}" must specify a "source-layer"`)):D.push(new Lt(_t,nt.source,`source "${nt.source}" not found`))}else D.push(new Lt(_t,nt,'missing required property "source"'));return D=D.concat(Vc({key:_t,value:nt,valueSpec:Kt.layer,style:G.style,styleSpec:G.styleSpec,validateSpec:G.validateSpec,objectElementValidators:{"*":()=>[],type:()=>G.validateSpec({key:`${_t}.type`,value:nt.type,valueSpec:Kt.layer.type,style:G.style,styleSpec:G.styleSpec,validateSpec:G.validateSpec,object:nt,objectKey:"type"}),filter:rf,layout:Fe=>Vc({layer:nt,key:Fe.key,value:Fe.value,style:Fe.style,styleSpec:Fe.styleSpec,validateSpec:Fe.validateSpec,objectElementValidators:{"*":er=>gc(Mt({layerType:Qt},er))}}),paint:Fe=>Vc({layer:nt,key:Fe.key,value:Fe.value,style:Fe.style,styleSpec:Fe.styleSpec,validateSpec:Fe.validateSpec,objectElementValidators:{"*":er=>zd(Mt({layerType:Qt},er))}})}})),D}function eh(G){let D=G.value,nt=G.key,_t=Jl(D);return _t!=="string"?[new Lt(nt,D,`string expected, ${_t} found`)]:[]}let Lh={promoteId:function({key:G,value:D}){if(Jl(D)==="string")return eh({key:G,value:D});{let nt=[];for(let _t in D)nt.push(...eh({key:`${G}.${_t}`,value:D[_t]}));return nt}}};function yh(G){let D=G.value,nt=G.key,_t=G.styleSpec,Rt=G.style,Kt=G.validateSpec;if(!D.type)return[new Lt(nt,D,'"type" is required')];let Qt=bu(D.type),be;switch(Qt){case"vector":case"raster":return be=Vc({key:nt,value:D,valueSpec:_t[`source_${Qt.replace("-","_")}`],style:G.style,styleSpec:_t,objectElementValidators:Lh,validateSpec:Kt}),be;case"raster-dem":return be=function(Fe){var er;let yr=(er=Fe.sourceName)!==null&&er!==void 0?er:"",Er=Fe.value,Zr=Fe.styleSpec,sn=Zr.source_raster_dem,xn=Fe.style,Ln=[],$n=Jl(Er);if(Er===void 0)return Ln;if($n!=="object")return Ln.push(new Lt("source_raster_dem",Er,`object expected, ${$n} found`)),Ln;let ki=bu(Er.encoding)==="custom",Aa=["redFactor","greenFactor","blueFactor","baseShift"],Xi=Fe.value.encoding?`"${Fe.value.encoding}"`:"Default";for(let ma in Er)!ki&&Aa.includes(ma)?Ln.push(new Lt(ma,Er[ma],`In "${yr}": "${ma}" is only valid when "encoding" is set to "custom". ${Xi} encoding found`)):sn[ma]?Ln=Ln.concat(Fe.validateSpec({key:ma,value:Er[ma],valueSpec:sn[ma],validateSpec:Fe.validateSpec,style:xn,styleSpec:Zr})):Ln.push(new Lt(ma,Er[ma],`unknown property "${ma}"`));return Ln}({sourceName:nt,value:D,style:G.style,styleSpec:_t,validateSpec:Kt}),be;case"geojson":if(be=Vc({key:nt,value:D,valueSpec:_t.source_geojson,style:Rt,styleSpec:_t,validateSpec:Kt,objectElementValidators:Lh}),D.cluster)for(let Fe in D.clusterProperties){let[er,yr]=D.clusterProperties[Fe],Er=typeof er=="string"?[er,["accumulated"],["get",Fe]]:er;be.push(...qh({key:`${nt}.${Fe}.map`,value:yr,expressionContext:"cluster-map"})),be.push(...qh({key:`${nt}.${Fe}.reduce`,value:Er,expressionContext:"cluster-reduce"}))}return be;case"video":return Vc({key:nt,value:D,valueSpec:_t.source_video,style:Rt,validateSpec:Kt,styleSpec:_t});case"image":return Vc({key:nt,value:D,valueSpec:_t.source_image,style:Rt,validateSpec:Kt,styleSpec:_t});case"canvas":return[new Lt(nt,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return th({key:`${nt}.type`,value:D.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Ru(G){let D=G.value,nt=G.styleSpec,_t=nt.light,Rt=G.style,Kt=[],Qt=Jl(D);if(D===void 0)return Kt;if(Qt!=="object")return Kt=Kt.concat([new Lt("light",D,`object expected, ${Qt} found`)]),Kt;for(let be in D){let Fe=be.match(/^(.*)-transition$/);Kt=Kt.concat(Fe&&_t[Fe[1]]&&_t[Fe[1]].transition?G.validateSpec({key:be,value:D[be],valueSpec:nt.transition,validateSpec:G.validateSpec,style:Rt,styleSpec:nt}):_t[be]?G.validateSpec({key:be,value:D[be],valueSpec:_t[be],validateSpec:G.validateSpec,style:Rt,styleSpec:nt}):[new Lt(be,D[be],`unknown property "${be}"`)])}return Kt}function eu(G){let D=G.value,nt=G.styleSpec,_t=nt.sky,Rt=G.style,Kt=Jl(D);if(D===void 0)return[];if(Kt!=="object")return[new Lt("sky",D,`object expected, ${Kt} found`)];let Qt=[];for(let be in D)Qt=Qt.concat(_t[be]?G.validateSpec({key:be,value:D[be],valueSpec:_t[be],style:Rt,styleSpec:nt}):[new Lt(be,D[be],`unknown property "${be}"`)]);return Qt}function xh(G){let D=G.value,nt=G.styleSpec,_t=nt.terrain,Rt=G.style,Kt=[],Qt=Jl(D);if(D===void 0)return Kt;if(Qt!=="object")return Kt=Kt.concat([new Lt("terrain",D,`object expected, ${Qt} found`)]),Kt;for(let be in D)Kt=Kt.concat(_t[be]?G.validateSpec({key:be,value:D[be],valueSpec:_t[be],validateSpec:G.validateSpec,style:Rt,styleSpec:nt}):[new Lt(be,D[be],`unknown property "${be}"`)]);return Kt}function df(G){let D=[],nt=G.value,_t=G.key;if(Array.isArray(nt)){let Rt=[],Kt=[];for(let Qt in nt)nt[Qt].id&&Rt.includes(nt[Qt].id)&&D.push(new Lt(_t,nt,`all the sprites' ids must be unique, but ${nt[Qt].id} is duplicated`)),Rt.push(nt[Qt].id),nt[Qt].url&&Kt.includes(nt[Qt].url)&&D.push(new Lt(_t,nt,`all the sprites' URLs must be unique, but ${nt[Qt].url} is duplicated`)),Kt.push(nt[Qt].url),D=D.concat(Vc({key:`${_t}[${Qt}]`,value:nt[Qt],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:G.validateSpec}));return D}return eh({key:_t,value:nt})}let _h={"*":()=>[],array:fd,boolean:function(G){let D=G.value,nt=G.key,_t=Jl(D);return _t!=="boolean"?[new Lt(nt,D,`boolean expected, ${_t} found`)]:[]},number:vu,color:function(G){let D=G.key,nt=G.value,_t=Jl(nt);return _t!=="string"?[new Lt(D,nt,`color expected, ${_t} found`)]:xr.parse(String(nt))?[]:[new Lt(D,nt,`color expected, "${nt}" found`)]},constants:vh,enum:th,filter:rf,function:bf,layer:Jf,object:Vc,source:yh,light:Ru,sky:eu,terrain:xh,projection:function(G){let D=G.value,nt=G.styleSpec,_t=nt.projection,Rt=G.style,Kt=Jl(D);if(D===void 0)return[];if(Kt!=="object")return[new Lt("projection",D,`object expected, ${Kt} found`)];let Qt=[];for(let be in D)Qt=Qt.concat(_t[be]?G.validateSpec({key:be,value:D[be],valueSpec:_t[be],style:Rt,styleSpec:nt}):[new Lt(be,D[be],`unknown property "${be}"`)]);return Qt},string:eh,formatted:function(G){return eh(G).length===0?[]:qh(G)},resolvedImage:function(G){return eh(G).length===0?[]:qh(G)},padding:function(G){let D=G.key,nt=G.value;if(Jl(nt)==="array"){if(nt.length<1||nt.length>4)return[new Lt(D,nt,`padding requires 1 to 4 values; ${nt.length} values found`)];let _t={type:"number"},Rt=[];for(let Kt=0;Kt[]}})),G.constants&&(nt=nt.concat(vh({key:"constants",value:G.constants}))),cn(nt)}function _n(G){return function(D){return G(zr(Fr({},D),{validateSpec:qf}))}}function cn(G){return[].concat(G).sort((D,nt)=>D.line-nt.line)}function Wn(G){return function(...D){return cn(G.apply(this,D))}}Ur.source=Wn(_n(yh)),Ur.sprite=Wn(_n(df)),Ur.glyphs=Wn(_n(mr)),Ur.light=Wn(_n(Ru)),Ur.sky=Wn(_n(eu)),Ur.terrain=Wn(_n(xh)),Ur.layer=Wn(_n(Jf)),Ur.filter=Wn(_n(rf)),Ur.paintProperty=Wn(_n(zd)),Ur.layoutProperty=Wn(_n(gc));let hi=Ur,ea=hi.light,ga=hi.sky,Ra=hi.paintProperty,$a=hi.layoutProperty;function ua(G,D){let nt=!1;if(D&&D.length)for(let _t of D)G.fire(new Y(new Error(_t.message))),nt=!0;return nt}class za{constructor(D,nt,_t){let Rt=this.cells=[];if(D instanceof ArrayBuffer){this.arrayBuffer=D;let Qt=new Int32Array(this.arrayBuffer);D=Qt[0],this.d=(nt=Qt[1])+2*(_t=Qt[2]);for(let Fe=0;Fe=Er[xn+0]&&Rt>=Er[xn+1])?(be[sn]=!0,Qt.push(yr[sn])):be[sn]=!1}}}}_forEachCell(D,nt,_t,Rt,Kt,Qt,be,Fe){let er=this._convertToCellCoord(D),yr=this._convertToCellCoord(nt),Er=this._convertToCellCoord(_t),Zr=this._convertToCellCoord(Rt);for(let sn=er;sn<=Er;sn++)for(let xn=yr;xn<=Zr;xn++){let Ln=this.d*xn+sn;if((!Fe||Fe(this._convertFromCellCoord(sn),this._convertFromCellCoord(xn),this._convertFromCellCoord(sn+1),this._convertFromCellCoord(xn+1)))&&Kt.call(this,D,nt,_t,Rt,Ln,Qt,be,Fe))return}}_convertFromCellCoord(D){return(D-this.padding)/this.scale}_convertToCellCoord(D){return Math.max(0,Math.min(this.d-1,Math.floor(D*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let D=this.cells,nt=3+this.cells.length+1+1,_t=0;for(let Qt=0;Qt=0)continue;let Qt=G[Kt];Rt[Kt]=wa[nt].shallow.indexOf(Kt)>=0?Qt:os(Qt,D)}G instanceof Error&&(Rt.message=G.message)}if(Rt.$name)throw new Error("$name property is reserved for worker serialization logic.");return nt!=="Object"&&(Rt.$name=nt),Rt}function fs(G){if(Zo(G))return G;if(Array.isArray(G))return G.map(fs);if(typeof G!="object")throw new Error("can't deserialize object of type "+typeof G);let D=rs(G)||"Object";if(!wa[D])throw new Error(`can't deserialize unregistered class ${D}`);let{klass:nt}=wa[D];if(!nt)throw new Error(`can't deserialize unregistered class ${D}`);if(nt.deserialize)return nt.deserialize(G);let _t=Object.create(nt.prototype);for(let Rt of Object.keys(G)){if(Rt==="$name")continue;let Kt=G[Rt];_t[Rt]=wa[D].shallow.indexOf(Rt)>=0?Kt:fs(Kt)}return _t}class no{constructor(){this.first=!0}update(D,nt){let _t=Math.floor(D);return this.first?(this.first=!1,this.lastIntegerZoom=_t,this.lastIntegerZoomTime=0,this.lastZoom=D,this.lastFloorZoom=_t,!0):(this.lastFloorZoom>_t?(this.lastIntegerZoom=_t+1,this.lastIntegerZoomTime=nt):this.lastFloorZoom<_t&&(this.lastIntegerZoom=_t,this.lastIntegerZoomTime=nt),D!==this.lastZoom&&(this.lastZoom=D,this.lastFloorZoom=_t,!0))}}let qa={"Latin-1 Supplement":G=>G>=128&&G<=255,"Hangul Jamo":G=>G>=4352&&G<=4607,Khmer:G=>G>=6016&&G<=6143,"General Punctuation":G=>G>=8192&&G<=8303,"Letterlike Symbols":G=>G>=8448&&G<=8527,"Number Forms":G=>G>=8528&&G<=8591,"Miscellaneous Technical":G=>G>=8960&&G<=9215,"Control Pictures":G=>G>=9216&&G<=9279,"Optical Character Recognition":G=>G>=9280&&G<=9311,"Enclosed Alphanumerics":G=>G>=9312&&G<=9471,"Geometric Shapes":G=>G>=9632&&G<=9727,"Miscellaneous Symbols":G=>G>=9728&&G<=9983,"Miscellaneous Symbols and Arrows":G=>G>=11008&&G<=11263,"Ideographic Description Characters":G=>G>=12272&&G<=12287,"CJK Symbols and Punctuation":G=>G>=12288&&G<=12351,Katakana:G=>G>=12448&&G<=12543,Kanbun:G=>G>=12688&&G<=12703,"CJK Strokes":G=>G>=12736&&G<=12783,"Enclosed CJK Letters and Months":G=>G>=12800&&G<=13055,"CJK Compatibility":G=>G>=13056&&G<=13311,"Yijing Hexagram Symbols":G=>G>=19904&&G<=19967,"Private Use Area":G=>G>=57344&&G<=63743,"Vertical Forms":G=>G>=65040&&G<=65055,"CJK Compatibility Forms":G=>G>=65072&&G<=65103,"Small Form Variants":G=>G>=65104&&G<=65135,"Halfwidth and Fullwidth Forms":G=>G>=65280&&G<=65519};function ds(G){for(let D of G)if(ml(D.charCodeAt(0)))return!0;return!1}function tl(G){for(let D of G)if(!Hl(D.charCodeAt(0)))return!1;return!0}function Pl(G){let D=G.map(nt=>{try{return new RegExp(`\\p{sc=${nt}}`,"u").source}catch{return null}}).filter(nt=>nt);return new RegExp(D.join("|"),"u")}let iu=Pl(["Arab","Dupl","Mong","Ougr","Syrc"]);function Hl(G){return!iu.test(String.fromCodePoint(G))}let au=Pl(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function ml(G){return!(G!==746&&G!==747&&(G<4352||!(qa["CJK Compatibility Forms"](G)&&!(G>=65097&&G<=65103)||qa["CJK Compatibility"](G)||qa["CJK Strokes"](G)||!(!qa["CJK Symbols and Punctuation"](G)||G>=12296&&G<=12305||G>=12308&&G<=12319||G===12336)||qa["Enclosed CJK Letters and Months"](G)||qa["Ideographic Description Characters"](G)||qa.Kanbun(G)||qa.Katakana(G)&&G!==12540||!(!qa["Halfwidth and Fullwidth Forms"](G)||G===65288||G===65289||G===65293||G>=65306&&G<=65310||G===65339||G===65341||G===65343||G>=65371&&G<=65503||G===65507||G>=65512&&G<=65519)||!(!qa["Small Form Variants"](G)||G>=65112&&G<=65118||G>=65123&&G<=65126)||qa["Vertical Forms"](G)||qa["Yijing Hexagram Symbols"](G)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(G))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(G))||au.test(String.fromCodePoint(G)))))}function qu(G){return!(ml(G)||function(D){return!!(qa["Latin-1 Supplement"](D)&&(D===167||D===169||D===174||D===177||D===188||D===189||D===190||D===215||D===247)||qa["General Punctuation"](D)&&(D===8214||D===8224||D===8225||D===8240||D===8241||D===8251||D===8252||D===8258||D===8263||D===8264||D===8265||D===8273)||qa["Letterlike Symbols"](D)||qa["Number Forms"](D)||qa["Miscellaneous Technical"](D)&&(D>=8960&&D<=8967||D>=8972&&D<=8991||D>=8996&&D<=9e3||D===9003||D>=9085&&D<=9114||D>=9150&&D<=9165||D===9167||D>=9169&&D<=9179||D>=9186&&D<=9215)||qa["Control Pictures"](D)&&D!==9251||qa["Optical Character Recognition"](D)||qa["Enclosed Alphanumerics"](D)||qa["Geometric Shapes"](D)||qa["Miscellaneous Symbols"](D)&&!(D>=9754&&D<=9759)||qa["Miscellaneous Symbols and Arrows"](D)&&(D>=11026&&D<=11055||D>=11088&&D<=11097||D>=11192&&D<=11243)||qa["CJK Symbols and Punctuation"](D)||qa.Katakana(D)||qa["Private Use Area"](D)||qa["CJK Compatibility Forms"](D)||qa["Small Form Variants"](D)||qa["Halfwidth and Fullwidth Forms"](D)||D===8734||D===8756||D===8757||D>=9984&&D<=10087||D>=10102&&D<=10131||D===65532||D===65533)}(G))}let Lu=Pl(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function uu(G){return Lu.test(String.fromCodePoint(G))}function zo(G,D){return!(!D&&uu(G)||G>=2304&&G<=3583||G>=3840&&G<=4255||qa.Khmer(G))}function Ms(G){for(let D of G)if(uu(D.charCodeAt(0)))return!0;return!1}let $l=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(G){this.pluginStatus=G.pluginStatus,this.pluginURL=G.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(G){this.applyArabicShaping=G.applyArabicShaping,this.processBidirectionalText=G.processBidirectionalText,this.processStyledBidirectionalText=G.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Fl{constructor(D,nt){this.zoom=D,nt?(this.now=nt.now,this.fadeDuration=nt.fadeDuration,this.zoomHistory=nt.zoomHistory,this.transition=nt.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new no,this.transition={})}isSupportedScript(D){return function(nt,_t){for(let Rt of nt)if(!zo(Rt.charCodeAt(0),_t))return!1;return!0}(D,$l.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let D=this.zoom,nt=D-Math.floor(D),_t=this.crossFadingFactor();return D>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:nt+(1-nt)*_t}:{fromScale:.5,toScale:1,t:1-(1-_t)*nt}}}class vc{constructor(D,nt){this.property=D,this.value=nt,this.expression=function(_t,Rt){if(Ef(_t))return new _u(_t,Rt);if(Hh(_t)){let Kt=Uc(_t,Rt);if(Kt.result==="error")throw new Error(Kt.value.map(Qt=>`${Qt.key}: ${Qt.message}`).join(", "));return Kt.value}{let Kt=_t;return Rt.type==="color"&&typeof _t=="string"?Kt=xr.parse(_t):Rt.type!=="padding"||typeof _t!="number"&&!Array.isArray(_t)?Rt.type==="variableAnchorOffsetCollection"&&Array.isArray(_t)&&(Kt=xi.parse(_t)):Kt=Mn.parse(_t),{kind:"constant",evaluate:()=>Kt}}}(nt===void 0?D.specification.default:nt,D.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(D,nt,_t){return this.property.possiblyEvaluate(this,D,nt,_t)}}class Hc{constructor(D){this.property=D,this.value=new vc(D,void 0)}transitioned(D,nt){return new Ph(this.property,this.value,nt,M({},D.transition,this.transition),D.now)}untransitioned(){return new Ph(this.property,this.value,null,{},0)}}class Pc{constructor(D){this._properties=D,this._values=Object.create(D.defaultTransitionablePropertyValues)}getValue(D){return p(this._values[D].value.value)}setValue(D,nt){Object.prototype.hasOwnProperty.call(this._values,D)||(this._values[D]=new Hc(this._values[D].property)),this._values[D].value=new vc(this._values[D].property,nt===null?void 0:p(nt))}getTransition(D){return p(this._values[D].transition)}setTransition(D,nt){Object.prototype.hasOwnProperty.call(this._values,D)||(this._values[D]=new Hc(this._values[D].property)),this._values[D].transition=p(nt)||void 0}serialize(){let D={};for(let nt of Object.keys(this._values)){let _t=this.getValue(nt);_t!==void 0&&(D[nt]=_t);let Rt=this.getTransition(nt);Rt!==void 0&&(D[`${nt}-transition`]=Rt)}return D}transitioned(D,nt){let _t=new Wc(this._properties);for(let Rt of Object.keys(this._values))_t._values[Rt]=this._values[Rt].transitioned(D,nt._values[Rt]);return _t}untransitioned(){let D=new Wc(this._properties);for(let nt of Object.keys(this._values))D._values[nt]=this._values[nt].untransitioned();return D}}class Ph{constructor(D,nt,_t,Rt,Kt){this.property=D,this.value=nt,this.begin=Kt+Rt.delay||0,this.end=this.begin+Rt.duration||0,D.specification.transition&&(Rt.delay||Rt.duration)&&(this.prior=_t)}possiblyEvaluate(D,nt,_t){let Rt=D.now||0,Kt=this.value.possiblyEvaluate(D,nt,_t),Qt=this.prior;if(Qt){if(Rt>this.end)return this.prior=null,Kt;if(this.value.isDataDriven())return this.prior=null,Kt;if(Rt=1)return 1;let er=Fe*Fe,yr=er*Fe;return 4*(Fe<.5?yr:3*(Fe-er)+yr-.75)}(be))}}return Kt}}class Wc{constructor(D){this._properties=D,this._values=Object.create(D.defaultTransitioningPropertyValues)}possiblyEvaluate(D,nt,_t){let Rt=new Ih(this._properties);for(let Kt of Object.keys(this._values))Rt._values[Kt]=this._values[Kt].possiblyEvaluate(D,nt,_t);return Rt}hasTransition(){for(let D of Object.keys(this._values))if(this._values[D].prior)return!0;return!1}}class zh{constructor(D){this._properties=D,this._values=Object.create(D.defaultPropertyValues)}hasValue(D){return this._values[D].value!==void 0}getValue(D){return p(this._values[D].value)}setValue(D,nt){this._values[D]=new vc(this._values[D].property,nt===null?void 0:p(nt))}serialize(){let D={};for(let nt of Object.keys(this._values)){let _t=this.getValue(nt);_t!==void 0&&(D[nt]=_t)}return D}possiblyEvaluate(D,nt,_t){let Rt=new Ih(this._properties);for(let Kt of Object.keys(this._values))Rt._values[Kt]=this._values[Kt].possiblyEvaluate(D,nt,_t);return Rt}}class Iu{constructor(D,nt,_t){this.property=D,this.value=nt,this.parameters=_t}isConstant(){return this.value.kind==="constant"}constantOr(D){return this.value.kind==="constant"?this.value.value:D}evaluate(D,nt,_t,Rt){return this.property.evaluate(this.value,this.parameters,D,nt,_t,Rt)}}class Ih{constructor(D){this._properties=D,this._values=Object.create(D.defaultPossiblyEvaluatedValues)}get(D){return this._values[D]}}class es{constructor(D){this.specification=D}possiblyEvaluate(D,nt){if(D.isDataDriven())throw new Error("Value should not be data driven");return D.expression.evaluate(nt)}interpolate(D,nt,_t){let Rt=Do[this.specification.type];return Rt?Rt(D,nt,_t):D}}class zs{constructor(D,nt){this.specification=D,this.overrides=nt}possiblyEvaluate(D,nt,_t,Rt){return new Iu(this,D.expression.kind==="constant"||D.expression.kind==="camera"?{kind:"constant",value:D.expression.evaluate(nt,null,{},_t,Rt)}:D.expression,nt)}interpolate(D,nt,_t){if(D.value.kind!=="constant"||nt.value.kind!=="constant")return D;if(D.value.value===void 0||nt.value.value===void 0)return new Iu(this,{kind:"constant",value:void 0},D.parameters);let Rt=Do[this.specification.type];if(Rt){let Kt=Rt(D.value.value,nt.value.value,_t);return new Iu(this,{kind:"constant",value:Kt},D.parameters)}return D}evaluate(D,nt,_t,Rt,Kt,Qt){return D.kind==="constant"?D.value:D.evaluate(nt,_t,Rt,Kt,Qt)}}class qc extends zs{possiblyEvaluate(D,nt,_t,Rt){if(D.value===void 0)return new Iu(this,{kind:"constant",value:void 0},nt);if(D.expression.kind==="constant"){let Kt=D.expression.evaluate(nt,null,{},_t,Rt),Qt=D.property.specification.type==="resolvedImage"&&typeof Kt!="string"?Kt.name:Kt,be=this._calculate(Qt,Qt,Qt,nt);return new Iu(this,{kind:"constant",value:be},nt)}if(D.expression.kind==="camera"){let Kt=this._calculate(D.expression.evaluate({zoom:nt.zoom-1}),D.expression.evaluate({zoom:nt.zoom}),D.expression.evaluate({zoom:nt.zoom+1}),nt);return new Iu(this,{kind:"constant",value:Kt},nt)}return new Iu(this,D.expression,nt)}evaluate(D,nt,_t,Rt,Kt,Qt){if(D.kind==="source"){let be=D.evaluate(nt,_t,Rt,Kt,Qt);return this._calculate(be,be,be,nt)}return D.kind==="composite"?this._calculate(D.evaluate({zoom:Math.floor(nt.zoom)-1},_t,Rt),D.evaluate({zoom:Math.floor(nt.zoom)},_t,Rt),D.evaluate({zoom:Math.floor(nt.zoom)+1},_t,Rt),nt):D.value}_calculate(D,nt,_t,Rt){return Rt.zoom>Rt.zoomHistory.lastIntegerZoom?{from:D,to:nt}:{from:_t,to:nt}}interpolate(D){return D}}class Zu{constructor(D){this.specification=D}possiblyEvaluate(D,nt,_t,Rt){if(D.value!==void 0){if(D.expression.kind==="constant"){let Kt=D.expression.evaluate(nt,null,{},_t,Rt);return this._calculate(Kt,Kt,Kt,nt)}return this._calculate(D.expression.evaluate(new Fl(Math.floor(nt.zoom-1),nt)),D.expression.evaluate(new Fl(Math.floor(nt.zoom),nt)),D.expression.evaluate(new Fl(Math.floor(nt.zoom+1),nt)),nt)}}_calculate(D,nt,_t,Rt){return Rt.zoom>Rt.zoomHistory.lastIntegerZoom?{from:D,to:nt}:{from:_t,to:nt}}interpolate(D){return D}}class Zf{constructor(D){this.specification=D}possiblyEvaluate(D,nt,_t,Rt){return!!D.expression.evaluate(nt,null,{},_t,Rt)}interpolate(){return!1}}class qt{constructor(D){this.properties=D,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let nt in D){let _t=D[nt];_t.specification.overridable&&this.overridableProperties.push(nt);let Rt=this.defaultPropertyValues[nt]=new vc(_t,void 0),Kt=this.defaultTransitionablePropertyValues[nt]=new Hc(_t);this.defaultTransitioningPropertyValues[nt]=Kt.untransitioned(),this.defaultPossiblyEvaluatedValues[nt]=Rt.possiblyEvaluate({})}}}Ji("DataDrivenProperty",zs),Ji("DataConstantProperty",es),Ji("CrossFadedDataDrivenProperty",qc),Ji("CrossFadedProperty",Zu),Ji("ColorRampProperty",Zf);let I="-transition";class ht extends ft{constructor(D,nt){if(super(),this.id=D.id,this.type=D.type,this._featureFilter={filter:()=>!0,needGeometry:!1},D.type!=="custom"&&(this.metadata=D.metadata,this.minzoom=D.minzoom,this.maxzoom=D.maxzoom,D.type!=="background"&&(this.source=D.source,this.sourceLayer=D["source-layer"],this.filter=D.filter),nt.layout&&(this._unevaluatedLayout=new zh(nt.layout)),nt.paint)){this._transitionablePaint=new Pc(nt.paint);for(let _t in D.paint)this.setPaintProperty(_t,D.paint[_t],{validate:!1});for(let _t in D.layout)this.setLayoutProperty(_t,D.layout[_t],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ih(nt.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(D){return D==="visibility"?this.visibility:this._unevaluatedLayout.getValue(D)}setLayoutProperty(D,nt,_t={}){nt!=null&&this._validate($a,`layers.${this.id}.layout.${D}`,D,nt,_t)||(D!=="visibility"?this._unevaluatedLayout.setValue(D,nt):this.visibility=nt)}getPaintProperty(D){return D.endsWith(I)?this._transitionablePaint.getTransition(D.slice(0,-11)):this._transitionablePaint.getValue(D)}setPaintProperty(D,nt,_t={}){if(nt!=null&&this._validate(Ra,`layers.${this.id}.paint.${D}`,D,nt,_t))return!1;if(D.endsWith(I))return this._transitionablePaint.setTransition(D.slice(0,-11),nt||void 0),!1;{let Rt=this._transitionablePaint._values[D],Kt=Rt.property.specification["property-type"]==="cross-faded-data-driven",Qt=Rt.value.isDataDriven(),be=Rt.value;this._transitionablePaint.setValue(D,nt),this._handleSpecialPaintPropertyUpdate(D);let Fe=this._transitionablePaint._values[D].value;return Fe.isDataDriven()||Qt||Kt||this._handleOverridablePaintPropertyUpdate(D,be,Fe)}}_handleSpecialPaintPropertyUpdate(D){}_handleOverridablePaintPropertyUpdate(D,nt,_t){return!1}isHidden(D){return!!(this.minzoom&&D=this.maxzoom)||this.visibility==="none"}updateTransitions(D){this._transitioningPaint=this._transitionablePaint.transitioned(D,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(D,nt){D.getCrossfadeParameters&&(this._crossfadeParameters=D.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(D,void 0,nt)),this.paint=this._transitioningPaint.possiblyEvaluate(D,void 0,nt)}serialize(){let D={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(D.layout=D.layout||{},D.layout.visibility=this.visibility),h(D,(nt,_t)=>!(nt===void 0||_t==="layout"&&!Object.keys(nt).length||_t==="paint"&&!Object.keys(nt).length))}_validate(D,nt,_t,Rt,Kt={}){return(!Kt||Kt.validate!==!1)&&ua(this,D.call(hi,{key:nt,layerType:this.type,objectKey:_t,value:Rt,styleSpec:ut,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let D in this.paint._values){let nt=this.paint.get(D);if(nt instanceof Iu&&uc(nt.property.specification)&&(nt.value.kind==="source"||nt.value.kind==="composite")&&nt.value.isStateDependent)return!0}return!1}}let Et={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class It{constructor(D,nt){this._structArray=D,this._pos1=nt*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Vt{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(D,nt){return D._trim(),nt&&(D.isTransferred=!0,nt.push(D.arrayBuffer)),{length:D.length,arrayBuffer:D.arrayBuffer}}static deserialize(D){let nt=Object.create(this.prototype);return nt.arrayBuffer=D.arrayBuffer,nt.length=D.length,nt.capacity=D.arrayBuffer.byteLength/nt.bytesPerElement,nt._refreshViews(),nt}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(D){this.reserve(D),this.length=D}reserve(D){if(D>this.capacity){this.capacity=Math.max(D,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let nt=this.uint8;this._refreshViews(),nt&&this.uint8.set(nt)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ke(G,D=1){let nt=0,_t=0;return{members:G.map(Rt=>{let Kt=Et[Rt.type].BYTES_PER_ELEMENT,Qt=nt=Oe(nt,Math.max(D,Kt)),be=Rt.components||1;return _t=Math.max(_t,Kt),nt+=Kt*be,{name:Rt.name,type:Rt.type,components:be,offset:Qt}}),size:Oe(nt,Math.max(_t,D)),alignment:D}}function Oe(G,D){return Math.ceil(G/D)*D}class Ke extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt){let _t=this.length;return this.resize(_t+1),this.emplace(_t,D,nt)}emplace(D,nt,_t){let Rt=2*D;return this.int16[Rt+0]=nt,this.int16[Rt+1]=_t,D}}Ke.prototype.bytesPerElement=4,Ji("StructArrayLayout2i4",Ke);class gr extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,_t){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,_t)}emplace(D,nt,_t,Rt){let Kt=3*D;return this.int16[Kt+0]=nt,this.int16[Kt+1]=_t,this.int16[Kt+2]=Rt,D}}gr.prototype.bytesPerElement=6,Ji("StructArrayLayout3i6",gr);class Or extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt){let Kt=this.length;return this.resize(Kt+1),this.emplace(Kt,D,nt,_t,Rt)}emplace(D,nt,_t,Rt,Kt){let Qt=4*D;return this.int16[Qt+0]=nt,this.int16[Qt+1]=_t,this.int16[Qt+2]=Rt,this.int16[Qt+3]=Kt,D}}Or.prototype.bytesPerElement=8,Ji("StructArrayLayout4i8",Or);class Dr extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt,Qt){let be=this.length;return this.resize(be+1),this.emplace(be,D,nt,_t,Rt,Kt,Qt)}emplace(D,nt,_t,Rt,Kt,Qt,be){let Fe=6*D;return this.int16[Fe+0]=nt,this.int16[Fe+1]=_t,this.int16[Fe+2]=Rt,this.int16[Fe+3]=Kt,this.int16[Fe+4]=Qt,this.int16[Fe+5]=be,D}}Dr.prototype.bytesPerElement=12,Ji("StructArrayLayout2i4i12",Dr);class ln extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt,Qt){let be=this.length;return this.resize(be+1),this.emplace(be,D,nt,_t,Rt,Kt,Qt)}emplace(D,nt,_t,Rt,Kt,Qt,be){let Fe=4*D,er=8*D;return this.int16[Fe+0]=nt,this.int16[Fe+1]=_t,this.uint8[er+4]=Rt,this.uint8[er+5]=Kt,this.uint8[er+6]=Qt,this.uint8[er+7]=be,D}}ln.prototype.bytesPerElement=8,Ji("StructArrayLayout2i4ub8",ln);class Sn extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt){let _t=this.length;return this.resize(_t+1),this.emplace(_t,D,nt)}emplace(D,nt,_t){let Rt=2*D;return this.float32[Rt+0]=nt,this.float32[Rt+1]=_t,D}}Sn.prototype.bytesPerElement=8,Ji("StructArrayLayout2f8",Sn);class Xt extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt,Qt,be,Fe,er,yr){let Er=this.length;return this.resize(Er+1),this.emplace(Er,D,nt,_t,Rt,Kt,Qt,be,Fe,er,yr)}emplace(D,nt,_t,Rt,Kt,Qt,be,Fe,er,yr,Er){let Zr=10*D;return this.uint16[Zr+0]=nt,this.uint16[Zr+1]=_t,this.uint16[Zr+2]=Rt,this.uint16[Zr+3]=Kt,this.uint16[Zr+4]=Qt,this.uint16[Zr+5]=be,this.uint16[Zr+6]=Fe,this.uint16[Zr+7]=er,this.uint16[Zr+8]=yr,this.uint16[Zr+9]=Er,D}}Xt.prototype.bytesPerElement=20,Ji("StructArrayLayout10ui20",Xt);class ae extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt,Qt,be,Fe,er,yr,Er,Zr){let sn=this.length;return this.resize(sn+1),this.emplace(sn,D,nt,_t,Rt,Kt,Qt,be,Fe,er,yr,Er,Zr)}emplace(D,nt,_t,Rt,Kt,Qt,be,Fe,er,yr,Er,Zr,sn){let xn=12*D;return this.int16[xn+0]=nt,this.int16[xn+1]=_t,this.int16[xn+2]=Rt,this.int16[xn+3]=Kt,this.uint16[xn+4]=Qt,this.uint16[xn+5]=be,this.uint16[xn+6]=Fe,this.uint16[xn+7]=er,this.int16[xn+8]=yr,this.int16[xn+9]=Er,this.int16[xn+10]=Zr,this.int16[xn+11]=sn,D}}ae.prototype.bytesPerElement=24,Ji("StructArrayLayout4i4ui4i24",ae);class xe extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,_t){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,_t)}emplace(D,nt,_t,Rt){let Kt=3*D;return this.float32[Kt+0]=nt,this.float32[Kt+1]=_t,this.float32[Kt+2]=Rt,D}}xe.prototype.bytesPerElement=12,Ji("StructArrayLayout3f12",xe);class Ae extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(D){let nt=this.length;return this.resize(nt+1),this.emplace(nt,D)}emplace(D,nt){return this.uint32[1*D+0]=nt,D}}Ae.prototype.bytesPerElement=4,Ji("StructArrayLayout1ul4",Ae);class je extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt,Qt,be,Fe,er){let yr=this.length;return this.resize(yr+1),this.emplace(yr,D,nt,_t,Rt,Kt,Qt,be,Fe,er)}emplace(D,nt,_t,Rt,Kt,Qt,be,Fe,er,yr){let Er=10*D,Zr=5*D;return this.int16[Er+0]=nt,this.int16[Er+1]=_t,this.int16[Er+2]=Rt,this.int16[Er+3]=Kt,this.int16[Er+4]=Qt,this.int16[Er+5]=be,this.uint32[Zr+3]=Fe,this.uint16[Er+8]=er,this.uint16[Er+9]=yr,D}}je.prototype.bytesPerElement=20,Ji("StructArrayLayout6i1ul2ui20",je);class Ie extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt,Qt){let be=this.length;return this.resize(be+1),this.emplace(be,D,nt,_t,Rt,Kt,Qt)}emplace(D,nt,_t,Rt,Kt,Qt,be){let Fe=6*D;return this.int16[Fe+0]=nt,this.int16[Fe+1]=_t,this.int16[Fe+2]=Rt,this.int16[Fe+3]=Kt,this.int16[Fe+4]=Qt,this.int16[Fe+5]=be,D}}Ie.prototype.bytesPerElement=12,Ji("StructArrayLayout2i2i2i12",Ie);class Ze extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt){let Qt=this.length;return this.resize(Qt+1),this.emplace(Qt,D,nt,_t,Rt,Kt)}emplace(D,nt,_t,Rt,Kt,Qt){let be=4*D,Fe=8*D;return this.float32[be+0]=nt,this.float32[be+1]=_t,this.float32[be+2]=Rt,this.int16[Fe+6]=Kt,this.int16[Fe+7]=Qt,D}}Ze.prototype.bytesPerElement=16,Ji("StructArrayLayout2f1f2i16",Ze);class wr extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt,Qt){let be=this.length;return this.resize(be+1),this.emplace(be,D,nt,_t,Rt,Kt,Qt)}emplace(D,nt,_t,Rt,Kt,Qt,be){let Fe=16*D,er=4*D,yr=8*D;return this.uint8[Fe+0]=nt,this.uint8[Fe+1]=_t,this.float32[er+1]=Rt,this.float32[er+2]=Kt,this.int16[yr+6]=Qt,this.int16[yr+7]=be,D}}wr.prototype.bytesPerElement=16,Ji("StructArrayLayout2ub2f2i16",wr);class Ir extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,_t){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,_t)}emplace(D,nt,_t,Rt){let Kt=3*D;return this.uint16[Kt+0]=nt,this.uint16[Kt+1]=_t,this.uint16[Kt+2]=Rt,D}}Ir.prototype.bytesPerElement=6,Ji("StructArrayLayout3ui6",Ir);class Nr extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt,Qt,be,Fe,er,yr,Er,Zr,sn,xn,Ln,$n,ki){let Aa=this.length;return this.resize(Aa+1),this.emplace(Aa,D,nt,_t,Rt,Kt,Qt,be,Fe,er,yr,Er,Zr,sn,xn,Ln,$n,ki)}emplace(D,nt,_t,Rt,Kt,Qt,be,Fe,er,yr,Er,Zr,sn,xn,Ln,$n,ki,Aa){let Xi=24*D,ma=12*D,Ga=48*D;return this.int16[Xi+0]=nt,this.int16[Xi+1]=_t,this.uint16[Xi+2]=Rt,this.uint16[Xi+3]=Kt,this.uint32[ma+2]=Qt,this.uint32[ma+3]=be,this.uint32[ma+4]=Fe,this.uint16[Xi+10]=er,this.uint16[Xi+11]=yr,this.uint16[Xi+12]=Er,this.float32[ma+7]=Zr,this.float32[ma+8]=sn,this.uint8[Ga+36]=xn,this.uint8[Ga+37]=Ln,this.uint8[Ga+38]=$n,this.uint32[ma+10]=ki,this.int16[Xi+22]=Aa,D}}Nr.prototype.bytesPerElement=48,Ji("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Nr);class tn extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt,Qt,be,Fe,er,yr,Er,Zr,sn,xn,Ln,$n,ki,Aa,Xi,ma,Ga,To,As,Sl,ys,cs,Ys,Bs){let Is=this.length;return this.resize(Is+1),this.emplace(Is,D,nt,_t,Rt,Kt,Qt,be,Fe,er,yr,Er,Zr,sn,xn,Ln,$n,ki,Aa,Xi,ma,Ga,To,As,Sl,ys,cs,Ys,Bs)}emplace(D,nt,_t,Rt,Kt,Qt,be,Fe,er,yr,Er,Zr,sn,xn,Ln,$n,ki,Aa,Xi,ma,Ga,To,As,Sl,ys,cs,Ys,Bs,Is){let oo=32*D,nl=16*D;return this.int16[oo+0]=nt,this.int16[oo+1]=_t,this.int16[oo+2]=Rt,this.int16[oo+3]=Kt,this.int16[oo+4]=Qt,this.int16[oo+5]=be,this.int16[oo+6]=Fe,this.int16[oo+7]=er,this.uint16[oo+8]=yr,this.uint16[oo+9]=Er,this.uint16[oo+10]=Zr,this.uint16[oo+11]=sn,this.uint16[oo+12]=xn,this.uint16[oo+13]=Ln,this.uint16[oo+14]=$n,this.uint16[oo+15]=ki,this.uint16[oo+16]=Aa,this.uint16[oo+17]=Xi,this.uint16[oo+18]=ma,this.uint16[oo+19]=Ga,this.uint16[oo+20]=To,this.uint16[oo+21]=As,this.uint16[oo+22]=Sl,this.uint32[nl+12]=ys,this.float32[nl+13]=cs,this.float32[nl+14]=Ys,this.uint16[oo+30]=Bs,this.uint16[oo+31]=Is,D}}tn.prototype.bytesPerElement=64,Ji("StructArrayLayout8i15ui1ul2f2ui64",tn);class mn extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D){let nt=this.length;return this.resize(nt+1),this.emplace(nt,D)}emplace(D,nt){return this.float32[1*D+0]=nt,D}}mn.prototype.bytesPerElement=4,Ji("StructArrayLayout1f4",mn);class zn extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,_t){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,_t)}emplace(D,nt,_t,Rt){let Kt=3*D;return this.uint16[6*D+0]=nt,this.float32[Kt+1]=_t,this.float32[Kt+2]=Rt,D}}zn.prototype.bytesPerElement=12,Ji("StructArrayLayout1ui2f12",zn);class Bn extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,_t){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,_t)}emplace(D,nt,_t,Rt){let Kt=4*D;return this.uint32[2*D+0]=nt,this.uint16[Kt+2]=_t,this.uint16[Kt+3]=Rt,D}}Bn.prototype.bytesPerElement=8,Ji("StructArrayLayout1ul2ui8",Bn);class ri extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt){let _t=this.length;return this.resize(_t+1),this.emplace(_t,D,nt)}emplace(D,nt,_t){let Rt=2*D;return this.uint16[Rt+0]=nt,this.uint16[Rt+1]=_t,D}}ri.prototype.bytesPerElement=4,Ji("StructArrayLayout2ui4",ri);class Fi extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D){let nt=this.length;return this.resize(nt+1),this.emplace(nt,D)}emplace(D,nt){return this.uint16[1*D+0]=nt,D}}Fi.prototype.bytesPerElement=2,Ji("StructArrayLayout1ui2",Fi);class da extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt){let Kt=this.length;return this.resize(Kt+1),this.emplace(Kt,D,nt,_t,Rt)}emplace(D,nt,_t,Rt,Kt){let Qt=4*D;return this.float32[Qt+0]=nt,this.float32[Qt+1]=_t,this.float32[Qt+2]=Rt,this.float32[Qt+3]=Kt,D}}da.prototype.bytesPerElement=16,Ji("StructArrayLayout4f16",da);class ha extends It{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new o(this.anchorPointX,this.anchorPointY)}}ha.prototype.size=20;class ka extends je{get(D){return new ha(this,D)}}Ji("CollisionBoxArray",ka);class io extends It{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(D){this._structArray.uint8[this._pos1+37]=D}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(D){this._structArray.uint8[this._pos1+38]=D}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(D){this._structArray.uint32[this._pos4+10]=D}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}io.prototype.size=48;class Ro extends Nr{get(D){return new io(this,D)}}Ji("PlacedSymbolArray",Ro);class Mo extends It{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(D){this._structArray.uint32[this._pos4+12]=D}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}Mo.prototype.size=64;class hs extends tn{get(D){return new Mo(this,D)}}Ji("SymbolInstanceArray",hs);class hl extends mn{getoffsetX(D){return this.float32[1*D+0]}}Ji("GlyphOffsetArray",hl);class vl extends gr{getx(D){return this.int16[3*D+0]}gety(D){return this.int16[3*D+1]}gettileUnitDistanceFromAnchor(D){return this.int16[3*D+2]}}Ji("SymbolLineVertexArray",vl);class Os extends It{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Os.prototype.size=12;class bl extends zn{get(D){return new Os(this,D)}}Ji("TextAnchorOffsetArray",bl);class Su extends It{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Su.prototype.size=8;class mu extends Bn{get(D){return new Su(this,D)}}Ji("FeatureIndexArray",mu);class Ws extends Ke{}class qs extends Ke{}class Yu extends Ke{}class dc extends Dr{}class Zc extends ln{}class At extends Sn{}class jt extends Xt{}class ue extends ae{}class Me extends xe{}class Le extends Ae{}class Be extends Ie{}class sr extends wr{}class ir extends Ir{}class Mr extends ri{}let en=ke([{name:"a_pos",components:2,type:"Int16"}],4),{members:Xr}=en;class vn{constructor(D=[]){this.segments=D}prepareSegment(D,nt,_t,Rt){let Kt=this.segments[this.segments.length-1];return D>vn.MAX_VERTEX_ARRAY_LENGTH&&w(`Max vertices per segment is ${vn.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${D}`),(!Kt||Kt.vertexLength+D>vn.MAX_VERTEX_ARRAY_LENGTH||Kt.sortKey!==Rt)&&(Kt={vertexOffset:nt.length,primitiveOffset:_t.length,vertexLength:0,primitiveLength:0},Rt!==void 0&&(Kt.sortKey=Rt),this.segments.push(Kt)),Kt}get(){return this.segments}destroy(){for(let D of this.segments)for(let nt in D.vaos)D.vaos[nt].destroy()}static simpleSegment(D,nt,_t,Rt){return new vn([{vertexOffset:D,primitiveOffset:nt,vertexLength:_t,primitiveLength:Rt,vaos:{},sortKey:0}])}}function In(G,D){return 256*(G=_(Math.floor(G),0,255))+_(Math.floor(D),0,255)}vn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Ji("SegmentVector",vn);let On=ke([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var Bi={exports:{}},Un={exports:{}};Un.exports=function(G,D){var nt,_t,Rt,Kt,Qt,be,Fe,er;for(_t=G.length-(nt=3&G.length),Rt=D,Qt=3432918353,be=461845907,er=0;er<_t;)Fe=255&G.charCodeAt(er)|(255&G.charCodeAt(++er))<<8|(255&G.charCodeAt(++er))<<16|(255&G.charCodeAt(++er))<<24,++er,Rt=27492+(65535&(Kt=5*(65535&(Rt=(Rt^=Fe=(65535&(Fe=(Fe=(65535&Fe)*Qt+(((Fe>>>16)*Qt&65535)<<16)&4294967295)<<15|Fe>>>17))*be+(((Fe>>>16)*be&65535)<<16)&4294967295)<<13|Rt>>>19))+((5*(Rt>>>16)&65535)<<16)&4294967295))+((58964+(Kt>>>16)&65535)<<16);switch(Fe=0,nt){case 3:Fe^=(255&G.charCodeAt(er+2))<<16;case 2:Fe^=(255&G.charCodeAt(er+1))<<8;case 1:Rt^=Fe=(65535&(Fe=(Fe=(65535&(Fe^=255&G.charCodeAt(er)))*Qt+(((Fe>>>16)*Qt&65535)<<16)&4294967295)<<15|Fe>>>17))*be+(((Fe>>>16)*be&65535)<<16)&4294967295}return Rt^=G.length,Rt=2246822507*(65535&(Rt^=Rt>>>16))+((2246822507*(Rt>>>16)&65535)<<16)&4294967295,Rt=3266489909*(65535&(Rt^=Rt>>>13))+((3266489909*(Rt>>>16)&65535)<<16)&4294967295,(Rt^=Rt>>>16)>>>0};var mi=Un.exports,Ti={exports:{}};Ti.exports=function(G,D){for(var nt,_t=G.length,Rt=D^_t,Kt=0;_t>=4;)nt=1540483477*(65535&(nt=255&G.charCodeAt(Kt)|(255&G.charCodeAt(++Kt))<<8|(255&G.charCodeAt(++Kt))<<16|(255&G.charCodeAt(++Kt))<<24))+((1540483477*(nt>>>16)&65535)<<16),Rt=1540483477*(65535&Rt)+((1540483477*(Rt>>>16)&65535)<<16)^(nt=1540483477*(65535&(nt^=nt>>>24))+((1540483477*(nt>>>16)&65535)<<16)),_t-=4,++Kt;switch(_t){case 3:Rt^=(255&G.charCodeAt(Kt+2))<<16;case 2:Rt^=(255&G.charCodeAt(Kt+1))<<8;case 1:Rt=1540483477*(65535&(Rt^=255&G.charCodeAt(Kt)))+((1540483477*(Rt>>>16)&65535)<<16)}return Rt=1540483477*(65535&(Rt^=Rt>>>13))+((1540483477*(Rt>>>16)&65535)<<16),(Rt^=Rt>>>15)>>>0};var Ii=mi,Wi=Ti.exports;Bi.exports=Ii,Bi.exports.murmur3=Ii,Bi.exports.murmur2=Wi;var Yn=r(Bi.exports);class ja{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(D,nt,_t,Rt){this.ids.push(Ha(D)),this.positions.push(nt,_t,Rt)}getPositions(D){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let nt=Ha(D),_t=0,Rt=this.ids.length-1;for(;_t>1;this.ids[Qt]>=nt?Rt=Qt:_t=Qt+1}let Kt=[];for(;this.ids[_t]===nt;)Kt.push({index:this.positions[3*_t],start:this.positions[3*_t+1],end:this.positions[3*_t+2]}),_t++;return Kt}static serialize(D,nt){let _t=new Float64Array(D.ids),Rt=new Uint32Array(D.positions);return ro(_t,Rt,0,_t.length-1),nt&&nt.push(_t.buffer,Rt.buffer),{ids:_t,positions:Rt}}static deserialize(D){let nt=new ja;return nt.ids=D.ids,nt.positions=D.positions,nt.indexed=!0,nt}}function Ha(G){let D=+G;return!isNaN(D)&&D<=Number.MAX_SAFE_INTEGER?D:Yn(String(G))}function ro(G,D,nt,_t){for(;nt<_t;){let Rt=G[nt+_t>>1],Kt=nt-1,Qt=_t+1;for(;;){do Kt++;while(G[Kt]Rt);if(Kt>=Qt)break;Lo(G,Kt,Qt),Lo(D,3*Kt,3*Qt),Lo(D,3*Kt+1,3*Qt+1),Lo(D,3*Kt+2,3*Qt+2)}Qt-nt<_t-Qt?(ro(G,D,nt,Qt),nt=Qt+1):(ro(G,D,Qt+1,_t),_t=Qt)}}function Lo(G,D,nt){let _t=G[D];G[D]=G[nt],G[nt]=_t}Ji("FeaturePositionMap",ja);class Fo{constructor(D,nt){this.gl=D.gl,this.location=nt}}class Uo extends Fo{constructor(D,nt){super(D,nt),this.current=0}set(D){this.current!==D&&(this.current=D,this.gl.uniform1f(this.location,D))}}class al extends Fo{constructor(D,nt){super(D,nt),this.current=[0,0,0,0]}set(D){D[0]===this.current[0]&&D[1]===this.current[1]&&D[2]===this.current[2]&&D[3]===this.current[3]||(this.current=D,this.gl.uniform4f(this.location,D[0],D[1],D[2],D[3]))}}class Wo extends Fo{constructor(D,nt){super(D,nt),this.current=xr.transparent}set(D){D.r===this.current.r&&D.g===this.current.g&&D.b===this.current.b&&D.a===this.current.a||(this.current=D,this.gl.uniform4f(this.location,D.r,D.g,D.b,D.a))}}let ps=new Float32Array(16);function Tl(G){return[In(255*G.r,255*G.g),In(255*G.b,255*G.a)]}class Ku{constructor(D,nt,_t){this.value=D,this.uniformNames=nt.map(Rt=>`u_${Rt}`),this.type=_t}setUniform(D,nt,_t){D.set(_t.constantOr(this.value))}getBinding(D,nt,_t){return this.type==="color"?new Wo(D,nt):new Uo(D,nt)}}class cu{constructor(D,nt){this.uniformNames=nt.map(_t=>`u_${_t}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(D,nt){this.pixelRatioFrom=nt.pixelRatio,this.pixelRatioTo=D.pixelRatio,this.patternFrom=nt.tlbr,this.patternTo=D.tlbr}setUniform(D,nt,_t,Rt){let Kt=Rt==="u_pattern_to"?this.patternTo:Rt==="u_pattern_from"?this.patternFrom:Rt==="u_pixel_ratio_to"?this.pixelRatioTo:Rt==="u_pixel_ratio_from"?this.pixelRatioFrom:null;Kt&&D.set(Kt)}getBinding(D,nt,_t){return _t.substr(0,9)==="u_pattern"?new al(D,nt):new Uo(D,nt)}}class _o{constructor(D,nt,_t,Rt){this.expression=D,this.type=_t,this.maxValue=0,this.paintVertexAttributes=nt.map(Kt=>({name:`a_${Kt}`,type:"Float32",components:_t==="color"?2:1,offset:0})),this.paintVertexArray=new Rt}populatePaintArray(D,nt,_t,Rt,Kt){let Qt=this.paintVertexArray.length,be=this.expression.evaluate(new Fl(0),nt,{},Rt,[],Kt);this.paintVertexArray.resize(D),this._setPaintValue(Qt,D,be)}updatePaintArray(D,nt,_t,Rt){let Kt=this.expression.evaluate({zoom:0},_t,Rt);this._setPaintValue(D,nt,Kt)}_setPaintValue(D,nt,_t){if(this.type==="color"){let Rt=Tl(_t);for(let Kt=D;Kt`u_${be}_t`),this.type=_t,this.useIntegerZoom=Rt,this.zoom=Kt,this.maxValue=0,this.paintVertexAttributes=nt.map(be=>({name:`a_${be}`,type:"Float32",components:_t==="color"?4:2,offset:0})),this.paintVertexArray=new Qt}populatePaintArray(D,nt,_t,Rt,Kt){let Qt=this.expression.evaluate(new Fl(this.zoom),nt,{},Rt,[],Kt),be=this.expression.evaluate(new Fl(this.zoom+1),nt,{},Rt,[],Kt),Fe=this.paintVertexArray.length;this.paintVertexArray.resize(D),this._setPaintValue(Fe,D,Qt,be)}updatePaintArray(D,nt,_t,Rt){let Kt=this.expression.evaluate({zoom:this.zoom},_t,Rt),Qt=this.expression.evaluate({zoom:this.zoom+1},_t,Rt);this._setPaintValue(D,nt,Kt,Qt)}_setPaintValue(D,nt,_t,Rt){if(this.type==="color"){let Kt=Tl(_t),Qt=Tl(Rt);for(let be=D;be`#define HAS_UNIFORM_${Rt}`))}return D}getBinderAttributes(){let D=[];for(let nt in this.binders){let _t=this.binders[nt];if(_t instanceof _o||_t instanceof Zs)for(let Rt=0;Rt<_t.paintVertexAttributes.length;Rt++)D.push(_t.paintVertexAttributes[Rt].name);else if(_t instanceof rl)for(let Rt=0;Rt!0){this.programConfigurations={};for(let Rt of D)this.programConfigurations[Rt.id]=new ou(Rt,nt,_t);this.needsUpload=!1,this._featureMap=new ja,this._bufferOffset=0}populatePaintArrays(D,nt,_t,Rt,Kt,Qt){for(let be in this.programConfigurations)this.programConfigurations[be].populatePaintArrays(D,nt,Rt,Kt,Qt);nt.id!==void 0&&this._featureMap.add(nt.id,_t,this._bufferOffset,D),this._bufferOffset=D,this.needsUpload=!0}updatePaintArrays(D,nt,_t,Rt){for(let Kt of _t)this.needsUpload=this.programConfigurations[Kt.id].updatePaintArrays(D,this._featureMap,nt,Kt,Rt)||this.needsUpload}get(D){return this.programConfigurations[D]}upload(D){if(this.needsUpload){for(let nt in this.programConfigurations)this.programConfigurations[nt].upload(D);this.needsUpload=!1}}destroy(){for(let D in this.programConfigurations)this.programConfigurations[D].destroy()}}function rh(G,D){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[G]||[G.replace(`${D}-`,"").replace(/-/g,"_")]}function Bl(G,D,nt){let _t={color:{source:Sn,composite:da},number:{source:mn,composite:Sn}},Rt=function(Kt){return{"line-pattern":{source:jt,composite:jt},"fill-pattern":{source:jt,composite:jt},"fill-extrusion-pattern":{source:jt,composite:jt}}[Kt]}(G);return Rt&&Rt[nt]||_t[D][nt]}Ji("ConstantBinder",Ku),Ji("CrossFadedConstantBinder",cu),Ji("SourceExpressionBinder",_o),Ji("CrossFadedCompositeBinder",rl),Ji("CompositeExpressionBinder",Zs),Ji("ProgramConfiguration",ou,{omit:["_buffers"]}),Ji("ProgramConfigurationSet",Gl);let Ql=8192,bh=Math.pow(2,14)-1,_e=-bh-1;function kr(G){let D=Ql/G.extent,nt=G.loadGeometry();for(let _t=0;_tQt.x+1||FeQt.y+1)&&w("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return nt}function Lr(G,D){return{type:G.type,id:G.id,properties:G.properties,geometry:D?kr(G):[]}}function Dn(G,D,nt,_t,Rt){G.emplaceBack(2*D+(_t+1)/2,2*nt+(Rt+1)/2)}class oi{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(nt=>nt.id),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new qs,this.indexArray=new ir,this.segments=new vn,this.programConfigurations=new Gl(D.layers,D.zoom),this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,_t){let Rt=this.layers[0],Kt=[],Qt=null,be=!1;Rt.type==="circle"&&(Qt=Rt.layout.get("circle-sort-key"),be=!Qt.isConstant());for(let{feature:Fe,id:er,index:yr,sourceLayerIndex:Er}of D){let Zr=this.layers[0]._featureFilter.needGeometry,sn=Lr(Fe,Zr);if(!this.layers[0]._featureFilter.filter(new Fl(this.zoom),sn,_t))continue;let xn=be?Qt.evaluate(sn,{},_t):void 0,Ln={id:er,properties:Fe.properties,type:Fe.type,sourceLayerIndex:Er,index:yr,geometry:Zr?sn.geometry:kr(Fe),patterns:{},sortKey:xn};Kt.push(Ln)}be&&Kt.sort((Fe,er)=>Fe.sortKey-er.sortKey);for(let Fe of Kt){let{geometry:er,index:yr,sourceLayerIndex:Er}=Fe,Zr=D[yr].feature;this.addFeature(Fe,er,yr,_t),nt.featureIndex.insert(Zr,er,yr,Er,this.index)}}update(D,nt,_t){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,_t)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Xr),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(D,nt,_t,Rt){for(let Kt of nt)for(let Qt of Kt){let be=Qt.x,Fe=Qt.y;if(be<0||be>=Ql||Fe<0||Fe>=Ql)continue;let er=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,D.sortKey),yr=er.vertexLength;Dn(this.layoutVertexArray,be,Fe,-1,-1),Dn(this.layoutVertexArray,be,Fe,1,-1),Dn(this.layoutVertexArray,be,Fe,1,1),Dn(this.layoutVertexArray,be,Fe,-1,1),this.indexArray.emplaceBack(yr,yr+1,yr+2),this.indexArray.emplaceBack(yr,yr+3,yr+2),er.vertexLength+=4,er.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,_t,{},Rt)}}function Jn(G,D){for(let nt=0;nt1){if(Ui(G,D))return!0;for(let _t=0;_t1?nt:nt.sub(D)._mult(Rt)._add(D))}function ta(G,D){let nt,_t,Rt,Kt=!1;for(let Qt=0;QtD.y!=Rt.y>D.y&&D.x<(Rt.x-_t.x)*(D.y-_t.y)/(Rt.y-_t.y)+_t.x&&(Kt=!Kt)}return Kt}function wi(G,D){let nt=!1;for(let _t=0,Rt=G.length-1;_tD.y!=Qt.y>D.y&&D.x<(Qt.x-Kt.x)*(D.y-Kt.y)/(Qt.y-Kt.y)+Kt.x&&(nt=!nt)}return nt}function hn(G,D,nt){let _t=nt[0],Rt=nt[2];if(G.x<_t.x&&D.x<_t.x||G.x>Rt.x&&D.x>Rt.x||G.y<_t.y&&D.y<_t.y||G.y>Rt.y&&D.y>Rt.y)return!1;let Kt=R(G,D,nt[0]);return Kt!==R(G,D,nt[1])||Kt!==R(G,D,nt[2])||Kt!==R(G,D,nt[3])}function Nn(G,D,nt){let _t=D.paint.get(G).value;return _t.kind==="constant"?_t.value:nt.programConfigurations.get(D.id).getMaxValue(G)}function Oi(G){return Math.sqrt(G[0]*G[0]+G[1]*G[1])}function _i(G,D,nt,_t,Rt){if(!D[0]&&!D[1])return G;let Kt=o.convert(D)._mult(Rt);nt==="viewport"&&Kt._rotate(-_t);let Qt=[];for(let be=0;bePo($n,Ln))}(er,Fe),sn=Er?yr*be:yr;for(let xn of Rt)for(let Ln of xn){let $n=Er?Ln:Po(Ln,Fe),ki=sn,Aa=$i([],[Ln.x,Ln.y,0,1],Fe);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?ki*=Aa[3]/Qt.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(ki*=Qt.cameraToCenterDistance/Aa[3]),gn(Zr,$n,ki))return!0}return!1}}function Po(G,D){let nt=$i([],[G.x,G.y,0,1],D);return new o(nt[0]/nt[3],nt[1]/nt[3])}class wo extends oi{}let xa;Ji("HeatmapBucket",wo,{omit:["layers"]});var Oa={get paint(){return xa=xa||new qt({"heatmap-radius":new zs(ut.paint_heatmap["heatmap-radius"]),"heatmap-weight":new zs(ut.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new es(ut.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Zf(ut.paint_heatmap["heatmap-color"]),"heatmap-opacity":new es(ut.paint_heatmap["heatmap-opacity"])})}};function ho(G,{width:D,height:nt},_t,Rt){if(Rt){if(Rt instanceof Uint8ClampedArray)Rt=new Uint8Array(Rt.buffer);else if(Rt.length!==D*nt*_t)throw new RangeError(`mismatched image size. expected: ${Rt.length} but got: ${D*nt*_t}`)}else Rt=new Uint8Array(D*nt*_t);return G.width=D,G.height=nt,G.data=Rt,G}function So(G,{width:D,height:nt},_t){if(D===G.width&&nt===G.height)return;let Rt=ho({},{width:D,height:nt},_t);ts(G,Rt,{x:0,y:0},{x:0,y:0},{width:Math.min(G.width,D),height:Math.min(G.height,nt)},_t),G.width=D,G.height=nt,G.data=Rt.data}function ts(G,D,nt,_t,Rt,Kt){if(Rt.width===0||Rt.height===0)return D;if(Rt.width>G.width||Rt.height>G.height||nt.x>G.width-Rt.width||nt.y>G.height-Rt.height)throw new RangeError("out of range source coordinates for image copy");if(Rt.width>D.width||Rt.height>D.height||_t.x>D.width-Rt.width||_t.y>D.height-Rt.height)throw new RangeError("out of range destination coordinates for image copy");let Qt=G.data,be=D.data;if(Qt===be)throw new Error("srcData equals dstData, so image is already copied");for(let Fe=0;Fe{D[G.evaluationKey]=Fe;let er=G.expression.evaluate(D);Rt.data[Qt+be+0]=Math.floor(255*er.r/er.a),Rt.data[Qt+be+1]=Math.floor(255*er.g/er.a),Rt.data[Qt+be+2]=Math.floor(255*er.b/er.a),Rt.data[Qt+be+3]=Math.floor(255*er.a)};if(G.clips)for(let Qt=0,be=0;Qt<_t;++Qt,be+=4*nt)for(let Fe=0,er=0;Fe80*nt){be=1/0,Fe=1/0;let yr=-1/0,Er=-1/0;for(let Zr=nt;Zryr&&(yr=sn),xn>Er&&(Er=xn)}er=Math.max(yr-be,Er-Fe),er=er!==0?32767/er:0}return ol(Kt,Qt,nt,be,Fe,er,0),Qt}function Bo(G,D,nt,_t,Rt){let Kt;if(Rt===function(Qt,be,Fe,er){let yr=0;for(let Er=be,Zr=Fe-er;Er0)for(let Qt=D;Qt=D;Qt-=_t)Kt=tr(Qt/_t|0,G[Qt],G[Qt+1],Kt);return Kt&&ye(Kt,Kt.next)&&(lr(Kt),Kt=Kt.next),Kt}function Tu(G,D){if(!G)return G;D||(D=G);let nt,_t=G;do if(nt=!1,_t.steiner||!ye(_t,_t.next)&&fe(_t.prev,_t,_t.next)!==0)_t=_t.next;else{if(lr(_t),_t=D=_t.prev,_t===_t.next)break;nt=!0}while(nt||_t!==D);return D}function ol(G,D,nt,_t,Rt,Kt,Qt){if(!G)return;!Qt&&Kt&&function(Fe,er,yr,Er){let Zr=Fe;do Zr.z===0&&(Zr.z=ot(Zr.x,Zr.y,er,yr,Er)),Zr.prevZ=Zr.prev,Zr.nextZ=Zr.next,Zr=Zr.next;while(Zr!==Fe);Zr.prevZ.nextZ=null,Zr.prevZ=null,function(sn){let xn,Ln=1;do{let $n,ki=sn;sn=null;let Aa=null;for(xn=0;ki;){xn++;let Xi=ki,ma=0;for(let To=0;To0||Ga>0&Ξ)ma!==0&&(Ga===0||!Xi||ki.z<=Xi.z)?($n=ki,ki=ki.nextZ,ma--):($n=Xi,Xi=Xi.nextZ,Ga--),Aa?Aa.nextZ=$n:sn=$n,$n.prevZ=Aa,Aa=$n;ki=Xi}Aa.nextZ=null,Ln*=2}while(xn>1)}(Zr)}(G,_t,Rt,Kt);let be=G;for(;G.prev!==G.next;){let Fe=G.prev,er=G.next;if(Kt?xc(G,_t,Rt,Kt):Cu(G))D.push(Fe.i,G.i,er.i),lr(G),G=er.next,be=er.next;else if((G=er)===be){Qt?Qt===1?ol(G=Eo(Tu(G),D),D,nt,_t,Rt,Kt,2):Qt===2&&Ss(G,D,nt,_t,Rt,Kt):ol(Tu(G),D,nt,_t,Rt,Kt,1);break}}}function Cu(G){let D=G.prev,nt=G,_t=G.next;if(fe(D,nt,_t)>=0)return!1;let Rt=D.x,Kt=nt.x,Qt=_t.x,be=D.y,Fe=nt.y,er=_t.y,yr=RtKt?Rt>Qt?Rt:Qt:Kt>Qt?Kt:Qt,sn=be>Fe?be>er?be:er:Fe>er?Fe:er,xn=_t.next;for(;xn!==D;){if(xn.x>=yr&&xn.x<=Zr&&xn.y>=Er&&xn.y<=sn&&xt(Rt,be,Kt,Fe,Qt,er,xn.x,xn.y)&&fe(xn.prev,xn,xn.next)>=0)return!1;xn=xn.next}return!0}function xc(G,D,nt,_t){let Rt=G.prev,Kt=G,Qt=G.next;if(fe(Rt,Kt,Qt)>=0)return!1;let be=Rt.x,Fe=Kt.x,er=Qt.x,yr=Rt.y,Er=Kt.y,Zr=Qt.y,sn=beFe?be>er?be:er:Fe>er?Fe:er,$n=yr>Er?yr>Zr?yr:Zr:Er>Zr?Er:Zr,ki=ot(sn,xn,D,nt,_t),Aa=ot(Ln,$n,D,nt,_t),Xi=G.prevZ,ma=G.nextZ;for(;Xi&&Xi.z>=ki&&ma&&ma.z<=Aa;){if(Xi.x>=sn&&Xi.x<=Ln&&Xi.y>=xn&&Xi.y<=$n&&Xi!==Rt&&Xi!==Qt&&xt(be,yr,Fe,Er,er,Zr,Xi.x,Xi.y)&&fe(Xi.prev,Xi,Xi.next)>=0||(Xi=Xi.prevZ,ma.x>=sn&&ma.x<=Ln&&ma.y>=xn&&ma.y<=$n&&ma!==Rt&&ma!==Qt&&xt(be,yr,Fe,Er,er,Zr,ma.x,ma.y)&&fe(ma.prev,ma,ma.next)>=0))return!1;ma=ma.nextZ}for(;Xi&&Xi.z>=ki;){if(Xi.x>=sn&&Xi.x<=Ln&&Xi.y>=xn&&Xi.y<=$n&&Xi!==Rt&&Xi!==Qt&&xt(be,yr,Fe,Er,er,Zr,Xi.x,Xi.y)&&fe(Xi.prev,Xi,Xi.next)>=0)return!1;Xi=Xi.prevZ}for(;ma&&ma.z<=Aa;){if(ma.x>=sn&&ma.x<=Ln&&ma.y>=xn&&ma.y<=$n&&ma!==Rt&&ma!==Qt&&xt(be,yr,Fe,Er,er,Zr,ma.x,ma.y)&&fe(ma.prev,ma,ma.next)>=0)return!1;ma=ma.nextZ}return!0}function Eo(G,D){let nt=G;do{let _t=nt.prev,Rt=nt.next.next;!ye(_t,Rt)&&Yt(_t,nt,nt.next,Rt)&&nr(_t,Rt)&&nr(Rt,_t)&&(D.push(_t.i,nt.i,Rt.i),lr(nt),lr(nt.next),nt=G=Rt),nt=nt.next}while(nt!==G);return Tu(nt)}function Ss(G,D,nt,_t,Rt,Kt){let Qt=G;do{let be=Qt.next.next;for(;be!==Qt.prev;){if(Qt.i!==be.i&&Ut(Qt,be)){let Fe=Ye(Qt,be);return Qt=Tu(Qt,Qt.next),Fe=Tu(Fe,Fe.next),ol(Qt,D,nt,_t,Rt,Kt,0),void ol(Fe,D,nt,_t,Rt,Kt,0)}be=be.next}Qt=Qt.next}while(Qt!==G)}function Ml(G,D){return G.x-D.x}function yl(G,D){let nt=function(Rt,Kt){let Qt=Kt,be=Rt.x,Fe=Rt.y,er,yr=-1/0;do{if(Fe<=Qt.y&&Fe>=Qt.next.y&&Qt.next.y!==Qt.y){let Ln=Qt.x+(Fe-Qt.y)*(Qt.next.x-Qt.x)/(Qt.next.y-Qt.y);if(Ln<=be&&Ln>yr&&(yr=Ln,er=Qt.x=Qt.x&&Qt.x>=Zr&&be!==Qt.x&&xt(Feer.x||Qt.x===er.x&&Z(er,Qt)))&&(er=Qt,xn=Ln)}Qt=Qt.next}while(Qt!==Er);return er}(G,D);if(!nt)return D;let _t=Ye(nt,G);return Tu(_t,_t.next),Tu(nt,nt.next)}function Z(G,D){return fe(G.prev,G,D.prev)<0&&fe(D.next,G,G.next)<0}function ot(G,D,nt,_t,Rt){return(G=1431655765&((G=858993459&((G=252645135&((G=16711935&((G=(G-nt)*Rt|0)|G<<8))|G<<4))|G<<2))|G<<1))|(D=1431655765&((D=858993459&((D=252645135&((D=16711935&((D=(D-_t)*Rt|0)|D<<8))|D<<4))|D<<2))|D<<1))<<1}function et(G){let D=G,nt=G;do(D.x=(G-Qt)*(Kt-be)&&(G-Qt)*(_t-be)>=(nt-Qt)*(D-be)&&(nt-Qt)*(Kt-be)>=(Rt-Qt)*(_t-be)}function Ut(G,D){return G.next.i!==D.i&&G.prev.i!==D.i&&!function(nt,_t){let Rt=nt;do{if(Rt.i!==nt.i&&Rt.next.i!==nt.i&&Rt.i!==_t.i&&Rt.next.i!==_t.i&&Yt(Rt,Rt.next,nt,_t))return!0;Rt=Rt.next}while(Rt!==nt);return!1}(G,D)&&(nr(G,D)&&nr(D,G)&&function(nt,_t){let Rt=nt,Kt=!1,Qt=(nt.x+_t.x)/2,be=(nt.y+_t.y)/2;do Rt.y>be!=Rt.next.y>be&&Rt.next.y!==Rt.y&&Qt<(Rt.next.x-Rt.x)*(be-Rt.y)/(Rt.next.y-Rt.y)+Rt.x&&(Kt=!Kt),Rt=Rt.next;while(Rt!==nt);return Kt}(G,D)&&(fe(G.prev,G,D.prev)||fe(G,D.prev,D))||ye(G,D)&&fe(G.prev,G,G.next)>0&&fe(D.prev,D,D.next)>0)}function fe(G,D,nt){return(D.y-G.y)*(nt.x-D.x)-(D.x-G.x)*(nt.y-D.y)}function ye(G,D){return G.x===D.x&&G.y===D.y}function Yt(G,D,nt,_t){let Rt=Se(fe(G,D,nt)),Kt=Se(fe(G,D,_t)),Qt=Se(fe(nt,_t,G)),be=Se(fe(nt,_t,D));return Rt!==Kt&&Qt!==be||!(Rt!==0||!ce(G,nt,D))||!(Kt!==0||!ce(G,_t,D))||!(Qt!==0||!ce(nt,G,_t))||!(be!==0||!ce(nt,D,_t))}function ce(G,D,nt){return D.x<=Math.max(G.x,nt.x)&&D.x>=Math.min(G.x,nt.x)&&D.y<=Math.max(G.y,nt.y)&&D.y>=Math.min(G.y,nt.y)}function Se(G){return G>0?1:G<0?-1:0}function nr(G,D){return fe(G.prev,G,G.next)<0?fe(G,D,G.next)>=0&&fe(G,G.prev,D)>=0:fe(G,D,G.prev)<0||fe(G,G.next,D)<0}function Ye(G,D){let nt=hr(G.i,G.x,G.y),_t=hr(D.i,D.x,D.y),Rt=G.next,Kt=D.prev;return G.next=D,D.prev=G,nt.next=Rt,Rt.prev=nt,_t.next=nt,nt.prev=_t,Kt.next=_t,_t.prev=Kt,_t}function tr(G,D,nt,_t){let Rt=hr(G,D,nt);return _t?(Rt.next=_t.next,Rt.prev=_t,_t.next.prev=Rt,_t.next=Rt):(Rt.prev=Rt,Rt.next=Rt),Rt}function lr(G){G.next.prev=G.prev,G.prev.next=G.next,G.prevZ&&(G.prevZ.nextZ=G.nextZ),G.nextZ&&(G.nextZ.prevZ=G.prevZ)}function hr(G,D,nt){return{i:G,x:D,y:nt,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Ve(G,D,nt){let _t=nt.patternDependencies,Rt=!1;for(let Kt of D){let Qt=Kt.paint.get(`${G}-pattern`);Qt.isConstant()||(Rt=!0);let be=Qt.constantOr(null);be&&(Rt=!0,_t[be.to]=!0,_t[be.from]=!0)}return Rt}function Xe(G,D,nt,_t,Rt){let Kt=Rt.patternDependencies;for(let Qt of D){let be=Qt.paint.get(`${G}-pattern`).value;if(be.kind!=="constant"){let Fe=be.evaluate({zoom:_t-1},nt,{},Rt.availableImages),er=be.evaluate({zoom:_t},nt,{},Rt.availableImages),yr=be.evaluate({zoom:_t+1},nt,{},Rt.availableImages);Fe=Fe&&Fe.name?Fe.name:Fe,er=er&&er.name?er.name:er,yr=yr&&yr.name?yr.name:yr,Kt[Fe]=!0,Kt[er]=!0,Kt[yr]=!0,nt.patterns[Qt.id]={min:Fe,mid:er,max:yr}}}return nt}class $e{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(nt=>nt.id),this.index=D.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Yu,this.indexArray=new ir,this.indexArray2=new Mr,this.programConfigurations=new Gl(D.layers,D.zoom),this.segments=new vn,this.segments2=new vn,this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,_t){this.hasPattern=Ve("fill",this.layers,nt);let Rt=this.layers[0].layout.get("fill-sort-key"),Kt=!Rt.isConstant(),Qt=[];for(let{feature:be,id:Fe,index:er,sourceLayerIndex:yr}of D){let Er=this.layers[0]._featureFilter.needGeometry,Zr=Lr(be,Er);if(!this.layers[0]._featureFilter.filter(new Fl(this.zoom),Zr,_t))continue;let sn=Kt?Rt.evaluate(Zr,{},_t,nt.availableImages):void 0,xn={id:Fe,properties:be.properties,type:be.type,sourceLayerIndex:yr,index:er,geometry:Er?Zr.geometry:kr(be),patterns:{},sortKey:sn};Qt.push(xn)}Kt&&Qt.sort((be,Fe)=>be.sortKey-Fe.sortKey);for(let be of Qt){let{geometry:Fe,index:er,sourceLayerIndex:yr}=be;if(this.hasPattern){let Er=Xe("fill",this.layers,be,this.zoom,nt);this.patternFeatures.push(Er)}else this.addFeature(be,Fe,er,_t,{});nt.featureIndex.insert(D[er].feature,Fe,er,yr,this.index)}}update(D,nt,_t){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,_t)}addFeatures(D,nt,_t){for(let Rt of this.patternFeatures)this.addFeature(Rt,Rt.geometry,Rt.index,nt,_t)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,hu),this.indexBuffer=D.createIndexBuffer(this.indexArray),this.indexBuffer2=D.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(D,nt,_t,Rt,Kt){for(let Qt of Jc(nt,500)){let be=0;for(let sn of Qt)be+=sn.length;let Fe=this.segments.prepareSegment(be,this.layoutVertexArray,this.indexArray),er=Fe.vertexLength,yr=[],Er=[];for(let sn of Qt){if(sn.length===0)continue;sn!==Qt[0]&&Er.push(yr.length/2);let xn=this.segments2.prepareSegment(sn.length,this.layoutVertexArray,this.indexArray2),Ln=xn.vertexLength;this.layoutVertexArray.emplaceBack(sn[0].x,sn[0].y),this.indexArray2.emplaceBack(Ln+sn.length-1,Ln),yr.push(sn[0].x),yr.push(sn[0].y);for(let $n=1;$n>3}if(Rt--,_t===1||_t===2)Kt+=G.readSVarint(),Qt+=G.readSVarint(),_t===1&&(D&&be.push(D),D=[]),D.push(new Ki(Kt,Qt));else{if(_t!==7)throw new Error("unknown command "+_t);D&&D.push(D[0].clone())}}return D&&be.push(D),be},Si.prototype.bbox=function(){var G=this._pbf;G.pos=this._geometry;for(var D=G.readVarint()+G.pos,nt=1,_t=0,Rt=0,Kt=0,Qt=1/0,be=-1/0,Fe=1/0,er=-1/0;G.pos>3}if(_t--,nt===1||nt===2)(Rt+=G.readSVarint())be&&(be=Rt),(Kt+=G.readSVarint())er&&(er=Kt);else if(nt!==7)throw new Error("unknown command "+nt)}return[Qt,Fe,be,er]},Si.prototype.toGeoJSON=function(G,D,nt){var _t,Rt,Kt=this.extent*Math.pow(2,nt),Qt=this.extent*G,be=this.extent*D,Fe=this.loadGeometry(),er=Si.types[this.type];function yr(sn){for(var xn=0;xn>3;Rt=Qt===1?_t.readString():Qt===2?_t.readFloat():Qt===3?_t.readDouble():Qt===4?_t.readVarint64():Qt===5?_t.readVarint():Qt===6?_t.readSVarint():Qt===7?_t.readBoolean():null}return Rt}(nt))}vs.prototype.feature=function(G){if(G<0||G>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[G];var D=this._pbf.readVarint()+this._pbf.pos;return new so(this._pbf,D,this.extent,this._keys,this._values)};var jl=Vo;function dl(G,D,nt){if(G===3){var _t=new jl(nt,nt.readVarint()+nt.pos);_t.length&&(D[_t.name]=_t)}}di.VectorTile=function(G,D){this.layers=G.readFields(dl,{},D)},di.VectorTileFeature=Ai,di.VectorTileLayer=Vo;let Ul=di.VectorTileFeature.types,_c=Math.pow(2,13);function Ds(G,D,nt,_t,Rt,Kt,Qt,be){G.emplaceBack(D,nt,2*Math.floor(_t*_c)+Qt,Rt*_c*2,Kt*_c*2,Math.round(be))}class Au{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(nt=>nt.id),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new dc,this.centroidVertexArray=new Ws,this.indexArray=new ir,this.programConfigurations=new Gl(D.layers,D.zoom),this.segments=new vn,this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,_t){this.features=[],this.hasPattern=Ve("fill-extrusion",this.layers,nt);for(let{feature:Rt,id:Kt,index:Qt,sourceLayerIndex:be}of D){let Fe=this.layers[0]._featureFilter.needGeometry,er=Lr(Rt,Fe);if(!this.layers[0]._featureFilter.filter(new Fl(this.zoom),er,_t))continue;let yr={id:Kt,sourceLayerIndex:be,index:Qt,geometry:Fe?er.geometry:kr(Rt),properties:Rt.properties,type:Rt.type,patterns:{}};this.hasPattern?this.features.push(Xe("fill-extrusion",this.layers,yr,this.zoom,nt)):this.addFeature(yr,yr.geometry,Qt,_t,{}),nt.featureIndex.insert(Rt,yr.geometry,Qt,be,this.index,!0)}}addFeatures(D,nt,_t){for(let Rt of this.features){let{geometry:Kt}=Rt;this.addFeature(Rt,Kt,Rt.index,nt,_t)}}update(D,nt,_t){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,_t)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Mi),this.centroidVertexBuffer=D.createVertexBuffer(this.centroidVertexArray,Gn.members,!0),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(D,nt,_t,Rt,Kt){for(let Qt of Jc(nt,500)){let be={x:0,y:0,vertexCount:0},Fe=0;for(let xn of Qt)Fe+=xn.length;let er=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let xn of Qt){if(xn.length===0||zf(xn))continue;let Ln=0;for(let $n=0;$n=1){let Aa=xn[$n-1];if(!nf(ki,Aa)){er.vertexLength+4>vn.MAX_VERTEX_ARRAY_LENGTH&&(er=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let Xi=ki.sub(Aa)._perp()._unit(),ma=Aa.dist(ki);Ln+ma>32768&&(Ln=0),Ds(this.layoutVertexArray,ki.x,ki.y,Xi.x,Xi.y,0,0,Ln),Ds(this.layoutVertexArray,ki.x,ki.y,Xi.x,Xi.y,0,1,Ln),be.x+=2*ki.x,be.y+=2*ki.y,be.vertexCount+=2,Ln+=ma,Ds(this.layoutVertexArray,Aa.x,Aa.y,Xi.x,Xi.y,0,0,Ln),Ds(this.layoutVertexArray,Aa.x,Aa.y,Xi.x,Xi.y,0,1,Ln),be.x+=2*Aa.x,be.y+=2*Aa.y,be.vertexCount+=2;let Ga=er.vertexLength;this.indexArray.emplaceBack(Ga,Ga+2,Ga+1),this.indexArray.emplaceBack(Ga+1,Ga+2,Ga+3),er.vertexLength+=4,er.primitiveLength+=2}}}}if(er.vertexLength+Fe>vn.MAX_VERTEX_ARRAY_LENGTH&&(er=this.segments.prepareSegment(Fe,this.layoutVertexArray,this.indexArray)),Ul[D.type]!=="Polygon")continue;let yr=[],Er=[],Zr=er.vertexLength;for(let xn of Qt)if(xn.length!==0){xn!==Qt[0]&&Er.push(yr.length/2);for(let Ln=0;LnQl)||G.y===D.y&&(G.y<0||G.y>Ql)}function zf(G){return G.every(D=>D.x<0)||G.every(D=>D.x>Ql)||G.every(D=>D.y<0)||G.every(D=>D.y>Ql)}let Np;Ji("FillExtrusionBucket",Au,{omit:["layers","features"]});var b0={get paint(){return Np=Np||new qt({"fill-extrusion-opacity":new es(ut["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new zs(ut["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new es(ut["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new es(ut["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new qc(ut["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new zs(ut["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new zs(ut["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new es(ut["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class kp extends ht{constructor(D){super(D,b0)}createBucket(D){return new Au(D)}queryRadius(){return Oi(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(D,nt,_t,Rt,Kt,Qt,be,Fe){let er=_i(D,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Qt.angle,be),yr=this.paint.get("fill-extrusion-height").evaluate(nt,_t),Er=this.paint.get("fill-extrusion-base").evaluate(nt,_t),Zr=function(xn,Ln,$n,ki){let Aa=[];for(let Xi of xn){let ma=[Xi.x,Xi.y,0,1];$i(ma,ma,Ln),Aa.push(new o(ma[0]/ma[3],ma[1]/ma[3]))}return Aa}(er,Fe),sn=function(xn,Ln,$n,ki){let Aa=[],Xi=[],ma=ki[8]*Ln,Ga=ki[9]*Ln,To=ki[10]*Ln,As=ki[11]*Ln,Sl=ki[8]*$n,ys=ki[9]*$n,cs=ki[10]*$n,Ys=ki[11]*$n;for(let Bs of xn){let Is=[],oo=[];for(let nl of Bs){let Ks=nl.x,Wl=nl.y,uh=ki[0]*Ks+ki[4]*Wl+ki[12],nh=ki[1]*Ks+ki[5]*Wl+ki[13],gd=ki[2]*Ks+ki[6]*Wl+ki[14],Ep=ki[3]*Ks+ki[7]*Wl+ki[15],If=gd+To,td=Ep+As,dp=uh+Sl,pp=nh+ys,mp=gd+cs,of=Ep+Ys,vd=new o((uh+ma)/td,(nh+Ga)/td);vd.z=If/td,Is.push(vd);let rp=new o(dp/of,pp/of);rp.z=mp/of,oo.push(rp)}Aa.push(Is),Xi.push(oo)}return[Aa,Xi]}(Rt,Er,yr,Fe);return function(xn,Ln,$n){let ki=1/0;ni($n,Ln)&&(ki=R0($n,Ln[0]));for(let Aa=0;Aant.id),this.index=D.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(nt=>{this.gradients[nt.id]={}}),this.layoutVertexArray=new Zc,this.layoutVertexArray2=new At,this.indexArray=new ir,this.programConfigurations=new Gl(D.layers,D.zoom),this.segments=new vn,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,_t){this.hasPattern=Ve("line",this.layers,nt);let Rt=this.layers[0].layout.get("line-sort-key"),Kt=!Rt.isConstant(),Qt=[];for(let{feature:be,id:Fe,index:er,sourceLayerIndex:yr}of D){let Er=this.layers[0]._featureFilter.needGeometry,Zr=Lr(be,Er);if(!this.layers[0]._featureFilter.filter(new Fl(this.zoom),Zr,_t))continue;let sn=Kt?Rt.evaluate(Zr,{},_t):void 0,xn={id:Fe,properties:be.properties,type:be.type,sourceLayerIndex:yr,index:er,geometry:Er?Zr.geometry:kr(be),patterns:{},sortKey:sn};Qt.push(xn)}Kt&&Qt.sort((be,Fe)=>be.sortKey-Fe.sortKey);for(let be of Qt){let{geometry:Fe,index:er,sourceLayerIndex:yr}=be;if(this.hasPattern){let Er=Xe("line",this.layers,be,this.zoom,nt);this.patternFeatures.push(Er)}else this.addFeature(be,Fe,er,_t,{});nt.featureIndex.insert(D[er].feature,Fe,er,yr,this.index)}}update(D,nt,_t){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,_t)}addFeatures(D,nt,_t){for(let Rt of this.patternFeatures)this.addFeature(Rt,Rt.geometry,Rt.index,nt,_t)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=D.createVertexBuffer(this.layoutVertexArray2,Q0)),this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Ap),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(D){if(D.properties&&Object.prototype.hasOwnProperty.call(D.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(D.properties,"mapbox_clip_end"))return{start:+D.properties.mapbox_clip_start,end:+D.properties.mapbox_clip_end}}addFeature(D,nt,_t,Rt,Kt){let Qt=this.layers[0].layout,be=Qt.get("line-join").evaluate(D,{}),Fe=Qt.get("line-cap"),er=Qt.get("line-miter-limit"),yr=Qt.get("line-round-limit");this.lineClips=this.lineFeatureClips(D);for(let Er of nt)this.addLine(Er,D,be,Fe,er,yr);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,_t,Kt,Rt)}addLine(D,nt,_t,Rt,Kt,Qt){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let ki=0;ki=2&&D[Fe-1].equals(D[Fe-2]);)Fe--;let er=0;for(;er0;if(As&&ki>er){let Ys=Zr.dist(sn);if(Ys>2*yr){let Bs=Zr.sub(Zr.sub(sn)._mult(yr/Ys)._round());this.updateDistance(sn,Bs),this.addCurrentVertex(Bs,Ln,0,0,Er),sn=Bs}}let ys=sn&&xn,cs=ys?_t:be?"butt":Rt;if(ys&&cs==="round"&&(GaKt&&(cs="bevel"),cs==="bevel"&&(Ga>2&&(cs="flipbevel"),Ga100)Aa=$n.mult(-1);else{let Ys=Ga*Ln.add($n).mag()/Ln.sub($n).mag();Aa._perp()._mult(Ys*(Sl?-1:1))}this.addCurrentVertex(Zr,Aa,0,0,Er),this.addCurrentVertex(Zr,Aa.mult(-1),0,0,Er)}else if(cs==="bevel"||cs==="fakeround"){let Ys=-Math.sqrt(Ga*Ga-1),Bs=Sl?Ys:0,Is=Sl?0:Ys;if(sn&&this.addCurrentVertex(Zr,Ln,Bs,Is,Er),cs==="fakeround"){let oo=Math.round(180*To/Math.PI/20);for(let nl=1;nl2*yr){let Bs=Zr.add(xn.sub(Zr)._mult(yr/Ys)._round());this.updateDistance(Zr,Bs),this.addCurrentVertex(Bs,$n,0,0,Er),Zr=Bs}}}}addCurrentVertex(D,nt,_t,Rt,Kt,Qt=!1){let be=nt.y*Rt-nt.x,Fe=-nt.y-nt.x*Rt;this.addHalfVertex(D,nt.x+nt.y*_t,nt.y-nt.x*_t,Qt,!1,_t,Kt),this.addHalfVertex(D,be,Fe,Qt,!0,-Rt,Kt),this.distance>Sp/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(D,nt,_t,Rt,Kt,Qt))}addHalfVertex({x:D,y:nt},_t,Rt,Kt,Qt,be,Fe){let er=.5*(this.lineClips?this.scaledDistance*(Sp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((D<<1)+(Kt?1:0),(nt<<1)+(Qt?1:0),Math.round(63*_t)+128,Math.round(63*Rt)+128,1+(be===0?0:be<0?-1:1)|(63&er)<<2,er>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let yr=Fe.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,yr),Fe.primitiveLength++),Qt?this.e2=yr:this.e1=yr}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(D,nt){this.distance+=D.dist(nt),this.updateScaledDistance()}}let Wm,Pg;Ji("LineBucket",ep,{omit:["layers","patternFeatures"]});var qm={get paint(){return Pg=Pg||new qt({"line-opacity":new zs(ut.paint_line["line-opacity"]),"line-color":new zs(ut.paint_line["line-color"]),"line-translate":new es(ut.paint_line["line-translate"]),"line-translate-anchor":new es(ut.paint_line["line-translate-anchor"]),"line-width":new zs(ut.paint_line["line-width"]),"line-gap-width":new zs(ut.paint_line["line-gap-width"]),"line-offset":new zs(ut.paint_line["line-offset"]),"line-blur":new zs(ut.paint_line["line-blur"]),"line-dasharray":new Zu(ut.paint_line["line-dasharray"]),"line-pattern":new qc(ut.paint_line["line-pattern"]),"line-gradient":new Zf(ut.paint_line["line-gradient"])})},get layout(){return Wm=Wm||new qt({"line-cap":new es(ut.layout_line["line-cap"]),"line-join":new zs(ut.layout_line["line-join"]),"line-miter-limit":new es(ut.layout_line["line-miter-limit"]),"line-round-limit":new es(ut.layout_line["line-round-limit"]),"line-sort-key":new zs(ut.layout_line["line-sort-key"])})}};class dd extends zs{possiblyEvaluate(D,nt){return nt=new Fl(Math.floor(nt.zoom),{now:nt.now,fadeDuration:nt.fadeDuration,zoomHistory:nt.zoomHistory,transition:nt.transition}),super.possiblyEvaluate(D,nt)}evaluate(D,nt,_t,Rt){return nt=M({},nt,{zoom:Math.floor(nt.zoom)}),super.evaluate(D,nt,_t,Rt)}}let wm;class zg extends ht{constructor(D){super(D,qm),this.gradientVersion=0,wm||(wm=new dd(qm.paint.properties["line-width"].specification),wm.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(D){if(D==="line-gradient"){let nt=this.gradientExpression();this.stepInterpolant=!!function(_t){return _t._styleExpression!==void 0}(nt)&&nt._styleExpression.expression instanceof Zn,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(D,nt){super.recalculate(D,nt),this.paint._values["line-floorwidth"]=wm.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,D)}createBucket(D){return new ep(D)}queryRadius(D){let nt=D,_t=pd(Nn("line-width",this,nt),Nn("line-gap-width",this,nt)),Rt=Nn("line-offset",this,nt);return _t/2+Math.abs(Rt)+Oi(this.paint.get("line-translate"))}queryIntersectsFeature(D,nt,_t,Rt,Kt,Qt,be){let Fe=_i(D,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Qt.angle,be),er=be/2*pd(this.paint.get("line-width").evaluate(nt,_t),this.paint.get("line-gap-width").evaluate(nt,_t)),yr=this.paint.get("line-offset").evaluate(nt,_t);return yr&&(Rt=function(Er,Zr){let sn=[];for(let xn=0;xn=3){for(let $n=0;$n0?D+2*G:G}let Zm=ke([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Cv=ke([{name:"a_projected_pos",components:3,type:"Float32"}],4);ke([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let Lv=ke([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ke([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let B0=ke([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Ig=ke([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function af(G,D,nt){return G.sections.forEach(_t=>{_t.text=function(Rt,Kt,Qt){let be=Kt.layout.get("text-transform").evaluate(Qt,{});return be==="uppercase"?Rt=Rt.toLocaleUpperCase():be==="lowercase"&&(Rt=Rt.toLocaleLowerCase()),$l.applyArabicShaping&&(Rt=$l.applyArabicShaping(Rt)),Rt}(_t.text,D,nt)}),G}ke([{name:"triangle",components:3,type:"Uint16"}]),ke([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ke([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),ke([{type:"Float32",name:"offsetX"}]),ke([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ke([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let md={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var bc=24,Og=zc,Pv=function(G,D,nt,_t,Rt){var Kt,Qt,be=8*Rt-_t-1,Fe=(1<>1,yr=-7,Er=Rt-1,Zr=-1,sn=G[D+Er];for(Er+=Zr,Kt=sn&(1<<-yr)-1,sn>>=-yr,yr+=be;yr>0;Kt=256*Kt+G[D+Er],Er+=Zr,yr-=8);for(Qt=Kt&(1<<-yr)-1,Kt>>=-yr,yr+=_t;yr>0;Qt=256*Qt+G[D+Er],Er+=Zr,yr-=8);if(Kt===0)Kt=1-er;else{if(Kt===Fe)return Qt?NaN:1/0*(sn?-1:1);Qt+=Math.pow(2,_t),Kt-=er}return(sn?-1:1)*Qt*Math.pow(2,Kt-_t)},yx=function(G,D,nt,_t,Rt,Kt){var Qt,be,Fe,er=8*Kt-Rt-1,yr=(1<>1,Zr=Rt===23?Math.pow(2,-24)-Math.pow(2,-77):0,sn=0,xn=1,Ln=D<0||D===0&&1/D<0?1:0;for(D=Math.abs(D),isNaN(D)||D===1/0?(be=isNaN(D)?1:0,Qt=yr):(Qt=Math.floor(Math.log(D)/Math.LN2),D*(Fe=Math.pow(2,-Qt))<1&&(Qt--,Fe*=2),(D+=Qt+Er>=1?Zr/Fe:Zr*Math.pow(2,1-Er))*Fe>=2&&(Qt++,Fe/=2),Qt+Er>=yr?(be=0,Qt=yr):Qt+Er>=1?(be=(D*Fe-1)*Math.pow(2,Rt),Qt+=Er):(be=D*Math.pow(2,Er-1)*Math.pow(2,Rt),Qt=0));Rt>=8;G[nt+sn]=255&be,sn+=xn,be/=256,Rt-=8);for(Qt=Qt<0;G[nt+sn]=255&Qt,sn+=xn,Qt/=256,er-=8);G[nt+sn-xn]|=128*Ln};function zc(G){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(G)?G:new Uint8Array(G||0),this.pos=0,this.type=0,this.length=this.buf.length}zc.Varint=0,zc.Fixed64=1,zc.Bytes=2,zc.Fixed32=5;var km=4294967296,xx=1/km,Dg=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function N0(G){return G.type===zc.Bytes?G.readVarint()+G.pos:G.pos+1}function mb(G,D,nt){return nt?4294967296*D+(G>>>0):4294967296*(D>>>0)+(G>>>0)}function zv(G,D,nt){var _t=D<=16383?1:D<=2097151?2:D<=268435455?3:Math.floor(Math.log(D)/(7*Math.LN2));nt.realloc(_t);for(var Rt=nt.pos-1;Rt>=G;Rt--)nt.buf[Rt+_t]=nt.buf[Rt]}function CT(G,D){for(var nt=0;nt>>8,G[nt+2]=D>>>16,G[nt+3]=D>>>24}function C3(G,D){return(G[D]|G[D+1]<<8|G[D+2]<<16)+(G[D+3]<<24)}zc.prototype={destroy:function(){this.buf=null},readFields:function(G,D,nt){for(nt=nt||this.length;this.pos>3,Kt=this.pos;this.type=7&_t,G(Rt,D,this),this.pos===Kt&&this.skip(_t)}return D},readMessage:function(G,D){return this.readFields(G,D,this.readVarint()+this.pos)},readFixed32:function(){var G=bx(this.buf,this.pos);return this.pos+=4,G},readSFixed32:function(){var G=C3(this.buf,this.pos);return this.pos+=4,G},readFixed64:function(){var G=bx(this.buf,this.pos)+bx(this.buf,this.pos+4)*km;return this.pos+=8,G},readSFixed64:function(){var G=bx(this.buf,this.pos)+C3(this.buf,this.pos+4)*km;return this.pos+=8,G},readFloat:function(){var G=Pv(this.buf,this.pos,!0,23,4);return this.pos+=4,G},readDouble:function(){var G=Pv(this.buf,this.pos,!0,52,8);return this.pos+=8,G},readVarint:function(G){var D,nt,_t=this.buf;return D=127&(nt=_t[this.pos++]),nt<128?D:(D|=(127&(nt=_t[this.pos++]))<<7,nt<128?D:(D|=(127&(nt=_t[this.pos++]))<<14,nt<128?D:(D|=(127&(nt=_t[this.pos++]))<<21,nt<128?D:function(Rt,Kt,Qt){var be,Fe,er=Qt.buf;if(be=(112&(Fe=er[Qt.pos++]))>>4,Fe<128||(be|=(127&(Fe=er[Qt.pos++]))<<3,Fe<128)||(be|=(127&(Fe=er[Qt.pos++]))<<10,Fe<128)||(be|=(127&(Fe=er[Qt.pos++]))<<17,Fe<128)||(be|=(127&(Fe=er[Qt.pos++]))<<24,Fe<128)||(be|=(1&(Fe=er[Qt.pos++]))<<31,Fe<128))return mb(Rt,be,Kt);throw new Error("Expected varint not more than 10 bytes")}(D|=(15&(nt=_t[this.pos]))<<28,G,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var G=this.readVarint();return G%2==1?(G+1)/-2:G/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var G=this.readVarint()+this.pos,D=this.pos;return this.pos=G,G-D>=12&&Dg?function(nt,_t,Rt){return Dg.decode(nt.subarray(_t,Rt))}(this.buf,D,G):function(nt,_t,Rt){for(var Kt="",Qt=_t;Qt239?4:yr>223?3:yr>191?2:1;if(Qt+Zr>Rt)break;Zr===1?yr<128&&(Er=yr):Zr===2?(192&(be=nt[Qt+1]))==128&&(Er=(31&yr)<<6|63&be)<=127&&(Er=null):Zr===3?(Fe=nt[Qt+2],(192&(be=nt[Qt+1]))==128&&(192&Fe)==128&&((Er=(15&yr)<<12|(63&be)<<6|63&Fe)<=2047||Er>=55296&&Er<=57343)&&(Er=null)):Zr===4&&(Fe=nt[Qt+2],er=nt[Qt+3],(192&(be=nt[Qt+1]))==128&&(192&Fe)==128&&(192&er)==128&&((Er=(15&yr)<<18|(63&be)<<12|(63&Fe)<<6|63&er)<=65535||Er>=1114112)&&(Er=null)),Er===null?(Er=65533,Zr=1):Er>65535&&(Er-=65536,Kt+=String.fromCharCode(Er>>>10&1023|55296),Er=56320|1023&Er),Kt+=String.fromCharCode(Er),Qt+=Zr}return Kt}(this.buf,D,G)},readBytes:function(){var G=this.readVarint()+this.pos,D=this.buf.subarray(this.pos,G);return this.pos=G,D},readPackedVarint:function(G,D){if(this.type!==zc.Bytes)return G.push(this.readVarint(D));var nt=N0(this);for(G=G||[];this.pos127;);else if(D===zc.Bytes)this.pos=this.readVarint()+this.pos;else if(D===zc.Fixed32)this.pos+=4;else{if(D!==zc.Fixed64)throw new Error("Unimplemented type: "+D);this.pos+=8}},writeTag:function(G,D){this.writeVarint(G<<3|D)},realloc:function(G){for(var D=this.length||16;D268435455||G<0?function(D,nt){var _t,Rt;if(D>=0?(_t=D%4294967296|0,Rt=D/4294967296|0):(Rt=~(-D/4294967296),4294967295^(_t=~(-D%4294967296))?_t=_t+1|0:(_t=0,Rt=Rt+1|0)),D>=18446744073709552e3||D<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");nt.realloc(10),function(Kt,Qt,be){be.buf[be.pos++]=127&Kt|128,Kt>>>=7,be.buf[be.pos++]=127&Kt|128,Kt>>>=7,be.buf[be.pos++]=127&Kt|128,Kt>>>=7,be.buf[be.pos++]=127&Kt|128,be.buf[be.pos]=127&(Kt>>>=7)}(_t,0,nt),function(Kt,Qt){var be=(7&Kt)<<4;Qt.buf[Qt.pos++]|=be|((Kt>>>=3)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt)))))}(Rt,nt)}(G,this):(this.realloc(4),this.buf[this.pos++]=127&G|(G>127?128:0),G<=127||(this.buf[this.pos++]=127&(G>>>=7)|(G>127?128:0),G<=127||(this.buf[this.pos++]=127&(G>>>=7)|(G>127?128:0),G<=127||(this.buf[this.pos++]=G>>>7&127))))},writeSVarint:function(G){this.writeVarint(G<0?2*-G-1:2*G)},writeBoolean:function(G){this.writeVarint(!!G)},writeString:function(G){G=String(G),this.realloc(4*G.length),this.pos++;var D=this.pos;this.pos=function(_t,Rt,Kt){for(var Qt,be,Fe=0;Fe55295&&Qt<57344){if(!be){Qt>56319||Fe+1===Rt.length?(_t[Kt++]=239,_t[Kt++]=191,_t[Kt++]=189):be=Qt;continue}if(Qt<56320){_t[Kt++]=239,_t[Kt++]=191,_t[Kt++]=189,be=Qt;continue}Qt=be-55296<<10|Qt-56320|65536,be=null}else be&&(_t[Kt++]=239,_t[Kt++]=191,_t[Kt++]=189,be=null);Qt<128?_t[Kt++]=Qt:(Qt<2048?_t[Kt++]=Qt>>6|192:(Qt<65536?_t[Kt++]=Qt>>12|224:(_t[Kt++]=Qt>>18|240,_t[Kt++]=Qt>>12&63|128),_t[Kt++]=Qt>>6&63|128),_t[Kt++]=63&Qt|128)}return Kt}(this.buf,G,this.pos);var nt=this.pos-D;nt>=128&&zv(D,nt,this),this.pos=D-1,this.writeVarint(nt),this.pos+=nt},writeFloat:function(G){this.realloc(4),yx(this.buf,G,this.pos,!0,23,4),this.pos+=4},writeDouble:function(G){this.realloc(8),yx(this.buf,G,this.pos,!0,52,8),this.pos+=8},writeBytes:function(G){var D=G.length;this.writeVarint(D),this.realloc(D);for(var nt=0;nt=128&&zv(nt,_t,this),this.pos=nt-1,this.writeVarint(_t),this.pos+=_t},writeMessage:function(G,D,nt){this.writeTag(G,zc.Bytes),this.writeRawMessage(D,nt)},writePackedVarint:function(G,D){D.length&&this.writeMessage(G,CT,D)},writePackedSVarint:function(G,D){D.length&&this.writeMessage(G,LT,D)},writePackedBoolean:function(G,D){D.length&&this.writeMessage(G,IT,D)},writePackedFloat:function(G,D){D.length&&this.writeMessage(G,PT,D)},writePackedDouble:function(G,D){D.length&&this.writeMessage(G,zT,D)},writePackedFixed32:function(G,D){D.length&&this.writeMessage(G,OT,D)},writePackedSFixed32:function(G,D){D.length&&this.writeMessage(G,DT,D)},writePackedFixed64:function(G,D){D.length&&this.writeMessage(G,FT,D)},writePackedSFixed64:function(G,D){D.length&&this.writeMessage(G,_x,D)},writeBytesField:function(G,D){this.writeTag(G,zc.Bytes),this.writeBytes(D)},writeFixed32Field:function(G,D){this.writeTag(G,zc.Fixed32),this.writeFixed32(D)},writeSFixed32Field:function(G,D){this.writeTag(G,zc.Fixed32),this.writeSFixed32(D)},writeFixed64Field:function(G,D){this.writeTag(G,zc.Fixed64),this.writeFixed64(D)},writeSFixed64Field:function(G,D){this.writeTag(G,zc.Fixed64),this.writeSFixed64(D)},writeVarintField:function(G,D){this.writeTag(G,zc.Varint),this.writeVarint(D)},writeSVarintField:function(G,D){this.writeTag(G,zc.Varint),this.writeSVarint(D)},writeStringField:function(G,D){this.writeTag(G,zc.Bytes),this.writeString(D)},writeFloatField:function(G,D){this.writeTag(G,zc.Fixed32),this.writeFloat(D)},writeDoubleField:function(G,D){this.writeTag(G,zc.Fixed64),this.writeDouble(D)},writeBooleanField:function(G,D){this.writeVarintField(G,!!D)}};var gb=r(Og);let wx=3;function RT(G,D,nt){G===1&&nt.readMessage(L3,D)}function L3(G,D,nt){if(G===3){let{id:_t,bitmap:Rt,width:Kt,height:Qt,left:be,top:Fe,advance:er}=nt.readMessage(vb,{});D.push({id:_t,bitmap:new Nl({width:Kt+2*wx,height:Qt+2*wx},Rt),metrics:{width:Kt,height:Qt,left:be,top:Fe,advance:er}})}}function vb(G,D,nt){G===1?D.id=nt.readVarint():G===2?D.bitmap=nt.readBytes():G===3?D.width=nt.readVarint():G===4?D.height=nt.readVarint():G===5?D.left=nt.readSVarint():G===6?D.top=nt.readSVarint():G===7&&(D.advance=nt.readVarint())}let yb=wx;function kx(G){let D=0,nt=0;for(let Qt of G)D+=Qt.w*Qt.h,nt=Math.max(nt,Qt.w);G.sort((Qt,be)=>be.h-Qt.h);let _t=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(D/.95)),nt),h:1/0}],Rt=0,Kt=0;for(let Qt of G)for(let be=_t.length-1;be>=0;be--){let Fe=_t[be];if(!(Qt.w>Fe.w||Qt.h>Fe.h)){if(Qt.x=Fe.x,Qt.y=Fe.y,Kt=Math.max(Kt,Qt.y+Qt.h),Rt=Math.max(Rt,Qt.x+Qt.w),Qt.w===Fe.w&&Qt.h===Fe.h){let er=_t.pop();be<_t.length&&(_t[be]=er)}else Qt.h===Fe.h?(Fe.x+=Qt.w,Fe.w-=Qt.w):Qt.w===Fe.w?(Fe.y+=Qt.h,Fe.h-=Qt.h):(_t.push({x:Fe.x+Qt.w,y:Fe.y,w:Fe.w-Qt.w,h:Qt.h}),Fe.y+=Qt.h,Fe.h-=Qt.h);break}}return{w:Rt,h:Kt,fill:D/(Rt*Kt)||0}}let Qf=1;class Zd{constructor(D,{pixelRatio:nt,version:_t,stretchX:Rt,stretchY:Kt,content:Qt,textFitWidth:be,textFitHeight:Fe}){this.paddedRect=D,this.pixelRatio=nt,this.stretchX=Rt,this.stretchY=Kt,this.content=Qt,this.version=_t,this.textFitWidth=be,this.textFitHeight=Fe}get tl(){return[this.paddedRect.x+Qf,this.paddedRect.y+Qf]}get br(){return[this.paddedRect.x+this.paddedRect.w-Qf,this.paddedRect.y+this.paddedRect.h-Qf]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*Qf)/this.pixelRatio,(this.paddedRect.h-2*Qf)/this.pixelRatio]}}class P3{constructor(D,nt){let _t={},Rt={};this.haveRenderCallbacks=[];let Kt=[];this.addImages(D,_t,Kt),this.addImages(nt,Rt,Kt);let{w:Qt,h:be}=kx(Kt),Fe=new Al({width:Qt||1,height:be||1});for(let er in D){let yr=D[er],Er=_t[er].paddedRect;Al.copy(yr.data,Fe,{x:0,y:0},{x:Er.x+Qf,y:Er.y+Qf},yr.data)}for(let er in nt){let yr=nt[er],Er=Rt[er].paddedRect,Zr=Er.x+Qf,sn=Er.y+Qf,xn=yr.data.width,Ln=yr.data.height;Al.copy(yr.data,Fe,{x:0,y:0},{x:Zr,y:sn},yr.data),Al.copy(yr.data,Fe,{x:0,y:Ln-1},{x:Zr,y:sn-1},{width:xn,height:1}),Al.copy(yr.data,Fe,{x:0,y:0},{x:Zr,y:sn+Ln},{width:xn,height:1}),Al.copy(yr.data,Fe,{x:xn-1,y:0},{x:Zr-1,y:sn},{width:1,height:Ln}),Al.copy(yr.data,Fe,{x:0,y:0},{x:Zr+xn,y:sn},{width:1,height:Ln})}this.image=Fe,this.iconPositions=_t,this.patternPositions=Rt}addImages(D,nt,_t){for(let Rt in D){let Kt=D[Rt],Qt={x:0,y:0,w:Kt.data.width+2*Qf,h:Kt.data.height+2*Qf};_t.push(Qt),nt[Rt]=new Zd(Qt,Kt),Kt.hasRenderCallback&&this.haveRenderCallbacks.push(Rt)}}patchUpdatedImages(D,nt){D.dispatchRenderCallbacks(this.haveRenderCallbacks);for(let _t in D.updatedImages)this.patchUpdatedImage(this.iconPositions[_t],D.getImage(_t),nt),this.patchUpdatedImage(this.patternPositions[_t],D.getImage(_t),nt)}patchUpdatedImage(D,nt,_t){if(!D||!nt||D.version===nt.version)return;D.version=nt.version;let[Rt,Kt]=D.tl;_t.update(nt.data,void 0,{x:Rt,y:Kt})}}var $m;Ji("ImagePosition",Zd),Ji("ImageAtlas",P3),t.ah=void 0,($m=t.ah||(t.ah={}))[$m.none=0]="none",$m[$m.horizontal=1]="horizontal",$m[$m.vertical=2]="vertical",$m[$m.horizontalOnly=3]="horizontalOnly";let Ov=-17;class $1{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(D,nt){let _t=new $1;return _t.scale=D||1,_t.fontStack=nt,_t}static forImage(D){let nt=new $1;return nt.imageName=D,nt}}class Dv{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(D,nt){let _t=new Dv;for(let Rt=0;Rt=0&&_t>=D&&Ax[this.text.charCodeAt(_t)];_t--)nt--;this.text=this.text.substring(D,nt),this.sectionIndex=this.sectionIndex.slice(D,nt)}substring(D,nt){let _t=new Dv;return _t.text=this.text.substring(D,nt),_t.sectionIndex=this.sectionIndex.slice(D,nt),_t.sections=this.sections,_t}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((D,nt)=>Math.max(D,this.sections[nt].scale),0)}addTextSection(D,nt){this.text+=D.text,this.sections.push($1.forText(D.scale,D.fontStack||nt));let _t=this.sections.length-1;for(let Rt=0;Rt=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Tx(G,D,nt,_t,Rt,Kt,Qt,be,Fe,er,yr,Er,Zr,sn,xn){let Ln=Dv.fromFeature(G,Rt),$n;Er===t.ah.vertical&&Ln.verticalizePunctuation();let{processBidirectionalText:ki,processStyledBidirectionalText:Aa}=$l;if(ki&&Ln.sections.length===1){$n=[];let Ga=ki(Ln.toString(),Fg(Ln,er,Kt,D,_t,sn));for(let To of Ga){let As=new Dv;As.text=To,As.sections=Ln.sections;for(let Sl=0;Sl0&&k0>Od&&(Od=k0)}else{let ch=As[rc.fontStack],Dd=ch&&ch[$c];if(Dd&&Dd.rect)Wv=Dd.rect,kh=Dd.metrics;else{let k0=To[rc.fontStack],Vp=k0&&k0[$c];if(!Vp)continue;kh=Vp.metrics}$h=(vd-rc.scale)*bc}np?(Ga.verticalizable=!0,gp.push({glyph:$c,imageName:j0,x:Wl,y:uh+$h,vertical:np,scale:rc.scale,fontStack:rc.fontStack,sectionIndex:Ic,metrics:kh,rect:Wv}),Wl+=U0*rc.scale+oo):(gp.push({glyph:$c,imageName:j0,x:Wl,y:uh+$h,vertical:np,scale:rc.scale,fontStack:rc.fontStack,sectionIndex:Ic,metrics:kh,rect:Wv}),Wl+=kh.advance*rc.scale+oo)}gp.length!==0&&(nh=Math.max(Wl-oo,nh),jT(gp,0,gp.length-1,Ep,Od)),Wl=0;let Up=cs*vd+Od;Gd.lineOffset=Math.max(Od,rp),uh+=Up,gd=Math.max(Up,gd),++If}var td;let dp=uh-Ov,{horizontalAlign:pp,verticalAlign:mp}=_b(Ys);(function(of,vd,rp,Gd,gp,Od,Up,wh,rc){let Ic=(vd-rp)*gp,$c=0;$c=Od!==Up?-wh*Gd-Ov:(-Gd*rc+.5)*Up;for(let $h of of)for(let kh of $h.positionedGlyphs)kh.x+=Ic,kh.y+=$c})(Ga.positionedLines,Ep,pp,mp,nh,gd,cs,dp,ys.length),Ga.top+=-mp*dp,Ga.bottom=Ga.top+dp,Ga.left+=-pp*nh,Ga.right=Ga.left+nh}(ma,D,nt,_t,$n,Qt,be,Fe,Er,er,Zr,xn),!function(Ga){for(let To of Ga)if(To.positionedGlyphs.length!==0)return!1;return!0}(Xi)&&ma}let Ax={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},BT={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},NT={40:!0};function Mx(G,D,nt,_t,Rt,Kt){if(D.imageName){let Qt=_t[D.imageName];return Qt?Qt.displaySize[0]*D.scale*bc/Kt+Rt:0}{let Qt=nt[D.fontStack],be=Qt&&Qt[G];return be?be.metrics.advance*D.scale+Rt:0}}function z3(G,D,nt,_t){let Rt=Math.pow(G-D,2);return _t?G=0,er=0;for(let Er=0;Erer){let yr=Math.ceil(Kt/er);Rt*=yr/Qt,Qt=yr}return{x1:_t,y1:Rt,x2:_t+Kt,y2:Rt+Qt}}function O3(G,D,nt,_t,Rt,Kt){let Qt=G.image,be;if(Qt.content){let $n=Qt.content,ki=Qt.pixelRatio||1;be=[$n[0]/ki,$n[1]/ki,Qt.displaySize[0]-$n[2]/ki,Qt.displaySize[1]-$n[3]/ki]}let Fe=D.left*Kt,er=D.right*Kt,yr,Er,Zr,sn;nt==="width"||nt==="both"?(sn=Rt[0]+Fe-_t[3],Er=Rt[0]+er+_t[1]):(sn=Rt[0]+(Fe+er-Qt.displaySize[0])/2,Er=sn+Qt.displaySize[0]);let xn=D.top*Kt,Ln=D.bottom*Kt;return nt==="height"||nt==="both"?(yr=Rt[1]+xn-_t[0],Zr=Rt[1]+Ln+_t[2]):(yr=Rt[1]+(xn+Ln-Qt.displaySize[1])/2,Zr=yr+Qt.displaySize[1]),{image:Qt,top:yr,right:Er,bottom:Zr,left:sn,collisionPadding:be}}let G1=255,tm=128,Gm=G1*tm;function D3(G,D){let{expression:nt}=D;if(nt.kind==="constant")return{kind:"constant",layoutSize:nt.evaluate(new Fl(G+1))};if(nt.kind==="source")return{kind:"source"};{let{zoomStops:_t,interpolationType:Rt}=nt,Kt=0;for(;Kt<_t.length&&_t[Kt]<=G;)Kt++;Kt=Math.max(0,Kt-1);let Qt=Kt;for(;Qt<_t.length&&_t[Qt]Qt.id),this.index=D.index,this.pixelRatio=D.pixelRatio,this.sourceLayerIndex=D.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=ti([]),this.placementViewportMatrix=ti([]);let nt=this.layers[0]._unevaluatedLayout._values;this.textSizeData=D3(this.zoom,nt["text-size"]),this.iconSizeData=D3(this.zoom,nt["icon-size"]);let _t=this.layers[0].layout,Rt=_t.get("symbol-sort-key"),Kt=_t.get("symbol-z-order");this.canOverlap=bb(_t,"text-overlap","text-allow-overlap")!=="never"||bb(_t,"icon-overlap","icon-allow-overlap")!=="never"||_t.get("text-ignore-placement")||_t.get("icon-ignore-placement"),this.sortFeaturesByKey=Kt!=="viewport-y"&&!Rt.isConstant(),this.sortFeaturesByY=(Kt==="viewport-y"||Kt==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,_t.get("symbol-placement")==="point"&&(this.writingModes=_t.get("text-writing-mode").map(Qt=>t.ah[Qt])),this.stateDependentLayerIds=this.layers.filter(Qt=>Qt.isStateDependent()).map(Qt=>Qt.id),this.sourceID=D.sourceID}createArrays(){this.text=new pf(new Gl(this.layers,this.zoom,D=>/^text/.test(D))),this.icon=new pf(new Gl(this.layers,this.zoom,D=>/^icon/.test(D))),this.glyphOffsetArray=new hl,this.lineVertexArray=new vl,this.symbolInstances=new hs,this.textAnchorOffsets=new bl}calculateGlyphDependencies(D,nt,_t,Rt,Kt){for(let Qt=0;Qt0)&&(Qt.value.kind!=="constant"||Qt.value.value.length>0),yr=Fe.value.kind!=="constant"||!!Fe.value.value||Object.keys(Fe.parameters).length>0,Er=Kt.get("symbol-sort-key");if(this.features=[],!er&&!yr)return;let Zr=nt.iconDependencies,sn=nt.glyphDependencies,xn=nt.availableImages,Ln=new Fl(this.zoom);for(let{feature:$n,id:ki,index:Aa,sourceLayerIndex:Xi}of D){let ma=Rt._featureFilter.needGeometry,Ga=Lr($n,ma);if(!Rt._featureFilter.filter(Ln,Ga,_t))continue;let To,As;if(ma||(Ga.geometry=kr($n)),er){let ys=Rt.getValueAndResolveTokens("text-field",Ga,_t,xn),cs=wn.factory(ys),Ys=this.hasRTLText=this.hasRTLText||HT(cs);(!Ys||$l.getRTLTextPluginStatus()==="unavailable"||Ys&&$l.isParsed())&&(To=af(cs,Rt,Ga))}if(yr){let ys=Rt.getValueAndResolveTokens("icon-image",Ga,_t,xn);As=ys instanceof Pi?ys:Pi.fromString(ys)}if(!To&&!As)continue;let Sl=this.sortFeaturesByKey?Er.evaluate(Ga,{},_t):void 0;if(this.features.push({id:ki,text:To,icon:As,index:Aa,sourceLayerIndex:Xi,geometry:Ga.geometry,properties:$n.properties,type:VT[$n.type],sortKey:Sl}),As&&(Zr[As.name]=!0),To){let ys=Qt.evaluate(Ga,{},_t).join(","),cs=Kt.get("text-rotation-alignment")!=="viewport"&&Kt.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(t.ah.vertical)>=0;for(let Ys of To.sections)if(Ys.image)Zr[Ys.image.name]=!0;else{let Bs=ds(To.toString()),Is=Ys.fontStack||ys,oo=sn[Is]=sn[Is]||{};this.calculateGlyphDependencies(Ys.text,oo,cs,this.allowVerticalPlacement,Bs)}}}Kt.get("symbol-placement")==="line"&&(this.features=function($n){let ki={},Aa={},Xi=[],ma=0;function Ga(ys){Xi.push($n[ys]),ma++}function To(ys,cs,Ys){let Bs=Aa[ys];return delete Aa[ys],Aa[cs]=Bs,Xi[Bs].geometry[0].pop(),Xi[Bs].geometry[0]=Xi[Bs].geometry[0].concat(Ys[0]),Bs}function As(ys,cs,Ys){let Bs=ki[cs];return delete ki[cs],ki[ys]=Bs,Xi[Bs].geometry[0].shift(),Xi[Bs].geometry[0]=Ys[0].concat(Xi[Bs].geometry[0]),Bs}function Sl(ys,cs,Ys){let Bs=Ys?cs[0][cs[0].length-1]:cs[0][0];return`${ys}:${Bs.x}:${Bs.y}`}for(let ys=0;ys<$n.length;ys++){let cs=$n[ys],Ys=cs.geometry,Bs=cs.text?cs.text.toString():null;if(!Bs){Ga(ys);continue}let Is=Sl(Bs,Ys),oo=Sl(Bs,Ys,!0);if(Is in Aa&&oo in ki&&Aa[Is]!==ki[oo]){let nl=As(Is,oo,Ys),Ks=To(Is,oo,Xi[nl].geometry);delete ki[Is],delete Aa[oo],Aa[Sl(Bs,Xi[Ks].geometry,!0)]=Ks,Xi[nl].geometry=null}else Is in Aa?To(Is,oo,Ys):oo in ki?As(Is,oo,Ys):(Ga(ys),ki[Is]=ma-1,Aa[oo]=ma-1)}return Xi.filter(ys=>ys.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort(($n,ki)=>$n.sortKey-ki.sortKey)}update(D,nt,_t){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(D,nt,this.layers,_t),this.icon.programConfigurations.updatePaintArrays(D,nt,this.layers,_t))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(D){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(D),this.iconCollisionBox.upload(D)),this.text.upload(D,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(D,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(D,nt){let _t=this.lineVertexArray.length;if(D.segment!==void 0){let Rt=D.dist(nt[D.segment+1]),Kt=D.dist(nt[D.segment]),Qt={};for(let be=D.segment+1;be=0;be--)Qt[be]={x:nt[be].x,y:nt[be].y,tileUnitDistanceFromAnchor:Kt},be>0&&(Kt+=nt[be-1].dist(nt[be]));for(let be=0;be0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(D,nt){let _t=D.placedSymbolArray.get(nt),Rt=_t.vertexStartIndex+4*_t.numGlyphs;for(let Kt=_t.vertexStartIndex;KtRt[be]-Rt[Fe]||Kt[Fe]-Kt[be]),Qt}addToSortKeyRanges(D,nt){let _t=this.sortKeyRanges[this.sortKeyRanges.length-1];_t&&_t.sortKey===nt?_t.symbolInstanceEnd=D+1:this.sortKeyRanges.push({sortKey:nt,symbolInstanceStart:D,symbolInstanceEnd:D+1})}sortFeatures(D){if(this.sortFeaturesByY&&this.sortedAngle!==D&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(D),this.sortedAngle=D,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let nt of this.symbolInstanceIndexes){let _t=this.symbolInstances.get(nt);this.featureSortOrder.push(_t.featureIndex),[_t.rightJustifiedTextSymbolIndex,_t.centerJustifiedTextSymbolIndex,_t.leftJustifiedTextSymbolIndex].forEach((Rt,Kt,Qt)=>{Rt>=0&&Qt.indexOf(Rt)===Kt&&this.addIndicesForPlacedSymbol(this.text,Rt)}),_t.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,_t.verticalPlacedTextSymbolIndex),_t.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,_t.placedIconSymbolIndex),_t.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,_t.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Y1,K1;Ji("SymbolBucket",Rg,{omit:["layers","collisionBoxArray","features","compareText"]}),Rg.MAX_GLYPHS=65535,Rg.addDynamicAttributes=Ym;var kb={get paint(){return K1=K1||new qt({"icon-opacity":new zs(ut.paint_symbol["icon-opacity"]),"icon-color":new zs(ut.paint_symbol["icon-color"]),"icon-halo-color":new zs(ut.paint_symbol["icon-halo-color"]),"icon-halo-width":new zs(ut.paint_symbol["icon-halo-width"]),"icon-halo-blur":new zs(ut.paint_symbol["icon-halo-blur"]),"icon-translate":new es(ut.paint_symbol["icon-translate"]),"icon-translate-anchor":new es(ut.paint_symbol["icon-translate-anchor"]),"text-opacity":new zs(ut.paint_symbol["text-opacity"]),"text-color":new zs(ut.paint_symbol["text-color"],{runtimeType:cr,getOverride:G=>G.textColor,hasOverride:G=>!!G.textColor}),"text-halo-color":new zs(ut.paint_symbol["text-halo-color"]),"text-halo-width":new zs(ut.paint_symbol["text-halo-width"]),"text-halo-blur":new zs(ut.paint_symbol["text-halo-blur"]),"text-translate":new es(ut.paint_symbol["text-translate"]),"text-translate-anchor":new es(ut.paint_symbol["text-translate-anchor"])})},get layout(){return Y1=Y1||new qt({"symbol-placement":new es(ut.layout_symbol["symbol-placement"]),"symbol-spacing":new es(ut.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new es(ut.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new zs(ut.layout_symbol["symbol-sort-key"]),"symbol-z-order":new es(ut.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new es(ut.layout_symbol["icon-allow-overlap"]),"icon-overlap":new es(ut.layout_symbol["icon-overlap"]),"icon-ignore-placement":new es(ut.layout_symbol["icon-ignore-placement"]),"icon-optional":new es(ut.layout_symbol["icon-optional"]),"icon-rotation-alignment":new es(ut.layout_symbol["icon-rotation-alignment"]),"icon-size":new zs(ut.layout_symbol["icon-size"]),"icon-text-fit":new es(ut.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new es(ut.layout_symbol["icon-text-fit-padding"]),"icon-image":new zs(ut.layout_symbol["icon-image"]),"icon-rotate":new zs(ut.layout_symbol["icon-rotate"]),"icon-padding":new zs(ut.layout_symbol["icon-padding"]),"icon-keep-upright":new es(ut.layout_symbol["icon-keep-upright"]),"icon-offset":new zs(ut.layout_symbol["icon-offset"]),"icon-anchor":new zs(ut.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new es(ut.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new es(ut.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new es(ut.layout_symbol["text-rotation-alignment"]),"text-field":new zs(ut.layout_symbol["text-field"]),"text-font":new zs(ut.layout_symbol["text-font"]),"text-size":new zs(ut.layout_symbol["text-size"]),"text-max-width":new zs(ut.layout_symbol["text-max-width"]),"text-line-height":new es(ut.layout_symbol["text-line-height"]),"text-letter-spacing":new zs(ut.layout_symbol["text-letter-spacing"]),"text-justify":new zs(ut.layout_symbol["text-justify"]),"text-radial-offset":new zs(ut.layout_symbol["text-radial-offset"]),"text-variable-anchor":new es(ut.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new zs(ut.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new zs(ut.layout_symbol["text-anchor"]),"text-max-angle":new es(ut.layout_symbol["text-max-angle"]),"text-writing-mode":new es(ut.layout_symbol["text-writing-mode"]),"text-rotate":new zs(ut.layout_symbol["text-rotate"]),"text-padding":new es(ut.layout_symbol["text-padding"]),"text-keep-upright":new es(ut.layout_symbol["text-keep-upright"]),"text-transform":new zs(ut.layout_symbol["text-transform"]),"text-offset":new zs(ut.layout_symbol["text-offset"]),"text-allow-overlap":new es(ut.layout_symbol["text-allow-overlap"]),"text-overlap":new es(ut.layout_symbol["text-overlap"]),"text-ignore-placement":new es(ut.layout_symbol["text-ignore-placement"]),"text-optional":new es(ut.layout_symbol["text-optional"])})}};class Rv{constructor(D){if(D.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=D.property.overrides?D.property.overrides.runtimeType:oe,this.defaultValue=D}evaluate(D){if(D.formattedSection){let nt=this.defaultValue.property.overrides;if(nt&&nt.hasOverride(D.formattedSection))return nt.getOverride(D.formattedSection)}return D.feature&&D.featureState?this.defaultValue.evaluate(D.feature,D.featureState):this.defaultValue.property.specification.default}eachChild(D){this.defaultValue.isConstant()||D(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Ji("FormatSectionOverride",Rv,{omit:["defaultValue"]});class Cx extends ht{constructor(D){super(D,kb)}recalculate(D,nt){if(super.recalculate(D,nt),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let _t=this.layout.get("text-writing-mode");if(_t){let Rt=[];for(let Kt of _t)Rt.indexOf(Kt)<0&&Rt.push(Kt);this.layout._values["text-writing-mode"]=Rt}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(D,nt,_t,Rt){let Kt=this.layout.get(D).evaluate(nt,{},_t,Rt),Qt=this._unevaluatedLayout._values[D];return Qt.isDataDriven()||Hh(Qt.value)||!Kt?Kt:function(be,Fe){return Fe.replace(/{([^{}]+)}/g,(er,yr)=>be&&yr in be?String(be[yr]):"")}(nt.properties,Kt)}createBucket(D){return new Rg(D)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let D of kb.paint.overridableProperties){if(!Cx.hasPaintOverride(this.layout,D))continue;let nt=this.paint.get(D),_t=new Rv(nt),Rt=new jc(_t,nt.property.specification),Kt=null;Kt=nt.value.kind==="constant"||nt.value.kind==="source"?new Eh("source",Rt):new Sc("composite",Rt,nt.value.zoomStops),this.paint._values[D]=new Iu(nt.property,Kt,nt.parameters)}}_handleOverridablePaintPropertyUpdate(D,nt,_t){return!(!this.layout||nt.isDataDriven()||_t.isDataDriven())&&Cx.hasPaintOverride(this.layout,D)}static hasPaintOverride(D,nt){let _t=D.get("text-field"),Rt=kb.paint.properties[nt],Kt=!1,Qt=be=>{for(let Fe of be)if(Rt.overrides&&Rt.overrides.hasOverride(Fe))return void(Kt=!0)};if(_t.value.kind==="constant"&&_t.value.value instanceof wn)Qt(_t.value.value.sections);else if(_t.value.kind==="source"){let be=er=>{Kt||(er instanceof Wa&&ui(er.value)===br?Qt(er.value.sections):er instanceof kl?Qt(er.sections):er.eachChild(be))},Fe=_t.value;Fe._styleExpression&&be(Fe._styleExpression.expression)}return Kt}}let Tb;var F3={get paint(){return Tb=Tb||new qt({"background-color":new es(ut.paint_background["background-color"]),"background-pattern":new Zu(ut.paint_background["background-pattern"]),"background-opacity":new es(ut.paint_background["background-opacity"])})}};class X1 extends ht{constructor(D){super(D,F3)}}let Lx;var Ab={get paint(){return Lx=Lx||new qt({"raster-opacity":new es(ut.paint_raster["raster-opacity"]),"raster-hue-rotate":new es(ut.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new es(ut.paint_raster["raster-brightness-min"]),"raster-brightness-max":new es(ut.paint_raster["raster-brightness-max"]),"raster-saturation":new es(ut.paint_raster["raster-saturation"]),"raster-contrast":new es(ut.paint_raster["raster-contrast"]),"raster-resampling":new es(ut.paint_raster["raster-resampling"]),"raster-fade-duration":new es(ut.paint_raster["raster-fade-duration"])})}};class WT extends ht{constructor(D){super(D,Ab)}}class R3 extends ht{constructor(D){super(D,{}),this.onAdd=nt=>{this.implementation.onAdd&&this.implementation.onAdd(nt,nt.painter.context.gl)},this.onRemove=nt=>{this.implementation.onRemove&&this.implementation.onRemove(nt,nt.painter.context.gl)},this.implementation=D}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class J1{constructor(D){this._methodToThrottle=D,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let Mb=63710088e-1;class em{constructor(D,nt){if(isNaN(D)||isNaN(nt))throw new Error(`Invalid LngLat object: (${D}, ${nt})`);if(this.lng=+D,this.lat=+nt,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new em(C(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(D){let nt=Math.PI/180,_t=this.lat*nt,Rt=D.lat*nt,Kt=Math.sin(_t)*Math.sin(Rt)+Math.cos(_t)*Math.cos(Rt)*Math.cos((D.lng-this.lng)*nt);return Mb*Math.acos(Math.min(Kt,1))}static convert(D){if(D instanceof em)return D;if(Array.isArray(D)&&(D.length===2||D.length===3))return new em(Number(D[0]),Number(D[1]));if(!Array.isArray(D)&&typeof D=="object"&&D!==null)return new em(Number("lng"in D?D.lng:D.lon),Number(D.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let B3=2*Math.PI*Mb;function Px(G){return B3*Math.cos(G*Math.PI/180)}function zx(G){return(180+G)/360}function N3(G){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+G*Math.PI/360)))/360}function w0(G,D){return G/Px(D)}function Sb(G){return 360/Math.PI*Math.atan(Math.exp((180-360*G)*Math.PI/180))-90}class Q1{constructor(D,nt,_t=0){this.x=+D,this.y=+nt,this.z=+_t}static fromLngLat(D,nt=0){let _t=em.convert(D);return new Q1(zx(_t.lng),N3(_t.lat),w0(nt,_t.lat))}toLngLat(){return new em(360*this.x-180,Sb(this.y))}toAltitude(){return this.z*Px(Sb(this.y))}meterInMercatorCoordinateUnits(){return 1/B3*(D=Sb(this.y),1/Math.cos(D*Math.PI/180));var D}}function j3(G,D,nt){var _t=2*Math.PI*6378137/256/Math.pow(2,nt);return[G*_t-2*Math.PI*6378137/2,D*_t-2*Math.PI*6378137/2]}class Eb{constructor(D,nt,_t){if(!function(Rt,Kt,Qt){return!(Rt<0||Rt>25||Qt<0||Qt>=Math.pow(2,Rt)||Kt<0||Kt>=Math.pow(2,Rt))}(D,nt,_t))throw new Error(`x=${nt}, y=${_t}, z=${D} outside of bounds. 0<=x<${Math.pow(2,D)}, 0<=y<${Math.pow(2,D)} 0<=z<=25 `);this.z=D,this.x=nt,this.y=_t,this.key=Bv(0,D,D,nt,_t)}equals(D){return this.z===D.z&&this.x===D.x&&this.y===D.y}url(D,nt,_t){let Rt=(Qt=this.y,be=this.z,Fe=j3(256*(Kt=this.x),256*(Qt=Math.pow(2,be)-Qt-1),be),er=j3(256*(Kt+1),256*(Qt+1),be),Fe[0]+","+Fe[1]+","+er[0]+","+er[1]);var Kt,Qt,be,Fe,er;let yr=function(Er,Zr,sn){let xn,Ln="";for(let $n=Er;$n>0;$n--)xn=1<<$n-1,Ln+=(Zr&xn?1:0)+(sn&xn?2:0);return Ln}(this.z,this.x,this.y);return D[(this.x+this.y)%D.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(_t==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,nt>1?"@2x":"").replace(/{quadkey}/g,yr).replace(/{bbox-epsg-3857}/g,Rt)}isChildOf(D){let nt=this.z-D.z;return nt>0&&D.x===this.x>>nt&&D.y===this.y>>nt}getTilePoint(D){let nt=Math.pow(2,this.z);return new o((D.x*nt-this.x)*Ql,(D.y*nt-this.y)*Ql)}toString(){return`${this.z}/${this.x}/${this.y}`}}class U3{constructor(D,nt){this.wrap=D,this.canonical=nt,this.key=Bv(D,nt.z,nt.z,nt.x,nt.y)}}class l0{constructor(D,nt,_t,Rt,Kt){if(D<_t)throw new Error(`overscaledZ should be >= z; overscaledZ = ${D}; z = ${_t}`);this.overscaledZ=D,this.wrap=nt,this.canonical=new Eb(_t,+Rt,+Kt),this.key=Bv(nt,D,_t,Rt,Kt)}clone(){return new l0(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(D){return this.overscaledZ===D.overscaledZ&&this.wrap===D.wrap&&this.canonical.equals(D.canonical)}scaledTo(D){if(D>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${D}; overscaledZ = ${this.overscaledZ}`);let nt=this.canonical.z-D;return D>this.canonical.z?new l0(D,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new l0(D,this.wrap,D,this.canonical.x>>nt,this.canonical.y>>nt)}calculateScaledKey(D,nt){if(D>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${D}; overscaledZ = ${this.overscaledZ}`);let _t=this.canonical.z-D;return D>this.canonical.z?Bv(this.wrap*+nt,D,this.canonical.z,this.canonical.x,this.canonical.y):Bv(this.wrap*+nt,D,D,this.canonical.x>>_t,this.canonical.y>>_t)}isChildOf(D){if(D.wrap!==this.wrap)return!1;let nt=this.canonical.z-D.canonical.z;return D.overscaledZ===0||D.overscaledZ>nt&&D.canonical.y===this.canonical.y>>nt}children(D){if(this.overscaledZ>=D)return[new l0(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let nt=this.canonical.z+1,_t=2*this.canonical.x,Rt=2*this.canonical.y;return[new l0(nt,this.wrap,nt,_t,Rt),new l0(nt,this.wrap,nt,_t+1,Rt),new l0(nt,this.wrap,nt,_t,Rt+1),new l0(nt,this.wrap,nt,_t+1,Rt+1)]}isLessThan(D){return this.wrapD.wrap)&&(this.overscaledZD.overscaledZ)&&(this.canonical.xD.canonical.x)&&this.canonical.ythis.max&&(this.max=Er),Er=this.dim+1||nt<-1||nt>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(nt+1)*this.stride+(D+1)}unpack(D,nt,_t){return D*this.redFactor+nt*this.greenFactor+_t*this.blueFactor-this.baseShift}getPixels(){return new Al({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(D,nt,_t){if(this.dim!==D.dim)throw new Error("dem dimension mismatch");let Rt=nt*this.dim,Kt=nt*this.dim+this.dim,Qt=_t*this.dim,be=_t*this.dim+this.dim;switch(nt){case-1:Rt=Kt-1;break;case 1:Kt=Rt+1}switch(_t){case-1:Qt=be-1;break;case 1:be=Qt+1}let Fe=-nt*this.dim,er=-_t*this.dim;for(let yr=Qt;yr=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${D} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[D]}}class H3{constructor(D,nt,_t,Rt,Kt){this.type="Feature",this._vectorTileFeature=D,D._z=nt,D._x=_t,D._y=Rt,this.properties=D.properties,this.id=Kt}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(D){this._geometry=D}toJSON(){let D={geometry:this.geometry};for(let nt in this)nt!=="_geometry"&&nt!=="_vectorTileFeature"&&(D[nt]=this[nt]);return D}}class W3{constructor(D,nt){this.tileID=D,this.x=D.canonical.x,this.y=D.canonical.y,this.z=D.canonical.z,this.grid=new za(Ql,16,0),this.grid3D=new za(Ql,16,0),this.featureIndexArray=new mu,this.promoteId=nt}insert(D,nt,_t,Rt,Kt,Qt){let be=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(_t,Rt,Kt);let Fe=Qt?this.grid3D:this.grid;for(let er=0;er=0&&Er[3]>=0&&Fe.insert(be,Er[0],Er[1],Er[2],Er[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new di.VectorTile(new gb(this.rawTileData)).layers,this.sourceLayerCoder=new V3(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(D,nt,_t,Rt){this.loadVTLayers();let Kt=D.params||{},Qt=Ql/D.tileSize/D.scale,be=Cf(Kt.filter),Fe=D.queryGeometry,er=D.queryPadding*Qt,yr=Cb(Fe),Er=this.grid.query(yr.minX-er,yr.minY-er,yr.maxX+er,yr.maxY+er),Zr=Cb(D.cameraQueryGeometry),sn=this.grid3D.query(Zr.minX-er,Zr.minY-er,Zr.maxX+er,Zr.maxY+er,($n,ki,Aa,Xi)=>function(ma,Ga,To,As,Sl){for(let cs of ma)if(Ga<=cs.x&&To<=cs.y&&As>=cs.x&&Sl>=cs.y)return!0;let ys=[new o(Ga,To),new o(Ga,Sl),new o(As,Sl),new o(As,To)];if(ma.length>2){for(let cs of ys)if(wi(ma,cs))return!0}for(let cs=0;cs(Xi||(Xi=kr(ma)),Ga.queryIntersectsFeature(Fe,ma,To,Xi,this.z,D.transform,Qt,D.pixelPosMatrix)))}return xn}loadMatchingFeature(D,nt,_t,Rt,Kt,Qt,be,Fe,er,yr,Er){let Zr=this.bucketLayerIDs[nt];if(Qt&&!function($n,ki){for(let Aa=0;Aa<$n.length;Aa++)if(ki.indexOf($n[Aa])>=0)return!0;return!1}(Qt,Zr))return;let sn=this.sourceLayerCoder.decode(_t),xn=this.vtLayers[sn].feature(Rt);if(Kt.needGeometry){let $n=Lr(xn,!0);if(!Kt.filter(new Fl(this.tileID.overscaledZ),$n,this.tileID.canonical))return}else if(!Kt.filter(new Fl(this.tileID.overscaledZ),xn))return;let Ln=this.getId(xn,sn);for(let $n=0;$n{let be=D instanceof Ih?D.get(Qt):null;return be&&be.evaluate?be.evaluate(nt,_t,Rt):be})}function Cb(G){let D=1/0,nt=1/0,_t=-1/0,Rt=-1/0;for(let Kt of G)D=Math.min(D,Kt.x),nt=Math.min(nt,Kt.y),_t=Math.max(_t,Kt.x),Rt=Math.max(Rt,Kt.y);return{minX:D,minY:nt,maxX:_t,maxY:Rt}}function Z3(G,D){return D-G}function $3(G,D,nt,_t,Rt){let Kt=[];for(let Qt=0;Qt=_t&&Er.x>=_t||(yr.x>=_t?yr=new o(_t,yr.y+(_t-yr.x)/(Er.x-yr.x)*(Er.y-yr.y))._round():Er.x>=_t&&(Er=new o(_t,yr.y+(_t-yr.x)/(Er.x-yr.x)*(Er.y-yr.y))._round()),yr.y>=Rt&&Er.y>=Rt||(yr.y>=Rt?yr=new o(yr.x+(Rt-yr.y)/(Er.y-yr.y)*(Er.x-yr.x),Rt)._round():Er.y>=Rt&&(Er=new o(yr.x+(Rt-yr.y)/(Er.y-yr.y)*(Er.x-yr.x),Rt)._round()),Fe&&yr.equals(Fe[Fe.length-1])||(Fe=[yr],Kt.push(Fe)),Fe.push(Er)))))}}return Kt}Ji("FeatureIndex",W3,{omit:["rawTileData","sourceLayerCoder"]});class Km extends o{constructor(D,nt,_t,Rt){super(D,nt),this.angle=_t,Rt!==void 0&&(this.segment=Rt)}clone(){return new Km(this.x,this.y,this.angle,this.segment)}}function G3(G,D,nt,_t,Rt){if(D.segment===void 0||nt===0)return!0;let Kt=D,Qt=D.segment+1,be=0;for(;be>-nt/2;){if(Qt--,Qt<0)return!1;be-=G[Qt].dist(Kt),Kt=G[Qt]}be+=G[Qt].dist(G[Qt+1]),Qt++;let Fe=[],er=0;for(;be_t;)er-=Fe.shift().angleDelta;if(er>Rt)return!1;Qt++,be+=yr.dist(Er)}return!0}function Y3(G){let D=0;for(let nt=0;nter){let xn=(er-Fe)/sn,Ln=Do.number(Er.x,Zr.x,xn),$n=Do.number(Er.y,Zr.y,xn),ki=new Km(Ln,$n,Zr.angleTo(Er),yr);return ki._round(),!Qt||G3(G,ki,be,Qt,D)?ki:void 0}Fe+=sn}}function ZT(G,D,nt,_t,Rt,Kt,Qt,be,Fe){let er=K3(_t,Kt,Qt),yr=X3(_t,Rt),Er=yr*Qt,Zr=G[0].x===0||G[0].x===Fe||G[0].y===0||G[0].y===Fe;return D-Er=0&&ma=0&&Ga=0&&Zr+er<=yr){let To=new Km(ma,Ga,Aa,xn);To._round(),_t&&!G3(G,To,Kt,_t,Rt)||sn.push(To)}}Er+=ki}return be||sn.length||Qt||(sn=Ng(G,Er/2,nt,_t,Rt,Kt,Qt,!0,Fe)),sn}Ji("Anchor",Km);let Nv=Qf;function J3(G,D,nt,_t){let Rt=[],Kt=G.image,Qt=Kt.pixelRatio,be=Kt.paddedRect.w-2*Nv,Fe=Kt.paddedRect.h-2*Nv,er={x1:G.left,y1:G.top,x2:G.right,y2:G.bottom},yr=Kt.stretchX||[[0,be]],Er=Kt.stretchY||[[0,Fe]],Zr=(oo,nl)=>oo+nl[1]-nl[0],sn=yr.reduce(Zr,0),xn=Er.reduce(Zr,0),Ln=be-sn,$n=Fe-xn,ki=0,Aa=sn,Xi=0,ma=xn,Ga=0,To=Ln,As=0,Sl=$n;if(Kt.content&&_t){let oo=Kt.content,nl=oo[2]-oo[0],Ks=oo[3]-oo[1];(Kt.textFitWidth||Kt.textFitHeight)&&(er=I3(G)),ki=jv(yr,0,oo[0]),Xi=jv(Er,0,oo[1]),Aa=jv(yr,oo[0],oo[2]),ma=jv(Er,oo[1],oo[3]),Ga=oo[0]-ki,As=oo[1]-Xi,To=nl-Aa,Sl=Ks-ma}let ys=er.x1,cs=er.y1,Ys=er.x2-ys,Bs=er.y2-cs,Is=(oo,nl,Ks,Wl)=>{let uh=jp(oo.stretch-ki,Aa,Ys,ys),nh=Ix(oo.fixed-Ga,To,oo.stretch,sn),gd=jp(nl.stretch-Xi,ma,Bs,cs),Ep=Ix(nl.fixed-As,Sl,nl.stretch,xn),If=jp(Ks.stretch-ki,Aa,Ys,ys),td=Ix(Ks.fixed-Ga,To,Ks.stretch,sn),dp=jp(Wl.stretch-Xi,ma,Bs,cs),pp=Ix(Wl.fixed-As,Sl,Wl.stretch,xn),mp=new o(uh,gd),of=new o(If,gd),vd=new o(If,dp),rp=new o(uh,dp),Gd=new o(nh/Qt,Ep/Qt),gp=new o(td/Qt,pp/Qt),Od=D*Math.PI/180;if(Od){let rc=Math.sin(Od),Ic=Math.cos(Od),$c=[Ic,-rc,rc,Ic];mp._matMult($c),of._matMult($c),rp._matMult($c),vd._matMult($c)}let Up=oo.stretch+oo.fixed,wh=nl.stretch+nl.fixed;return{tl:mp,tr:of,bl:rp,br:vd,tex:{x:Kt.paddedRect.x+Nv+Up,y:Kt.paddedRect.y+Nv+wh,w:Ks.stretch+Ks.fixed-Up,h:Wl.stretch+Wl.fixed-wh},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Gd,pixelOffsetBR:gp,minFontScaleX:To/Qt/Ys,minFontScaleY:Sl/Qt/Bs,isSDF:nt}};if(_t&&(Kt.stretchX||Kt.stretchY)){let oo=Uv(yr,Ln,sn),nl=Uv(Er,$n,xn);for(let Ks=0;Ks0&&(Ln=Math.max(10,Ln),this.circleDiameter=Ln)}else{let Zr=!((Er=Qt.image)===null||Er===void 0)&&Er.content&&(Qt.image.textFitWidth||Qt.image.textFitHeight)?I3(Qt):{x1:Qt.left,y1:Qt.top,x2:Qt.right,y2:Qt.bottom};Zr.y1=Zr.y1*be-Fe[0],Zr.y2=Zr.y2*be+Fe[2],Zr.x1=Zr.x1*be-Fe[3],Zr.x2=Zr.x2*be+Fe[1];let sn=Qt.collisionPadding;if(sn&&(Zr.x1-=sn[0]*be,Zr.y1-=sn[1]*be,Zr.x2+=sn[2]*be,Zr.y2+=sn[3]*be),yr){let xn=new o(Zr.x1,Zr.y1),Ln=new o(Zr.x2,Zr.y1),$n=new o(Zr.x1,Zr.y2),ki=new o(Zr.x2,Zr.y2),Aa=yr*Math.PI/180;xn._rotate(Aa),Ln._rotate(Aa),$n._rotate(Aa),ki._rotate(Aa),Zr.x1=Math.min(xn.x,Ln.x,$n.x,ki.x),Zr.x2=Math.max(xn.x,Ln.x,$n.x,ki.x),Zr.y1=Math.min(xn.y,Ln.y,$n.y,ki.y),Zr.y2=Math.max(xn.y,Ln.y,$n.y,ki.y)}D.emplaceBack(nt.x,nt.y,Zr.x1,Zr.y1,Zr.x2,Zr.y2,_t,Rt,Kt)}this.boxEndIndex=D.length}}class $T{constructor(D=[],nt=(_t,Rt)=>_tRt?1:0){if(this.data=D,this.length=this.data.length,this.compare=nt,this.length>0)for(let _t=(this.length>>1)-1;_t>=0;_t--)this._down(_t)}push(D){this.data.push(D),this._up(this.length++)}pop(){if(this.length===0)return;let D=this.data[0],nt=this.data.pop();return--this.length>0&&(this.data[0]=nt,this._down(0)),D}peek(){return this.data[0]}_up(D){let{data:nt,compare:_t}=this,Rt=nt[D];for(;D>0;){let Kt=D-1>>1,Qt=nt[Kt];if(_t(Rt,Qt)>=0)break;nt[D]=Qt,D=Kt}nt[D]=Rt}_down(D){let{data:nt,compare:_t}=this,Rt=this.length>>1,Kt=nt[D];for(;D=0)break;nt[D]=nt[Qt],D=Qt}nt[D]=Kt}}function GT(G,D=1,nt=!1){let _t=1/0,Rt=1/0,Kt=-1/0,Qt=-1/0,be=G[0];for(let sn=0;snKt)&&(Kt=xn.x),(!sn||xn.y>Qt)&&(Qt=xn.y)}let Fe=Math.min(Kt-_t,Qt-Rt),er=Fe/2,yr=new $T([],YT);if(Fe===0)return new o(_t,Rt);for(let sn=_t;snEr.d||!Er.d)&&(Er=sn,nt&&console.log("found best %d after %d probes",Math.round(1e4*sn.d)/1e4,Zr)),sn.max-Er.d<=D||(er=sn.h/2,yr.push(new rm(sn.p.x-er,sn.p.y-er,er,G)),yr.push(new rm(sn.p.x+er,sn.p.y-er,er,G)),yr.push(new rm(sn.p.x-er,sn.p.y+er,er,G)),yr.push(new rm(sn.p.x+er,sn.p.y+er,er,G)),Zr+=4)}return nt&&(console.log(`num probes: ${Zr}`),console.log(`best distance: ${Er.d}`)),Er.p}function YT(G,D){return D.max-G.max}function rm(G,D,nt,_t){this.p=new o(G,D),this.h=nt,this.d=function(Rt,Kt){let Qt=!1,be=1/0;for(let Fe=0;FeRt.y!=xn.y>Rt.y&&Rt.x<(xn.x-sn.x)*(Rt.y-sn.y)/(xn.y-sn.y)+sn.x&&(Qt=!Qt),be=Math.min(be,Ba(Rt,sn,xn))}}return(Qt?1:-1)*Math.sqrt(be)}(this.p,_t),this.max=this.d+this.h*Math.SQRT2}var Id;t.aq=void 0,(Id=t.aq||(t.aq={}))[Id.center=1]="center",Id[Id.left=2]="left",Id[Id.right=3]="right",Id[Id.top=4]="top",Id[Id.bottom=5]="bottom",Id[Id["top-left"]=6]="top-left",Id[Id["top-right"]=7]="top-right",Id[Id["bottom-left"]=8]="bottom-left",Id[Id["bottom-right"]=9]="bottom-right";let Xm=7,Lb=Number.POSITIVE_INFINITY;function Q3(G,D){return D[1]!==Lb?function(nt,_t,Rt){let Kt=0,Qt=0;switch(_t=Math.abs(_t),Rt=Math.abs(Rt),nt){case"top-right":case"top-left":case"top":Qt=Rt-Xm;break;case"bottom-right":case"bottom-left":case"bottom":Qt=-Rt+Xm}switch(nt){case"top-right":case"bottom-right":case"right":Kt=-_t;break;case"top-left":case"bottom-left":case"left":Kt=_t}return[Kt,Qt]}(G,D[0],D[1]):function(nt,_t){let Rt=0,Kt=0;_t<0&&(_t=0);let Qt=_t/Math.SQRT2;switch(nt){case"top-right":case"top-left":Kt=Qt-Xm;break;case"bottom-right":case"bottom-left":Kt=-Qt+Xm;break;case"bottom":Kt=-_t+Xm;break;case"top":Kt=_t-Xm}switch(nt){case"top-right":case"bottom-right":Rt=-Qt;break;case"top-left":case"bottom-left":Rt=Qt;break;case"left":Rt=_t;break;case"right":Rt=-_t}return[Rt,Kt]}(G,D[0])}function t5(G,D,nt){var _t;let Rt=G.layout,Kt=(_t=Rt.get("text-variable-anchor-offset"))===null||_t===void 0?void 0:_t.evaluate(D,{},nt);if(Kt){let be=Kt.values,Fe=[];for(let er=0;erZr*bc);yr.startsWith("top")?Er[1]-=Xm:yr.startsWith("bottom")&&(Er[1]+=Xm),Fe[er+1]=Er}return new xi(Fe)}let Qt=Rt.get("text-variable-anchor");if(Qt){let be;be=G._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[Rt.get("text-radial-offset").evaluate(D,{},nt)*bc,Lb]:Rt.get("text-offset").evaluate(D,{},nt).map(er=>er*bc);let Fe=[];for(let er of Qt)Fe.push(er,Q3(er,be));return new xi(Fe)}return null}function Pb(G){switch(G){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function KT(G,D,nt,_t,Rt,Kt,Qt,be,Fe,er,yr){let Er=Kt.textMaxSize.evaluate(D,{});Er===void 0&&(Er=Qt);let Zr=G.layers[0].layout,sn=Zr.get("icon-offset").evaluate(D,{},yr),xn=r5(nt.horizontal),Ln=Qt/24,$n=G.tilePixelRatio*Ln,ki=G.tilePixelRatio*Er/24,Aa=G.tilePixelRatio*be,Xi=G.tilePixelRatio*Zr.get("symbol-spacing"),ma=Zr.get("text-padding")*G.tilePixelRatio,Ga=function(oo,nl,Ks,Wl=1){let uh=oo.get("icon-padding").evaluate(nl,{},Ks),nh=uh&&uh.values;return[nh[0]*Wl,nh[1]*Wl,nh[2]*Wl,nh[3]*Wl]}(Zr,D,yr,G.tilePixelRatio),To=Zr.get("text-max-angle")/180*Math.PI,As=Zr.get("text-rotation-alignment")!=="viewport"&&Zr.get("symbol-placement")!=="point",Sl=Zr.get("icon-rotation-alignment")==="map"&&Zr.get("symbol-placement")!=="point",ys=Zr.get("symbol-placement"),cs=Xi/2,Ys=Zr.get("icon-text-fit"),Bs;_t&&Ys!=="none"&&(G.allowVerticalPlacement&&nt.vertical&&(Bs=O3(_t,nt.vertical,Ys,Zr.get("icon-text-fit-padding"),sn,Ln)),xn&&(_t=O3(_t,xn,Ys,Zr.get("icon-text-fit-padding"),sn,Ln)));let Is=(oo,nl)=>{nl.x<0||nl.x>=Ql||nl.y<0||nl.y>=Ql||function(Ks,Wl,uh,nh,gd,Ep,If,td,dp,pp,mp,of,vd,rp,Gd,gp,Od,Up,wh,rc,Ic,$c,$h,kh,Wv){let j0=Ks.addToLineVertexArray(Wl,uh),U0,np,ch,Dd,k0=0,Vp=0,vp=0,Rb=0,Bb=-1,Bx=-1,Am={},Nb=Yn("");if(Ks.allowVerticalPlacement&&nh.vertical){let Yd=td.layout.get("text-rotate").evaluate(Ic,{},kh)+90;ch=new Ox(dp,Wl,pp,mp,of,nh.vertical,vd,rp,Gd,Yd),If&&(Dd=new Ox(dp,Wl,pp,mp,of,If,Od,Up,Gd,Yd))}if(gd){let Yd=td.layout.get("icon-rotate").evaluate(Ic,{}),Hp=td.layout.get("icon-text-fit")!=="none",Jm=J3(gd,Yd,$h,Hp),V0=If?J3(If,Yd,$h,Hp):void 0;np=new Ox(dp,Wl,pp,mp,of,gd,Od,Up,!1,Yd),k0=4*Jm.length;let jg=Ks.iconSizeData,H0=null;jg.kind==="source"?(H0=[tm*td.layout.get("icon-size").evaluate(Ic,{})],H0[0]>Gm&&w(`${Ks.layerIds[0]}: Value for "icon-size" is >= ${G1}. Reduce your "icon-size".`)):jg.kind==="composite"&&(H0=[tm*$c.compositeIconSizes[0].evaluate(Ic,{},kh),tm*$c.compositeIconSizes[1].evaluate(Ic,{},kh)],(H0[0]>Gm||H0[1]>Gm)&&w(`${Ks.layerIds[0]}: Value for "icon-size" is >= ${G1}. Reduce your "icon-size".`)),Ks.addSymbols(Ks.icon,Jm,H0,rc,wh,Ic,t.ah.none,Wl,j0.lineStartIndex,j0.lineLength,-1,kh),Bb=Ks.icon.placedSymbolArray.length-1,V0&&(Vp=4*V0.length,Ks.addSymbols(Ks.icon,V0,H0,rc,wh,Ic,t.ah.vertical,Wl,j0.lineStartIndex,j0.lineLength,-1,kh),Bx=Ks.icon.placedSymbolArray.length-1)}let jb=Object.keys(nh.horizontal);for(let Yd of jb){let Hp=nh.horizontal[Yd];if(!U0){Nb=Yn(Hp.text);let V0=td.layout.get("text-rotate").evaluate(Ic,{},kh);U0=new Ox(dp,Wl,pp,mp,of,Hp,vd,rp,Gd,V0)}let Jm=Hp.positionedLines.length===1;if(vp+=e5(Ks,Wl,Hp,Ep,td,Gd,Ic,gp,j0,nh.vertical?t.ah.horizontal:t.ah.horizontalOnly,Jm?jb:[Yd],Am,Bb,$c,kh),Jm)break}nh.vertical&&(Rb+=e5(Ks,Wl,nh.vertical,Ep,td,Gd,Ic,gp,j0,t.ah.vertical,["vertical"],Am,Bx,$c,kh));let Ub=U0?U0.boxStartIndex:Ks.collisionBoxArray.length,Vb=U0?U0.boxEndIndex:Ks.collisionBoxArray.length,XT=ch?ch.boxStartIndex:Ks.collisionBoxArray.length,JT=ch?ch.boxEndIndex:Ks.collisionBoxArray.length,QT=np?np.boxStartIndex:Ks.collisionBoxArray.length,t8=np?np.boxEndIndex:Ks.collisionBoxArray.length,s5=Dd?Dd.boxStartIndex:Ks.collisionBoxArray.length,qv=Dd?Dd.boxEndIndex:Ks.collisionBoxArray.length,ed=-1,Zv=(Yd,Hp)=>Yd&&Yd.circleDiameter?Math.max(Yd.circleDiameter,Hp):Hp;ed=Zv(U0,ed),ed=Zv(ch,ed),ed=Zv(np,ed),ed=Zv(Dd,ed);let Hb=ed>-1?1:0;Hb&&(ed*=Wv/bc),Ks.glyphOffsetArray.length>=Rg.MAX_GLYPHS&&w("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Ic.sortKey!==void 0&&Ks.addToSortKeyRanges(Ks.symbolInstances.length,Ic.sortKey);let l5=t5(td,Ic,kh),[e8,u5]=function(Yd,Hp){let Jm=Yd.length,V0=Hp?.values;if(V0?.length>0)for(let jg=0;jg=0?Am.right:-1,Am.center>=0?Am.center:-1,Am.left>=0?Am.left:-1,Am.vertical||-1,Bb,Bx,Nb,Ub,Vb,XT,JT,QT,t8,s5,qv,pp,vp,Rb,k0,Vp,Hb,0,vd,ed,e8,u5)}(G,nl,oo,nt,_t,Rt,Bs,G.layers[0],G.collisionBoxArray,D.index,D.sourceLayerIndex,G.index,$n,[ma,ma,ma,ma],As,Fe,Aa,Ga,Sl,sn,D,Kt,er,yr,Qt)};if(ys==="line")for(let oo of $3(D.geometry,0,0,Ql,Ql)){let nl=ZT(oo,Xi,To,nt.vertical||xn,_t,24,ki,G.overscaling,Ql);for(let Ks of nl)xn&&n5(G,xn.text,cs,Ks)||Is(oo,Ks)}else if(ys==="line-center"){for(let oo of D.geometry)if(oo.length>1){let nl=qT(oo,To,nt.vertical||xn,_t,24,ki);nl&&Is(oo,nl)}}else if(D.type==="Polygon")for(let oo of Jc(D.geometry,0)){let nl=GT(oo,16);Is(oo[0],new Km(nl.x,nl.y,0))}else if(D.type==="LineString")for(let oo of D.geometry)Is(oo,new Km(oo[0].x,oo[0].y,0));else if(D.type==="Point")for(let oo of D.geometry)for(let nl of oo)Is([nl],new Km(nl.x,nl.y,0))}function e5(G,D,nt,_t,Rt,Kt,Qt,be,Fe,er,yr,Er,Zr,sn,xn){let Ln=function(Aa,Xi,ma,Ga,To,As,Sl,ys){let cs=Ga.layout.get("text-rotate").evaluate(As,{})*Math.PI/180,Ys=[];for(let Bs of Xi.positionedLines)for(let Is of Bs.positionedGlyphs){if(!Is.rect)continue;let oo=Is.rect||{},nl=yb+1,Ks=!0,Wl=1,uh=0,nh=(To||ys)&&Is.vertical,gd=Is.metrics.advance*Is.scale/2;if(ys&&Xi.verticalizable&&(uh=Bs.lineOffset/2-(Is.imageName?-(bc-Is.metrics.width*Is.scale)/2:(Is.scale-1)*bc)),Is.imageName){let rc=Sl[Is.imageName];Ks=rc.sdf,Wl=rc.pixelRatio,nl=Qf/Wl}let Ep=To?[Is.x+gd,Is.y]:[0,0],If=To?[0,0]:[Is.x+gd+ma[0],Is.y+ma[1]-uh],td=[0,0];nh&&(td=If,If=[0,0]);let dp=Is.metrics.isDoubleResolution?2:1,pp=(Is.metrics.left-nl)*Is.scale-gd+If[0],mp=(-Is.metrics.top-nl)*Is.scale+If[1],of=pp+oo.w/dp*Is.scale/Wl,vd=mp+oo.h/dp*Is.scale/Wl,rp=new o(pp,mp),Gd=new o(of,mp),gp=new o(pp,vd),Od=new o(of,vd);if(nh){let rc=new o(-gd,gd-Ov),Ic=-Math.PI/2,$c=bc/2-gd,$h=new o(5-Ov-$c,-(Is.imageName?$c:0)),kh=new o(...td);rp._rotateAround(Ic,rc)._add($h)._add(kh),Gd._rotateAround(Ic,rc)._add($h)._add(kh),gp._rotateAround(Ic,rc)._add($h)._add(kh),Od._rotateAround(Ic,rc)._add($h)._add(kh)}if(cs){let rc=Math.sin(cs),Ic=Math.cos(cs),$c=[Ic,-rc,rc,Ic];rp._matMult($c),Gd._matMult($c),gp._matMult($c),Od._matMult($c)}let Up=new o(0,0),wh=new o(0,0);Ys.push({tl:rp,tr:Gd,bl:gp,br:Od,tex:oo,writingMode:Xi.writingMode,glyphOffset:Ep,sectionIndex:Is.sectionIndex,isSDF:Ks,pixelOffsetTL:Up,pixelOffsetBR:wh,minFontScaleX:0,minFontScaleY:0})}return Ys}(0,nt,be,Rt,Kt,Qt,_t,G.allowVerticalPlacement),$n=G.textSizeData,ki=null;$n.kind==="source"?(ki=[tm*Rt.layout.get("text-size").evaluate(Qt,{})],ki[0]>Gm&&w(`${G.layerIds[0]}: Value for "text-size" is >= ${G1}. Reduce your "text-size".`)):$n.kind==="composite"&&(ki=[tm*sn.compositeTextSizes[0].evaluate(Qt,{},xn),tm*sn.compositeTextSizes[1].evaluate(Qt,{},xn)],(ki[0]>Gm||ki[1]>Gm)&&w(`${G.layerIds[0]}: Value for "text-size" is >= ${G1}. Reduce your "text-size".`)),G.addSymbols(G.text,Ln,ki,be,Kt,Qt,er,D,Fe.lineStartIndex,Fe.lineLength,Zr,xn);for(let Aa of yr)Er[Aa]=G.text.placedSymbolArray.length-1;return 4*Ln.length}function r5(G){for(let D in G)return G[D];return null}function n5(G,D,nt,_t){let Rt=G.compareText;if(D in Rt){let Kt=Rt[D];for(let Qt=Kt.length-1;Qt>=0;Qt--)if(_t.dist(Kt[Qt])>4;if(Rt!==1)throw new Error(`Got v${Rt} data when expected v1.`);let Kt=i5[15&_t];if(!Kt)throw new Error("Unrecognized array type.");let[Qt]=new Uint16Array(D,2,1),[be]=new Uint32Array(D,4,1);return new zb(be,Qt,Kt,D)}constructor(D,nt=64,_t=Float64Array,Rt){if(isNaN(D)||D<0)throw new Error(`Unpexpected numItems value: ${D}.`);this.numItems=+D,this.nodeSize=Math.min(Math.max(+nt,2),65535),this.ArrayType=_t,this.IndexArrayType=D<65536?Uint16Array:Uint32Array;let Kt=i5.indexOf(this.ArrayType),Qt=2*D*this.ArrayType.BYTES_PER_ELEMENT,be=D*this.IndexArrayType.BYTES_PER_ELEMENT,Fe=(8-be%8)%8;if(Kt<0)throw new Error(`Unexpected typed array class: ${_t}.`);Rt&&Rt instanceof ArrayBuffer?(this.data=Rt,this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+be+Fe,2*D),this._pos=2*D,this._finished=!0):(this.data=new ArrayBuffer(8+Qt+be+Fe),this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+be+Fe,2*D),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+Kt]),new Uint16Array(this.data,2,1)[0]=nt,new Uint32Array(this.data,4,1)[0]=D)}add(D,nt){let _t=this._pos>>1;return this.ids[_t]=_t,this.coords[this._pos++]=D,this.coords[this._pos++]=nt,_t}finish(){let D=this._pos>>1;if(D!==this.numItems)throw new Error(`Added ${D} items when expected ${this.numItems}.`);return Ib(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(D,nt,_t,Rt){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:Kt,coords:Qt,nodeSize:be}=this,Fe=[0,Kt.length-1,0],er=[];for(;Fe.length;){let yr=Fe.pop()||0,Er=Fe.pop()||0,Zr=Fe.pop()||0;if(Er-Zr<=be){for(let $n=Zr;$n<=Er;$n++){let ki=Qt[2*$n],Aa=Qt[2*$n+1];ki>=D&&ki<=_t&&Aa>=nt&&Aa<=Rt&&er.push(Kt[$n])}continue}let sn=Zr+Er>>1,xn=Qt[2*sn],Ln=Qt[2*sn+1];xn>=D&&xn<=_t&&Ln>=nt&&Ln<=Rt&&er.push(Kt[sn]),(yr===0?D<=xn:nt<=Ln)&&(Fe.push(Zr),Fe.push(sn-1),Fe.push(1-yr)),(yr===0?_t>=xn:Rt>=Ln)&&(Fe.push(sn+1),Fe.push(Er),Fe.push(1-yr))}return er}within(D,nt,_t){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:Rt,coords:Kt,nodeSize:Qt}=this,be=[0,Rt.length-1,0],Fe=[],er=_t*_t;for(;be.length;){let yr=be.pop()||0,Er=be.pop()||0,Zr=be.pop()||0;if(Er-Zr<=Qt){for(let $n=Zr;$n<=Er;$n++)$d(Kt[2*$n],Kt[2*$n+1],D,nt)<=er&&Fe.push(Rt[$n]);continue}let sn=Zr+Er>>1,xn=Kt[2*sn],Ln=Kt[2*sn+1];$d(xn,Ln,D,nt)<=er&&Fe.push(Rt[sn]),(yr===0?D-_t<=xn:nt-_t<=Ln)&&(be.push(Zr),be.push(sn-1),be.push(1-yr)),(yr===0?D+_t>=xn:nt+_t>=Ln)&&(be.push(sn+1),be.push(Er),be.push(1-yr))}return Fe}}function Ib(G,D,nt,_t,Rt,Kt){if(Rt-_t<=nt)return;let Qt=_t+Rt>>1;a5(G,D,Qt,_t,Rt,Kt),Ib(G,D,nt,_t,Qt-1,1-Kt),Ib(G,D,nt,Qt+1,Rt,1-Kt)}function a5(G,D,nt,_t,Rt,Kt){for(;Rt>_t;){if(Rt-_t>600){let er=Rt-_t+1,yr=nt-_t+1,Er=Math.log(er),Zr=.5*Math.exp(2*Er/3),sn=.5*Math.sqrt(Er*Zr*(er-Zr)/er)*(yr-er/2<0?-1:1);a5(G,D,nt,Math.max(_t,Math.floor(nt-yr*Zr/er+sn)),Math.min(Rt,Math.floor(nt+(er-yr)*Zr/er+sn)),Kt)}let Qt=D[2*nt+Kt],be=_t,Fe=Rt;for(Vv(G,D,_t,nt),D[2*Rt+Kt]>Qt&&Vv(G,D,_t,Rt);beQt;)Fe--}D[2*_t+Kt]===Qt?Vv(G,D,_t,Fe):(Fe++,Vv(G,D,Fe,Rt)),Fe<=nt&&(_t=Fe+1),nt<=Fe&&(Rt=Fe-1)}}function Vv(G,D,nt,_t){Dx(G,nt,_t),Dx(D,2*nt,2*_t),Dx(D,2*nt+1,2*_t+1)}function Dx(G,D,nt){let _t=G[D];G[D]=G[nt],G[nt]=_t}function $d(G,D,nt,_t){let Rt=G-nt,Kt=D-_t;return Rt*Rt+Kt*Kt}var Ob;t.bg=void 0,(Ob=t.bg||(t.bg={})).create="create",Ob.load="load",Ob.fullLoad="fullLoad";let Fx=null,Hv=[],Db=1e3/60,Rx="loadTime",Fb="fullLoadTime",o5={mark(G){performance.mark(G)},frame(G){let D=G;Fx!=null&&Hv.push(D-Fx),Fx=D},clearMetrics(){Fx=null,Hv=[],performance.clearMeasures(Rx),performance.clearMeasures(Fb);for(let G in t.bg)performance.clearMarks(t.bg[G])},getPerformanceMetrics(){performance.measure(Rx,t.bg.create,t.bg.load),performance.measure(Fb,t.bg.create,t.bg.fullLoad);let G=performance.getEntriesByName(Rx)[0].duration,D=performance.getEntriesByName(Fb)[0].duration,nt=Hv.length,_t=1/(Hv.reduce((Kt,Qt)=>Kt+Qt,0)/nt/1e3),Rt=Hv.filter(Kt=>Kt>Db).reduce((Kt,Qt)=>Kt+(Qt-Db)/Db,0);return{loadTime:G,fullLoadTime:D,fps:_t,percentDroppedFrames:Rt/(nt+Rt)*100,totalFrames:nt}}};t.$=class extends Or{},t.A=vi,t.B=ga,t.C=function(G){if(N==null){let D=G.navigator?G.navigator.userAgent:null;N=!!G.safari||!(!D||!(/\b(iPad|iPhone|iPod)\b/.test(D)||D.match("Safari")&&!D.match("Chrome")))}return N},t.D=es,t.E=ft,t.F=class{constructor(G,D){this.target=G,this.mapId=D,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new J1(()=>this.process()),this.subscription=function(nt,_t,Rt,Kt){return nt.addEventListener(_t,Rt,!1),{unsubscribe:()=>{nt.removeEventListener(_t,Rt,!1)}}}(this.target,"message",nt=>this.receive(nt)),this.globalScope=O(self)?G:window}registerMessageHandler(G,D){this.messageHandlers[G]=D}sendAsync(G,D){return new Promise((nt,_t)=>{let Rt=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[Rt]={resolve:nt,reject:_t},D&&D.signal.addEventListener("abort",()=>{delete this.resolveRejects[Rt];let be={id:Rt,type:"",origin:location.origin,targetMapId:G.targetMapId,sourceMapId:this.mapId};this.target.postMessage(be)},{once:!0});let Kt=[],Qt=Object.assign(Object.assign({},G),{id:Rt,sourceMapId:this.mapId,origin:location.origin,data:os(G.data,Kt)});this.target.postMessage(Qt,{transfer:Kt})})}receive(G){let D=G.data,nt=D.id;if(!(D.origin!=="file://"&&location.origin!=="file://"&&D.origin!=="resource://android"&&location.origin!=="resource://android"&&D.origin!==location.origin||D.targetMapId&&this.mapId!==D.targetMapId)){if(D.type===""){delete this.tasks[nt];let _t=this.abortControllers[nt];return delete this.abortControllers[nt],void(_t&&_t.abort())}if(O(self)||D.mustQueue)return this.tasks[nt]=D,this.taskQueue.push(nt),void this.invoker.trigger();this.processTask(nt,D)}}process(){if(this.taskQueue.length===0)return;let G=this.taskQueue.shift(),D=this.tasks[G];delete this.tasks[G],this.taskQueue.length>0&&this.invoker.trigger(),D&&this.processTask(G,D)}processTask(G,D){return e(this,void 0,void 0,function*(){if(D.type===""){let Rt=this.resolveRejects[G];return delete this.resolveRejects[G],Rt?void(D.error?Rt.reject(fs(D.error)):Rt.resolve(fs(D.data))):void 0}if(!this.messageHandlers[D.type])return void this.completeTask(G,new Error(`Could not find a registered handler for ${D.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let nt=fs(D.data),_t=new AbortController;this.abortControllers[G]=_t;try{let Rt=yield this.messageHandlers[D.type](D.sourceMapId,nt,_t);this.completeTask(G,null,Rt)}catch(Rt){this.completeTask(G,Rt)}})}completeTask(G,D,nt){let _t=[];delete this.abortControllers[G];let Rt={id:G,type:"",sourceMapId:this.mapId,origin:location.origin,error:D?os(D):null,data:os(nt,_t)};this.target.postMessage(Rt,{transfer:_t})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},t.G=pt,t.H=function(){var G=new vi(16);return vi!=Float32Array&&(G[1]=0,G[2]=0,G[3]=0,G[4]=0,G[6]=0,G[7]=0,G[8]=0,G[9]=0,G[11]=0,G[12]=0,G[13]=0,G[14]=0),G[0]=1,G[5]=1,G[10]=1,G[15]=1,G},t.I=Zd,t.J=function(G,D,nt){var _t,Rt,Kt,Qt,be,Fe,er,yr,Er,Zr,sn,xn,Ln=nt[0],$n=nt[1],ki=nt[2];return D===G?(G[12]=D[0]*Ln+D[4]*$n+D[8]*ki+D[12],G[13]=D[1]*Ln+D[5]*$n+D[9]*ki+D[13],G[14]=D[2]*Ln+D[6]*$n+D[10]*ki+D[14],G[15]=D[3]*Ln+D[7]*$n+D[11]*ki+D[15]):(Rt=D[1],Kt=D[2],Qt=D[3],be=D[4],Fe=D[5],er=D[6],yr=D[7],Er=D[8],Zr=D[9],sn=D[10],xn=D[11],G[0]=_t=D[0],G[1]=Rt,G[2]=Kt,G[3]=Qt,G[4]=be,G[5]=Fe,G[6]=er,G[7]=yr,G[8]=Er,G[9]=Zr,G[10]=sn,G[11]=xn,G[12]=_t*Ln+be*$n+Er*ki+D[12],G[13]=Rt*Ln+Fe*$n+Zr*ki+D[13],G[14]=Kt*Ln+er*$n+sn*ki+D[14],G[15]=Qt*Ln+yr*$n+xn*ki+D[15]),G},t.K=function(G,D,nt){var _t=nt[0],Rt=nt[1],Kt=nt[2];return G[0]=D[0]*_t,G[1]=D[1]*_t,G[2]=D[2]*_t,G[3]=D[3]*_t,G[4]=D[4]*Rt,G[5]=D[5]*Rt,G[6]=D[6]*Rt,G[7]=D[7]*Rt,G[8]=D[8]*Kt,G[9]=D[9]*Kt,G[10]=D[10]*Kt,G[11]=D[11]*Kt,G[12]=D[12],G[13]=D[13],G[14]=D[14],G[15]=D[15],G},t.L=Sa,t.M=function(G,D){let nt={};for(let _t=0;_t{let D=window.document.createElement("video");return D.muted=!0,new Promise(nt=>{D.onloadstart=()=>{nt(D)};for(let _t of G){let Rt=window.document.createElement("source");rt(_t)||(D.crossOrigin="Anonymous"),Rt.src=_t,D.appendChild(Rt)}})},t.a4=function(){return E++},t.a5=ka,t.a6=Rg,t.a7=Cf,t.a8=Lr,t.a9=H3,t.aA=function(G){if(G.type==="custom")return new R3(G);switch(G.type){case"background":return new X1(G);case"circle":return new _a(G);case"fill":return new fi(G);case"fill-extrusion":return new kp(G);case"heatmap":return new fl(G);case"hillshade":return new yc(G);case"line":return new zg(G);case"raster":return new WT(G);case"symbol":return new Cx(G)}},t.aB=p,t.aC=function(G,D){if(!G)return[{command:"setStyle",args:[D]}];let nt=[];try{if(!Pt(G.version,D.version))return[{command:"setStyle",args:[D]}];Pt(G.center,D.center)||nt.push({command:"setCenter",args:[D.center]}),Pt(G.zoom,D.zoom)||nt.push({command:"setZoom",args:[D.zoom]}),Pt(G.bearing,D.bearing)||nt.push({command:"setBearing",args:[D.bearing]}),Pt(G.pitch,D.pitch)||nt.push({command:"setPitch",args:[D.pitch]}),Pt(G.sprite,D.sprite)||nt.push({command:"setSprite",args:[D.sprite]}),Pt(G.glyphs,D.glyphs)||nt.push({command:"setGlyphs",args:[D.glyphs]}),Pt(G.transition,D.transition)||nt.push({command:"setTransition",args:[D.transition]}),Pt(G.light,D.light)||nt.push({command:"setLight",args:[D.light]}),Pt(G.terrain,D.terrain)||nt.push({command:"setTerrain",args:[D.terrain]}),Pt(G.sky,D.sky)||nt.push({command:"setSky",args:[D.sky]}),Pt(G.projection,D.projection)||nt.push({command:"setProjection",args:[D.projection]});let _t={},Rt=[];(function(Qt,be,Fe,er){let yr;for(yr in be=be||{},Qt=Qt||{})Object.prototype.hasOwnProperty.call(Qt,yr)&&(Object.prototype.hasOwnProperty.call(be,yr)||Jt(yr,Fe,er));for(yr in be)Object.prototype.hasOwnProperty.call(be,yr)&&(Object.prototype.hasOwnProperty.call(Qt,yr)?Pt(Qt[yr],be[yr])||(Qt[yr].type==="geojson"&&be[yr].type==="geojson"&&he(Qt,be,yr)?Wt(Fe,{command:"setGeoJSONSourceData",args:[yr,be[yr].data]}):ge(yr,be,Fe,er)):Ht(yr,be,Fe))})(G.sources,D.sources,Rt,_t);let Kt=[];G.layers&&G.layers.forEach(Qt=>{"source"in Qt&&_t[Qt.source]?nt.push({command:"removeLayer",args:[Qt.id]}):Kt.push(Qt)}),nt=nt.concat(Rt),function(Qt,be,Fe){be=be||[];let er=(Qt=Qt||[]).map(se),yr=be.map(se),Er=Qt.reduce(Tt,{}),Zr=be.reduce(Tt,{}),sn=er.slice(),xn=Object.create(null),Ln,$n,ki,Aa,Xi;for(let ma=0,Ga=0;ma@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(nt,_t,Rt,Kt)=>{let Qt=Rt||Kt;return D[_t]=!Qt||Qt.toLowerCase(),""}),D["max-age"]){let nt=parseInt(D["max-age"],10);isNaN(nt)?delete D["max-age"]:D["max-age"]=nt}return D},t.ab=function(G,D){let nt=[];for(let _t in G)_t in D||nt.push(_t);return nt},t.ac=_,t.ad=function(G,D,nt){var _t=Math.sin(nt),Rt=Math.cos(nt),Kt=D[0],Qt=D[1],be=D[2],Fe=D[3],er=D[4],yr=D[5],Er=D[6],Zr=D[7];return D!==G&&(G[8]=D[8],G[9]=D[9],G[10]=D[10],G[11]=D[11],G[12]=D[12],G[13]=D[13],G[14]=D[14],G[15]=D[15]),G[0]=Kt*Rt+er*_t,G[1]=Qt*Rt+yr*_t,G[2]=be*Rt+Er*_t,G[3]=Fe*Rt+Zr*_t,G[4]=er*Rt-Kt*_t,G[5]=yr*Rt-Qt*_t,G[6]=Er*Rt-be*_t,G[7]=Zr*Rt-Fe*_t,G},t.ae=function(G){var D=new vi(16);return D[0]=G[0],D[1]=G[1],D[2]=G[2],D[3]=G[3],D[4]=G[4],D[5]=G[5],D[6]=G[6],D[7]=G[7],D[8]=G[8],D[9]=G[9],D[10]=G[10],D[11]=G[11],D[12]=G[12],D[13]=G[13],D[14]=G[14],D[15]=G[15],D},t.af=$i,t.ag=function(G,D){let nt=0,_t=0;if(G.kind==="constant")_t=G.layoutSize;else if(G.kind!=="source"){let{interpolationType:Rt,minZoom:Kt,maxZoom:Qt}=G,be=Rt?_(Ia.interpolationFactor(Rt,D,Kt,Qt),0,1):0;G.kind==="camera"?_t=Do.number(G.minSize,G.maxSize,be):nt=be}return{uSizeT:nt,uSize:_t}},t.ai=function(G,{uSize:D,uSizeT:nt},{lowerSize:_t,upperSize:Rt}){return G.kind==="source"?_t/tm:G.kind==="composite"?Do.number(_t/tm,Rt/tm,nt):D},t.aj=Ym,t.ak=function(G,D,nt,_t){let Rt=D.y-G.y,Kt=D.x-G.x,Qt=_t.y-nt.y,be=_t.x-nt.x,Fe=Qt*Kt-be*Rt;if(Fe===0)return null;let er=(be*(G.y-nt.y)-Qt*(G.x-nt.x))/Fe;return new o(G.x+er*Kt,G.y+er*Rt)},t.al=$3,t.am=Jn,t.an=ti,t.ao=function(G){let D=1/0,nt=1/0,_t=-1/0,Rt=-1/0;for(let Kt of G)D=Math.min(D,Kt.x),nt=Math.min(nt,Kt.y),_t=Math.max(_t,Kt.x),Rt=Math.max(Rt,Kt.y);return[D,nt,_t,Rt]},t.ap=bc,t.ar=bb,t.as=function(G,D){var nt=D[0],_t=D[1],Rt=D[2],Kt=D[3],Qt=D[4],be=D[5],Fe=D[6],er=D[7],yr=D[8],Er=D[9],Zr=D[10],sn=D[11],xn=D[12],Ln=D[13],$n=D[14],ki=D[15],Aa=nt*be-_t*Qt,Xi=nt*Fe-Rt*Qt,ma=nt*er-Kt*Qt,Ga=_t*Fe-Rt*be,To=_t*er-Kt*be,As=Rt*er-Kt*Fe,Sl=yr*Ln-Er*xn,ys=yr*$n-Zr*xn,cs=yr*ki-sn*xn,Ys=Er*$n-Zr*Ln,Bs=Er*ki-sn*Ln,Is=Zr*ki-sn*$n,oo=Aa*Is-Xi*Bs+ma*Ys+Ga*cs-To*ys+As*Sl;return oo?(G[0]=(be*Is-Fe*Bs+er*Ys)*(oo=1/oo),G[1]=(Rt*Bs-_t*Is-Kt*Ys)*oo,G[2]=(Ln*As-$n*To+ki*Ga)*oo,G[3]=(Zr*To-Er*As-sn*Ga)*oo,G[4]=(Fe*cs-Qt*Is-er*ys)*oo,G[5]=(nt*Is-Rt*cs+Kt*ys)*oo,G[6]=($n*ma-xn*As-ki*Xi)*oo,G[7]=(yr*As-Zr*ma+sn*Xi)*oo,G[8]=(Qt*Bs-be*cs+er*Sl)*oo,G[9]=(_t*cs-nt*Bs-Kt*Sl)*oo,G[10]=(xn*To-Ln*ma+ki*Aa)*oo,G[11]=(Er*ma-yr*To-sn*Aa)*oo,G[12]=(be*ys-Qt*Ys-Fe*Sl)*oo,G[13]=(nt*Ys-_t*ys+Rt*Sl)*oo,G[14]=(Ln*Xi-xn*Ga-$n*Aa)*oo,G[15]=(yr*Ga-Er*Xi+Zr*Aa)*oo,G):null},t.at=Pb,t.au=_b,t.av=zb,t.aw=function(){let G={},D=ut.$version;for(let nt in ut.$root){let _t=ut.$root[nt];if(_t.required){let Rt=null;Rt=nt==="version"?D:_t.type==="array"?[]:{},Rt!=null&&(G[nt]=Rt)}}return G},t.ax=no,t.ay=tt,t.az=function(G){G=G.slice();let D=Object.create(null);for(let nt=0;nt25||_t<0||_t>=1||nt<0||nt>=1)},t.bc=function(G,D){return G[0]=D[0],G[1]=0,G[2]=0,G[3]=0,G[4]=0,G[5]=D[1],G[6]=0,G[7]=0,G[8]=0,G[9]=0,G[10]=D[2],G[11]=0,G[12]=0,G[13]=0,G[14]=0,G[15]=1,G},t.bd=class extends gr{},t.be=Mb,t.bf=o5,t.bh=st,t.bi=function(G,D){lt.REGISTERED_PROTOCOLS[G]=D},t.bj=function(G){delete lt.REGISTERED_PROTOCOLS[G]},t.bk=function(G,D){let nt={};for(let Rt=0;RtIs*bc)}let ys=Qt?"center":nt.get("text-justify").evaluate(er,{},G.canonical),cs=nt.get("symbol-placement")==="point"?nt.get("text-max-width").evaluate(er,{},G.canonical)*bc:1/0,Ys=()=>{G.bucket.allowVerticalPlacement&&ds(ma)&&(xn.vertical=Tx(Ln,G.glyphMap,G.glyphPositions,G.imagePositions,yr,cs,Kt,As,"left",To,ki,t.ah.vertical,!0,Zr,Er))};if(!Qt&&Sl){let Bs=new Set;if(ys==="auto")for(let oo=0;ooe(void 0,void 0,void 0,function*(){if(G.byteLength===0)return createImageBitmap(new ImageData(1,1));let D=new Blob([new Uint8Array(G)],{type:"image/png"});try{return createImageBitmap(D)}catch(nt){throw new Error(`Could not load image because of ${nt.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),t.e=M,t.f=G=>new Promise((D,nt)=>{let _t=new Image;_t.onload=()=>{D(_t),URL.revokeObjectURL(_t.src),_t.onload=null,window.requestAnimationFrame(()=>{_t.src=H})},_t.onerror=()=>nt(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let Rt=new Blob([new Uint8Array(G)],{type:"image/png"});_t.src=G.byteLength?URL.createObjectURL(Rt):H}),t.g=yt,t.h=(G,D)=>dt(M(G,{type:"json"}),D),t.i=O,t.j=Y,t.k=it,t.l=(G,D)=>dt(M(G,{type:"arrayBuffer"}),D),t.m=dt,t.n=function(G){return new gb(G).readFields(RT,[])},t.o=Nl,t.p=kx,t.q=qt,t.r=ea,t.s=rt,t.t=ua,t.u=hi,t.v=ut,t.w=w,t.x=function([G,D,nt]){return D+=90,D*=Math.PI/180,nt*=Math.PI/180,{x:G*Math.cos(D)*Math.sin(nt),y:G*Math.sin(D)*Math.sin(nt),z:G*Math.cos(nt)}},t.y=Do,t.z=Fl}),P("worker",["./shared"],function(t){class e{constructor($t){this.keyCache={},$t&&this.replace($t)}replace($t){this._layerConfigs={},this._layers={},this.update($t,[])}update($t,ne){for(let gt of $t){this._layerConfigs[gt.id]=gt;let St=this._layers[gt.id]=t.aA(gt);St._featureFilter=t.a7(St.filter),this.keyCache[gt.id]&&delete this.keyCache[gt.id]}for(let gt of ne)delete this.keyCache[gt],delete this._layerConfigs[gt],delete this._layers[gt];this.familiesBySource={};let Ct=t.bk(Object.values(this._layerConfigs),this.keyCache);for(let gt of Ct){let St=gt.map(qe=>this._layers[qe.id]),Nt=St[0];if(Nt.visibility==="none")continue;let ee=Nt.source||"",le=this.familiesBySource[ee];le||(le=this.familiesBySource[ee]={});let we=Nt.sourceLayer||"_geojsonTileLayer",Ue=le[we];Ue||(Ue=le[we]=[]),Ue.push(St)}}}class r{constructor($t){let ne={},Ct=[];for(let ee in $t){let le=$t[ee],we=ne[ee]={};for(let Ue in le){let qe=le[+Ue];if(!qe||qe.bitmap.width===0||qe.bitmap.height===0)continue;let ar={x:0,y:0,w:qe.bitmap.width+2,h:qe.bitmap.height+2};Ct.push(ar),we[Ue]={rect:ar,metrics:qe.metrics}}}let{w:gt,h:St}=t.p(Ct),Nt=new t.o({width:gt||1,height:St||1});for(let ee in $t){let le=$t[ee];for(let we in le){let Ue=le[+we];if(!Ue||Ue.bitmap.width===0||Ue.bitmap.height===0)continue;let qe=ne[ee][we].rect;t.o.copy(Ue.bitmap,Nt,{x:0,y:0},{x:qe.x+1,y:qe.y+1},Ue.bitmap)}}this.image=Nt,this.positions=ne}}t.bl("GlyphAtlas",r);class a{constructor($t){this.tileID=new t.S($t.tileID.overscaledZ,$t.tileID.wrap,$t.tileID.canonical.z,$t.tileID.canonical.x,$t.tileID.canonical.y),this.uid=$t.uid,this.zoom=$t.zoom,this.pixelRatio=$t.pixelRatio,this.tileSize=$t.tileSize,this.source=$t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=$t.showCollisionBoxes,this.collectResourceTiming=!!$t.collectResourceTiming,this.returnDependencies=!!$t.returnDependencies,this.promoteId=$t.promoteId,this.inFlightDependencies=[]}parse($t,ne,Ct,gt){return t._(this,void 0,void 0,function*(){this.status="parsing",this.data=$t,this.collisionBoxArray=new t.a5;let St=new t.bm(Object.keys($t.layers).sort()),Nt=new t.bn(this.tileID,this.promoteId);Nt.bucketLayerIDs=[];let ee={},le={featureIndex:Nt,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ct},we=ne.familiesBySource[this.source];for(let ii in we){let qn=$t.layers[ii];if(!qn)continue;qn.version===1&&t.w(`Vector tile source "${this.source}" layer "${ii}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let oa=St.encode(ii),Hi=[];for(let We=0;We=rr.maxzoom||rr.visibility!=="none"&&(n(We,this.zoom,Ct),(ee[rr.id]=rr.createBucket({index:Nt.bucketLayerIDs.length,layers:We,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:oa,sourceID:this.source})).populate(Hi,le,this.tileID.canonical),Nt.bucketLayerIDs.push(We.map(fr=>fr.id)))}}let Ue=t.aF(le.glyphDependencies,ii=>Object.keys(ii).map(Number));this.inFlightDependencies.forEach(ii=>ii?.abort()),this.inFlightDependencies=[];let qe=Promise.resolve({});if(Object.keys(Ue).length){let ii=new AbortController;this.inFlightDependencies.push(ii),qe=gt.sendAsync({type:"GG",data:{stacks:Ue,source:this.source,tileID:this.tileID,type:"glyphs"}},ii)}let ar=Object.keys(le.iconDependencies),Ar=Promise.resolve({});if(ar.length){let ii=new AbortController;this.inFlightDependencies.push(ii),Ar=gt.sendAsync({type:"GI",data:{icons:ar,source:this.source,tileID:this.tileID,type:"icons"}},ii)}let Tr=Object.keys(le.patternDependencies),pr=Promise.resolve({});if(Tr.length){let ii=new AbortController;this.inFlightDependencies.push(ii),pr=gt.sendAsync({type:"GI",data:{icons:Tr,source:this.source,tileID:this.tileID,type:"patterns"}},ii)}let[Jr,Vn,Hn]=yield Promise.all([qe,Ar,pr]),Kn=new r(Jr),Ci=new t.bo(Vn,Hn);for(let ii in ee){let qn=ee[ii];qn instanceof t.a6?(n(qn.layers,this.zoom,Ct),t.bp({bucket:qn,glyphMap:Jr,glyphPositions:Kn.positions,imageMap:Vn,imagePositions:Ci.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):qn.hasPattern&&(qn instanceof t.bq||qn instanceof t.br||qn instanceof t.bs)&&(n(qn.layers,this.zoom,Ct),qn.addFeatures(le,this.tileID.canonical,Ci.patternPositions))}return this.status="done",{buckets:Object.values(ee).filter(ii=>!ii.isEmpty()),featureIndex:Nt,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Kn.image,imageAtlas:Ci,glyphMap:this.returnDependencies?Jr:null,iconMap:this.returnDependencies?Vn:null,glyphPositions:this.returnDependencies?Kn.positions:null}})}}function n(Ce,$t,ne){let Ct=new t.z($t);for(let gt of Ce)gt.recalculate(Ct,ne)}class o{constructor($t,ne,Ct){this.actor=$t,this.layerIndex=ne,this.availableImages=Ct,this.fetching={},this.loading={},this.loaded={}}loadVectorTile($t,ne){return t._(this,void 0,void 0,function*(){let Ct=yield t.l($t.request,ne);try{return{vectorTile:new t.bt.VectorTile(new t.bu(Ct.data)),rawData:Ct.data,cacheControl:Ct.cacheControl,expires:Ct.expires}}catch(gt){let St=new Uint8Array(Ct.data),Nt=`Unable to parse the tile at ${$t.request.url}, `;throw Nt+=St[0]===31&&St[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${gt.message}`,new Error(Nt)}})}loadTile($t){return t._(this,void 0,void 0,function*(){let ne=$t.uid,Ct=!!($t&&$t.request&&$t.request.collectResourceTiming)&&new t.bv($t.request),gt=new a($t);this.loading[ne]=gt;let St=new AbortController;gt.abort=St;try{let Nt=yield this.loadVectorTile($t,St);if(delete this.loading[ne],!Nt)return null;let ee=Nt.rawData,le={};Nt.expires&&(le.expires=Nt.expires),Nt.cacheControl&&(le.cacheControl=Nt.cacheControl);let we={};if(Ct){let qe=Ct.finish();qe&&(we.resourceTiming=JSON.parse(JSON.stringify(qe)))}gt.vectorTile=Nt.vectorTile;let Ue=gt.parse(Nt.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[ne]=gt,this.fetching[ne]={rawTileData:ee,cacheControl:le,resourceTiming:we};try{let qe=yield Ue;return t.e({rawTileData:ee.slice(0)},qe,le,we)}finally{delete this.fetching[ne]}}catch(Nt){throw delete this.loading[ne],gt.status="done",this.loaded[ne]=gt,Nt}})}reloadTile($t){return t._(this,void 0,void 0,function*(){let ne=$t.uid;if(!this.loaded||!this.loaded[ne])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Ct=this.loaded[ne];if(Ct.showCollisionBoxes=$t.showCollisionBoxes,Ct.status==="parsing"){let gt=yield Ct.parse(Ct.vectorTile,this.layerIndex,this.availableImages,this.actor),St;if(this.fetching[ne]){let{rawTileData:Nt,cacheControl:ee,resourceTiming:le}=this.fetching[ne];delete this.fetching[ne],St=t.e({rawTileData:Nt.slice(0)},gt,ee,le)}else St=gt;return St}if(Ct.status==="done"&&Ct.vectorTile)return Ct.parse(Ct.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile($t){return t._(this,void 0,void 0,function*(){let ne=this.loading,Ct=$t.uid;ne&&ne[Ct]&&ne[Ct].abort&&(ne[Ct].abort.abort(),delete ne[Ct])})}removeTile($t){return t._(this,void 0,void 0,function*(){this.loaded&&this.loaded[$t.uid]&&delete this.loaded[$t.uid]})}}class i{constructor(){this.loaded={}}loadTile($t){return t._(this,void 0,void 0,function*(){let{uid:ne,encoding:Ct,rawImageData:gt,redFactor:St,greenFactor:Nt,blueFactor:ee,baseShift:le}=$t,we=gt.width+2,Ue=gt.height+2,qe=t.b(gt)?new t.R({width:we,height:Ue},yield t.bw(gt,-1,-1,we,Ue)):gt,ar=new t.bx(ne,qe,Ct,St,Nt,ee,le);return this.loaded=this.loaded||{},this.loaded[ne]=ar,ar})}removeTile($t){let ne=this.loaded,Ct=$t.uid;ne&&ne[Ct]&&delete ne[Ct]}}function s(Ce,$t){if(Ce.length!==0){f(Ce[0],$t);for(var ne=1;ne=Math.abs(ee)?ne-le+ee:ee-le+ne,ne=le}ne+Ct>=0!=!!$t&&Ce.reverse()}var x=t.by(function Ce($t,ne){var Ct,gt=$t&&$t.type;if(gt==="FeatureCollection")for(Ct=0;Ct<$t.features.length;Ct++)Ce($t.features[Ct],ne);else if(gt==="GeometryCollection")for(Ct=0;Ct<$t.geometries.length;Ct++)Ce($t.geometries[Ct],ne);else if(gt==="Feature")Ce($t.geometry,ne);else if(gt==="Polygon")s($t.coordinates,ne);else if(gt==="MultiPolygon")for(Ct=0;Ct<$t.coordinates.length;Ct++)s($t.coordinates[Ct],ne);return $t});let y=t.bt.VectorTileFeature.prototype.toGeoJSON;var v={exports:{}},T=t.bz,u=t.bt.VectorTileFeature,b=_;function _(Ce,$t){this.options=$t||{},this.features=Ce,this.length=Ce.length}function C(Ce,$t){this.id=typeof Ce.id=="number"?Ce.id:void 0,this.type=Ce.type,this.rawGeometry=Ce.type===1?[Ce.geometry]:Ce.geometry,this.properties=Ce.tags,this.extent=$t||4096}_.prototype.feature=function(Ce){return new C(this.features[Ce],this.options.extent)},C.prototype.loadGeometry=function(){var Ce=this.rawGeometry;this.geometry=[];for(var $t=0;$t>31}function O(Ce,$t){for(var ne=Ce.loadGeometry(),Ct=Ce.type,gt=0,St=0,Nt=ne.length,ee=0;eeCe},F=Math.fround||(U=new Float32Array(1),Ce=>(U[0]=+Ce,U[0]));var U;let W=3,q=5,X=6;class lt{constructor($t){this.options=Object.assign(Object.create(H),$t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load($t){let{log:ne,minZoom:Ct,maxZoom:gt}=this.options;ne&&console.time("total time");let St=`prepare ${$t.length} points`;ne&&console.time(St),this.points=$t;let Nt=[];for(let le=0;le<$t.length;le++){let we=$t[le];if(!we.geometry)continue;let[Ue,qe]=we.geometry.coordinates,ar=F(st(Ue)),Ar=F(tt(qe));Nt.push(ar,Ar,1/0,le,-1,1),this.options.reduce&&Nt.push(0)}let ee=this.trees[gt+1]=this._createTree(Nt);ne&&console.timeEnd(St);for(let le=gt;le>=Ct;le--){let we=+Date.now();ee=this.trees[le]=this._createTree(this._cluster(ee,le)),ne&&console.log("z%d: %d clusters in %dms",le,ee.numItems,+Date.now()-we)}return ne&&console.timeEnd("total time"),this}getClusters($t,ne){let Ct=(($t[0]+180)%360+360)%360-180,gt=Math.max(-90,Math.min(90,$t[1])),St=$t[2]===180?180:(($t[2]+180)%360+360)%360-180,Nt=Math.max(-90,Math.min(90,$t[3]));if($t[2]-$t[0]>=360)Ct=-180,St=180;else if(Ct>St){let qe=this.getClusters([Ct,gt,180,Nt],ne),ar=this.getClusters([-180,gt,St,Nt],ne);return qe.concat(ar)}let ee=this.trees[this._limitZoom(ne)],le=ee.range(st(Ct),tt(Nt),st(St),tt(gt)),we=ee.data,Ue=[];for(let qe of le){let ar=this.stride*qe;Ue.push(we[ar+q]>1?yt(we,ar,this.clusterProps):this.points[we[ar+W]])}return Ue}getChildren($t){let ne=this._getOriginId($t),Ct=this._getOriginZoom($t),gt="No cluster with the specified id.",St=this.trees[Ct];if(!St)throw new Error(gt);let Nt=St.data;if(ne*this.stride>=Nt.length)throw new Error(gt);let ee=this.options.radius/(this.options.extent*Math.pow(2,Ct-1)),le=St.within(Nt[ne*this.stride],Nt[ne*this.stride+1],ee),we=[];for(let Ue of le){let qe=Ue*this.stride;Nt[qe+4]===$t&&we.push(Nt[qe+q]>1?yt(Nt,qe,this.clusterProps):this.points[Nt[qe+W]])}if(we.length===0)throw new Error(gt);return we}getLeaves($t,ne,Ct){let gt=[];return this._appendLeaves(gt,$t,ne=ne||10,Ct=Ct||0,0),gt}getTile($t,ne,Ct){let gt=this.trees[this._limitZoom($t)],St=Math.pow(2,$t),{extent:Nt,radius:ee}=this.options,le=ee/Nt,we=(Ct-le)/St,Ue=(Ct+1+le)/St,qe={features:[]};return this._addTileFeatures(gt.range((ne-le)/St,we,(ne+1+le)/St,Ue),gt.data,ne,Ct,St,qe),ne===0&&this._addTileFeatures(gt.range(1-le/St,we,1,Ue),gt.data,St,Ct,St,qe),ne===St-1&&this._addTileFeatures(gt.range(0,we,le/St,Ue),gt.data,-1,Ct,St,qe),qe.features.length?qe:null}getClusterExpansionZoom($t){let ne=this._getOriginZoom($t)-1;for(;ne<=this.options.maxZoom;){let Ct=this.getChildren($t);if(ne++,Ct.length!==1)break;$t=Ct[0].properties.cluster_id}return ne}_appendLeaves($t,ne,Ct,gt,St){let Nt=this.getChildren(ne);for(let ee of Nt){let le=ee.properties;if(le&&le.cluster?St+le.point_count<=gt?St+=le.point_count:St=this._appendLeaves($t,le.cluster_id,Ct,gt,St):St1,Ue,qe,ar;if(we)Ue=pt(ne,le,this.clusterProps),qe=ne[le],ar=ne[le+1];else{let pr=this.points[ne[le+W]];Ue=pr.properties;let[Jr,Vn]=pr.geometry.coordinates;qe=st(Jr),ar=tt(Vn)}let Ar={type:1,geometry:[[Math.round(this.options.extent*(qe*St-Ct)),Math.round(this.options.extent*(ar*St-gt))]],tags:Ue},Tr;Tr=we||this.options.generateId?ne[le+W]:this.points[ne[le+W]].id,Tr!==void 0&&(Ar.id=Tr),Nt.features.push(Ar)}}_limitZoom($t){return Math.max(this.options.minZoom,Math.min(Math.floor(+$t),this.options.maxZoom+1))}_cluster($t,ne){let{radius:Ct,extent:gt,reduce:St,minPoints:Nt}=this.options,ee=Ct/(gt*Math.pow(2,ne)),le=$t.data,we=[],Ue=this.stride;for(let qe=0;qene&&(Jr+=le[Hn+q])}if(Jr>pr&&Jr>=Nt){let Vn,Hn=ar*pr,Kn=Ar*pr,Ci=-1,ii=((qe/Ue|0)<<5)+(ne+1)+this.points.length;for(let qn of Tr){let oa=qn*Ue;if(le[oa+2]<=ne)continue;le[oa+2]=ne;let Hi=le[oa+q];Hn+=le[oa]*Hi,Kn+=le[oa+1]*Hi,le[oa+4]=ii,St&&(Vn||(Vn=this._map(le,qe,!0),Ci=this.clusterProps.length,this.clusterProps.push(Vn)),St(Vn,this._map(le,oa)))}le[qe+4]=ii,we.push(Hn/Jr,Kn/Jr,1/0,ii,-1,Jr),St&&we.push(Ci)}else{for(let Vn=0;Vn1)for(let Vn of Tr){let Hn=Vn*Ue;if(!(le[Hn+2]<=ne)){le[Hn+2]=ne;for(let Kn=0;Kn>5}_getOriginZoom($t){return($t-this.points.length)%32}_map($t,ne,Ct){if($t[ne+q]>1){let Nt=this.clusterProps[$t[ne+X]];return Ct?Object.assign({},Nt):Nt}let gt=this.points[$t[ne+W]].properties,St=this.options.map(gt);return Ct&&St===gt?Object.assign({},St):St}}function yt(Ce,$t,ne){return{type:"Feature",id:Ce[$t+W],properties:pt(Ce,$t,ne),geometry:{type:"Point",coordinates:[(Ct=Ce[$t],360*(Ct-.5)),dt(Ce[$t+1])]}};var Ct}function pt(Ce,$t,ne){let Ct=Ce[$t+q],gt=Ct>=1e4?`${Math.round(Ct/1e3)}k`:Ct>=1e3?Math.round(Ct/100)/10+"k":Ct,St=Ce[$t+X],Nt=St===-1?{}:Object.assign({},ne[St]);return Object.assign(Nt,{cluster:!0,cluster_id:Ce[$t+W],point_count:Ct,point_count_abbreviated:gt})}function st(Ce){return Ce/360+.5}function tt(Ce){let $t=Math.sin(Ce*Math.PI/180),ne=.5-.25*Math.log((1+$t)/(1-$t))/Math.PI;return ne<0?0:ne>1?1:ne}function dt(Ce){let $t=(180-360*Ce)*Math.PI/180;return 360*Math.atan(Math.exp($t))/Math.PI-90}function rt(Ce,$t,ne,Ct){let gt=Ct,St=$t+(ne-$t>>1),Nt,ee=ne-$t,le=Ce[$t],we=Ce[$t+1],Ue=Ce[ne],qe=Ce[ne+1];for(let ar=$t+3;argt)Nt=ar,gt=Ar;else if(Ar===gt){let Tr=Math.abs(ar-St);TrCt&&(Nt-$t>3&&rt(Ce,$t,Nt,Ct),Ce[Nt+2]=gt,ne-Nt>3&&rt(Ce,Nt,ne,Ct))}function at(Ce,$t,ne,Ct,gt,St){let Nt=gt-ne,ee=St-Ct;if(Nt!==0||ee!==0){let le=((Ce-ne)*Nt+($t-Ct)*ee)/(Nt*Nt+ee*ee);le>1?(ne=gt,Ct=St):le>0&&(ne+=Nt*le,Ct+=ee*le)}return Nt=Ce-ne,ee=$t-Ct,Nt*Nt+ee*ee}function vt(Ce,$t,ne,Ct){let gt={id:Ce??null,type:$t,geometry:ne,tags:Ct,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if($t==="Point"||$t==="MultiPoint"||$t==="LineString")it(gt,ne);else if($t==="Polygon")it(gt,ne[0]);else if($t==="MultiLineString")for(let St of ne)it(gt,St);else if($t==="MultiPolygon")for(let St of ne)it(gt,St[0]);return gt}function it(Ce,$t){for(let ne=0;ne<$t.length;ne+=3)Ce.minX=Math.min(Ce.minX,$t[ne]),Ce.minY=Math.min(Ce.minY,$t[ne+1]),Ce.maxX=Math.max(Ce.maxX,$t[ne]),Ce.maxY=Math.max(Ce.maxY,$t[ne+1])}function Y(Ce,$t,ne,Ct){if(!$t.geometry)return;let gt=$t.geometry.coordinates;if(gt&>.length===0)return;let St=$t.geometry.type,Nt=Math.pow(ne.tolerance/((1<0&&(Nt+=Ct?(gt*Ue-we*St)/2:Math.sqrt(Math.pow(we-gt,2)+Math.pow(Ue-St,2))),gt=we,St=Ue}let ee=$t.length-3;$t[2]=1,rt($t,0,ee,ne),$t[ee+2]=1,$t.size=Math.abs(Nt),$t.start=0,$t.end=$t.size}function wt(Ce,$t,ne,Ct){for(let gt=0;gt1?1:ne}function Wt(Ce,$t,ne,Ct,gt,St,Nt,ee){if(Ct/=$t,St>=(ne/=$t)&&Nt=Ct)return null;let le=[];for(let we of Ce){let Ue=we.geometry,qe=we.type,ar=gt===0?we.minX:we.minY,Ar=gt===0?we.maxX:we.maxY;if(ar>=ne&&Ar=Ct)continue;let Tr=[];if(qe==="Point"||qe==="MultiPoint")Ht(Ue,Tr,ne,Ct,gt);else if(qe==="LineString")Jt(Ue,Tr,ne,Ct,gt,!1,ee.lineMetrics);else if(qe==="MultiLineString")he(Ue,Tr,ne,Ct,gt,!1);else if(qe==="Polygon")he(Ue,Tr,ne,Ct,gt,!0);else if(qe==="MultiPolygon")for(let pr of Ue){let Jr=[];he(pr,Jr,ne,Ct,gt,!0),Jr.length&&Tr.push(Jr)}if(Tr.length){if(ee.lineMetrics&&qe==="LineString"){for(let pr of Tr)le.push(vt(we.id,qe,pr,we.tags));continue}qe!=="LineString"&&qe!=="MultiLineString"||(Tr.length===1?(qe="LineString",Tr=Tr[0]):qe="MultiLineString"),qe!=="Point"&&qe!=="MultiPoint"||(qe=Tr.length===3?"Point":"MultiPoint"),le.push(vt(we.id,qe,Tr,we.tags))}}return le.length?le:null}function Ht(Ce,$t,ne,Ct,gt){for(let St=0;St=ne&&Nt<=Ct&&de($t,Ce[St],Ce[St+1],Ce[St+2])}}function Jt(Ce,$t,ne,Ct,gt,St,Nt){let ee=ge(Ce),le=gt===0?se:Tt,we,Ue,qe=Ce.start;for(let Jr=0;Jrne&&(Ue=le(ee,Vn,Hn,Ci,ii,ne),Nt&&(ee.start=qe+we*Ue)):qn>Ct?oa=ne&&(Ue=le(ee,Vn,Hn,Ci,ii,ne),Hi=!0),oa>Ct&&qn<=Ct&&(Ue=le(ee,Vn,Hn,Ci,ii,Ct),Hi=!0),!St&&Hi&&(Nt&&(ee.end=qe+we*Ue),$t.push(ee),ee=ge(Ce)),Nt&&(qe+=we)}let ar=Ce.length-3,Ar=Ce[ar],Tr=Ce[ar+1],pr=gt===0?Ar:Tr;pr>=ne&&pr<=Ct&&de(ee,Ar,Tr,Ce[ar+2]),ar=ee.length-3,St&&ar>=3&&(ee[ar]!==ee[0]||ee[ar+1]!==ee[1])&&de(ee,ee[0],ee[1],ee[2]),ee.length&&$t.push(ee)}function ge(Ce){let $t=[];return $t.size=Ce.size,$t.start=Ce.start,$t.end=Ce.end,$t}function he(Ce,$t,ne,Ct,gt,St){for(let Nt of Ce)Jt(Nt,$t,ne,Ct,gt,St,!1)}function de(Ce,$t,ne,Ct){Ce.push($t,ne,Ct)}function se(Ce,$t,ne,Ct,gt,St){let Nt=(St-$t)/(Ct-$t);return de(Ce,St,ne+(gt-ne)*Nt,1),Nt}function Tt(Ce,$t,ne,Ct,gt,St){let Nt=(St-ne)/(gt-ne);return de(Ce,$t+(Ct-$t)*Nt,St,1),Nt}function Lt(Ce,$t){let ne=[];for(let Ct=0;Ct0&&$t.size<(gt?Nt:Ct))return void(ne.numPoints+=$t.length/3);let ee=[];for(let le=0;le<$t.length;le+=3)(Ct===0||$t[le+2]>Nt)&&(ne.numSimplified++,ee.push($t[le],$t[le+1])),ne.numPoints++;gt&&function(le,we){let Ue=0;for(let qe=0,ar=le.length,Ar=ar-2;qe0===we)for(let qe=0,ar=le.length;qe24)throw new Error("maxZoom should be in the 0-24 range");if(ne.promoteId&&ne.generateId)throw new Error("promoteId and generateId cannot be used together.");let gt=function(St,Nt){let ee=[];if(St.type==="FeatureCollection")for(let le=0;le1&&console.time("creation"),Ar=this.tiles[ar]=oe($t,ne,Ct,gt,we),this.tileCoords.push({z:ne,x:Ct,y:gt}),Ue)){Ue>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ne,Ct,gt,Ar.numFeatures,Ar.numPoints,Ar.numSimplified),console.timeEnd("creation"));let Hi=`z${ne}`;this.stats[Hi]=(this.stats[Hi]||0)+1,this.total++}if(Ar.source=$t,St==null){if(ne===we.indexMaxZoom||Ar.numPoints<=we.indexMaxPoints)continue}else{if(ne===we.maxZoom||ne===St)continue;if(St!=null){let Hi=St-ne;if(Ct!==Nt>>Hi||gt!==ee>>Hi)continue}}if(Ar.source=null,$t.length===0)continue;Ue>1&&console.time("clipping");let Tr=.5*we.buffer/we.extent,pr=.5-Tr,Jr=.5+Tr,Vn=1+Tr,Hn=null,Kn=null,Ci=null,ii=null,qn=Wt($t,qe,Ct-Tr,Ct+Jr,0,Ar.minX,Ar.maxX,we),oa=Wt($t,qe,Ct+pr,Ct+Vn,0,Ar.minX,Ar.maxX,we);$t=null,qn&&(Hn=Wt(qn,qe,gt-Tr,gt+Jr,1,Ar.minY,Ar.maxY,we),Kn=Wt(qn,qe,gt+pr,gt+Vn,1,Ar.minY,Ar.maxY,we),qn=null),oa&&(Ci=Wt(oa,qe,gt-Tr,gt+Jr,1,Ar.minY,Ar.maxY,we),ii=Wt(oa,qe,gt+pr,gt+Vn,1,Ar.minY,Ar.maxY,we),oa=null),Ue>1&&console.timeEnd("clipping"),le.push(Hn||[],ne+1,2*Ct,2*gt),le.push(Kn||[],ne+1,2*Ct,2*gt+1),le.push(Ci||[],ne+1,2*Ct+1,2*gt),le.push(ii||[],ne+1,2*Ct+1,2*gt+1)}}getTile($t,ne,Ct){$t=+$t,ne=+ne,Ct=+Ct;let gt=this.options,{extent:St,debug:Nt}=gt;if($t<0||$t>24)return null;let ee=1<<$t,le=ur($t,ne=ne+ee&ee-1,Ct);if(this.tiles[le])return te(this.tiles[le],St);Nt>1&&console.log("drilling down to z%d-%d-%d",$t,ne,Ct);let we,Ue=$t,qe=ne,ar=Ct;for(;!we&&Ue>0;)Ue--,qe>>=1,ar>>=1,we=this.tiles[ur(Ue,qe,ar)];return we&&we.source?(Nt>1&&(console.log("found parent tile z%d-%d-%d",Ue,qe,ar),console.time("drilling down")),this.splitTile(we.source,Ue,qe,ar,$t,ne,Ct),Nt>1&&console.timeEnd("drilling down"),this.tiles[le]?te(this.tiles[le],St):null):null}}function ur(Ce,$t,ne){return 32*((1<{qe.properties=Ar;let Tr={};for(let pr of ar)Tr[pr]=le[pr].evaluate(Ue,qe);return Tr},Nt.reduce=(Ar,Tr)=>{qe.properties=Tr;for(let pr of ar)Ue.accumulated=Ar[pr],Ar[pr]=we[pr].evaluate(Ue,qe)},Nt}($t)).load((yield this._pendingData).features):(gt=yield this._pendingData,new cr(gt,$t.geojsonVtOptions)),this.loaded={};let St={};if(Ct){let Nt=Ct.finish();Nt&&(St.resourceTiming={},St.resourceTiming[$t.source]=JSON.parse(JSON.stringify(Nt)))}return St}catch(St){if(delete this._pendingRequest,t.bB(St))return{abandoned:!0};throw St}var gt})}getData(){return t._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile($t){let ne=this.loaded;return ne&&ne[$t.uid]?super.reloadTile($t):this.loadTile($t)}loadAndProcessGeoJSON($t,ne){return t._(this,void 0,void 0,function*(){let Ct=yield this.loadGeoJSON($t,ne);if(delete this._pendingRequest,typeof Ct!="object")throw new Error(`Input data given to '${$t.source}' is not a valid GeoJSON object.`);if(x(Ct,!0),$t.filter){let gt=t.bC($t.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(gt.result==="error")throw new Error(gt.value.map(St=>`${St.key}: ${St.message}`).join(", "));Ct={type:"FeatureCollection",features:Ct.features.filter(St=>gt.value.evaluate({zoom:0},St))}}return Ct})}loadGeoJSON($t,ne){return t._(this,void 0,void 0,function*(){let{promoteId:Ct}=$t;if($t.request){let gt=yield t.h($t.request,ne);return this._dataUpdateable=Hr(gt.data,Ct)?br(gt.data,Ct):void 0,gt.data}if(typeof $t.data=="string")try{let gt=JSON.parse($t.data);return this._dataUpdateable=Hr(gt,Ct)?br(gt,Ct):void 0,gt}catch{throw new Error(`Input data given to '${$t.source}' is not a valid GeoJSON object.`)}if(!$t.dataDiff)throw new Error(`Input data given to '${$t.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${$t.source}`);return function(gt,St,Nt){var ee,le,we,Ue;if(St.removeAll&>.clear(),St.remove)for(let qe of St.remove)gt.delete(qe);if(St.add)for(let qe of St.add){let ar=jr(qe,Nt);ar!=null&>.set(ar,qe)}if(St.update)for(let qe of St.update){let ar=gt.get(qe.id);if(ar==null)continue;let Ar=!qe.removeAllProperties&&(((ee=qe.removeProperties)===null||ee===void 0?void 0:ee.length)>0||((le=qe.addOrUpdateProperties)===null||le===void 0?void 0:le.length)>0);if((qe.newGeometry||qe.removeAllProperties||Ar)&&(ar=Object.assign({},ar),gt.set(qe.id,ar),Ar&&(ar.properties=Object.assign({},ar.properties))),qe.newGeometry&&(ar.geometry=qe.newGeometry),qe.removeAllProperties)ar.properties={};else if(((we=qe.removeProperties)===null||we===void 0?void 0:we.length)>0)for(let Tr of qe.removeProperties)Object.prototype.hasOwnProperty.call(ar.properties,Tr)&&delete ar.properties[Tr];if(((Ue=qe.addOrUpdateProperties)===null||Ue===void 0?void 0:Ue.length)>0)for(let{key:Tr,value:pr}of qe.addOrUpdateProperties)ar.properties[Tr]=pr}}(this._dataUpdateable,$t.dataDiff,Ct),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource($t){return t._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom($t){return this._geoJSONIndex.getClusterExpansionZoom($t.clusterId)}getClusterChildren($t){return this._geoJSONIndex.getChildren($t.clusterId)}getClusterLeaves($t){return this._geoJSONIndex.getLeaves($t.clusterId,$t.limit,$t.offset)}}class rn{constructor($t){this.self=$t,this.actor=new t.F($t),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(ne,Ct)=>{if(this.externalWorkerSourceTypes[ne])throw new Error(`Worker source with name "${ne}" already registered.`);this.externalWorkerSourceTypes[ne]=Ct},this.self.addProtocol=t.bi,this.self.removeProtocol=t.bj,this.self.registerRTLTextPlugin=ne=>{if(t.bD.isParsed())throw new Error("RTL text plugin already registered.");t.bD.setMethods(ne)},this.actor.registerMessageHandler("LDT",(ne,Ct)=>this._getDEMWorkerSource(ne,Ct.source).loadTile(Ct)),this.actor.registerMessageHandler("RDT",(ne,Ct)=>t._(this,void 0,void 0,function*(){this._getDEMWorkerSource(ne,Ct.source).removeTile(Ct)})),this.actor.registerMessageHandler("GCEZ",(ne,Ct)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ne,Ct.type,Ct.source).getClusterExpansionZoom(Ct)})),this.actor.registerMessageHandler("GCC",(ne,Ct)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ne,Ct.type,Ct.source).getClusterChildren(Ct)})),this.actor.registerMessageHandler("GCL",(ne,Ct)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ne,Ct.type,Ct.source).getClusterLeaves(Ct)})),this.actor.registerMessageHandler("LD",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).loadData(Ct)),this.actor.registerMessageHandler("GD",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).getData()),this.actor.registerMessageHandler("LT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).loadTile(Ct)),this.actor.registerMessageHandler("RT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).reloadTile(Ct)),this.actor.registerMessageHandler("AT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).abortTile(Ct)),this.actor.registerMessageHandler("RMT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).removeTile(Ct)),this.actor.registerMessageHandler("RS",(ne,Ct)=>t._(this,void 0,void 0,function*(){if(!this.workerSources[ne]||!this.workerSources[ne][Ct.type]||!this.workerSources[ne][Ct.type][Ct.source])return;let gt=this.workerSources[ne][Ct.type][Ct.source];delete this.workerSources[ne][Ct.type][Ct.source],gt.removeSource!==void 0&>.removeSource(Ct)})),this.actor.registerMessageHandler("RM",ne=>t._(this,void 0,void 0,function*(){delete this.layerIndexes[ne],delete this.availableImages[ne],delete this.workerSources[ne],delete this.demWorkerSources[ne]})),this.actor.registerMessageHandler("SR",(ne,Ct)=>t._(this,void 0,void 0,function*(){this.referrer=Ct})),this.actor.registerMessageHandler("SRPS",(ne,Ct)=>this._syncRTLPluginState(ne,Ct)),this.actor.registerMessageHandler("IS",(ne,Ct)=>t._(this,void 0,void 0,function*(){this.self.importScripts(Ct)})),this.actor.registerMessageHandler("SI",(ne,Ct)=>this._setImages(ne,Ct)),this.actor.registerMessageHandler("UL",(ne,Ct)=>t._(this,void 0,void 0,function*(){this._getLayerIndex(ne).update(Ct.layers,Ct.removedIds)})),this.actor.registerMessageHandler("SL",(ne,Ct)=>t._(this,void 0,void 0,function*(){this._getLayerIndex(ne).replace(Ct)}))}_setImages($t,ne){return t._(this,void 0,void 0,function*(){this.availableImages[$t]=ne;for(let Ct in this.workerSources[$t]){let gt=this.workerSources[$t][Ct];for(let St in gt)gt[St].availableImages=ne}})}_syncRTLPluginState($t,ne){return t._(this,void 0,void 0,function*(){if(t.bD.isParsed())return t.bD.getState();if(ne.pluginStatus!=="loading")return t.bD.setState(ne),ne;let Ct=ne.pluginURL;if(this.self.importScripts(Ct),t.bD.isParsed()){let gt={pluginStatus:"loaded",pluginURL:Ct};return t.bD.setState(gt),gt}throw t.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Ct}`)})}_getAvailableImages($t){let ne=this.availableImages[$t];return ne||(ne=[]),ne}_getLayerIndex($t){let ne=this.layerIndexes[$t];return ne||(ne=this.layerIndexes[$t]=new e),ne}_getWorkerSource($t,ne,Ct){if(this.workerSources[$t]||(this.workerSources[$t]={}),this.workerSources[$t][ne]||(this.workerSources[$t][ne]={}),!this.workerSources[$t][ne][Ct]){let gt={sendAsync:(St,Nt)=>(St.targetMapId=$t,this.actor.sendAsync(St,Nt))};switch(ne){case"vector":this.workerSources[$t][ne][Ct]=new o(gt,this._getLayerIndex($t),this._getAvailableImages($t));break;case"geojson":this.workerSources[$t][ne][Ct]=new Kr(gt,this._getLayerIndex($t),this._getAvailableImages($t));break;default:this.workerSources[$t][ne][Ct]=new this.externalWorkerSourceTypes[ne](gt,this._getLayerIndex($t),this._getAvailableImages($t))}}return this.workerSources[$t][ne][Ct]}_getDEMWorkerSource($t,ne){return this.demWorkerSources[$t]||(this.demWorkerSources[$t]={}),this.demWorkerSources[$t][ne]||(this.demWorkerSources[$t][ne]=new i),this.demWorkerSources[$t][ne]}}return t.i(self)&&(self.worker=new rn(self)),rn}),P("index",["exports","./shared"],function(t,e){var r="4.7.1";let a,n,o={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:qt=>new Promise((I,ht)=>{let Et=requestAnimationFrame(I);qt.signal.addEventListener("abort",()=>{cancelAnimationFrame(Et),ht(e.c())})}),getImageData(qt,I=0){return this.getImageCanvasContext(qt).getImageData(-I,-I,qt.width+2*I,qt.height+2*I)},getImageCanvasContext(qt){let I=window.document.createElement("canvas"),ht=I.getContext("2d",{willReadFrequently:!0});if(!ht)throw new Error("failed to create canvas 2d context");return I.width=qt.width,I.height=qt.height,ht.drawImage(qt,0,0,qt.width,qt.height),ht},resolveURL:qt=>(a||(a=document.createElement("a")),a.href=qt,a.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(n==null&&(n=matchMedia("(prefers-reduced-motion: reduce)")),n.matches)}};class i{static testProp(I){if(!i.docStyle)return I[0];for(let ht=0;ht{window.removeEventListener("click",i.suppressClickInternal,!0)},0)}static getScale(I){let ht=I.getBoundingClientRect();return{x:ht.width/I.offsetWidth||1,y:ht.height/I.offsetHeight||1,boundingClientRect:ht}}static getPoint(I,ht,Et){let It=ht.boundingClientRect;return new e.P((Et.clientX-It.left)/ht.x-I.clientLeft,(Et.clientY-It.top)/ht.y-I.clientTop)}static mousePos(I,ht){let Et=i.getScale(I);return i.getPoint(I,Et,ht)}static touchPos(I,ht){let Et=[],It=i.getScale(I);for(let Vt=0;Vt{f&&T(f),f=null,v=!0},x.onerror=()=>{y=!0,f=null},x.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(qt){let I,ht,Et,It;qt.resetRequestQueue=()=>{I=[],ht=0,Et=0,It={}},qt.addThrottleControl=Ke=>{let gr=Et++;return It[gr]=Ke,gr},qt.removeThrottleControl=Ke=>{delete It[Ke],ke()},qt.getImage=(Ke,gr,Or=!0)=>new Promise((Dr,ln)=>{s.supported&&(Ke.headers||(Ke.headers={}),Ke.headers.accept="image/webp,*/*"),e.e(Ke,{type:"image"}),I.push({abortController:gr,requestParameters:Ke,supportImageRefresh:Or,state:"queued",onError:Sn=>{ln(Sn)},onSuccess:Sn=>{Dr(Sn)}}),ke()});let Vt=Ke=>e._(this,void 0,void 0,function*(){Ke.state="running";let{requestParameters:gr,supportImageRefresh:Or,onError:Dr,onSuccess:ln,abortController:Sn}=Ke,Xt=Or===!1&&!e.i(self)&&!e.g(gr.url)&&(!gr.headers||Object.keys(gr.headers).reduce((Ae,je)=>Ae&&je==="accept",!0));ht++;let ae=Xt?Oe(gr,Sn):e.m(gr,Sn);try{let Ae=yield ae;delete Ke.abortController,Ke.state="completed",Ae.data instanceof HTMLImageElement||e.b(Ae.data)?ln(Ae):Ae.data&&ln({data:yield(xe=Ae.data,typeof createImageBitmap=="function"?e.d(xe):e.f(xe)),cacheControl:Ae.cacheControl,expires:Ae.expires})}catch(Ae){delete Ke.abortController,Dr(Ae)}finally{ht--,ke()}var xe}),ke=()=>{let Ke=(()=>{for(let gr of Object.keys(It))if(It[gr]())return!0;return!1})()?e.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let gr=ht;gr0;gr++){let Or=I.shift();Or.abortController.signal.aborted?gr--:Vt(Or)}},Oe=(Ke,gr)=>new Promise((Or,Dr)=>{let ln=new Image,Sn=Ke.url,Xt=Ke.credentials;Xt&&Xt==="include"?ln.crossOrigin="use-credentials":(Xt&&Xt==="same-origin"||!e.s(Sn))&&(ln.crossOrigin="anonymous"),gr.signal.addEventListener("abort",()=>{ln.src="",Dr(e.c())}),ln.fetchPriority="high",ln.onload=()=>{ln.onerror=ln.onload=null,Or({data:ln})},ln.onerror=()=>{ln.onerror=ln.onload=null,gr.signal.aborted||Dr(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},ln.src=Sn})}(u||(u={})),u.resetRequestQueue();class b{constructor(I){this._transformRequestFn=I}transformRequest(I,ht){return this._transformRequestFn&&this._transformRequestFn(I,ht)||{url:I}}setTransformRequest(I){this._transformRequestFn=I}}function _(qt){var I=new e.A(3);return I[0]=qt[0],I[1]=qt[1],I[2]=qt[2],I}var C,M=function(qt,I,ht){return qt[0]=I[0]-ht[0],qt[1]=I[1]-ht[1],qt[2]=I[2]-ht[2],qt};C=new e.A(3),e.A!=Float32Array&&(C[0]=0,C[1]=0,C[2]=0);var E=function(qt){var I=qt[0],ht=qt[1];return I*I+ht*ht};function A(qt){let I=[];if(typeof qt=="string")I.push({id:"default",url:qt});else if(qt&&qt.length>0){let ht=[];for(let{id:Et,url:It}of qt){let Vt=`${Et}${It}`;ht.indexOf(Vt)===-1&&(ht.push(Vt),I.push({id:Et,url:It}))}}return I}function h(qt,I,ht){let Et=qt.split("?");return Et[0]+=`${I}${ht}`,Et.join("?")}(function(){var qt=new e.A(2);e.A!=Float32Array&&(qt[0]=0,qt[1]=0)})();class p{constructor(I,ht,Et,It){this.context=I,this.format=Et,this.texture=I.gl.createTexture(),this.update(ht,It)}update(I,ht,Et){let{width:It,height:Vt}=I,ke=!(this.size&&this.size[0]===It&&this.size[1]===Vt||Et),{context:Oe}=this,{gl:Ke}=Oe;if(this.useMipmap=!!(ht&&ht.useMipmap),Ke.bindTexture(Ke.TEXTURE_2D,this.texture),Oe.pixelStoreUnpackFlipY.set(!1),Oe.pixelStoreUnpack.set(1),Oe.pixelStoreUnpackPremultiplyAlpha.set(this.format===Ke.RGBA&&(!ht||ht.premultiply!==!1)),ke)this.size=[It,Vt],I instanceof HTMLImageElement||I instanceof HTMLCanvasElement||I instanceof HTMLVideoElement||I instanceof ImageData||e.b(I)?Ke.texImage2D(Ke.TEXTURE_2D,0,this.format,this.format,Ke.UNSIGNED_BYTE,I):Ke.texImage2D(Ke.TEXTURE_2D,0,this.format,It,Vt,0,this.format,Ke.UNSIGNED_BYTE,I.data);else{let{x:gr,y:Or}=Et||{x:0,y:0};I instanceof HTMLImageElement||I instanceof HTMLCanvasElement||I instanceof HTMLVideoElement||I instanceof ImageData||e.b(I)?Ke.texSubImage2D(Ke.TEXTURE_2D,0,gr,Or,Ke.RGBA,Ke.UNSIGNED_BYTE,I):Ke.texSubImage2D(Ke.TEXTURE_2D,0,gr,Or,It,Vt,Ke.RGBA,Ke.UNSIGNED_BYTE,I.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Ke.generateMipmap(Ke.TEXTURE_2D)}bind(I,ht,Et){let{context:It}=this,{gl:Vt}=It;Vt.bindTexture(Vt.TEXTURE_2D,this.texture),Et!==Vt.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Et=Vt.LINEAR),I!==this.filter&&(Vt.texParameteri(Vt.TEXTURE_2D,Vt.TEXTURE_MAG_FILTER,I),Vt.texParameteri(Vt.TEXTURE_2D,Vt.TEXTURE_MIN_FILTER,Et||I),this.filter=I),ht!==this.wrap&&(Vt.texParameteri(Vt.TEXTURE_2D,Vt.TEXTURE_WRAP_S,ht),Vt.texParameteri(Vt.TEXTURE_2D,Vt.TEXTURE_WRAP_T,ht),this.wrap=ht)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:I}=this.context;I.deleteTexture(this.texture),this.texture=null}}function k(qt){let{userImage:I}=qt;return!!(I&&I.render&&I.render())&&(qt.data.replace(new Uint8Array(I.data.buffer)),!0)}class w extends e.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(I){if(this.loaded!==I&&(this.loaded=I,I)){for(let{ids:ht,promiseResolve:Et}of this.requestors)Et(this._getImagesForIds(ht));this.requestors=[]}}getImage(I){let ht=this.images[I];if(ht&&!ht.data&&ht.spriteData){let Et=ht.spriteData;ht.data=new e.R({width:Et.width,height:Et.height},Et.context.getImageData(Et.x,Et.y,Et.width,Et.height).data),ht.spriteData=null}return ht}addImage(I,ht){if(this.images[I])throw new Error(`Image id ${I} already exist, use updateImage instead`);this._validate(I,ht)&&(this.images[I]=ht)}_validate(I,ht){let Et=!0,It=ht.data||ht.spriteData;return this._validateStretch(ht.stretchX,It&&It.width)||(this.fire(new e.j(new Error(`Image "${I}" has invalid "stretchX" value`))),Et=!1),this._validateStretch(ht.stretchY,It&&It.height)||(this.fire(new e.j(new Error(`Image "${I}" has invalid "stretchY" value`))),Et=!1),this._validateContent(ht.content,ht)||(this.fire(new e.j(new Error(`Image "${I}" has invalid "content" value`))),Et=!1),Et}_validateStretch(I,ht){if(!I)return!0;let Et=0;for(let It of I){if(It[0]{let It=!0;if(!this.isLoaded())for(let Vt of I)this.images[Vt]||(It=!1);this.isLoaded()||It?ht(this._getImagesForIds(I)):this.requestors.push({ids:I,promiseResolve:ht})})}_getImagesForIds(I){let ht={};for(let Et of I){let It=this.getImage(Et);It||(this.fire(new e.k("styleimagemissing",{id:Et})),It=this.getImage(Et)),It?ht[Et]={data:It.data.clone(),pixelRatio:It.pixelRatio,sdf:It.sdf,version:It.version,stretchX:It.stretchX,stretchY:It.stretchY,content:It.content,textFitWidth:It.textFitWidth,textFitHeight:It.textFitHeight,hasRenderCallback:!!(It.userImage&&It.userImage.render)}:e.w(`Image "${Et}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return ht}getPixelSize(){let{width:I,height:ht}=this.atlasImage;return{width:I,height:ht}}getPattern(I){let ht=this.patterns[I],Et=this.getImage(I);if(!Et)return null;if(ht&&ht.position.version===Et.version)return ht.position;if(ht)ht.position.version=Et.version;else{let It={w:Et.data.width+2,h:Et.data.height+2,x:0,y:0},Vt=new e.I(It,Et);this.patterns[I]={bin:It,position:Vt}}return this._updatePatternAtlas(),this.patterns[I].position}bind(I){let ht=I.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new p(I,this.atlasImage,ht.RGBA),this.atlasTexture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE)}_updatePatternAtlas(){let I=[];for(let Vt in this.patterns)I.push(this.patterns[Vt].bin);let{w:ht,h:Et}=e.p(I),It=this.atlasImage;It.resize({width:ht||1,height:Et||1});for(let Vt in this.patterns){let{bin:ke}=this.patterns[Vt],Oe=ke.x+1,Ke=ke.y+1,gr=this.getImage(Vt).data,Or=gr.width,Dr=gr.height;e.R.copy(gr,It,{x:0,y:0},{x:Oe,y:Ke},{width:Or,height:Dr}),e.R.copy(gr,It,{x:0,y:Dr-1},{x:Oe,y:Ke-1},{width:Or,height:1}),e.R.copy(gr,It,{x:0,y:0},{x:Oe,y:Ke+Dr},{width:Or,height:1}),e.R.copy(gr,It,{x:Or-1,y:0},{x:Oe-1,y:Ke},{width:1,height:Dr}),e.R.copy(gr,It,{x:0,y:0},{x:Oe+Or,y:Ke},{width:1,height:Dr})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(I){for(let ht of I){if(this.callbackDispatchedThisFrame[ht])continue;this.callbackDispatchedThisFrame[ht]=!0;let Et=this.getImage(ht);Et||e.w(`Image with ID: "${ht}" was not found`),k(Et)&&this.updateImage(ht,Et)}}}let R=1e20;function O(qt,I,ht,Et,It,Vt,ke,Oe,Ke){for(let gr=I;gr-1);Ke++,Vt[Ke]=Oe,ke[Ke]=gr,ke[Ke+1]=R}for(let Oe=0,Ke=0;Oe65535)throw new Error("glyphs > 65535 not supported");if(Et.ranges[Vt])return{stack:I,id:ht,glyph:It};if(!this.url)throw new Error("glyphsUrl is not set");if(!Et.requests[Vt]){let Oe=V.loadGlyphRange(I,Vt,this.url,this.requestManager);Et.requests[Vt]=Oe}let ke=yield Et.requests[Vt];for(let Oe in ke)this._doesCharSupportLocalGlyph(+Oe)||(Et.glyphs[+Oe]=ke[+Oe]);return Et.ranges[Vt]=!0,{stack:I,id:ht,glyph:ke[ht]||null}})}_doesCharSupportLocalGlyph(I){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(I))}_tinySDF(I,ht,Et){let It=this.localIdeographFontFamily;if(!It||!this._doesCharSupportLocalGlyph(Et))return;let Vt=I.tinySDF;if(!Vt){let Oe="400";/bold/i.test(ht)?Oe="900":/medium/i.test(ht)?Oe="500":/light/i.test(ht)&&(Oe="200"),Vt=I.tinySDF=new V.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:It,fontWeight:Oe})}let ke=Vt.draw(String.fromCharCode(Et));return{id:Et,bitmap:new e.o({width:ke.width||60,height:ke.height||60},ke.data),metrics:{width:ke.glyphWidth/2||24,height:ke.glyphHeight/2||24,left:ke.glyphLeft/2+.5||0,top:ke.glyphTop/2-27.5||-8,advance:ke.glyphAdvance/2||24,isDoubleResolution:!0}}}}V.loadGlyphRange=function(qt,I,ht,Et){return e._(this,void 0,void 0,function*(){let It=256*I,Vt=It+255,ke=Et.transformRequest(ht.replace("{fontstack}",qt).replace("{range}",`${It}-${Vt}`),"Glyphs"),Oe=yield e.l(ke,new AbortController);if(!Oe||!Oe.data)throw new Error(`Could not load glyph range. range: ${I}, ${It}-${Vt}`);let Ke={};for(let gr of e.n(Oe.data))Ke[gr.id]=gr;return Ke})},V.TinySDF=class{constructor({fontSize:qt=24,buffer:I=3,radius:ht=8,cutoff:Et=.25,fontFamily:It="sans-serif",fontWeight:Vt="normal",fontStyle:ke="normal"}={}){this.buffer=I,this.cutoff=Et,this.radius=ht;let Oe=this.size=qt+4*I,Ke=this._createCanvas(Oe),gr=this.ctx=Ke.getContext("2d",{willReadFrequently:!0});gr.font=`${ke} ${Vt} ${qt}px ${It}`,gr.textBaseline="alphabetic",gr.textAlign="left",gr.fillStyle="black",this.gridOuter=new Float64Array(Oe*Oe),this.gridInner=new Float64Array(Oe*Oe),this.f=new Float64Array(Oe),this.z=new Float64Array(Oe+1),this.v=new Uint16Array(Oe)}_createCanvas(qt){let I=document.createElement("canvas");return I.width=I.height=qt,I}draw(qt){let{width:I,actualBoundingBoxAscent:ht,actualBoundingBoxDescent:Et,actualBoundingBoxLeft:It,actualBoundingBoxRight:Vt}=this.ctx.measureText(qt),ke=Math.ceil(ht),Oe=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(Vt-It))),Ke=Math.min(this.size-this.buffer,ke+Math.ceil(Et)),gr=Oe+2*this.buffer,Or=Ke+2*this.buffer,Dr=Math.max(gr*Or,0),ln=new Uint8ClampedArray(Dr),Sn={data:ln,width:gr,height:Or,glyphWidth:Oe,glyphHeight:Ke,glyphTop:ke,glyphLeft:0,glyphAdvance:I};if(Oe===0||Ke===0)return Sn;let{ctx:Xt,buffer:ae,gridInner:xe,gridOuter:Ae}=this;Xt.clearRect(ae,ae,Oe,Ke),Xt.fillText(qt,ae,ae+ke);let je=Xt.getImageData(ae,ae,Oe,Ke);Ae.fill(R,0,Dr),xe.fill(0,0,Dr);for(let Ie=0;Ie0?Nr*Nr:0,xe[Ir]=Nr<0?Nr*Nr:0}}O(Ae,0,0,gr,Or,gr,this.f,this.v,this.z),O(xe,ae,ae,Oe,Ke,gr,this.f,this.v,this.z);for(let Ie=0;Ie1&&(Ke=I[++Oe]);let Or=Math.abs(gr-Ke.left),Dr=Math.abs(gr-Ke.right),ln=Math.min(Or,Dr),Sn,Xt=Vt/Et*(It+1);if(Ke.isDash){let ae=It-Math.abs(Xt);Sn=Math.sqrt(ln*ln+ae*ae)}else Sn=It-Math.sqrt(ln*ln+Xt*Xt);this.data[ke+gr]=Math.max(0,Math.min(255,Sn+128))}}}addRegularDash(I){for(let Oe=I.length-1;Oe>=0;--Oe){let Ke=I[Oe],gr=I[Oe+1];Ke.zeroLength?I.splice(Oe,1):gr&&gr.isDash===Ke.isDash&&(gr.left=Ke.left,I.splice(Oe,1))}let ht=I[0],Et=I[I.length-1];ht.isDash===Et.isDash&&(ht.left=Et.left-this.width,Et.right=ht.right+this.width);let It=this.width*this.nextRow,Vt=0,ke=I[Vt];for(let Oe=0;Oe1&&(ke=I[++Vt]);let Ke=Math.abs(Oe-ke.left),gr=Math.abs(Oe-ke.right),Or=Math.min(Ke,gr);this.data[It+Oe]=Math.max(0,Math.min(255,(ke.isDash?Or:-Or)+128))}}addDash(I,ht){let Et=ht?7:0,It=2*Et+1;if(this.nextRow+It>this.height)return e.w("LineAtlas out of space"),null;let Vt=0;for(let Oe=0;Oe{ht.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[lt]}numActive(){return Object.keys(this.active).length}}let pt=Math.floor(o.hardwareConcurrency/2),st,tt;function dt(){return st||(st=new yt),st}yt.workerCount=e.C(globalThis)?Math.max(Math.min(pt,3),1):1;class rt{constructor(I,ht){this.workerPool=I,this.actors=[],this.currentActor=0,this.id=ht;let Et=this.workerPool.acquire(ht);for(let It=0;It{ht.remove()}),this.actors=[],I&&this.workerPool.release(this.id)}registerMessageHandler(I,ht){for(let Et of this.actors)Et.registerMessageHandler(I,ht)}}function at(){return tt||(tt=new rt(dt(),e.G),tt.registerMessageHandler("GR",(qt,I,ht)=>e.m(I,ht))),tt}function vt(qt,I){let ht=e.H();return e.J(ht,ht,[1,1,0]),e.K(ht,ht,[.5*qt.width,.5*qt.height,1]),e.L(ht,ht,qt.calculatePosMatrix(I.toUnwrapped()))}function it(qt,I,ht,Et,It,Vt){let ke=function(Dr,ln,Sn){if(Dr)for(let Xt of Dr){let ae=ln[Xt];if(ae&&ae.source===Sn&&ae.type==="fill-extrusion")return!0}else for(let Xt in ln){let ae=ln[Xt];if(ae.source===Sn&&ae.type==="fill-extrusion")return!0}return!1}(It&&It.layers,I,qt.id),Oe=Vt.maxPitchScaleFactor(),Ke=qt.tilesIn(Et,Oe,ke);Ke.sort(Y);let gr=[];for(let Dr of Ke)gr.push({wrappedTileID:Dr.tileID.wrapped().key,queryResults:Dr.tile.queryRenderedFeatures(I,ht,qt._state,Dr.queryGeometry,Dr.cameraQueryGeometry,Dr.scale,It,Vt,Oe,vt(qt.transform,Dr.tileID))});let Or=function(Dr){let ln={},Sn={};for(let Xt of Dr){let ae=Xt.queryResults,xe=Xt.wrappedTileID,Ae=Sn[xe]=Sn[xe]||{};for(let je in ae){let Ie=ae[je],Ze=Ae[je]=Ae[je]||{},wr=ln[je]=ln[je]||[];for(let Ir of Ie)Ze[Ir.featureIndex]||(Ze[Ir.featureIndex]=!0,wr.push(Ir))}}return ln}(gr);for(let Dr in Or)Or[Dr].forEach(ln=>{let Sn=ln.feature,Xt=qt.getFeatureState(Sn.layer["source-layer"],Sn.id);Sn.source=Sn.layer.source,Sn.layer["source-layer"]&&(Sn.sourceLayer=Sn.layer["source-layer"]),Sn.state=Xt});return Or}function Y(qt,I){let ht=qt.tileID,Et=I.tileID;return ht.overscaledZ-Et.overscaledZ||ht.canonical.y-Et.canonical.y||ht.wrap-Et.wrap||ht.canonical.x-Et.canonical.x}function ft(qt,I,ht){return e._(this,void 0,void 0,function*(){let Et=qt;if(qt.url?Et=(yield e.h(I.transformRequest(qt.url,"Source"),ht)).data:yield o.frameAsync(ht),!Et)return null;let It=e.M(e.e(Et,qt),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in Et&&Et.vector_layers&&(It.vectorLayerIds=Et.vector_layers.map(Vt=>Vt.id)),It})}class ut{constructor(I,ht){I&&(ht?this.setSouthWest(I).setNorthEast(ht):Array.isArray(I)&&(I.length===4?this.setSouthWest([I[0],I[1]]).setNorthEast([I[2],I[3]]):this.setSouthWest(I[0]).setNorthEast(I[1])))}setNorthEast(I){return this._ne=I instanceof e.N?new e.N(I.lng,I.lat):e.N.convert(I),this}setSouthWest(I){return this._sw=I instanceof e.N?new e.N(I.lng,I.lat):e.N.convert(I),this}extend(I){let ht=this._sw,Et=this._ne,It,Vt;if(I instanceof e.N)It=I,Vt=I;else{if(!(I instanceof ut))return Array.isArray(I)?I.length===4||I.every(Array.isArray)?this.extend(ut.convert(I)):this.extend(e.N.convert(I)):I&&("lng"in I||"lon"in I)&&"lat"in I?this.extend(e.N.convert(I)):this;if(It=I._sw,Vt=I._ne,!It||!Vt)return this}return ht||Et?(ht.lng=Math.min(It.lng,ht.lng),ht.lat=Math.min(It.lat,ht.lat),Et.lng=Math.max(Vt.lng,Et.lng),Et.lat=Math.max(Vt.lat,Et.lat)):(this._sw=new e.N(It.lng,It.lat),this._ne=new e.N(Vt.lng,Vt.lat)),this}getCenter(){return new e.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new e.N(this.getWest(),this.getNorth())}getSouthEast(){return new e.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(I){let{lng:ht,lat:Et}=e.N.convert(I),It=this._sw.lng<=ht&&ht<=this._ne.lng;return this._sw.lng>this._ne.lng&&(It=this._sw.lng>=ht&&ht>=this._ne.lng),this._sw.lat<=Et&&Et<=this._ne.lat&&It}static convert(I){return I instanceof ut?I:I&&new ut(I)}static fromLngLat(I,ht=0){let Et=360*ht/40075017,It=Et/Math.cos(Math.PI/180*I.lat);return new ut(new e.N(I.lng-It,I.lat-Et),new e.N(I.lng+It,I.lat+Et))}adjustAntiMeridian(){let I=new e.N(this._sw.lng,this._sw.lat),ht=new e.N(this._ne.lng,this._ne.lat);return new ut(I,I.lng>ht.lng?new e.N(ht.lng+360,ht.lat):ht)}}class wt{constructor(I,ht,Et){this.bounds=ut.convert(this.validateBounds(I)),this.minzoom=ht||0,this.maxzoom=Et||24}validateBounds(I){return Array.isArray(I)&&I.length===4?[Math.max(-180,I[0]),Math.max(-90,I[1]),Math.min(180,I[2]),Math.min(90,I[3])]:[-180,-90,180,90]}contains(I){let ht=Math.pow(2,I.z),Et=Math.floor(e.O(this.bounds.getWest())*ht),It=Math.floor(e.Q(this.bounds.getNorth())*ht),Vt=Math.ceil(e.O(this.bounds.getEast())*ht),ke=Math.ceil(e.Q(this.bounds.getSouth())*ht);return I.x>=Et&&I.x=It&&I.y{this._options.tiles=I}),this}setUrl(I){return this.setSourceProperty(()=>{this.url=I,this._options.url=I}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return e.e({},this._options)}loadTile(I){return e._(this,void 0,void 0,function*(){let ht=I.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Et={request:this.map._requestManager.transformRequest(ht,"Tile"),uid:I.uid,tileID:I.tileID,zoom:I.tileID.overscaledZ,tileSize:this.tileSize*I.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Et.request.collectResourceTiming=this._collectResourceTiming;let It="RT";if(I.actor&&I.state!=="expired"){if(I.state==="loading")return new Promise((Vt,ke)=>{I.reloadPromise={resolve:Vt,reject:ke}})}else I.actor=this.dispatcher.getActor(),It="LT";I.abortController=new AbortController;try{let Vt=yield I.actor.sendAsync({type:It,data:Et},I.abortController);if(delete I.abortController,I.aborted)return;this._afterTileLoadWorkerResponse(I,Vt)}catch(Vt){if(delete I.abortController,I.aborted)return;if(Vt&&Vt.status!==404)throw Vt;this._afterTileLoadWorkerResponse(I,null)}})}_afterTileLoadWorkerResponse(I,ht){if(ht&&ht.resourceTiming&&(I.resourceTiming=ht.resourceTiming),ht&&this.map._refreshExpiredTiles&&I.setExpiryData(ht),I.loadVectorData(ht,this.map.painter),I.reloadPromise){let Et=I.reloadPromise;I.reloadPromise=null,this.loadTile(I).then(Et.resolve).catch(Et.reject)}}abortTile(I){return e._(this,void 0,void 0,function*(){I.abortController&&(I.abortController.abort(),delete I.abortController),I.actor&&(yield I.actor.sendAsync({type:"AT",data:{uid:I.uid,type:this.type,source:this.id}}))})}unloadTile(I){return e._(this,void 0,void 0,function*(){I.unloadVectorData(),I.actor&&(yield I.actor.sendAsync({type:"RMT",data:{uid:I.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Pt extends e.E{constructor(I,ht,Et,It){super(),this.id=I,this.dispatcher=Et,this.setEventedParent(It),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},ht),e.e(this,e.M(ht,["url","scheme","tileSize"]))}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let I=yield ft(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,I&&(e.e(this,I),I.bounds&&(this.tileBounds=new wt(I.bounds,this.minzoom,this.maxzoom)),this.fire(new e.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.k("data",{dataType:"source",sourceDataType:"content"})))}catch(I){this._tileJSONRequest=null,this.fire(new e.j(I))}})}loaded(){return this._loaded}onAdd(I){this.map=I,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(I){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),I(),this.load()}setTiles(I){return this.setSourceProperty(()=>{this._options.tiles=I}),this}setUrl(I){return this.setSourceProperty(()=>{this.url=I,this._options.url=I}),this}serialize(){return e.e({},this._options)}hasTile(I){return!this.tileBounds||this.tileBounds.contains(I.canonical)}loadTile(I){return e._(this,void 0,void 0,function*(){let ht=I.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);I.abortController=new AbortController;try{let Et=yield u.getImage(this.map._requestManager.transformRequest(ht,"Tile"),I.abortController,this.map._refreshExpiredTiles);if(delete I.abortController,I.aborted)return void(I.state="unloaded");if(Et&&Et.data){this.map._refreshExpiredTiles&&Et.cacheControl&&Et.expires&&I.setExpiryData({cacheControl:Et.cacheControl,expires:Et.expires});let It=this.map.painter.context,Vt=It.gl,ke=Et.data;I.texture=this.map.painter.getTileTexture(ke.width),I.texture?I.texture.update(ke,{useMipmap:!0}):(I.texture=new p(It,ke,Vt.RGBA,{useMipmap:!0}),I.texture.bind(Vt.LINEAR,Vt.CLAMP_TO_EDGE,Vt.LINEAR_MIPMAP_NEAREST)),I.state="loaded"}}catch(Et){if(delete I.abortController,I.aborted)I.state="unloaded";else if(Et)throw I.state="errored",Et}})}abortTile(I){return e._(this,void 0,void 0,function*(){I.abortController&&(I.abortController.abort(),delete I.abortController)})}unloadTile(I){return e._(this,void 0,void 0,function*(){I.texture&&this.map.painter.saveTileTexture(I.texture)})}hasTransition(){return!1}}class Wt extends Pt{constructor(I,ht,Et,It){super(I,ht,Et,It),this.type="raster-dem",this.maxzoom=22,this._options=e.e({type:"raster-dem"},ht),this.encoding=ht.encoding||"mapbox",this.redFactor=ht.redFactor,this.greenFactor=ht.greenFactor,this.blueFactor=ht.blueFactor,this.baseShift=ht.baseShift}loadTile(I){return e._(this,void 0,void 0,function*(){let ht=I.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Et=this.map._requestManager.transformRequest(ht,"Tile");I.neighboringTiles=this._getNeighboringTiles(I.tileID),I.abortController=new AbortController;try{let It=yield u.getImage(Et,I.abortController,this.map._refreshExpiredTiles);if(delete I.abortController,I.aborted)return void(I.state="unloaded");if(It&&It.data){let Vt=It.data;this.map._refreshExpiredTiles&&It.cacheControl&&It.expires&&I.setExpiryData({cacheControl:It.cacheControl,expires:It.expires});let ke=e.b(Vt)&&e.U()?Vt:yield this.readImageNow(Vt),Oe={type:this.type,uid:I.uid,source:this.id,rawImageData:ke,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!I.actor||I.state==="expired"){I.actor=this.dispatcher.getActor();let Ke=yield I.actor.sendAsync({type:"LDT",data:Oe});I.dem=Ke,I.needsHillshadePrepare=!0,I.needsTerrainPrepare=!0,I.state="loaded"}}}catch(It){if(delete I.abortController,I.aborted)I.state="unloaded";else if(It)throw I.state="errored",It}})}readImageNow(I){return e._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&e.V()){let ht=I.width+2,Et=I.height+2;try{return new e.R({width:ht,height:Et},yield e.W(I,-1,-1,ht,Et))}catch{}}return o.getImageData(I,1)})}_getNeighboringTiles(I){let ht=I.canonical,Et=Math.pow(2,ht.z),It=(ht.x-1+Et)%Et,Vt=ht.x===0?I.wrap-1:I.wrap,ke=(ht.x+1+Et)%Et,Oe=ht.x+1===Et?I.wrap+1:I.wrap,Ke={};return Ke[new e.S(I.overscaledZ,Vt,ht.z,It,ht.y).key]={backfilled:!1},Ke[new e.S(I.overscaledZ,Oe,ht.z,ke,ht.y).key]={backfilled:!1},ht.y>0&&(Ke[new e.S(I.overscaledZ,Vt,ht.z,It,ht.y-1).key]={backfilled:!1},Ke[new e.S(I.overscaledZ,I.wrap,ht.z,ht.x,ht.y-1).key]={backfilled:!1},Ke[new e.S(I.overscaledZ,Oe,ht.z,ke,ht.y-1).key]={backfilled:!1}),ht.y+10&&e.e(Vt,{resourceTiming:It}),this.fire(new e.k("data",Object.assign(Object.assign({},Vt),{sourceDataType:"metadata"}))),this.fire(new e.k("data",Object.assign(Object.assign({},Vt),{sourceDataType:"content"})))}catch(Et){if(this._pendingLoads--,this._removed)return void this.fire(new e.k("dataabort",{dataType:"source"}));this.fire(new e.j(Et))}})}loaded(){return this._pendingLoads===0}loadTile(I){return e._(this,void 0,void 0,function*(){let ht=I.actor?"RT":"LT";I.actor=this.actor;let Et={type:this.type,uid:I.uid,tileID:I.tileID,zoom:I.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};I.abortController=new AbortController;let It=yield this.actor.sendAsync({type:ht,data:Et},I.abortController);delete I.abortController,I.unloadVectorData(),I.aborted||I.loadVectorData(It,this.map.painter,ht==="RT")})}abortTile(I){return e._(this,void 0,void 0,function*(){I.abortController&&(I.abortController.abort(),delete I.abortController),I.aborted=!0})}unloadTile(I){return e._(this,void 0,void 0,function*(){I.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:I.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return e.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var Jt=e.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class ge extends e.E{constructor(I,ht,Et,It){super(),this.id=I,this.dispatcher=Et,this.coordinates=ht.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(It),this.options=ht}load(I){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let ht=yield u.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,ht&&ht.data&&(this.image=ht.data,I&&(this.coordinates=I),this._finishLoading())}catch(ht){this._request=null,this._loaded=!0,this.fire(new e.j(ht))}})}loaded(){return this._loaded}updateImage(I){return I.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=I.url,this.load(I.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(I){this.map=I,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(I){this.coordinates=I;let ht=I.map(e.Z.fromLngLat);this.tileID=function(It){let Vt=1/0,ke=1/0,Oe=-1/0,Ke=-1/0;for(let ln of It)Vt=Math.min(Vt,ln.x),ke=Math.min(ke,ln.y),Oe=Math.max(Oe,ln.x),Ke=Math.max(Ke,ln.y);let gr=Math.max(Oe-Vt,Ke-ke),Or=Math.max(0,Math.floor(-Math.log(gr)/Math.LN2)),Dr=Math.pow(2,Or);return new e.a1(Or,Math.floor((Vt+Oe)/2*Dr),Math.floor((ke+Ke)/2*Dr))}(ht),this.minzoom=this.maxzoom=this.tileID.z;let Et=ht.map(It=>this.tileID.getTilePoint(It)._round());return this._boundsArray=new e.$,this._boundsArray.emplaceBack(Et[0].x,Et[0].y,0,0),this._boundsArray.emplaceBack(Et[1].x,Et[1].y,e.X,0),this._boundsArray.emplaceBack(Et[3].x,Et[3].y,0,e.X),this._boundsArray.emplaceBack(Et[2].x,Et[2].y,e.X,e.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let I=this.map.painter.context,ht=I.gl;this.boundsBuffer||(this.boundsBuffer=I.createVertexBuffer(this._boundsArray,Jt.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new p(I,this.image,ht.RGBA),this.texture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE));let Et=!1;for(let It in this.tiles){let Vt=this.tiles[It];Vt.state!=="loaded"&&(Vt.state="loaded",Vt.texture=this.texture,Et=!0)}Et&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(I){return e._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(I.tileID.canonical)?(this.tiles[String(I.tileID.wrap)]=I,I.buckets={}):I.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class he extends ge{constructor(I,ht,Et,It){super(I,ht,Et,It),this.roundZoom=!0,this.type="video",this.options=ht}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1;let I=this.options;this.urls=[];for(let ht of I.urls)this.urls.push(this.map._requestManager.transformRequest(ht,"Source").url);try{let ht=yield e.a3(this.urls);if(this._loaded=!0,!ht)return;this.video=ht,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(ht){this.fire(new e.j(ht))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(I){if(this.video){let ht=this.video.seekable;Iht.end(0)?this.fire(new e.j(new e.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${ht.start(0)} and ${ht.end(0)}-second mark.`))):this.video.currentTime=I}}getVideo(){return this.video}onAdd(I){this.map||(this.map=I,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let I=this.map.painter.context,ht=I.gl;this.boundsBuffer||(this.boundsBuffer=I.createVertexBuffer(this._boundsArray,Jt.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE),ht.texSubImage2D(ht.TEXTURE_2D,0,0,0,ht.RGBA,ht.UNSIGNED_BYTE,this.video)):(this.texture=new p(I,this.video,ht.RGBA),this.texture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE));let Et=!1;for(let It in this.tiles){let Vt=this.tiles[It];Vt.state!=="loaded"&&(Vt.state="loaded",Vt.texture=this.texture,Et=!0)}Et&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class de extends ge{constructor(I,ht,Et,It){super(I,ht,Et,It),ht.coordinates?Array.isArray(ht.coordinates)&&ht.coordinates.length===4&&!ht.coordinates.some(Vt=>!Array.isArray(Vt)||Vt.length!==2||Vt.some(ke=>typeof ke!="number"))||this.fire(new e.j(new e.a2(`sources.${I}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.j(new e.a2(`sources.${I}`,null,'missing required property "coordinates"'))),ht.animate&&typeof ht.animate!="boolean"&&this.fire(new e.j(new e.a2(`sources.${I}`,null,'optional "animate" property must be a boolean value'))),ht.canvas?typeof ht.canvas=="string"||ht.canvas instanceof HTMLCanvasElement||this.fire(new e.j(new e.a2(`sources.${I}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.j(new e.a2(`sources.${I}`,null,'missing required property "canvas"'))),this.options=ht,this.animate=ht.animate===void 0||ht.animate}load(){return e._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(I){this.map=I,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let I=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,I=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,I=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let ht=this.map.painter.context,Et=ht.gl;this.boundsBuffer||(this.boundsBuffer=ht.createVertexBuffer(this._boundsArray,Jt.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture?(I||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new p(ht,this.canvas,Et.RGBA,{premultiply:!0});let It=!1;for(let Vt in this.tiles){let ke=this.tiles[Vt];ke.state!=="loaded"&&(ke.state="loaded",ke.texture=this.texture,It=!0)}It&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let I of[this.canvas.width,this.canvas.height])if(isNaN(I)||I<=0)return!0;return!1}}let se={},Tt=qt=>{switch(qt){case"geojson":return Ht;case"image":return ge;case"raster":return Pt;case"raster-dem":return Wt;case"vector":return zt;case"video":return he;case"canvas":return de}return se[qt]},Lt="RTLPluginLoaded";class Mt extends e.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=at()}_syncState(I){return this.status=I,this.dispatcher.broadcast("SRPS",{pluginStatus:I,pluginURL:this.url}).catch(ht=>{throw this.status="error",ht})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(I){return e._(this,arguments,void 0,function*(ht,Et=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=o.resolveURL(ht),!this.url)throw new Error(`requested url ${ht} is invalid`);if(this.status==="unavailable"){if(!Et)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return e._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e.k(Lt))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let te=null;function ve(){return te||(te=new Mt),te}class oe{constructor(I,ht){this.timeAdded=0,this.fadeEndTime=0,this.tileID=I,this.uid=e.a4(),this.uses=0,this.tileSize=ht,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(I){let ht=I+this.timeAdded;htVt.getLayer(gr)).filter(Boolean);if(Ke.length!==0){Oe.layers=Ke,Oe.stateDependentLayerIds&&(Oe.stateDependentLayers=Oe.stateDependentLayerIds.map(gr=>Ke.filter(Or=>Or.id===gr)[0]));for(let gr of Ke)ke[gr.id]=Oe}}return ke}(I.buckets,ht.style),this.hasSymbolBuckets=!1;for(let It in this.buckets){let Vt=this.buckets[It];if(Vt instanceof e.a6){if(this.hasSymbolBuckets=!0,!Et)break;Vt.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let It in this.buckets){let Vt=this.buckets[It];if(Vt instanceof e.a6&&Vt.hasRTLText){this.hasRTLText=!0,ve().lazyLoad();break}}this.queryPadding=0;for(let It in this.buckets){let Vt=this.buckets[It];this.queryPadding=Math.max(this.queryPadding,ht.style.getLayer(It).queryRadius(Vt))}I.imageAtlas&&(this.imageAtlas=I.imageAtlas),I.glyphAtlasImage&&(this.glyphAtlasImage=I.glyphAtlasImage)}else this.collisionBoxArray=new e.a5}unloadVectorData(){for(let I in this.buckets)this.buckets[I].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(I){return this.buckets[I.id]}upload(I){for(let Et in this.buckets){let It=this.buckets[Et];It.uploadPending()&&It.upload(I)}let ht=I.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new p(I,this.imageAtlas.image,ht.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new p(I,this.glyphAtlasImage,ht.ALPHA),this.glyphAtlasImage=null)}prepare(I){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(I,this.imageAtlasTexture)}queryRenderedFeatures(I,ht,Et,It,Vt,ke,Oe,Ke,gr,Or){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:It,cameraQueryGeometry:Vt,scale:ke,tileSize:this.tileSize,pixelPosMatrix:Or,transform:Ke,params:Oe,queryPadding:this.queryPadding*gr},I,ht,Et):{}}querySourceFeatures(I,ht){let Et=this.latestFeatureIndex;if(!Et||!Et.rawTileData)return;let It=Et.loadVTLayers(),Vt=ht&&ht.sourceLayer?ht.sourceLayer:"",ke=It._geojsonTileLayer||It[Vt];if(!ke)return;let Oe=e.a7(ht&&ht.filter),{z:Ke,x:gr,y:Or}=this.tileID.canonical,Dr={z:Ke,x:gr,y:Or};for(let ln=0;lnEt)It=!1;else if(ht)if(this.expirationTime{this.remove(I,Vt)},Et)),this.data[It].push(Vt),this.order.push(It),this.order.length>this.max){let ke=this._getAndRemoveByKey(this.order[0]);ke&&this.onRemove(ke)}return this}has(I){return I.wrapped().key in this.data}getAndRemove(I){return this.has(I)?this._getAndRemoveByKey(I.wrapped().key):null}_getAndRemoveByKey(I){let ht=this.data[I].shift();return ht.timeout&&clearTimeout(ht.timeout),this.data[I].length===0&&delete this.data[I],this.order.splice(this.order.indexOf(I),1),ht.value}getByKey(I){let ht=this.data[I];return ht?ht[0].value:null}get(I){return this.has(I)?this.data[I.wrapped().key][0].value:null}remove(I,ht){if(!this.has(I))return this;let Et=I.wrapped().key,It=ht===void 0?0:this.data[Et].indexOf(ht),Vt=this.data[Et][It];return this.data[Et].splice(It,1),Vt.timeout&&clearTimeout(Vt.timeout),this.data[Et].length===0&&delete this.data[Et],this.onRemove(Vt.value),this.order.splice(this.order.indexOf(Et),1),this}setMaxSize(I){for(this.max=I;this.order.length>this.max;){let ht=this._getAndRemoveByKey(this.order[0]);ht&&this.onRemove(ht)}return this}filter(I){let ht=[];for(let Et in this.data)for(let It of this.data[Et])I(It.value)||ht.push(It);for(let Et of ht)this.remove(Et.value.tileID,Et)}}class He{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(I,ht,Et){let It=String(ht);if(this.stateChanges[I]=this.stateChanges[I]||{},this.stateChanges[I][It]=this.stateChanges[I][It]||{},e.e(this.stateChanges[I][It],Et),this.deletedStates[I]===null){this.deletedStates[I]={};for(let Vt in this.state[I])Vt!==It&&(this.deletedStates[I][Vt]=null)}else if(this.deletedStates[I]&&this.deletedStates[I][It]===null){this.deletedStates[I][It]={};for(let Vt in this.state[I][It])Et[Vt]||(this.deletedStates[I][It][Vt]=null)}else for(let Vt in Et)this.deletedStates[I]&&this.deletedStates[I][It]&&this.deletedStates[I][It][Vt]===null&&delete this.deletedStates[I][It][Vt]}removeFeatureState(I,ht,Et){if(this.deletedStates[I]===null)return;let It=String(ht);if(this.deletedStates[I]=this.deletedStates[I]||{},Et&&ht!==void 0)this.deletedStates[I][It]!==null&&(this.deletedStates[I][It]=this.deletedStates[I][It]||{},this.deletedStates[I][It][Et]=null);else if(ht!==void 0)if(this.stateChanges[I]&&this.stateChanges[I][It])for(Et in this.deletedStates[I][It]={},this.stateChanges[I][It])this.deletedStates[I][It][Et]=null;else this.deletedStates[I][It]=null;else this.deletedStates[I]=null}getState(I,ht){let Et=String(ht),It=e.e({},(this.state[I]||{})[Et],(this.stateChanges[I]||{})[Et]);if(this.deletedStates[I]===null)return{};if(this.deletedStates[I]){let Vt=this.deletedStates[I][ht];if(Vt===null)return{};for(let ke in Vt)delete It[ke]}return It}initializeTileState(I,ht){I.setFeatureState(this.state,ht)}coalesceChanges(I,ht){let Et={};for(let It in this.stateChanges){this.state[It]=this.state[It]||{};let Vt={};for(let ke in this.stateChanges[It])this.state[It][ke]||(this.state[It][ke]={}),e.e(this.state[It][ke],this.stateChanges[It][ke]),Vt[ke]=this.state[It][ke];Et[It]=Vt}for(let It in this.deletedStates){this.state[It]=this.state[It]||{};let Vt={};if(this.deletedStates[It]===null)for(let ke in this.state[It])Vt[ke]={},this.state[It][ke]={};else for(let ke in this.deletedStates[It]){if(this.deletedStates[It][ke]===null)this.state[It][ke]={};else for(let Oe of Object.keys(this.deletedStates[It][ke]))delete this.state[It][ke][Oe];Vt[ke]=this.state[It][ke]}Et[It]=Et[It]||{},e.e(Et[It],Vt)}if(this.stateChanges={},this.deletedStates={},Object.keys(Et).length!==0)for(let It in I)I[It].setFeatureState(Et,ht)}}class Ge extends e.E{constructor(I,ht,Et){super(),this.id=I,this.dispatcher=Et,this.on("data",It=>this._dataHandler(It)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((It,Vt,ke,Oe)=>{let Ke=new(Tt(Vt.type))(It,Vt,ke,Oe);if(Ke.id!==It)throw new Error(`Expected Source id to be ${It} instead of ${Ke.id}`);return Ke})(I,ht,Et,this),this._tiles={},this._cache=new Te(0,It=>this._unloadTile(It)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new He,this._didEmitContent=!1,this._updated=!1}onAdd(I){this.map=I,this._maxTileCacheSize=I?I._maxTileCacheSize:null,this._maxTileCacheZoomLevels=I?I._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(I)}onRemove(I){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(I)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let I in this._tiles){let ht=this._tiles[I];if(ht.state!=="loaded"&&ht.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let I=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,I&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(I,ht,Et){return e._(this,void 0,void 0,function*(){try{yield this._source.loadTile(I),this._tileLoaded(I,ht,Et)}catch(It){I.state="errored",It.status!==404?this._source.fire(new e.j(It,{tile:I})):this.update(this.transform,this.terrain)}})}_unloadTile(I){this._source.unloadTile&&this._source.unloadTile(I)}_abortTile(I){this._source.abortTile&&this._source.abortTile(I),this._source.fire(new e.k("dataabort",{tile:I,coord:I.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(I){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let ht in this._tiles){let Et=this._tiles[ht];Et.upload(I),Et.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(I=>I.tileID).sort(cr).map(I=>I.key)}getRenderableIds(I){let ht=[];for(let Et in this._tiles)this._isIdRenderable(Et,I)&&ht.push(this._tiles[Et]);return I?ht.sort((Et,It)=>{let Vt=Et.tileID,ke=It.tileID,Oe=new e.P(Vt.canonical.x,Vt.canonical.y)._rotate(this.transform.angle),Ke=new e.P(ke.canonical.x,ke.canonical.y)._rotate(this.transform.angle);return Vt.overscaledZ-ke.overscaledZ||Ke.y-Oe.y||Ke.x-Oe.x}).map(Et=>Et.tileID.key):ht.map(Et=>Et.tileID).sort(cr).map(Et=>Et.key)}hasRenderableParent(I){let ht=this.findLoadedParent(I,0);return!!ht&&this._isIdRenderable(ht.tileID.key)}_isIdRenderable(I,ht){return this._tiles[I]&&this._tiles[I].hasData()&&!this._coveredTiles[I]&&(ht||!this._tiles[I].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let I in this._tiles)this._tiles[I].state!=="errored"&&this._reloadTile(I,"reloading")}}_reloadTile(I,ht){return e._(this,void 0,void 0,function*(){let Et=this._tiles[I];Et&&(Et.state!=="loading"&&(Et.state=ht),yield this._loadTile(Et,I,ht))})}_tileLoaded(I,ht,Et){I.timeAdded=o.now(),Et==="expired"&&(I.refreshedUponExpiration=!0),this._setTileReloadTimer(ht,I),this.getSource().type==="raster-dem"&&I.dem&&this._backfillDEM(I),this._state.initializeTileState(I,this.map?this.map.painter:null),I.aborted||this._source.fire(new e.k("data",{dataType:"source",tile:I,coord:I.tileID}))}_backfillDEM(I){let ht=this.getRenderableIds();for(let It=0;It1||(Math.abs(ke)>1&&(Math.abs(ke+Ke)===1?ke+=Ke:Math.abs(ke-Ke)===1&&(ke-=Ke)),Vt.dem&&It.dem&&(It.dem.backfillBorder(Vt.dem,ke,Oe),It.neighboringTiles&&It.neighboringTiles[gr]&&(It.neighboringTiles[gr].backfilled=!0)))}}getTile(I){return this.getTileByID(I.key)}getTileByID(I){return this._tiles[I]}_retainLoadedChildren(I,ht,Et,It){for(let Vt in this._tiles){let ke=this._tiles[Vt];if(It[Vt]||!ke.hasData()||ke.tileID.overscaledZ<=ht||ke.tileID.overscaledZ>Et)continue;let Oe=ke.tileID;for(;ke&&ke.tileID.overscaledZ>ht+1;){let gr=ke.tileID.scaledTo(ke.tileID.overscaledZ-1);ke=this._tiles[gr.key],ke&&ke.hasData()&&(Oe=gr)}let Ke=Oe;for(;Ke.overscaledZ>ht;)if(Ke=Ke.scaledTo(Ke.overscaledZ-1),I[Ke.key]){It[Oe.key]=Oe;break}}}findLoadedParent(I,ht){if(I.key in this._loadedParentTiles){let Et=this._loadedParentTiles[I.key];return Et&&Et.tileID.overscaledZ>=ht?Et:null}for(let Et=I.overscaledZ-1;Et>=ht;Et--){let It=I.scaledTo(Et),Vt=this._getLoadedTile(It);if(Vt)return Vt}}findLoadedSibling(I){return this._getLoadedTile(I)}_getLoadedTile(I){let ht=this._tiles[I.key];return ht&&ht.hasData()?ht:this._cache.getByKey(I.wrapped().key)}updateCacheSize(I){let ht=Math.ceil(I.width/this._source.tileSize)+1,Et=Math.ceil(I.height/this._source.tileSize)+1,It=Math.floor(ht*Et*(this._maxTileCacheZoomLevels===null?e.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),Vt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,It):It;this._cache.setMaxSize(Vt)}handleWrapJump(I){let ht=Math.round((I-(this._prevLng===void 0?I:this._prevLng))/360);if(this._prevLng=I,ht){let Et={};for(let It in this._tiles){let Vt=this._tiles[It];Vt.tileID=Vt.tileID.unwrapTo(Vt.tileID.wrap+ht),Et[Vt.tileID.key]=Vt}this._tiles=Et;for(let It in this._timers)clearTimeout(this._timers[It]),delete this._timers[It];for(let It in this._tiles)this._setTileReloadTimer(It,this._tiles[It])}}_updateCoveredAndRetainedTiles(I,ht,Et,It,Vt,ke){let Oe={},Ke={},gr=Object.keys(I),Or=o.now();for(let Dr of gr){let ln=I[Dr],Sn=this._tiles[Dr];if(!Sn||Sn.fadeEndTime!==0&&Sn.fadeEndTime<=Or)continue;let Xt=this.findLoadedParent(ln,ht),ae=this.findLoadedSibling(ln),xe=Xt||ae||null;xe&&(this._addTile(xe.tileID),Oe[xe.tileID.key]=xe.tileID),Ke[Dr]=ln}this._retainLoadedChildren(Ke,It,Et,I);for(let Dr in Oe)I[Dr]||(this._coveredTiles[Dr]=!0,I[Dr]=Oe[Dr]);if(ke){let Dr={},ln={};for(let Sn of Vt)this._tiles[Sn.key].hasData()?Dr[Sn.key]=Sn:ln[Sn.key]=Sn;for(let Sn in ln){let Xt=ln[Sn].children(this._source.maxzoom);this._tiles[Xt[0].key]&&this._tiles[Xt[1].key]&&this._tiles[Xt[2].key]&&this._tiles[Xt[3].key]&&(Dr[Xt[0].key]=I[Xt[0].key]=Xt[0],Dr[Xt[1].key]=I[Xt[1].key]=Xt[1],Dr[Xt[2].key]=I[Xt[2].key]=Xt[2],Dr[Xt[3].key]=I[Xt[3].key]=Xt[3],delete ln[Sn])}for(let Sn in ln){let Xt=ln[Sn],ae=this.findLoadedParent(Xt,this._source.minzoom),xe=this.findLoadedSibling(Xt),Ae=ae||xe||null;if(Ae){Dr[Ae.tileID.key]=I[Ae.tileID.key]=Ae.tileID;for(let je in Dr)Dr[je].isChildOf(Ae.tileID)&&delete Dr[je]}}for(let Sn in this._tiles)Dr[Sn]||(this._coveredTiles[Sn]=!0)}}update(I,ht){if(!this._sourceLoaded||this._paused)return;let Et;this.transform=I,this.terrain=ht,this.updateCacheSize(I),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?Et=I.getVisibleUnwrappedCoordinates(this._source.tileID).map(Or=>new e.S(Or.canonical.z,Or.wrap,Or.canonical.z,Or.canonical.x,Or.canonical.y)):(Et=I.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:ht}),this._source.hasTile&&(Et=Et.filter(Or=>this._source.hasTile(Or)))):Et=[];let It=I.coveringZoomLevel(this._source),Vt=Math.max(It-Ge.maxOverzooming,this._source.minzoom),ke=Math.max(It+Ge.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Or={};for(let Dr of Et)if(Dr.canonical.z>this._source.minzoom){let ln=Dr.scaledTo(Dr.canonical.z-1);Or[ln.key]=ln;let Sn=Dr.scaledTo(Math.max(this._source.minzoom,Math.min(Dr.canonical.z,5)));Or[Sn.key]=Sn}Et=Et.concat(Object.values(Or))}let Oe=Et.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,Oe&&this.fire(new e.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let Ke=this._updateRetainedTiles(Et,It);ur(this._source.type)&&this._updateCoveredAndRetainedTiles(Ke,Vt,ke,It,Et,ht);for(let Or in Ke)this._tiles[Or].clearFadeHold();let gr=e.ab(this._tiles,Ke);for(let Or of gr){let Dr=this._tiles[Or];Dr.hasSymbolBuckets&&!Dr.holdingForFade()?Dr.setHoldDuration(this.map._fadeDuration):Dr.hasSymbolBuckets&&!Dr.symbolFadeFinished()||this._removeTile(Or)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let I in this._tiles)this._tiles[I].holdingForFade()&&this._removeTile(I)}_updateRetainedTiles(I,ht){var Et;let It={},Vt={},ke=Math.max(ht-Ge.maxOverzooming,this._source.minzoom),Oe=Math.max(ht+Ge.maxUnderzooming,this._source.minzoom),Ke={};for(let gr of I){let Or=this._addTile(gr);It[gr.key]=gr,Or.hasData()||htthis._source.maxzoom){let ln=gr.children(this._source.maxzoom)[0],Sn=this.getTile(ln);if(Sn&&Sn.hasData()){It[ln.key]=ln;continue}}else{let ln=gr.children(this._source.maxzoom);if(It[ln[0].key]&&It[ln[1].key]&&It[ln[2].key]&&It[ln[3].key])continue}let Dr=Or.wasRequested();for(let ln=gr.overscaledZ-1;ln>=ke;--ln){let Sn=gr.scaledTo(ln);if(Vt[Sn.key])break;if(Vt[Sn.key]=!0,Or=this.getTile(Sn),!Or&&Dr&&(Or=this._addTile(Sn)),Or){let Xt=Or.hasData();if((Xt||!(!((Et=this.map)===null||Et===void 0)&&Et.cancelPendingTileRequestsWhileZooming)||Dr)&&(It[Sn.key]=Sn),Dr=Or.wasRequested(),Xt)break}}}return It}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let I in this._tiles){let ht=[],Et,It=this._tiles[I].tileID;for(;It.overscaledZ>0;){if(It.key in this._loadedParentTiles){Et=this._loadedParentTiles[It.key];break}ht.push(It.key);let Vt=It.scaledTo(It.overscaledZ-1);if(Et=this._getLoadedTile(Vt),Et)break;It=Vt}for(let Vt of ht)this._loadedParentTiles[Vt]=Et}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let I in this._tiles){let ht=this._tiles[I].tileID,Et=this._getLoadedTile(ht);this._loadedSiblingTiles[ht.key]=Et}}_addTile(I){let ht=this._tiles[I.key];if(ht)return ht;ht=this._cache.getAndRemove(I),ht&&(this._setTileReloadTimer(I.key,ht),ht.tileID=I,this._state.initializeTileState(ht,this.map?this.map.painter:null),this._cacheTimers[I.key]&&(clearTimeout(this._cacheTimers[I.key]),delete this._cacheTimers[I.key],this._setTileReloadTimer(I.key,ht)));let Et=ht;return ht||(ht=new oe(I,this._source.tileSize*I.overscaleFactor()),this._loadTile(ht,I.key,ht.state)),ht.uses++,this._tiles[I.key]=ht,Et||this._source.fire(new e.k("dataloading",{tile:ht,coord:ht.tileID,dataType:"source"})),ht}_setTileReloadTimer(I,ht){I in this._timers&&(clearTimeout(this._timers[I]),delete this._timers[I]);let Et=ht.getExpiryTimeout();Et&&(this._timers[I]=setTimeout(()=>{this._reloadTile(I,"expired"),delete this._timers[I]},Et))}_removeTile(I){let ht=this._tiles[I];ht&&(ht.uses--,delete this._tiles[I],this._timers[I]&&(clearTimeout(this._timers[I]),delete this._timers[I]),ht.uses>0||(ht.hasData()&&ht.state!=="reloading"?this._cache.add(ht.tileID,ht,ht.getExpiryTimeout()):(ht.aborted=!0,this._abortTile(ht),this._unloadTile(ht))))}_dataHandler(I){let ht=I.sourceDataType;I.dataType==="source"&&ht==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&I.dataType==="source"&&ht==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let I in this._tiles)this._removeTile(I);this._cache.reset()}tilesIn(I,ht,Et){let It=[],Vt=this.transform;if(!Vt)return It;let ke=Et?Vt.getCameraQueryGeometry(I):I,Oe=I.map(Xt=>Vt.pointCoordinate(Xt,this.terrain)),Ke=ke.map(Xt=>Vt.pointCoordinate(Xt,this.terrain)),gr=this.getIds(),Or=1/0,Dr=1/0,ln=-1/0,Sn=-1/0;for(let Xt of Ke)Or=Math.min(Or,Xt.x),Dr=Math.min(Dr,Xt.y),ln=Math.max(ln,Xt.x),Sn=Math.max(Sn,Xt.y);for(let Xt=0;Xt=0&&Ie[1].y+je>=0){let Ze=Oe.map(Ir=>xe.getTilePoint(Ir)),wr=Ke.map(Ir=>xe.getTilePoint(Ir));It.push({tile:ae,tileID:xe,queryGeometry:Ze,cameraQueryGeometry:wr,scale:Ae})}}return It}getVisibleCoordinates(I){let ht=this.getRenderableIds(I).map(Et=>this._tiles[Et].tileID);for(let Et of ht)Et.posMatrix=this.transform.calculatePosMatrix(Et.toUnwrapped());return ht}hasTransition(){if(this._source.hasTransition())return!0;if(ur(this._source.type)){let I=o.now();for(let ht in this._tiles)if(this._tiles[ht].fadeEndTime>=I)return!0}return!1}setFeatureState(I,ht,Et){this._state.updateState(I=I||"_geojsonTileLayer",ht,Et)}removeFeatureState(I,ht,Et){this._state.removeFeatureState(I=I||"_geojsonTileLayer",ht,Et)}getFeatureState(I,ht){return this._state.getState(I=I||"_geojsonTileLayer",ht)}setDependencies(I,ht,Et){let It=this._tiles[I];It&&It.setDependencies(ht,Et)}reloadTilesForDependencies(I,ht){for(let Et in this._tiles)this._tiles[Et].hasDependency(I,ht)&&this._reloadTile(Et,"reloading");this._cache.filter(Et=>!Et.hasDependency(I,ht))}}function cr(qt,I){let ht=Math.abs(2*qt.wrap)-+(qt.wrap<0),Et=Math.abs(2*I.wrap)-+(I.wrap<0);return qt.overscaledZ-I.overscaledZ||Et-ht||I.canonical.y-qt.canonical.y||I.canonical.x-qt.canonical.x}function ur(qt){return qt==="raster"||qt==="image"||qt==="video"}Ge.maxOverzooming=10,Ge.maxUnderzooming=3;class jr{constructor(I,ht){this.reset(I,ht)}reset(I,ht){this.points=I||[],this._distances=[0];for(let Et=1;Et0?(It-ke)/Oe:0;return this.points[Vt].mult(1-Ke).add(this.points[ht].mult(Ke))}}function Hr(qt,I){let ht=!0;return qt==="always"||qt!=="never"&&I!=="never"||(ht=!1),ht}class br{constructor(I,ht,Et){let It=this.boxCells=[],Vt=this.circleCells=[];this.xCellCount=Math.ceil(I/Et),this.yCellCount=Math.ceil(ht/Et);for(let ke=0;kethis.width||It<0||ht>this.height)return[];let Ke=[];if(I<=0&&ht<=0&&this.width<=Et&&this.height<=It){if(Vt)return[{key:null,x1:I,y1:ht,x2:Et,y2:It}];for(let gr=0;gr0}hitTestCircle(I,ht,Et,It,Vt){let ke=I-Et,Oe=I+Et,Ke=ht-Et,gr=ht+Et;if(Oe<0||ke>this.width||gr<0||Ke>this.height)return!1;let Or=[];return this._forEachCell(ke,Ke,Oe,gr,this._queryCellCircle,Or,{hitTest:!0,overlapMode:It,circle:{x:I,y:ht,radius:Et},seenUids:{box:{},circle:{}}},Vt),Or.length>0}_queryCell(I,ht,Et,It,Vt,ke,Oe,Ke){let{seenUids:gr,hitTest:Or,overlapMode:Dr}=Oe,ln=this.boxCells[Vt];if(ln!==null){let Xt=this.bboxes;for(let ae of ln)if(!gr.box[ae]){gr.box[ae]=!0;let xe=4*ae,Ae=this.boxKeys[ae];if(I<=Xt[xe+2]&&ht<=Xt[xe+3]&&Et>=Xt[xe+0]&&It>=Xt[xe+1]&&(!Ke||Ke(Ae))&&(!Or||!Hr(Dr,Ae.overlapMode))&&(ke.push({key:Ae,x1:Xt[xe],y1:Xt[xe+1],x2:Xt[xe+2],y2:Xt[xe+3]}),Or))return!0}}let Sn=this.circleCells[Vt];if(Sn!==null){let Xt=this.circles;for(let ae of Sn)if(!gr.circle[ae]){gr.circle[ae]=!0;let xe=3*ae,Ae=this.circleKeys[ae];if(this._circleAndRectCollide(Xt[xe],Xt[xe+1],Xt[xe+2],I,ht,Et,It)&&(!Ke||Ke(Ae))&&(!Or||!Hr(Dr,Ae.overlapMode))){let je=Xt[xe],Ie=Xt[xe+1],Ze=Xt[xe+2];if(ke.push({key:Ae,x1:je-Ze,y1:Ie-Ze,x2:je+Ze,y2:Ie+Ze}),Or)return!0}}}return!1}_queryCellCircle(I,ht,Et,It,Vt,ke,Oe,Ke){let{circle:gr,seenUids:Or,overlapMode:Dr}=Oe,ln=this.boxCells[Vt];if(ln!==null){let Xt=this.bboxes;for(let ae of ln)if(!Or.box[ae]){Or.box[ae]=!0;let xe=4*ae,Ae=this.boxKeys[ae];if(this._circleAndRectCollide(gr.x,gr.y,gr.radius,Xt[xe+0],Xt[xe+1],Xt[xe+2],Xt[xe+3])&&(!Ke||Ke(Ae))&&!Hr(Dr,Ae.overlapMode))return ke.push(!0),!0}}let Sn=this.circleCells[Vt];if(Sn!==null){let Xt=this.circles;for(let ae of Sn)if(!Or.circle[ae]){Or.circle[ae]=!0;let xe=3*ae,Ae=this.circleKeys[ae];if(this._circlesCollide(Xt[xe],Xt[xe+1],Xt[xe+2],gr.x,gr.y,gr.radius)&&(!Ke||Ke(Ae))&&!Hr(Dr,Ae.overlapMode))return ke.push(!0),!0}}}_forEachCell(I,ht,Et,It,Vt,ke,Oe,Ke){let gr=this._convertToXCellCoord(I),Or=this._convertToYCellCoord(ht),Dr=this._convertToXCellCoord(Et),ln=this._convertToYCellCoord(It);for(let Sn=gr;Sn<=Dr;Sn++)for(let Xt=Or;Xt<=ln;Xt++)if(Vt.call(this,I,ht,Et,It,this.xCellCount*Xt+Sn,ke,Oe,Ke))return}_convertToXCellCoord(I){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(I*this.xScale)))}_convertToYCellCoord(I){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(I*this.yScale)))}_circlesCollide(I,ht,Et,It,Vt,ke){let Oe=It-I,Ke=Vt-ht,gr=Et+ke;return gr*gr>Oe*Oe+Ke*Ke}_circleAndRectCollide(I,ht,Et,It,Vt,ke,Oe){let Ke=(ke-It)/2,gr=Math.abs(I-(It+Ke));if(gr>Ke+Et)return!1;let Or=(Oe-Vt)/2,Dr=Math.abs(ht-(Vt+Or));if(Dr>Or+Et)return!1;if(gr<=Ke||Dr<=Or)return!0;let ln=gr-Ke,Sn=Dr-Or;return ln*ln+Sn*Sn<=Et*Et}}function Kr(qt,I,ht,Et,It){let Vt=e.H();return I?(e.K(Vt,Vt,[1/It,1/It,1]),ht||e.ad(Vt,Vt,Et.angle)):e.L(Vt,Et.labelPlaneMatrix,qt),Vt}function rn(qt,I,ht,Et,It){if(I){let Vt=e.ae(qt);return e.K(Vt,Vt,[It,It,1]),ht||e.ad(Vt,Vt,-Et.angle),Vt}return Et.glCoordMatrix}function Ce(qt,I,ht,Et){let It;Et?(It=[qt,I,Et(qt,I),1],e.af(It,It,ht)):(It=[qt,I,0,1],pr(It,It,ht));let Vt=It[3];return{point:new e.P(It[0]/Vt,It[1]/Vt),signedDistanceFromCamera:Vt,isOccluded:!1}}function $t(qt,I){return .5+qt/I*.5}function ne(qt,I){return qt.x>=-I[0]&&qt.x<=I[0]&&qt.y>=-I[1]&&qt.y<=I[1]}function Ct(qt,I,ht,Et,It,Vt,ke,Oe,Ke,gr,Or,Dr,ln,Sn,Xt){let ae=Et?qt.textSizeData:qt.iconSizeData,xe=e.ag(ae,ht.transform.zoom),Ae=[256/ht.width*2+1,256/ht.height*2+1],je=Et?qt.text.dynamicLayoutVertexArray:qt.icon.dynamicLayoutVertexArray;je.clear();let Ie=qt.lineVertexArray,Ze=Et?qt.text.placedSymbolArray:qt.icon.placedSymbolArray,wr=ht.transform.width/ht.transform.height,Ir=!1;for(let Nr=0;NrMath.abs(ht.x-I.x)*Et?{useVertical:!0}:(qt===e.ah.vertical?I.yht.x)?{needsFlipping:!0}:null}function Nt(qt,I,ht,Et,It,Vt,ke,Oe,Ke,gr,Or){let Dr=ht/24,ln=I.lineOffsetX*Dr,Sn=I.lineOffsetY*Dr,Xt;if(I.numGlyphs>1){let ae=I.glyphStartIndex+I.numGlyphs,xe=I.lineStartIndex,Ae=I.lineStartIndex+I.lineLength,je=gt(Dr,Oe,ln,Sn,Et,I,Or,qt);if(!je)return{notEnoughRoom:!0};let Ie=Ce(je.first.point.x,je.first.point.y,ke,qt.getElevation).point,Ze=Ce(je.last.point.x,je.last.point.y,ke,qt.getElevation).point;if(It&&!Et){let wr=St(I.writingMode,Ie,Ze,gr);if(wr)return wr}Xt=[je.first];for(let wr=I.glyphStartIndex+1;wr0?Ie.point:function(Ir,Nr,tn,mn,zn,Bn){return ee(Ir,Nr,tn,1,zn,Bn)}(qt.tileAnchorPoint,je,xe,0,Vt,qt),wr=St(I.writingMode,xe,Ze,gr);if(wr)return wr}let ae=ar(Dr*Oe.getoffsetX(I.glyphStartIndex),ln,Sn,Et,I.segment,I.lineStartIndex,I.lineStartIndex+I.lineLength,qt,Or);if(!ae||qt.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};Xt=[ae]}for(let ae of Xt)e.aj(Ke,ae.point,ae.angle);return{}}function ee(qt,I,ht,Et,It,Vt){let ke=qt.add(qt.sub(I)._unit()),Oe=It!==void 0?Ce(ke.x,ke.y,It,Vt.getElevation).point:we(ke.x,ke.y,Vt).point,Ke=ht.sub(Oe);return ht.add(Ke._mult(Et/Ke.mag()))}function le(qt,I,ht){let Et=I.projectionCache;if(Et.projections[qt])return Et.projections[qt];let It=new e.P(I.lineVertexArray.getx(qt),I.lineVertexArray.gety(qt)),Vt=we(It.x,It.y,I);if(Vt.signedDistanceFromCamera>0)return Et.projections[qt]=Vt.point,Et.anyProjectionOccluded=Et.anyProjectionOccluded||Vt.isOccluded,Vt.point;let ke=qt-ht.direction;return function(Oe,Ke,gr,Or,Dr){return ee(Oe,Ke,gr,Or,void 0,Dr)}(ht.distanceFromAnchor===0?I.tileAnchorPoint:new e.P(I.lineVertexArray.getx(ke),I.lineVertexArray.gety(ke)),It,ht.previousVertex,ht.absOffsetX-ht.distanceFromAnchor+1,I)}function we(qt,I,ht){let Et=qt+ht.translation[0],It=I+ht.translation[1],Vt;return!ht.pitchWithMap&&ht.projection.useSpecialProjectionForSymbols?(Vt=ht.projection.projectTileCoordinates(Et,It,ht.unwrappedTileID,ht.getElevation),Vt.point.x=(.5*Vt.point.x+.5)*ht.width,Vt.point.y=(.5*-Vt.point.y+.5)*ht.height):(Vt=Ce(Et,It,ht.labelPlaneMatrix,ht.getElevation),Vt.isOccluded=!1),Vt}function Ue(qt,I,ht){return qt._unit()._perp()._mult(I*ht)}function qe(qt,I,ht,Et,It,Vt,ke,Oe,Ke){if(Oe.projectionCache.offsets[qt])return Oe.projectionCache.offsets[qt];let gr=ht.add(I);if(qt+Ke.direction=It)return Oe.projectionCache.offsets[qt]=gr,gr;let Or=le(qt+Ke.direction,Oe,Ke),Dr=Ue(Or.sub(ht),ke,Ke.direction),ln=ht.add(Dr),Sn=Or.add(Dr);return Oe.projectionCache.offsets[qt]=e.ak(Vt,gr,ln,Sn)||gr,Oe.projectionCache.offsets[qt]}function ar(qt,I,ht,Et,It,Vt,ke,Oe,Ke){let gr=Et?qt-I:qt+I,Or=gr>0?1:-1,Dr=0;Et&&(Or*=-1,Dr=Math.PI),Or<0&&(Dr+=Math.PI);let ln,Sn=Or>0?Vt+It:Vt+It+1;Oe.projectionCache.cachedAnchorPoint?ln=Oe.projectionCache.cachedAnchorPoint:(ln=we(Oe.tileAnchorPoint.x,Oe.tileAnchorPoint.y,Oe).point,Oe.projectionCache.cachedAnchorPoint=ln);let Xt,ae,xe=ln,Ae=ln,je=0,Ie=0,Ze=Math.abs(gr),wr=[],Ir;for(;je+Ie<=Ze;){if(Sn+=Or,Sn=ke)return null;je+=Ie,Ae=xe,ae=Xt;let mn={absOffsetX:Ze,direction:Or,distanceFromAnchor:je,previousVertex:Ae};if(xe=le(Sn,Oe,mn),ht===0)wr.push(Ae),Ir=xe.sub(Ae);else{let zn,Bn=xe.sub(Ae);zn=Bn.mag()===0?Ue(le(Sn+Or,Oe,mn).sub(xe),ht,Or):Ue(Bn,ht,Or),ae||(ae=Ae.add(zn)),Xt=qe(Sn,zn,xe,Vt,ke,ae,ht,Oe,mn),wr.push(ae),Ir=Xt.sub(ae)}Ie=Ir.mag()}let Nr=Ir._mult((Ze-je)/Ie)._add(ae||Ae),tn=Dr+Math.atan2(xe.y-Ae.y,xe.x-Ae.x);return wr.push(Nr),{point:Nr,angle:Ke?tn:0,path:wr}}let Ar=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Tr(qt,I){for(let ht=0;ht=1;Mo--)ka.push(da.path[Mo]);for(let Mo=1;Mohs.signedDistanceFromCamera<=0)?[]:Mo.map(hs=>hs.point)}let Ro=[];if(ka.length>0){let Mo=ka[0].clone(),hs=ka[0].clone();for(let hl=1;hl=Bn.x&&hs.x<=ri.x&&Mo.y>=Bn.y&&hs.y<=ri.y?[ka]:hs.xri.x||hs.yri.y?[]:e.al([ka],Bn.x,Bn.y,ri.x,ri.y)}for(let Mo of Ro){Fi.reset(Mo,.25*zn);let hs=0;hs=Fi.length<=.5*zn?1:Math.ceil(Fi.paddedLength/io)+1;for(let hl=0;hlCe(It.x,It.y,Et,ht.getElevation))}queryRenderedSymbols(I){if(I.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let ht=[],Et=1/0,It=1/0,Vt=-1/0,ke=-1/0;for(let Or of I){let Dr=new e.P(Or.x+Jr,Or.y+Jr);Et=Math.min(Et,Dr.x),It=Math.min(It,Dr.y),Vt=Math.max(Vt,Dr.x),ke=Math.max(ke,Dr.y),ht.push(Dr)}let Oe=this.grid.query(Et,It,Vt,ke).concat(this.ignoredGrid.query(Et,It,Vt,ke)),Ke={},gr={};for(let Or of Oe){let Dr=Or.key;if(Ke[Dr.bucketInstanceId]===void 0&&(Ke[Dr.bucketInstanceId]={}),Ke[Dr.bucketInstanceId][Dr.featureIndex])continue;let ln=[new e.P(Or.x1,Or.y1),new e.P(Or.x2,Or.y1),new e.P(Or.x2,Or.y2),new e.P(Or.x1,Or.y2)];e.am(ht,ln)&&(Ke[Dr.bucketInstanceId][Dr.featureIndex]=!0,gr[Dr.bucketInstanceId]===void 0&&(gr[Dr.bucketInstanceId]=[]),gr[Dr.bucketInstanceId].push(Dr.featureIndex))}return gr}insertCollisionBox(I,ht,Et,It,Vt,ke){(Et?this.ignoredGrid:this.grid).insert({bucketInstanceId:It,featureIndex:Vt,collisionGroupID:ke,overlapMode:ht},I[0],I[1],I[2],I[3])}insertCollisionCircles(I,ht,Et,It,Vt,ke){let Oe=Et?this.ignoredGrid:this.grid,Ke={bucketInstanceId:It,featureIndex:Vt,collisionGroupID:ke,overlapMode:ht};for(let gr=0;gr=this.screenRightBoundary||Itthis.screenBottomBoundary}isInsideGrid(I,ht,Et,It){return Et>=0&&I=0&&htthis.projectAndGetPerspectiveRatio(Et,zn.x,zn.y,It,gr));tn=mn.some(zn=>!zn.isOccluded),Nr=mn.map(zn=>zn.point)}else tn=!0;return{box:e.ao(Nr),allPointsOccluded:!tn}}}function Hn(qt,I,ht){return I*(e.X/(qt.tileSize*Math.pow(2,ht-qt.tileID.overscaledZ)))}class Kn{constructor(I,ht,Et,It){this.opacity=I?Math.max(0,Math.min(1,I.opacity+(I.placed?ht:-ht))):It&&Et?1:0,this.placed=Et}isHidden(){return this.opacity===0&&!this.placed}}class Ci{constructor(I,ht,Et,It,Vt){this.text=new Kn(I?I.text:null,ht,Et,Vt),this.icon=new Kn(I?I.icon:null,ht,It,Vt)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class ii{constructor(I,ht,Et){this.text=I,this.icon=ht,this.skipFade=Et}}class qn{constructor(){this.invProjMatrix=e.H(),this.viewportMatrix=e.H(),this.circles=[]}}class oa{constructor(I,ht,Et,It,Vt){this.bucketInstanceId=I,this.featureIndex=ht,this.sourceLayerIndex=Et,this.bucketIndex=It,this.tileID=Vt}}class Hi{constructor(I){this.crossSourceCollisions=I,this.maxGroupID=0,this.collisionGroups={}}get(I){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[I]){let ht=++this.maxGroupID;this.collisionGroups[I]={ID:ht,predicate:Et=>Et.collisionGroupID===ht}}return this.collisionGroups[I]}}function We(qt,I,ht,Et,It){let{horizontalAlign:Vt,verticalAlign:ke}=e.au(qt);return new e.P(-(Vt-.5)*I+Et[0]*It,-(ke-.5)*ht+Et[1]*It)}class rr{constructor(I,ht,Et,It,Vt,ke){this.transform=I.clone(),this.terrain=Et,this.collisionIndex=new Vn(this.transform,ht),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=It,this.retainedQueryData={},this.collisionGroups=new Hi(Vt),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=ke,ke&&(ke.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(I){let ht=this.terrain;return ht?(Et,It)=>ht.getElevation(I,Et,It):null}getBucketParts(I,ht,Et,It){let Vt=Et.getBucket(ht),ke=Et.latestFeatureIndex;if(!Vt||!ke||ht.id!==Vt.layerIds[0])return;let Oe=Et.collisionBoxArray,Ke=Vt.layers[0].layout,gr=Vt.layers[0].paint,Or=Math.pow(2,this.transform.zoom-Et.tileID.overscaledZ),Dr=Et.tileSize/e.X,ln=Et.tileID.toUnwrapped(),Sn=this.transform.calculatePosMatrix(ln),Xt=Ke.get("text-pitch-alignment")==="map",ae=Ke.get("text-rotation-alignment")==="map",xe=Hn(Et,1,this.transform.zoom),Ae=this.collisionIndex.mapProjection.translatePosition(this.transform,Et,gr.get("text-translate"),gr.get("text-translate-anchor")),je=this.collisionIndex.mapProjection.translatePosition(this.transform,Et,gr.get("icon-translate"),gr.get("icon-translate-anchor")),Ie=Kr(Sn,Xt,ae,this.transform,xe),Ze=null;if(Xt){let Ir=rn(Sn,Xt,ae,this.transform,xe);Ze=e.L([],this.transform.labelPlaneMatrix,Ir)}this.retainedQueryData[Vt.bucketInstanceId]=new oa(Vt.bucketInstanceId,ke,Vt.sourceLayerIndex,Vt.index,Et.tileID);let wr={bucket:Vt,layout:Ke,translationText:Ae,translationIcon:je,posMatrix:Sn,unwrappedTileID:ln,textLabelPlaneMatrix:Ie,labelToScreenMatrix:Ze,scale:Or,textPixelRatio:Dr,holdingForFade:Et.holdingForFade(),collisionBoxArray:Oe,partiallyEvaluatedTextSize:e.ag(Vt.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(Vt.sourceID)};if(It)for(let Ir of Vt.sortKeyRanges){let{sortKey:Nr,symbolInstanceStart:tn,symbolInstanceEnd:mn}=Ir;I.push({sortKey:Nr,symbolInstanceStart:tn,symbolInstanceEnd:mn,parameters:wr})}else I.push({symbolInstanceStart:0,symbolInstanceEnd:Vt.symbolInstances.length,parameters:wr})}attemptAnchorPlacement(I,ht,Et,It,Vt,ke,Oe,Ke,gr,Or,Dr,ln,Sn,Xt,ae,xe,Ae,je,Ie){let Ze=e.aq[I.textAnchor],wr=[I.textOffset0,I.textOffset1],Ir=We(Ze,Et,It,wr,Vt),Nr=this.collisionIndex.placeCollisionBox(ht,ln,Ke,gr,Or,Oe,ke,xe,Dr.predicate,Ie,Ir);if((!je||this.collisionIndex.placeCollisionBox(je,ln,Ke,gr,Or,Oe,ke,Ae,Dr.predicate,Ie,Ir).placeable)&&Nr.placeable){let tn;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Sn.crossTileID]&&this.prevPlacement.placements[Sn.crossTileID]&&this.prevPlacement.placements[Sn.crossTileID].text&&(tn=this.prevPlacement.variableOffsets[Sn.crossTileID].anchor),Sn.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Sn.crossTileID]={textOffset:wr,width:Et,height:It,anchor:Ze,textBoxScale:Vt,prevAnchor:tn},this.markUsedJustification(Xt,Ze,Sn,ae),Xt.allowVerticalPlacement&&(this.markUsedOrientation(Xt,ae,Sn),this.placedOrientations[Sn.crossTileID]=ae),{shift:Ir,placedGlyphBoxes:Nr}}}placeLayerBucketPart(I,ht,Et){let{bucket:It,layout:Vt,translationText:ke,translationIcon:Oe,posMatrix:Ke,unwrappedTileID:gr,textLabelPlaneMatrix:Or,labelToScreenMatrix:Dr,textPixelRatio:ln,holdingForFade:Sn,collisionBoxArray:Xt,partiallyEvaluatedTextSize:ae,collisionGroup:xe}=I.parameters,Ae=Vt.get("text-optional"),je=Vt.get("icon-optional"),Ie=e.ar(Vt,"text-overlap","text-allow-overlap"),Ze=Ie==="always",wr=e.ar(Vt,"icon-overlap","icon-allow-overlap"),Ir=wr==="always",Nr=Vt.get("text-rotation-alignment")==="map",tn=Vt.get("text-pitch-alignment")==="map",mn=Vt.get("icon-text-fit")!=="none",zn=Vt.get("symbol-z-order")==="viewport-y",Bn=Ze&&(Ir||!It.hasIconData()||je),ri=Ir&&(Ze||!It.hasTextData()||Ae);!It.collisionArrays&&Xt&&It.deserializeCollisionBoxes(Xt);let Fi=this._getTerrainElevationFunc(this.retainedQueryData[It.bucketInstanceId].tileID),da=(ha,ka,io)=>{var Ro,Mo;if(ht[ha.crossTileID])return;if(Sn)return void(this.placements[ha.crossTileID]=new ii(!1,!1,!1));let hs=!1,hl=!1,vl=!0,Os=null,bl={box:null,placeable:!1,offscreen:null},Su={placeable:!1},mu=null,Ws=null,qs=null,Yu=0,dc=0,Zc=0;ka.textFeatureIndex?Yu=ka.textFeatureIndex:ha.useRuntimeCollisionCircles&&(Yu=ha.featureIndex),ka.verticalTextFeatureIndex&&(dc=ka.verticalTextFeatureIndex);let At=ka.textBox;if(At){let Le=Mr=>{let en=e.ah.horizontal;if(It.allowVerticalPlacement&&!Mr&&this.prevPlacement){let Xr=this.prevPlacement.placedOrientations[ha.crossTileID];Xr&&(this.placedOrientations[ha.crossTileID]=Xr,en=Xr,this.markUsedOrientation(It,en,ha))}return en},Be=(Mr,en)=>{if(It.allowVerticalPlacement&&ha.numVerticalGlyphVertices>0&&ka.verticalTextBox){for(let Xr of It.writingModes)if(Xr===e.ah.vertical?(bl=en(),Su=bl):bl=Mr(),bl&&bl.placeable)break}else bl=Mr()},sr=ha.textAnchorOffsetStartIndex,ir=ha.textAnchorOffsetEndIndex;if(ir===sr){let Mr=(en,Xr)=>{let vn=this.collisionIndex.placeCollisionBox(en,Ie,ln,Ke,gr,tn,Nr,ke,xe.predicate,Fi);return vn&&vn.placeable&&(this.markUsedOrientation(It,Xr,ha),this.placedOrientations[ha.crossTileID]=Xr),vn};Be(()=>Mr(At,e.ah.horizontal),()=>{let en=ka.verticalTextBox;return It.allowVerticalPlacement&&ha.numVerticalGlyphVertices>0&&en?Mr(en,e.ah.vertical):{box:null,offscreen:null}}),Le(bl&&bl.placeable)}else{let Mr=e.aq[(Mo=(Ro=this.prevPlacement)===null||Ro===void 0?void 0:Ro.variableOffsets[ha.crossTileID])===null||Mo===void 0?void 0:Mo.anchor],en=(vn,In,On)=>{let Bi=vn.x2-vn.x1,Un=vn.y2-vn.y1,mi=ha.textBoxScale,Ti=mn&&wr==="never"?In:null,Ii=null,Wi=Ie==="never"?1:2,Yn="never";Mr&&Wi++;for(let ja=0;jaen(At,ka.iconBox,e.ah.horizontal),()=>{let vn=ka.verticalTextBox;return It.allowVerticalPlacement&&(!bl||!bl.placeable)&&ha.numVerticalGlyphVertices>0&&vn?en(vn,ka.verticalIconBox,e.ah.vertical):{box:null,occluded:!0,offscreen:null}}),bl&&(hs=bl.placeable,vl=bl.offscreen);let Xr=Le(bl&&bl.placeable);if(!hs&&this.prevPlacement){let vn=this.prevPlacement.variableOffsets[ha.crossTileID];vn&&(this.variableOffsets[ha.crossTileID]=vn,this.markUsedJustification(It,vn.anchor,ha,Xr))}}}if(mu=bl,hs=mu&&mu.placeable,vl=mu&&mu.offscreen,ha.useRuntimeCollisionCircles){let Le=It.text.placedSymbolArray.get(ha.centerJustifiedTextSymbolIndex),Be=e.ai(It.textSizeData,ae,Le),sr=Vt.get("text-padding");Ws=this.collisionIndex.placeCollisionCircles(Ie,Le,It.lineVertexArray,It.glyphOffsetArray,Be,Ke,gr,Or,Dr,Et,tn,xe.predicate,ha.collisionCircleDiameter,sr,ke,Fi),Ws.circles.length&&Ws.collisionDetected&&!Et&&e.w("Collisions detected, but collision boxes are not shown"),hs=Ze||Ws.circles.length>0&&!Ws.collisionDetected,vl=vl&&Ws.offscreen}if(ka.iconFeatureIndex&&(Zc=ka.iconFeatureIndex),ka.iconBox){let Le=Be=>this.collisionIndex.placeCollisionBox(Be,wr,ln,Ke,gr,tn,Nr,Oe,xe.predicate,Fi,mn&&Os?Os:void 0);Su&&Su.placeable&&ka.verticalIconBox?(qs=Le(ka.verticalIconBox),hl=qs.placeable):(qs=Le(ka.iconBox),hl=qs.placeable),vl=vl&&qs.offscreen}let jt=Ae||ha.numHorizontalGlyphVertices===0&&ha.numVerticalGlyphVertices===0,ue=je||ha.numIconVertices===0;jt||ue?ue?jt||(hl=hl&&hs):hs=hl&&hs:hl=hs=hl&&hs;let Me=hl&&qs.placeable;if(hs&&mu.placeable&&this.collisionIndex.insertCollisionBox(mu.box,Ie,Vt.get("text-ignore-placement"),It.bucketInstanceId,Su&&Su.placeable&&dc?dc:Yu,xe.ID),Me&&this.collisionIndex.insertCollisionBox(qs.box,wr,Vt.get("icon-ignore-placement"),It.bucketInstanceId,Zc,xe.ID),Ws&&hs&&this.collisionIndex.insertCollisionCircles(Ws.circles,Ie,Vt.get("text-ignore-placement"),It.bucketInstanceId,Yu,xe.ID),Et&&this.storeCollisionData(It.bucketInstanceId,io,ka,mu,qs,Ws),ha.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(It.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[ha.crossTileID]=new ii(hs||Bn,hl||ri,vl||It.justReloaded),ht[ha.crossTileID]=!0};if(zn){if(I.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let ha=It.getSortedSymbolIndexes(this.transform.angle);for(let ka=ha.length-1;ka>=0;--ka){let io=ha[ka];da(It.symbolInstances.get(io),It.collisionArrays[io],io)}}else for(let ha=I.symbolInstanceStart;ha=0&&(I.text.placedSymbolArray.get(Oe).crossTileID=Vt>=0&&Oe!==Vt?0:Et.crossTileID)}markUsedOrientation(I,ht,Et){let It=ht===e.ah.horizontal||ht===e.ah.horizontalOnly?ht:0,Vt=ht===e.ah.vertical?ht:0,ke=[Et.leftJustifiedTextSymbolIndex,Et.centerJustifiedTextSymbolIndex,Et.rightJustifiedTextSymbolIndex];for(let Oe of ke)I.text.placedSymbolArray.get(Oe).placedOrientation=It;Et.verticalPlacedTextSymbolIndex&&(I.text.placedSymbolArray.get(Et.verticalPlacedTextSymbolIndex).placedOrientation=Vt)}commit(I){this.commitTime=I,this.zoomAtLastRecencyCheck=this.transform.zoom;let ht=this.prevPlacement,Et=!1;this.prevZoomAdjustment=ht?ht.zoomAdjustment(this.transform.zoom):0;let It=ht?ht.symbolFadeChange(I):1,Vt=ht?ht.opacities:{},ke=ht?ht.variableOffsets:{},Oe=ht?ht.placedOrientations:{};for(let Ke in this.placements){let gr=this.placements[Ke],Or=Vt[Ke];Or?(this.opacities[Ke]=new Ci(Or,It,gr.text,gr.icon),Et=Et||gr.text!==Or.text.placed||gr.icon!==Or.icon.placed):(this.opacities[Ke]=new Ci(null,It,gr.text,gr.icon,gr.skipFade),Et=Et||gr.text||gr.icon)}for(let Ke in Vt){let gr=Vt[Ke];if(!this.opacities[Ke]){let Or=new Ci(gr,It,!1,!1);Or.isHidden()||(this.opacities[Ke]=Or,Et=Et||gr.text.placed||gr.icon.placed)}}for(let Ke in ke)this.variableOffsets[Ke]||!this.opacities[Ke]||this.opacities[Ke].isHidden()||(this.variableOffsets[Ke]=ke[Ke]);for(let Ke in Oe)this.placedOrientations[Ke]||!this.opacities[Ke]||this.opacities[Ke].isHidden()||(this.placedOrientations[Ke]=Oe[Ke]);if(ht&&ht.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");Et?this.lastPlacementChangeTime=I:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=ht?ht.lastPlacementChangeTime:I)}updateLayerOpacities(I,ht){let Et={};for(let It of ht){let Vt=It.getBucket(I);Vt&&It.latestFeatureIndex&&I.id===Vt.layerIds[0]&&this.updateBucketOpacities(Vt,It.tileID,Et,It.collisionBoxArray)}}updateBucketOpacities(I,ht,Et,It){I.hasTextData()&&(I.text.opacityVertexArray.clear(),I.text.hasVisibleVertices=!1),I.hasIconData()&&(I.icon.opacityVertexArray.clear(),I.icon.hasVisibleVertices=!1),I.hasIconCollisionBoxData()&&I.iconCollisionBox.collisionVertexArray.clear(),I.hasTextCollisionBoxData()&&I.textCollisionBox.collisionVertexArray.clear();let Vt=I.layers[0],ke=Vt.layout,Oe=new Ci(null,0,!1,!1,!0),Ke=ke.get("text-allow-overlap"),gr=ke.get("icon-allow-overlap"),Or=Vt._unevaluatedLayout.hasValue("text-variable-anchor")||Vt._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Dr=ke.get("text-rotation-alignment")==="map",ln=ke.get("text-pitch-alignment")==="map",Sn=ke.get("icon-text-fit")!=="none",Xt=new Ci(null,0,Ke&&(gr||!I.hasIconData()||ke.get("icon-optional")),gr&&(Ke||!I.hasTextData()||ke.get("text-optional")),!0);!I.collisionArrays&&It&&(I.hasIconCollisionBoxData()||I.hasTextCollisionBoxData())&&I.deserializeCollisionBoxes(It);let ae=(Ae,je,Ie)=>{for(let Ze=0;Ze0,tn=this.placedOrientations[je.crossTileID],mn=tn===e.ah.vertical,zn=tn===e.ah.horizontal||tn===e.ah.horizontalOnly;if(Ie>0||Ze>0){let ri=Pi(Ir.text);ae(I.text,Ie,mn?Di:ri),ae(I.text,Ze,zn?Di:ri);let Fi=Ir.text.isHidden();[je.rightJustifiedTextSymbolIndex,je.centerJustifiedTextSymbolIndex,je.leftJustifiedTextSymbolIndex].forEach(ka=>{ka>=0&&(I.text.placedSymbolArray.get(ka).hidden=Fi||mn?1:0)}),je.verticalPlacedTextSymbolIndex>=0&&(I.text.placedSymbolArray.get(je.verticalPlacedTextSymbolIndex).hidden=Fi||zn?1:0);let da=this.variableOffsets[je.crossTileID];da&&this.markUsedJustification(I,da.anchor,je,tn);let ha=this.placedOrientations[je.crossTileID];ha&&(this.markUsedJustification(I,"left",je,ha),this.markUsedOrientation(I,ha,je))}if(Nr){let ri=Pi(Ir.icon),Fi=!(Sn&&je.verticalPlacedIconSymbolIndex&&mn);je.placedIconSymbolIndex>=0&&(ae(I.icon,je.numIconVertices,Fi?ri:Di),I.icon.placedSymbolArray.get(je.placedIconSymbolIndex).hidden=Ir.icon.isHidden()),je.verticalPlacedIconSymbolIndex>=0&&(ae(I.icon,je.numVerticalIconVertices,Fi?Di:ri),I.icon.placedSymbolArray.get(je.verticalPlacedIconSymbolIndex).hidden=Ir.icon.isHidden())}let Bn=xe&&xe.has(Ae)?xe.get(Ae):{text:null,icon:null};if(I.hasIconCollisionBoxData()||I.hasTextCollisionBoxData()){let ri=I.collisionArrays[Ae];if(ri){let Fi=new e.P(0,0);if(ri.textBox||ri.verticalTextBox){let da=!0;if(Or){let ha=this.variableOffsets[wr];ha?(Fi=We(ha.anchor,ha.width,ha.height,ha.textOffset,ha.textBoxScale),Dr&&Fi._rotate(ln?this.transform.angle:-this.transform.angle)):da=!1}if(ri.textBox||ri.verticalTextBox){let ha;ri.textBox&&(ha=mn),ri.verticalTextBox&&(ha=zn),fr(I.textCollisionBox.collisionVertexArray,Ir.text.placed,!da||ha,Bn.text,Fi.x,Fi.y)}}if(ri.iconBox||ri.verticalIconBox){let da=!!(!zn&&ri.verticalIconBox),ha;ri.iconBox&&(ha=da),ri.verticalIconBox&&(ha=!da),fr(I.iconCollisionBox.collisionVertexArray,Ir.icon.placed,ha,Bn.icon,Sn?Fi.x:0,Sn?Fi.y:0)}}}}if(I.sortFeatures(this.transform.angle),this.retainedQueryData[I.bucketInstanceId]&&(this.retainedQueryData[I.bucketInstanceId].featureSortOrder=I.featureSortOrder),I.hasTextData()&&I.text.opacityVertexBuffer&&I.text.opacityVertexBuffer.updateData(I.text.opacityVertexArray),I.hasIconData()&&I.icon.opacityVertexBuffer&&I.icon.opacityVertexBuffer.updateData(I.icon.opacityVertexArray),I.hasIconCollisionBoxData()&&I.iconCollisionBox.collisionVertexBuffer&&I.iconCollisionBox.collisionVertexBuffer.updateData(I.iconCollisionBox.collisionVertexArray),I.hasTextCollisionBoxData()&&I.textCollisionBox.collisionVertexBuffer&&I.textCollisionBox.collisionVertexBuffer.updateData(I.textCollisionBox.collisionVertexArray),I.text.opacityVertexArray.length!==I.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${I.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${I.text.layoutVertexArray.length}) / 4`);if(I.icon.opacityVertexArray.length!==I.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${I.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${I.icon.layoutVertexArray.length}) / 4`);if(I.bucketInstanceId in this.collisionCircleArrays){let Ae=this.collisionCircleArrays[I.bucketInstanceId];I.placementInvProjMatrix=Ae.invProjMatrix,I.placementViewportMatrix=Ae.viewportMatrix,I.collisionCircleArray=Ae.circles,delete this.collisionCircleArrays[I.bucketInstanceId]}}symbolFadeChange(I){return this.fadeDuration===0?1:(I-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(I){return Math.max(0,(this.transform.zoom-I)/1.5)}hasTransitions(I){return this.stale||I-this.lastPlacementChangeTimeI}setStale(){this.stale=!0}}function fr(qt,I,ht,Et,It,Vt){Et&&Et.length!==0||(Et=[0,0,0,0]);let ke=Et[0]-Jr,Oe=Et[1]-Jr,Ke=Et[2]-Jr,gr=Et[3]-Jr;qt.emplaceBack(I?1:0,ht?1:0,It||0,Vt||0,ke,Oe),qt.emplaceBack(I?1:0,ht?1:0,It||0,Vt||0,Ke,Oe),qt.emplaceBack(I?1:0,ht?1:0,It||0,Vt||0,Ke,gr),qt.emplaceBack(I?1:0,ht?1:0,It||0,Vt||0,ke,gr)}let xr=Math.pow(2,25),Qr=Math.pow(2,24),Cn=Math.pow(2,17),wn=Math.pow(2,16),Mn=Math.pow(2,9),ci=Math.pow(2,8),xi=Math.pow(2,1);function Pi(qt){if(qt.opacity===0&&!qt.placed)return 0;if(qt.opacity===1&&qt.placed)return 4294967295;let I=qt.placed?1:0,ht=Math.floor(127*qt.opacity);return ht*xr+I*Qr+ht*Cn+I*wn+ht*Mn+I*ci+ht*xi+I}let Di=0;function Zi(){return{isOccluded:(qt,I,ht)=>!1,getPitchedTextCorrection:(qt,I,ht)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(qt,I,ht,Et){throw new Error("Not implemented.")},translatePosition:(qt,I,ht,Et)=>function(It,Vt,ke,Oe,Ke=!1){if(!ke[0]&&!ke[1])return[0,0];let gr=Ke?Oe==="map"?It.angle:0:Oe==="viewport"?-It.angle:0;if(gr){let Or=Math.sin(gr),Dr=Math.cos(gr);ke=[ke[0]*Dr-ke[1]*Or,ke[0]*Or+ke[1]*Dr]}return[Ke?ke[0]:Hn(Vt,ke[0],It.zoom),Ke?ke[1]:Hn(Vt,ke[1],It.zoom)]}(qt,I,ht,Et),getCircleRadiusCorrection:qt=>1}}class ui{constructor(I){this._sortAcrossTiles=I.layout.get("symbol-z-order")!=="viewport-y"&&!I.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(I,ht,Et,It,Vt){let ke=this._bucketParts;for(;this._currentTileIndexOe.sortKey-Ke.sortKey));this._currentPartIndex!this._forceFullPlacement&&o.now()-It>2;for(;this._currentPlacementIndex>=0;){let ke=ht[I[this._currentPlacementIndex]],Oe=this.placement.collisionIndex.transform.zoom;if(ke.type==="symbol"&&(!ke.minzoom||ke.minzoom<=Oe)&&(!ke.maxzoom||ke.maxzoom>Oe)){if(this._inProgressLayer||(this._inProgressLayer=new ui(ke)),this._inProgressLayer.continuePlacement(Et[ke.source],this.placement,this._showCollisionBoxes,ke,Vt))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(I){return this.placement.commit(I),this.placement}}let Wa=512/e.X/2;class ze{constructor(I,ht,Et){this.tileID=I,this.bucketInstanceId=Et,this._symbolsByKey={};let It=new Map;for(let Vt=0;Vt({x:Math.floor(Ke.anchorX*Wa),y:Math.floor(Ke.anchorY*Wa)})),crossTileIDs:ke.map(Ke=>Ke.crossTileID)};if(Oe.positions.length>128){let Ke=new e.av(Oe.positions.length,16,Uint16Array);for(let{x:gr,y:Or}of Oe.positions)Ke.add(gr,Or);Ke.finish(),delete Oe.positions,Oe.index=Ke}this._symbolsByKey[Vt]=Oe}}getScaledCoordinates(I,ht){let{x:Et,y:It,z:Vt}=this.tileID.canonical,{x:ke,y:Oe,z:Ke}=ht.canonical,gr=Wa/Math.pow(2,Ke-Vt),Or=(Oe*e.X+I.anchorY)*gr,Dr=It*e.X*Wa;return{x:Math.floor((ke*e.X+I.anchorX)*gr-Et*e.X*Wa),y:Math.floor(Or-Dr)}}findMatches(I,ht,Et){let It=this.tileID.canonical.zI)}}class Pe{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Rr{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(I){let ht=Math.round((I-this.lng)/360);if(ht!==0)for(let Et in this.indexes){let It=this.indexes[Et],Vt={};for(let ke in It){let Oe=It[ke];Oe.tileID=Oe.tileID.unwrapTo(Oe.tileID.wrap+ht),Vt[Oe.tileID.key]=Oe}this.indexes[Et]=Vt}this.lng=I}addBucket(I,ht,Et){if(this.indexes[I.overscaledZ]&&this.indexes[I.overscaledZ][I.key]){if(this.indexes[I.overscaledZ][I.key].bucketInstanceId===ht.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(I.overscaledZ,this.indexes[I.overscaledZ][I.key])}for(let Vt=0;VtI.overscaledZ)for(let Oe in ke){let Ke=ke[Oe];Ke.tileID.isChildOf(I)&&Ke.findMatches(ht.symbolInstances,I,It)}else{let Oe=ke[I.scaledTo(Number(Vt)).key];Oe&&Oe.findMatches(ht.symbolInstances,I,It)}}for(let Vt=0;Vt{ht[Et]=!0});for(let Et in this.layerIndexes)ht[Et]||delete this.layerIndexes[Et]}}let $r=(qt,I)=>e.t(qt,I&&I.filter(ht=>ht.identifier!=="source.canvas")),Br=e.aw();class Gr extends e.E{constructor(I,ht={}){super(),this._rtlPluginLoaded=()=>{for(let Et in this.sourceCaches){let It=this.sourceCaches[Et].getSource().type;It!=="vector"&&It!=="geojson"||this.sourceCaches[Et].reload()}},this.map=I,this.dispatcher=new rt(dt(),I._getMapId()),this.dispatcher.registerMessageHandler("GG",(Et,It)=>this.getGlyphs(Et,It)),this.dispatcher.registerMessageHandler("GI",(Et,It)=>this.getImages(Et,It)),this.imageManager=new w,this.imageManager.setEventedParent(this),this.glyphManager=new V(I._requestManager,ht.localIdeographFontFamily),this.lineAtlas=new X(256,512),this.crossTileSymbolIndex=new qr,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new e.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",e.ay()),ve().on(Lt,this._rtlPluginLoaded),this.on("data",Et=>{if(Et.dataType!=="source"||Et.sourceDataType!=="metadata")return;let It=this.sourceCaches[Et.sourceId];if(!It)return;let Vt=It.getSource();if(Vt&&Vt.vectorLayerIds)for(let ke in this._layers){let Oe=this._layers[ke];Oe.source===Vt.id&&this._validateLayer(Oe)}})}loadURL(I,ht={},Et){this.fire(new e.k("dataloading",{dataType:"style"})),ht.validate=typeof ht.validate!="boolean"||ht.validate;let It=this.map._requestManager.transformRequest(I,"Style");this._loadStyleRequest=new AbortController;let Vt=this._loadStyleRequest;e.h(It,this._loadStyleRequest).then(ke=>{this._loadStyleRequest=null,this._load(ke.data,ht,Et)}).catch(ke=>{this._loadStyleRequest=null,ke&&!Vt.signal.aborted&&this.fire(new e.j(ke))})}loadJSON(I,ht={},Et){this.fire(new e.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,o.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,ht.validate=ht.validate!==!1,this._load(I,ht,Et)}).catch(()=>{})}loadEmpty(){this.fire(new e.k("dataloading",{dataType:"style"})),this._load(Br,{validate:!1})}_load(I,ht,Et){var It;let Vt=ht.transformStyle?ht.transformStyle(Et,I):I;if(!ht.validate||!$r(this,e.u(Vt))){this._loaded=!0,this.stylesheet=Vt;for(let ke in Vt.sources)this.addSource(ke,Vt.sources[ke],{validate:!1});Vt.sprite?this._loadSprite(Vt.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(Vt.glyphs),this._createLayers(),this.light=new U(this.stylesheet.light),this.sky=new q(this.stylesheet.sky),this.map.setTerrain((It=this.stylesheet.terrain)!==null&&It!==void 0?It:null),this.fire(new e.k("data",{dataType:"style"})),this.fire(new e.k("style.load"))}}_createLayers(){let I=e.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",I),this._order=I.map(ht=>ht.id),this._layers={},this._serializedLayers=null;for(let ht of I){let Et=e.aA(ht);Et.setEventedParent(this,{layer:{id:ht.id}}),this._layers[ht.id]=Et}}_loadSprite(I,ht=!1,Et=void 0){let It;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(Vt,ke,Oe,Ke){return e._(this,void 0,void 0,function*(){let gr=A(Vt),Or=Oe>1?"@2x":"",Dr={},ln={};for(let{id:Sn,url:Xt}of gr){let ae=ke.transformRequest(h(Xt,Or,".json"),"SpriteJSON");Dr[Sn]=e.h(ae,Ke);let xe=ke.transformRequest(h(Xt,Or,".png"),"SpriteImage");ln[Sn]=u.getImage(xe,Ke)}return yield Promise.all([...Object.values(Dr),...Object.values(ln)]),function(Sn,Xt){return e._(this,void 0,void 0,function*(){let ae={};for(let xe in Sn){ae[xe]={};let Ae=o.getImageCanvasContext((yield Xt[xe]).data),je=(yield Sn[xe]).data;for(let Ie in je){let{width:Ze,height:wr,x:Ir,y:Nr,sdf:tn,pixelRatio:mn,stretchX:zn,stretchY:Bn,content:ri,textFitWidth:Fi,textFitHeight:da}=je[Ie];ae[xe][Ie]={data:null,pixelRatio:mn,sdf:tn,stretchX:zn,stretchY:Bn,content:ri,textFitWidth:Fi,textFitHeight:da,spriteData:{width:Ze,height:wr,x:Ir,y:Nr,context:Ae}}}}return ae})}(Dr,ln)})}(I,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(Vt=>{if(this._spriteRequest=null,Vt)for(let ke in Vt){this._spritesImagesIds[ke]=[];let Oe=this._spritesImagesIds[ke]?this._spritesImagesIds[ke].filter(Ke=>!(Ke in Vt)):[];for(let Ke of Oe)this.imageManager.removeImage(Ke),this._changedImages[Ke]=!0;for(let Ke in Vt[ke]){let gr=ke==="default"?Ke:`${ke}:${Ke}`;this._spritesImagesIds[ke].push(gr),gr in this.imageManager.images?this.imageManager.updateImage(gr,Vt[ke][Ke],!1):this.imageManager.addImage(gr,Vt[ke][Ke]),ht&&(this._changedImages[gr]=!0)}}}).catch(Vt=>{this._spriteRequest=null,It=Vt,this.fire(new e.j(It))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),ht&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"})),Et&&Et(It)})}_unloadSprite(){for(let I of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(I),this._changedImages[I]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}_validateLayer(I){let ht=this.sourceCaches[I.source];if(!ht)return;let Et=I.sourceLayer;if(!Et)return;let It=ht.getSource();(It.type==="geojson"||It.vectorLayerIds&&It.vectorLayerIds.indexOf(Et)===-1)&&this.fire(new e.j(new Error(`Source layer "${Et}" does not exist on source "${It.id}" as specified by style layer "${I.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let I in this.sourceCaches)if(!this.sourceCaches[I].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(I,ht=!1){let Et=this._serializedAllLayers();if(!I||I.length===0)return Object.values(ht?e.aB(Et):Et);let It=[];for(let Vt of I)if(Et[Vt]){let ke=ht?e.aB(Et[Vt]):Et[Vt];It.push(ke)}return It}_serializedAllLayers(){let I=this._serializedLayers;if(I)return I;I=this._serializedLayers={};let ht=Object.keys(this._layers);for(let Et of ht){let It=this._layers[Et];It.type!=="custom"&&(I[Et]=It.serialize())}return I}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let I in this.sourceCaches)if(this.sourceCaches[I].hasTransition())return!0;for(let I in this._layers)if(this._layers[I].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(I){if(!this._loaded)return;let ht=this._changed;if(ht){let It=Object.keys(this._updatedLayers),Vt=Object.keys(this._removedLayers);(It.length||Vt.length)&&this._updateWorkerLayers(It,Vt);for(let ke in this._updatedSources){let Oe=this._updatedSources[ke];if(Oe==="reload")this._reloadSource(ke);else{if(Oe!=="clear")throw new Error(`Invalid action ${Oe}`);this._clearSource(ke)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let ke in this._updatedPaintProps)this._layers[ke].updateTransitions(I);this.light.updateTransitions(I),this.sky.updateTransitions(I),this._resetUpdates()}let Et={};for(let It in this.sourceCaches){let Vt=this.sourceCaches[It];Et[It]=Vt.used,Vt.used=!1}for(let It of this._order){let Vt=this._layers[It];Vt.recalculate(I,this._availableImages),!Vt.isHidden(I.zoom)&&Vt.source&&(this.sourceCaches[Vt.source].used=!0)}for(let It in Et){let Vt=this.sourceCaches[It];!!Et[It]!=!!Vt.used&&Vt.fire(new e.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:It}))}this.light.recalculate(I),this.sky.recalculate(I),this.z=I.zoom,ht&&this.fire(new e.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let I=Object.keys(this._changedImages);if(I.length){for(let ht in this.sourceCaches)this.sourceCaches[ht].reloadTilesForDependencies(["icons","patterns"],I);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let I in this.sourceCaches)this.sourceCaches[I].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(I,ht){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(I,!1),removedIds:ht})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(I,ht={}){var Et;this._checkLoaded();let It=this.serialize();if(I=ht.transformStyle?ht.transformStyle(It,I):I,((Et=ht.validate)===null||Et===void 0||Et)&&$r(this,e.u(I)))return!1;(I=e.aB(I)).layers=e.az(I.layers);let Vt=e.aC(It,I),ke=this._getOperationsToPerform(Vt);if(ke.unimplemented.length>0)throw new Error(`Unimplemented: ${ke.unimplemented.join(", ")}.`);if(ke.operations.length===0)return!1;for(let Oe of ke.operations)Oe();return this.stylesheet=I,this._serializedLayers=null,!0}_getOperationsToPerform(I){let ht=[],Et=[];for(let It of I)switch(It.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":ht.push(()=>this.addLayer.apply(this,It.args));break;case"removeLayer":ht.push(()=>this.removeLayer.apply(this,It.args));break;case"setPaintProperty":ht.push(()=>this.setPaintProperty.apply(this,It.args));break;case"setLayoutProperty":ht.push(()=>this.setLayoutProperty.apply(this,It.args));break;case"setFilter":ht.push(()=>this.setFilter.apply(this,It.args));break;case"addSource":ht.push(()=>this.addSource.apply(this,It.args));break;case"removeSource":ht.push(()=>this.removeSource.apply(this,It.args));break;case"setLayerZoomRange":ht.push(()=>this.setLayerZoomRange.apply(this,It.args));break;case"setLight":ht.push(()=>this.setLight.apply(this,It.args));break;case"setGeoJSONSourceData":ht.push(()=>this.setGeoJSONSourceData.apply(this,It.args));break;case"setGlyphs":ht.push(()=>this.setGlyphs.apply(this,It.args));break;case"setSprite":ht.push(()=>this.setSprite.apply(this,It.args));break;case"setSky":ht.push(()=>this.setSky.apply(this,It.args));break;case"setTerrain":ht.push(()=>this.map.setTerrain.apply(this,It.args));break;case"setTransition":ht.push(()=>{});break;default:Et.push(It.command)}return{operations:ht,unimplemented:Et}}addImage(I,ht){if(this.getImage(I))return this.fire(new e.j(new Error(`An image named "${I}" already exists.`)));this.imageManager.addImage(I,ht),this._afterImageUpdated(I)}updateImage(I,ht){this.imageManager.updateImage(I,ht)}getImage(I){return this.imageManager.getImage(I)}removeImage(I){if(!this.getImage(I))return this.fire(new e.j(new Error(`An image named "${I}" does not exist.`)));this.imageManager.removeImage(I),this._afterImageUpdated(I)}_afterImageUpdated(I){this._availableImages=this.imageManager.listImages(),this._changedImages[I]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(I,ht,Et={}){if(this._checkLoaded(),this.sourceCaches[I]!==void 0)throw new Error(`Source "${I}" already exists.`);if(!ht.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(ht).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(ht.type)>=0&&this._validate(e.u.source,`sources.${I}`,ht,null,Et))return;this.map&&this.map._collectResourceTiming&&(ht.collectResourceTiming=!0);let It=this.sourceCaches[I]=new Ge(I,ht,this.dispatcher);It.style=this,It.setEventedParent(this,()=>({isSourceLoaded:It.loaded(),source:It.serialize(),sourceId:I})),It.onAdd(this.map),this._changed=!0}removeSource(I){if(this._checkLoaded(),this.sourceCaches[I]===void 0)throw new Error("There is no source with this ID");for(let Et in this._layers)if(this._layers[Et].source===I)return this.fire(new e.j(new Error(`Source "${I}" cannot be removed while layer "${Et}" is using it.`)));let ht=this.sourceCaches[I];delete this.sourceCaches[I],delete this._updatedSources[I],ht.fire(new e.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:I})),ht.setEventedParent(null),ht.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(I,ht){if(this._checkLoaded(),this.sourceCaches[I]===void 0)throw new Error(`There is no source with this ID=${I}`);let Et=this.sourceCaches[I].getSource();if(Et.type!=="geojson")throw new Error(`geojsonSource.type is ${Et.type}, which is !== 'geojson`);Et.setData(ht),this._changed=!0}getSource(I){return this.sourceCaches[I]&&this.sourceCaches[I].getSource()}addLayer(I,ht,Et={}){this._checkLoaded();let It=I.id;if(this.getLayer(It))return void this.fire(new e.j(new Error(`Layer "${It}" already exists on this map.`)));let Vt;if(I.type==="custom"){if($r(this,e.aD(I)))return;Vt=e.aA(I)}else{if("source"in I&&typeof I.source=="object"&&(this.addSource(It,I.source),I=e.aB(I),I=e.e(I,{source:It})),this._validate(e.u.layer,`layers.${It}`,I,{arrayIndex:-1},Et))return;Vt=e.aA(I),this._validateLayer(Vt),Vt.setEventedParent(this,{layer:{id:It}})}let ke=ht?this._order.indexOf(ht):this._order.length;if(ht&&ke===-1)this.fire(new e.j(new Error(`Cannot add layer "${It}" before non-existing layer "${ht}".`)));else{if(this._order.splice(ke,0,It),this._layerOrderChanged=!0,this._layers[It]=Vt,this._removedLayers[It]&&Vt.source&&Vt.type!=="custom"){let Oe=this._removedLayers[It];delete this._removedLayers[It],Oe.type!==Vt.type?this._updatedSources[Vt.source]="clear":(this._updatedSources[Vt.source]="reload",this.sourceCaches[Vt.source].pause())}this._updateLayer(Vt),Vt.onAdd&&Vt.onAdd(this.map)}}moveLayer(I,ht){if(this._checkLoaded(),this._changed=!0,!this._layers[I])return void this.fire(new e.j(new Error(`The layer '${I}' does not exist in the map's style and cannot be moved.`)));if(I===ht)return;let Et=this._order.indexOf(I);this._order.splice(Et,1);let It=ht?this._order.indexOf(ht):this._order.length;ht&&It===-1?this.fire(new e.j(new Error(`Cannot move layer "${I}" before non-existing layer "${ht}".`))):(this._order.splice(It,0,I),this._layerOrderChanged=!0)}removeLayer(I){this._checkLoaded();let ht=this._layers[I];if(!ht)return void this.fire(new e.j(new Error(`Cannot remove non-existing layer "${I}".`)));ht.setEventedParent(null);let Et=this._order.indexOf(I);this._order.splice(Et,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[I]=ht,delete this._layers[I],this._serializedLayers&&delete this._serializedLayers[I],delete this._updatedLayers[I],delete this._updatedPaintProps[I],ht.onRemove&&ht.onRemove(this.map)}getLayer(I){return this._layers[I]}getLayersOrder(){return[...this._order]}hasLayer(I){return I in this._layers}setLayerZoomRange(I,ht,Et){this._checkLoaded();let It=this.getLayer(I);It?It.minzoom===ht&&It.maxzoom===Et||(ht!=null&&(It.minzoom=ht),Et!=null&&(It.maxzoom=Et),this._updateLayer(It)):this.fire(new e.j(new Error(`Cannot set the zoom range of non-existing layer "${I}".`)))}setFilter(I,ht,Et={}){this._checkLoaded();let It=this.getLayer(I);if(It){if(!e.aE(It.filter,ht))return ht==null?(It.filter=void 0,void this._updateLayer(It)):void(this._validate(e.u.filter,`layers.${It.id}.filter`,ht,null,Et)||(It.filter=e.aB(ht),this._updateLayer(It)))}else this.fire(new e.j(new Error(`Cannot filter non-existing layer "${I}".`)))}getFilter(I){return e.aB(this.getLayer(I).filter)}setLayoutProperty(I,ht,Et,It={}){this._checkLoaded();let Vt=this.getLayer(I);Vt?e.aE(Vt.getLayoutProperty(ht),Et)||(Vt.setLayoutProperty(ht,Et,It),this._updateLayer(Vt)):this.fire(new e.j(new Error(`Cannot style non-existing layer "${I}".`)))}getLayoutProperty(I,ht){let Et=this.getLayer(I);if(Et)return Et.getLayoutProperty(ht);this.fire(new e.j(new Error(`Cannot get style of non-existing layer "${I}".`)))}setPaintProperty(I,ht,Et,It={}){this._checkLoaded();let Vt=this.getLayer(I);Vt?e.aE(Vt.getPaintProperty(ht),Et)||(Vt.setPaintProperty(ht,Et,It)&&this._updateLayer(Vt),this._changed=!0,this._updatedPaintProps[I]=!0,this._serializedLayers=null):this.fire(new e.j(new Error(`Cannot style non-existing layer "${I}".`)))}getPaintProperty(I,ht){return this.getLayer(I).getPaintProperty(ht)}setFeatureState(I,ht){this._checkLoaded();let Et=I.source,It=I.sourceLayer,Vt=this.sourceCaches[Et];if(Vt===void 0)return void this.fire(new e.j(new Error(`The source '${Et}' does not exist in the map's style.`)));let ke=Vt.getSource().type;ke==="geojson"&&It?this.fire(new e.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):ke!=="vector"||It?(I.id===void 0&&this.fire(new e.j(new Error("The feature id parameter must be provided."))),Vt.setFeatureState(It,I.id,ht)):this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(I,ht){this._checkLoaded();let Et=I.source,It=this.sourceCaches[Et];if(It===void 0)return void this.fire(new e.j(new Error(`The source '${Et}' does not exist in the map's style.`)));let Vt=It.getSource().type,ke=Vt==="vector"?I.sourceLayer:void 0;Vt!=="vector"||ke?ht&&typeof I.id!="string"&&typeof I.id!="number"?this.fire(new e.j(new Error("A feature id is required to remove its specific state property."))):It.removeFeatureState(ke,I.id,ht):this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(I){this._checkLoaded();let ht=I.source,Et=I.sourceLayer,It=this.sourceCaches[ht];if(It!==void 0)return It.getSource().type!=="vector"||Et?(I.id===void 0&&this.fire(new e.j(new Error("The feature id parameter must be provided."))),It.getFeatureState(Et,I.id)):void this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.j(new Error(`The source '${ht}' does not exist in the map's style.`)))}getTransition(){return e.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let I=e.aF(this.sourceCaches,Vt=>Vt.serialize()),ht=this._serializeByIds(this._order,!0),Et=this.map.getTerrain()||void 0,It=this.stylesheet;return e.aG({version:It.version,name:It.name,metadata:It.metadata,light:It.light,sky:It.sky,center:It.center,zoom:It.zoom,bearing:It.bearing,pitch:It.pitch,sprite:It.sprite,glyphs:It.glyphs,transition:It.transition,sources:I,layers:ht,terrain:Et},Vt=>Vt!==void 0)}_updateLayer(I){this._updatedLayers[I.id]=!0,I.source&&!this._updatedSources[I.source]&&this.sourceCaches[I.source].getSource().type!=="raster"&&(this._updatedSources[I.source]="reload",this.sourceCaches[I.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(I){let ht=ke=>this._layers[ke].type==="fill-extrusion",Et={},It=[];for(let ke=this._order.length-1;ke>=0;ke--){let Oe=this._order[ke];if(ht(Oe)){Et[Oe]=ke;for(let Ke of I){let gr=Ke[Oe];if(gr)for(let Or of gr)It.push(Or)}}}It.sort((ke,Oe)=>Oe.intersectionZ-ke.intersectionZ);let Vt=[];for(let ke=this._order.length-1;ke>=0;ke--){let Oe=this._order[ke];if(ht(Oe))for(let Ke=It.length-1;Ke>=0;Ke--){let gr=It[Ke].feature;if(Et[gr.layer.id]{let tn=Ae.featureSortOrder;if(tn){let mn=tn.indexOf(Ir.featureIndex);return tn.indexOf(Nr.featureIndex)-mn}return Nr.featureIndex-Ir.featureIndex});for(let Ir of wr)Ze.push(Ir)}}for(let Ae in Xt)Xt[Ae].forEach(je=>{let Ie=je.feature,Ze=gr[Oe[Ae].source].getFeatureState(Ie.layer["source-layer"],Ie.id);Ie.source=Ie.layer.source,Ie.layer["source-layer"]&&(Ie.sourceLayer=Ie.layer["source-layer"]),Ie.state=Ze});return Xt}(this._layers,ke,this.sourceCaches,I,ht,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(Vt)}querySourceFeatures(I,ht){ht&&ht.filter&&this._validate(e.u.filter,"querySourceFeatures.filter",ht.filter,null,ht);let Et=this.sourceCaches[I];return Et?function(It,Vt){let ke=It.getRenderableIds().map(gr=>It.getTileByID(gr)),Oe=[],Ke={};for(let gr=0;grln.getTileByID(Sn)).sort((Sn,Xt)=>Xt.tileID.overscaledZ-Sn.tileID.overscaledZ||(Sn.tileID.isLessThan(Xt.tileID)?-1:1))}let Dr=this.crossTileSymbolIndex.addLayer(Or,Ke[Or.source],I.center.lng);ke=ke||Dr}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((Vt=Vt||this._layerOrderChanged||Et===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(o.now(),I.zoom))&&(this.pauseablePlacement=new Pa(I,this.map.terrain,this._order,Vt,ht,Et,It,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ke),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(o.now()),Oe=!0),ke&&this.pauseablePlacement.placement.setStale()),Oe||ke)for(let gr of this._order){let Or=this._layers[gr];Or.type==="symbol"&&this.placement.updateLayerOpacities(Or,Ke[Or.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(o.now())}_releaseSymbolFadeTiles(){for(let I in this.sourceCaches)this.sourceCaches[I].releaseSymbolFadeTiles()}getImages(I,ht){return e._(this,void 0,void 0,function*(){let Et=yield this.imageManager.getImages(ht.icons);this._updateTilesForChangedImages();let It=this.sourceCaches[ht.source];return It&&It.setDependencies(ht.tileID.key,ht.type,ht.icons),Et})}getGlyphs(I,ht){return e._(this,void 0,void 0,function*(){let Et=yield this.glyphManager.getGlyphs(ht.stacks),It=this.sourceCaches[ht.source];return It&&It.setDependencies(ht.tileID.key,ht.type,[""]),Et})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(I,ht={}){this._checkLoaded(),I&&this._validate(e.u.glyphs,"glyphs",I,null,ht)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=I,this.glyphManager.entries={},this.glyphManager.setURL(I))}addSprite(I,ht,Et={},It){this._checkLoaded();let Vt=[{id:I,url:ht}],ke=[...A(this.stylesheet.sprite),...Vt];this._validate(e.u.sprite,"sprite",ke,null,Et)||(this.stylesheet.sprite=ke,this._loadSprite(Vt,!0,It))}removeSprite(I){this._checkLoaded();let ht=A(this.stylesheet.sprite);if(ht.find(Et=>Et.id===I)){if(this._spritesImagesIds[I])for(let Et of this._spritesImagesIds[I])this.imageManager.removeImage(Et),this._changedImages[Et]=!0;ht.splice(ht.findIndex(Et=>Et.id===I),1),this.stylesheet.sprite=ht.length>0?ht:void 0,delete this._spritesImagesIds[I],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}else this.fire(new e.j(new Error(`Sprite "${I}" doesn't exists on this map.`)))}getSprite(){return A(this.stylesheet.sprite)}setSprite(I,ht={},Et){this._checkLoaded(),I&&this._validate(e.u.sprite,"sprite",I,null,ht)||(this.stylesheet.sprite=I,I?this._loadSprite(I,!0,Et):(this._unloadSprite(),Et&&Et(null)))}}var dn=e.Y([{name:"a_pos",type:"Int16",components:2}]);let an={prelude:Ee(`#ifdef GL_ES +precision mediump float; +#else +#if !defined(lowp) +#define lowp +#endif +#if !defined(mediump) +#define mediump +#endif +#if !defined(highp) +#define highp +#endif +#endif +`,`#ifdef GL_ES +precision highp float; +#else +#if !defined(lowp) +#define lowp +#endif +#if !defined(mediump) +#define mediump +#endif +#if !defined(highp) +#define highp +#endif +#endif +vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0 +);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;} +#ifdef TERRAIN3D +uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth; +#endif +const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) { +#ifdef TERRAIN3D +highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0)); +#else +return 1.0; +#endif +}float calculate_visibility(vec4 pos) { +#ifdef TERRAIN3D +vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0; +#else +return 1.0; +#endif +}float ele(vec2 pos) { +#ifdef TERRAIN3D +vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; +#else +return 0.0; +#endif +}float get_elevation(vec2 pos) { +#ifdef TERRAIN3D +vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; +#else +return 0.0; +#endif +}`),background:Ee(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:Ee(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Ee(`varying vec3 v_data;varying float v_visibility; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define mediump float radius +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define highp vec4 stroke_color +#pragma mapbox: define mediump float stroke_width +#pragma mapbox: define lowp float stroke_opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize mediump float radius +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize highp vec4 stroke_color +#pragma mapbox: initialize mediump float stroke_width +#pragma mapbox: initialize lowp float stroke_opacity +vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define mediump float radius +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define highp vec4 stroke_color +#pragma mapbox: define mediump float stroke_width +#pragma mapbox: define lowp float stroke_opacity +void main(void) { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize mediump float radius +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize highp vec4 stroke_color +#pragma mapbox: initialize mediump float stroke_width +#pragma mapbox: initialize lowp float stroke_opacity +vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Ee("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:Ee(`uniform highp float u_intensity;varying vec2 v_extrude; +#pragma mapbox: define highp float weight +#define GAUSS_COEF 0.3989422804014327 +void main() { +#pragma mapbox: initialize highp float weight +float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude; +#pragma mapbox: define highp float weight +#pragma mapbox: define mediump float radius +const highp float ZERO=1.0/255.0/16.0; +#define GAUSS_COEF 0.3989422804014327 +void main(void) { +#pragma mapbox: initialize highp float weight +#pragma mapbox: initialize mediump float radius +vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:Ee(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(0.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Ee("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Ee("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:Ee("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:Ee(`#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_FragColor=color*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec2 a_pos;uniform mat4 u_matrix; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:Ee(`varying vec2 v_pos; +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:Ee(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:Ee(`#ifdef GL_ES +precision highp float; +#endif +uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:Ee(`varying vec4 v_color;void main() {gl_FragColor=v_color; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed; +#ifdef TERRAIN3D +attribute vec2 a_centroid; +#endif +varying vec4 v_color; +#pragma mapbox: define highp float base +#pragma mapbox: define highp float height +#pragma mapbox: define highp vec4 color +void main() { +#pragma mapbox: initialize highp float base +#pragma mapbox: initialize highp float height +#pragma mapbox: initialize highp vec4 color +vec3 normal=a_normal_ed.xyz; +#ifdef TERRAIN3D +float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); +#else +float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; +#endif +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:Ee(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed; +#ifdef TERRAIN3D +attribute vec2 a_centroid; +#endif +varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to; +#ifdef TERRAIN3D +float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); +#else +float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; +#endif +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 +? a_pos +: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:Ee(`#ifdef GL_ES +precision highp float; +#endif +uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:Ee(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; +#define PI 3.141592653589793 +void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:Ee(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_width2=vec2(outset,inset);}`),lineGradient:Ee(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_width2=vec2(outset,inset);}`),linePattern:Ee(`#ifdef GL_ES +precision highp float; +#endif +uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Ee(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:Ee(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:Ee(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:Ee(`#define SDF_PX 8.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:Ee(`#define SDF_PX 8.0 +#define SDF 1.0 +#define ICON 0.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:Ee("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Ee("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:Ee("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:Ee("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function Ee(qt,I){let ht=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Et=I.match(/attribute ([\w]+) ([\w]+)/g),It=qt.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Vt=I.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ke=Vt?Vt.concat(It):It,Oe={};return{fragmentSource:qt=qt.replace(ht,(Ke,gr,Or,Dr,ln)=>(Oe[ln]=!0,gr==="define"?` +#ifndef HAS_UNIFORM_u_${ln} +varying ${Or} ${Dr} ${ln}; +#else +uniform ${Or} ${Dr} u_${ln}; +#endif +`:` +#ifdef HAS_UNIFORM_u_${ln} + ${Or} ${Dr} ${ln} = u_${ln}; +#endif +`)),vertexSource:I=I.replace(ht,(Ke,gr,Or,Dr,ln)=>{let Sn=Dr==="float"?"vec2":"vec4",Xt=ln.match(/color/)?"color":Sn;return Oe[ln]?gr==="define"?` +#ifndef HAS_UNIFORM_u_${ln} +uniform lowp float u_${ln}_t; +attribute ${Or} ${Sn} a_${ln}; +varying ${Or} ${Dr} ${ln}; +#else +uniform ${Or} ${Dr} u_${ln}; +#endif +`:Xt==="vec4"?` +#ifndef HAS_UNIFORM_u_${ln} + ${ln} = a_${ln}; +#else + ${Or} ${Dr} ${ln} = u_${ln}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${ln} + ${ln} = unpack_mix_${Xt}(a_${ln}, u_${ln}_t); +#else + ${Or} ${Dr} ${ln} = u_${ln}; +#endif +`:gr==="define"?` +#ifndef HAS_UNIFORM_u_${ln} +uniform lowp float u_${ln}_t; +attribute ${Or} ${Sn} a_${ln}; +#else +uniform ${Or} ${Dr} u_${ln}; +#endif +`:Xt==="vec4"?` +#ifndef HAS_UNIFORM_u_${ln} + ${Or} ${Dr} ${ln} = a_${ln}; +#else + ${Or} ${Dr} ${ln} = u_${ln}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${ln} + ${Or} ${Dr} ${ln} = unpack_mix_${Xt}(a_${ln}, u_${ln}_t); +#else + ${Or} ${Dr} ${ln} = u_${ln}; +#endif +`}),staticAttributes:Et,staticUniforms:ke}}class dr{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(I,ht,Et,It,Vt,ke,Oe,Ke,gr){this.context=I;let Or=this.boundPaintVertexBuffers.length!==It.length;for(let Dr=0;!Or&&Dr({u_matrix:qt,u_texture:0,u_ele_delta:I,u_fog_matrix:ht,u_fog_color:Et?Et.properties.get("fog-color"):e.aM.white,u_fog_ground_blend:Et?Et.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:Et?Et.calculateFogBlendOpacity(It):0,u_horizon_color:Et?Et.properties.get("horizon-color"):e.aM.white,u_horizon_fog_blend:Et?Et.properties.get("horizon-fog-blend"):1});function yn(qt){let I=[];for(let ht=0;ht({u_depth:new e.aH(Ir,Nr.u_depth),u_terrain:new e.aH(Ir,Nr.u_terrain),u_terrain_dim:new e.aI(Ir,Nr.u_terrain_dim),u_terrain_matrix:new e.aJ(Ir,Nr.u_terrain_matrix),u_terrain_unpack:new e.aK(Ir,Nr.u_terrain_unpack),u_terrain_exaggeration:new e.aI(Ir,Nr.u_terrain_exaggeration)}))(I,wr),this.binderUniforms=Et?Et.getUniforms(I,wr):[]}draw(I,ht,Et,It,Vt,ke,Oe,Ke,gr,Or,Dr,ln,Sn,Xt,ae,xe,Ae,je){let Ie=I.gl;if(this.failedToCreate)return;if(I.program.set(this.program),I.setDepthMode(Et),I.setStencilMode(It),I.setColorMode(Vt),I.setCullFace(ke),Ke){I.activeTexture.set(Ie.TEXTURE2),Ie.bindTexture(Ie.TEXTURE_2D,Ke.depthTexture),I.activeTexture.set(Ie.TEXTURE3),Ie.bindTexture(Ie.TEXTURE_2D,Ke.texture);for(let wr in this.terrainUniforms)this.terrainUniforms[wr].set(Ke[wr])}for(let wr in this.fixedUniforms)this.fixedUniforms[wr].set(Oe[wr]);ae&&ae.setUniforms(I,this.binderUniforms,Sn,{zoom:Xt});let Ze=0;switch(ht){case Ie.LINES:Ze=2;break;case Ie.TRIANGLES:Ze=3;break;case Ie.LINE_STRIP:Ze=1}for(let wr of ln.get()){let Ir=wr.vaos||(wr.vaos={});(Ir[gr]||(Ir[gr]=new dr)).bind(I,this,Or,ae?ae.getPaintVertexBuffers():[],Dr,wr.vertexOffset,xe,Ae,je),Ie.drawElements(ht,wr.primitiveLength*Ze,Ie.UNSIGNED_SHORT,wr.primitiveOffset*Ze*2)}}}function Xn(qt,I,ht){let Et=1/Hn(ht,1,I.transform.tileZoom),It=Math.pow(2,ht.tileID.overscaledZ),Vt=ht.tileSize*Math.pow(2,I.transform.tileZoom)/It,ke=Vt*(ht.tileID.canonical.x+ht.tileID.wrap*It),Oe=Vt*ht.tileID.canonical.y;return{u_image:0,u_texsize:ht.imageAtlasTexture.size,u_scale:[Et,qt.fromScale,qt.toScale],u_fade:qt.t,u_pixel_coord_upper:[ke>>16,Oe>>16],u_pixel_coord_lower:[65535&ke,65535&Oe]}}let Pn=(qt,I,ht,Et)=>{let It=I.style.light,Vt=It.properties.get("position"),ke=[Vt.x,Vt.y,Vt.z],Oe=function(){var gr=new e.A(9);return e.A!=Float32Array&&(gr[1]=0,gr[2]=0,gr[3]=0,gr[5]=0,gr[6]=0,gr[7]=0),gr[0]=1,gr[4]=1,gr[8]=1,gr}();It.properties.get("anchor")==="viewport"&&function(gr,Or){var Dr=Math.sin(Or),ln=Math.cos(Or);gr[0]=ln,gr[1]=Dr,gr[2]=0,gr[3]=-Dr,gr[4]=ln,gr[5]=0,gr[6]=0,gr[7]=0,gr[8]=1}(Oe,-I.transform.angle),function(gr,Or,Dr){var ln=Or[0],Sn=Or[1],Xt=Or[2];gr[0]=ln*Dr[0]+Sn*Dr[3]+Xt*Dr[6],gr[1]=ln*Dr[1]+Sn*Dr[4]+Xt*Dr[7],gr[2]=ln*Dr[2]+Sn*Dr[5]+Xt*Dr[8]}(ke,ke,Oe);let Ke=It.properties.get("color");return{u_matrix:qt,u_lightpos:ke,u_lightintensity:It.properties.get("intensity"),u_lightcolor:[Ke.r,Ke.g,Ke.b],u_vertical_gradient:+ht,u_opacity:Et}},En=(qt,I,ht,Et,It,Vt,ke)=>e.e(Pn(qt,I,ht,Et),Xn(Vt,I,ke),{u_height_factor:-Math.pow(2,It.overscaledZ)/ke.tileSize/8}),Zn=qt=>({u_matrix:qt}),Ca=(qt,I,ht,Et)=>e.e(Zn(qt),Xn(ht,I,Et)),Ri=(qt,I)=>({u_matrix:qt,u_world:I}),Ja=(qt,I,ht,Et,It)=>e.e(Ca(qt,I,ht,Et),{u_world:It}),Xa=(qt,I,ht,Et)=>{let It=qt.transform,Vt,ke;if(Et.paint.get("circle-pitch-alignment")==="map"){let Oe=Hn(ht,1,It.zoom);Vt=!0,ke=[Oe,Oe]}else Vt=!1,ke=It.pixelsToGLUnits;return{u_camera_to_center_distance:It.cameraToCenterDistance,u_scale_with_map:+(Et.paint.get("circle-pitch-scale")==="map"),u_matrix:qt.translatePosMatrix(I.posMatrix,ht,Et.paint.get("circle-translate"),Et.paint.get("circle-translate-anchor")),u_pitch_with_map:+Vt,u_device_pixel_ratio:qt.pixelRatio,u_extrude_scale:ke}},Io=(qt,I,ht)=>({u_matrix:qt,u_inv_matrix:I,u_camera_to_center_distance:ht.cameraToCenterDistance,u_viewport_size:[ht.width,ht.height]}),po=(qt,I,ht=1)=>({u_matrix:qt,u_color:I,u_overlay:0,u_overlay_scale:ht}),Do=qt=>({u_matrix:qt}),Ia=(qt,I,ht,Et)=>({u_matrix:qt,u_extrude_scale:Hn(I,1,ht),u_intensity:Et}),gs=(qt,I,ht,Et)=>{let It=e.H();e.aP(It,0,qt.width,qt.height,0,0,1);let Vt=qt.context.gl;return{u_matrix:It,u_world:[Vt.drawingBufferWidth,Vt.drawingBufferHeight],u_image:ht,u_color_ramp:Et,u_opacity:I.paint.get("heatmap-opacity")}};function is(qt,I){let ht=Math.pow(2,I.canonical.z),Et=I.canonical.y;return[new e.Z(0,Et/ht).toLngLat().lat,new e.Z(0,(Et+1)/ht).toLngLat().lat]}let ll=(qt,I,ht,Et)=>{let It=qt.transform;return{u_matrix:Js(qt,I,ht,Et),u_ratio:1/Hn(I,1,It.zoom),u_device_pixel_ratio:qt.pixelRatio,u_units_to_pixels:[1/It.pixelsToGLUnits[0],1/It.pixelsToGLUnits[1]]}},Ho=(qt,I,ht,Et,It)=>e.e(ll(qt,I,ht,It),{u_image:0,u_image_height:Et}),Gs=(qt,I,ht,Et,It)=>{let Vt=qt.transform,ke=ul(I,Vt);return{u_matrix:Js(qt,I,ht,It),u_texsize:I.imageAtlasTexture.size,u_ratio:1/Hn(I,1,Vt.zoom),u_device_pixel_ratio:qt.pixelRatio,u_image:0,u_scale:[ke,Et.fromScale,Et.toScale],u_fade:Et.t,u_units_to_pixels:[1/Vt.pixelsToGLUnits[0],1/Vt.pixelsToGLUnits[1]]}},as=(qt,I,ht,Et,It,Vt)=>{let ke=qt.lineAtlas,Oe=ul(I,qt.transform),Ke=ht.layout.get("line-cap")==="round",gr=ke.getDash(Et.from,Ke),Or=ke.getDash(Et.to,Ke),Dr=gr.width*It.fromScale,ln=Or.width*It.toScale;return e.e(ll(qt,I,ht,Vt),{u_patternscale_a:[Oe/Dr,-gr.height/2],u_patternscale_b:[Oe/ln,-Or.height/2],u_sdfgamma:ke.width/(256*Math.min(Dr,ln)*qt.pixelRatio)/2,u_image:0,u_tex_y_a:gr.y,u_tex_y_b:Or.y,u_mix:It.t})};function ul(qt,I){return 1/Hn(qt,1,I.tileZoom)}function Js(qt,I,ht,Et){return qt.translatePosMatrix(Et?Et.posMatrix:I.tileID.posMatrix,I,ht.paint.get("line-translate"),ht.paint.get("line-translate-anchor"))}let Rl=(qt,I,ht,Et,It)=>{return{u_matrix:qt,u_tl_parent:I,u_scale_parent:ht,u_buffer_scale:1,u_fade_t:Et.mix,u_opacity:Et.opacity*It.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:It.paint.get("raster-brightness-min"),u_brightness_high:It.paint.get("raster-brightness-max"),u_saturation_factor:(ke=It.paint.get("raster-saturation"),ke>0?1-1/(1.001-ke):-ke),u_contrast_factor:(Vt=It.paint.get("raster-contrast"),Vt>0?1/(1-Vt):1+Vt),u_spin_weights:ls(It.paint.get("raster-hue-rotate"))};var Vt,ke};function ls(qt){qt*=Math.PI/180;let I=Math.sin(qt),ht=Math.cos(qt);return[(2*ht+1)/3,(-Math.sqrt(3)*I-ht+1)/3,(Math.sqrt(3)*I-ht+1)/3]}let Cs=(qt,I,ht,Et,It,Vt,ke,Oe,Ke,gr,Or,Dr,ln,Sn)=>{let Xt=ke.transform;return{u_is_size_zoom_constant:+(qt==="constant"||qt==="source"),u_is_size_feature_constant:+(qt==="constant"||qt==="camera"),u_size_t:I?I.uSizeT:0,u_size:I?I.uSize:0,u_camera_to_center_distance:Xt.cameraToCenterDistance,u_pitch:Xt.pitch/360*2*Math.PI,u_rotate_symbol:+ht,u_aspect_ratio:Xt.width/Xt.height,u_fade_change:ke.options.fadeDuration?ke.symbolFadeChange:1,u_matrix:Oe,u_label_plane_matrix:Ke,u_coord_matrix:gr,u_is_text:+Dr,u_pitch_with_map:+Et,u_is_along_line:It,u_is_variable_anchor:Vt,u_texsize:ln,u_texture:0,u_translation:Or,u_pitched_scale:Sn}},Co=(qt,I,ht,Et,It,Vt,ke,Oe,Ke,gr,Or,Dr,ln,Sn,Xt)=>{let ae=ke.transform;return e.e(Cs(qt,I,ht,Et,It,Vt,ke,Oe,Ke,gr,Or,Dr,ln,Xt),{u_gamma_scale:Et?Math.cos(ae._pitch)*ae.cameraToCenterDistance:1,u_device_pixel_ratio:ke.pixelRatio,u_is_halo:1})},ks=(qt,I,ht,Et,It,Vt,ke,Oe,Ke,gr,Or,Dr,ln,Sn)=>e.e(Co(qt,I,ht,Et,It,Vt,ke,Oe,Ke,gr,Or,!0,Dr,!0,Sn),{u_texsize_icon:ln,u_texture_icon:1}),kl=(qt,I,ht)=>({u_matrix:qt,u_opacity:I,u_color:ht}),Vl=(qt,I,ht,Et,It,Vt)=>e.e(function(ke,Oe,Ke,gr){let Or=Ke.imageManager.getPattern(ke.from.toString()),Dr=Ke.imageManager.getPattern(ke.to.toString()),{width:ln,height:Sn}=Ke.imageManager.getPixelSize(),Xt=Math.pow(2,gr.tileID.overscaledZ),ae=gr.tileSize*Math.pow(2,Ke.transform.tileZoom)/Xt,xe=ae*(gr.tileID.canonical.x+gr.tileID.wrap*Xt),Ae=ae*gr.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Or.tl,u_pattern_br_a:Or.br,u_pattern_tl_b:Dr.tl,u_pattern_br_b:Dr.br,u_texsize:[ln,Sn],u_mix:Oe.t,u_pattern_size_a:Or.displaySize,u_pattern_size_b:Dr.displaySize,u_scale_a:Oe.fromScale,u_scale_b:Oe.toScale,u_tile_units_to_pixels:1/Hn(gr,1,Ke.transform.tileZoom),u_pixel_coord_upper:[xe>>16,Ae>>16],u_pixel_coord_lower:[65535&xe,65535&Ae]}}(Et,Vt,ht,It),{u_matrix:qt,u_opacity:I}),Yl={fillExtrusion:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_lightpos:new e.aN(qt,I.u_lightpos),u_lightintensity:new e.aI(qt,I.u_lightintensity),u_lightcolor:new e.aN(qt,I.u_lightcolor),u_vertical_gradient:new e.aI(qt,I.u_vertical_gradient),u_opacity:new e.aI(qt,I.u_opacity)}),fillExtrusionPattern:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_lightpos:new e.aN(qt,I.u_lightpos),u_lightintensity:new e.aI(qt,I.u_lightintensity),u_lightcolor:new e.aN(qt,I.u_lightcolor),u_vertical_gradient:new e.aI(qt,I.u_vertical_gradient),u_height_factor:new e.aI(qt,I.u_height_factor),u_image:new e.aH(qt,I.u_image),u_texsize:new e.aO(qt,I.u_texsize),u_pixel_coord_upper:new e.aO(qt,I.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO(qt,I.u_pixel_coord_lower),u_scale:new e.aN(qt,I.u_scale),u_fade:new e.aI(qt,I.u_fade),u_opacity:new e.aI(qt,I.u_opacity)}),fill:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix)}),fillPattern:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_image:new e.aH(qt,I.u_image),u_texsize:new e.aO(qt,I.u_texsize),u_pixel_coord_upper:new e.aO(qt,I.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO(qt,I.u_pixel_coord_lower),u_scale:new e.aN(qt,I.u_scale),u_fade:new e.aI(qt,I.u_fade)}),fillOutline:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_world:new e.aO(qt,I.u_world)}),fillOutlinePattern:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_world:new e.aO(qt,I.u_world),u_image:new e.aH(qt,I.u_image),u_texsize:new e.aO(qt,I.u_texsize),u_pixel_coord_upper:new e.aO(qt,I.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO(qt,I.u_pixel_coord_lower),u_scale:new e.aN(qt,I.u_scale),u_fade:new e.aI(qt,I.u_fade)}),circle:(qt,I)=>({u_camera_to_center_distance:new e.aI(qt,I.u_camera_to_center_distance),u_scale_with_map:new e.aH(qt,I.u_scale_with_map),u_pitch_with_map:new e.aH(qt,I.u_pitch_with_map),u_extrude_scale:new e.aO(qt,I.u_extrude_scale),u_device_pixel_ratio:new e.aI(qt,I.u_device_pixel_ratio),u_matrix:new e.aJ(qt,I.u_matrix)}),collisionBox:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_pixel_extrude_scale:new e.aO(qt,I.u_pixel_extrude_scale)}),collisionCircle:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_inv_matrix:new e.aJ(qt,I.u_inv_matrix),u_camera_to_center_distance:new e.aI(qt,I.u_camera_to_center_distance),u_viewport_size:new e.aO(qt,I.u_viewport_size)}),debug:(qt,I)=>({u_color:new e.aL(qt,I.u_color),u_matrix:new e.aJ(qt,I.u_matrix),u_overlay:new e.aH(qt,I.u_overlay),u_overlay_scale:new e.aI(qt,I.u_overlay_scale)}),clippingMask:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix)}),heatmap:(qt,I)=>({u_extrude_scale:new e.aI(qt,I.u_extrude_scale),u_intensity:new e.aI(qt,I.u_intensity),u_matrix:new e.aJ(qt,I.u_matrix)}),heatmapTexture:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_world:new e.aO(qt,I.u_world),u_image:new e.aH(qt,I.u_image),u_color_ramp:new e.aH(qt,I.u_color_ramp),u_opacity:new e.aI(qt,I.u_opacity)}),hillshade:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_image:new e.aH(qt,I.u_image),u_latrange:new e.aO(qt,I.u_latrange),u_light:new e.aO(qt,I.u_light),u_shadow:new e.aL(qt,I.u_shadow),u_highlight:new e.aL(qt,I.u_highlight),u_accent:new e.aL(qt,I.u_accent)}),hillshadePrepare:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_image:new e.aH(qt,I.u_image),u_dimension:new e.aO(qt,I.u_dimension),u_zoom:new e.aI(qt,I.u_zoom),u_unpack:new e.aK(qt,I.u_unpack)}),line:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_ratio:new e.aI(qt,I.u_ratio),u_device_pixel_ratio:new e.aI(qt,I.u_device_pixel_ratio),u_units_to_pixels:new e.aO(qt,I.u_units_to_pixels)}),lineGradient:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_ratio:new e.aI(qt,I.u_ratio),u_device_pixel_ratio:new e.aI(qt,I.u_device_pixel_ratio),u_units_to_pixels:new e.aO(qt,I.u_units_to_pixels),u_image:new e.aH(qt,I.u_image),u_image_height:new e.aI(qt,I.u_image_height)}),linePattern:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_texsize:new e.aO(qt,I.u_texsize),u_ratio:new e.aI(qt,I.u_ratio),u_device_pixel_ratio:new e.aI(qt,I.u_device_pixel_ratio),u_image:new e.aH(qt,I.u_image),u_units_to_pixels:new e.aO(qt,I.u_units_to_pixels),u_scale:new e.aN(qt,I.u_scale),u_fade:new e.aI(qt,I.u_fade)}),lineSDF:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_ratio:new e.aI(qt,I.u_ratio),u_device_pixel_ratio:new e.aI(qt,I.u_device_pixel_ratio),u_units_to_pixels:new e.aO(qt,I.u_units_to_pixels),u_patternscale_a:new e.aO(qt,I.u_patternscale_a),u_patternscale_b:new e.aO(qt,I.u_patternscale_b),u_sdfgamma:new e.aI(qt,I.u_sdfgamma),u_image:new e.aH(qt,I.u_image),u_tex_y_a:new e.aI(qt,I.u_tex_y_a),u_tex_y_b:new e.aI(qt,I.u_tex_y_b),u_mix:new e.aI(qt,I.u_mix)}),raster:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_tl_parent:new e.aO(qt,I.u_tl_parent),u_scale_parent:new e.aI(qt,I.u_scale_parent),u_buffer_scale:new e.aI(qt,I.u_buffer_scale),u_fade_t:new e.aI(qt,I.u_fade_t),u_opacity:new e.aI(qt,I.u_opacity),u_image0:new e.aH(qt,I.u_image0),u_image1:new e.aH(qt,I.u_image1),u_brightness_low:new e.aI(qt,I.u_brightness_low),u_brightness_high:new e.aI(qt,I.u_brightness_high),u_saturation_factor:new e.aI(qt,I.u_saturation_factor),u_contrast_factor:new e.aI(qt,I.u_contrast_factor),u_spin_weights:new e.aN(qt,I.u_spin_weights)}),symbolIcon:(qt,I)=>({u_is_size_zoom_constant:new e.aH(qt,I.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH(qt,I.u_is_size_feature_constant),u_size_t:new e.aI(qt,I.u_size_t),u_size:new e.aI(qt,I.u_size),u_camera_to_center_distance:new e.aI(qt,I.u_camera_to_center_distance),u_pitch:new e.aI(qt,I.u_pitch),u_rotate_symbol:new e.aH(qt,I.u_rotate_symbol),u_aspect_ratio:new e.aI(qt,I.u_aspect_ratio),u_fade_change:new e.aI(qt,I.u_fade_change),u_matrix:new e.aJ(qt,I.u_matrix),u_label_plane_matrix:new e.aJ(qt,I.u_label_plane_matrix),u_coord_matrix:new e.aJ(qt,I.u_coord_matrix),u_is_text:new e.aH(qt,I.u_is_text),u_pitch_with_map:new e.aH(qt,I.u_pitch_with_map),u_is_along_line:new e.aH(qt,I.u_is_along_line),u_is_variable_anchor:new e.aH(qt,I.u_is_variable_anchor),u_texsize:new e.aO(qt,I.u_texsize),u_texture:new e.aH(qt,I.u_texture),u_translation:new e.aO(qt,I.u_translation),u_pitched_scale:new e.aI(qt,I.u_pitched_scale)}),symbolSDF:(qt,I)=>({u_is_size_zoom_constant:new e.aH(qt,I.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH(qt,I.u_is_size_feature_constant),u_size_t:new e.aI(qt,I.u_size_t),u_size:new e.aI(qt,I.u_size),u_camera_to_center_distance:new e.aI(qt,I.u_camera_to_center_distance),u_pitch:new e.aI(qt,I.u_pitch),u_rotate_symbol:new e.aH(qt,I.u_rotate_symbol),u_aspect_ratio:new e.aI(qt,I.u_aspect_ratio),u_fade_change:new e.aI(qt,I.u_fade_change),u_matrix:new e.aJ(qt,I.u_matrix),u_label_plane_matrix:new e.aJ(qt,I.u_label_plane_matrix),u_coord_matrix:new e.aJ(qt,I.u_coord_matrix),u_is_text:new e.aH(qt,I.u_is_text),u_pitch_with_map:new e.aH(qt,I.u_pitch_with_map),u_is_along_line:new e.aH(qt,I.u_is_along_line),u_is_variable_anchor:new e.aH(qt,I.u_is_variable_anchor),u_texsize:new e.aO(qt,I.u_texsize),u_texture:new e.aH(qt,I.u_texture),u_gamma_scale:new e.aI(qt,I.u_gamma_scale),u_device_pixel_ratio:new e.aI(qt,I.u_device_pixel_ratio),u_is_halo:new e.aH(qt,I.u_is_halo),u_translation:new e.aO(qt,I.u_translation),u_pitched_scale:new e.aI(qt,I.u_pitched_scale)}),symbolTextAndIcon:(qt,I)=>({u_is_size_zoom_constant:new e.aH(qt,I.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH(qt,I.u_is_size_feature_constant),u_size_t:new e.aI(qt,I.u_size_t),u_size:new e.aI(qt,I.u_size),u_camera_to_center_distance:new e.aI(qt,I.u_camera_to_center_distance),u_pitch:new e.aI(qt,I.u_pitch),u_rotate_symbol:new e.aH(qt,I.u_rotate_symbol),u_aspect_ratio:new e.aI(qt,I.u_aspect_ratio),u_fade_change:new e.aI(qt,I.u_fade_change),u_matrix:new e.aJ(qt,I.u_matrix),u_label_plane_matrix:new e.aJ(qt,I.u_label_plane_matrix),u_coord_matrix:new e.aJ(qt,I.u_coord_matrix),u_is_text:new e.aH(qt,I.u_is_text),u_pitch_with_map:new e.aH(qt,I.u_pitch_with_map),u_is_along_line:new e.aH(qt,I.u_is_along_line),u_is_variable_anchor:new e.aH(qt,I.u_is_variable_anchor),u_texsize:new e.aO(qt,I.u_texsize),u_texsize_icon:new e.aO(qt,I.u_texsize_icon),u_texture:new e.aH(qt,I.u_texture),u_texture_icon:new e.aH(qt,I.u_texture_icon),u_gamma_scale:new e.aI(qt,I.u_gamma_scale),u_device_pixel_ratio:new e.aI(qt,I.u_device_pixel_ratio),u_is_halo:new e.aH(qt,I.u_is_halo),u_translation:new e.aO(qt,I.u_translation),u_pitched_scale:new e.aI(qt,I.u_pitched_scale)}),background:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_opacity:new e.aI(qt,I.u_opacity),u_color:new e.aL(qt,I.u_color)}),backgroundPattern:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_opacity:new e.aI(qt,I.u_opacity),u_image:new e.aH(qt,I.u_image),u_pattern_tl_a:new e.aO(qt,I.u_pattern_tl_a),u_pattern_br_a:new e.aO(qt,I.u_pattern_br_a),u_pattern_tl_b:new e.aO(qt,I.u_pattern_tl_b),u_pattern_br_b:new e.aO(qt,I.u_pattern_br_b),u_texsize:new e.aO(qt,I.u_texsize),u_mix:new e.aI(qt,I.u_mix),u_pattern_size_a:new e.aO(qt,I.u_pattern_size_a),u_pattern_size_b:new e.aO(qt,I.u_pattern_size_b),u_scale_a:new e.aI(qt,I.u_scale_a),u_scale_b:new e.aI(qt,I.u_scale_b),u_pixel_coord_upper:new e.aO(qt,I.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO(qt,I.u_pixel_coord_lower),u_tile_units_to_pixels:new e.aI(qt,I.u_tile_units_to_pixels)}),terrain:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_texture:new e.aH(qt,I.u_texture),u_ele_delta:new e.aI(qt,I.u_ele_delta),u_fog_matrix:new e.aJ(qt,I.u_fog_matrix),u_fog_color:new e.aL(qt,I.u_fog_color),u_fog_ground_blend:new e.aI(qt,I.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.aI(qt,I.u_fog_ground_blend_opacity),u_horizon_color:new e.aL(qt,I.u_horizon_color),u_horizon_fog_blend:new e.aI(qt,I.u_horizon_fog_blend)}),terrainDepth:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_ele_delta:new e.aI(qt,I.u_ele_delta)}),terrainCoords:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_texture:new e.aH(qt,I.u_texture),u_terrain_coords_id:new e.aI(qt,I.u_terrain_coords_id),u_ele_delta:new e.aI(qt,I.u_ele_delta)}),sky:(qt,I)=>({u_sky_color:new e.aL(qt,I.u_sky_color),u_horizon_color:new e.aL(qt,I.u_horizon_color),u_horizon:new e.aI(qt,I.u_horizon),u_sky_horizon_blend:new e.aI(qt,I.u_sky_horizon_blend)})};class Ns{constructor(I,ht,Et){this.context=I;let It=I.gl;this.buffer=It.createBuffer(),this.dynamicDraw=!!Et,this.context.unbindVAO(),I.bindElementBuffer.set(this.buffer),It.bufferData(It.ELEMENT_ARRAY_BUFFER,ht.arrayBuffer,this.dynamicDraw?It.DYNAMIC_DRAW:It.STATIC_DRAW),this.dynamicDraw||delete ht.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(I){let ht=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),ht.bufferSubData(ht.ELEMENT_ARRAY_BUFFER,0,I.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let La={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class uo{constructor(I,ht,Et,It){this.length=ht.length,this.attributes=Et,this.itemSize=ht.bytesPerElement,this.dynamicDraw=It,this.context=I;let Vt=I.gl;this.buffer=Vt.createBuffer(),I.bindVertexBuffer.set(this.buffer),Vt.bufferData(Vt.ARRAY_BUFFER,ht.arrayBuffer,this.dynamicDraw?Vt.DYNAMIC_DRAW:Vt.STATIC_DRAW),this.dynamicDraw||delete ht.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(I){if(I.length!==this.length)throw new Error(`Length of new data is ${I.length}, which doesn't match current length of ${this.length}`);let ht=this.context.gl;this.bind(),ht.bufferSubData(ht.ARRAY_BUFFER,0,I.arrayBuffer)}enableAttributes(I,ht){for(let Et=0;Et0){let Ir=e.H();e.aQ(Ir,Ie.placementInvProjMatrix,qt.transform.glCoordMatrix),e.aQ(Ir,Ir,Ie.placementViewportMatrix),Ke.push({circleArray:wr,circleOffset:Or,transform:je.posMatrix,invTransform:Ir,coord:je}),gr+=wr.length/4,Or=gr}Ze&&Oe.draw(Vt,ke.LINES,Qs.disabled,Ll.disabled,qt.colorModeForRenderPass(),Jo.disabled,{u_matrix:je.posMatrix,u_pixel_extrude_scale:[1/(Dr=qt.transform).width,1/Dr.height]},qt.style.map.terrain&&qt.style.map.terrain.getTerrainData(je),ht.id,Ze.layoutVertexBuffer,Ze.indexBuffer,Ze.segments,null,qt.transform.zoom,null,null,Ze.collisionVertexBuffer)}var Dr;if(!It||!Ke.length)return;let ln=qt.useProgram("collisionCircle"),Sn=new e.aR;Sn.resize(4*gr),Sn._trim();let Xt=0;for(let Ae of Ke)for(let je=0;je=0&&(Ae[Ie.associatedIconIndex]={shiftedAnchor:io,angle:Ro})}else Tr(Ie.numGlyphs,ae)}if(gr){xe.clear();let je=qt.icon.placedSymbolArray;for(let Ie=0;Ieqt.style.map.terrain.getElevation(Bn,On,Bi):null,In=ht.layout.get("text-rotation-alignment")==="map";Ct(Fi,Bn.posMatrix,qt,It,dc,At,Ae,gr,In,ae,Bn.toUnwrapped(),Xt.width,Xt.height,jt,vn)}let Le=Bn.posMatrix,Be=It&&tn||Me,sr=je||Be?ec:dc,ir=Zc,Mr=ka&&ht.paint.get(It?"text-halo-width":"icon-halo-width").constantOr(1)!==0,en;en=ka?Fi.iconsInText?ks(io.kind,hs,Ie,Ae,je,Be,qt,Le,sr,ir,jt,vl,mu,zn):Co(io.kind,hs,Ie,Ae,je,Be,qt,Le,sr,ir,jt,It,vl,!0,zn):Cs(io.kind,hs,Ie,Ae,je,Be,qt,Le,sr,ir,jt,It,vl,zn);let Xr={program:Mo,buffers:da,uniformValues:en,atlasTexture:Os,atlasTextureIcon:Ws,atlasInterpolation:bl,atlasInterpolationIcon:Su,isSDF:ka,hasHalo:Mr};if(wr&&Fi.canOverlap){Ir=!0;let vn=da.segments.get();for(let In of vn)mn.push({segments:new e.a0([In]),sortKey:In.sortKey,state:Xr,terrainData:hl})}else mn.push({segments:da.segments,sortKey:0,state:Xr,terrainData:hl})}Ir&&mn.sort((Bn,ri)=>Bn.sortKey-ri.sortKey);for(let Bn of mn){let ri=Bn.state;if(ln.activeTexture.set(Sn.TEXTURE0),ri.atlasTexture.bind(ri.atlasInterpolation,Sn.CLAMP_TO_EDGE),ri.atlasTextureIcon&&(ln.activeTexture.set(Sn.TEXTURE1),ri.atlasTextureIcon&&ri.atlasTextureIcon.bind(ri.atlasInterpolationIcon,Sn.CLAMP_TO_EDGE)),ri.isSDF){let Fi=ri.uniformValues;ri.hasHalo&&(Fi.u_is_halo=1,$f(ri.buffers,Bn.segments,ht,qt,ri.program,Nr,Or,Dr,Fi,Bn.terrainData)),Fi.u_is_halo=0}$f(ri.buffers,Bn.segments,ht,qt,ri.program,Nr,Or,Dr,ri.uniformValues,Bn.terrainData)}}function $f(qt,I,ht,Et,It,Vt,ke,Oe,Ke,gr){let Or=Et.context;It.draw(Or,Or.gl.TRIANGLES,Vt,ke,Oe,Jo.disabled,Ke,gr,ht.id,qt.layoutVertexBuffer,qt.indexBuffer,I,ht.paint,Et.transform.zoom,qt.programConfigurations.get(ht.id),qt.dynamicLayoutVertexBuffer,qt.opacityVertexBuffer)}function xf(qt,I,ht,Et){let It=qt.context,Vt=It.gl,ke=Ll.disabled,Oe=new xu([Vt.ONE,Vt.ONE],e.aM.transparent,[!0,!0,!0,!0]),Ke=I.getBucket(ht);if(!Ke)return;let gr=Et.key,Or=ht.heatmapFbos.get(gr);Or||(Or=Vf(It,I.tileSize,I.tileSize),ht.heatmapFbos.set(gr,Or)),It.bindFramebuffer.set(Or.framebuffer),It.viewport.set([0,0,I.tileSize,I.tileSize]),It.clear({color:e.aM.transparent});let Dr=Ke.programConfigurations.get(ht.id),ln=qt.useProgram("heatmap",Dr),Sn=qt.style.map.terrain.getTerrainData(Et);ln.draw(It,Vt.TRIANGLES,Qs.disabled,ke,Oe,Jo.disabled,Ia(Et.posMatrix,I,qt.transform.zoom,ht.paint.get("heatmap-intensity")),Sn,ht.id,Ke.layoutVertexBuffer,Ke.indexBuffer,Ke.segments,ht.paint,qt.transform.zoom,Dr)}function Vh(qt,I,ht){let Et=qt.context,It=Et.gl;Et.setColorMode(qt.colorModeForRenderPass());let Vt=Hf(Et,I),ke=ht.key,Oe=I.heatmapFbos.get(ke);Oe&&(Et.activeTexture.set(It.TEXTURE0),It.bindTexture(It.TEXTURE_2D,Oe.colorAttachment.get()),Et.activeTexture.set(It.TEXTURE1),Vt.bind(It.LINEAR,It.CLAMP_TO_EDGE),qt.useProgram("heatmapTexture").draw(Et,It.TRIANGLES,Qs.disabled,Ll.disabled,qt.colorModeForRenderPass(),Jo.disabled,gs(qt,I,0,1),null,I.id,qt.rasterBoundsBuffer,qt.quadTriangleIndexBuffer,qt.rasterBoundsSegments,I.paint,qt.transform.zoom),Oe.destroy(),I.heatmapFbos.delete(ke))}function Vf(qt,I,ht){var Et,It;let Vt=qt.gl,ke=Vt.createTexture();Vt.bindTexture(Vt.TEXTURE_2D,ke),Vt.texParameteri(Vt.TEXTURE_2D,Vt.TEXTURE_WRAP_S,Vt.CLAMP_TO_EDGE),Vt.texParameteri(Vt.TEXTURE_2D,Vt.TEXTURE_WRAP_T,Vt.CLAMP_TO_EDGE),Vt.texParameteri(Vt.TEXTURE_2D,Vt.TEXTURE_MIN_FILTER,Vt.LINEAR),Vt.texParameteri(Vt.TEXTURE_2D,Vt.TEXTURE_MAG_FILTER,Vt.LINEAR);let Oe=(Et=qt.HALF_FLOAT)!==null&&Et!==void 0?Et:Vt.UNSIGNED_BYTE,Ke=(It=qt.RGBA16F)!==null&&It!==void 0?It:Vt.RGBA;Vt.texImage2D(Vt.TEXTURE_2D,0,Ke,I,ht,0,Vt.RGBA,Oe,null);let gr=qt.createFramebuffer(I,ht,!1,!1);return gr.colorAttachment.set(ke),gr}function Hf(qt,I){return I.colorRampTexture||(I.colorRampTexture=new p(qt,I.colorRamp,qt.gl.RGBA)),I.colorRampTexture}function lh(qt,I,ht,Et,It){if(!ht||!Et||!Et.imageAtlas)return;let Vt=Et.imageAtlas.patternPositions,ke=Vt[ht.to.toString()],Oe=Vt[ht.from.toString()];if(!ke&&Oe&&(ke=Oe),!Oe&&ke&&(Oe=ke),!ke||!Oe){let Ke=It.getPaintProperty(I);ke=Vt[Ke],Oe=Vt[Ke]}ke&&Oe&&qt.setConstantPatternPositions(ke,Oe)}function Gf(qt,I,ht,Et,It,Vt,ke){let Oe=qt.context.gl,Ke="fill-pattern",gr=ht.paint.get(Ke),Or=gr&&gr.constantOr(1),Dr=ht.getCrossfadeParameters(),ln,Sn,Xt,ae,xe;ke?(Sn=Or&&!ht.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",ln=Oe.LINES):(Sn=Or?"fillPattern":"fill",ln=Oe.TRIANGLES);let Ae=gr.constantOr(null);for(let je of Et){let Ie=I.getTile(je);if(Or&&!Ie.patternsLoaded())continue;let Ze=Ie.getBucket(ht);if(!Ze)continue;let wr=Ze.programConfigurations.get(ht.id),Ir=qt.useProgram(Sn,wr),Nr=qt.style.map.terrain&&qt.style.map.terrain.getTerrainData(je);Or&&(qt.context.activeTexture.set(Oe.TEXTURE0),Ie.imageAtlasTexture.bind(Oe.LINEAR,Oe.CLAMP_TO_EDGE),wr.updatePaintBuffers(Dr)),lh(wr,Ke,Ae,Ie,ht);let tn=Nr?je:null,mn=qt.translatePosMatrix(tn?tn.posMatrix:je.posMatrix,Ie,ht.paint.get("fill-translate"),ht.paint.get("fill-translate-anchor"));if(ke){ae=Ze.indexBuffer2,xe=Ze.segments2;let zn=[Oe.drawingBufferWidth,Oe.drawingBufferHeight];Xt=Sn==="fillOutlinePattern"&&Or?Ja(mn,qt,Dr,Ie,zn):Ri(mn,zn)}else ae=Ze.indexBuffer,xe=Ze.segments,Xt=Or?Ca(mn,qt,Dr,Ie):Zn(mn);Ir.draw(qt.context,ln,It,qt.stencilModeForClipping(je),Vt,Jo.disabled,Xt,Nr,ht.id,Ze.layoutVertexBuffer,ae,xe,ht.paint,qt.transform.zoom,wr)}}function Sh(qt,I,ht,Et,It,Vt,ke){let Oe=qt.context,Ke=Oe.gl,gr="fill-extrusion-pattern",Or=ht.paint.get(gr),Dr=Or.constantOr(1),ln=ht.getCrossfadeParameters(),Sn=ht.paint.get("fill-extrusion-opacity"),Xt=Or.constantOr(null);for(let ae of Et){let xe=I.getTile(ae),Ae=xe.getBucket(ht);if(!Ae)continue;let je=qt.style.map.terrain&&qt.style.map.terrain.getTerrainData(ae),Ie=Ae.programConfigurations.get(ht.id),Ze=qt.useProgram(Dr?"fillExtrusionPattern":"fillExtrusion",Ie);Dr&&(qt.context.activeTexture.set(Ke.TEXTURE0),xe.imageAtlasTexture.bind(Ke.LINEAR,Ke.CLAMP_TO_EDGE),Ie.updatePaintBuffers(ln)),lh(Ie,gr,Xt,xe,ht);let wr=qt.translatePosMatrix(ae.posMatrix,xe,ht.paint.get("fill-extrusion-translate"),ht.paint.get("fill-extrusion-translate-anchor")),Ir=ht.paint.get("fill-extrusion-vertical-gradient"),Nr=Dr?En(wr,qt,Ir,Sn,ae,ln,xe):Pn(wr,qt,Ir,Sn);Ze.draw(Oe,Oe.gl.TRIANGLES,It,Vt,ke,Jo.backCCW,Nr,je,ht.id,Ae.layoutVertexBuffer,Ae.indexBuffer,Ae.segments,ht.paint,qt.transform.zoom,Ie,qt.style.map.terrain&&Ae.centroidVertexBuffer)}}function mh(qt,I,ht,Et,It,Vt,ke){let Oe=qt.context,Ke=Oe.gl,gr=ht.fbo;if(!gr)return;let Or=qt.useProgram("hillshade"),Dr=qt.style.map.terrain&&qt.style.map.terrain.getTerrainData(I);Oe.activeTexture.set(Ke.TEXTURE0),Ke.bindTexture(Ke.TEXTURE_2D,gr.colorAttachment.get()),Or.draw(Oe,Ke.TRIANGLES,It,Vt,ke,Jo.disabled,((ln,Sn,Xt,ae)=>{let xe=Xt.paint.get("hillshade-shadow-color"),Ae=Xt.paint.get("hillshade-highlight-color"),je=Xt.paint.get("hillshade-accent-color"),Ie=Xt.paint.get("hillshade-illumination-direction")*(Math.PI/180);Xt.paint.get("hillshade-illumination-anchor")==="viewport"&&(Ie-=ln.transform.angle);let Ze=!ln.options.moving;return{u_matrix:ae?ae.posMatrix:ln.transform.calculatePosMatrix(Sn.tileID.toUnwrapped(),Ze),u_image:0,u_latrange:is(0,Sn.tileID),u_light:[Xt.paint.get("hillshade-exaggeration"),Ie],u_shadow:xe,u_highlight:Ae,u_accent:je}})(qt,ht,Et,Dr?I:null),Dr,Et.id,qt.rasterBoundsBuffer,qt.quadTriangleIndexBuffer,qt.rasterBoundsSegments)}function uc(qt,I,ht,Et,It,Vt){let ke=qt.context,Oe=ke.gl,Ke=I.dem;if(Ke&&Ke.data){let gr=Ke.dim,Or=Ke.stride,Dr=Ke.getPixels();if(ke.activeTexture.set(Oe.TEXTURE1),ke.pixelStoreUnpackPremultiplyAlpha.set(!1),I.demTexture=I.demTexture||qt.getTileTexture(Or),I.demTexture){let Sn=I.demTexture;Sn.update(Dr,{premultiply:!1}),Sn.bind(Oe.NEAREST,Oe.CLAMP_TO_EDGE)}else I.demTexture=new p(ke,Dr,Oe.RGBA,{premultiply:!1}),I.demTexture.bind(Oe.NEAREST,Oe.CLAMP_TO_EDGE);ke.activeTexture.set(Oe.TEXTURE0);let ln=I.fbo;if(!ln){let Sn=new p(ke,{width:gr,height:gr,data:null},Oe.RGBA);Sn.bind(Oe.LINEAR,Oe.CLAMP_TO_EDGE),ln=I.fbo=ke.createFramebuffer(gr,gr,!0,!1),ln.colorAttachment.set(Sn.texture)}ke.bindFramebuffer.set(ln.framebuffer),ke.viewport.set([0,0,gr,gr]),qt.useProgram("hillshadePrepare").draw(ke,Oe.TRIANGLES,Et,It,Vt,Jo.disabled,((Sn,Xt)=>{let ae=Xt.stride,xe=e.H();return e.aP(xe,0,e.X,-e.X,0,0,1),e.J(xe,xe,[0,-e.X,0]),{u_matrix:xe,u_image:1,u_dimension:[ae,ae],u_zoom:Sn.overscaledZ,u_unpack:Xt.getUnpackVector()}})(I.tileID,Ke),null,ht.id,qt.rasterBoundsBuffer,qt.quadTriangleIndexBuffer,qt.rasterBoundsSegments),I.needsHillshadePrepare=!1}}function ef(qt,I,ht,Et,It,Vt){let ke=Et.paint.get("raster-fade-duration");if(!Vt&&ke>0){let Oe=o.now(),Ke=(Oe-qt.timeAdded)/ke,gr=I?(Oe-I.timeAdded)/ke:-1,Or=ht.getSource(),Dr=It.coveringZoomLevel({tileSize:Or.tileSize,roundZoom:Or.roundZoom}),ln=!I||Math.abs(I.tileID.overscaledZ-Dr)>Math.abs(qt.tileID.overscaledZ-Dr),Sn=ln&&qt.refreshedUponExpiration?1:e.ac(ln?Ke:1-gr,0,1);return qt.refreshedUponExpiration&&Ke>=1&&(qt.refreshedUponExpiration=!1),I?{opacity:1,mix:1-Sn}:{opacity:Sn,mix:0}}return{opacity:1,mix:0}}let Wf=new e.aM(1,0,0,1),Jl=new e.aM(0,1,0,1),Ef=new e.aM(0,0,1,1),Ld=new e.aM(1,0,1,1),Yf=new e.aM(0,1,1,1);function _f(qt,I,ht,Et){Nc(qt,0,I+ht/2,qt.transform.width,ht,Et)}function Kf(qt,I,ht,Et){Nc(qt,I-ht/2,0,ht,qt.transform.height,Et)}function Nc(qt,I,ht,Et,It,Vt){let ke=qt.context,Oe=ke.gl;Oe.enable(Oe.SCISSOR_TEST),Oe.scissor(I*qt.pixelRatio,ht*qt.pixelRatio,Et*qt.pixelRatio,It*qt.pixelRatio),ke.clear({color:Vt}),Oe.disable(Oe.SCISSOR_TEST)}function Xf(qt,I,ht){let Et=qt.context,It=Et.gl,Vt=ht.posMatrix,ke=qt.useProgram("debug"),Oe=Qs.disabled,Ke=Ll.disabled,gr=qt.colorModeForRenderPass(),Or="$debug",Dr=qt.style.map.terrain&&qt.style.map.terrain.getTerrainData(ht);Et.activeTexture.set(It.TEXTURE0);let ln=I.getTileByID(ht.key).latestRawTileData,Sn=Math.floor((ln&&ln.byteLength||0)/1024),Xt=I.getTile(ht).tileSize,ae=512/Math.min(Xt,512)*(ht.overscaledZ/qt.transform.zoom)*.5,xe=ht.canonical.toString();ht.overscaledZ!==ht.canonical.z&&(xe+=` => ${ht.overscaledZ}`),function(Ae,je){Ae.initDebugOverlayCanvas();let Ie=Ae.debugOverlayCanvas,Ze=Ae.context.gl,wr=Ae.debugOverlayCanvas.getContext("2d");wr.clearRect(0,0,Ie.width,Ie.height),wr.shadowColor="white",wr.shadowBlur=2,wr.lineWidth=1.5,wr.strokeStyle="white",wr.textBaseline="top",wr.font="bold 36px Open Sans, sans-serif",wr.fillText(je,5,5),wr.strokeText(je,5,5),Ae.debugOverlayTexture.update(Ie),Ae.debugOverlayTexture.bind(Ze.LINEAR,Ze.CLAMP_TO_EDGE)}(qt,`${xe} ${Sn}kB`),ke.draw(Et,It.TRIANGLES,Oe,Ke,xu.alphaBlended,Jo.disabled,po(Vt,e.aM.transparent,ae),null,Or,qt.debugBuffer,qt.quadTriangleIndexBuffer,qt.debugSegments),ke.draw(Et,It.LINE_STRIP,Oe,Ke,gr,Jo.disabled,po(Vt,e.aM.red),Dr,Or,qt.debugBuffer,qt.tileBorderIndexBuffer,qt.debugSegments)}function zu(qt,I,ht){let Et=qt.context,It=Et.gl,Vt=qt.colorModeForRenderPass(),ke=new Qs(It.LEQUAL,Qs.ReadWrite,qt.depthRangeFor3D),Oe=qt.useProgram("terrain"),Ke=I.getTerrainMesh();Et.bindFramebuffer.set(null),Et.viewport.set([0,0,qt.width,qt.height]);for(let gr of ht){let Or=qt.renderToTexture.getTexture(gr),Dr=I.getTerrainData(gr.tileID);Et.activeTexture.set(It.TEXTURE0),It.bindTexture(It.TEXTURE_2D,Or.texture);let ln=qt.transform.calculatePosMatrix(gr.tileID.toUnwrapped()),Sn=I.getMeshFrameDelta(qt.transform.zoom),Xt=qt.transform.calculateFogMatrix(gr.tileID.toUnwrapped()),ae=Vr(ln,Sn,Xt,qt.style.sky,qt.transform.pitch);Oe.draw(Et,It.TRIANGLES,ke,Ll.disabled,Vt,Jo.backCCW,ae,Dr,"terrain",Ke.vertexBuffer,Ke.indexBuffer,Ke.segments)}}class jc{constructor(I,ht,Et){this.vertexBuffer=I,this.indexBuffer=ht,this.segments=Et}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class Hh{constructor(I,ht){this.context=new Cd(I),this.transform=ht,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:e.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Ge.maxUnderzooming+Ge.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new qr}resize(I,ht,Et){if(this.width=Math.floor(I*Et),this.height=Math.floor(ht*Et),this.pixelRatio=Et,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let It of this.style._order)this.style._layers[It].resize()}setup(){let I=this.context,ht=new e.aX;ht.emplaceBack(0,0),ht.emplaceBack(e.X,0),ht.emplaceBack(0,e.X),ht.emplaceBack(e.X,e.X),this.tileExtentBuffer=I.createVertexBuffer(ht,dn.members),this.tileExtentSegments=e.a0.simpleSegment(0,0,4,2);let Et=new e.aX;Et.emplaceBack(0,0),Et.emplaceBack(e.X,0),Et.emplaceBack(0,e.X),Et.emplaceBack(e.X,e.X),this.debugBuffer=I.createVertexBuffer(Et,dn.members),this.debugSegments=e.a0.simpleSegment(0,0,4,5);let It=new e.$;It.emplaceBack(0,0,0,0),It.emplaceBack(e.X,0,e.X,0),It.emplaceBack(0,e.X,0,e.X),It.emplaceBack(e.X,e.X,e.X,e.X),this.rasterBoundsBuffer=I.createVertexBuffer(It,Jt.members),this.rasterBoundsSegments=e.a0.simpleSegment(0,0,4,2);let Vt=new e.aX;Vt.emplaceBack(0,0),Vt.emplaceBack(1,0),Vt.emplaceBack(0,1),Vt.emplaceBack(1,1),this.viewportBuffer=I.createVertexBuffer(Vt,dn.members),this.viewportSegments=e.a0.simpleSegment(0,0,4,2);let ke=new e.aZ;ke.emplaceBack(0),ke.emplaceBack(1),ke.emplaceBack(3),ke.emplaceBack(2),ke.emplaceBack(0),this.tileBorderIndexBuffer=I.createIndexBuffer(ke);let Oe=new e.aY;Oe.emplaceBack(0,1,2),Oe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=I.createIndexBuffer(Oe);let Ke=this.context.gl;this.stencilClearMode=new Ll({func:Ke.ALWAYS,mask:0},0,255,Ke.ZERO,Ke.ZERO,Ke.ZERO)}clearStencil(){let I=this.context,ht=I.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let Et=e.H();e.aP(Et,0,this.width,this.height,0,0,1),e.K(Et,Et,[ht.drawingBufferWidth,ht.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(I,ht.TRIANGLES,Qs.disabled,this.stencilClearMode,xu.disabled,Jo.disabled,Do(Et),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(I,ht){if(this.currentStencilSource===I.source||!I.isTileClipped()||!ht||!ht.length)return;this.currentStencilSource=I.source;let Et=this.context,It=Et.gl;this.nextStencilID+ht.length>256&&this.clearStencil(),Et.setColorMode(xu.disabled),Et.setDepthMode(Qs.disabled);let Vt=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let ke of ht){let Oe=this._tileClippingMaskIDs[ke.key]=this.nextStencilID++,Ke=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ke);Vt.draw(Et,It.TRIANGLES,Qs.disabled,new Ll({func:It.ALWAYS,mask:0},Oe,255,It.KEEP,It.KEEP,It.REPLACE),xu.disabled,Jo.disabled,Do(ke.posMatrix),Ke,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let I=this.nextStencilID++,ht=this.context.gl;return new Ll({func:ht.NOTEQUAL,mask:255},I,255,ht.KEEP,ht.KEEP,ht.REPLACE)}stencilModeForClipping(I){let ht=this.context.gl;return new Ll({func:ht.EQUAL,mask:255},this._tileClippingMaskIDs[I.key],0,ht.KEEP,ht.KEEP,ht.REPLACE)}stencilConfigForOverlap(I){let ht=this.context.gl,Et=I.sort((ke,Oe)=>Oe.overscaledZ-ke.overscaledZ),It=Et[Et.length-1].overscaledZ,Vt=Et[0].overscaledZ-It+1;if(Vt>1){this.currentStencilSource=void 0,this.nextStencilID+Vt>256&&this.clearStencil();let ke={};for(let Oe=0;Oe({u_sky_color:Ae.properties.get("sky-color"),u_horizon_color:Ae.properties.get("horizon-color"),u_horizon:(je.height/2+je.getHorizon())*Ie,u_sky_horizon_blend:Ae.properties.get("sky-horizon-blend")*je.height/2*Ie}))(gr,Ke.style.map.transform,Ke.pixelRatio),Sn=new Qs(Dr.LEQUAL,Qs.ReadWrite,[0,1]),Xt=Ll.disabled,ae=Ke.colorModeForRenderPass(),xe=Ke.useProgram("sky");if(!gr.mesh){let Ae=new e.aX;Ae.emplaceBack(-1,-1),Ae.emplaceBack(1,-1),Ae.emplaceBack(1,1),Ae.emplaceBack(-1,1);let je=new e.aY;je.emplaceBack(0,1,2),je.emplaceBack(0,2,3),gr.mesh=new jc(Or.createVertexBuffer(Ae,dn.members),Or.createIndexBuffer(je),e.a0.simpleSegment(0,0,Ae.length,je.length))}xe.draw(Or,Dr.TRIANGLES,Sn,Xt,ae,Jo.disabled,ln,void 0,"sky",gr.mesh.vertexBuffer,gr.mesh.indexBuffer,gr.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=ht.showOverdrawInspector,this.depthRangeFor3D=[0,1-(I._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Et.length-1;this.currentLayer>=0;this.currentLayer--){let Ke=this.style._layers[Et[this.currentLayer]],gr=It[Ke.source],Or=Vt[Ke.source];this._renderTileClippingMasks(Ke,Or),this.renderLayer(this,gr,Ke,Or)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerxe.source&&!xe.isHidden(Or)?[gr.sourceCaches[xe.source]]:[]),Sn=ln.filter(xe=>xe.getSource().type==="vector"),Xt=ln.filter(xe=>xe.getSource().type!=="vector"),ae=xe=>{(!Dr||Dr.getSource().maxzoomae(xe)),Dr||Xt.forEach(xe=>ae(xe)),Dr}(this.style,this.transform.zoom);Ke&&function(gr,Or,Dr){for(let ln=0;ln0),It&&(e.b0(ht,Et),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(Vt,ke){let Oe=Vt.context,Ke=Oe.gl,gr=xu.unblended,Or=new Qs(Ke.LEQUAL,Qs.ReadWrite,[0,1]),Dr=ke.getTerrainMesh(),ln=ke.sourceCache.getRenderableTiles(),Sn=Vt.useProgram("terrainDepth");Oe.bindFramebuffer.set(ke.getFramebuffer("depth").framebuffer),Oe.viewport.set([0,0,Vt.width/devicePixelRatio,Vt.height/devicePixelRatio]),Oe.clear({color:e.aM.transparent,depth:1});for(let Xt of ln){let ae=ke.getTerrainData(Xt.tileID),xe={u_matrix:Vt.transform.calculatePosMatrix(Xt.tileID.toUnwrapped()),u_ele_delta:ke.getMeshFrameDelta(Vt.transform.zoom)};Sn.draw(Oe,Ke.TRIANGLES,Or,Ll.disabled,gr,Jo.backCCW,xe,ae,"terrain",Dr.vertexBuffer,Dr.indexBuffer,Dr.segments)}Oe.bindFramebuffer.set(null),Oe.viewport.set([0,0,Vt.width,Vt.height])}(this,this.style.map.terrain),function(Vt,ke){let Oe=Vt.context,Ke=Oe.gl,gr=xu.unblended,Or=new Qs(Ke.LEQUAL,Qs.ReadWrite,[0,1]),Dr=ke.getTerrainMesh(),ln=ke.getCoordsTexture(),Sn=ke.sourceCache.getRenderableTiles(),Xt=Vt.useProgram("terrainCoords");Oe.bindFramebuffer.set(ke.getFramebuffer("coords").framebuffer),Oe.viewport.set([0,0,Vt.width/devicePixelRatio,Vt.height/devicePixelRatio]),Oe.clear({color:e.aM.transparent,depth:1}),ke.coordsIndex=[];for(let ae of Sn){let xe=ke.getTerrainData(ae.tileID);Oe.activeTexture.set(Ke.TEXTURE0),Ke.bindTexture(Ke.TEXTURE_2D,ln.texture);let Ae={u_matrix:Vt.transform.calculatePosMatrix(ae.tileID.toUnwrapped()),u_terrain_coords_id:(255-ke.coordsIndex.length)/255,u_texture:0,u_ele_delta:ke.getMeshFrameDelta(Vt.transform.zoom)};Xt.draw(Oe,Ke.TRIANGLES,Or,Ll.disabled,gr,Jo.backCCW,Ae,xe,"terrain",Dr.vertexBuffer,Dr.indexBuffer,Dr.segments),ke.coordsIndex.push(ae.tileID.key)}Oe.bindFramebuffer.set(null),Oe.viewport.set([0,0,Vt.width,Vt.height])}(this,this.style.map.terrain))}renderLayer(I,ht,Et,It){if(!Et.isHidden(this.transform.zoom)&&(Et.type==="background"||Et.type==="custom"||(It||[]).length))switch(this.id=Et.id,Et.type){case"symbol":(function(Vt,ke,Oe,Ke,gr){if(Vt.renderPass!=="translucent")return;let Or=Ll.disabled,Dr=Vt.colorModeForRenderPass();(Oe._unevaluatedLayout.hasValue("text-variable-anchor")||Oe._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(ln,Sn,Xt,ae,xe,Ae,je,Ie,Ze){let wr=Sn.transform,Ir=Zi(),Nr=xe==="map",tn=Ae==="map";for(let mn of ln){let zn=ae.getTile(mn),Bn=zn.getBucket(Xt);if(!Bn||!Bn.text||!Bn.text.segments.get().length)continue;let ri=e.ag(Bn.textSizeData,wr.zoom),Fi=Hn(zn,1,Sn.transform.zoom),da=Kr(mn.posMatrix,tn,Nr,Sn.transform,Fi),ha=Xt.layout.get("icon-text-fit")!=="none"&&Bn.hasIconData();if(ri){let ka=Math.pow(2,wr.zoom-zn.tileID.overscaledZ),io=Sn.style.map.terrain?(Mo,hs)=>Sn.style.map.terrain.getElevation(mn,Mo,hs):null,Ro=Ir.translatePosition(wr,zn,je,Ie);yf(Bn,Nr,tn,Ze,wr,da,mn.posMatrix,ka,ri,ha,Ir,Ro,mn.toUnwrapped(),io)}}}(Ke,Vt,Oe,ke,Oe.layout.get("text-rotation-alignment"),Oe.layout.get("text-pitch-alignment"),Oe.paint.get("text-translate"),Oe.paint.get("text-translate-anchor"),gr),Oe.paint.get("icon-opacity").constantOr(1)!==0&&hd(Vt,ke,Oe,Ke,!1,Oe.paint.get("icon-translate"),Oe.paint.get("icon-translate-anchor"),Oe.layout.get("icon-rotation-alignment"),Oe.layout.get("icon-pitch-alignment"),Oe.layout.get("icon-keep-upright"),Or,Dr),Oe.paint.get("text-opacity").constantOr(1)!==0&&hd(Vt,ke,Oe,Ke,!0,Oe.paint.get("text-translate"),Oe.paint.get("text-translate-anchor"),Oe.layout.get("text-rotation-alignment"),Oe.layout.get("text-pitch-alignment"),Oe.layout.get("text-keep-upright"),Or,Dr),ke.map.showCollisionBoxes&&(sh(Vt,ke,Oe,Ke,!0),sh(Vt,ke,Oe,Ke,!1))})(I,ht,Et,It,this.style.placement.variableOffsets);break;case"circle":(function(Vt,ke,Oe,Ke){if(Vt.renderPass!=="translucent")return;let gr=Oe.paint.get("circle-opacity"),Or=Oe.paint.get("circle-stroke-width"),Dr=Oe.paint.get("circle-stroke-opacity"),ln=!Oe.layout.get("circle-sort-key").isConstant();if(gr.constantOr(1)===0&&(Or.constantOr(1)===0||Dr.constantOr(1)===0))return;let Sn=Vt.context,Xt=Sn.gl,ae=Vt.depthModeForSublayer(0,Qs.ReadOnly),xe=Ll.disabled,Ae=Vt.colorModeForRenderPass(),je=[];for(let Ie=0;IeIe.sortKey-Ze.sortKey);for(let Ie of je){let{programConfiguration:Ze,program:wr,layoutVertexBuffer:Ir,indexBuffer:Nr,uniformValues:tn,terrainData:mn}=Ie.state;wr.draw(Sn,Xt.TRIANGLES,ae,xe,Ae,Jo.disabled,tn,mn,Oe.id,Ir,Nr,Ie.segments,Oe.paint,Vt.transform.zoom,Ze)}})(I,ht,Et,It);break;case"heatmap":(function(Vt,ke,Oe,Ke){if(Oe.paint.get("heatmap-opacity")===0)return;let gr=Vt.context;if(Vt.style.map.terrain){for(let Or of Ke){let Dr=ke.getTile(Or);ke.hasRenderableParent(Or)||(Vt.renderPass==="offscreen"?xf(Vt,Dr,Oe,Or):Vt.renderPass==="translucent"&&Vh(Vt,Oe,Or))}gr.viewport.set([0,0,Vt.width,Vt.height])}else Vt.renderPass==="offscreen"?function(Or,Dr,ln,Sn){let Xt=Or.context,ae=Xt.gl,xe=Ll.disabled,Ae=new xu([ae.ONE,ae.ONE],e.aM.transparent,[!0,!0,!0,!0]);(function(je,Ie,Ze){let wr=je.gl;je.activeTexture.set(wr.TEXTURE1),je.viewport.set([0,0,Ie.width/4,Ie.height/4]);let Ir=Ze.heatmapFbos.get(e.aU);Ir?(wr.bindTexture(wr.TEXTURE_2D,Ir.colorAttachment.get()),je.bindFramebuffer.set(Ir.framebuffer)):(Ir=Vf(je,Ie.width/4,Ie.height/4),Ze.heatmapFbos.set(e.aU,Ir))})(Xt,Or,ln),Xt.clear({color:e.aM.transparent});for(let je=0;je20&&Or.texParameterf(Or.TEXTURE_2D,gr.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,gr.extTextureFilterAnisotropicMax);let Bn=Vt.style.map.terrain&&Vt.style.map.terrain.getTerrainData(je),ri=Bn?je:null,Fi=ri?ri.posMatrix:Vt.transform.calculatePosMatrix(je.toUnwrapped(),Ae),da=Rl(Fi,mn||[0,0],tn||1,Nr,Oe);Dr instanceof ge?ln.draw(gr,Or.TRIANGLES,Ie,Ll.disabled,Sn,Jo.disabled,da,Bn,Oe.id,Dr.boundsBuffer,Vt.quadTriangleIndexBuffer,Dr.boundsSegments):ln.draw(gr,Or.TRIANGLES,Ie,Xt[je.overscaledZ],Sn,Jo.disabled,da,Bn,Oe.id,Vt.rasterBoundsBuffer,Vt.quadTriangleIndexBuffer,Vt.rasterBoundsSegments)}})(I,ht,Et,It);break;case"background":(function(Vt,ke,Oe,Ke){let gr=Oe.paint.get("background-color"),Or=Oe.paint.get("background-opacity");if(Or===0)return;let Dr=Vt.context,ln=Dr.gl,Sn=Vt.transform,Xt=Sn.tileSize,ae=Oe.paint.get("background-pattern");if(Vt.isPatternMissing(ae))return;let xe=!ae&&gr.a===1&&Or===1&&Vt.opaquePassEnabledForLayer()?"opaque":"translucent";if(Vt.renderPass!==xe)return;let Ae=Ll.disabled,je=Vt.depthModeForSublayer(0,xe==="opaque"?Qs.ReadWrite:Qs.ReadOnly),Ie=Vt.colorModeForRenderPass(),Ze=Vt.useProgram(ae?"backgroundPattern":"background"),wr=Ke||Sn.coveringTiles({tileSize:Xt,terrain:Vt.style.map.terrain});ae&&(Dr.activeTexture.set(ln.TEXTURE0),Vt.imageManager.bind(Vt.context));let Ir=Oe.getCrossfadeParameters();for(let Nr of wr){let tn=Ke?Nr.posMatrix:Vt.transform.calculatePosMatrix(Nr.toUnwrapped()),mn=ae?Vl(tn,Or,Vt,ae,{tileID:Nr,tileSize:Xt},Ir):kl(tn,Or,gr),zn=Vt.style.map.terrain&&Vt.style.map.terrain.getTerrainData(Nr);Ze.draw(Dr,ln.TRIANGLES,je,Ae,Ie,Jo.disabled,mn,zn,Oe.id,Vt.tileExtentBuffer,Vt.quadTriangleIndexBuffer,Vt.tileExtentSegments)}})(I,0,Et,It);break;case"custom":(function(Vt,ke,Oe){let Ke=Vt.context,gr=Oe.implementation;if(Vt.renderPass==="offscreen"){let Or=gr.prerender;Or&&(Vt.setCustomLayerDefaults(),Ke.setColorMode(Vt.colorModeForRenderPass()),Or.call(gr,Ke.gl,Vt.transform.customLayerMatrix()),Ke.setDirty(),Vt.setBaseState())}else if(Vt.renderPass==="translucent"){Vt.setCustomLayerDefaults(),Ke.setColorMode(Vt.colorModeForRenderPass()),Ke.setStencilMode(Ll.disabled);let Or=gr.renderingMode==="3d"?new Qs(Vt.context.gl.LEQUAL,Qs.ReadWrite,Vt.depthRangeFor3D):Vt.depthModeForSublayer(0,Qs.ReadOnly);Ke.setDepthMode(Or),gr.render(Ke.gl,Vt.transform.customLayerMatrix(),{farZ:Vt.transform.farZ,nearZ:Vt.transform.nearZ,fov:Vt.transform._fov,modelViewProjectionMatrix:Vt.transform.modelViewProjectionMatrix,projectionMatrix:Vt.transform.projectionMatrix}),Ke.setDirty(),Vt.setBaseState(),Ke.bindFramebuffer.set(null)}})(I,0,Et)}}translatePosMatrix(I,ht,Et,It,Vt){if(!Et[0]&&!Et[1])return I;let ke=Vt?It==="map"?this.transform.angle:0:It==="viewport"?-this.transform.angle:0;if(ke){let gr=Math.sin(ke),Or=Math.cos(ke);Et=[Et[0]*Or-Et[1]*gr,Et[0]*gr+Et[1]*Or]}let Oe=[Vt?Et[0]:Hn(ht,Et[0],this.transform.zoom),Vt?Et[1]:Hn(ht,Et[1],this.transform.zoom),0],Ke=new Float32Array(16);return e.J(Ke,I,Oe),Ke}saveTileTexture(I){let ht=this._tileTextures[I.size[0]];ht?ht.push(I):this._tileTextures[I.size[0]]=[I]}getTileTexture(I){let ht=this._tileTextures[I];return ht&&ht.length>0?ht.pop():null}isPatternMissing(I){if(!I)return!1;if(!I.from||!I.to)return!0;let ht=this.imageManager.getPattern(I.from.toString()),Et=this.imageManager.getPattern(I.to.toString());return!ht||!Et}useProgram(I,ht){this.cache=this.cache||{};let Et=I+(ht?ht.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[Et]||(this.cache[Et]=new Fn(this.context,an[I],ht,Yl[I],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Et]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let I=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(I.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new p(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:I,drawingBufferHeight:ht}=this.context.gl;return this.width!==I||this.height!==ht}}class lu{constructor(I,ht){this.points=I,this.planes=ht}static fromInvProjectionMatrix(I,ht,Et){let It=Math.pow(2,Et),Vt=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Oe=>{let Ke=1/(Oe=e.af([],Oe,I))[3]/ht*It;return e.b1(Oe,Oe,[Ke,Ke,1/Oe[3],Ke])}),ke=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(Oe=>{let Ke=function(ln,Sn){var Xt=Sn[0],ae=Sn[1],xe=Sn[2],Ae=Xt*Xt+ae*ae+xe*xe;return Ae>0&&(Ae=1/Math.sqrt(Ae)),ln[0]=Sn[0]*Ae,ln[1]=Sn[1]*Ae,ln[2]=Sn[2]*Ae,ln}([],function(ln,Sn,Xt){var ae=Sn[0],xe=Sn[1],Ae=Sn[2],je=Xt[0],Ie=Xt[1],Ze=Xt[2];return ln[0]=xe*Ze-Ae*Ie,ln[1]=Ae*je-ae*Ze,ln[2]=ae*Ie-xe*je,ln}([],M([],Vt[Oe[0]],Vt[Oe[1]]),M([],Vt[Oe[2]],Vt[Oe[1]]))),gr=-((Or=Ke)[0]*(Dr=Vt[Oe[1]])[0]+Or[1]*Dr[1]+Or[2]*Dr[2]);var Or,Dr;return Ke.concat(gr)});return new lu(Vt,ke)}}class Eh{constructor(I,ht){this.min=I,this.max=ht,this.center=function(Et,It,Vt){return Et[0]=.5*It[0],Et[1]=.5*It[1],Et[2]=.5*It[2],Et}([],function(Et,It,Vt){return Et[0]=It[0]+Vt[0],Et[1]=It[1]+Vt[1],Et[2]=It[2]+Vt[2],Et}([],this.min,this.max))}quadrant(I){let ht=[I%2==0,I<2],Et=_(this.min),It=_(this.max);for(let Vt=0;Vt=0&&ke++;if(ke===0)return 0;ke!==ht.length&&(Et=!1)}if(Et)return 2;for(let It=0;It<3;It++){let Vt=Number.MAX_VALUE,ke=-Number.MAX_VALUE;for(let Oe=0;Oethis.max[It]-this.min[It])return 0}return 1}}class Sc{constructor(I=0,ht=0,Et=0,It=0){if(isNaN(I)||I<0||isNaN(ht)||ht<0||isNaN(Et)||Et<0||isNaN(It)||It<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=I,this.bottom=ht,this.left=Et,this.right=It}interpolate(I,ht,Et){return ht.top!=null&&I.top!=null&&(this.top=e.y.number(I.top,ht.top,Et)),ht.bottom!=null&&I.bottom!=null&&(this.bottom=e.y.number(I.bottom,ht.bottom,Et)),ht.left!=null&&I.left!=null&&(this.left=e.y.number(I.left,ht.left,Et)),ht.right!=null&&I.right!=null&&(this.right=e.y.number(I.right,ht.right,Et)),this}getCenter(I,ht){let Et=e.ac((this.left+I-this.right)/2,0,I),It=e.ac((this.top+ht-this.bottom)/2,0,ht);return new e.P(Et,It)}equals(I){return this.top===I.top&&this.bottom===I.bottom&&this.left===I.left&&this.right===I.right}clone(){return new Sc(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let Uc=85.051129;class _u{constructor(I,ht,Et,It,Vt){this.tileSize=512,this._renderWorldCopies=Vt===void 0||!!Vt,this._minZoom=I||0,this._maxZoom=ht||22,this._minPitch=Et??0,this._maxPitch=It??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Sc,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let I=new _u(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return I.apply(this),I}apply(I){this.tileSize=I.tileSize,this.latRange=I.latRange,this.lngRange=I.lngRange,this.width=I.width,this.height=I.height,this._center=I._center,this._elevation=I._elevation,this.minElevationForCurrentTile=I.minElevationForCurrentTile,this.zoom=I.zoom,this.angle=I.angle,this._fov=I._fov,this._pitch=I._pitch,this._unmodified=I._unmodified,this._edgeInsets=I._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(I){this._minZoom!==I&&(this._minZoom=I,this.zoom=Math.max(this.zoom,I))}get maxZoom(){return this._maxZoom}set maxZoom(I){this._maxZoom!==I&&(this._maxZoom=I,this.zoom=Math.min(this.zoom,I))}get minPitch(){return this._minPitch}set minPitch(I){this._minPitch!==I&&(this._minPitch=I,this.pitch=Math.max(this.pitch,I))}get maxPitch(){return this._maxPitch}set maxPitch(I){this._maxPitch!==I&&(this._maxPitch=I,this.pitch=Math.min(this.pitch,I))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(I){I===void 0?I=!0:I===null&&(I=!1),this._renderWorldCopies=I}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(I){let ht=-e.b3(I,-180,180)*Math.PI/180;this.angle!==ht&&(this._unmodified=!1,this.angle=ht,this._calcMatrices(),this.rotationMatrix=function(){var Et=new e.A(4);return e.A!=Float32Array&&(Et[1]=0,Et[2]=0),Et[0]=1,Et[3]=1,Et}(),function(Et,It,Vt){var ke=It[0],Oe=It[1],Ke=It[2],gr=It[3],Or=Math.sin(Vt),Dr=Math.cos(Vt);Et[0]=ke*Dr+Ke*Or,Et[1]=Oe*Dr+gr*Or,Et[2]=ke*-Or+Ke*Dr,Et[3]=Oe*-Or+gr*Dr}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(I){let ht=e.ac(I,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ht&&(this._unmodified=!1,this._pitch=ht,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(I){I=Math.max(.01,Math.min(60,I)),this._fov!==I&&(this._unmodified=!1,this._fov=I/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(I){let ht=Math.min(Math.max(I,this.minZoom),this.maxZoom);this._zoom!==ht&&(this._unmodified=!1,this._zoom=ht,this.tileZoom=Math.max(0,Math.floor(ht)),this.scale=this.zoomScale(ht),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(I){I.lat===this._center.lat&&I.lng===this._center.lng||(this._unmodified=!1,this._center=I,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(I){I!==this._elevation&&(this._elevation=I,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(I){this._edgeInsets.equals(I)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,I,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(I){return this._edgeInsets.equals(I)}interpolatePadding(I,ht,Et){this._unmodified=!1,this._edgeInsets.interpolate(I,ht,Et),this._constrain(),this._calcMatrices()}coveringZoomLevel(I){let ht=(I.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/I.tileSize));return Math.max(0,ht)}getVisibleUnwrappedCoordinates(I){let ht=[new e.b4(0,I)];if(this._renderWorldCopies){let Et=this.pointCoordinate(new e.P(0,0)),It=this.pointCoordinate(new e.P(this.width,0)),Vt=this.pointCoordinate(new e.P(this.width,this.height)),ke=this.pointCoordinate(new e.P(0,this.height)),Oe=Math.floor(Math.min(Et.x,It.x,Vt.x,ke.x)),Ke=Math.floor(Math.max(Et.x,It.x,Vt.x,ke.x)),gr=1;for(let Or=Oe-gr;Or<=Ke+gr;Or++)Or!==0&&ht.push(new e.b4(Or,I))}return ht}coveringTiles(I){var ht,Et;let It=this.coveringZoomLevel(I),Vt=It;if(I.minzoom!==void 0&&ItI.maxzoom&&(It=I.maxzoom);let ke=this.pointCoordinate(this.getCameraPoint()),Oe=e.Z.fromLngLat(this.center),Ke=Math.pow(2,It),gr=[Ke*ke.x,Ke*ke.y,0],Or=[Ke*Oe.x,Ke*Oe.y,0],Dr=lu.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,It),ln=I.minzoom||0;!I.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(ln=It);let Sn=I.terrain?2/Math.min(this.tileSize,I.tileSize)*this.tileSize:3,Xt=Ie=>({aabb:new Eh([Ie*Ke,0,0],[(Ie+1)*Ke,Ke,0]),zoom:0,x:0,y:0,wrap:Ie,fullyVisible:!1}),ae=[],xe=[],Ae=It,je=I.reparseOverscaled?Vt:It;if(this._renderWorldCopies)for(let Ie=1;Ie<=3;Ie++)ae.push(Xt(-Ie)),ae.push(Xt(Ie));for(ae.push(Xt(0));ae.length>0;){let Ie=ae.pop(),Ze=Ie.x,wr=Ie.y,Ir=Ie.fullyVisible;if(!Ir){let Bn=Ie.aabb.intersects(Dr);if(Bn===0)continue;Ir=Bn===2}let Nr=I.terrain?gr:Or,tn=Ie.aabb.distanceX(Nr),mn=Ie.aabb.distanceY(Nr),zn=Math.max(Math.abs(tn),Math.abs(mn));if(Ie.zoom===Ae||zn>Sn+(1<=ln){let Bn=Ae-Ie.zoom,ri=gr[0]-.5-(Ze<>1),da=Ie.zoom+1,ha=Ie.aabb.quadrant(Bn);if(I.terrain){let ka=new e.S(da,Ie.wrap,da,ri,Fi),io=I.terrain.getMinMaxElevation(ka),Ro=(ht=io.minElevation)!==null&&ht!==void 0?ht:this.elevation,Mo=(Et=io.maxElevation)!==null&&Et!==void 0?Et:this.elevation;ha=new Eh([ha.min[0],ha.min[1],Ro],[ha.max[0],ha.max[1],Mo])}ae.push({aabb:ha,zoom:da,x:ri,y:Fi,wrap:Ie.wrap,fullyVisible:Ir})}}return xe.sort((Ie,Ze)=>Ie.distanceSq-Ze.distanceSq).map(Ie=>Ie.tileID)}resize(I,ht){this.width=I,this.height=ht,this.pixelsToGLUnits=[2/I,-2/ht],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(I){return Math.pow(2,I)}scaleZoom(I){return Math.log(I)/Math.LN2}project(I){let ht=e.ac(I.lat,-85.051129,Uc);return new e.P(e.O(I.lng)*this.worldSize,e.Q(ht)*this.worldSize)}unproject(I){return new e.Z(I.x/this.worldSize,I.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(I){let ht=this.elevation,Et=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,It=this.pointLocation(this.centerPoint,I),Vt=I.getElevationForLngLatZoom(It,this.tileZoom);if(!(this.elevation-Vt))return;let ke=Et+ht-Vt,Oe=Math.cos(this._pitch)*this.cameraToCenterDistance/ke/e.b5(1,It.lat),Ke=this.scaleZoom(Oe/this.tileSize);this._elevation=Vt,this._center=It,this.zoom=Ke}setLocationAtPoint(I,ht){let Et=this.pointCoordinate(ht),It=this.pointCoordinate(this.centerPoint),Vt=this.locationCoordinate(I),ke=new e.Z(Vt.x-(Et.x-It.x),Vt.y-(Et.y-It.y));this.center=this.coordinateLocation(ke),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(I,ht){return ht?this.coordinatePoint(this.locationCoordinate(I),ht.getElevationForLngLatZoom(I,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(I))}pointLocation(I,ht){return this.coordinateLocation(this.pointCoordinate(I,ht))}locationCoordinate(I){return e.Z.fromLngLat(I)}coordinateLocation(I){return I&&I.toLngLat()}pointCoordinate(I,ht){if(ht){let ln=ht.pointCoordinate(I);if(ln!=null)return ln}let Et=[I.x,I.y,0,1],It=[I.x,I.y,1,1];e.af(Et,Et,this.pixelMatrixInverse),e.af(It,It,this.pixelMatrixInverse);let Vt=Et[3],ke=It[3],Oe=Et[1]/Vt,Ke=It[1]/ke,gr=Et[2]/Vt,Or=It[2]/ke,Dr=gr===Or?0:(0-gr)/(Or-gr);return new e.Z(e.y.number(Et[0]/Vt,It[0]/ke,Dr)/this.worldSize,e.y.number(Oe,Ke,Dr)/this.worldSize)}coordinatePoint(I,ht=0,Et=this.pixelMatrix){let It=[I.x*this.worldSize,I.y*this.worldSize,ht,1];return e.af(It,It,Et),new e.P(It[0]/It[3],It[1]/It[3])}getBounds(){let I=Math.max(0,this.height/2-this.getHorizon());return new ut().extend(this.pointLocation(new e.P(0,I))).extend(this.pointLocation(new e.P(this.width,I))).extend(this.pointLocation(new e.P(this.width,this.height))).extend(this.pointLocation(new e.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ut([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(I){I?(this.lngRange=[I.getWest(),I.getEast()],this.latRange=[I.getSouth(),I.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Uc])}calculateTileMatrix(I){let ht=I.canonical,Et=this.worldSize/this.zoomScale(ht.z),It=ht.x+Math.pow(2,ht.z)*I.wrap,Vt=e.an(new Float64Array(16));return e.J(Vt,Vt,[It*Et,ht.y*Et,0]),e.K(Vt,Vt,[Et/e.X,Et/e.X,1]),Vt}calculatePosMatrix(I,ht=!1){let Et=I.key,It=ht?this._alignedPosMatrixCache:this._posMatrixCache;if(It[Et])return It[Et];let Vt=this.calculateTileMatrix(I);return e.L(Vt,ht?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,Vt),It[Et]=new Float32Array(Vt),It[Et]}calculateFogMatrix(I){let ht=I.key,Et=this._fogMatrixCache;if(Et[ht])return Et[ht];let It=this.calculateTileMatrix(I);return e.L(It,this.fogMatrix,It),Et[ht]=new Float32Array(It),Et[ht]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(I,ht){ht=e.ac(+ht,this.minZoom,this.maxZoom);let Et={center:new e.N(I.lng,I.lat),zoom:ht},It=this.lngRange;if(!this._renderWorldCopies&&It===null){let Ie=179.9999999999;It=[-Ie,Ie]}let Vt=this.tileSize*this.zoomScale(Et.zoom),ke=0,Oe=Vt,Ke=0,gr=Vt,Or=0,Dr=0,{x:ln,y:Sn}=this.size;if(this.latRange){let Ie=this.latRange;ke=e.Q(Ie[1])*Vt,Oe=e.Q(Ie[0])*Vt,Oe-keOe&&(Ae=Oe-Ie)}if(It){let Ie=(Ke+gr)/2,Ze=Xt;this._renderWorldCopies&&(Ze=e.b3(Xt,Ie-Vt/2,Ie+Vt/2));let wr=ln/2;Ze-wrgr&&(xe=gr-wr)}if(xe!==void 0||Ae!==void 0){let Ie=new e.P(xe??Xt,Ae??ae);Et.center=this.unproject.call({worldSize:Vt},Ie).wrap()}return Et}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let I=this._unmodified,{center:ht,zoom:Et}=this.getConstrained(this.center,this.zoom);this.center=ht,this.zoom=Et,this._unmodified=I,this._constraining=!1}_calcMatrices(){if(!this.height)return;let I=this.centerOffset,ht=this.point.x,Et=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=e.b5(1,this.center.lat)*this.worldSize;let It=e.an(new Float64Array(16));e.K(It,It,[this.width/2,-this.height/2,1]),e.J(It,It,[1,-1,0]),this.labelPlaneMatrix=It,It=e.an(new Float64Array(16)),e.K(It,It,[1,-1,1]),e.J(It,It,[-1,-1,0]),e.K(It,It,[2/this.width,2/this.height,1]),this.glCoordMatrix=It;let Vt=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),ke=Math.min(this.elevation,this.minElevationForCurrentTile),Oe=Vt-ke*this._pixelPerMeter/Math.cos(this._pitch),Ke=ke<0?Oe:Vt,gr=Math.PI/2+this._pitch,Or=this._fov*(.5+I.y/this.height),Dr=Math.sin(Or)*Ke/Math.sin(e.ac(Math.PI-gr-Or,.01,Math.PI-.01)),ln=this.getHorizon(),Sn=2*Math.atan(ln/this.cameraToCenterDistance)*(.5+I.y/(2*ln)),Xt=Math.sin(Sn)*Ke/Math.sin(e.ac(Math.PI-gr-Sn,.01,Math.PI-.01)),ae=Math.min(Dr,Xt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*ae+Ke),this.nearZ=this.height/50,It=new Float64Array(16),e.b6(It,this._fov,this.width/this.height,this.nearZ,this.farZ),It[8]=2*-I.x/this.width,It[9]=2*I.y/this.height,this.projectionMatrix=e.ae(It),e.K(It,It,[1,-1,1]),e.J(It,It,[0,0,-this.cameraToCenterDistance]),e.b7(It,It,this._pitch),e.ad(It,It,this.angle),e.J(It,It,[-ht,-Et,0]),this.mercatorMatrix=e.K([],It,[this.worldSize,this.worldSize,this.worldSize]),e.K(It,It,[1,1,this._pixelPerMeter]),this.pixelMatrix=e.L(new Float64Array(16),this.labelPlaneMatrix,It),e.J(It,It,[0,0,-this.elevation]),this.modelViewProjectionMatrix=It,this.invModelViewProjectionMatrix=e.as([],It),this.fogMatrix=new Float64Array(16),e.b6(this.fogMatrix,this._fov,this.width/this.height,Vt,this.farZ),this.fogMatrix[8]=2*-I.x/this.width,this.fogMatrix[9]=2*I.y/this.height,e.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),e.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),e.b7(this.fogMatrix,this.fogMatrix,this._pitch),e.ad(this.fogMatrix,this.fogMatrix,this.angle),e.J(this.fogMatrix,this.fogMatrix,[-ht,-Et,0]),e.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),e.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=e.L(new Float64Array(16),this.labelPlaneMatrix,It);let xe=this.width%2/2,Ae=this.height%2/2,je=Math.cos(this.angle),Ie=Math.sin(this.angle),Ze=ht-Math.round(ht)+je*xe+Ie*Ae,wr=Et-Math.round(Et)+je*Ae+Ie*xe,Ir=new Float64Array(It);if(e.J(Ir,Ir,[Ze>.5?Ze-1:Ze,wr>.5?wr-1:wr,0]),this.alignedModelViewProjectionMatrix=Ir,It=e.as(new Float64Array(16),this.pixelMatrix),!It)throw new Error("failed to invert matrix");this.pixelMatrixInverse=It,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let I=this.pointCoordinate(new e.P(0,0)),ht=[I.x*this.worldSize,I.y*this.worldSize,0,1];return e.af(ht,ht,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let I=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(0,I))}getCameraQueryGeometry(I){let ht=this.getCameraPoint();if(I.length===1)return[I[0],ht];{let Et=ht.x,It=ht.y,Vt=ht.x,ke=ht.y;for(let Oe of I)Et=Math.min(Et,Oe.x),It=Math.min(It,Oe.y),Vt=Math.max(Vt,Oe.x),ke=Math.max(ke,Oe.y);return[new e.P(Et,It),new e.P(Vt,It),new e.P(Vt,ke),new e.P(Et,ke),new e.P(Et,It)]}}lngLatToCameraDepth(I,ht){let Et=this.locationCoordinate(I),It=[Et.x*this.worldSize,Et.y*this.worldSize,ht,1];return e.af(It,It,this.modelViewProjectionMatrix),It[2]/It[3]}}function uf(qt,I){let ht,Et=!1,It=null,Vt=null,ke=()=>{It=null,Et&&(qt.apply(Vt,ht),It=setTimeout(ke,I),Et=!1)};return(...Oe)=>(Et=!0,Vt=this,ht=Oe,It||ke(),It)}class gh{constructor(I){this._getCurrentHash=()=>{let ht=window.location.hash.replace("#","");if(this._hashName){let Et;return ht.split("&").map(It=>It.split("=")).forEach(It=>{It[0]===this._hashName&&(Et=It)}),(Et&&Et[1]||"").split("/")}return ht.split("/")},this._onHashChange=()=>{let ht=this._getCurrentHash();if(ht.length>=3&&!ht.some(Et=>isNaN(Et))){let Et=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(ht[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+ht[2],+ht[1]],zoom:+ht[0],bearing:Et,pitch:+(ht[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let ht=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,ht)},this._removeHash=()=>{let ht=this._getCurrentHash();if(ht.length===0)return;let Et=ht.join("/"),It=Et;It.split("&").length>0&&(It=It.split("&")[0]),this._hashName&&(It=`${this._hashName}=${Et}`);let Vt=window.location.hash.replace(It,"");Vt.startsWith("#&")?Vt=Vt.slice(0,1)+Vt.slice(2):Vt==="#"&&(Vt="");let ke=window.location.href.replace(/(#.+)?$/,Vt);ke=ke.replace("&&","&"),window.history.replaceState(window.history.state,null,ke)},this._updateHash=uf(this._updateHashUnthrottled,300),this._hashName=I&&encodeURIComponent(I)}addTo(I){return this._map=I,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(I){let ht=this._map.getCenter(),Et=Math.round(100*this._map.getZoom())/100,It=Math.ceil((Et*Math.LN2+Math.log(512/360/.5))/Math.LN10),Vt=Math.pow(10,It),ke=Math.round(ht.lng*Vt)/Vt,Oe=Math.round(ht.lat*Vt)/Vt,Ke=this._map.getBearing(),gr=this._map.getPitch(),Or="";if(Or+=I?`/${ke}/${Oe}/${Et}`:`${Et}/${Oe}/${ke}`,(Ke||gr)&&(Or+="/"+Math.round(10*Ke)/10),gr&&(Or+=`/${Math.round(gr)}`),this._hashName){let Dr=this._hashName,ln=!1,Sn=window.location.hash.slice(1).split("&").map(Xt=>{let ae=Xt.split("=")[0];return ae===Dr?(ln=!0,`${ae}=${Or}`):Xt}).filter(Xt=>Xt);return ln||Sn.push(`${Dr}=${Or}`),`#${Sn.join("&")}`}return`#${Or}`}}let Wh={linearity:.3,easing:e.b8(0,0,.3,1)},Cf=e.e({deceleration:2500,maxSpeed:1400},Wh),Pd=e.e({deceleration:20,maxSpeed:1400},Wh),Qd=e.e({deceleration:1e3,maxSpeed:360},Wh),cf=e.e({deceleration:1e3,maxSpeed:90},Wh);class Lf{constructor(I){this._map=I,this.clear()}clear(){this._inertiaBuffer=[]}record(I){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:o.now(),settings:I})}_drainInertiaBuffer(){let I=this._inertiaBuffer,ht=o.now();for(;I.length>0&&ht-I[0].time>160;)I.shift()}_onMoveEnd(I){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let ht={zoom:0,bearing:0,pitch:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:Vt}of this._inertiaBuffer)ht.zoom+=Vt.zoomDelta||0,ht.bearing+=Vt.bearingDelta||0,ht.pitch+=Vt.pitchDelta||0,Vt.panDelta&&ht.pan._add(Vt.panDelta),Vt.around&&(ht.around=Vt.around),Vt.pinchAround&&(ht.pinchAround=Vt.pinchAround);let Et=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,It={};if(ht.pan.mag()){let Vt=hf(ht.pan.mag(),Et,e.e({},Cf,I||{}));It.offset=ht.pan.mult(Vt.amount/ht.pan.mag()),It.center=this._map.transform.center,wc(It,Vt)}if(ht.zoom){let Vt=hf(ht.zoom,Et,Pd);It.zoom=this._map.transform.zoom+Vt.amount,wc(It,Vt)}if(ht.bearing){let Vt=hf(ht.bearing,Et,Qd);It.bearing=this._map.transform.bearing+e.ac(Vt.amount,-179,179),wc(It,Vt)}if(ht.pitch){let Vt=hf(ht.pitch,Et,cf);It.pitch=this._map.transform.pitch+Vt.amount,wc(It,Vt)}if(It.zoom||It.bearing){let Vt=ht.pinchAround===void 0?ht.around:ht.pinchAround;It.around=Vt?this._map.unproject(Vt):this._map.getCenter()}return this.clear(),e.e(It,{noMoveStart:!0})}}function wc(qt,I){(!qt.duration||qt.durationht.unproject(Ke)),Oe=Vt.reduce((Ke,gr,Or,Dr)=>Ke.add(gr.div(Dr.length)),new e.P(0,0));super(I,{points:Vt,point:Oe,lngLats:ke,lngLat:ht.unproject(Oe),originalEvent:Et}),this._defaultPrevented=!1}}class Pf extends e.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(I,ht,Et){super(I,{originalEvent:Et}),this._defaultPrevented=!1}}class vh{constructor(I,ht){this._map=I,this._clickTolerance=ht.clickTolerance}reset(){delete this._mousedownPos}wheel(I){return this._firePreventable(new Pf(I.type,this._map,I))}mousedown(I,ht){return this._mousedownPos=ht,this._firePreventable(new Qc(I.type,this._map,I))}mouseup(I){this._map.fire(new Qc(I.type,this._map,I))}click(I,ht){this._mousedownPos&&this._mousedownPos.dist(ht)>=this._clickTolerance||this._map.fire(new Qc(I.type,this._map,I))}dblclick(I){return this._firePreventable(new Qc(I.type,this._map,I))}mouseover(I){this._map.fire(new Qc(I.type,this._map,I))}mouseout(I){this._map.fire(new Qc(I.type,this._map,I))}touchstart(I){return this._firePreventable(new ff(I.type,this._map,I))}touchmove(I){this._map.fire(new ff(I.type,this._map,I))}touchend(I){this._map.fire(new ff(I.type,this._map,I))}touchcancel(I){this._map.fire(new ff(I.type,this._map,I))}_firePreventable(I){if(this._map.fire(I),I.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class bu{constructor(I){this._map=I}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(I){this._map.fire(new Qc(I.type,this._map,I))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Qc("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(I){this._delayContextMenu?this._contextMenuEvent=I:this._ignoreContextMenu||this._map.fire(new Qc(I.type,this._map,I)),this._map.listens("contextmenu")&&I.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ch{constructor(I){this._map=I}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(I){return this.transform.pointLocation(e.P.convert(I),this._map.terrain)}}class Vc{constructor(I,ht){this._map=I,this._tr=new Ch(I),this._el=I.getCanvasContainer(),this._container=I.getContainer(),this._clickTolerance=ht.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(I,ht){this.isEnabled()&&I.shiftKey&&I.button===0&&(i.disableDrag(),this._startPos=this._lastPos=ht,this._active=!0)}mousemoveWindow(I,ht){if(!this._active)return;let Et=ht;if(this._lastPos.equals(Et)||!this._box&&Et.dist(this._startPos)Vt.fitScreenCoordinates(Et,It,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",I)}keydown(I){this._active&&I.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",I))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(i.remove(this._box),this._box=null),i.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(I,ht){return this._map.fire(new e.k(I,{originalEvent:ht}))}}function fd(qt,I){if(qt.length!==I.length)throw new Error(`The number of touches and points are not equal - touches ${qt.length}, points ${I.length}`);let ht={};for(let Et=0;Etthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=I.timeStamp),Et.length===this.numTouches&&(this.centroid=function(It){let Vt=new e.P(0,0);for(let ke of It)Vt._add(ke);return Vt.div(It.length)}(ht),this.touches=fd(Et,ht)))}touchmove(I,ht,Et){if(this.aborted||!this.centroid)return;let It=fd(Et,ht);for(let Vt in this.touches){let ke=It[Vt];(!ke||ke.dist(this.touches[Vt])>30)&&(this.aborted=!0)}}touchend(I,ht,Et){if((!this.centroid||I.timeStamp-this.startTime>500)&&(this.aborted=!0),Et.length===0){let It=!this.aborted&&this.centroid;if(this.reset(),It)return It}}}class bf{constructor(I){this.singleTap=new vu(I),this.numTaps=I.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(I,ht,Et){this.singleTap.touchstart(I,ht,Et)}touchmove(I,ht,Et){this.singleTap.touchmove(I,ht,Et)}touchend(I,ht,Et){let It=this.singleTap.touchend(I,ht,Et);if(It){let Vt=I.timeStamp-this.lastTime<500,ke=!this.lastTap||this.lastTap.dist(It)<30;if(Vt&&ke||this.reset(),this.count++,this.lastTime=I.timeStamp,this.lastTap=It,this.count===this.numTaps)return this.reset(),It}}}class qh{constructor(I){this._tr=new Ch(I),this._zoomIn=new bf({numTouches:1,numTaps:2}),this._zoomOut=new bf({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(I,ht,Et){this._zoomIn.touchstart(I,ht,Et),this._zoomOut.touchstart(I,ht,Et)}touchmove(I,ht,Et){this._zoomIn.touchmove(I,ht,Et),this._zoomOut.touchmove(I,ht,Et)}touchend(I,ht,Et){let It=this._zoomIn.touchend(I,ht,Et),Vt=this._zoomOut.touchend(I,ht,Et),ke=this._tr;return It?(this._active=!0,I.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Oe=>Oe.easeTo({duration:300,zoom:ke.zoom+1,around:ke.unproject(It)},{originalEvent:I})}):Vt?(this._active=!0,I.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Oe=>Oe.easeTo({duration:300,zoom:ke.zoom-1,around:ke.unproject(Vt)},{originalEvent:I})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class th{constructor(I){this._enabled=!!I.enable,this._moveStateManager=I.moveStateManager,this._clickTolerance=I.clickTolerance||1,this._moveFunction=I.move,this._activateOnStart=!!I.activateOnStart,I.assignEvents(this),this.reset()}reset(I){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(I)}_move(...I){let ht=this._moveFunction(...I);if(ht.bearingDelta||ht.pitchDelta||ht.around||ht.panDelta)return this._active=!0,ht}dragStart(I,ht){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(I)&&(this._moveStateManager.startMove(I),this._lastPoint=ht.length?ht[0]:ht,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(I,ht){if(!this.isEnabled())return;let Et=this._lastPoint;if(!Et)return;if(I.preventDefault(),!this._moveStateManager.isValidMoveEvent(I))return void this.reset(I);let It=ht.length?ht[0]:ht;return!this._moved&&It.dist(Et){qt.mousedown=qt.dragStart,qt.mousemoveWindow=qt.dragMove,qt.mouseup=qt.dragEnd,qt.contextmenu=I=>{I.preventDefault()}},gc=({enable:qt,clickTolerance:I,bearingDegreesPerPixelMoved:ht=.8})=>{let Et=new Zh({checkCorrectEvent:It=>i.mouseButton(It)===0&&It.ctrlKey||i.mouseButton(It)===2});return new th({clickTolerance:I,move:(It,Vt)=>({bearingDelta:(Vt.x-It.x)*ht}),moveStateManager:Et,enable:qt,assignEvents:zd})},Jf=({enable:qt,clickTolerance:I,pitchDegreesPerPixelMoved:ht=-.5})=>{let Et=new Zh({checkCorrectEvent:It=>i.mouseButton(It)===0&&It.ctrlKey||i.mouseButton(It)===2});return new th({clickTolerance:I,move:(It,Vt)=>({pitchDelta:(Vt.y-It.y)*ht}),moveStateManager:Et,enable:qt,assignEvents:zd})};class eh{constructor(I,ht){this._clickTolerance=I.clickTolerance||1,this._map=ht,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(I){return I<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(I,ht,Et){return this._calculateTransform(I,ht,Et)}touchmove(I,ht,Et){if(this._active){if(!this._shouldBePrevented(Et.length))return I.preventDefault(),this._calculateTransform(I,ht,Et);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",I)}}touchend(I,ht,Et){this._calculateTransform(I,ht,Et),this._active&&this._shouldBePrevented(Et.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(I,ht,Et){Et.length>0&&(this._active=!0);let It=fd(Et,ht),Vt=new e.P(0,0),ke=new e.P(0,0),Oe=0;for(let gr in It){let Or=It[gr],Dr=this._touches[gr];Dr&&(Vt._add(Or),ke._add(Or.sub(Dr)),Oe++,It[gr]=Or)}if(this._touches=It,this._shouldBePrevented(Oe)||!ke.mag())return;let Ke=ke.div(Oe);return this._sum._add(Ke),this._sum.mag()Math.abs(qt.x)}class qf extends Lh{constructor(I){super(),this._currentTouchCount=0,this._map=I}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(I,ht,Et){super.touchstart(I,ht,Et),this._currentTouchCount=Et.length}_start(I){this._lastPoints=I,_h(I[0].sub(I[1]))&&(this._valid=!1)}_move(I,ht,Et){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let It=I[0].sub(this._lastPoints[0]),Vt=I[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(It,Vt,Et.timeStamp),this._valid?(this._lastPoints=I,this._active=!0,{pitchDelta:(It.y+Vt.y)/2*-.5}):void 0}gestureBeginsVertically(I,ht,Et){if(this._valid!==void 0)return this._valid;let It=I.mag()>=2,Vt=ht.mag()>=2;if(!It&&!Vt)return;if(!It||!Vt)return this._firstMove===void 0&&(this._firstMove=Et),Et-this._firstMove<100&&void 0;let ke=I.y>0==ht.y>0;return _h(I)&&_h(ht)&&ke}}let mr={panStep:100,bearingStep:15,pitchStep:10};class Ur{constructor(I){this._tr=new Ch(I);let ht=mr;this._panStep=ht.panStep,this._bearingStep=ht.bearingStep,this._pitchStep=ht.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(I){if(I.altKey||I.ctrlKey||I.metaKey)return;let ht=0,Et=0,It=0,Vt=0,ke=0;switch(I.keyCode){case 61:case 107:case 171:case 187:ht=1;break;case 189:case 109:case 173:ht=-1;break;case 37:I.shiftKey?Et=-1:(I.preventDefault(),Vt=-1);break;case 39:I.shiftKey?Et=1:(I.preventDefault(),Vt=1);break;case 38:I.shiftKey?It=1:(I.preventDefault(),ke=-1);break;case 40:I.shiftKey?It=-1:(I.preventDefault(),ke=1);break;default:return}return this._rotationDisabled&&(Et=0,It=0),{cameraAnimation:Oe=>{let Ke=this._tr;Oe.easeTo({duration:300,easeId:"keyboardHandler",easing:_n,zoom:ht?Math.round(Ke.zoom)+ht*(I.shiftKey?2:1):Ke.zoom,bearing:Ke.bearing+Et*this._bearingStep,pitch:Ke.pitch+It*this._pitchStep,offset:[-Vt*this._panStep,-ke*this._panStep],center:Ke.center},{originalEvent:I})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function _n(qt){return qt*(2-qt)}let cn=4.000244140625;class Wn{constructor(I,ht){this._onTimeout=Et=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Et)},this._map=I,this._tr=new Ch(I),this._triggerRenderFrame=ht,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(I){this._defaultZoomRate=I}setWheelZoomRate(I){this._wheelZoomRate=I}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(I){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!I&&I.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(I){return!!this._map.cooperativeGestures.isEnabled()&&!(I.ctrlKey||this._map.cooperativeGestures.isBypassed(I))}wheel(I){if(!this.isEnabled())return;if(this._shouldBePrevented(I))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",I);let ht=I.deltaMode===WheelEvent.DOM_DELTA_LINE?40*I.deltaY:I.deltaY,Et=o.now(),It=Et-(this._lastWheelEventTime||0);this._lastWheelEventTime=Et,ht!==0&&ht%cn==0?this._type="wheel":ht!==0&&Math.abs(ht)<4?this._type="trackpad":It>400?(this._type=null,this._lastValue=ht,this._timeout=setTimeout(this._onTimeout,40,I)):this._type||(this._type=Math.abs(It*ht)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ht+=this._lastValue)),I.shiftKey&&ht&&(ht/=4),this._type&&(this._lastWheelEvent=I,this._delta-=ht,this._active||this._start(I)),I.preventDefault()}_start(I){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let ht=i.mousePos(this._map.getCanvas(),I),Et=this._tr;this._around=ht.y>Et.transform.height/2-Et.transform.getHorizon()?e.N.convert(this._aroundCenter?Et.center:Et.unproject(ht)):e.N.convert(Et.center),this._aroundPoint=Et.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let I=this._tr.transform;if(this._delta!==0){let Ke=this._type==="wheel"&&Math.abs(this._delta)>cn?this._wheelZoomRate:this._defaultZoomRate,gr=2/(1+Math.exp(-Math.abs(this._delta*Ke)));this._delta<0&&gr!==0&&(gr=1/gr);let Or=typeof this._targetZoom=="number"?I.zoomScale(this._targetZoom):I.scale;this._targetZoom=Math.min(I.maxZoom,Math.max(I.minZoom,I.scaleZoom(Or*gr))),this._type==="wheel"&&(this._startZoom=I.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let ht=typeof this._targetZoom=="number"?this._targetZoom:I.zoom,Et=this._startZoom,It=this._easing,Vt,ke=!1,Oe=o.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Et&&It&&Oe){let Ke=Math.min(Oe/200,1),gr=It(Ke);Vt=e.y.number(Et,ht,gr),Ke<1?this._frameId||(this._frameId=!0):ke=!0}else Vt=ht,ke=!0;return this._active=!0,ke&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ke,zoomDelta:Vt-I.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(I){let ht=e.b9;if(this._prevEase){let Et=this._prevEase,It=(o.now()-Et.start)/Et.duration,Vt=Et.easing(It+.01)-Et.easing(It),ke=.27/Math.sqrt(Vt*Vt+1e-4)*.01,Oe=Math.sqrt(.0729-ke*ke);ht=e.b8(ke,Oe,.25,1)}return this._prevEase={start:o.now(),duration:I,easing:ht},ht}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class hi{constructor(I,ht){this._clickZoom=I,this._tapZoom=ht}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class ea{constructor(I){this._tr=new Ch(I),this.reset()}reset(){this._active=!1}dblclick(I,ht){return I.preventDefault(),{cameraAnimation:Et=>{Et.easeTo({duration:300,zoom:this._tr.zoom+(I.shiftKey?-1:1),around:this._tr.unproject(ht)},{originalEvent:I})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ga{constructor(){this._tap=new bf({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(I,ht,Et){if(!this._swipePoint)if(this._tapTime){let It=ht[0],Vt=I.timeStamp-this._tapTime<500,ke=this._tapPoint.dist(It)<30;Vt&&ke?Et.length>0&&(this._swipePoint=It,this._swipeTouch=Et[0].identifier):this.reset()}else this._tap.touchstart(I,ht,Et)}touchmove(I,ht,Et){if(this._tapTime){if(this._swipePoint){if(Et[0].identifier!==this._swipeTouch)return;let It=ht[0],Vt=It.y-this._swipePoint.y;return this._swipePoint=It,I.preventDefault(),this._active=!0,{zoomDelta:Vt/128}}}else this._tap.touchmove(I,ht,Et)}touchend(I,ht,Et){if(this._tapTime)this._swipePoint&&Et.length===0&&this.reset();else{let It=this._tap.touchend(I,ht,Et);It&&(this._tapTime=I.timeStamp,this._tapPoint=It)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ra{constructor(I,ht,Et){this._el=I,this._mousePan=ht,this._touchPan=Et}enable(I){this._inertiaOptions=I||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class $a{constructor(I,ht,Et){this._pitchWithRotate=I.pitchWithRotate,this._mouseRotate=ht,this._mousePitch=Et}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class ua{constructor(I,ht,Et,It){this._el=I,this._touchZoom=ht,this._touchRotate=Et,this._tapDragZoom=It,this._rotationDisabled=!1,this._enabled=!0}enable(I){this._touchZoom.enable(I),this._rotationDisabled||this._touchRotate.enable(I),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class za{constructor(I,ht){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=I,this._options=ht,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let I=this._map.getCanvasContainer();I.classList.add("maplibregl-cooperative-gestures"),this._container=i.create("div","maplibregl-cooperative-gesture-screen",I);let ht=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(ht=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let Et=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),It=document.createElement("div");It.className="maplibregl-desktop-message",It.textContent=ht,this._container.appendChild(It);let Vt=document.createElement("div");Vt.className="maplibregl-mobile-message",Vt.textContent=Et,this._container.appendChild(Vt),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(i.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(I){return I[this._bypassKey]}notifyGestureBlocked(I,ht){this._enabled&&(this._map.fire(new e.k("cooperativegestureprevented",{gestureType:I,originalEvent:ht})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let wa=qt=>qt.zoom||qt.drag||qt.pitch||qt.rotate;class Ji extends e.k{}function eo(qt){return qt.panDelta&&qt.panDelta.mag()||qt.zoomDelta||qt.bearingDelta||qt.pitchDelta}class rs{constructor(I,ht){this.handleWindowEvent=It=>{this.handleEvent(It,`${It.type}Window`)},this.handleEvent=(It,Vt)=>{if(It.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let ke=It.type==="renderFrame"?void 0:It,Oe={needsRenderFrame:!1},Ke={},gr={},Or=It.touches,Dr=Or?this._getMapTouches(Or):void 0,ln=Dr?i.touchPos(this._map.getCanvas(),Dr):i.mousePos(this._map.getCanvas(),It);for(let{handlerName:ae,handler:xe,allowed:Ae}of this._handlers){if(!xe.isEnabled())continue;let je;this._blockedByActive(gr,Ae,ae)?xe.reset():xe[Vt||It.type]&&(je=xe[Vt||It.type](It,ln,Dr),this.mergeHandlerResult(Oe,Ke,je,ae,ke),je&&je.needsRenderFrame&&this._triggerRenderFrame()),(je||xe.isActive())&&(gr[ae]=xe)}let Sn={};for(let ae in this._previousActiveHandlers)gr[ae]||(Sn[ae]=ke);this._previousActiveHandlers=gr,(Object.keys(Sn).length||eo(Oe))&&(this._changes.push([Oe,Ke,Sn]),this._triggerRenderFrame()),(Object.keys(gr).length||eo(Oe))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Xt}=Oe;Xt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Xt(this._map))},this._map=I,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Lf(I),this._bearingSnap=ht.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ht);let Et=this._el;this._listeners=[[Et,"touchstart",{passive:!0}],[Et,"touchmove",{passive:!1}],[Et,"touchend",void 0],[Et,"touchcancel",void 0],[Et,"mousedown",void 0],[Et,"mousemove",void 0],[Et,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[Et,"mouseover",void 0],[Et,"mouseout",void 0],[Et,"dblclick",void 0],[Et,"click",void 0],[Et,"keydown",{capture:!1}],[Et,"keyup",void 0],[Et,"wheel",{passive:!1}],[Et,"contextmenu",void 0],[window,"blur",void 0]];for(let[It,Vt,ke]of this._listeners)i.addEventListener(It,Vt,It===document?this.handleWindowEvent:this.handleEvent,ke)}destroy(){for(let[I,ht,Et]of this._listeners)i.removeEventListener(I,ht,I===document?this.handleWindowEvent:this.handleEvent,Et)}_addDefaultHandlers(I){let ht=this._map,Et=ht.getCanvasContainer();this._add("mapEvent",new vh(ht,I));let It=ht.boxZoom=new Vc(ht,I);this._add("boxZoom",It),I.interactive&&I.boxZoom&&It.enable();let Vt=ht.cooperativeGestures=new za(ht,I.cooperativeGestures);this._add("cooperativeGestures",Vt),I.cooperativeGestures&&Vt.enable();let ke=new qh(ht),Oe=new ea(ht);ht.doubleClickZoom=new hi(Oe,ke),this._add("tapZoom",ke),this._add("clickZoom",Oe),I.interactive&&I.doubleClickZoom&&ht.doubleClickZoom.enable();let Ke=new ga;this._add("tapDragZoom",Ke);let gr=ht.touchPitch=new qf(ht);this._add("touchPitch",gr),I.interactive&&I.touchPitch&&ht.touchPitch.enable(I.touchPitch);let Or=gc(I),Dr=Jf(I);ht.dragRotate=new $a(I,Or,Dr),this._add("mouseRotate",Or,["mousePitch"]),this._add("mousePitch",Dr,["mouseRotate"]),I.interactive&&I.dragRotate&&ht.dragRotate.enable();let ln=(({enable:je,clickTolerance:Ie})=>{let Ze=new Zh({checkCorrectEvent:wr=>i.mouseButton(wr)===0&&!wr.ctrlKey});return new th({clickTolerance:Ie,move:(wr,Ir)=>({around:Ir,panDelta:Ir.sub(wr)}),activateOnStart:!0,moveStateManager:Ze,enable:je,assignEvents:zd})})(I),Sn=new eh(I,ht);ht.dragPan=new Ra(Et,ln,Sn),this._add("mousePan",ln),this._add("touchPan",Sn,["touchZoom","touchRotate"]),I.interactive&&I.dragPan&&ht.dragPan.enable(I.dragPan);let Xt=new df,ae=new eu;ht.touchZoomRotate=new ua(Et,ae,Xt,Ke),this._add("touchRotate",Xt,["touchPan","touchZoom"]),this._add("touchZoom",ae,["touchPan","touchRotate"]),I.interactive&&I.touchZoomRotate&&ht.touchZoomRotate.enable(I.touchZoomRotate);let xe=ht.scrollZoom=new Wn(ht,()=>this._triggerRenderFrame());this._add("scrollZoom",xe,["mousePan"]),I.interactive&&I.scrollZoom&&ht.scrollZoom.enable(I.scrollZoom);let Ae=ht.keyboard=new Ur(ht);this._add("keyboard",Ae),I.interactive&&I.keyboard&&ht.keyboard.enable(),this._add("blockableMapEvent",new bu(ht))}_add(I,ht,Et){this._handlers.push({handlerName:I,handler:ht,allowed:Et}),this._handlersById[I]=ht}stop(I){if(!this._updatingCamera){for(let{handler:ht}of this._handlers)ht.reset();this._inertia.clear(),this._fireEvents({},{},I),this._changes=[]}}isActive(){for(let{handler:I}of this._handlers)if(I.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!wa(this._eventsInProgress)||this.isZooming()}_blockedByActive(I,ht,Et){for(let It in I)if(It!==Et&&(!ht||ht.indexOf(It)<0))return!0;return!1}_getMapTouches(I){let ht=[];for(let Et of I)this._el.contains(Et.target)&&ht.push(Et);return ht}mergeHandlerResult(I,ht,Et,It,Vt){if(!Et)return;e.e(I,Et);let ke={handlerName:It,originalEvent:Et.originalEvent||Vt};Et.zoomDelta!==void 0&&(ht.zoom=ke),Et.panDelta!==void 0&&(ht.drag=ke),Et.pitchDelta!==void 0&&(ht.pitch=ke),Et.bearingDelta!==void 0&&(ht.rotate=ke)}_applyChanges(){let I={},ht={},Et={};for(let[It,Vt,ke]of this._changes)It.panDelta&&(I.panDelta=(I.panDelta||new e.P(0,0))._add(It.panDelta)),It.zoomDelta&&(I.zoomDelta=(I.zoomDelta||0)+It.zoomDelta),It.bearingDelta&&(I.bearingDelta=(I.bearingDelta||0)+It.bearingDelta),It.pitchDelta&&(I.pitchDelta=(I.pitchDelta||0)+It.pitchDelta),It.around!==void 0&&(I.around=It.around),It.pinchAround!==void 0&&(I.pinchAround=It.pinchAround),It.noInertia&&(I.noInertia=It.noInertia),e.e(ht,Vt),e.e(Et,ke);this._updateMapTransform(I,ht,Et),this._changes=[]}_updateMapTransform(I,ht,Et){let It=this._map,Vt=It._getTransformForUpdate(),ke=It.terrain;if(!(eo(I)||ke&&this._terrainMovement))return this._fireEvents(ht,Et,!0);let{panDelta:Oe,zoomDelta:Ke,bearingDelta:gr,pitchDelta:Or,around:Dr,pinchAround:ln}=I;ln!==void 0&&(Dr=ln),It._stop(!0),Dr=Dr||It.transform.centerPoint;let Sn=Vt.pointLocation(Oe?Dr.sub(Oe):Dr);gr&&(Vt.bearing+=gr),Or&&(Vt.pitch+=Or),Ke&&(Vt.zoom+=Ke),ke?this._terrainMovement||!ht.drag&&!ht.zoom?ht.drag&&this._terrainMovement?Vt.center=Vt.pointLocation(Vt.centerPoint.sub(Oe)):Vt.setLocationAtPoint(Sn,Dr):(this._terrainMovement=!0,this._map._elevationFreeze=!0,Vt.setLocationAtPoint(Sn,Dr)):Vt.setLocationAtPoint(Sn,Dr),It._applyUpdatedTransform(Vt),this._map._update(),I.noInertia||this._inertia.record(I),this._fireEvents(ht,Et,!0)}_fireEvents(I,ht,Et){let It=wa(this._eventsInProgress),Vt=wa(I),ke={};for(let Dr in I){let{originalEvent:ln}=I[Dr];this._eventsInProgress[Dr]||(ke[`${Dr}start`]=ln),this._eventsInProgress[Dr]=I[Dr]}!It&&Vt&&this._fireEvent("movestart",Vt.originalEvent);for(let Dr in ke)this._fireEvent(Dr,ke[Dr]);Vt&&this._fireEvent("move",Vt.originalEvent);for(let Dr in I){let{originalEvent:ln}=I[Dr];this._fireEvent(Dr,ln)}let Oe={},Ke;for(let Dr in this._eventsInProgress){let{handlerName:ln,originalEvent:Sn}=this._eventsInProgress[Dr];this._handlersById[ln].isActive()||(delete this._eventsInProgress[Dr],Ke=ht[ln]||Sn,Oe[`${Dr}end`]=Ke)}for(let Dr in Oe)this._fireEvent(Dr,Oe[Dr]);let gr=wa(this._eventsInProgress),Or=(It||Vt)&&!gr;if(Or&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Dr=this._map._getTransformForUpdate();Dr.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Dr)}if(Et&&Or){this._updatingCamera=!0;let Dr=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),ln=Sn=>Sn!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Ji("renderFrame",{timeStamp:I})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Zo extends e.E{constructor(I,ht){super(),this._renderFrameCallback=()=>{let Et=Math.min((o.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Et)),Et<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=I,this._bearingSnap=ht.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new e.N(this.transform.center.lng,this.transform.center.lat)}setCenter(I,ht){return this.jumpTo({center:I},ht)}panBy(I,ht,Et){return I=e.P.convert(I).mult(-1),this.panTo(this.transform.center,e.e({offset:I},ht),Et)}panTo(I,ht,Et){return this.easeTo(e.e({center:I},ht),Et)}getZoom(){return this.transform.zoom}setZoom(I,ht){return this.jumpTo({zoom:I},ht),this}zoomTo(I,ht,Et){return this.easeTo(e.e({zoom:I},ht),Et)}zoomIn(I,ht){return this.zoomTo(this.getZoom()+1,I,ht),this}zoomOut(I,ht){return this.zoomTo(this.getZoom()-1,I,ht),this}getBearing(){return this.transform.bearing}setBearing(I,ht){return this.jumpTo({bearing:I},ht),this}getPadding(){return this.transform.padding}setPadding(I,ht){return this.jumpTo({padding:I},ht),this}rotateTo(I,ht,Et){return this.easeTo(e.e({bearing:I},ht),Et)}resetNorth(I,ht){return this.rotateTo(0,e.e({duration:1e3},I),ht),this}resetNorthPitch(I,ht){return this.easeTo(e.e({bearing:0,pitch:0,duration:1e3},I),ht),this}snapToNorth(I,ht){return Math.abs(this.getBearing()){if(this._zooming&&(It.zoom=e.y.number(Vt,xe,Nr)),this._rotating&&(It.bearing=e.y.number(ke,gr,Nr)),this._pitching&&(It.pitch=e.y.number(Oe,Or,Nr)),this._padding&&(It.interpolatePadding(Ke,Dr,Nr),Sn=It.centerPoint.add(ln)),this.terrain&&!I.freezeElevation&&this._updateElevation(Nr),Ze)It.setLocationAtPoint(Ze,wr);else{let tn=It.zoomScale(It.zoom-Vt),mn=xe>Vt?Math.min(2,Ie):Math.max(.5,Ie),zn=Math.pow(mn,1-Nr),Bn=It.unproject(Ae.add(je.mult(Nr*zn)).mult(tn));It.setLocationAtPoint(It.renderWorldCopies?Bn.wrap():Bn,Sn)}this._applyUpdatedTransform(It),this._fireMoveEvents(ht)},Nr=>{this.terrain&&I.freezeElevation&&this._finalizeElevation(),this._afterEase(ht,Nr)},I),this}_prepareEase(I,ht,Et={}){this._moving=!0,ht||Et.moving||this.fire(new e.k("movestart",I)),this._zooming&&!Et.zooming&&this.fire(new e.k("zoomstart",I)),this._rotating&&!Et.rotating&&this.fire(new e.k("rotatestart",I)),this._pitching&&!Et.pitching&&this.fire(new e.k("pitchstart",I))}_prepareElevation(I){this._elevationCenter=I,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(I,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(I){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let ht=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(I<1&&ht!==this._elevationTarget){let Et=this._elevationTarget-this._elevationStart;this._elevationStart+=I*(Et-(ht-(Et*I+this._elevationStart))/(1-I)),this._elevationTarget=ht}this.transform.elevation=e.y.number(this._elevationStart,this._elevationTarget,I)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(I){let ht=I.getCameraPosition(),Et=this.terrain.getElevationForLngLatZoom(ht.lngLat,I.zoom);if(ht.altitudethis._elevateCameraIfInsideTerrain(It)),this.transformCameraUpdate&&ht.push(It=>this.transformCameraUpdate(It)),!ht.length)return;let Et=I.clone();for(let It of ht){let Vt=Et.clone(),{center:ke,zoom:Oe,pitch:Ke,bearing:gr,elevation:Or}=It(Vt);ke&&(Vt.center=ke),Oe!==void 0&&(Vt.zoom=Oe),Ke!==void 0&&(Vt.pitch=Ke),gr!==void 0&&(Vt.bearing=gr),Or!==void 0&&(Vt.elevation=Or),Et.apply(Vt)}this.transform.apply(Et)}_fireMoveEvents(I){this.fire(new e.k("move",I)),this._zooming&&this.fire(new e.k("zoom",I)),this._rotating&&this.fire(new e.k("rotate",I)),this._pitching&&this.fire(new e.k("pitch",I))}_afterEase(I,ht){if(this._easeId&&ht&&this._easeId===ht)return;delete this._easeId;let Et=this._zooming,It=this._rotating,Vt=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Et&&this.fire(new e.k("zoomend",I)),It&&this.fire(new e.k("rotateend",I)),Vt&&this.fire(new e.k("pitchend",I)),this.fire(new e.k("moveend",I))}flyTo(I,ht){var Et;if(!I.essential&&o.prefersReducedMotion){let ka=e.M(I,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ka,ht)}this.stop(),I=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.b9},I);let It=this._getTransformForUpdate(),Vt=It.zoom,ke=It.bearing,Oe=It.pitch,Ke=It.padding,gr="bearing"in I?this._normalizeBearing(I.bearing,ke):ke,Or="pitch"in I?+I.pitch:Oe,Dr="padding"in I?I.padding:It.padding,ln=e.P.convert(I.offset),Sn=It.centerPoint.add(ln),Xt=It.pointLocation(Sn),{center:ae,zoom:xe}=It.getConstrained(e.N.convert(I.center||Xt),(Et=I.zoom)!==null&&Et!==void 0?Et:Vt);this._normalizeCenter(ae,It);let Ae=It.zoomScale(xe-Vt),je=It.project(Xt),Ie=It.project(ae).sub(je),Ze=I.curve,wr=Math.max(It.width,It.height),Ir=wr/Ae,Nr=Ie.mag();if("minZoom"in I){let ka=e.ac(Math.min(I.minZoom,Vt,xe),It.minZoom,It.maxZoom),io=wr/It.zoomScale(ka-Vt);Ze=Math.sqrt(io/Nr*2)}let tn=Ze*Ze;function mn(ka){let io=(Ir*Ir-wr*wr+(ka?-1:1)*tn*tn*Nr*Nr)/(2*(ka?Ir:wr)*tn*Nr);return Math.log(Math.sqrt(io*io+1)-io)}function zn(ka){return(Math.exp(ka)-Math.exp(-ka))/2}function Bn(ka){return(Math.exp(ka)+Math.exp(-ka))/2}let ri=mn(!1),Fi=function(ka){return Bn(ri)/Bn(ri+Ze*ka)},da=function(ka){return wr*((Bn(ri)*(zn(io=ri+Ze*ka)/Bn(io))-zn(ri))/tn)/Nr;var io},ha=(mn(!0)-ri)/Ze;if(Math.abs(Nr)<1e-6||!isFinite(ha)){if(Math.abs(wr-Ir)<1e-6)return this.easeTo(I,ht);let ka=Ir0,Fi=io=>Math.exp(ka*Ze*io)}return I.duration="duration"in I?+I.duration:1e3*ha/("screenSpeed"in I?+I.screenSpeed/Ze:+I.speed),I.maxDuration&&I.duration>I.maxDuration&&(I.duration=0),this._zooming=!0,this._rotating=ke!==gr,this._pitching=Or!==Oe,this._padding=!It.isPaddingEqual(Dr),this._prepareEase(ht,!1),this.terrain&&this._prepareElevation(ae),this._ease(ka=>{let io=ka*ha,Ro=1/Fi(io);It.zoom=ka===1?xe:Vt+It.scaleZoom(Ro),this._rotating&&(It.bearing=e.y.number(ke,gr,ka)),this._pitching&&(It.pitch=e.y.number(Oe,Or,ka)),this._padding&&(It.interpolatePadding(Ke,Dr,ka),Sn=It.centerPoint.add(ln)),this.terrain&&!I.freezeElevation&&this._updateElevation(ka);let Mo=ka===1?ae:It.unproject(je.add(Ie.mult(da(io))).mult(Ro));It.setLocationAtPoint(It.renderWorldCopies?Mo.wrap():Mo,Sn),this._applyUpdatedTransform(It),this._fireMoveEvents(ht)},()=>{this.terrain&&I.freezeElevation&&this._finalizeElevation(),this._afterEase(ht)},I),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(I,ht){var Et;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let It=this._onEaseEnd;delete this._onEaseEnd,It.call(this,ht)}return I||(Et=this.handlers)===null||Et===void 0||Et.stop(!1),this}_ease(I,ht,Et){Et.animate===!1||Et.duration===0?(I(1),ht()):(this._easeStart=o.now(),this._easeOptions=Et,this._onEaseFrame=I,this._onEaseEnd=ht,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(I,ht){I=e.b3(I,-180,180);let Et=Math.abs(I-ht);return Math.abs(I-360-ht)180?-360:Et<-180?360:0}queryTerrainElevation(I){return this.terrain?this.terrain.getElevationForLngLatZoom(e.N.convert(I),this.transform.tileZoom)-this.transform.elevation:null}}let os={compact:!0,customAttribution:'MapLibre'};class fs{constructor(I=os){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=ht=>{!ht||ht.sourceDataType!=="metadata"&&ht.sourceDataType!=="visibility"&&ht.dataType!=="style"&&ht.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=I}getDefaultPosition(){return"bottom-right"}onAdd(I){return this._map=I,this._compact=this.options.compact,this._container=i.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=i.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=i.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){i.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(I,ht){let Et=this._map._getUIString(`AttributionControl.${ht}`);I.title=Et,I.setAttribute("aria-label",Et)}_updateAttributions(){if(!this._map.style)return;let I=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?I=I.concat(this.options.customAttribution.map(It=>typeof It!="string"?"":It)):typeof this.options.customAttribution=="string"&&I.push(this.options.customAttribution)),this._map.style.stylesheet){let It=this._map.style.stylesheet;this.styleOwner=It.owner,this.styleId=It.id}let ht=this._map.style.sourceCaches;for(let It in ht){let Vt=ht[It];if(Vt.used||Vt.usedForTerrain){let ke=Vt.getSource();ke.attribution&&I.indexOf(ke.attribution)<0&&I.push(ke.attribution)}}I=I.filter(It=>String(It).trim()),I.sort((It,Vt)=>It.length-Vt.length),I=I.filter((It,Vt)=>{for(let ke=Vt+1;ke=0)return!1;return!0});let Et=I.join(" | ");Et!==this._attribHTML&&(this._attribHTML=Et,I.length?(this._innerContainer.innerHTML=Et,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class no{constructor(I={}){this._updateCompact=()=>{let ht=this._container.children;if(ht.length){let Et=ht[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&Et.classList.add("maplibregl-compact"):Et.classList.remove("maplibregl-compact")}},this.options=I}getDefaultPosition(){return"bottom-left"}onAdd(I){this._map=I,this._compact=this.options&&this.options.compact,this._container=i.create("div","maplibregl-ctrl");let ht=i.create("a","maplibregl-ctrl-logo");return ht.target="_blank",ht.rel="noopener nofollow",ht.href="https://maplibre.org/",ht.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ht.setAttribute("rel","noopener nofollow"),this._container.appendChild(ht),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){i.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class qa{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(I){let ht=++this._id;return this._queue.push({callback:I,id:ht,cancelled:!1}),ht}remove(I){let ht=this._currentlyRunning,Et=ht?this._queue.concat(ht):this._queue;for(let It of Et)if(It.id===I)return void(It.cancelled=!0)}run(I=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let ht=this._currentlyRunning=this._queue;this._queue=[];for(let Et of ht)if(!Et.cancelled&&(Et.callback(I),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var ds=e.Y([{name:"a_pos3d",type:"Int16",components:3}]);class tl extends e.E{constructor(I){super(),this.sourceCache=I,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,I.usedForTerrain=!0,I.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(I,ht){this.sourceCache.update(I,ht),this._renderableTilesKeys=[];let Et={};for(let It of I.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:ht}))Et[It.key]=!0,this._renderableTilesKeys.push(It.key),this._tiles[It.key]||(It.posMatrix=new Float64Array(16),e.aP(It.posMatrix,0,e.X,0,e.X,0,1),this._tiles[It.key]=new oe(It,this.tileSize));for(let It in this._tiles)Et[It]||delete this._tiles[It]}freeRtt(I){for(let ht in this._tiles){let Et=this._tiles[ht];(!I||Et.tileID.equals(I)||Et.tileID.isChildOf(I)||I.isChildOf(Et.tileID))&&(Et.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(I=>this.getTileByID(I))}getTileByID(I){return this._tiles[I]}getTerrainCoords(I){let ht={};for(let Et of this._renderableTilesKeys){let It=this._tiles[Et].tileID;if(It.canonical.equals(I.canonical)){let Vt=I.clone();Vt.posMatrix=new Float64Array(16),e.aP(Vt.posMatrix,0,e.X,0,e.X,0,1),ht[Et]=Vt}else if(It.canonical.isChildOf(I.canonical)){let Vt=I.clone();Vt.posMatrix=new Float64Array(16);let ke=It.canonical.z-I.canonical.z,Oe=It.canonical.x-(It.canonical.x>>ke<>ke<>ke;e.aP(Vt.posMatrix,0,gr,0,gr,0,1),e.J(Vt.posMatrix,Vt.posMatrix,[-Oe*gr,-Ke*gr,0]),ht[Et]=Vt}else if(I.canonical.isChildOf(It.canonical)){let Vt=I.clone();Vt.posMatrix=new Float64Array(16);let ke=I.canonical.z-It.canonical.z,Oe=I.canonical.x-(I.canonical.x>>ke<>ke<>ke;e.aP(Vt.posMatrix,0,e.X,0,e.X,0,1),e.J(Vt.posMatrix,Vt.posMatrix,[Oe*gr,Ke*gr,0]),e.K(Vt.posMatrix,Vt.posMatrix,[1/2**ke,1/2**ke,0]),ht[Et]=Vt}}return ht}getSourceTile(I,ht){let Et=this.sourceCache._source,It=I.overscaledZ-this.deltaZoom;if(It>Et.maxzoom&&(It=Et.maxzoom),It=Et.minzoom&&(!Vt||!Vt.dem);)Vt=this.sourceCache.getTileByID(I.scaledTo(It--).key);return Vt}tilesAfterTime(I=Date.now()){return Object.values(this._tiles).filter(ht=>ht.timeAdded>=I)}}class Pl{constructor(I,ht,Et){this.painter=I,this.sourceCache=new tl(ht),this.options=Et,this.exaggeration=typeof Et.exaggeration=="number"?Et.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(I,ht,Et,It=e.X){var Vt;if(!(ht>=0&&ht=0&&EtI.canonical.z&&(I.canonical.z>=It?Vt=I.canonical.z-It:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let ke=I.canonical.x-(I.canonical.x>>Vt<>Vt<>8<<4|Vt>>8,ht[ke+3]=0;let Et=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(ht.buffer)),It=new p(I,Et,I.gl.RGBA,{premultiply:!1});return It.bind(I.gl.NEAREST,I.gl.CLAMP_TO_EDGE),this._coordsTexture=It,It}pointCoordinate(I){this.painter.maybeDrawDepthAndCoords(!0);let ht=new Uint8Array(4),Et=this.painter.context,It=Et.gl,Vt=Math.round(I.x*this.painter.pixelRatio/devicePixelRatio),ke=Math.round(I.y*this.painter.pixelRatio/devicePixelRatio),Oe=Math.round(this.painter.height/devicePixelRatio);Et.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),It.readPixels(Vt,Oe-ke-1,1,1,It.RGBA,It.UNSIGNED_BYTE,ht),Et.bindFramebuffer.set(null);let Ke=ht[0]+(ht[2]>>4<<8),gr=ht[1]+((15&ht[2])<<8),Or=this.coordsIndex[255-ht[3]],Dr=Or&&this.sourceCache.getTileByID(Or);if(!Dr)return null;let ln=this._coordsTextureSize,Sn=(1<I.id!==ht),this._recentlyUsed.push(I.id)}stampObject(I){I.stamp=++this._stamp}getOrCreateFreeObject(){for(let ht of this._recentlyUsed)if(!this._objects[ht].inUse)return this._objects[ht];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let I=this._createObject(this._objects.length);return this._objects.push(I),I}freeObject(I){I.inUse=!1}freeAllObjects(){for(let I of this._objects)this.freeObject(I)}isFull(){return!(this._objects.length!I.inUse)===!1}}let Hl={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class au{constructor(I,ht){this.painter=I,this.terrain=ht,this.pool=new iu(I.context,30,ht.sourceCache.tileSize*ht.qualityFactor)}destruct(){this.pool.destruct()}getTexture(I){return this.pool.getObjectForId(I.rtt[this._stacks.length-1].id).texture}prepareForRender(I,ht){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=I._order.filter(Et=>!I._layers[Et].isHidden(ht)),this._coordsDescendingInv={};for(let Et in I.sourceCaches){this._coordsDescendingInv[Et]={};let It=I.sourceCaches[Et].getVisibleCoordinates();for(let Vt of It){let ke=this.terrain.sourceCache.getTerrainCoords(Vt);for(let Oe in ke)this._coordsDescendingInv[Et][Oe]||(this._coordsDescendingInv[Et][Oe]=[]),this._coordsDescendingInv[Et][Oe].push(ke[Oe])}}this._coordsDescendingInvStr={};for(let Et of I._order){let It=I._layers[Et],Vt=It.source;if(Hl[It.type]&&!this._coordsDescendingInvStr[Vt]){this._coordsDescendingInvStr[Vt]={};for(let ke in this._coordsDescendingInv[Vt])this._coordsDescendingInvStr[Vt][ke]=this._coordsDescendingInv[Vt][ke].map(Oe=>Oe.key).sort().join()}}for(let Et of this._renderableTiles)for(let It in this._coordsDescendingInvStr){let Vt=this._coordsDescendingInvStr[It][Et.tileID.key];Vt&&Vt!==Et.rttCoords[It]&&(Et.rtt=[])}}renderLayer(I){if(I.isHidden(this.painter.transform.zoom))return!1;let ht=I.type,Et=this.painter,It=this._renderableLayerIds[this._renderableLayerIds.length-1]===I.id;if(Hl[ht]&&(this._prevType&&Hl[this._prevType]||this._stacks.push([]),this._prevType=ht,this._stacks[this._stacks.length-1].push(I.id),!It))return!0;if(Hl[this._prevType]||Hl[ht]&&It){this._prevType=ht;let Vt=this._stacks.length-1,ke=this._stacks[Vt]||[];for(let Oe of this._renderableTiles){if(this.pool.isFull()&&(zu(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Oe),Oe.rtt[Vt]){let gr=this.pool.getObjectForId(Oe.rtt[Vt].id);if(gr.stamp===Oe.rtt[Vt].stamp){this.pool.useObject(gr);continue}}let Ke=this.pool.getOrCreateFreeObject();this.pool.useObject(Ke),this.pool.stampObject(Ke),Oe.rtt[Vt]={id:Ke.id,stamp:Ke.stamp},Et.context.bindFramebuffer.set(Ke.fbo.framebuffer),Et.context.clear({color:e.aM.transparent,stencil:0}),Et.currentStencilSource=void 0;for(let gr=0;gr{qt.touchstart=qt.dragStart,qt.touchmoveWindow=qt.dragMove,qt.touchend=qt.dragEnd},zo={showCompass:!0,showZoom:!0,visualizePitch:!1};class Ms{constructor(I,ht,Et=!1){this.mousedown=ke=>{this.startMouse(e.e({},ke,{ctrlKey:!0,preventDefault:()=>ke.preventDefault()}),i.mousePos(this.element,ke)),i.addEventListener(window,"mousemove",this.mousemove),i.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ke=>{this.moveMouse(ke,i.mousePos(this.element,ke))},this.mouseup=ke=>{this.mouseRotate.dragEnd(ke),this.mousePitch&&this.mousePitch.dragEnd(ke),this.offTemp()},this.touchstart=ke=>{ke.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=i.touchPos(this.element,ke.targetTouches)[0],this.startTouch(ke,this._startPos),i.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.addEventListener(window,"touchend",this.touchend))},this.touchmove=ke=>{ke.targetTouches.length!==1?this.reset():(this._lastPos=i.touchPos(this.element,ke.targetTouches)[0],this.moveTouch(ke,this._lastPos))},this.touchend=ke=>{ke.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let It=I.dragRotate._mouseRotate.getClickTolerance(),Vt=I.dragRotate._mousePitch.getClickTolerance();this.element=ht,this.mouseRotate=gc({clickTolerance:It,enable:!0}),this.touchRotate=(({enable:ke,clickTolerance:Oe,bearingDegreesPerPixelMoved:Ke=.8})=>{let gr=new wf;return new th({clickTolerance:Oe,move:(Or,Dr)=>({bearingDelta:(Dr.x-Or.x)*Ke}),moveStateManager:gr,enable:ke,assignEvents:uu})})({clickTolerance:It,enable:!0}),this.map=I,Et&&(this.mousePitch=Jf({clickTolerance:Vt,enable:!0}),this.touchPitch=(({enable:ke,clickTolerance:Oe,pitchDegreesPerPixelMoved:Ke=-.5})=>{let gr=new wf;return new th({clickTolerance:Oe,move:(Or,Dr)=>({pitchDelta:(Dr.y-Or.y)*Ke}),moveStateManager:gr,enable:ke,assignEvents:uu})})({clickTolerance:Vt,enable:!0})),i.addEventListener(ht,"mousedown",this.mousedown),i.addEventListener(ht,"touchstart",this.touchstart,{passive:!1}),i.addEventListener(ht,"touchcancel",this.reset)}startMouse(I,ht){this.mouseRotate.dragStart(I,ht),this.mousePitch&&this.mousePitch.dragStart(I,ht),i.disableDrag()}startTouch(I,ht){this.touchRotate.dragStart(I,ht),this.touchPitch&&this.touchPitch.dragStart(I,ht),i.disableDrag()}moveMouse(I,ht){let Et=this.map,{bearingDelta:It}=this.mouseRotate.dragMove(I,ht)||{};if(It&&Et.setBearing(Et.getBearing()+It),this.mousePitch){let{pitchDelta:Vt}=this.mousePitch.dragMove(I,ht)||{};Vt&&Et.setPitch(Et.getPitch()+Vt)}}moveTouch(I,ht){let Et=this.map,{bearingDelta:It}=this.touchRotate.dragMove(I,ht)||{};if(It&&Et.setBearing(Et.getBearing()+It),this.touchPitch){let{pitchDelta:Vt}=this.touchPitch.dragMove(I,ht)||{};Vt&&Et.setPitch(Et.getPitch()+Vt)}}off(){let I=this.element;i.removeEventListener(I,"mousedown",this.mousedown),i.removeEventListener(I,"touchstart",this.touchstart,{passive:!1}),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend),i.removeEventListener(I,"touchcancel",this.reset),this.offTemp()}offTemp(){i.enableDrag(),i.removeEventListener(window,"mousemove",this.mousemove),i.removeEventListener(window,"mouseup",this.mouseup),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend)}}let $l;function Fl(qt,I,ht){let Et=new e.N(qt.lng,qt.lat);if(qt=new e.N(qt.lng,qt.lat),I){let It=new e.N(qt.lng-360,qt.lat),Vt=new e.N(qt.lng+360,qt.lat),ke=ht.locationPoint(qt).distSqr(I);ht.locationPoint(It).distSqr(I)180;){let It=ht.locationPoint(qt);if(It.x>=0&&It.y>=0&&It.x<=ht.width&&It.y<=ht.height)break;qt.lng>ht.center.lng?qt.lng-=360:qt.lng+=360}return qt.lng!==Et.lng&&ht.locationPoint(qt).y>ht.height/2-ht.getHorizon()?qt:Et}let vc={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Hc(qt,I,ht){let Et=qt.classList;for(let It in vc)Et.remove(`maplibregl-${ht}-anchor-${It}`);Et.add(`maplibregl-${ht}-anchor-${I}`)}class Pc extends e.E{constructor(I){if(super(),this._onKeyPress=ht=>{let Et=ht.code,It=ht.charCode||ht.keyCode;Et!=="Space"&&Et!=="Enter"&&It!==32&&It!==13||this.togglePopup()},this._onMapClick=ht=>{let Et=ht.originalEvent.target,It=this._element;this._popup&&(Et===It||It.contains(Et))&&this.togglePopup()},this._update=ht=>{var Et;if(!this._map)return;let It=this._map.loaded()&&!this._map.isMoving();(ht?.type==="terrain"||ht?.type==="render"&&!It)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Fl(this._lngLat,this._flatPos,this._map.transform):(Et=this._lngLat)===null||Et===void 0?void 0:Et.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let Vt="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?Vt=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(Vt=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let ke="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ke="rotateX(0deg)":this._pitchAlignment==="map"&&(ke=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||ht&&ht.type!=="moveend"||(this._pos=this._pos.round()),i.setTransform(this._element,`${vc[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ke} ${Vt}`),o.frameAsync(new AbortController).then(()=>{this._updateOpacity(ht&&ht.type==="moveend")}).catch(()=>{})},this._onMove=ht=>{if(!this._isDragging){let Et=this._clickTolerance||this._map._clickTolerance;this._isDragging=ht.point.dist(this._pointerdownPos)>=Et}this._isDragging&&(this._pos=ht.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new e.k("dragstart"))),this.fire(new e.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new e.k("dragend")),this._state="inactive"},this._addDragHandler=ht=>{this._element.contains(ht.originalEvent.target)&&(ht.preventDefault(),this._positionDelta=ht.point.sub(this._pos).add(this._offset),this._pointerdownPos=ht.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=I&&I.anchor||"center",this._color=I&&I.color||"#3FB1CE",this._scale=I&&I.scale||1,this._draggable=I&&I.draggable||!1,this._clickTolerance=I&&I.clickTolerance||0,this._subpixelPositioning=I&&I.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=I&&I.rotation||0,this._rotationAlignment=I&&I.rotationAlignment||"auto",this._pitchAlignment=I&&I.pitchAlignment&&I.pitchAlignment!=="auto"?I.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(I?.opacity,I?.opacityWhenCovered),I&&I.element)this._element=I.element,this._offset=e.P.convert(I&&I.offset||[0,0]);else{this._defaultMarker=!0,this._element=i.create("div");let ht=i.createNS("http://www.w3.org/2000/svg","svg"),Et=41,It=27;ht.setAttributeNS(null,"display","block"),ht.setAttributeNS(null,"height",`${Et}px`),ht.setAttributeNS(null,"width",`${It}px`),ht.setAttributeNS(null,"viewBox",`0 0 ${It} ${Et}`);let Vt=i.createNS("http://www.w3.org/2000/svg","g");Vt.setAttributeNS(null,"stroke","none"),Vt.setAttributeNS(null,"stroke-width","1"),Vt.setAttributeNS(null,"fill","none"),Vt.setAttributeNS(null,"fill-rule","evenodd");let ke=i.createNS("http://www.w3.org/2000/svg","g");ke.setAttributeNS(null,"fill-rule","nonzero");let Oe=i.createNS("http://www.w3.org/2000/svg","g");Oe.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Oe.setAttributeNS(null,"fill","#000000");let Ke=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let Ae of Ke){let je=i.createNS("http://www.w3.org/2000/svg","ellipse");je.setAttributeNS(null,"opacity","0.04"),je.setAttributeNS(null,"cx","10.5"),je.setAttributeNS(null,"cy","5.80029008"),je.setAttributeNS(null,"rx",Ae.rx),je.setAttributeNS(null,"ry",Ae.ry),Oe.appendChild(je)}let gr=i.createNS("http://www.w3.org/2000/svg","g");gr.setAttributeNS(null,"fill",this._color);let Or=i.createNS("http://www.w3.org/2000/svg","path");Or.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),gr.appendChild(Or);let Dr=i.createNS("http://www.w3.org/2000/svg","g");Dr.setAttributeNS(null,"opacity","0.25"),Dr.setAttributeNS(null,"fill","#000000");let ln=i.createNS("http://www.w3.org/2000/svg","path");ln.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Dr.appendChild(ln);let Sn=i.createNS("http://www.w3.org/2000/svg","g");Sn.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Sn.setAttributeNS(null,"fill","#FFFFFF");let Xt=i.createNS("http://www.w3.org/2000/svg","g");Xt.setAttributeNS(null,"transform","translate(8.0, 8.0)");let ae=i.createNS("http://www.w3.org/2000/svg","circle");ae.setAttributeNS(null,"fill","#000000"),ae.setAttributeNS(null,"opacity","0.25"),ae.setAttributeNS(null,"cx","5.5"),ae.setAttributeNS(null,"cy","5.5"),ae.setAttributeNS(null,"r","5.4999962");let xe=i.createNS("http://www.w3.org/2000/svg","circle");xe.setAttributeNS(null,"fill","#FFFFFF"),xe.setAttributeNS(null,"cx","5.5"),xe.setAttributeNS(null,"cy","5.5"),xe.setAttributeNS(null,"r","5.4999962"),Xt.appendChild(ae),Xt.appendChild(xe),ke.appendChild(Oe),ke.appendChild(gr),ke.appendChild(Dr),ke.appendChild(Sn),ke.appendChild(Xt),ht.appendChild(ke),ht.setAttributeNS(null,"height",Et*this._scale+"px"),ht.setAttributeNS(null,"width",It*this._scale+"px"),this._element.appendChild(ht),this._offset=e.P.convert(I&&I.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",ht=>{ht.preventDefault()}),this._element.addEventListener("mousedown",ht=>{ht.preventDefault()}),Hc(this._element,this._anchor,"marker"),I&&I.className)for(let ht of I.className.split(" "))this._element.classList.add(ht);this._popup=null}addTo(I){return this.remove(),this._map=I,this._element.setAttribute("aria-label",I._getUIString("Marker.Title")),I.getCanvasContainer().appendChild(this._element),I.on("move",this._update),I.on("moveend",this._update),I.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),i.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(I){return this._lngLat=e.N.convert(I),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(I){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),I){if(!("offset"in I.options)){let ht=Math.abs(13.5)/Math.SQRT2;I.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[ht,-1*(38.1-13.5+ht)],"bottom-right":[-ht,-1*(38.1-13.5+ht)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=I,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(I){return this._subpixelPositioning=I,this}getPopup(){return this._popup}togglePopup(){let I=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:I?(I.isOpen()?I.remove():(I.setLngLat(this._lngLat),I.addTo(this._map)),this):this}_updateOpacity(I=!1){var ht,Et;if(!(!((ht=this._map)===null||ht===void 0)&&ht.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(I)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let It=this._map,Vt=It.terrain.depthAtPoint(this._pos),ke=It.terrain.getElevationForLngLatZoom(this._lngLat,It.transform.tileZoom);if(It.transform.lngLatToCameraDepth(this._lngLat,ke)-Vt<.006)return void(this._element.style.opacity=this._opacity);let Oe=-this._offset.y/It.transform._pixelPerMeter,Ke=Math.sin(It.getPitch()*Math.PI/180)*Oe,gr=It.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),Or=It.transform.lngLatToCameraDepth(this._lngLat,ke+Ke)-gr>.006;!((Et=this._popup)===null||Et===void 0)&&Et.isOpen()&&Or&&this._popup.remove(),this._element.style.opacity=Or?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(I){return this._offset=e.P.convert(I),this._update(),this}addClassName(I){this._element.classList.add(I)}removeClassName(I){this._element.classList.remove(I)}toggleClassName(I){return this._element.classList.toggle(I)}setDraggable(I){return this._draggable=!!I,this._map&&(I?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(I){return this._rotation=I||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(I){return this._rotationAlignment=I||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(I){return this._pitchAlignment=I&&I!=="auto"?I:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(I,ht){return I===void 0&&ht===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),I!==void 0&&(this._opacity=I),ht!==void 0&&(this._opacityWhenCovered=ht),this._map&&this._updateOpacity(!0),this}}let Ph={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Wc=0,zh=!1,Iu={maxWidth:100,unit:"metric"};function Ih(qt,I,ht){let Et=ht&&ht.maxWidth||100,It=qt._container.clientHeight/2,Vt=qt.unproject([0,It]),ke=qt.unproject([Et,It]),Oe=Vt.distanceTo(ke);if(ht&&ht.unit==="imperial"){let Ke=3.2808*Oe;Ke>5280?es(I,Et,Ke/5280,qt._getUIString("ScaleControl.Miles")):es(I,Et,Ke,qt._getUIString("ScaleControl.Feet"))}else ht&&ht.unit==="nautical"?es(I,Et,Oe/1852,qt._getUIString("ScaleControl.NauticalMiles")):Oe>=1e3?es(I,Et,Oe/1e3,qt._getUIString("ScaleControl.Kilometers")):es(I,Et,Oe,qt._getUIString("ScaleControl.Meters"))}function es(qt,I,ht,Et){let It=function(Vt){let ke=Math.pow(10,`${Math.floor(Vt)}`.length-1),Oe=Vt/ke;return Oe=Oe>=10?10:Oe>=5?5:Oe>=3?3:Oe>=2?2:Oe>=1?1:function(Ke){let gr=Math.pow(10,Math.ceil(-Math.log(Ke)/Math.LN10));return Math.round(Ke*gr)/gr}(Oe),ke*Oe}(ht);qt.style.width=I*(It/ht)+"px",qt.innerHTML=`${It} ${Et}`}let zs={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},qc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Zu(qt){if(qt){if(typeof qt=="number"){let I=Math.round(Math.abs(qt)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,qt),"top-left":new e.P(I,I),"top-right":new e.P(-I,I),bottom:new e.P(0,-qt),"bottom-left":new e.P(I,-I),"bottom-right":new e.P(-I,-I),left:new e.P(qt,0),right:new e.P(-qt,0)}}if(qt instanceof e.P||Array.isArray(qt)){let I=e.P.convert(qt);return{center:I,top:I,"top-left":I,"top-right":I,bottom:I,"bottom-left":I,"bottom-right":I,left:I,right:I}}return{center:e.P.convert(qt.center||[0,0]),top:e.P.convert(qt.top||[0,0]),"top-left":e.P.convert(qt["top-left"]||[0,0]),"top-right":e.P.convert(qt["top-right"]||[0,0]),bottom:e.P.convert(qt.bottom||[0,0]),"bottom-left":e.P.convert(qt["bottom-left"]||[0,0]),"bottom-right":e.P.convert(qt["bottom-right"]||[0,0]),left:e.P.convert(qt.left||[0,0]),right:e.P.convert(qt.right||[0,0])}}return Zu(new e.P(0,0))}let Zf=r;t.AJAXError=e.bh,t.Evented=e.E,t.LngLat=e.N,t.MercatorCoordinate=e.Z,t.Point=e.P,t.addProtocol=e.bi,t.config=e.a,t.removeProtocol=e.bj,t.AttributionControl=fs,t.BoxZoomHandler=Vc,t.CanvasSource=de,t.CooperativeGesturesHandler=za,t.DoubleClickZoomHandler=hi,t.DragPanHandler=Ra,t.DragRotateHandler=$a,t.EdgeInsets=Sc,t.FullscreenControl=class extends e.E{constructor(qt={}){super(),this._onFullscreenChange=()=>{var I;let ht=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((I=ht?.shadowRoot)===null||I===void 0)&&I.fullscreenElement;)ht=ht.shadowRoot.fullscreenElement;ht===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,qt&&qt.container&&(qt.container instanceof HTMLElement?this._container=qt.container:e.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(qt){return this._map=qt,this._container||(this._container=this._map.getContainer()),this._controlContainer=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){i.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let qt=this._fullscreenButton=i.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);i.create("span","maplibregl-ctrl-icon",qt).setAttribute("aria-hidden","true"),qt.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let qt=this._getTitle();this._fullscreenButton.setAttribute("aria-label",qt),this._fullscreenButton.title=qt}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new e.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},t.GeoJSONSource=Ht,t.GeolocateControl=class extends e.E{constructor(qt){super(),this._onSuccess=I=>{if(this._map){if(this._isOutOfMapMaxBounds(I))return this._setErrorState(),this.fire(new e.k("outofmaxbounds",I)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=I,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(I),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(I),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.k("geolocate",I)),this._finish()}},this._updateCamera=I=>{let ht=new e.N(I.coords.longitude,I.coords.latitude),Et=I.coords.accuracy,It=this._map.getBearing(),Vt=e.e({bearing:It},this.options.fitBoundsOptions),ke=ut.fromLngLat(ht,Et);this._map.fitBounds(ke,Vt,{geolocateSource:!0})},this._updateMarker=I=>{if(I){let ht=new e.N(I.coords.longitude,I.coords.latitude);this._accuracyCircleMarker.setLngLat(ht).addTo(this._map),this._userLocationDotMarker.setLngLat(ht).addTo(this._map),this._accuracy=I.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=I=>{if(this._map){if(this.options.trackUserLocation)if(I.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let ht=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ht,this._geolocateButton.setAttribute("aria-label",ht),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(I.code===3&&zh)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.k("error",I)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",I=>I.preventDefault()),this._geolocateButton=i.create("button","maplibregl-ctrl-geolocate",this._container),i.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=I=>{if(this._map){if(I===!1){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");let ht=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=ht,this._geolocateButton.setAttribute("aria-label",ht)}else{let ht=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=ht,this._geolocateButton.setAttribute("aria-label",ht)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=i.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Pc({element:this._dotElement}),this._circleElement=i.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Pc({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",ht=>{ht.geolocateSource||this._watchState!=="ACTIVE_LOCK"||ht.originalEvent&&ht.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.k("trackuserlocationend")),this.fire(new e.k("userlocationlostfocus")))})}},this.options=e.e({},Ph,qt)}onAdd(qt){return this._map=qt,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(I=!1){if($l!==void 0&&!I)return $l;if(window.navigator.permissions===void 0)return $l=!!window.navigator.geolocation,$l;try{$l=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{$l=!!window.navigator.geolocation}return $l})}().then(I=>this._finishSetupUI(I)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),i.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Wc=0,zh=!1}_isOutOfMapMaxBounds(qt){let I=this._map.getMaxBounds(),ht=qt.coords;return I&&(ht.longitudeI.getEast()||ht.latitudeI.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let qt=this._map.getBounds(),I=qt.getSouthEast(),ht=qt.getNorthEast(),Et=I.distanceTo(ht),It=Math.ceil(this._accuracy/(Et/this._map._container.clientHeight)*2);this._circleElement.style.width=`${It}px`,this._circleElement.style.height=`${It}px`}trigger(){if(!this._setup)return e.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Wc--,zh=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new e.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.k("trackuserlocationstart")),this.fire(new e.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let qt;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Wc++,Wc>1?(qt={maximumAge:6e5,timeout:0},zh=!0):(qt=this.options.positionOptions,zh=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,qt)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},t.Hash=gh,t.ImageSource=ge,t.KeyboardHandler=Ur,t.LngLatBounds=ut,t.LogoControl=no,t.Map=class extends Zo{constructor(qt){e.bf.mark(e.bg.create);let I=Object.assign(Object.assign({},Lu),qt);if(I.minZoom!=null&&I.maxZoom!=null&&I.minZoom>I.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(I.minPitch!=null&&I.maxPitch!=null&&I.minPitch>I.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(I.minPitch!=null&&I.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(I.maxPitch!=null&&I.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new _u(I.minZoom,I.maxZoom,I.minPitch,I.maxPitch,I.renderWorldCopies),{bearingSnap:I.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new qa,this._controls=[],this._mapId=e.a4(),this._contextLost=ht=>{ht.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new e.k("webglcontextlost",{originalEvent:ht}))},this._contextRestored=ht=>{this._setupPainter(),this.resize(),this._update(),this.fire(new e.k("webglcontextrestored",{originalEvent:ht}))},this._onMapScroll=ht=>{if(ht.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=I.interactive,this._maxTileCacheSize=I.maxTileCacheSize,this._maxTileCacheZoomLevels=I.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=I.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=I.preserveDrawingBuffer===!0,this._antialias=I.antialias===!0,this._trackResize=I.trackResize===!0,this._bearingSnap=I.bearingSnap,this._refreshExpiredTiles=I.refreshExpiredTiles===!0,this._fadeDuration=I.fadeDuration,this._crossSourceCollisions=I.crossSourceCollisions===!0,this._collectResourceTiming=I.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},ml),I.locale),this._clickTolerance=I.clickTolerance,this._overridePixelRatio=I.pixelRatio,this._maxCanvasSize=I.maxCanvasSize,this.transformCameraUpdate=I.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=I.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=u.addThrottleControl(()=>this.isMoving()),this._requestManager=new b(I.transformRequest),typeof I.container=="string"){if(this._container=document.getElementById(I.container),!this._container)throw new Error(`Container '${I.container}' not found.`)}else{if(!(I.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=I.container}if(I.maxBounds&&this.setMaxBounds(I.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let ht=!1,Et=uf(It=>{this._trackResize&&!this._removed&&(this.resize(It),this.redraw())},50);this._resizeObserver=new ResizeObserver(It=>{ht?Et(It):ht=!0}),this._resizeObserver.observe(this._container)}this.handlers=new rs(this,I),this._hash=I.hash&&new gh(typeof I.hash=="string"&&I.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:I.center,zoom:I.zoom,bearing:I.bearing,pitch:I.pitch}),I.bounds&&(this.resize(),this.fitBounds(I.bounds,e.e({},I.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=I.localIdeographFontFamily,this._validateStyle=I.validateStyle,I.style&&this.setStyle(I.style,{localIdeographFontFamily:I.localIdeographFontFamily}),I.attributionControl&&this.addControl(new fs(typeof I.attributionControl=="boolean"?void 0:I.attributionControl)),I.maplibreLogo&&this.addControl(new no,I.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",ht=>{this._update(ht.dataType==="style"),this.fire(new e.k(`${ht.dataType}data`,ht))}),this.on("dataloading",ht=>{this.fire(new e.k(`${ht.dataType}dataloading`,ht))}),this.on("dataabort",ht=>{this.fire(new e.k("sourcedataabort",ht))})}_getMapId(){return this._mapId}addControl(qt,I){if(I===void 0&&(I=qt.getDefaultPosition?qt.getDefaultPosition():"top-right"),!qt||!qt.onAdd)return this.fire(new e.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let ht=qt.onAdd(this);this._controls.push(qt);let Et=this._controlPositions[I];return I.indexOf("bottom")!==-1?Et.insertBefore(ht,Et.firstChild):Et.appendChild(ht),this}removeControl(qt){if(!qt||!qt.onRemove)return this.fire(new e.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let I=this._controls.indexOf(qt);return I>-1&&this._controls.splice(I,1),qt.onRemove(this),this}hasControl(qt){return this._controls.indexOf(qt)>-1}calculateCameraOptionsFromTo(qt,I,ht,Et){return Et==null&&this.terrain&&(Et=this.terrain.getElevationForLngLatZoom(ht,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(qt,I,ht,Et)}resize(qt){var I;let ht=this._containerDimensions(),Et=ht[0],It=ht[1],Vt=this._getClampedPixelRatio(Et,It);if(this._resizeCanvas(Et,It,Vt),this.painter.resize(Et,It,Vt),this.painter.overLimit()){let Oe=this.painter.context.gl;this._maxCanvasSize=[Oe.drawingBufferWidth,Oe.drawingBufferHeight];let Ke=this._getClampedPixelRatio(Et,It);this._resizeCanvas(Et,It,Ke),this.painter.resize(Et,It,Ke)}this.transform.resize(Et,It),(I=this._requestedCameraState)===null||I===void 0||I.resize(Et,It);let ke=!this._moving;return ke&&(this.stop(),this.fire(new e.k("movestart",qt)).fire(new e.k("move",qt))),this.fire(new e.k("resize",qt)),ke&&this.fire(new e.k("moveend",qt)),this}_getClampedPixelRatio(qt,I){let{0:ht,1:Et}=this._maxCanvasSize,It=this.getPixelRatio(),Vt=qt*It,ke=I*It;return Math.min(Vt>ht?ht/Vt:1,ke>Et?Et/ke:1)*It}getPixelRatio(){var qt;return(qt=this._overridePixelRatio)!==null&&qt!==void 0?qt:devicePixelRatio}setPixelRatio(qt){this._overridePixelRatio=qt,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(qt){return this.transform.setMaxBounds(ut.convert(qt)),this._update()}setMinZoom(qt){if((qt=qt??-2)>=-2&&qt<=this.transform.maxZoom)return this.transform.minZoom=qt,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=qt,this._update(),this.getZoom()>qt&&this.setZoom(qt),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(qt){if((qt=qt??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(qt>=0&&qt<=this.transform.maxPitch)return this.transform.minPitch=qt,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(qt>=this.transform.minPitch)return this.transform.maxPitch=qt,this._update(),this.getPitch()>qt&&this.setPitch(qt),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(qt){return this.transform.renderWorldCopies=qt,this._update()}project(qt){return this.transform.locationPoint(e.N.convert(qt),this.style&&this.terrain)}unproject(qt){return this.transform.pointLocation(e.P.convert(qt),this.terrain)}isMoving(){var qt;return this._moving||((qt=this.handlers)===null||qt===void 0?void 0:qt.isMoving())}isZooming(){var qt;return this._zooming||((qt=this.handlers)===null||qt===void 0?void 0:qt.isZooming())}isRotating(){var qt;return this._rotating||((qt=this.handlers)===null||qt===void 0?void 0:qt.isRotating())}_createDelegatedListener(qt,I,ht){if(qt==="mouseenter"||qt==="mouseover"){let Et=!1;return{layers:I,listener:ht,delegates:{mousemove:It=>{let Vt=I.filter(Oe=>this.getLayer(Oe)),ke=Vt.length!==0?this.queryRenderedFeatures(It.point,{layers:Vt}):[];ke.length?Et||(Et=!0,ht.call(this,new Qc(qt,this,It.originalEvent,{features:ke}))):Et=!1},mouseout:()=>{Et=!1}}}}if(qt==="mouseleave"||qt==="mouseout"){let Et=!1;return{layers:I,listener:ht,delegates:{mousemove:It=>{let Vt=I.filter(ke=>this.getLayer(ke));(Vt.length!==0?this.queryRenderedFeatures(It.point,{layers:Vt}):[]).length?Et=!0:Et&&(Et=!1,ht.call(this,new Qc(qt,this,It.originalEvent)))},mouseout:It=>{Et&&(Et=!1,ht.call(this,new Qc(qt,this,It.originalEvent)))}}}}{let Et=It=>{let Vt=I.filter(Oe=>this.getLayer(Oe)),ke=Vt.length!==0?this.queryRenderedFeatures(It.point,{layers:Vt}):[];ke.length&&(It.features=ke,ht.call(this,It),delete It.features)};return{layers:I,listener:ht,delegates:{[qt]:Et}}}}_saveDelegatedListener(qt,I){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[qt]=this._delegatedListeners[qt]||[],this._delegatedListeners[qt].push(I)}_removeDelegatedListener(qt,I,ht){if(!this._delegatedListeners||!this._delegatedListeners[qt])return;let Et=this._delegatedListeners[qt];for(let It=0;ItI.includes(ke))){for(let ke in Vt.delegates)this.off(ke,Vt.delegates[ke]);return void Et.splice(It,1)}}}on(qt,I,ht){if(ht===void 0)return super.on(qt,I);let Et=this._createDelegatedListener(qt,typeof I=="string"?[I]:I,ht);this._saveDelegatedListener(qt,Et);for(let It in Et.delegates)this.on(It,Et.delegates[It]);return this}once(qt,I,ht){if(ht===void 0)return super.once(qt,I);let Et=typeof I=="string"?[I]:I,It=this._createDelegatedListener(qt,Et,ht);for(let Vt in It.delegates){let ke=It.delegates[Vt];It.delegates[Vt]=(...Oe)=>{this._removeDelegatedListener(qt,Et,ht),ke(...Oe)}}this._saveDelegatedListener(qt,It);for(let Vt in It.delegates)this.once(Vt,It.delegates[Vt]);return this}off(qt,I,ht){return ht===void 0?super.off(qt,I):(this._removeDelegatedListener(qt,typeof I=="string"?[I]:I,ht),this)}queryRenderedFeatures(qt,I){if(!this.style)return[];let ht,Et=qt instanceof e.P||Array.isArray(qt),It=Et?qt:[[0,0],[this.transform.width,this.transform.height]];if(I=I||(Et?{}:qt)||{},It instanceof e.P||typeof It[0]=="number")ht=[e.P.convert(It)];else{let Vt=e.P.convert(It[0]),ke=e.P.convert(It[1]);ht=[Vt,new e.P(ke.x,Vt.y),ke,new e.P(Vt.x,ke.y),Vt]}return this.style.queryRenderedFeatures(ht,I,this.transform)}querySourceFeatures(qt,I){return this.style.querySourceFeatures(qt,I)}setStyle(qt,I){return(I=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},I)).diff!==!1&&I.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&qt?(this._diffStyle(qt,I),this):(this._localIdeographFontFamily=I.localIdeographFontFamily,this._updateStyle(qt,I))}setTransformRequest(qt){return this._requestManager.setTransformRequest(qt),this}_getUIString(qt){let I=this._locale[qt];if(I==null)throw new Error(`Missing UI string '${qt}'`);return I}_updateStyle(qt,I){if(I.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(qt,I));let ht=this.style&&I.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!qt)),qt?(this.style=new Gr(this,I||{}),this.style.setEventedParent(this,{style:this.style}),typeof qt=="string"?this.style.loadURL(qt,I,ht):this.style.loadJSON(qt,I,ht),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Gr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(qt,I){if(typeof qt=="string"){let ht=this._requestManager.transformRequest(qt,"Style");e.h(ht,new AbortController).then(Et=>{this._updateDiff(Et.data,I)}).catch(Et=>{Et&&this.fire(new e.j(Et))})}else typeof qt=="object"&&this._updateDiff(qt,I)}_updateDiff(qt,I){try{this.style.setState(qt,I)&&this._update(!0)}catch(ht){e.w(`Unable to perform style diff: ${ht.message||ht.error||ht}. Rebuilding the style from scratch.`),this._updateStyle(qt,I)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():e.w("There is no style added to the map.")}addSource(qt,I){return this._lazyInitEmptyStyle(),this.style.addSource(qt,I),this._update(!0)}isSourceLoaded(qt){let I=this.style&&this.style.sourceCaches[qt];if(I!==void 0)return I.loaded();this.fire(new e.j(new Error(`There is no source with ID '${qt}'`)))}setTerrain(qt){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),qt){let I=this.style.sourceCaches[qt.source];if(!I)throw new Error(`cannot load terrain, because there exists no source with ID: ${qt.source}`);this.terrain===null&&I.reload();for(let ht in this.style._layers){let Et=this.style._layers[ht];Et.type==="hillshade"&&Et.source===qt.source&&e.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Pl(this.painter,I,qt),this.painter.renderToTexture=new au(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=ht=>{ht.dataType==="style"?this.terrain.sourceCache.freeRtt():ht.dataType==="source"&&ht.tile&&(ht.sourceId!==qt.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(ht.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new e.k("terrain",{terrain:qt})),this}getTerrain(){var qt,I;return(I=(qt=this.terrain)===null||qt===void 0?void 0:qt.options)!==null&&I!==void 0?I:null}areTilesLoaded(){let qt=this.style&&this.style.sourceCaches;for(let I in qt){let ht=qt[I]._tiles;for(let Et in ht){let It=ht[Et];if(It.state!=="loaded"&&It.state!=="errored")return!1}}return!0}removeSource(qt){return this.style.removeSource(qt),this._update(!0)}getSource(qt){return this.style.getSource(qt)}addImage(qt,I,ht={}){let{pixelRatio:Et=1,sdf:It=!1,stretchX:Vt,stretchY:ke,content:Oe,textFitWidth:Ke,textFitHeight:gr}=ht;if(this._lazyInitEmptyStyle(),!(I instanceof HTMLImageElement||e.b(I))){if(I.width===void 0||I.height===void 0)return this.fire(new e.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:Or,height:Dr,data:ln}=I,Sn=I;return this.style.addImage(qt,{data:new e.R({width:Or,height:Dr},new Uint8Array(ln)),pixelRatio:Et,stretchX:Vt,stretchY:ke,content:Oe,textFitWidth:Ke,textFitHeight:gr,sdf:It,version:0,userImage:Sn}),Sn.onAdd&&Sn.onAdd(this,qt),this}}{let{width:Or,height:Dr,data:ln}=o.getImageData(I);this.style.addImage(qt,{data:new e.R({width:Or,height:Dr},ln),pixelRatio:Et,stretchX:Vt,stretchY:ke,content:Oe,textFitWidth:Ke,textFitHeight:gr,sdf:It,version:0})}}updateImage(qt,I){let ht=this.style.getImage(qt);if(!ht)return this.fire(new e.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let Et=I instanceof HTMLImageElement||e.b(I)?o.getImageData(I):I,{width:It,height:Vt,data:ke}=Et;if(It===void 0||Vt===void 0)return this.fire(new e.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(It!==ht.data.width||Vt!==ht.data.height)return this.fire(new e.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));let Oe=!(I instanceof HTMLImageElement||e.b(I));return ht.data.replace(ke,Oe),this.style.updateImage(qt,ht),this}getImage(qt){return this.style.getImage(qt)}hasImage(qt){return qt?!!this.style.getImage(qt):(this.fire(new e.j(new Error("Missing required image id"))),!1)}removeImage(qt){this.style.removeImage(qt)}loadImage(qt){return u.getImage(this._requestManager.transformRequest(qt,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(qt,I){return this._lazyInitEmptyStyle(),this.style.addLayer(qt,I),this._update(!0)}moveLayer(qt,I){return this.style.moveLayer(qt,I),this._update(!0)}removeLayer(qt){return this.style.removeLayer(qt),this._update(!0)}getLayer(qt){return this.style.getLayer(qt)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(qt,I,ht){return this.style.setLayerZoomRange(qt,I,ht),this._update(!0)}setFilter(qt,I,ht={}){return this.style.setFilter(qt,I,ht),this._update(!0)}getFilter(qt){return this.style.getFilter(qt)}setPaintProperty(qt,I,ht,Et={}){return this.style.setPaintProperty(qt,I,ht,Et),this._update(!0)}getPaintProperty(qt,I){return this.style.getPaintProperty(qt,I)}setLayoutProperty(qt,I,ht,Et={}){return this.style.setLayoutProperty(qt,I,ht,Et),this._update(!0)}getLayoutProperty(qt,I){return this.style.getLayoutProperty(qt,I)}setGlyphs(qt,I={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(qt,I),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(qt,I,ht={}){return this._lazyInitEmptyStyle(),this.style.addSprite(qt,I,ht,Et=>{Et||this._update(!0)}),this}removeSprite(qt){return this._lazyInitEmptyStyle(),this.style.removeSprite(qt),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(qt,I={}){return this._lazyInitEmptyStyle(),this.style.setSprite(qt,I,ht=>{ht||this._update(!0)}),this}setLight(qt,I={}){return this._lazyInitEmptyStyle(),this.style.setLight(qt,I),this._update(!0)}getLight(){return this.style.getLight()}setSky(qt){return this._lazyInitEmptyStyle(),this.style.setSky(qt),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(qt,I){return this.style.setFeatureState(qt,I),this._update()}removeFeatureState(qt,I){return this.style.removeFeatureState(qt,I),this._update()}getFeatureState(qt){return this.style.getFeatureState(qt)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let qt=0,I=0;return this._container&&(qt=this._container.clientWidth||400,I=this._container.clientHeight||300),[qt,I]}_setupContainer(){let qt=this._container;qt.classList.add("maplibregl-map");let I=this._canvasContainer=i.create("div","maplibregl-canvas-container",qt);this._interactive&&I.classList.add("maplibregl-interactive"),this._canvas=i.create("canvas","maplibregl-canvas",I),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let ht=this._containerDimensions(),Et=this._getClampedPixelRatio(ht[0],ht[1]);this._resizeCanvas(ht[0],ht[1],Et);let It=this._controlContainer=i.create("div","maplibregl-control-container",qt),Vt=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ke=>{Vt[ke]=i.create("div",`maplibregl-ctrl-${ke} `,It)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(qt,I,ht){this._canvas.width=Math.floor(ht*qt),this._canvas.height=Math.floor(ht*I),this._canvas.style.width=`${qt}px`,this._canvas.style.height=`${I}px`}_setupPainter(){let qt={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},I=null;this._canvas.addEventListener("webglcontextcreationerror",Et=>{I={requestedAttributes:qt},Et&&(I.statusMessage=Et.statusMessage,I.type=Et.type)},{once:!0});let ht=this._canvas.getContext("webgl2",qt)||this._canvas.getContext("webgl",qt);if(!ht){let Et="Failed to initialize WebGL";throw I?(I.message=Et,new Error(JSON.stringify(I))):new Error(Et)}this.painter=new Hh(ht,this.transform),s.testSupport(ht)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(qt){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||qt,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(qt){return this._update(),this._renderTaskQueue.add(qt)}_cancelRenderFrame(qt){this._renderTaskQueue.remove(qt)}_render(qt){let I=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(qt),this._removed)return;let ht=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let It=this.transform.zoom,Vt=o.now();this.style.zoomHistory.update(It,Vt);let ke=new e.z(It,{now:Vt,fadeDuration:I,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Oe=ke.crossFadingFactor();Oe===1&&Oe===this._crossFadingFactor||(ht=!0,this._crossFadingFactor=Oe),this.style.update(ke)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,I,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:I,showPadding:this.showPadding}),this.fire(new e.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,e.bf.mark(e.bg.load),this.fire(new e.k("load"))),this.style&&(this.style.hasTransitions()||ht)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Et=this._sourcesDirty||this._styleDirty||this._placementDirty;return Et||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.k("idle")),!this._loaded||this._fullyLoaded||Et||(this._fullyLoaded=!0,e.bf.mark(e.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var qt;this._hash&&this._hash.remove();for(let ht of this._controls)ht.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),u.removeThrottleControl(this._imageQueueHandle),(qt=this._resizeObserver)===null||qt===void 0||qt.disconnect();let I=this.painter.context.gl.getExtension("WEBGL_lose_context");I!=null&&I.loseContext&&I.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),i.remove(this._canvasContainer),i.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),e.bf.clearMetrics(),this._removed=!0,this.fire(new e.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,o.frameAsync(this._frameRequest).then(qt=>{e.bf.frame(qt),this._frameRequest=null,this._render(qt)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(qt){this._showTileBoundaries!==qt&&(this._showTileBoundaries=qt,this._update())}get showPadding(){return!!this._showPadding}set showPadding(qt){this._showPadding!==qt&&(this._showPadding=qt,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(qt){this._showCollisionBoxes!==qt&&(this._showCollisionBoxes=qt,qt?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(qt){this._showOverdrawInspector!==qt&&(this._showOverdrawInspector=qt,this._update())}get repaint(){return!!this._repaint}set repaint(qt){this._repaint!==qt&&(this._repaint=qt,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(qt){this._vertices=qt,this._update()}get version(){return qu}getCameraTargetElevation(){return this.transform.elevation}},t.MapMouseEvent=Qc,t.MapTouchEvent=ff,t.MapWheelEvent=Pf,t.Marker=Pc,t.NavigationControl=class{constructor(qt){this._updateZoomButtons=()=>{let I=this._map.getZoom(),ht=I===this._map.getMaxZoom(),Et=I===this._map.getMinZoom();this._zoomInButton.disabled=ht,this._zoomOutButton.disabled=Et,this._zoomInButton.setAttribute("aria-disabled",ht.toString()),this._zoomOutButton.setAttribute("aria-disabled",Et.toString())},this._rotateCompassArrow=()=>{let I=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=I},this._setButtonTitle=(I,ht)=>{let Et=this._map._getUIString(`NavigationControl.${ht}`);I.title=Et,I.setAttribute("aria-label",Et)},this.options=e.e({},zo,qt),this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",I=>I.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",I=>this._map.zoomIn({},{originalEvent:I})),i.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",I=>this._map.zoomOut({},{originalEvent:I})),i.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",I=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:I}):this._map.resetNorth({},{originalEvent:I})}),this._compassIcon=i.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(qt){return this._map=qt,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Ms(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){i.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(qt,I){let ht=i.create("button",qt,this._container);return ht.type="button",ht.addEventListener("click",I),ht}},t.Popup=class extends e.E{constructor(qt){super(),this.remove=()=>(this._content&&i.remove(this._content),this._container&&(i.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.k("close"))),this),this._onMouseUp=I=>{this._update(I.point)},this._onMouseMove=I=>{this._update(I.point)},this._onDrag=I=>{this._update(I.point)},this._update=I=>{var ht;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=i.create("div","maplibregl-popup",this._map.getContainer()),this._tip=i.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let Oe of this.options.className.split(" "))this._container.classList.add(Oe);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?Fl(this._lngLat,this._flatPos,this._map.transform):(ht=this._lngLat)===null||ht===void 0?void 0:ht.wrap(),this._trackPointer&&!I)return;let Et=this._flatPos=this._pos=this._trackPointer&&I?I:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&I?I:this._map.transform.locationPoint(this._lngLat));let It=this.options.anchor,Vt=Zu(this.options.offset);if(!It){let Oe=this._container.offsetWidth,Ke=this._container.offsetHeight,gr;gr=Et.y+Vt.bottom.ythis._map.transform.height-Ke?["bottom"]:[],Et.xthis._map.transform.width-Oe/2&&gr.push("right"),It=gr.length===0?"bottom":gr.join("-")}let ke=Et.add(Vt[It]);this.options.subpixelPositioning||(ke=ke.round()),i.setTransform(this._container,`${vc[It]} translate(${ke.x}px,${ke.y}px)`),Hc(this._container,It,"popup")},this._onClose=()=>{this.remove()},this.options=e.e(Object.create(zs),qt)}addTo(qt){return this._map&&this.remove(),this._map=qt,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new e.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(qt){return this._lngLat=e.N.convert(qt),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(qt){return this.setDOMContent(document.createTextNode(qt))}setHTML(qt){let I=document.createDocumentFragment(),ht=document.createElement("body"),Et;for(ht.innerHTML=qt;Et=ht.firstChild,Et;)I.appendChild(Et);return this.setDOMContent(I)}getMaxWidth(){var qt;return(qt=this._container)===null||qt===void 0?void 0:qt.style.maxWidth}setMaxWidth(qt){return this.options.maxWidth=qt,this._update(),this}setDOMContent(qt){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=i.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(qt),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(qt){return this._container&&this._container.classList.add(qt),this}removeClassName(qt){return this._container&&this._container.classList.remove(qt),this}setOffset(qt){return this.options.offset=qt,this._update(),this}toggleClassName(qt){if(this._container)return this._container.classList.toggle(qt)}setSubpixelPositioning(qt){this.options.subpixelPositioning=qt}_createCloseButton(){this.options.closeButton&&(this._closeButton=i.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let qt=this._container.querySelector(qc);qt&&qt.focus()}},t.RasterDEMTileSource=Wt,t.RasterTileSource=Pt,t.ScaleControl=class{constructor(qt){this._onMove=()=>{Ih(this._map,this._container,this.options)},this.setUnit=I=>{this.options.unit=I,Ih(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Iu),qt)}getDefaultPosition(){return"bottom-left"}onAdd(qt){return this._map=qt,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-scale",qt.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){i.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},t.ScrollZoomHandler=Wn,t.Style=Gr,t.TerrainControl=class{constructor(qt){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=qt}onAdd(qt){return this._map=qt,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=i.create("button","maplibregl-ctrl-terrain",this._container),i.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){i.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},t.TwoFingersTouchPitchHandler=qf,t.TwoFingersTouchRotateHandler=df,t.TwoFingersTouchZoomHandler=eu,t.TwoFingersTouchZoomRotateHandler=ua,t.VectorTileSource=zt,t.VideoSource=he,t.addSourceType=(qt,I)=>e._(void 0,void 0,void 0,function*(){if(Tt(qt))throw new Error(`A source type called "${qt}" already exists.`);((ht,Et)=>{se[ht]=Et})(qt,I)}),t.clearPrewarmedResources=function(){let qt=st;qt&&(qt.isPreloaded()&&qt.numActive()===1?(qt.release(lt),st=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},t.getMaxParallelImageRequests=function(){return e.a.MAX_PARALLEL_IMAGE_REQUESTS},t.getRTLTextPluginStatus=function(){return ve().getRTLTextPluginStatus()},t.getVersion=function(){return Zf},t.getWorkerCount=function(){return yt.workerCount},t.getWorkerUrl=function(){return e.a.WORKER_URL},t.importScriptInWorkers=function(qt){return at().broadcast("IS",qt)},t.prewarm=function(){dt().acquire(lt)},t.setMaxParallelImageRequests=function(qt){e.a.MAX_PARALLEL_IMAGE_REQUESTS=qt},t.setRTLTextPlugin=function(qt,I){return ve().setRTLTextPlugin(qt,I)},t.setWorkerCount=function(qt){yt.workerCount=qt},t.setWorkerUrl=function(qt){e.a.WORKER_URL=qt}});var S=c;return S})}),CW=Ft((Q,$)=>{var c=bn(),g=tc().sanitizeHTML,P=vE(),S=Z1();function t(o,i){this.subplot=o,this.uid=o.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=S.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=t.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=r(o)},e.needsNewImage=function(o){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&o.sourcetype==="image"&&(this.source!==o.source||JSON.stringify(this.coordinates)!==JSON.stringify(o.coordinates))},e.needsNewSource=function(o){return this.sourceType!==o.sourcetype||JSON.stringify(this.source)!==JSON.stringify(o.source)||this.layerType!==o.type},e.needsNewLayer=function(o){return this.layerType!==o.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(o){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:o.source,coordinates:o.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},e.updateSource=function(o){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=o.sourcetype,this.source=o.source,!!r(o)){var s=n(o);i.addSource(this.idSource,s)}},e.findFollowingMapLayerId=function(o){if(o==="traces")for(var i=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function a(o){var i={},s={};switch(o.type){case"circle":c.extendFlat(s,{"circle-radius":o.circle.radius,"circle-color":o.color,"circle-opacity":o.opacity});break;case"line":c.extendFlat(s,{"line-width":o.line.width,"line-color":o.color,"line-opacity":o.opacity,"line-dasharray":o.line.dash});break;case"fill":c.extendFlat(s,{"fill-color":o.color,"fill-outline-color":o.fill.outlinecolor,"fill-opacity":o.opacity});break;case"symbol":var f=o.symbol,x=P(f.textposition,f.iconsize);c.extendFlat(i,{"icon-image":f.icon+"-15","icon-size":f.iconsize/10,"text-field":f.text,"text-size":f.textfont.size,"text-anchor":x.anchor,"text-offset":x.offset,"symbol-placement":f.placement}),c.extendFlat(s,{"icon-color":o.color,"text-color":f.textfont.color,"text-opacity":o.opacity});break;case"raster":c.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":o.opacity});break}return{layout:i,paint:s}}function n(o){var i=o.sourcetype,s=o.source,f={type:i},x;return i==="geojson"?x="data":i==="vector"?x=typeof s=="string"?"url":"tiles":i==="raster"?(x="tiles",f.tileSize=256):i==="image"&&(x="url",f.coordinates=o.coordinates),f[x]=s,o.sourceattribution&&(f.attribution=g(o.sourceattribution)),f}$.exports=function(o,i,s){var f=new t(o,i);return f.update(s),f}}),LW=Ft((Q,$)=>{var c=EW(),g=bn(),P=V1(),S=Xo(),t=Es(),e=up(),r=Qh(),a=v0(),n=a.drawMode,o=a.selectMode,i=vf().prepSelect,s=vf().clearOutline,f=vf().clearSelectionsCache,x=vf().selectOnClick,y=Z1(),v=CW();function T(E,A){this.id=A,this.gd=E;var h=E._fullLayout,p=E._context;this.container=h._glcontainer.node(),this.isStatic=p.staticPlot,this.uid=h._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(h),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var u=T.prototype;u.plot=function(E,A,h){var p=this,k;p.map?k=new Promise(function(w,R){p.updateMap(E,A,w,R)}):k=new Promise(function(w,R){p.createMap(E,A,w,R)}),h.push(k)},u.createMap=function(E,A,h,p){var k=this,w=A[k.id],R=k.styleObj=_(w.style),O=w.bounds,N=O?[[O.west,O.south],[O.east,O.north]]:null,V=k.map=new c.Map({container:k.div,style:R.style,center:M(w.center),zoom:w.zoom,bearing:w.bearing,pitch:w.pitch,maxBounds:N,interactive:!k.isStatic,preserveDrawingBuffer:k.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new c.AttributionControl({compact:!0})),H={};V.on("styleimagemissing",function(U){var W=U.id;if(!H[W]&&W.includes("-15")){H[W]=!0;var q=new Image(15,15);q.onload=function(){V.addImage(W,q)},q.crossOrigin="Anonymous",q.src="https://unpkg.com/maki@2.1.0/icons/"+W+".svg"}}),V.setTransformRequest(function(U){return U=U.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),U=U.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),U=U.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:U}}),V._canvas.style.left="0px",V._canvas.style.top="0px",k.rejectOnError(p),k.isStatic||k.initFx(E,A);var F=[];F.push(new Promise(function(U){V.once("load",U)})),F=F.concat(P.fetchTraceGeoData(E)),Promise.all(F).then(function(){k.fillBelowLookup(E,A),k.updateData(E),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.updateMap=function(E,A,h,p){var k=this,w=k.map,R=A[this.id];k.rejectOnError(p);var O=[],N=_(R.style);JSON.stringify(k.styleObj)!==JSON.stringify(N)&&(k.styleObj=N,w.setStyle(N.style),k.traceHash={},O.push(new Promise(function(V){w.once("styledata",V)}))),O=O.concat(P.fetchTraceGeoData(E)),Promise.all(O).then(function(){k.fillBelowLookup(E,A),k.updateData(E),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.fillBelowLookup=function(E,A){var h=A[this.id],p=h.layers,k,w,R=this.belowLookup={},O=!1;for(k=0;k1)for(k=0;k-1&&x(N.originalEvent,p,[h.xaxis],[h.yaxis],h.id,O),V.indexOf("event")>-1&&r.click(p,N.originalEvent)}}},u.updateFx=function(E){var A=this,h=A.map,p=A.gd;if(A.isStatic)return;function k(N){var V=A.map.unproject(N);return[V.lng,V.lat]}var w=E.dragmode,R;R=function(N,V){if(V.isRect){var H=N.range={};H[A.id]=[k([V.xmin,V.ymin]),k([V.xmax,V.ymax])]}else{var F=N.lassoPoints={};F[A.id]=V.map(k)}};var O=A.dragOptions;A.dragOptions=g.extendDeep(O||{},{dragmode:E.dragmode,element:A.div,gd:p,plotinfo:{id:A.id,domain:E[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis,fillRangeItems:R},xaxes:[A.xaxis],yaxes:[A.yaxis],subplot:A.id}),h.off("click",A.onClickInPanHandler),o(w)||n(w)?(h.dragPan.disable(),h.on("zoomstart",A.clearOutline),A.dragOptions.prepFn=function(N,V,H){i(N,V,H,A.dragOptions,w)},e.init(A.dragOptions)):(h.dragPan.enable(),h.off("zoomstart",A.clearOutline),A.div.onmousedown=null,A.div.ontouchstart=null,A.div.removeEventListener("touchstart",A.div._ontouchstart),A.onClickInPanHandler=A.onClickInPanFn(A.dragOptions),h.on("click",A.onClickInPanHandler))},u.updateFramework=function(E){var A=E[this.id].domain,h=E._size,p=this.div.style;p.width=h.w*(A.x[1]-A.x[0])+"px",p.height=h.h*(A.y[1]-A.y[0])+"px",p.left=h.l+A.x[0]*h.w+"px",p.top=h.t+(1-A.y[1])*h.h+"px",this.xaxis._offset=h.l+A.x[0]*h.w,this.xaxis._length=h.w*(A.x[1]-A.x[0]),this.yaxis._offset=h.t+(1-A.y[1])*h.h,this.yaxis._length=h.h*(A.y[1]-A.y[0])},u.updateLayers=function(E){var A=E[this.id],h=A.layers,p=this.layerList,k;if(h.length!==p.length){for(k=0;k{var c=bn(),g=P1(),P=Md(),S=S3();$.exports=function(r,a,n){g(r,a,n,{type:"map",attributes:S,handleDefaults:t,partition:"y"})};function t(r,a,n){n("style"),n("center.lon"),n("center.lat"),n("zoom"),n("bearing"),n("pitch");var o=n("bounds.west"),i=n("bounds.east"),s=n("bounds.south"),f=n("bounds.north");(o===void 0||i===void 0||s===void 0||f===void 0)&&delete a.bounds,P(r,a,{name:"layers",handleItemDefaults:e}),a._input=r}function e(r,a){function n(y,v){return c.coerce(r,a,S.layers,y,v)}var o=n("visible");if(o){var i=n("sourcetype"),s=i==="raster"||i==="image";n("source"),n("sourceattribution"),i==="vector"&&n("sourcelayer"),i==="image"&&n("coordinates");var f;s&&(f="raster");var x=n("type",f);s&&x!=="raster"&&(x=a.type="raster",c.log("Source types *raster* and *image* must drawn *raster* layer type.")),n("below"),n("color"),n("opacity"),n("minzoom"),n("maxzoom"),x==="circle"&&n("circle.radius"),x==="line"&&(n("line.width"),n("line.dash")),x==="fill"&&n("fill.outlinecolor"),x==="symbol"&&(n("symbol.icon"),n("symbol.iconsize"),n("symbol.text"),c.coerceFont(n,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),n("symbol.textposition"),n("symbol.placement"))}}}),yT=Ft(Q=>{var $=bn(),c=$.strTranslate,g=$.strScale,P=ud().getSubplotCalcData,S=Op(),t=un(),e=js(),r=tc(),a=LW(),n="map";Q.name=n,Q.attr="subplot",Q.idRoot=n,Q.idRegex=Q.attrRegex=$.counterRegex(n),Q.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}},Q.layoutAttributes=S3(),Q.supplyLayoutDefaults=PW(),Q.plot=function(o){for(var i=o._fullLayout,s=o.calcdata,f=i._subplots[n],x=0;xh/2){var p=C.split("|").join("
");E.text(p).attr("data-unformatted",p).call(r.convertToTspans,o),A=e.bBox(E.node())}E.attr("transform",c(-3,-A.height+8)),M.insert("rect",".static-attribution").attr({x:-A.width-6,y:-A.height-3,width:A.width+6,height:A.height+3,fill:"rgba(255, 255, 255, 0.75)"});var k=1;A.width+6>h&&(k=h/(A.width+6));var w=[f.l+f.w*v.x[1],f.t+f.h*(1-v.y[0])];M.attr("transform",c(w[0],w[1])+g(k))}},Q.updateFx=function(o){for(var i=o._fullLayout,s=i._subplots[n],f=0;f{$.exports={attributes:gT(),supplyDefaults:kW(),colorbar:xo(),formatLabels:gE(),calc:$k(),plot:AW(),hoverPoints:vT().hoverPoints,eventData:MW(),selectPoints:SW(),styleOnSelect:function(c,g){if(g){var P=g[0].trace;P._glTrace.update(g)}},moduleType:"trace",name:"scattermap",basePlotModule:yT(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}}),IW=Ft((Q,$)=>{$.exports=zW()}),yE=Ft((Q,$)=>{var c=fb(),g=Tc(),{hovertemplateAttrs:P,templatefallbackAttrs:S}=$u(),t=$o(),e=Ta().extendFlat;$.exports=e({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:e({},c.featureidkey,{}),below:{valType:"string",editType:"plot"},text:c.text,hovertext:c.hovertext,marker:{line:{color:e({},c.marker.line.color,{editType:"plot"}),width:e({},c.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:e({},c.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:e({},c.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:e({},c.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:c.hoverinfo,hovertemplate:P({},{keys:["properties"]}),hovertemplatefallback:S(),showlegend:e({},t.showlegend,{dflt:!1})},g("",{cLetter:"z",editTypeOverride:"calc"}))}),OW=Ft((Q,$)=>{var c=bn(),g=mc(),P=yE();$.exports=function(S,t,e,r){function a(f,x){return c.coerce(S,t,P,f,x)}var n=a("locations"),o=a("z"),i=a("geojson");if(!c.isArrayOrTypedArray(n)||!n.length||!c.isArrayOrTypedArray(o)||!o.length||!(typeof i=="string"&&i!==""||c.isPlainObject(i))){t.visible=!1;return}a("featureidkey"),t._length=Math.min(n.length,o.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var s=a("marker.line.width");s&&a("marker.line.color"),a("marker.opacity"),g(S,t,r,a,{prefix:"",cLetter:"z"}),c.coerceSelectionMarkerOpacity(t,a)}}),xE=Ft((Q,$)=>{var c=ra(),g=bn(),P=Xc(),S=js(),t=U1().makeBlank,e=V1();function r(n){var o=n[0].trace,i=o.visible===!0&&o._length!==0,s={layout:{visibility:"none"},paint:{}},f={layout:{visibility:"none"},paint:{}},x=o._opts={fill:s,line:f,geojson:t()};if(!i)return x;var y=e.extractTraceFeature(n);if(!y)return x;var v=P.makeColorScaleFuncFromTrace(o),T=o.marker,u=T.line||{},b;g.isArrayOrTypedArray(T.opacity)&&(b=function(k){var w=k.mo;return c(w)?+g.constrain(w,0,1):0});var _;g.isArrayOrTypedArray(u.color)&&(_=function(k){return k.mlc});var C;g.isArrayOrTypedArray(u.width)&&(C=function(k){return k.mlw});for(var M=0;M{var c=xE().convert,g=xE().convertOnSelect,P=Z1().traceLayerPrefix;function S(e,r){this.type="choroplethmap",this.subplot=e,this.uid=r,this.sourceId="source-"+r,this.layerList=[["fill",P+r+"-fill"],["line",P+r+"-line"]],this.below=null}var t=S.prototype;t.update=function(e){this._update(c(e)),e[0].trace._glTrace=this},t.updateOnSelect=function(e){this._update(g(e))},t._update=function(e){var r=this.subplot,a=this.layerList,n=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var o=0;o=0;a--)e.removeLayer(r[a][1])},t.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},$.exports=function(e,r){var a=r[0].trace,n=new S(e,a.uid),o=n.sourceId,i=c(r),s=n.below=e.belowLookup["trace-"+a.uid];return e.map.addSource(o,{type:"geojson",data:i.geojson}),n._addLayers(i,s),r[0].trace._glTrace=n,n}}),FW=Ft((Q,$)=>{$.exports={attributes:yE(),supplyDefaults:OW(),colorbar:L1(),calc:Xk(),plot:DW(),hoverPoints:Qk(),eventData:tT(),selectPoints:eT(),styleOnSelect:function(c,g){if(g){var P=g[0].trace;P._glTrace.updateOnSelect(g)}},getBelow:function(c,g){for(var P=g.getMapLayers(),S=P.length-2;S>=0;S--){var t=P[S].id;if(typeof t=="string"&&t.indexOf("water")===0){for(var e=S+1;e{$.exports=FW()}),_E=Ft((Q,$)=>{var c=Tc(),{hovertemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=$o(),t=gT(),e=Ta().extendFlat;$.exports=e({lon:t.lon,lat:t.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:t.text,hovertext:t.hovertext,hoverinfo:e({},S.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:g(),hovertemplatefallback:P(),showlegend:e({},S.showlegend,{dflt:!1})},c("",{cLetter:"z",editTypeOverride:"calc"}))}),BW=Ft((Q,$)=>{var c=bn(),g=mc(),P=_E();$.exports=function(S,t,e,r){function a(s,f){return c.coerce(S,t,P,s,f)}var n=a("lon")||[],o=a("lat")||[],i=Math.min(n.length,o.length);if(!i){t.visible=!1;return}t._length=i,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),g(S,t,r,a,{prefix:"",cLetter:"z"})}}),NW=Ft((Q,$)=>{var c=ra(),g=bn().isArrayOrTypedArray,P=Da().BADNUM,S=Jd(),t=bn()._;$.exports=function(e,r){for(var a=r._length,n=new Array(a),o=r.z,i=g(o)&&o.length,s=0;s{var c=ra(),g=bn(),P=li(),S=Xc(),t=Da().BADNUM,e=U1().makeBlank;$.exports=function(r){var a=r[0].trace,n=a.visible===!0&&a._length!==0,o={layout:{visibility:"none"},paint:{}},i=a._opts={heatmap:o,geojson:e()};if(!n)return i;var s=[],f,x=a.z,y=a.radius,v=g.isArrayOrTypedArray(x)&&x.length,T=g.isArrayOrTypedArray(y);for(f=0;f0?+y[f]:0),s.push({type:"Feature",geometry:{type:"Point",coordinates:b},properties:_})}}var M=S.extractOpts(a),E=M.reversescale?S.flipScale(M.colorscale):M.colorscale,A=E[0][1],h=P.opacity(A)<1?A:P.addOpacity(A,0),p=["interpolate",["linear"],["heatmap-density"],0,h];for(f=1;f{var c=jW(),g=Z1().traceLayerPrefix;function P(t,e){this.type="densitymap",this.subplot=t,this.uid=e,this.sourceId="source-"+e,this.layerList=[["heatmap",g+e+"-heatmap"]],this.below=null}var S=P.prototype;S.update=function(t){var e=this.subplot,r=this.layerList,a=c(t),n=e.belowLookup["trace-"+this.uid];e.map.getSource(this.sourceId).setData(a.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(a,n),this.below=n);for(var o=0;o=0;r--)t.removeLayer(e[r][1])},S.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},$.exports=function(t,e){var r=e[0].trace,a=new P(t,r.uid),n=a.sourceId,o=c(e),i=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(n,{type:"geojson",data:o.geojson}),a._addLayers(o,i),a}}),VW=Ft((Q,$)=>{var c=Es(),g=vT().hoverPoints,P=vT().getExtraText;$.exports=function(S,t,e){var r=g(S,t,e);if(r){var a=r[0],n=a.cd,o=n[0].trace,i=n[a.index];if(delete a.color,"z"in i){var s=a.subplot.mockAxis;a.z=i.z,a.zLabel=c.tickText(s,s.c2l(i.z),"hover").text}return a.extraText=P(o,i,n[0].t.labels),[a]}}}),HW=Ft((Q,$)=>{$.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c.z=g.z,c}}),WW=Ft((Q,$)=>{$.exports={attributes:_E(),supplyDefaults:BW(),colorbar:L1(),formatLabels:gE(),calc:NW(),plot:UW(),hoverPoints:VW(),eventData:HW(),getBelow:function(c,g){for(var P=g.getMapLayers(),S=0;S{$.exports=WW()}),bE=Ft((Q,$)=>{var c=Ea(),g=$o(),P=bi(),S=Ps(),t=Nh().attributes,{hovertemplateAttrs:e,templatefallbackAttrs:r}=$u(),a=Tc(),n=pu().templatedArray,o=fh().descriptionOnlyNumbers,i=Ta().extendFlat,s=Yc().overrideAll;$.exports=s({hoverinfo:i({},g.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:S.hoverlabel,domain:t({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:o("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:c({autoShadowDflt:!0}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:P.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:S.hoverlabel,hovertemplate:e({},{keys:["value","label"]}),hovertemplatefallback:r(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:P.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:S.hoverlabel,hovertemplate:e({},{keys:["value","label"]}),hovertemplatefallback:r(),colorscales:n("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:i(a().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")}),ZW=Ft((Q,$)=>{var c=bn(),g=bE(),P=li(),S=fo(),t=Nh().defaults,e=bg(),r=pu(),a=Md();$.exports=function(o,i,s,f){function x(R,O){return c.coerce(o,i,g,R,O)}var y=c.extendDeep(f.hoverlabel,o.hoverlabel),v=o.node,T=r.newContainer(i,"node");function u(R,O){return c.coerce(v,T,g.node,R,O)}u("label"),u("groups"),u("x"),u("y"),u("pad"),u("thickness"),u("line.color"),u("line.width"),u("hoverinfo",o.hoverinfo),e(v,T,u,y),u("hovertemplate"),u("align");var b=f.colorway,_=function(R){return b[R%b.length]};u("color",T.label.map(function(R,O){return P.addOpacity(_(O),.8)})),u("customdata");var C=o.link||{},M=r.newContainer(i,"link");function E(R,O){return c.coerce(C,M,g.link,R,O)}E("label"),E("arrowlen"),E("source"),E("target"),E("value"),E("line.color"),E("line.width"),E("hoverinfo",o.hoverinfo),e(C,M,E,y),E("hovertemplate");var A=S(f.paper_bgcolor).getLuminance()<.333,h=A?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",p=E("color",h);function k(R){var O=S(R);if(!O.isValid())return R;var N=O.getAlpha();return N<=.8?O.setAlpha(N+.2):O=A?O.brighten():O.darken(),O.toRgbString()}E("hovercolor",Array.isArray(p)?p.map(k):k(p)),E("customdata"),a(C,M,{name:"colorscales",handleItemDefaults:n}),t(i,f,x),x("orientation"),x("valueformat"),x("valuesuffix");var w;T.x.length&&T.y.length&&(w="freeform"),x("arrangement",w),c.coerceFont(x,"textfont",f.font,{autoShadowDflt:!0}),i._length=null};function n(o,i){function s(f,x){return c.coerce(o,i,g.link.colorscales,f,x)}s("label"),s("cmin"),s("cmax"),s("colorscale")}}),wE=Ft((Q,$)=>{$.exports=c;function c(g){for(var P=g.length,S=new Array(P),t=new Array(P),e=new Array(P),r=new Array(P),a=new Array(P),n=new Array(P),o=0;o0;){u=_[_.length-1];var C=g[u];if(r[u]=0&&n[u].push(a[E])}r[u]=M}else{if(t[u]===S[u]){for(var A=[],h=[],p=0,M=b.length-1;M>=0;--M){var k=b[M];if(e[k]=!1,A.push(k),h.push(n[k]),p+=n[k].length,a[k]=s.length,k===u){b.length=M;break}}s.push(A);for(var w=new Array(p),M=0;M{var c=wE(),g=bn(),P=Lg().wrap,S=g.isArrayOrTypedArray,t=g.isIndex,e=Xc();function r(n){var o=n.node,i=n.link,s=[],f=S(i.color),x=S(i.hovercolor),y=S(i.customdata),v={},T={},u=i.colorscales.length,b;for(b=0;bE&&(E=i.source[b]),i.target[b]>E&&(E=i.target[b]);var A=E+1;n.node._count=A;var h,p=n.node.groups,k={};for(b=0;b0&&t(H,A)&&t(F,A)&&!(k.hasOwnProperty(H)&&k.hasOwnProperty(F)&&k[H]===k[F])){k.hasOwnProperty(F)&&(F=k[F]),k.hasOwnProperty(H)&&(H=k[H]),H=+H,F=+F,v[H]=v[F]=!0;var U="";i.label&&i.label[b]&&(U=i.label[b]);var W=null;U&&T.hasOwnProperty(U)&&(W=T[U]),s.push({pointNumber:b,label:U,color:f?i.color[b]:i.color,hovercolor:x?i.hovercolor[b]:i.hovercolor,customdata:y?i.customdata[b]:i.customdata,concentrationscale:W,source:H,target:F,value:+V}),N.source.push(H),N.target.push(F)}}var q=A+p.length,X=S(o.color),lt=S(o.customdata),yt=[];for(b=0;bA-1,childrenNodes:[],pointNumber:b,label:pt,color:X?o.color[b]:o.color,customdata:lt?o.customdata[b]:o.customdata})}var st=!1;return a(q,N.source,N.target)&&(st=!0),{circular:st,links:s,nodes:yt,groups:p,groupLookup:k}}function a(n,o,i){for(var s=g.init2dArray(n,0),f=0;f1})}$.exports=function(n,o){var i=r(o);return P({circular:i.circular,_nodes:i.nodes,_links:i.links,_groups:i.groups,_groupLookup:i.groupLookup})}}),GW=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){function g(A){var h=+this._x.call(null,A),p=+this._y.call(null,A);return P(this.cover(h,p),h,p,A)}function P(A,h,p,k){if(isNaN(h)||isNaN(p))return A;var w,R=A._root,O={data:k},N=A._x0,V=A._y0,H=A._x1,F=A._y1,U,W,q,X,lt,yt,pt,st;if(!R)return A._root=O,A;for(;R.length;)if((lt=h>=(U=(N+H)/2))?N=U:H=U,(yt=p>=(W=(V+F)/2))?V=W:F=W,w=R,!(R=R[pt=yt<<1|lt]))return w[pt]=O,A;if(q=+A._x.call(null,R.data),X=+A._y.call(null,R.data),h===q&&p===X)return O.next=R,w?w[pt]=O:A._root=O,A;do w=w?w[pt]=new Array(4):A._root=new Array(4),(lt=h>=(U=(N+H)/2))?N=U:H=U,(yt=p>=(W=(V+F)/2))?V=W:F=W;while((pt=yt<<1|lt)===(st=(X>=W)<<1|q>=U));return w[st]=R,w[pt]=O,A}function S(A){var h,p,k=A.length,w,R,O=new Array(k),N=new Array(k),V=1/0,H=1/0,F=-1/0,U=-1/0;for(p=0;pF&&(F=w),RU&&(U=R));if(V>F||H>U)return this;for(this.cover(V,H).cover(F,U),p=0;pA||A>=w||k>h||h>=R;)switch(H=(hF||(N=X.y0)>U||(V=X.x1)=pt)<<1|A>=yt)&&(X=W[W.length-1],W[W.length-1]=W[W.length-1-lt],W[W.length-1-lt]=X)}else{var st=A-+this._x.call(null,q.data),tt=h-+this._y.call(null,q.data),dt=st*st+tt*tt;if(dt=(W=(O+V)/2))?O=W:V=W,(lt=U>=(q=(N+H)/2))?N=q:H=q,h=p,!(p=p[yt=lt<<1|X]))return this;if(!p.length)break;(h[yt+1&3]||h[yt+2&3]||h[yt+3&3])&&(k=h,pt=yt)}for(;p.data!==A;)if(w=p,!(p=p.next))return this;return(R=p.next)&&delete p.next,w?(R?w.next=R:delete w.next,this):h?(R?h[yt]=R:delete h[yt],(p=h[0]||h[1]||h[2]||h[3])&&p===(h[3]||h[2]||h[1]||h[0])&&!p.length&&(k?k[pt]=p:this._root=p),this):(this._root=R,this)}function i(A){for(var h=0,p=A.length;h{(function(c,g){g(typeof Q=="object"&&typeof $<"u"?Q:c.d3=c.d3||{})})(Q,function(c){var g="$";function P(){}P.prototype=S.prototype={constructor:P,has:function(v){return g+v in this},get:function(v){return this[g+v]},set:function(v,T){return this[g+v]=T,this},remove:function(v){var T=g+v;return T in this&&delete this[T]},clear:function(){for(var v in this)v[0]===g&&delete this[v]},keys:function(){var v=[];for(var T in this)T[0]===g&&v.push(T.slice(1));return v},values:function(){var v=[];for(var T in this)T[0]===g&&v.push(this[T]);return v},entries:function(){var v=[];for(var T in this)T[0]===g&&v.push({key:T.slice(1),value:this[T]});return v},size:function(){var v=0;for(var T in this)T[0]===g&&++v;return v},empty:function(){for(var v in this)if(v[0]===g)return!1;return!0},each:function(v){for(var T in this)T[0]===g&&v(this[T],T.slice(1),this)}};function S(v,T){var u=new P;if(v instanceof P)v.each(function(E,A){u.set(A,E)});else if(Array.isArray(v)){var b=-1,_=v.length,C;if(T==null)for(;++b<_;)u.set(b,v[b]);else for(;++b<_;)u.set(T(C=v[b],b,v),C)}else if(v)for(var M in v)u.set(M,v[M]);return u}function t(){var v=[],T=[],u,b,_;function C(E,A,h,p){if(A>=v.length)return u!=null&&E.sort(u),b!=null?b(E):E;for(var k=-1,w=E.length,R=v[A++],O,N,V=S(),H,F=h();++kv.length)return E;var h,p=T[A-1];return b!=null&&A>=v.length?h=E.entries():(h=[],E.each(function(k,w){h.push({key:w,values:M(k,A)})})),p!=null?h.sort(function(k,w){return p(k.key,w.key)}):h}return _={object:function(E){return C(E,0,e,r)},map:function(E){return C(E,0,a,n)},entries:function(E){return M(C(E,0,a,n),0)},key:function(E){return v.push(E),_},sortKeys:function(E){return T[v.length-1]=E,_},sortValues:function(E){return u=E,_},rollup:function(E){return b=E,_}}}function e(){return{}}function r(v,T,u){v[T]=u}function a(){return S()}function n(v,T,u){v.set(T,u)}function o(){}var i=S.prototype;o.prototype=s.prototype={constructor:o,has:i.has,add:function(v){return v+="",this[g+v]=v,this},remove:i.remove,clear:i.clear,values:i.keys,size:i.size,empty:i.empty,each:i.each};function s(v,T){var u=new o;if(v instanceof o)v.each(function(C){u.add(C)});else if(v){var b=-1,_=v.length;if(T==null)for(;++b<_;)u.add(v[b]);else for(;++b<_;)u.add(T(v[b],b,v))}return u}function f(v){var T=[];for(var u in v)T.push(u);return T}function x(v){var T=[];for(var u in v)T.push(v[u]);return T}function y(v){var T=[];for(var u in v)T.push({key:u,value:v[u]});return T}c.nest=t,c.set=s,c.map=S,c.keys=f,c.values=x,c.entries=y,Object.defineProperty(c,"__esModule",{value:!0})})}),YW=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g={value:function(){}};function P(){for(var a=0,n=arguments.length,o={},i;a=0&&(i=o.slice(s+1),o=o.slice(0,s)),o&&!n.hasOwnProperty(o))throw new Error("unknown type: "+o);return{type:o,name:i}})}S.prototype=P.prototype={constructor:S,on:function(a,n){var o=this._,i=t(a+"",o),s,f=-1,x=i.length;if(arguments.length<2){for(;++f0)for(var o=new Array(s),i=0,s,f;i{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g=0,P=0,S=0,t=1e3,e,r,a=0,n=0,o=0,i=typeof performance=="object"&&performance.now?performance:Date,s=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(A){setTimeout(A,17)};function f(){return n||(s(x),n=i.now()+o)}function x(){n=0}function y(){this._call=this._time=this._next=null}y.prototype=v.prototype={constructor:y,restart:function(A,h,p){if(typeof A!="function")throw new TypeError("callback is not a function");p=(p==null?f():+p)+(h==null?0:+h),!this._next&&r!==this&&(r?r._next=this:e=this,r=this),this._call=A,this._time=p,C()},stop:function(){this._call&&(this._call=null,this._time=1/0,C())}};function v(A,h,p){var k=new y;return k.restart(A,h,p),k}function T(){f(),++g;for(var A=e,h;A;)(h=n-A._time)>=0&&A._call.call(null,h),A=A._next;--g}function u(){n=(a=i.now())+o,g=P=0;try{T()}finally{g=0,_(),n=0}}function b(){var A=i.now(),h=A-a;h>t&&(o-=h,a=A)}function _(){for(var A,h=e,p,k=1/0;h;)h._call?(k>h._time&&(k=h._time),A=h,h=h._next):(p=h._next,h._next=null,h=A?A._next=p:e=p);r=A,C(k)}function C(A){if(!g){P&&(P=clearTimeout(P));var h=A-n;h>24?(A<1/0&&(P=setTimeout(u,A-i.now()-o)),S&&(S=clearInterval(S))):(S||(a=i.now(),S=setInterval(b,t)),g=1,s(u))}}function M(A,h,p){var k=new y;return h=h==null?0:+h,k.restart(function(w){k.stop(),A(w+h)},h,p),k}function E(A,h,p){var k=new y,w=h;return h==null?(k.restart(A,h,p),k):(h=+h,p=p==null?f():+p,k.restart(function R(O){O+=w,k.restart(R,w+=h,p),A(O)},h,p),k)}c.interval=E,c.now=f,c.timeout=M,c.timer=v,c.timerFlush=T,Object.defineProperty(c,"__esModule",{value:!0})})}),XW=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q,GW(),xT(),YW(),KW()):g(c.d3=c.d3||{},c.d3,c.d3,c.d3,c.d3)})(Q,function(c,g,P,S,t){function e(A,h){var p;A==null&&(A=0),h==null&&(h=0);function k(){var w,R=p.length,O,N=0,V=0;for(w=0;wU.index){var ft=W-vt.x-vt.vx,ut=q-vt.y-vt.vy,wt=ft*ft+ut*ut;wtW+Y||rtq+Y||atV.r&&(V.r=V[H].r)}function N(){if(h){var V,H=h.length,F;for(p=new Array(H),V=0;V1?(lt==null?N.remove(X):N.set(X,q(lt)),h):N.get(X)},find:function(X,lt,yt){var pt=0,st=A.length,tt,dt,rt,at,vt;for(yt==null?yt=1/0:yt*=yt,pt=0;pt1?(H.on(X,lt),h):H.on(X)}}}function _(){var A,h,p,k=r(-30),w,R=1,O=1/0,N=.81;function V(W){var q,X=A.length,lt=g.quadtree(A,y,v).visitAfter(F);for(p=W,q=0;q=O)){(W.data!==h||W.next)&&(yt===0&&(yt=a(),tt+=yt*yt),pt===0&&(pt=a(),tt+=pt*pt),tt{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g=Math.PI,P=2*g,S=1e-6,t=P-S;function e(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function r(){return new e}e.prototype=r.prototype={constructor:e,moveTo:function(a,n){this._+="M"+(this._x0=this._x1=+a)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(a,n){this._+="L"+(this._x1=+a)+","+(this._y1=+n)},quadraticCurveTo:function(a,n,o,i){this._+="Q"+ +a+","+ +n+","+(this._x1=+o)+","+(this._y1=+i)},bezierCurveTo:function(a,n,o,i,s,f){this._+="C"+ +a+","+ +n+","+ +o+","+ +i+","+(this._x1=+s)+","+(this._y1=+f)},arcTo:function(a,n,o,i,s){a=+a,n=+n,o=+o,i=+i,s=+s;var f=this._x1,x=this._y1,y=o-a,v=i-n,T=f-a,u=x-n,b=T*T+u*u;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=a)+","+(this._y1=n);else if(b>S)if(!(Math.abs(u*y-v*T)>S)||!s)this._+="L"+(this._x1=a)+","+(this._y1=n);else{var _=o-f,C=i-x,M=y*y+v*v,E=_*_+C*C,A=Math.sqrt(M),h=Math.sqrt(b),p=s*Math.tan((g-Math.acos((M+b-E)/(2*A*h)))/2),k=p/h,w=p/A;Math.abs(k-1)>S&&(this._+="L"+(a+k*T)+","+(n+k*u)),this._+="A"+s+","+s+",0,0,"+ +(u*_>T*C)+","+(this._x1=a+w*y)+","+(this._y1=n+w*v)}},arc:function(a,n,o,i,s,f){a=+a,n=+n,o=+o,f=!!f;var x=o*Math.cos(i),y=o*Math.sin(i),v=a+x,T=n+y,u=1^f,b=f?i-s:s-i;if(o<0)throw new Error("negative radius: "+o);this._x1===null?this._+="M"+v+","+T:(Math.abs(this._x1-v)>S||Math.abs(this._y1-T)>S)&&(this._+="L"+v+","+T),o&&(b<0&&(b=b%P+P),b>t?this._+="A"+o+","+o+",0,1,"+u+","+(a-x)+","+(n-y)+"A"+o+","+o+",0,1,"+u+","+(this._x1=v)+","+(this._y1=T):b>S&&(this._+="A"+o+","+o+",0,"+ +(b>=g)+","+u+","+(this._x1=a+o*Math.cos(s))+","+(this._y1=n+o*Math.sin(s))))},rect:function(a,n,o,i){this._+="M"+(this._x0=this._x1=+a)+","+(this._y0=this._y1=+n)+"h"+ +o+"v"+ +i+"h"+-o+"Z"},toString:function(){return this._}},c.path=r,Object.defineProperty(c,"__esModule",{value:!0})})}),kE=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q,JW()):(c=c||self,g(c.d3=c.d3||{},c.d3))})(Q,function(c,g){function P(Ee){return function(){return Ee}}var S=Math.abs,t=Math.atan2,e=Math.cos,r=Math.max,a=Math.min,n=Math.sin,o=Math.sqrt,i=1e-12,s=Math.PI,f=s/2,x=2*s;function y(Ee){return Ee>1?0:Ee<-1?s:Math.acos(Ee)}function v(Ee){return Ee>=1?f:Ee<=-1?-f:Math.asin(Ee)}function T(Ee){return Ee.innerRadius}function u(Ee){return Ee.outerRadius}function b(Ee){return Ee.startAngle}function _(Ee){return Ee.endAngle}function C(Ee){return Ee&&Ee.padAngle}function M(Ee,dr,Vr,yn,Fn,Xn,Pn,En){var Zn=Vr-Ee,Ca=yn-dr,Ri=Pn-Fn,Ja=En-Xn,Xa=Ja*Zn-Ri*Ca;if(!(Xa*Xakl*kl+Vl*Vl&&(Js=ls,Rl=Cs),{cx:Js,cy:Rl,x01:-Ri,y01:-Ja,x11:Js*(Fn/Gs-1),y11:Rl*(Fn/Gs-1)}}function A(){var Ee=T,dr=u,Vr=P(0),yn=null,Fn=b,Xn=_,Pn=C,En=null;function Zn(){var Ca,Ri,Ja=+Ee.apply(this,arguments),Xa=+dr.apply(this,arguments),Io=Fn.apply(this,arguments)-f,po=Xn.apply(this,arguments)-f,Do=S(po-Io),Ia=po>Io;if(En||(En=Ca=g.path()),Xai))En.moveTo(0,0);else if(Do>x-i)En.moveTo(Xa*e(Io),Xa*n(Io)),En.arc(0,0,Xa,Io,po,!Ia),Ja>i&&(En.moveTo(Ja*e(po),Ja*n(po)),En.arc(0,0,Ja,po,Io,Ia));else{var gs=Io,is=po,ll=Io,Ho=po,Gs=Do,as=Do,ul=Pn.apply(this,arguments)/2,Js=ul>i&&(yn?+yn.apply(this,arguments):o(Ja*Ja+Xa*Xa)),Rl=a(S(Xa-Ja)/2,+Vr.apply(this,arguments)),ls=Rl,Cs=Rl,Co,ks;if(Js>i){var kl=v(Js/Ja*n(ul)),Vl=v(Js/Xa*n(ul));(Gs-=kl*2)>i?(kl*=Ia?1:-1,ll+=kl,Ho-=kl):(Gs=0,ll=Ho=(Io+po)/2),(as-=Vl*2)>i?(Vl*=Ia?1:-1,gs+=Vl,is-=Vl):(as=0,gs=is=(Io+po)/2)}var Yl=Xa*e(gs),Ns=Xa*n(gs),La=Ja*e(Ho),uo=Ja*n(Ho);if(Rl>i){var Hs=Xa*e(is),Kl=Xa*n(is),Go=Ja*e(ll),ql=Ja*n(ll),il;if(Doi?Cs>i?(Co=E(Go,ql,Yl,Ns,Xa,Cs,Ia),ks=E(Hs,Kl,La,uo,Xa,Cs,Ia),En.moveTo(Co.cx+Co.x01,Co.cy+Co.y01),Csi)||!(Gs>i)?En.lineTo(La,uo):ls>i?(Co=E(La,uo,Hs,Kl,Ja,-ls,Ia),ks=E(Yl,Ns,Go,ql,Ja,-ls,Ia),En.lineTo(Co.cx+Co.x01,Co.cy+Co.y01),ls=Xa;--Io)En.point(is[Io],ll[Io]);En.lineEnd(),En.areaEnd()}Ia&&(is[Ja]=+Ee(Do,Ja,Ri),ll[Ja]=+Vr(Do,Ja,Ri),En.point(dr?+dr(Do,Ja,Ri):is[Ja],yn?+yn(Do,Ja,Ri):ll[Ja]))}if(gs)return En=null,gs+""||null}function Ca(){return R().defined(Fn).curve(Pn).context(Xn)}return Zn.x=function(Ri){return arguments.length?(Ee=typeof Ri=="function"?Ri:P(+Ri),dr=null,Zn):Ee},Zn.x0=function(Ri){return arguments.length?(Ee=typeof Ri=="function"?Ri:P(+Ri),Zn):Ee},Zn.x1=function(Ri){return arguments.length?(dr=Ri==null?null:typeof Ri=="function"?Ri:P(+Ri),Zn):dr},Zn.y=function(Ri){return arguments.length?(Vr=typeof Ri=="function"?Ri:P(+Ri),yn=null,Zn):Vr},Zn.y0=function(Ri){return arguments.length?(Vr=typeof Ri=="function"?Ri:P(+Ri),Zn):Vr},Zn.y1=function(Ri){return arguments.length?(yn=Ri==null?null:typeof Ri=="function"?Ri:P(+Ri),Zn):yn},Zn.lineX0=Zn.lineY0=function(){return Ca().x(Ee).y(Vr)},Zn.lineY1=function(){return Ca().x(Ee).y(yn)},Zn.lineX1=function(){return Ca().x(dr).y(Vr)},Zn.defined=function(Ri){return arguments.length?(Fn=typeof Ri=="function"?Ri:P(!!Ri),Zn):Fn},Zn.curve=function(Ri){return arguments.length?(Pn=Ri,Xn!=null&&(En=Pn(Xn)),Zn):Pn},Zn.context=function(Ri){return arguments.length?(Ri==null?Xn=En=null:En=Pn(Xn=Ri),Zn):Xn},Zn}function N(Ee,dr){return drEe?1:dr>=Ee?0:NaN}function V(Ee){return Ee}function H(){var Ee=V,dr=N,Vr=null,yn=P(0),Fn=P(x),Xn=P(0);function Pn(En){var Zn,Ca=En.length,Ri,Ja,Xa=0,Io=new Array(Ca),po=new Array(Ca),Do=+yn.apply(this,arguments),Ia=Math.min(x,Math.max(-x,Fn.apply(this,arguments)-Do)),gs,is=Math.min(Math.abs(Ia)/Ca,Xn.apply(this,arguments)),ll=is*(Ia<0?-1:1),Ho;for(Zn=0;Zn0&&(Xa+=Ho);for(dr!=null?Io.sort(function(Gs,as){return dr(po[Gs],po[as])}):Vr!=null&&Io.sort(function(Gs,as){return Vr(En[Gs],En[as])}),Zn=0,Ja=Xa?(Ia-Ca*ll)/Xa:0;Zn0?Ho*Ja:0)+ll,po[Ri]={data:En[Ri],index:Zn,value:Ho,startAngle:Do,endAngle:gs,padAngle:is};return po}return Pn.value=function(En){return arguments.length?(Ee=typeof En=="function"?En:P(+En),Pn):Ee},Pn.sortValues=function(En){return arguments.length?(dr=En,Vr=null,Pn):dr},Pn.sort=function(En){return arguments.length?(Vr=En,dr=null,Pn):Vr},Pn.startAngle=function(En){return arguments.length?(yn=typeof En=="function"?En:P(+En),Pn):yn},Pn.endAngle=function(En){return arguments.length?(Fn=typeof En=="function"?En:P(+En),Pn):Fn},Pn.padAngle=function(En){return arguments.length?(Xn=typeof En=="function"?En:P(+En),Pn):Xn},Pn}var F=W(p);function U(Ee){this._curve=Ee}U.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Ee,dr){this._curve.point(dr*Math.sin(Ee),dr*-Math.cos(Ee))}};function W(Ee){function dr(Vr){return new U(Ee(Vr))}return dr._curve=Ee,dr}function q(Ee){var dr=Ee.curve;return Ee.angle=Ee.x,delete Ee.x,Ee.radius=Ee.y,delete Ee.y,Ee.curve=function(Vr){return arguments.length?dr(W(Vr)):dr()._curve},Ee}function X(){return q(R().curve(F))}function lt(){var Ee=O().curve(F),dr=Ee.curve,Vr=Ee.lineX0,yn=Ee.lineX1,Fn=Ee.lineY0,Xn=Ee.lineY1;return Ee.angle=Ee.x,delete Ee.x,Ee.startAngle=Ee.x0,delete Ee.x0,Ee.endAngle=Ee.x1,delete Ee.x1,Ee.radius=Ee.y,delete Ee.y,Ee.innerRadius=Ee.y0,delete Ee.y0,Ee.outerRadius=Ee.y1,delete Ee.y1,Ee.lineStartAngle=function(){return q(Vr())},delete Ee.lineX0,Ee.lineEndAngle=function(){return q(yn())},delete Ee.lineX1,Ee.lineInnerRadius=function(){return q(Fn())},delete Ee.lineY0,Ee.lineOuterRadius=function(){return q(Xn())},delete Ee.lineY1,Ee.curve=function(Pn){return arguments.length?dr(W(Pn)):dr()._curve},Ee}function yt(Ee,dr){return[(dr=+dr)*Math.cos(Ee-=Math.PI/2),dr*Math.sin(Ee)]}var pt=Array.prototype.slice;function st(Ee){return Ee.source}function tt(Ee){return Ee.target}function dt(Ee){var dr=st,Vr=tt,yn=k,Fn=w,Xn=null;function Pn(){var En,Zn=pt.call(arguments),Ca=dr.apply(this,Zn),Ri=Vr.apply(this,Zn);if(Xn||(Xn=En=g.path()),Ee(Xn,+yn.apply(this,(Zn[0]=Ca,Zn)),+Fn.apply(this,Zn),+yn.apply(this,(Zn[0]=Ri,Zn)),+Fn.apply(this,Zn)),En)return Xn=null,En+""||null}return Pn.source=function(En){return arguments.length?(dr=En,Pn):dr},Pn.target=function(En){return arguments.length?(Vr=En,Pn):Vr},Pn.x=function(En){return arguments.length?(yn=typeof En=="function"?En:P(+En),Pn):yn},Pn.y=function(En){return arguments.length?(Fn=typeof En=="function"?En:P(+En),Pn):Fn},Pn.context=function(En){return arguments.length?(Xn=En??null,Pn):Xn},Pn}function rt(Ee,dr,Vr,yn,Fn){Ee.moveTo(dr,Vr),Ee.bezierCurveTo(dr=(dr+yn)/2,Vr,dr,Fn,yn,Fn)}function at(Ee,dr,Vr,yn,Fn){Ee.moveTo(dr,Vr),Ee.bezierCurveTo(dr,Vr=(Vr+Fn)/2,yn,Vr,yn,Fn)}function vt(Ee,dr,Vr,yn,Fn){var Xn=yt(dr,Vr),Pn=yt(dr,Vr=(Vr+Fn)/2),En=yt(yn,Vr),Zn=yt(yn,Fn);Ee.moveTo(Xn[0],Xn[1]),Ee.bezierCurveTo(Pn[0],Pn[1],En[0],En[1],Zn[0],Zn[1])}function it(){return dt(rt)}function Y(){return dt(at)}function ft(){var Ee=dt(vt);return Ee.angle=Ee.x,delete Ee.x,Ee.radius=Ee.y,delete Ee.y,Ee}var ut={draw:function(Ee,dr){var Vr=Math.sqrt(dr/s);Ee.moveTo(Vr,0),Ee.arc(0,0,Vr,0,x)}},wt={draw:function(Ee,dr){var Vr=Math.sqrt(dr/5)/2;Ee.moveTo(-3*Vr,-Vr),Ee.lineTo(-Vr,-Vr),Ee.lineTo(-Vr,-3*Vr),Ee.lineTo(Vr,-3*Vr),Ee.lineTo(Vr,-Vr),Ee.lineTo(3*Vr,-Vr),Ee.lineTo(3*Vr,Vr),Ee.lineTo(Vr,Vr),Ee.lineTo(Vr,3*Vr),Ee.lineTo(-Vr,3*Vr),Ee.lineTo(-Vr,Vr),Ee.lineTo(-3*Vr,Vr),Ee.closePath()}},zt=Math.sqrt(1/3),Pt=zt*2,Wt={draw:function(Ee,dr){var Vr=Math.sqrt(dr/Pt),yn=Vr*zt;Ee.moveTo(0,-Vr),Ee.lineTo(yn,0),Ee.lineTo(0,Vr),Ee.lineTo(-yn,0),Ee.closePath()}},Ht=.8908130915292852,Jt=Math.sin(s/10)/Math.sin(7*s/10),ge=Math.sin(x/10)*Jt,he=-Math.cos(x/10)*Jt,de={draw:function(Ee,dr){var Vr=Math.sqrt(dr*Ht),yn=ge*Vr,Fn=he*Vr;Ee.moveTo(0,-Vr),Ee.lineTo(yn,Fn);for(var Xn=1;Xn<5;++Xn){var Pn=x*Xn/5,En=Math.cos(Pn),Zn=Math.sin(Pn);Ee.lineTo(Zn*Vr,-En*Vr),Ee.lineTo(En*yn-Zn*Fn,Zn*yn+En*Fn)}Ee.closePath()}},se={draw:function(Ee,dr){var Vr=Math.sqrt(dr),yn=-Vr/2;Ee.rect(yn,yn,Vr,Vr)}},Tt=Math.sqrt(3),Lt={draw:function(Ee,dr){var Vr=-Math.sqrt(dr/(Tt*3));Ee.moveTo(0,Vr*2),Ee.lineTo(-Tt*Vr,-Vr),Ee.lineTo(Tt*Vr,-Vr),Ee.closePath()}},Mt=-.5,te=Math.sqrt(3)/2,ve=1/Math.sqrt(12),oe=(ve/2+1)*3,Te={draw:function(Ee,dr){var Vr=Math.sqrt(dr/oe),yn=Vr/2,Fn=Vr*ve,Xn=yn,Pn=Vr*ve+Vr,En=-Xn,Zn=Pn;Ee.moveTo(yn,Fn),Ee.lineTo(Xn,Pn),Ee.lineTo(En,Zn),Ee.lineTo(Mt*yn-te*Fn,te*yn+Mt*Fn),Ee.lineTo(Mt*Xn-te*Pn,te*Xn+Mt*Pn),Ee.lineTo(Mt*En-te*Zn,te*En+Mt*Zn),Ee.lineTo(Mt*yn+te*Fn,Mt*Fn-te*yn),Ee.lineTo(Mt*Xn+te*Pn,Mt*Pn-te*Xn),Ee.lineTo(Mt*En+te*Zn,Mt*Zn-te*En),Ee.closePath()}},He=[ut,wt,Wt,se,de,Lt,Te];function Ge(){var Ee=P(ut),dr=P(64),Vr=null;function yn(){var Fn;if(Vr||(Vr=Fn=g.path()),Ee.apply(this,arguments).draw(Vr,+dr.apply(this,arguments)),Fn)return Vr=null,Fn+""||null}return yn.type=function(Fn){return arguments.length?(Ee=typeof Fn=="function"?Fn:P(Fn),yn):Ee},yn.size=function(Fn){return arguments.length?(dr=typeof Fn=="function"?Fn:P(+Fn),yn):dr},yn.context=function(Fn){return arguments.length?(Vr=Fn??null,yn):Vr},yn}function cr(){}function ur(Ee,dr,Vr){Ee._context.bezierCurveTo((2*Ee._x0+Ee._x1)/3,(2*Ee._y0+Ee._y1)/3,(Ee._x0+2*Ee._x1)/3,(Ee._y0+2*Ee._y1)/3,(Ee._x0+4*Ee._x1+dr)/6,(Ee._y0+4*Ee._y1+Vr)/6)}function jr(Ee){this._context=Ee}jr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ur(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ee,dr){switch(Ee=+Ee,dr=+dr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ee,dr):this._context.moveTo(Ee,dr);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ur(this,Ee,dr);break}this._x0=this._x1,this._x1=Ee,this._y0=this._y1,this._y1=dr}};function Hr(Ee){return new jr(Ee)}function br(Ee){this._context=Ee}br.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(Ee,dr){switch(Ee=+Ee,dr=+dr,this._point){case 0:this._point=1,this._x2=Ee,this._y2=dr;break;case 1:this._point=2,this._x3=Ee,this._y3=dr;break;case 2:this._point=3,this._x4=Ee,this._y4=dr,this._context.moveTo((this._x0+4*this._x1+Ee)/6,(this._y0+4*this._y1+dr)/6);break;default:ur(this,Ee,dr);break}this._x0=this._x1,this._x1=Ee,this._y0=this._y1,this._y1=dr}};function Kr(Ee){return new br(Ee)}function rn(Ee){this._context=Ee}rn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ee,dr){switch(Ee=+Ee,dr=+dr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Vr=(this._x0+4*this._x1+Ee)/6,yn=(this._y0+4*this._y1+dr)/6;this._line?this._context.lineTo(Vr,yn):this._context.moveTo(Vr,yn);break;case 3:this._point=4;default:ur(this,Ee,dr);break}this._x0=this._x1,this._x1=Ee,this._y0=this._y1,this._y1=dr}};function Ce(Ee){return new rn(Ee)}function $t(Ee,dr){this._basis=new jr(Ee),this._beta=dr}$t.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Ee=this._x,dr=this._y,Vr=Ee.length-1;if(Vr>0)for(var yn=Ee[0],Fn=dr[0],Xn=Ee[Vr]-yn,Pn=dr[Vr]-Fn,En=-1,Zn;++En<=Vr;)Zn=En/Vr,this._basis.point(this._beta*Ee[En]+(1-this._beta)*(yn+Zn*Xn),this._beta*dr[En]+(1-this._beta)*(Fn+Zn*Pn));this._x=this._y=null,this._basis.lineEnd()},point:function(Ee,dr){this._x.push(+Ee),this._y.push(+dr)}};var ne=function Ee(dr){function Vr(yn){return dr===1?new jr(yn):new $t(yn,dr)}return Vr.beta=function(yn){return Ee(+yn)},Vr}(.85);function Ct(Ee,dr,Vr){Ee._context.bezierCurveTo(Ee._x1+Ee._k*(Ee._x2-Ee._x0),Ee._y1+Ee._k*(Ee._y2-Ee._y0),Ee._x2+Ee._k*(Ee._x1-dr),Ee._y2+Ee._k*(Ee._y1-Vr),Ee._x2,Ee._y2)}function gt(Ee,dr){this._context=Ee,this._k=(1-dr)/6}gt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ct(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ee,dr){switch(Ee=+Ee,dr=+dr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ee,dr):this._context.moveTo(Ee,dr);break;case 1:this._point=2,this._x1=Ee,this._y1=dr;break;case 2:this._point=3;default:Ct(this,Ee,dr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ee,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var St=function Ee(dr){function Vr(yn){return new gt(yn,dr)}return Vr.tension=function(yn){return Ee(+yn)},Vr}(0);function Nt(Ee,dr){this._context=Ee,this._k=(1-dr)/6}Nt.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(Ee,dr){switch(Ee=+Ee,dr=+dr,this._point){case 0:this._point=1,this._x3=Ee,this._y3=dr;break;case 1:this._point=2,this._context.moveTo(this._x4=Ee,this._y4=dr);break;case 2:this._point=3,this._x5=Ee,this._y5=dr;break;default:Ct(this,Ee,dr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ee,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var ee=function Ee(dr){function Vr(yn){return new Nt(yn,dr)}return Vr.tension=function(yn){return Ee(+yn)},Vr}(0);function le(Ee,dr){this._context=Ee,this._k=(1-dr)/6}le.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ee,dr){switch(Ee=+Ee,dr=+dr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ct(this,Ee,dr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ee,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var we=function Ee(dr){function Vr(yn){return new le(yn,dr)}return Vr.tension=function(yn){return Ee(+yn)},Vr}(0);function Ue(Ee,dr,Vr){var yn=Ee._x1,Fn=Ee._y1,Xn=Ee._x2,Pn=Ee._y2;if(Ee._l01_a>i){var En=2*Ee._l01_2a+3*Ee._l01_a*Ee._l12_a+Ee._l12_2a,Zn=3*Ee._l01_a*(Ee._l01_a+Ee._l12_a);yn=(yn*En-Ee._x0*Ee._l12_2a+Ee._x2*Ee._l01_2a)/Zn,Fn=(Fn*En-Ee._y0*Ee._l12_2a+Ee._y2*Ee._l01_2a)/Zn}if(Ee._l23_a>i){var Ca=2*Ee._l23_2a+3*Ee._l23_a*Ee._l12_a+Ee._l12_2a,Ri=3*Ee._l23_a*(Ee._l23_a+Ee._l12_a);Xn=(Xn*Ca+Ee._x1*Ee._l23_2a-dr*Ee._l12_2a)/Ri,Pn=(Pn*Ca+Ee._y1*Ee._l23_2a-Vr*Ee._l12_2a)/Ri}Ee._context.bezierCurveTo(yn,Fn,Xn,Pn,Ee._x2,Ee._y2)}function qe(Ee,dr){this._context=Ee,this._alpha=dr}qe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ee,dr){if(Ee=+Ee,dr=+dr,this._point){var Vr=this._x2-Ee,yn=this._y2-dr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Vr*Vr+yn*yn,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Ee,dr):this._context.moveTo(Ee,dr);break;case 1:this._point=2;break;case 2:this._point=3;default:Ue(this,Ee,dr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Ee,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var ar=function Ee(dr){function Vr(yn){return dr?new qe(yn,dr):new gt(yn,0)}return Vr.alpha=function(yn){return Ee(+yn)},Vr}(.5);function Ar(Ee,dr){this._context=Ee,this._alpha=dr}Ar.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(Ee,dr){if(Ee=+Ee,dr=+dr,this._point){var Vr=this._x2-Ee,yn=this._y2-dr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Vr*Vr+yn*yn,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Ee,this._y3=dr;break;case 1:this._point=2,this._context.moveTo(this._x4=Ee,this._y4=dr);break;case 2:this._point=3,this._x5=Ee,this._y5=dr;break;default:Ue(this,Ee,dr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Ee,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var Tr=function Ee(dr){function Vr(yn){return dr?new Ar(yn,dr):new Nt(yn,0)}return Vr.alpha=function(yn){return Ee(+yn)},Vr}(.5);function pr(Ee,dr){this._context=Ee,this._alpha=dr}pr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ee,dr){if(Ee=+Ee,dr=+dr,this._point){var Vr=this._x2-Ee,yn=this._y2-dr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Vr*Vr+yn*yn,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ue(this,Ee,dr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Ee,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var Jr=function Ee(dr){function Vr(yn){return dr?new pr(yn,dr):new le(yn,0)}return Vr.alpha=function(yn){return Ee(+yn)},Vr}(.5);function Vn(Ee){this._context=Ee}Vn.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Ee,dr){Ee=+Ee,dr=+dr,this._point?this._context.lineTo(Ee,dr):(this._point=1,this._context.moveTo(Ee,dr))}};function Hn(Ee){return new Vn(Ee)}function Kn(Ee){return Ee<0?-1:1}function Ci(Ee,dr,Vr){var yn=Ee._x1-Ee._x0,Fn=dr-Ee._x1,Xn=(Ee._y1-Ee._y0)/(yn||Fn<0&&-0),Pn=(Vr-Ee._y1)/(Fn||yn<0&&-0),En=(Xn*Fn+Pn*yn)/(yn+Fn);return(Kn(Xn)+Kn(Pn))*Math.min(Math.abs(Xn),Math.abs(Pn),.5*Math.abs(En))||0}function ii(Ee,dr){var Vr=Ee._x1-Ee._x0;return Vr?(3*(Ee._y1-Ee._y0)/Vr-dr)/2:dr}function qn(Ee,dr,Vr){var yn=Ee._x0,Fn=Ee._y0,Xn=Ee._x1,Pn=Ee._y1,En=(Xn-yn)/3;Ee._context.bezierCurveTo(yn+En,Fn+En*dr,Xn-En,Pn-En*Vr,Xn,Pn)}function oa(Ee){this._context=Ee}oa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:qn(this,this._t0,ii(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ee,dr){var Vr=NaN;if(Ee=+Ee,dr=+dr,!(Ee===this._x1&&dr===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Ee,dr):this._context.moveTo(Ee,dr);break;case 1:this._point=2;break;case 2:this._point=3,qn(this,ii(this,Vr=Ci(this,Ee,dr)),Vr);break;default:qn(this,this._t0,Vr=Ci(this,Ee,dr));break}this._x0=this._x1,this._x1=Ee,this._y0=this._y1,this._y1=dr,this._t0=Vr}}};function Hi(Ee){this._context=new We(Ee)}(Hi.prototype=Object.create(oa.prototype)).point=function(Ee,dr){oa.prototype.point.call(this,dr,Ee)};function We(Ee){this._context=Ee}We.prototype={moveTo:function(Ee,dr){this._context.moveTo(dr,Ee)},closePath:function(){this._context.closePath()},lineTo:function(Ee,dr){this._context.lineTo(dr,Ee)},bezierCurveTo:function(Ee,dr,Vr,yn,Fn,Xn){this._context.bezierCurveTo(dr,Ee,yn,Vr,Xn,Fn)}};function rr(Ee){return new oa(Ee)}function fr(Ee){return new Hi(Ee)}function xr(Ee){this._context=Ee}xr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Ee=this._x,dr=this._y,Vr=Ee.length;if(Vr)if(this._line?this._context.lineTo(Ee[0],dr[0]):this._context.moveTo(Ee[0],dr[0]),Vr===2)this._context.lineTo(Ee[1],dr[1]);else for(var yn=Qr(Ee),Fn=Qr(dr),Xn=0,Pn=1;Pn=0;--dr)Fn[dr]=(Pn[dr]-Fn[dr+1])/Xn[dr];for(Xn[Vr-1]=(Ee[Vr]+Fn[Vr-1])/2,dr=0;dr=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(Ee,dr){switch(Ee=+Ee,dr=+dr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ee,dr):this._context.moveTo(Ee,dr);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,dr),this._context.lineTo(Ee,dr);else{var Vr=this._x*(1-this._t)+Ee*this._t;this._context.lineTo(Vr,this._y),this._context.lineTo(Vr,dr)}break}}this._x=Ee,this._y=dr}};function Mn(Ee){return new wn(Ee,.5)}function ci(Ee){return new wn(Ee,0)}function xi(Ee){return new wn(Ee,1)}function Pi(Ee,dr){if((Pn=Ee.length)>1)for(var Vr=1,yn,Fn,Xn=Ee[dr[0]],Pn,En=Xn.length;Vr=0;)Vr[dr]=dr;return Vr}function Zi(Ee,dr){return Ee[dr]}function ui(){var Ee=P([]),dr=Di,Vr=Pi,yn=Zi;function Fn(Xn){var Pn=Ee.apply(this,arguments),En,Zn=Xn.length,Ca=Pn.length,Ri=new Array(Ca),Ja;for(En=0;En0){for(var Vr,yn,Fn=0,Xn=Ee[0].length,Pn;Fn0)for(var Vr,yn=0,Fn,Xn,Pn,En,Zn,Ca=Ee[dr[0]].length;yn0?(Fn[0]=Pn,Fn[1]=Pn+=Xn):Xn<0?(Fn[1]=En,Fn[0]=En+=Xn):(Fn[0]=0,Fn[1]=Xn)}function ze(Ee,dr){if((Fn=Ee.length)>0){for(var Vr=0,yn=Ee[dr[0]],Fn,Xn=yn.length;Vr0)||!((Xn=(Fn=Ee[dr[0]]).length)>0))){for(var Vr=0,yn=1,Fn,Xn,Pn;ynXn&&(Xn=Fn,Vr=dr);return Vr}function $r(Ee){var dr=Ee.map(Br);return Di(Ee).sort(function(Vr,yn){return dr[Vr]-dr[yn]})}function Br(Ee){for(var dr=0,Vr=-1,yn=Ee.length,Fn;++Vr{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q,y3(),xT(),kE()):g(c.d3=c.d3||{},c.d3,c.d3,c.d3)})(Q,function(c,g,P,S){function t(p){return p.target.depth}function e(p){return p.depth}function r(p,k){return k-1-p.height}function a(p,k){return p.sourceLinks.length?p.depth:k-1}function n(p){return p.targetLinks.length?p.depth:p.sourceLinks.length?g.min(p.sourceLinks,t)-1:0}function o(p){return function(){return p}}function i(p,k){return f(p.source,k.source)||p.index-k.index}function s(p,k){return f(p.target,k.target)||p.index-k.index}function f(p,k){return p.y0-k.y0}function x(p){return p.value}function y(p){return(p.y0+p.y1)/2}function v(p){return y(p.source)*p.value}function T(p){return y(p.target)*p.value}function u(p){return p.index}function b(p){return p.nodes}function _(p){return p.links}function C(p,k){var w=p.get(k);if(!w)throw new Error("missing: "+k);return w}var M=function(){var p=0,k=0,w=1,R=1,O=24,N=8,V=u,H=a,F=b,U=_,W=32,q=2/3;function X(){var dt={nodes:F.apply(null,arguments),links:U.apply(null,arguments)};return lt(dt),yt(dt),pt(dt),st(dt),tt(dt),dt}X.update=function(dt){return tt(dt),dt},X.nodeId=function(dt){return arguments.length?(V=typeof dt=="function"?dt:o(dt),X):V},X.nodeAlign=function(dt){return arguments.length?(H=typeof dt=="function"?dt:o(dt),X):H},X.nodeWidth=function(dt){return arguments.length?(O=+dt,X):O},X.nodePadding=function(dt){return arguments.length?(N=+dt,X):N},X.nodes=function(dt){return arguments.length?(F=typeof dt=="function"?dt:o(dt),X):F},X.links=function(dt){return arguments.length?(U=typeof dt=="function"?dt:o(dt),X):U},X.size=function(dt){return arguments.length?(p=k=0,w=+dt[0],R=+dt[1],X):[w-p,R-k]},X.extent=function(dt){return arguments.length?(p=+dt[0][0],w=+dt[1][0],k=+dt[0][1],R=+dt[1][1],X):[[p,k],[w,R]]},X.iterations=function(dt){return arguments.length?(W=+dt,X):W};function lt(dt){dt.nodes.forEach(function(at,vt){at.index=vt,at.sourceLinks=[],at.targetLinks=[]});var rt=P.map(dt.nodes,V);dt.links.forEach(function(at,vt){at.index=vt;var it=at.source,Y=at.target;typeof it!="object"&&(it=at.source=C(rt,it)),typeof Y!="object"&&(Y=at.target=C(rt,Y)),it.sourceLinks.push(at),Y.targetLinks.push(at)})}function yt(dt){dt.nodes.forEach(function(rt){rt.value=Math.max(g.sum(rt.sourceLinks,x),g.sum(rt.targetLinks,x))})}function pt(dt){var rt,at,vt;for(rt=dt.nodes,at=[],vt=0;rt.length;++vt,rt=at,at=[])rt.forEach(function(Y){Y.depth=vt,Y.sourceLinks.forEach(function(ft){at.indexOf(ft.target)<0&&at.push(ft.target)})});for(rt=dt.nodes,at=[],vt=0;rt.length;++vt,rt=at,at=[])rt.forEach(function(Y){Y.height=vt,Y.targetLinks.forEach(function(ft){at.indexOf(ft.source)<0&&at.push(ft.source)})});var it=(w-p-O)/(vt-1);dt.nodes.forEach(function(Y){Y.x1=(Y.x0=p+Math.max(0,Math.min(vt-1,Math.floor(H.call(null,Y,vt))))*it)+O})}function st(dt){var rt=P.nest().key(function(wt){return wt.x0}).sortKeys(g.ascending).entries(dt.nodes).map(function(wt){return wt.values});it(),ut();for(var at=1,vt=W;vt>0;--vt)ft(at*=.99),ut(),Y(at),ut();function it(){var wt=g.max(rt,function(Wt){return Wt.length}),zt=q*(R-k)/(wt-1);N>zt&&(N=zt);var Pt=g.min(rt,function(Wt){return(R-k-(Wt.length-1)*N)/g.sum(Wt,x)});rt.forEach(function(Wt){Wt.forEach(function(Ht,Jt){Ht.y1=(Ht.y0=Jt)+Ht.value*Pt})}),dt.links.forEach(function(Wt){Wt.width=Wt.value*Pt})}function Y(wt){rt.forEach(function(zt){zt.forEach(function(Pt){if(Pt.targetLinks.length){var Wt=(g.sum(Pt.targetLinks,v)/g.sum(Pt.targetLinks,x)-y(Pt))*wt;Pt.y0+=Wt,Pt.y1+=Wt}})})}function ft(wt){rt.slice().reverse().forEach(function(zt){zt.forEach(function(Pt){if(Pt.sourceLinks.length){var Wt=(g.sum(Pt.sourceLinks,T)/g.sum(Pt.sourceLinks,x)-y(Pt))*wt;Pt.y0+=Wt,Pt.y1+=Wt}})})}function ut(){rt.forEach(function(wt){var zt,Pt,Wt=k,Ht=wt.length,Jt;for(wt.sort(f),Jt=0;Jt0&&(zt.y0+=Pt,zt.y1+=Pt),Wt=zt.y1+N;if(Pt=Wt-N-R,Pt>0)for(Wt=zt.y0-=Pt,zt.y1-=Pt,Jt=Ht-2;Jt>=0;--Jt)zt=wt[Jt],Pt=zt.y1+N-Wt,Pt>0&&(zt.y0-=Pt,zt.y1-=Pt),Wt=zt.y0})}}function tt(dt){dt.nodes.forEach(function(rt){rt.sourceLinks.sort(s),rt.targetLinks.sort(i)}),dt.nodes.forEach(function(rt){var at=rt.y0,vt=at;rt.sourceLinks.forEach(function(it){it.y0=at+it.width/2,at+=it.width}),rt.targetLinks.forEach(function(it){it.y1=vt+it.width/2,vt+=it.width})})}return X};function E(p){return[p.source.x1,p.y0]}function A(p){return[p.target.x0,p.y1]}var h=function(){return S.linkHorizontal().source(E).target(A)};c.sankey=M,c.sankeyCenter=n,c.sankeyLeft=e,c.sankeyRight=r,c.sankeyJustify=a,c.sankeyLinkHorizontal=h,Object.defineProperty(c,"__esModule",{value:!0})})}),tq=Ft((Q,$)=>{var c=wE();$.exports=function(g,P){var S=[],t=[],e=[],r={},a=[],n;function o(_){e[_]=!1,r.hasOwnProperty(_)&&Object.keys(r[_]).forEach(function(C){delete r[_][C],e[C]&&o(C)})}function i(_){var C=!1;t.push(_),e[_]=!0;var M,E;for(M=0;M=_})}function x(_){f(_);for(var C=g,M=c(C),E=M.components.filter(function(O){return O.length>1}),A=1/0,h,p=0;p{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q,y3(),xT(),kE(),tq()):g(c.d3=c.d3||{},c.d3,c.d3,c.d3,null)})(Q,function(c,g,P,S,t){t=t&&t.hasOwnProperty("default")?t.default:t;function e(Ht){return Ht.target.depth}function r(Ht){return Ht.depth}function a(Ht,Jt){return Jt-1-Ht.height}function n(Ht,Jt){return Ht.sourceLinks.length?Ht.depth:Jt-1}function o(Ht){return Ht.targetLinks.length?Ht.depth:Ht.sourceLinks.length?g.min(Ht.sourceLinks,e)-1:0}function i(Ht){return function(){return Ht}}var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ht){return typeof Ht}:function(Ht){return Ht&&typeof Symbol=="function"&&Ht.constructor===Symbol&&Ht!==Symbol.prototype?"symbol":typeof Ht};function f(Ht,Jt){return y(Ht.source,Jt.source)||Ht.index-Jt.index}function x(Ht,Jt){return y(Ht.target,Jt.target)||Ht.index-Jt.index}function y(Ht,Jt){return Ht.partOfCycle===Jt.partOfCycle?Ht.y0-Jt.y0:Ht.circularLinkType==="top"||Jt.circularLinkType==="bottom"?-1:1}function v(Ht){return Ht.value}function T(Ht){return(Ht.y0+Ht.y1)/2}function u(Ht){return T(Ht.source)}function b(Ht){return T(Ht.target)}function _(Ht){return Ht.index}function C(Ht){return Ht.nodes}function M(Ht){return Ht.links}function E(Ht,Jt){var ge=Ht.get(Jt);if(!ge)throw new Error("missing: "+Jt);return ge}function A(Ht,Jt){return Jt(Ht)}var h=25,p=10,k=.3;function w(){var Ht=0,Jt=0,ge=1,he=1,de=24,se,Tt=_,Lt=n,Mt=C,te=M,ve=32,oe=2,Te,He=null;function Ge(){var Ce={nodes:Mt.apply(null,arguments),links:te.apply(null,arguments)};cr(Ce),R(Ce,Tt,He),ur(Ce),br(Ce),O(Ce,Tt),Kr(Ce,ve,Tt),rn(Ce);for(var $t=4,ne=0;ne<$t;ne++)ft(Ce,he,Tt),ut(Ce,he,Tt),vt(Ce,Jt,he,Tt),ft(Ce,he,Tt),ut(Ce,he,Tt);return Wt(Ce,Jt,he),W(Ce,oe,he,Tt),Ce}Ge.nodeId=function(Ce){return arguments.length?(Tt=typeof Ce=="function"?Ce:i(Ce),Ge):Tt},Ge.nodeAlign=function(Ce){return arguments.length?(Lt=typeof Ce=="function"?Ce:i(Ce),Ge):Lt},Ge.nodeWidth=function(Ce){return arguments.length?(de=+Ce,Ge):de},Ge.nodePadding=function(Ce){return arguments.length?(se=+Ce,Ge):se},Ge.nodes=function(Ce){return arguments.length?(Mt=typeof Ce=="function"?Ce:i(Ce),Ge):Mt},Ge.links=function(Ce){return arguments.length?(te=typeof Ce=="function"?Ce:i(Ce),Ge):te},Ge.size=function(Ce){return arguments.length?(Ht=Jt=0,ge=+Ce[0],he=+Ce[1],Ge):[ge-Ht,he-Jt]},Ge.extent=function(Ce){return arguments.length?(Ht=+Ce[0][0],ge=+Ce[1][0],Jt=+Ce[0][1],he=+Ce[1][1],Ge):[[Ht,Jt],[ge,he]]},Ge.iterations=function(Ce){return arguments.length?(ve=+Ce,Ge):ve},Ge.circularLinkGap=function(Ce){return arguments.length?(oe=+Ce,Ge):oe},Ge.nodePaddingRatio=function(Ce){return arguments.length?(Te=+Ce,Ge):Te},Ge.sortNodes=function(Ce){return arguments.length?(He=Ce,Ge):He},Ge.update=function(Ce){return O(Ce,Tt),rn(Ce),Ce.links.forEach(function($t){$t.circular&&($t.circularLinkType=$t.y0+$t.y1"u"?"undefined":s(gt))!=="object"&&(gt=ne.source=E($t,gt)),(typeof St>"u"?"undefined":s(St))!=="object"&&(St=ne.target=E($t,St)),gt.sourceLinks.push(ne),St.targetLinks.push(ne)}),Ce}function ur(Ce){Ce.nodes.forEach(function($t){$t.partOfCycle=!1,$t.value=Math.max(g.sum($t.sourceLinks,v),g.sum($t.targetLinks,v)),$t.sourceLinks.forEach(function(ne){ne.circular&&($t.partOfCycle=!0,$t.circularLinkType=ne.circularLinkType)}),$t.targetLinks.forEach(function(ne){ne.circular&&($t.partOfCycle=!0,$t.circularLinkType=ne.circularLinkType)})})}function jr(Ce){var $t=0,ne=0,Ct=0,gt=0,St=g.max(Ce.nodes,function(Nt){return Nt.column});return Ce.links.forEach(function(Nt){Nt.circular&&(Nt.circularLinkType=="top"?$t=$t+Nt.width:ne=ne+Nt.width,Nt.target.column==0&&(gt=gt+Nt.width),Nt.source.column==St&&(Ct=Ct+Nt.width))}),$t=$t>0?$t+h+p:$t,ne=ne>0?ne+h+p:ne,Ct=Ct>0?Ct+h+p:Ct,gt=gt>0?gt+h+p:gt,{top:$t,bottom:ne,left:gt,right:Ct}}function Hr(Ce,$t){var ne=g.max(Ce.nodes,function(we){return we.column}),Ct=ge-Ht,gt=he-Jt,St=Ct+$t.right+$t.left,Nt=gt+$t.top+$t.bottom,ee=Ct/St,le=gt/Nt;return Ht=Ht*ee+$t.left,ge=$t.right==0?ge:ge*ee,Jt=Jt*le+$t.top,he=he*le,Ce.nodes.forEach(function(we){we.x0=Ht+we.column*((ge-Ht-de)/ne),we.x1=we.x0+de}),le}function br(Ce){var $t,ne,Ct;for($t=Ce.nodes,ne=[],Ct=0;$t.length;++Ct,$t=ne,ne=[])$t.forEach(function(gt){gt.depth=Ct,gt.sourceLinks.forEach(function(St){ne.indexOf(St.target)<0&&!St.circular&&ne.push(St.target)})});for($t=Ce.nodes,ne=[],Ct=0;$t.length;++Ct,$t=ne,ne=[])$t.forEach(function(gt){gt.height=Ct,gt.targetLinks.forEach(function(St){ne.indexOf(St.source)<0&&!St.circular&&ne.push(St.source)})});Ce.nodes.forEach(function(gt){gt.column=Math.floor(Lt.call(null,gt,Ct))})}function Kr(Ce,$t,ne){var Ct=P.nest().key(function(we){return we.column}).sortKeys(g.ascending).entries(Ce.nodes).map(function(we){return we.values});Nt(ne),le();for(var gt=1,St=$t;St>0;--St)ee(gt*=.99,ne),le();function Nt(we){if(Te){var Ue=1/0;Ct.forEach(function(Tr){var pr=he*Te/(Tr.length+1);Ue=pr0))if(Tr==0&&Ar==1)Jr=pr.y1-pr.y0,pr.y0=he/2-Jr/2,pr.y1=he/2+Jr/2;else if(Tr==qe-1&&Ar==1)Jr=pr.y1-pr.y0,pr.y0=he/2-Jr/2,pr.y1=he/2+Jr/2;else{var Vn=0,Hn=g.mean(pr.sourceLinks,b),Kn=g.mean(pr.targetLinks,u);Hn&&Kn?Vn=(Hn+Kn)/2:Vn=Hn||Kn;var Ci=(Vn-T(pr))*we;pr.y0+=Ci,pr.y1+=Ci}})})}function le(){Ct.forEach(function(we){var Ue,qe,ar=Jt,Ar=we.length,Tr;for(we.sort(y),Tr=0;Tr0&&(Ue.y0+=qe,Ue.y1+=qe),ar=Ue.y1+se;if(qe=ar-se-he,qe>0)for(ar=Ue.y0-=qe,Ue.y1-=qe,Tr=Ar-2;Tr>=0;--Tr)Ue=we[Tr],qe=Ue.y1+se-ar,qe>0&&(Ue.y0-=qe,Ue.y1-=qe),ar=Ue.y0})}}function rn(Ce){Ce.nodes.forEach(function($t){$t.sourceLinks.sort(x),$t.targetLinks.sort(f)}),Ce.nodes.forEach(function($t){var ne=$t.y0,Ct=ne,gt=$t.y1,St=gt;$t.sourceLinks.forEach(function(Nt){Nt.circular?(Nt.y0=gt-Nt.width/2,gt=gt-Nt.width):(Nt.y0=ne+Nt.width/2,ne+=Nt.width)}),$t.targetLinks.forEach(function(Nt){Nt.circular?(Nt.y1=St-Nt.width/2,St=St-Nt.width):(Nt.y1=Ct+Nt.width/2,Ct+=Nt.width)})})}return Ge}function R(Ht,Jt,ge){var he=0;if(ge===null){for(var de=[],se=0;seJt.source.column)}function H(Ht,Jt){var ge=0;Ht.sourceLinks.forEach(function(de){ge=de.circular&&!Pt(de,Jt)?ge+1:ge});var he=0;return Ht.targetLinks.forEach(function(de){he=de.circular&&!Pt(de,Jt)?he+1:he}),ge+he}function F(Ht){var Jt=Ht.source.sourceLinks,ge=0;Jt.forEach(function(se){ge=se.circular?ge+1:ge});var he=Ht.target.targetLinks,de=0;return he.forEach(function(se){de=se.circular?de+1:de}),!(ge>1||de>1)}function U(Ht,Jt,ge){return Ht.sort(X),Ht.forEach(function(he,de){var se=0;if(Pt(he,ge)&&F(he))he.circularPathData.verticalBuffer=se+he.width/2;else{var Tt=0;for(Tt;Ttse?Lt:se}he.circularPathData.verticalBuffer=se+he.width/2}}),Ht}function W(Ht,Jt,ge,he){var de=5,se=g.min(Ht.links,function(Mt){return Mt.source.y0});Ht.links.forEach(function(Mt){Mt.circular&&(Mt.circularPathData={})});var Tt=Ht.links.filter(function(Mt){return Mt.circularLinkType=="top"});U(Tt,Jt,he);var Lt=Ht.links.filter(function(Mt){return Mt.circularLinkType=="bottom"});U(Lt,Jt,he),Ht.links.forEach(function(Mt){if(Mt.circular){if(Mt.circularPathData.arcRadius=Mt.width+p,Mt.circularPathData.leftNodeBuffer=de,Mt.circularPathData.rightNodeBuffer=de,Mt.circularPathData.sourceWidth=Mt.source.x1-Mt.source.x0,Mt.circularPathData.sourceX=Mt.source.x0+Mt.circularPathData.sourceWidth,Mt.circularPathData.targetX=Mt.target.x0,Mt.circularPathData.sourceY=Mt.y0,Mt.circularPathData.targetY=Mt.y1,Pt(Mt,he)&&F(Mt))Mt.circularPathData.leftSmallArcRadius=p+Mt.width/2,Mt.circularPathData.leftLargeArcRadius=p+Mt.width/2,Mt.circularPathData.rightSmallArcRadius=p+Mt.width/2,Mt.circularPathData.rightLargeArcRadius=p+Mt.width/2,Mt.circularLinkType=="bottom"?(Mt.circularPathData.verticalFullExtent=Mt.source.y1+h+Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.rightLargeArcRadius):(Mt.circularPathData.verticalFullExtent=Mt.source.y0-h-Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.rightLargeArcRadius);else{var te=Mt.source.column,ve=Mt.circularLinkType,oe=Ht.links.filter(function(Ge){return Ge.source.column==te&&Ge.circularLinkType==ve});Mt.circularLinkType=="bottom"?oe.sort(yt):oe.sort(lt);var Te=0;oe.forEach(function(Ge,cr){Ge.circularLinkID==Mt.circularLinkID&&(Mt.circularPathData.leftSmallArcRadius=p+Mt.width/2+Te,Mt.circularPathData.leftLargeArcRadius=p+Mt.width/2+cr*Jt+Te),Te=Te+Ge.width}),te=Mt.target.column,oe=Ht.links.filter(function(Ge){return Ge.target.column==te&&Ge.circularLinkType==ve}),Mt.circularLinkType=="bottom"?oe.sort(st):oe.sort(pt),Te=0,oe.forEach(function(Ge,cr){Ge.circularLinkID==Mt.circularLinkID&&(Mt.circularPathData.rightSmallArcRadius=p+Mt.width/2+Te,Mt.circularPathData.rightLargeArcRadius=p+Mt.width/2+cr*Jt+Te),Te=Te+Ge.width}),Mt.circularLinkType=="bottom"?(Mt.circularPathData.verticalFullExtent=Math.max(ge,Mt.source.y1,Mt.target.y1)+h+Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.rightLargeArcRadius):(Mt.circularPathData.verticalFullExtent=se-h-Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.rightLargeArcRadius)}Mt.circularPathData.leftInnerExtent=Mt.circularPathData.sourceX+Mt.circularPathData.leftNodeBuffer,Mt.circularPathData.rightInnerExtent=Mt.circularPathData.targetX-Mt.circularPathData.rightNodeBuffer,Mt.circularPathData.leftFullExtent=Mt.circularPathData.sourceX+Mt.circularPathData.leftLargeArcRadius+Mt.circularPathData.leftNodeBuffer,Mt.circularPathData.rightFullExtent=Mt.circularPathData.targetX-Mt.circularPathData.rightLargeArcRadius-Mt.circularPathData.rightNodeBuffer}if(Mt.circular)Mt.path=q(Mt);else{var He=S.linkHorizontal().source(function(Ge){var cr=Ge.source.x0+(Ge.source.x1-Ge.source.x0),ur=Ge.y0;return[cr,ur]}).target(function(Ge){var cr=Ge.target.x0,ur=Ge.y1;return[cr,ur]});Mt.path=He(Mt)}})}function q(Ht){var Jt="";return Ht.circularLinkType=="top"?Jt="M"+Ht.circularPathData.sourceX+" "+Ht.circularPathData.sourceY+" L"+Ht.circularPathData.leftInnerExtent+" "+Ht.circularPathData.sourceY+" A"+Ht.circularPathData.leftLargeArcRadius+" "+Ht.circularPathData.leftSmallArcRadius+" 0 0 0 "+Ht.circularPathData.leftFullExtent+" "+(Ht.circularPathData.sourceY-Ht.circularPathData.leftSmallArcRadius)+" L"+Ht.circularPathData.leftFullExtent+" "+Ht.circularPathData.verticalLeftInnerExtent+" A"+Ht.circularPathData.leftLargeArcRadius+" "+Ht.circularPathData.leftLargeArcRadius+" 0 0 0 "+Ht.circularPathData.leftInnerExtent+" "+Ht.circularPathData.verticalFullExtent+" L"+Ht.circularPathData.rightInnerExtent+" "+Ht.circularPathData.verticalFullExtent+" A"+Ht.circularPathData.rightLargeArcRadius+" "+Ht.circularPathData.rightLargeArcRadius+" 0 0 0 "+Ht.circularPathData.rightFullExtent+" "+Ht.circularPathData.verticalRightInnerExtent+" L"+Ht.circularPathData.rightFullExtent+" "+(Ht.circularPathData.targetY-Ht.circularPathData.rightSmallArcRadius)+" A"+Ht.circularPathData.rightLargeArcRadius+" "+Ht.circularPathData.rightSmallArcRadius+" 0 0 0 "+Ht.circularPathData.rightInnerExtent+" "+Ht.circularPathData.targetY+" L"+Ht.circularPathData.targetX+" "+Ht.circularPathData.targetY:Jt="M"+Ht.circularPathData.sourceX+" "+Ht.circularPathData.sourceY+" L"+Ht.circularPathData.leftInnerExtent+" "+Ht.circularPathData.sourceY+" A"+Ht.circularPathData.leftLargeArcRadius+" "+Ht.circularPathData.leftSmallArcRadius+" 0 0 1 "+Ht.circularPathData.leftFullExtent+" "+(Ht.circularPathData.sourceY+Ht.circularPathData.leftSmallArcRadius)+" L"+Ht.circularPathData.leftFullExtent+" "+Ht.circularPathData.verticalLeftInnerExtent+" A"+Ht.circularPathData.leftLargeArcRadius+" "+Ht.circularPathData.leftLargeArcRadius+" 0 0 1 "+Ht.circularPathData.leftInnerExtent+" "+Ht.circularPathData.verticalFullExtent+" L"+Ht.circularPathData.rightInnerExtent+" "+Ht.circularPathData.verticalFullExtent+" A"+Ht.circularPathData.rightLargeArcRadius+" "+Ht.circularPathData.rightLargeArcRadius+" 0 0 1 "+Ht.circularPathData.rightFullExtent+" "+Ht.circularPathData.verticalRightInnerExtent+" L"+Ht.circularPathData.rightFullExtent+" "+(Ht.circularPathData.targetY+Ht.circularPathData.rightSmallArcRadius)+" A"+Ht.circularPathData.rightLargeArcRadius+" "+Ht.circularPathData.rightSmallArcRadius+" 0 0 1 "+Ht.circularPathData.rightInnerExtent+" "+Ht.circularPathData.targetY+" L"+Ht.circularPathData.targetX+" "+Ht.circularPathData.targetY,Jt}function X(Ht,Jt){return tt(Ht)==tt(Jt)?Ht.circularLinkType=="bottom"?yt(Ht,Jt):lt(Ht,Jt):tt(Jt)-tt(Ht)}function lt(Ht,Jt){return Ht.y0-Jt.y0}function yt(Ht,Jt){return Jt.y0-Ht.y0}function pt(Ht,Jt){return Ht.y1-Jt.y1}function st(Ht,Jt){return Jt.y1-Ht.y1}function tt(Ht){return Ht.target.column-Ht.source.column}function dt(Ht){return Ht.target.x0-Ht.source.x1}function rt(Ht,Jt){var ge=N(Ht),he=dt(Jt)/Math.tan(ge),de=zt(Ht)=="up"?Ht.y1+he:Ht.y1-he;return de}function at(Ht,Jt){var ge=N(Ht),he=dt(Jt)/Math.tan(ge),de=zt(Ht)=="up"?Ht.y1-he:Ht.y1+he;return de}function vt(Ht,Jt,ge,he){Ht.links.forEach(function(de){if(!de.circular&&de.target.column-de.source.column>1){var se=de.source.column+1,Tt=de.target.column-1,Lt=1,Mt=Tt-se+1;for(Lt=1;se<=Tt;se++,Lt++)Ht.nodes.forEach(function(te){if(te.column==se){var ve=Lt/(Mt+1),oe=Math.pow(1-ve,3),Te=3*ve*Math.pow(1-ve,2),He=3*Math.pow(ve,2)*(1-ve),Ge=Math.pow(ve,3),cr=oe*de.y0+Te*de.y0+He*de.y1+Ge*de.y1,ur=cr-de.width/2,jr=cr+de.width/2,Hr;ur>te.y0&&urte.y0&&jrte.y1&&Y(br,Hr,Jt,ge)})):urte.y1&&(Hr=jr-te.y0+10,te=Y(te,Hr,Jt,ge),Ht.nodes.forEach(function(br){A(br,he)==A(te,he)||br.column!=te.column||br.y0te.y1&&Y(br,Hr,Jt,ge)}))}})}})}function it(Ht,Jt){return Ht.y0>Jt.y0&&Ht.y0Jt.y0&&Ht.y1Jt.y1}function Y(Ht,Jt,ge,he){return Ht.y0+Jt>=ge&&Ht.y1+Jt<=he&&(Ht.y0=Ht.y0+Jt,Ht.y1=Ht.y1+Jt,Ht.targetLinks.forEach(function(de){de.y1=de.y1+Jt}),Ht.sourceLinks.forEach(function(de){de.y0=de.y0+Jt})),Ht}function ft(Ht,Jt,ge,he){Ht.nodes.forEach(function(de){he&&de.y+(de.y1-de.y0)>Jt&&(de.y=de.y-(de.y+(de.y1-de.y0)-Jt));var se=Ht.links.filter(function(Mt){return A(Mt.source,ge)==A(de,ge)}),Tt=se.length;Tt>1&&se.sort(function(Mt,te){if(!Mt.circular&&!te.circular){if(Mt.target.column==te.target.column)return Mt.y1-te.y1;if(wt(Mt,te)){if(Mt.target.column>te.target.column){var ve=at(te,Mt);return Mt.y1-ve}if(te.target.column>Mt.target.column){var oe=at(Mt,te);return oe-te.y1}}else return Mt.y1-te.y1}if(Mt.circular&&!te.circular)return Mt.circularLinkType=="top"?-1:1;if(te.circular&&!Mt.circular)return te.circularLinkType=="top"?1:-1;if(Mt.circular&&te.circular)return Mt.circularLinkType===te.circularLinkType&&Mt.circularLinkType=="top"?Mt.target.column===te.target.column?Mt.target.y1-te.target.y1:te.target.column-Mt.target.column:Mt.circularLinkType===te.circularLinkType&&Mt.circularLinkType=="bottom"?Mt.target.column===te.target.column?te.target.y1-Mt.target.y1:Mt.target.column-te.target.column:Mt.circularLinkType=="top"?-1:1});var Lt=de.y0;se.forEach(function(Mt){Mt.y0=Lt+Mt.width/2,Lt=Lt+Mt.width}),se.forEach(function(Mt,te){if(Mt.circularLinkType=="bottom"){var ve=te+1,oe=0;for(ve;ve1&&de.sort(function(Lt,Mt){if(!Lt.circular&&!Mt.circular){if(Lt.source.column==Mt.source.column)return Lt.y0-Mt.y0;if(wt(Lt,Mt)){if(Mt.source.column0?"up":"down"}function Pt(Ht,Jt){return A(Ht.source,Jt)==A(Ht.target,Jt)}function Wt(Ht,Jt,ge){var he=Ht.nodes,de=Ht.links,se=!1,Tt=!1;if(de.forEach(function(Te){Te.circularLinkType=="top"?se=!0:Te.circularLinkType=="bottom"&&(Tt=!0)}),se==!1||Tt==!1){var Lt=g.min(he,function(Te){return Te.y0}),Mt=g.max(he,function(Te){return Te.y1}),te=Mt-Lt,ve=ge-Jt,oe=ve/te;he.forEach(function(Te){var He=(Te.y1-Te.y0)*oe;Te.y0=(Te.y0-Lt)*oe,Te.y1=Te.y0+He}),de.forEach(function(Te){Te.y0=(Te.y0-Lt)*oe,Te.y1=(Te.y1-Lt)*oe,Te.width=Te.width*oe})}}c.sankeyCircular=w,c.sankeyCenter=o,c.sankeyLeft=r,c.sankeyRight=a,c.sankeyJustify=n,Object.defineProperty(c,"__esModule",{value:!0})})}),TE=Ft((Q,$)=>{$.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}}),rq=Ft((Q,$)=>{var c=XW(),g=(hx(),ai(B1)).interpolateNumber,P=un(),S=QW(),t=eq(),e=TE(),r=fo(),a=li(),n=js(),o=bn(),i=o.strTranslate,s=o.strRotate,f=Lg(),x=f.keyFun,y=f.repeat,v=f.unwrap,T=tc(),u=Xo(),b=Af(),_=b.CAP_SHIFT,C=b.LINE_SPACING,M=3;function E(rt,at,vt){var it=v(at),Y=it.trace,ft=Y.domain,ut=Y.orientation==="h",wt=Y.node.pad,zt=Y.node.thickness,Pt={justify:S.sankeyJustify,left:S.sankeyLeft,right:S.sankeyRight,center:S.sankeyCenter}[Y.node.align],Wt=rt.width*(ft.x[1]-ft.x[0]),Ht=rt.height*(ft.y[1]-ft.y[0]),Jt=it._nodes,ge=it._links,he=it.circular,de;he?de=t.sankeyCircular().circularLinkGap(0):de=S.sankey(),de.iterations(e.sankeyIterations).size(ut?[Wt,Ht]:[Ht,Wt]).nodeWidth(zt).nodePadding(wt).nodeId(function(br){return br.pointNumber}).nodeAlign(Pt).nodes(Jt).links(ge);var se=de();de.nodePadding()=$t||(Ce=$t-rn.y0,Ce>1e-6&&(rn.y0+=Ce,rn.y1+=Ce)),$t=rn.y1+wt})}function cr(br){var Kr=br.map(function(St,Nt){return{x0:St.x0,index:Nt}}).sort(function(St,Nt){return St.x0-Nt.x0}),rn=[],Ce=-1,$t,ne=-1/0,Ct;for(Tt=0;Ttne+zt&&(Ce+=1,$t=gt.x0),ne=gt.x0,rn[Ce]||(rn[Ce]=[]),rn[Ce].push(gt),Ct=$t-gt.x0,gt.x0+=Ct,gt.x1+=Ct}return rn}if(Y.node.x.length&&Y.node.y.length){for(Tt=0;Tt0?" L "+Y.targetX+" "+Y.targetY:"")+"Z"):(vt="M "+(Y.targetX-at)+" "+(Y.targetY-it)+" L "+(Y.rightInnerExtent-at)+" "+(Y.targetY-it)+" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightSmallArcRadius+it)+" 0 0 0 "+(Y.rightFullExtent-it-at)+" "+(Y.targetY+Y.rightSmallArcRadius)+" L "+(Y.rightFullExtent-it-at)+" "+Y.verticalRightInnerExtent,ft&&ut?vt+=" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.rightInnerExtent-it-at)+" "+(Y.verticalFullExtent+it)+" L "+(Y.rightFullExtent+it-at-(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent+it)+" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.leftFullExtent+it)+" "+Y.verticalLeftInnerExtent:ft?vt+=" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.rightFullExtent-at-it-(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent-it)+" L "+(Y.leftFullExtent+it+(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent-it)+" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.leftFullExtent+it)+" "+Y.verticalLeftInnerExtent:vt+=" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.rightInnerExtent-at)+" "+(Y.verticalFullExtent+it)+" L "+Y.leftInnerExtent+" "+(Y.verticalFullExtent+it)+" A "+(Y.leftLargeArcRadius+it)+" "+(Y.leftLargeArcRadius+it)+" 0 0 0 "+(Y.leftFullExtent+it)+" "+Y.verticalLeftInnerExtent,vt+=" L "+(Y.leftFullExtent+it)+" "+(Y.sourceY+Y.leftSmallArcRadius)+" A "+(Y.leftLargeArcRadius+it)+" "+(Y.leftSmallArcRadius+it)+" 0 0 0 "+Y.leftInnerExtent+" "+(Y.sourceY-it)+" L "+Y.sourceX+" "+(Y.sourceY-it)+" L "+Y.sourceX+" "+(Y.sourceY+it)+" L "+Y.leftInnerExtent+" "+(Y.sourceY+it)+" A "+(Y.leftLargeArcRadius-it)+" "+(Y.leftSmallArcRadius-it)+" 0 0 1 "+(Y.leftFullExtent-it)+" "+(Y.sourceY+Y.leftSmallArcRadius)+" L "+(Y.leftFullExtent-it)+" "+Y.verticalLeftInnerExtent,ft&&ut?vt+=" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.leftFullExtent-it-(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent-it)+" L "+(Y.rightFullExtent+it-at+(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent-it)+" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.rightFullExtent+it-at)+" "+Y.verticalRightInnerExtent:ft?vt+=" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.leftFullExtent+it)+" "+(Y.verticalFullExtent+it)+" L "+(Y.rightFullExtent-at-it)+" "+(Y.verticalFullExtent+it)+" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.rightFullExtent+it-at)+" "+Y.verticalRightInnerExtent:vt+=" A "+(Y.leftLargeArcRadius-it)+" "+(Y.leftLargeArcRadius-it)+" 0 0 1 "+Y.leftInnerExtent+" "+(Y.verticalFullExtent-it)+" L "+(Y.rightInnerExtent-at)+" "+(Y.verticalFullExtent-it)+" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightLargeArcRadius-it)+" 0 0 1 "+(Y.rightFullExtent+it-at)+" "+Y.verticalRightInnerExtent,vt+=" L "+(Y.rightFullExtent+it-at)+" "+(Y.targetY+Y.rightSmallArcRadius)+" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.rightInnerExtent-at)+" "+(Y.targetY+it)+" L "+(Y.targetX-at)+" "+(Y.targetY+it)+(at>0?" L "+Y.targetX+" "+Y.targetY:"")+"Z"),vt}function p(){var rt=.5;function at(vt){var it=vt.linkArrowLength;if(vt.link.circular)return h(vt.link,it);var Y=Math.abs((vt.link.target.x0-vt.link.source.x1)/2);it>Y&&(it=Y);var ft=vt.link.source.x1,ut=vt.link.target.x0-it,wt=g(ft,ut),zt=wt(rt),Pt=wt(1-rt),Wt=vt.link.y0-vt.link.width/2,Ht=vt.link.y0+vt.link.width/2,Jt=vt.link.y1-vt.link.width/2,ge=vt.link.y1+vt.link.width/2,he="M"+ft+","+Wt,de="C"+zt+","+Wt+" "+Pt+","+Jt+" "+ut+","+Jt,se="C"+Pt+","+ge+" "+zt+","+Ht+" "+ft+","+Ht,Tt=it>0?"L"+(ut+it)+","+(Jt+vt.link.width/2):"";return Tt+="L"+ut+","+ge,he+de+Tt+se+"Z"}return at}function k(rt,at){var vt=r(at.color),it=e.nodePadAcross,Y=rt.nodePad/2;at.dx=at.x1-at.x0,at.dy=at.y1-at.y0;var ft=at.dx,ut=Math.max(.5,at.dy),wt="node_"+at.pointNumber;return at.group&&(wt=o.randstr()),at.trace=rt.trace,at.curveNumber=rt.trace.index,{index:at.pointNumber,key:wt,partOfGroup:at.partOfGroup||!1,group:at.group,traceId:rt.key,trace:rt.trace,node:at,nodePad:rt.nodePad,nodeLineColor:rt.nodeLineColor,nodeLineWidth:rt.nodeLineWidth,textFont:rt.textFont,size:rt.horizontal?rt.height:rt.width,visibleWidth:Math.ceil(ft),visibleHeight:ut,zoneX:-it,zoneY:-Y,zoneWidth:ft+2*it,zoneHeight:ut+2*Y,labelY:rt.horizontal?at.dy/2+1:at.dx/2+1,left:at.originalLayer===1,sizeAcross:rt.width,forceLayouts:rt.forceLayouts,horizontal:rt.horizontal,darkBackground:vt.getBrightness()<=128,tinyColorHue:a.tinyRGB(vt),tinyColorAlpha:vt.getAlpha(),valueFormat:rt.valueFormat,valueSuffix:rt.valueSuffix,sankey:rt.sankey,graph:rt.graph,arrangement:rt.arrangement,uniqueNodeLabelPathId:[rt.guid,rt.key,wt].join("_"),interactionState:rt.interactionState,figure:rt}}function w(rt){rt.attr("transform",function(at){return i(at.node.x0.toFixed(3),at.node.y0.toFixed(3))})}function R(rt){rt.call(w)}function O(rt,at){rt.call(R),at.attr("d",p())}function N(rt){rt.attr("width",function(at){return at.node.x1-at.node.x0}).attr("height",function(at){return at.visibleHeight})}function V(rt){return rt.link.width>1||rt.linkLineWidth>0}function H(rt){var at=i(rt.translateX,rt.translateY);return at+(rt.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function F(rt,at,vt){rt.on(".basic",null).on("mouseover.basic",function(it){!it.interactionState.dragInProgress&&!it.partOfGroup&&(vt.hover(this,it,at),it.interactionState.hovered=[this,it])}).on("mousemove.basic",function(it){!it.interactionState.dragInProgress&&!it.partOfGroup&&(vt.follow(this,it),it.interactionState.hovered=[this,it])}).on("mouseout.basic",function(it){!it.interactionState.dragInProgress&&!it.partOfGroup&&(vt.unhover(this,it,at),it.interactionState.hovered=!1)}).on("click.basic",function(it){it.interactionState.hovered&&(vt.unhover(this,it,at),it.interactionState.hovered=!1),!it.interactionState.dragInProgress&&!it.partOfGroup&&vt.select(this,it,at)})}function U(rt,at,vt,it){var Y=P.behavior.drag().origin(function(ft){return{x:ft.node.x0+ft.visibleWidth/2,y:ft.node.y0+ft.visibleHeight/2}}).on("dragstart",function(ft){if(ft.arrangement!=="fixed"&&(o.ensureSingle(it._fullLayout._infolayer,"g","dragcover",function(wt){it._fullLayout._dragCover=wt}),o.raiseToTop(this),ft.interactionState.dragInProgress=ft.node,pt(ft.node),ft.interactionState.hovered&&(vt.nodeEvents.unhover.apply(0,ft.interactionState.hovered),ft.interactionState.hovered=!1),ft.arrangement==="snap")){var ut=ft.traceId+"|"+ft.key;ft.forceLayouts[ut]?ft.forceLayouts[ut].alpha(1):W(rt,ut,ft),q(rt,at,ft,ut,it)}}).on("drag",function(ft){if(ft.arrangement!=="fixed"){var ut=P.event.x,wt=P.event.y;ft.arrangement==="snap"?(ft.node.x0=ut-ft.visibleWidth/2,ft.node.x1=ut+ft.visibleWidth/2,ft.node.y0=wt-ft.visibleHeight/2,ft.node.y1=wt+ft.visibleHeight/2):(ft.arrangement==="freeform"&&(ft.node.x0=ut-ft.visibleWidth/2,ft.node.x1=ut+ft.visibleWidth/2),wt=Math.max(0,Math.min(ft.size-ft.visibleHeight/2,wt)),ft.node.y0=wt-ft.visibleHeight/2,ft.node.y1=wt+ft.visibleHeight/2),pt(ft.node),ft.arrangement!=="snap"&&(ft.sankey.update(ft.graph),O(rt.filter(st(ft)),at))}}).on("dragend",function(ft){if(ft.arrangement!=="fixed"){ft.interactionState.dragInProgress=!1;for(var ut=0;ut0)window.requestAnimationFrame(ft);else{var zt=vt.node.originalX;vt.node.x0=zt-vt.visibleWidth/2,vt.node.x1=zt+vt.visibleWidth/2,lt(vt,Y)}})}function X(rt,at,vt,it){return function(){for(var Y=0,ft=0;ft0&&it.forceLayouts[at].alpha(0)}}function lt(rt,at){for(var vt=[],it=[],Y=0;Y{var c=un(),g=bn(),P=g.numberFormat,S=rq(),t=Qh(),e=li(),r=TE().cn,a=g._;function n(_){return _!==""}function o(_,C){return _.filter(function(M){return M.key===C.traceId})}function i(_,C){c.select(_).select("path").style("fill-opacity",C),c.select(_).select("rect").style("fill-opacity",C)}function s(_){c.select(_).select("text.name").style("fill","black")}function f(_){return function(C){return _.node.sourceLinks.indexOf(C.link)!==-1||_.node.targetLinks.indexOf(C.link)!==-1}}function x(_){return function(C){return C.node.sourceLinks.indexOf(_.link)!==-1||C.node.targetLinks.indexOf(_.link)!==-1}}function y(_,C,M){C&&M&&o(M,C).selectAll("."+r.sankeyLink).filter(f(C)).call(T.bind(0,C,M,!1))}function v(_,C,M){C&&M&&o(M,C).selectAll("."+r.sankeyLink).filter(f(C)).call(u.bind(0,C,M,!1))}function T(_,C,M,E){E.style("fill",function(A){if(!A.link.concentrationscale)return A.tinyColorHoverHue}).style("fill-opacity",function(A){if(!A.link.concentrationscale)return A.tinyColorHoverAlpha}),E.each(function(A){var h=A.link.label;h!==""&&o(C,_).selectAll("."+r.sankeyLink).filter(function(p){return p.link.label===h}).style("fill",function(p){if(!p.link.concentrationscale)return p.tinyColorHoverHue}).style("fill-opacity",function(p){if(!p.link.concentrationscale)return p.tinyColorHoverAlpha})}),M&&o(C,_).selectAll("."+r.sankeyNode).filter(x(_)).call(y)}function u(_,C,M,E){E.style("fill",function(A){return A.tinyColorHue}).style("fill-opacity",function(A){return A.tinyColorAlpha}),E.each(function(A){var h=A.link.label;h!==""&&o(C,_).selectAll("."+r.sankeyLink).filter(function(p){return p.link.label===h}).style("fill",function(p){return p.tinyColorHue}).style("fill-opacity",function(p){return p.tinyColorAlpha})}),M&&o(C,_).selectAll(r.sankeyNode).filter(x(_)).call(v)}function b(_,C){var M=_.hoverlabel||{},E=g.nestedProperty(M,C).get();return Array.isArray(E)?!1:E}$.exports=function(_,C){for(var M=_._fullLayout,E=M._paper,A=M._size,h=0;h<_._fullData.length;h++)if(_._fullData[h].visible&&_._fullData[h].type===r.sankey&&!_._fullData[h]._viewInitial){var p=_._fullData[h].node;_._fullData[h]._viewInitial={node:{groups:p.groups.slice(),x:p.x.slice(),y:p.y.slice()}}}var k=function(yt,pt){var st=pt.link;st.originalEvent=c.event,_._hoverdata=[st],t.click(_,{target:!0})},w=function(yt,pt,st){_._fullLayout.hovermode!==!1&&(c.select(yt).call(T.bind(0,pt,st,!0)),pt.link.trace.link.hoverinfo!=="skip"&&(pt.link.fullData=pt.link.trace,_.emit("plotly_hover",{event:c.event,points:[pt.link]})))},R=a(_,"source:")+" ",O=a(_,"target:")+" ",N=a(_,"concentration:")+" ",V=a(_,"incoming flow count:")+" ",H=a(_,"outgoing flow count:")+" ",F=function(yt,pt){if(_._fullLayout.hovermode===!1)return;var st=pt.link.trace.link;if(st.hoverinfo==="none"||st.hoverinfo==="skip")return;var tt=[];function dt(ut){var wt,zt;ut.circular?(wt=(ut.circularPathData.leftInnerExtent+ut.circularPathData.rightInnerExtent)/2,zt=ut.circularPathData.verticalFullExtent):(wt=(ut.source.x1+ut.target.x0)/2,zt=(ut.y0+ut.y1)/2);var Pt=[wt,zt];return ut.trace.orientation==="v"&&Pt.reverse(),Pt[0]+=pt.parent.translateX,Pt[1]+=pt.parent.translateY,Pt}for(var rt=0,at=0;at"),color:b(st,"bgcolor")||e.addOpacity(vt.color,1),borderColor:b(st,"bordercolor"),fontFamily:b(st,"font.family"),fontSize:b(st,"font.size"),fontColor:b(st,"font.color"),fontWeight:b(st,"font.weight"),fontStyle:b(st,"font.style"),fontVariant:b(st,"font.variant"),fontTextcase:b(st,"font.textcase"),fontLineposition:b(st,"font.lineposition"),fontShadow:b(st,"font.shadow"),nameLength:b(st,"namelength"),textAlign:b(st,"align"),idealAlign:c.event.x"),color:b(st,"bgcolor")||pt.tinyColorHue,borderColor:b(st,"bordercolor"),fontFamily:b(st,"font.family"),fontSize:b(st,"font.size"),fontColor:b(st,"font.color"),fontWeight:b(st,"font.weight"),fontStyle:b(st,"font.style"),fontVariant:b(st,"font.variant"),fontTextcase:b(st,"font.textcase"),fontLineposition:b(st,"font.lineposition"),fontShadow:b(st,"font.shadow"),nameLength:b(st,"namelength"),textAlign:b(st,"align"),idealAlign:"left",hovertemplate:st.hovertemplate,hovertemplateLabels:Y,eventData:[pt.node]},{container:M._hoverlayer.node(),outerContainer:M._paper.node(),gd:_});i(wt,.85),s(wt)}}},lt=function(yt,pt,st){_._fullLayout.hovermode!==!1&&(c.select(yt).call(v,pt,st),pt.node.trace.node.hoverinfo!=="skip"&&(pt.node.fullData=pt.node.trace,_.emit("plotly_unhover",{event:c.event,points:[pt.node]})),t.loneUnhover(M._hoverlayer.node()))};S(_,E,C,{width:A.w,height:A.h,margin:{t:A.t,r:A.r,b:A.b,l:A.l}},{linkEvents:{hover:w,follow:F,unhover:U,select:k},nodeEvents:{hover:q,follow:X,unhover:lt,select:W}})}}),nq=Ft(Q=>{var $=Yc().overrideAll,c=ud().getModuleCalcData,g=AE(),P=Ao(),S=P0(),t=up(),e=vf().prepSelect,r=bn(),a=Xo(),n="sankey";Q.name=n,Q.baseLayoutAttrOverrides=$({hoverlabel:P.hoverlabel},"plot","nested"),Q.plot=function(i){var s=c(i.calcdata,n)[0];g(i,s),Q.updateFx(i)},Q.clean=function(i,s,f,x){var y=x._has&&x._has(n),v=s._has&&s._has(n);y&&!v&&(x._paperdiv.selectAll(".sankey").remove(),x._paperdiv.selectAll(".bgsankey").remove())},Q.updateFx=function(i){for(var s=0;s{$.exports=function(c,g){for(var P=c.cd,S=[],t=P[0].trace,e=t._sankey.graph.nodes,r=0;r{$.exports={attributes:bE(),supplyDefaults:ZW(),calc:$W(),plot:AE(),moduleType:"trace",name:"sankey",basePlotModule:nq(),selectPoints:iq(),categories:["noOpacity"],meta:{}}}),oq=Ft((Q,$)=>{$.exports=aq()}),sq=Ft(Q=>{var $=Kc();Q.name="indicator",Q.plot=function(c,g,P,S){$.plotBasePlot(Q.name,c,g,P,S)},Q.clean=function(c,g,P,S){$.cleanBasePlot(Q.name,c,g,P,S)}}),ME=Ft((Q,$)=>{var c=Ta().extendFlat,g=Ta().extendDeep,P=Yc().overrideAll,S=Ea(),t=bi(),e=Nh().attributes,r=Ad(),a=pu().templatedArray,n=J_(),o=fh().descriptionOnlyNumbers,i=S({editType:"plot",colorEditType:"plot"}),s={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:t.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},f={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},x=a("step",g({},s,{range:f}));$.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:e({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:c({},i,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:o("value")},font:c({},i,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:o("value")},increasing:{symbol:{valType:"string",dflt:n.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:n.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:n.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:n.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:c({},i,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:g({},s,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:t.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:P({range:f,visible:c({},r.visible,{dflt:!0}),tickmode:r.minor.tickmode,nticks:r.nticks,tick0:r.tick0,dtick:r.dtick,tickvals:r.tickvals,ticktext:r.ticktext,ticks:c({},r.ticks,{dflt:"outside"}),ticklen:r.ticklen,tickwidth:r.tickwidth,tickcolor:r.tickcolor,ticklabelstep:r.ticklabelstep,showticklabels:r.showticklabels,labelalias:r.labelalias,tickfont:S({}),tickangle:r.tickangle,tickformat:r.tickformat,tickformatstops:r.tickformatstops,tickprefix:r.tickprefix,showtickprefix:r.showtickprefix,ticksuffix:r.ticksuffix,showticksuffix:r.showticksuffix,separatethousands:r.separatethousands,exponentformat:r.exponentformat,minexponent:r.minexponent,showexponent:r.showexponent,editType:"plot"},"plot"),steps:x,threshold:{line:{color:c({},s.line.color,{}),width:c({},s.line.width,{dflt:1}),editType:"plot"},thickness:c({},s.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}}),SE=Ft((Q,$)=>{$.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}}),lq=Ft((Q,$)=>{var c=bn(),g=ME(),P=Nh().defaults,S=pu(),t=Md(),e=SE(),r=mg(),a=gg(),n=n0(),o=dm();function i(f,x,y,v){function T(U,W){return c.coerce(f,x,g,U,W)}P(x,v,T),T("mode"),x._hasNumber=x.mode.indexOf("number")!==-1,x._hasDelta=x.mode.indexOf("delta")!==-1,x._hasGauge=x.mode.indexOf("gauge")!==-1;var u=T("value");x._range=[0,typeof u=="number"?1.5*u:1];var b=new Array(2),_;if(x._hasNumber){T("number.valueformat");var C=c.extendFlat({},v.font);C.size=void 0,c.coerceFont(T,"number.font",C),x.number.font.size===void 0&&(x.number.font.size=e.defaultNumberFontSize,b[0]=!0),T("number.prefix"),T("number.suffix"),_=x.number.font.size}var M;if(x._hasDelta){var E=c.extendFlat({},v.font);E.size=void 0,c.coerceFont(T,"delta.font",E),x.delta.font.size===void 0&&(x.delta.font.size=(x._hasNumber?.5:1)*(_||e.defaultNumberFontSize),b[1]=!0),T("delta.reference",x.value),T("delta.relative"),T("delta.valueformat",x.delta.relative?"2%":""),T("delta.increasing.symbol"),T("delta.increasing.color"),T("delta.decreasing.symbol"),T("delta.decreasing.color"),T("delta.position"),T("delta.prefix"),T("delta.suffix"),M=x.delta.font.size}x._scaleNumbers=(!x._hasNumber||b[0])&&(!x._hasDelta||b[1])||!1;var A=c.extendFlat({},v.font);A.size=.25*(_||M||e.defaultNumberFontSize),c.coerceFont(T,"title.font",A),T("title.text");var h,p,k,w;function R(U,W){return c.coerce(h,p,g.gauge,U,W)}function O(U,W){return c.coerce(k,w,g.gauge.axis,U,W)}if(x._hasGauge){h=f.gauge,h||(h={}),p=S.newContainer(x,"gauge"),R("shape");var N=x._isBullet=x.gauge.shape==="bullet";N||T("title.align","center");var V=x._isAngular=x.gauge.shape==="angular";V||T("align","center"),R("bgcolor",v.paper_bgcolor),R("borderwidth"),R("bordercolor"),R("bar.color"),R("bar.line.color"),R("bar.line.width");var H=e.valueThickness*(x.gauge.shape==="bullet"?.5:1);R("bar.thickness",H),t(h,p,{name:"steps",handleItemDefaults:s}),R("threshold.value"),R("threshold.thickness"),R("threshold.line.width"),R("threshold.line.color"),k={},h&&(k=h.axis||{}),w=S.newContainer(p,"axis"),O("visible"),x._range=O("range",x._range);var F={font:v.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};r(k,w,O,"linear"),o(k,w,O,"linear",F),n(k,w,O,"linear",F),a(k,w,O,F)}else T("title.align","center"),T("align","center"),x._isAngular=x._isBullet=!1;x._length=null}function s(f,x){function y(v,T){return c.coerce(f,x,g.gauge.steps,v,T)}y("color"),y("line.color"),y("line.width"),y("range"),y("thickness")}$.exports={supplyDefaults:i}}),uq=Ft((Q,$)=>{function c(g,P){var S=[],t=P.value;typeof P._lastValue!="number"&&(P._lastValue=P.value);var e=P._lastValue,r=e;return P._hasDelta&&typeof P.delta.reference=="number"&&(r=P.delta.reference),S[0]={y:t,lastY:e,delta:t-r,relativeDelta:(t-r)/r},S}$.exports={calc:c}}),cq=Ft((Q,$)=>{var c=un(),g=(hx(),ai(B1)).interpolate,P=(hx(),ai(B1)).interpolateNumber,S=bn(),t=S.strScale,e=S.strTranslate,r=S.rad2deg,a=Af().MID_SHIFT,n=js(),o=SE(),i=tc(),s=Es(),f=Ky(),x=Z_(),y=Ad(),v=li(),T={left:"start",center:"middle",right:"end"},u={left:0,center:.5,right:1},b=/[yzafpnµmkMGTPEZY]/;function _(N){return N&&N.duration>0}$.exports=function(N,V,H,F){var U=N._fullLayout,W;_(H)&&F&&(W=F()),S.makeTraceGroups(U._indicatorlayer,V,"trace").each(function(q){var X=q[0],lt=X.trace,yt=c.select(this),pt=lt._hasGauge,st=lt._isAngular,tt=lt._isBullet,dt=lt.domain,rt={w:U._size.w*(dt.x[1]-dt.x[0]),h:U._size.h*(dt.y[1]-dt.y[0]),l:U._size.l+U._size.w*dt.x[0],r:U._size.r+U._size.w*(1-dt.x[1]),t:U._size.t+U._size.h*(1-dt.y[1]),b:U._size.b+U._size.h*dt.y[0]},at=rt.l+rt.w/2,vt=rt.t+rt.h/2,it=Math.min(rt.w/2,rt.h),Y=o.innerRadius*it,ft,ut,wt,zt=lt.align||"center";if(ut=vt,!pt)ft=rt.l+u[zt]*rt.w,wt=function(Lt){return k(Lt,rt.w,rt.h)};else if(st&&(ft=at,ut=vt+it/2,wt=function(Lt){return w(Lt,.9*Y)}),tt){var Pt=o.bulletPadding,Wt=1-o.bulletNumberDomainSize+Pt;ft=rt.l+(Wt+(1-Wt)*u[zt])*rt.w,wt=function(Lt){return k(Lt,(o.bulletNumberDomainSize-Pt)*rt.w,rt.h)}}E(N,yt,q,{numbersX:ft,numbersY:ut,numbersScaler:wt,transitionOpts:H,onComplete:W});var Ht,Jt;pt&&(Ht={range:lt.gauge.axis.range,color:lt.gauge.bgcolor,line:{color:lt.gauge.bordercolor,width:0},thickness:1},Jt={range:lt.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:lt.gauge.bordercolor,width:lt.gauge.borderwidth},thickness:1});var ge=yt.selectAll("g.angular").data(st?q:[]);ge.exit().remove();var he=yt.selectAll("g.angularaxis").data(st?q:[]);he.exit().remove(),st&&M(N,yt,q,{radius:it,innerRadius:Y,gauge:ge,layer:he,size:rt,gaugeBg:Ht,gaugeOutline:Jt,transitionOpts:H,onComplete:W});var de=yt.selectAll("g.bullet").data(tt?q:[]);de.exit().remove();var se=yt.selectAll("g.bulletaxis").data(tt?q:[]);se.exit().remove(),tt&&C(N,yt,q,{gauge:de,layer:se,size:rt,gaugeBg:Ht,gaugeOutline:Jt,transitionOpts:H,onComplete:W});var Tt=yt.selectAll("text.title").data(q);Tt.exit().remove(),Tt.enter().append("text").classed("title",!0),Tt.attr("text-anchor",function(){return tt?T.right:T[lt.title.align]}).text(lt.title.text).call(n.font,lt.title.font).call(i.convertToTspans,N),Tt.attr("transform",function(){var Lt=rt.l+rt.w*u[lt.title.align],Mt,te=o.titlePadding,ve=n.bBox(Tt.node());if(pt){if(st)if(lt.gauge.axis.visible){var oe=n.bBox(he.node());Mt=oe.top-te-ve.bottom}else Mt=rt.t+rt.h/2-it/2-ve.bottom-te;tt&&(Mt=ut-(ve.top+ve.bottom)/2,Lt=rt.l-o.bulletPadding*rt.w)}else Mt=lt._numbersTop-te-ve.bottom;return e(Lt,Mt)})})};function C(N,V,H,F){var U=H[0].trace,W=F.gauge,q=F.layer,X=F.gaugeBg,lt=F.gaugeOutline,yt=F.size,pt=U.domain,st=F.transitionOpts,tt=F.onComplete,dt,rt,at,vt,it;W.enter().append("g").classed("bullet",!0),W.attr("transform",e(yt.l,yt.t)),q.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),q.selectAll("g.xbulletaxistick,path,text").remove();var Y=yt.h,ft=U.gauge.bar.thickness*Y,ut=pt.x[0],wt=pt.x[0]+(pt.x[1]-pt.x[0])*(U._hasNumber||U._hasDelta?1-o.bulletNumberDomainSize:1);dt=p(N,U.gauge.axis),dt._id="xbulletaxis",dt.domain=[ut,wt],dt.setScale(),rt=s.calcTicks(dt),at=s.makeTransTickFn(dt),vt=s.getTickSigns(dt)[2],it=yt.t+yt.h,dt.visible&&(s.drawTicks(N,dt,{vals:dt.ticks==="inside"?s.clipEnds(dt,rt):rt,layer:q,path:s.makeTickPath(dt,it,vt),transFn:at}),s.drawLabels(N,dt,{vals:rt,layer:q,transFn:at,labelFns:s.makeLabelFns(dt,it)}));function zt(de){de.attr("width",function(se){return Math.max(0,dt.c2p(se.range[1])-dt.c2p(se.range[0]))}).attr("x",function(se){return dt.c2p(se.range[0])}).attr("y",function(se){return .5*(1-se.thickness)*Y}).attr("height",function(se){return se.thickness*Y})}var Pt=[X].concat(U.gauge.steps),Wt=W.selectAll("g.bg-bullet").data(Pt);Wt.enter().append("g").classed("bg-bullet",!0).append("rect"),Wt.select("rect").call(zt).call(A),Wt.exit().remove();var Ht=W.selectAll("g.value-bullet").data([U.gauge.bar]);Ht.enter().append("g").classed("value-bullet",!0).append("rect"),Ht.select("rect").attr("height",ft).attr("y",(Y-ft)/2).call(A),_(st)?Ht.select("rect").transition().duration(st.duration).ease(st.easing).each("end",function(){tt&&tt()}).each("interrupt",function(){tt&&tt()}).attr("width",Math.max(0,dt.c2p(Math.min(U.gauge.axis.range[1],H[0].y)))):Ht.select("rect").attr("width",typeof H[0].y=="number"?Math.max(0,dt.c2p(Math.min(U.gauge.axis.range[1],H[0].y))):0),Ht.exit().remove();var Jt=H.filter(function(){return U.gauge.threshold.value||U.gauge.threshold.value===0}),ge=W.selectAll("g.threshold-bullet").data(Jt);ge.enter().append("g").classed("threshold-bullet",!0).append("line"),ge.select("line").attr("x1",dt.c2p(U.gauge.threshold.value)).attr("x2",dt.c2p(U.gauge.threshold.value)).attr("y1",(1-U.gauge.threshold.thickness)/2*Y).attr("y2",(1-(1-U.gauge.threshold.thickness)/2)*Y).call(v.stroke,U.gauge.threshold.line.color).style("stroke-width",U.gauge.threshold.line.width),ge.exit().remove();var he=W.selectAll("g.gauge-outline").data([lt]);he.enter().append("g").classed("gauge-outline",!0).append("rect"),he.select("rect").call(zt).call(A),he.exit().remove()}function M(N,V,H,F){var U=H[0].trace,W=F.size,q=F.radius,X=F.innerRadius,lt=F.gaugeBg,yt=F.gaugeOutline,pt=[W.l+W.w/2,W.t+W.h/2+q/2],st=F.gauge,tt=F.layer,dt=F.transitionOpts,rt=F.onComplete,at=Math.PI/2;function vt(He){var Ge=U.gauge.axis.range[0],cr=U.gauge.axis.range[1],ur=(He-Ge)/(cr-Ge)*Math.PI-at;return ur<-at?-at:ur>at?at:ur}function it(He){return c.svg.arc().innerRadius((X+q)/2-He/2*(q-X)).outerRadius((X+q)/2+He/2*(q-X)).startAngle(-at)}function Y(He){He.attr("d",function(Ge){return it(Ge.thickness).startAngle(vt(Ge.range[0])).endAngle(vt(Ge.range[1]))()})}var ft,ut,wt,zt;st.enter().append("g").classed("angular",!0),st.attr("transform",e(pt[0],pt[1])),tt.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),tt.selectAll("g.xangularaxistick,path,text").remove(),ft=p(N,U.gauge.axis),ft.type="linear",ft.range=U.gauge.axis.range,ft._id="xangularaxis",ft.ticklabeloverflow="allow",ft.setScale();var Pt=function(He){return(ft.range[0]-He.x)/(ft.range[1]-ft.range[0])*Math.PI+Math.PI},Wt={},Ht=s.makeLabelFns(ft,0),Jt=Ht.labelStandoff;Wt.xFn=function(He){var Ge=Pt(He);return Math.cos(Ge)*Jt},Wt.yFn=function(He){var Ge=Pt(He),cr=Math.sin(Ge)>0?.2:1;return-Math.sin(Ge)*(Jt+He.fontSize*cr)+Math.abs(Math.cos(Ge))*(He.fontSize*a)},Wt.anchorFn=function(He){var Ge=Pt(He),cr=Math.cos(Ge);return Math.abs(cr)<.1?"middle":cr>0?"start":"end"},Wt.heightFn=function(He,Ge,cr){var ur=Pt(He);return-.5*(1+Math.sin(ur))*cr};var ge=function(He){return e(pt[0]+q*Math.cos(He),pt[1]-q*Math.sin(He))};wt=function(He){return ge(Pt(He))};var he=function(He){var Ge=Pt(He);return ge(Ge)+"rotate("+-r(Ge)+")"};if(ut=s.calcTicks(ft),zt=s.getTickSigns(ft)[2],ft.visible){zt=ft.ticks==="inside"?-1:1;var de=(ft.linewidth||1)/2;s.drawTicks(N,ft,{vals:ut,layer:tt,path:"M"+zt*de+",0h"+zt*ft.ticklen,transFn:he}),s.drawLabels(N,ft,{vals:ut,layer:tt,transFn:wt,labelFns:Wt})}var se=[lt].concat(U.gauge.steps),Tt=st.selectAll("g.bg-arc").data(se);Tt.enter().append("g").classed("bg-arc",!0).append("path"),Tt.select("path").call(Y).call(A),Tt.exit().remove();var Lt=it(U.gauge.bar.thickness),Mt=st.selectAll("g.value-arc").data([U.gauge.bar]);Mt.enter().append("g").classed("value-arc",!0).append("path");var te=Mt.select("path");_(dt)?(te.transition().duration(dt.duration).ease(dt.easing).each("end",function(){rt&&rt()}).each("interrupt",function(){rt&&rt()}).attrTween("d",h(Lt,vt(H[0].lastY),vt(H[0].y))),U._lastValue=H[0].y):te.attr("d",typeof H[0].y=="number"?Lt.endAngle(vt(H[0].y)):"M0,0Z"),te.call(A),Mt.exit().remove(),se=[];var ve=U.gauge.threshold.value;(ve||ve===0)&&se.push({range:[ve,ve],color:U.gauge.threshold.color,line:{color:U.gauge.threshold.line.color,width:U.gauge.threshold.line.width},thickness:U.gauge.threshold.thickness});var oe=st.selectAll("g.threshold-arc").data(se);oe.enter().append("g").classed("threshold-arc",!0).append("path"),oe.select("path").call(Y).call(A),oe.exit().remove();var Te=st.selectAll("g.gauge-outline").data([yt]);Te.enter().append("g").classed("gauge-outline",!0).append("path"),Te.select("path").call(Y).call(A),Te.exit().remove()}function E(N,V,H,F){var U=H[0].trace,W=F.numbersX,q=F.numbersY,X=U.align||"center",lt=T[X],yt=F.transitionOpts,pt=F.onComplete,st=S.ensureSingle(V,"g","numbers"),tt,dt,rt,at=[];U._hasNumber&&at.push("number"),U._hasDelta&&(at.push("delta"),U.delta.position==="left"&&at.reverse());var vt=st.selectAll("text").data(at);vt.enter().append("text"),vt.attr("text-anchor",function(){return lt}).attr("class",function(ge){return ge}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),vt.exit().remove();function it(ge,he,de,se){if(ge.match("s")&&de>=0!=se>=0&&!he(de).slice(-1).match(b)&&!he(se).slice(-1).match(b)){var Tt=ge.slice().replace("s","f").replace(/\d+/,function(Mt){return parseInt(Mt)-1}),Lt=p(N,{tickformat:Tt});return function(Mt){return Math.abs(Mt)<1?s.tickText(Lt,Mt).text:he(Mt)}}else return he}function Y(){var ge=p(N,{tickformat:U.number.valueformat},U._range);ge.setScale(),s.prepTicks(ge);var he=function(Mt){return s.tickText(ge,Mt).text},de=U.number.suffix,se=U.number.prefix,Tt=st.select("text.number");function Lt(){var Mt=typeof H[0].y=="number"?se+he(H[0].y)+de:"-";Tt.text(Mt).call(n.font,U.number.font).call(i.convertToTspans,N)}return _(yt)?Tt.transition().duration(yt.duration).ease(yt.easing).each("end",function(){Lt(),pt&&pt()}).each("interrupt",function(){Lt(),pt&&pt()}).attrTween("text",function(){var Mt=c.select(this),te=P(H[0].lastY,H[0].y);U._lastValue=H[0].y;var ve=it(U.number.valueformat,he,H[0].lastY,H[0].y);return function(oe){Mt.text(se+ve(te(oe))+de)}}):Lt(),tt=R(se+he(H[0].y)+de,U.number.font,lt,N),Tt}function ft(){var ge=p(N,{tickformat:U.delta.valueformat},U._range);ge.setScale(),s.prepTicks(ge);var he=function(oe){return s.tickText(ge,oe).text},de=U.delta.suffix,se=U.delta.prefix,Tt=function(oe){var Te=U.delta.relative?oe.relativeDelta:oe.delta;return Te},Lt=function(oe,Te){return oe===0||typeof oe!="number"||isNaN(oe)?"-":(oe>0?U.delta.increasing.symbol:U.delta.decreasing.symbol)+se+Te(oe)+de},Mt=function(oe){return oe.delta>=0?U.delta.increasing.color:U.delta.decreasing.color};U._deltaLastValue===void 0&&(U._deltaLastValue=Tt(H[0]));var te=st.select("text.delta");te.call(n.font,U.delta.font).call(v.fill,Mt({delta:U._deltaLastValue}));function ve(){te.text(Lt(Tt(H[0]),he)).call(v.fill,Mt(H[0])).call(i.convertToTspans,N)}return _(yt)?te.transition().duration(yt.duration).ease(yt.easing).tween("text",function(){var oe=c.select(this),Te=Tt(H[0]),He=U._deltaLastValue,Ge=it(U.delta.valueformat,he,He,Te),cr=P(He,Te);return U._deltaLastValue=Te,function(ur){oe.text(Lt(cr(ur),Ge)),oe.call(v.fill,Mt({delta:cr(ur)}))}}).each("end",function(){ve(),pt&&pt()}).each("interrupt",function(){ve(),pt&&pt()}):ve(),dt=R(Lt(Tt(H[0]),he),U.delta.font,lt,N),te}var ut=U.mode+U.align,wt;if(U._hasDelta&&(wt=ft(),ut+=U.delta.position+U.delta.font.size+U.delta.font.family+U.delta.valueformat,ut+=U.delta.increasing.symbol+U.delta.decreasing.symbol,rt=dt),U._hasNumber&&(Y(),ut+=U.number.font.size+U.number.font.family+U.number.valueformat+U.number.suffix+U.number.prefix,rt=tt),U._hasDelta&&U._hasNumber){var zt=[(tt.left+tt.right)/2,(tt.top+tt.bottom)/2],Pt=[(dt.left+dt.right)/2,(dt.top+dt.bottom)/2],Wt,Ht,Jt=.75*U.delta.font.size;U.delta.position==="left"&&(Wt=O(U,"deltaPos",0,-1*(tt.width*u[U.align]+dt.width*(1-u[U.align])+Jt),ut,Math.min),Ht=zt[1]-Pt[1],rt={width:tt.width+dt.width+Jt,height:Math.max(tt.height,dt.height),left:dt.left+Wt,right:tt.right,top:Math.min(tt.top,dt.top+Ht),bottom:Math.max(tt.bottom,dt.bottom+Ht)}),U.delta.position==="right"&&(Wt=O(U,"deltaPos",0,tt.width*(1-u[U.align])+dt.width*u[U.align]+Jt,ut,Math.max),Ht=zt[1]-Pt[1],rt={width:tt.width+dt.width+Jt,height:Math.max(tt.height,dt.height),left:tt.left,right:dt.right+Wt,top:Math.min(tt.top,dt.top+Ht),bottom:Math.max(tt.bottom,dt.bottom+Ht)}),U.delta.position==="bottom"&&(Wt=null,Ht=dt.height,rt={width:Math.max(tt.width,dt.width),height:tt.height+dt.height,left:Math.min(tt.left,dt.left),right:Math.max(tt.right,dt.right),top:tt.bottom-tt.height,bottom:tt.bottom+dt.height}),U.delta.position==="top"&&(Wt=null,Ht=tt.top,rt={width:Math.max(tt.width,dt.width),height:tt.height+dt.height,left:Math.min(tt.left,dt.left),right:Math.max(tt.right,dt.right),top:tt.bottom-tt.height-dt.height,bottom:tt.bottom}),wt.attr({dx:Wt,dy:Ht})}(U._hasNumber||U._hasDelta)&&st.attr("transform",function(){var ge=F.numbersScaler(rt);ut+=ge[2];var he=O(U,"numbersScale",1,ge[0],ut,Math.min),de;U._scaleNumbers||(he=1),U._isAngular?de=q-he*rt.bottom:de=q-he*(rt.top+rt.bottom)/2,U._numbersTop=he*rt.top+de;var se=rt[X];X==="center"&&(se=(rt.left+rt.right)/2);var Tt=W-he*se;return Tt=O(U,"numbersTranslate",0,Tt,ut,Math.max),e(Tt,de)+t(he)})}function A(N){N.each(function(V){v.stroke(c.select(this),V.line.color)}).each(function(V){v.fill(c.select(this),V.color)}).style("stroke-width",function(V){return V.line.width})}function h(N,V,H){return function(){var F=g(V,H);return function(U){return N.endAngle(F(U))()}}}function p(N,V,H){var F=N._fullLayout,U=S.extendFlat({type:"linear",ticks:"outside",range:H,showline:!0},V),W={type:"linear",_id:"x"+V._id},q={letter:"x",font:F.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function X(lt,yt){return S.coerce(U,W,y,lt,yt)}return f(U,W,X,q,F),x(U,W,X,q),W}function k(N,V,H){var F=Math.min(V/N.width,H/N.height);return[F,N,V+"x"+H]}function w(N,V){var H=Math.sqrt(N.width/2*(N.width/2)+N.height*N.height),F=V/H;return[F,N,V]}function R(N,V,H,F){var U=document.createElementNS("http://www.w3.org/2000/svg","text"),W=c.select(U);return W.text(N).attr("x",0).attr("y",0).attr("text-anchor",H).attr("data-unformatted",N).call(i.convertToTspans,F).call(n.font,V),n.bBox(W.node())}function O(N,V,H,F,U,W){var q="_cache"+V;N[q]&&N[q].key===U||(N[q]={key:U,value:H});var X=S.aggNums(W,null,[N[q].value,F],2);return N[q].value=X,X}}),hq=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"indicator",basePlotModule:sq(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:ME(),supplyDefaults:lq().supplyDefaults,calc:uq().calc,plot:cq(),meta:{}}}),fq=Ft((Q,$)=>{$.exports=hq()}),EE=Ft((Q,$)=>{var c=gm(),g=Ta().extendFlat,P=Yc().overrideAll,S=Ea(),t=Nh().attributes,e=fh().descriptionOnlyNumbers;$.exports=P({domain:t({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:g({},c.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:g({},S({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:g({},c.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:g({},S({arrayOk:!0}))}},"calc","from-root")}),dq=Ft((Q,$)=>{var c=bn(),g=EE(),P=Nh().defaults;function S(t,e){for(var r=t.columnorder||[],a=t.header.values.length,n=r.slice(0,a),o=n.slice().sort(function(f,x){return f-x}),i=n.map(function(f){return o.indexOf(f)}),s=i.length;s{var c=Lg().wrap;$.exports=function(){return c({})}}),CE=Ft((Q,$)=>{$.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"
",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}}),mq=Ft((Q,$)=>{var c=CE(),g=Ta().extendFlat,P=ra(),S=Va().isTypedArray,t=Va().isArrayOrTypedArray;$.exports=function(x,y){var v=a(y.cells.values),T=function(X){return X.slice(y.header.values.length,X.length)},u=a(y.header.values);u.length&&!u[0].length&&(u[0]=[""],u=a(u));var b=u.concat(T(v).map(function(){return n((u[0]||[""]).length)})),_=y.domain,C=Math.floor(x._fullLayout._size.w*(_.x[1]-_.x[0])),M=Math.floor(x._fullLayout._size.h*(_.y[1]-_.y[0])),E=y.header.values.length?b[0].map(function(){return y.header.height}):[c.emptyHeaderHeight],A=v.length?v[0].map(function(){return y.cells.height}):[],h=E.reduce(r,0),p=M-h,k=p+c.uplift,w=s(A,k),R=s(E,h),O=i(R,[]),N=i(w,O),V={},H=y._fullInput.columnorder;t(H)&&(H=Array.from(H)),H=H.concat(T(v.map(function(X,lt){return lt})));var F=b.map(function(X,lt){var yt=t(y.columnwidth)?y.columnwidth[Math.min(lt,y.columnwidth.length-1)]:y.columnwidth;return P(yt)?Number(yt):1}),U=F.reduce(r,0);F=F.map(function(X){return X/U*C});var W=Math.max(e(y.header.line.width),e(y.cells.line.width)),q={key:y.uid+x._context.staticPlot,translateX:_.x[0]*x._fullLayout._size.w,translateY:x._fullLayout._size.h*(1-_.y[1]),size:x._fullLayout._size,width:C,maxLineWidth:W,height:M,columnOrder:H,groupHeight:M,rowBlocks:N,headerRowBlocks:O,scrollY:0,cells:g({},y.cells,{values:v}),headerCells:g({},y.header,{values:b}),gdColumns:b.map(function(X){return X[0]}),gdColumnsOriginalOrder:b.map(function(X){return X[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:b.map(function(X,lt){var yt=V[X];V[X]=(yt||0)+1;var pt=X+"__"+V[X];return{key:pt,label:X,specIndex:lt,xIndex:H[lt],xScale:o,x:void 0,calcdata:void 0,columnWidth:F[lt]}})};return q.columns.forEach(function(X){X.calcdata=q,X.x=o(X)}),q};function e(x){if(t(x)){for(var y=0,v=0;v=y||E===x.length-1)&&(v[u]=_,_.key=M++,_.firstRowIndex=C,_.lastRowIndex=E,_=f(),u+=b,C=E+1,b=0);return v}function f(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}),gq=Ft(Q=>{var $=Ta().extendFlat;Q.splitToPanels=function(g){var P=[0,0],S=$({},g,{key:"header",type:"header",page:0,prevPages:P,currentRepaint:[null,null],dragHandle:!0,values:g.calcdata.headerCells.values[g.specIndex],rowBlocks:g.calcdata.headerRowBlocks,calcdata:$({},g.calcdata,{cells:g.calcdata.headerCells})}),t=$({},g,{key:"cells1",type:"cells",page:0,prevPages:P,currentRepaint:[null,null],dragHandle:!1,values:g.calcdata.cells.values[g.specIndex],rowBlocks:g.calcdata.rowBlocks}),e=$({},g,{key:"cells2",type:"cells",page:1,prevPages:P,currentRepaint:[null,null],dragHandle:!1,values:g.calcdata.cells.values[g.specIndex],rowBlocks:g.calcdata.rowBlocks});return[t,e,S]},Q.splitToCells=function(g){var P=c(g);return(g.values||[]).slice(P[0],P[1]).map(function(S,t){var e=typeof S=="string"&&S.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:t+e,key:P[0]+t,column:g,calcdata:g.calcdata,page:g.page,rowBlocks:g.rowBlocks,value:S}})};function c(g){var P=g.rowBlocks[g.page],S=P?P.rows[0].rowIndex:0,t=P?S+P.rows.length:0;return[S,t]}}),LE=Ft((Q,$)=>{var c=CE(),g=un(),P=bn(),S=P.numberFormat,t=Lg(),e=js(),r=tc(),a=bn().raiseToTop,n=bn().strTranslate,o=bn().cancelTransition,i=mq(),s=gq(),f=li();$.exports=function(ft,ut){var wt=!ft._context.staticPlot,zt=ft._fullLayout._paper.selectAll("."+c.cn.table).data(ut.map(function(oe){var Te=t.unwrap(oe),He=Te.trace;return i(ft,He)}),t.keyFun);zt.exit().remove(),zt.enter().append("g").classed(c.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),zt.attr("width",function(oe){return oe.width+oe.size.l+oe.size.r}).attr("height",function(oe){return oe.height+oe.size.t+oe.size.b}).attr("transform",function(oe){return n(oe.translateX,oe.translateY)});var Pt=zt.selectAll("."+c.cn.tableControlView).data(t.repeat,t.keyFun),Wt=Pt.enter().append("g").classed(c.cn.tableControlView,!0).style("box-sizing","content-box");if(wt){var Ht="onwheel"in document?"wheel":"mousewheel";Wt.on("mousemove",function(oe){Pt.filter(function(Te){return oe===Te}).call(u,ft)}).on(Ht,function(oe){if(!oe.scrollbarState.wheeling){oe.scrollbarState.wheeling=!0;var Te=oe.scrollY+g.event.deltaY,He=lt(ft,Pt,null,Te)(oe);He||(g.event.stopPropagation(),g.event.preventDefault()),oe.scrollbarState.wheeling=!1}}).call(u,ft,!0)}Pt.attr("transform",function(oe){return n(oe.size.l,oe.size.t)});var Jt=Pt.selectAll("."+c.cn.scrollBackground).data(t.repeat,t.keyFun);Jt.enter().append("rect").classed(c.cn.scrollBackground,!0).attr("fill","none"),Jt.attr("width",function(oe){return oe.width}).attr("height",function(oe){return oe.height}),Pt.each(function(oe){e.setClipUrl(g.select(this),y(ft,oe),ft)});var ge=Pt.selectAll("."+c.cn.yColumn).data(function(oe){return oe.columns},t.keyFun);ge.enter().append("g").classed(c.cn.yColumn,!0),ge.exit().remove(),ge.attr("transform",function(oe){return n(oe.x,0)}),wt&&ge.call(g.behavior.drag().origin(function(oe){var Te=g.select(this);return H(Te,oe,-c.uplift),a(this),oe.calcdata.columnDragInProgress=!0,u(Pt.filter(function(He){return oe.calcdata.key===He.key}),ft),oe}).on("drag",function(oe){var Te=g.select(this),He=function(ur){return(oe===ur?g.event.x:ur.x)+ur.columnWidth/2};oe.x=Math.max(-c.overdrag,Math.min(oe.calcdata.width+c.overdrag-oe.columnWidth,g.event.x));var Ge=T(ge).filter(function(ur){return ur.calcdata.key===oe.calcdata.key}),cr=Ge.sort(function(ur,jr){return He(ur)-He(jr)});cr.forEach(function(ur,jr){ur.xIndex=jr,ur.x=oe===ur?ur.x:ur.xScale(ur)}),ge.filter(function(ur){return oe!==ur}).transition().ease(c.transitionEase).duration(c.transitionDuration).attr("transform",function(ur){return n(ur.x,0)}),Te.call(o).attr("transform",n(oe.x,-c.uplift))}).on("dragend",function(oe){var Te=g.select(this),He=oe.calcdata;oe.x=oe.xScale(oe),oe.calcdata.columnDragInProgress=!1,H(Te,oe,0),N(ft,He,He.columns.map(function(Ge){return Ge.xIndex}))})),ge.each(function(oe){e.setClipUrl(g.select(this),v(ft,oe),ft)});var he=ge.selectAll("."+c.cn.columnBlock).data(s.splitToPanels,t.keyFun);he.enter().append("g").classed(c.cn.columnBlock,!0).attr("id",function(oe){return oe.key}),he.style("cursor",function(oe){return oe.dragHandle?"ew-resize":oe.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var de=he.filter(U),se=he.filter(F);wt&&se.call(g.behavior.drag().origin(function(oe){return g.event.stopPropagation(),oe}).on("drag",lt(ft,Pt,-1)).on("dragend",function(){})),b(ft,Pt,de,he),b(ft,Pt,se,he);var Tt=Pt.selectAll("."+c.cn.scrollAreaClip).data(t.repeat,t.keyFun);Tt.enter().append("clipPath").classed(c.cn.scrollAreaClip,!0).attr("id",function(oe){return y(ft,oe)});var Lt=Tt.selectAll("."+c.cn.scrollAreaClipRect).data(t.repeat,t.keyFun);Lt.enter().append("rect").classed(c.cn.scrollAreaClipRect,!0).attr("x",-c.overdrag).attr("y",-c.uplift).attr("fill","none"),Lt.attr("width",function(oe){return oe.width+2*c.overdrag}).attr("height",function(oe){return oe.height+c.uplift});var Mt=ge.selectAll("."+c.cn.columnBoundary).data(t.repeat,t.keyFun);Mt.enter().append("g").classed(c.cn.columnBoundary,!0);var te=ge.selectAll("."+c.cn.columnBoundaryClippath).data(t.repeat,t.keyFun);te.enter().append("clipPath").classed(c.cn.columnBoundaryClippath,!0),te.attr("id",function(oe){return v(ft,oe)});var ve=te.selectAll("."+c.cn.columnBoundaryRect).data(t.repeat,t.keyFun);ve.enter().append("rect").classed(c.cn.columnBoundaryRect,!0).attr("fill","none"),ve.attr("width",function(oe){return oe.columnWidth+2*x(oe)}).attr("height",function(oe){return oe.calcdata.height+2*x(oe)+c.uplift}).attr("x",function(oe){return-x(oe)}).attr("y",function(oe){return-x(oe)}),X(null,se,Pt)};function x(ft){return Math.ceil(ft.calcdata.maxLineWidth/2)}function y(ft,ut){return"clip"+ft._fullLayout._uid+"_scrollAreaBottomClip_"+ut.key}function v(ft,ut){return"clip"+ft._fullLayout._uid+"_columnBoundaryClippath_"+ut.calcdata.key+"_"+ut.specIndex}function T(ft){return[].concat.apply([],ft.map(function(ut){return ut})).map(function(ut){return ut.__data__})}function u(ft,ut,wt){function zt(he){var de=he.rowBlocks;return rt(de,de.length-1)+(de.length?at(de[de.length-1],1/0):1)}var Pt=ft.selectAll("."+c.cn.scrollbarKit).data(t.repeat,t.keyFun);Pt.enter().append("g").classed(c.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),Pt.each(function(he){var de=he.scrollbarState;de.totalHeight=zt(he),de.scrollableAreaHeight=he.groupHeight-W(he),de.currentlyVisibleHeight=Math.min(de.totalHeight,de.scrollableAreaHeight),de.ratio=de.currentlyVisibleHeight/de.totalHeight,de.barLength=Math.max(de.ratio*de.currentlyVisibleHeight,c.goldenRatio*c.scrollbarWidth),de.barWiggleRoom=de.currentlyVisibleHeight-de.barLength,de.wiggleRoom=Math.max(0,de.totalHeight-de.scrollableAreaHeight),de.topY=de.barWiggleRoom===0?0:he.scrollY/de.wiggleRoom*de.barWiggleRoom,de.bottomY=de.topY+de.barLength,de.dragMultiplier=de.wiggleRoom/de.barWiggleRoom}).attr("transform",function(he){var de=he.width+c.scrollbarWidth/2+c.scrollbarOffset;return n(de,W(he))});var Wt=Pt.selectAll("."+c.cn.scrollbar).data(t.repeat,t.keyFun);Wt.enter().append("g").classed(c.cn.scrollbar,!0);var Ht=Wt.selectAll("."+c.cn.scrollbarSlider).data(t.repeat,t.keyFun);Ht.enter().append("g").classed(c.cn.scrollbarSlider,!0),Ht.attr("transform",function(he){return n(0,he.scrollbarState.topY||0)});var Jt=Ht.selectAll("."+c.cn.scrollbarGlyph).data(t.repeat,t.keyFun);Jt.enter().append("line").classed(c.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",c.scrollbarWidth).attr("stroke-linecap","round").attr("y1",c.scrollbarWidth/2),Jt.attr("y2",function(he){return he.scrollbarState.barLength-c.scrollbarWidth/2}).attr("stroke-opacity",function(he){return he.columnDragInProgress||!he.scrollbarState.barWiggleRoom||wt?0:.4}),Jt.transition().delay(0).duration(0),Jt.transition().delay(c.scrollbarHideDelay).duration(c.scrollbarHideDuration).attr("stroke-opacity",0);var ge=Wt.selectAll("."+c.cn.scrollbarCaptureZone).data(t.repeat,t.keyFun);ge.enter().append("line").classed(c.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",c.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(he){var de=g.event.y,se=this.getBoundingClientRect(),Tt=he.scrollbarState,Lt=de-se.top,Mt=g.scale.linear().domain([0,Tt.scrollableAreaHeight]).range([0,Tt.totalHeight]).clamp(!0);Tt.topY<=Lt&&Lt<=Tt.bottomY||lt(ut,ft,null,Mt(Lt-Tt.barLength/2))(he)}).call(g.behavior.drag().origin(function(he){return g.event.stopPropagation(),he.scrollbarState.scrollbarScrollInProgress=!0,he}).on("drag",lt(ut,ft)).on("dragend",function(){})),ge.attr("y2",function(he){return he.scrollbarState.scrollableAreaHeight}),ut._context.staticPlot&&(Jt.remove(),ge.remove())}function b(ft,ut,wt,zt){var Pt=_(wt),Wt=C(Pt);h(Wt);var Ht=M(Wt);k(Ht);var Jt=A(Wt),ge=E(Jt);p(ge),w(ge,ut,zt,ft),dt(Wt)}function _(ft){var ut=ft.selectAll("."+c.cn.columnCells).data(t.repeat,t.keyFun);return ut.enter().append("g").classed(c.cn.columnCells,!0),ut.exit().remove(),ut}function C(ft){var ut=ft.selectAll("."+c.cn.columnCell).data(s.splitToCells,function(wt){return wt.keyWithinBlock});return ut.enter().append("g").classed(c.cn.columnCell,!0),ut.exit().remove(),ut}function M(ft){var ut=ft.selectAll("."+c.cn.cellRect).data(t.repeat,function(wt){return wt.keyWithinBlock});return ut.enter().append("rect").classed(c.cn.cellRect,!0),ut}function E(ft){var ut=ft.selectAll("."+c.cn.cellText).data(t.repeat,function(wt){return wt.keyWithinBlock});return ut.enter().append("text").classed(c.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){g.event.stopPropagation()}),ut}function A(ft){var ut=ft.selectAll("."+c.cn.cellTextHolder).data(t.repeat,function(wt){return wt.keyWithinBlock});return ut.enter().append("g").classed(c.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ut}function h(ft){ft.each(function(ut,wt){var zt=ut.calcdata.cells.font,Pt=ut.column.specIndex,Wt={size:V(zt.size,Pt,wt),color:V(zt.color,Pt,wt),family:V(zt.family,Pt,wt),weight:V(zt.weight,Pt,wt),style:V(zt.style,Pt,wt),variant:V(zt.variant,Pt,wt),textcase:V(zt.textcase,Pt,wt),lineposition:V(zt.lineposition,Pt,wt),shadow:V(zt.shadow,Pt,wt)};ut.rowNumber=ut.key,ut.align=V(ut.calcdata.cells.align,Pt,wt),ut.cellBorderWidth=V(ut.calcdata.cells.line.width,Pt,wt),ut.font=Wt})}function p(ft){ft.each(function(ut){e.font(g.select(this),ut.font)})}function k(ft){ft.attr("width",function(ut){return ut.column.columnWidth}).attr("stroke-width",function(ut){return ut.cellBorderWidth}).each(function(ut){var wt=g.select(this);f.stroke(wt,V(ut.calcdata.cells.line.color,ut.column.specIndex,ut.rowNumber)),f.fill(wt,V(ut.calcdata.cells.fill.color,ut.column.specIndex,ut.rowNumber))})}function w(ft,ut,wt,zt){ft.text(function(Pt){var Wt=Pt.column.specIndex,Ht=Pt.rowNumber,Jt=Pt.value,ge=typeof Jt=="string",he=ge&&Jt.match(/
/i),de=!ge||he;Pt.mayHaveMarkup=ge&&Jt.match(/[<&>]/);var se=R(Jt);Pt.latex=se;var Tt=se?"":V(Pt.calcdata.cells.prefix,Wt,Ht)||"",Lt=se?"":V(Pt.calcdata.cells.suffix,Wt,Ht)||"",Mt=se?null:V(Pt.calcdata.cells.format,Wt,Ht)||null,te=Tt+(Mt?S(Mt)(Pt.value):Pt.value)+Lt,ve;Pt.wrappingNeeded=!Pt.wrapped&&!de&&!se&&(ve=O(te)),Pt.cellHeightMayIncrease=he||se||Pt.mayHaveMarkup||(ve===void 0?O(te):ve),Pt.needsConvertToTspans=Pt.mayHaveMarkup||Pt.wrappingNeeded||Pt.latex;var oe;if(Pt.wrappingNeeded){var Te=c.wrapSplitCharacter===" "?te.replace(/Pt&&zt.push(Wt),Pt+=ge}return zt}function X(ft,ut,wt){var zt=T(ut)[0];if(zt!==void 0){var Pt=zt.rowBlocks,Wt=zt.calcdata,Ht=rt(Pt,Pt.length),Jt=zt.calcdata.groupHeight-W(zt),ge=Wt.scrollY=Math.max(0,Math.min(Ht-Jt,Wt.scrollY)),he=q(Pt,ge,Jt);he.length===1&&(he[0]===Pt.length-1?he.unshift(he[0]-1):he.push(he[0]+1)),he[0]%2&&he.reverse(),ut.each(function(de,se){de.page=he[se],de.scrollY=ge}),ut.attr("transform",function(de){var se=rt(de.rowBlocks,de.page)-de.scrollY;return n(0,se)}),ft&&(yt(ft,wt,ut,he,zt.prevPages,zt,0),yt(ft,wt,ut,he,zt.prevPages,zt,1),u(wt,ft))}}function lt(ft,ut,wt,zt){return function(Pt){var Wt=Pt.calcdata?Pt.calcdata:Pt,Ht=ut.filter(function(de){return Wt.key===de.key}),Jt=wt||Wt.scrollbarState.dragMultiplier,ge=Wt.scrollY;Wt.scrollY=zt===void 0?Wt.scrollY+Jt*g.event.dy:zt;var he=Ht.selectAll("."+c.cn.yColumn).selectAll("."+c.cn.columnBlock).filter(F);return X(ft,he,Ht),Wt.scrollY===ge}}function yt(ft,ut,wt,zt,Pt,Wt,Ht){var Jt=zt[Ht]!==Pt[Ht];Jt&&(clearTimeout(Wt.currentRepaint[Ht]),Wt.currentRepaint[Ht]=setTimeout(function(){var ge=wt.filter(function(he,de){return de===Ht&&zt[de]!==Pt[de]});b(ft,ut,ge,wt),Pt[Ht]=zt[Ht]}))}function pt(ft,ut,wt,zt){return function(){var Pt=g.select(ut.parentNode);Pt.each(function(Wt){var Ht=Wt.fragments;Pt.selectAll("tspan.line").each(function(Mt,te){Ht[te].width=this.getComputedTextLength()});var Jt=Ht[Ht.length-1].width,ge=Ht.slice(0,-1),he=[],de,se,Tt=0,Lt=Wt.column.columnWidth-2*c.cellPad;for(Wt.value="";ge.length;)de=ge.shift(),se=de.width+Jt,Tt+se>Lt&&(Wt.value+=he.join(c.wrapSpacer)+c.lineBreaker,he=[],Tt=0),he.push(de.text),Tt+=se;Tt&&(Wt.value+=he.join(c.wrapSpacer)),Wt.wrapped=!0}),Pt.selectAll("tspan.line").remove(),w(Pt.select("."+c.cn.cellText),wt,ft,zt),g.select(ut.parentNode.parentNode).call(dt)}}function st(ft,ut,wt,zt,Pt){return function(){if(!Pt.settledY){var Wt=g.select(ut.parentNode),Ht=it(Pt),Jt=Pt.key-Ht.firstRowIndex,ge=Ht.rows[Jt].rowHeight,he=Pt.cellHeightMayIncrease?ut.parentNode.getBoundingClientRect().height+2*c.cellPad:ge,de=Math.max(he,ge),se=de-Ht.rows[Jt].rowHeight;se&&(Ht.rows[Jt].rowHeight=de,ft.selectAll("."+c.cn.columnCell).call(dt),X(null,ft.filter(F),0),u(wt,zt,!0)),Wt.attr("transform",function(){var Tt=this,Lt=Tt.parentNode,Mt=Lt.getBoundingClientRect(),te=g.select(Tt.parentNode).select("."+c.cn.cellRect).node().getBoundingClientRect(),ve=Tt.transform.baseVal.consolidate(),oe=te.top-Mt.top+(ve?ve.matrix.f:c.cellPad);return n(tt(Pt,g.select(Tt.parentNode).select("."+c.cn.cellTextHolder).node().getBoundingClientRect().width),oe)}),Pt.settledY=!0}}}function tt(ft,ut){switch(ft.align){case"left":return c.cellPad;case"right":return ft.column.columnWidth-(ut||0)-c.cellPad;case"center":return(ft.column.columnWidth-(ut||0))/2;default:return c.cellPad}}function dt(ft){ft.attr("transform",function(ut){var wt=ut.rowBlocks[0].auxiliaryBlocks.reduce(function(Ht,Jt){return Ht+at(Jt,1/0)},0),zt=it(ut),Pt=at(zt,ut.key),Wt=Pt+wt;return n(0,Wt)}).selectAll("."+c.cn.cellRect).attr("height",function(ut){return Y(it(ut),ut.key).rowHeight})}function rt(ft,ut){for(var wt=0,zt=ut-1;zt>=0;zt--)wt+=vt(ft[zt]);return wt}function at(ft,ut){for(var wt=0,zt=0;zt{var $=ud().getModuleCalcData,c=LE(),g="table";Q.name=g,Q.plot=function(P){var S=$(P.calcdata,g)[0];S.length&&c(P,S)},Q.clean=function(P,S,t,e){var r=e._has&&e._has(g),a=S._has&&S._has(g);r&&!a&&e._paperdiv.selectAll(".table").remove()}}),yq=Ft((Q,$)=>{$.exports={attributes:EE(),supplyDefaults:dq(),calc:pq(),plot:LE(),moduleType:"trace",name:"table",basePlotModule:vq(),categories:["noOpacity"],meta:{}}}),xq=Ft((Q,$)=>{$.exports=yq()}),_q=Ft((Q,$)=>{var c=Ea(),g=bi(),P=Ad(),S=fh().descriptionWithDates,t=Yc().overrideAll,e=Td().dash,r=Ta().extendFlat;$.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:c({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:P.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:r({},P.labelalias,{editType:"calc"}),tickfont:c({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:S("tick label")},tickformatstops:t(P.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:g.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:r({},e,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:r({},e,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:g.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}}),_T=Ft((Q,$)=>{var c=Ea(),g=_q(),P=bi(),S=c({editType:"calc"}),t=tf().zorder;S.family.dflt='"Open Sans", verdana, arial, sans-serif',S.size.dflt=12,S.color.dflt=P.defaultLine,$.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:g,baxis:g,font:S,color:{valType:"color",dflt:P.defaultLine,editType:"plot"},zorder:t}}),bq=Ft((Q,$)=>{var c=bn().isArray1D;$.exports=function(g,P,S){var t=S("x"),e=t&&t.length,r=S("y"),a=r&&r.length;if(!e&&!a)return!1;if(P._cheater=!t,(!e||c(t))&&(!a||c(r))){var n=e?t.length:1/0;a&&(n=Math.min(n,r.length)),P.a&&P.a.length&&(n=Math.min(n,P.a.length)),P.b&&P.b.length&&(n=Math.min(n,P.b.length)),P._length=n}else P._length=null;return!0}}),wq=Ft((Q,$)=>{var c=_T(),g=li().addOpacity,P=Xo(),S=bn(),t=mg(),e=n0(),r=dm(),a=jm(),n=i0(),o=dv();$.exports=function(s,f,x){var y=x.letter,v=x.font||{},T=c[y+"axis"];function u(W,q){return S.coerce(s,f,T,W,q)}function b(W,q){return S.coerce2(s,f,T,W,q)}x.name&&(f._name=x.name,f._id=x.name),u("autotypenumbers",x.autotypenumbersDflt);var _=u("type");if(_==="-"&&(x.data&&i(f,x.data),f.type==="-"?f.type="linear":_=s.type=f.type),u("smoothing"),u("cheatertype"),u("showticklabels"),u("labelprefix",y+" = "),u("labelsuffix"),u("showtickprefix"),u("showticksuffix"),u("separatethousands"),u("tickformat"),u("exponentformat"),u("minexponent"),u("showexponent"),u("categoryorder"),u("tickmode"),u("tickvals"),u("ticktext"),u("tick0"),u("dtick"),f.tickmode==="array"&&(u("arraytick0"),u("arraydtick")),u("labelpadding"),f._hovertitle=y,_==="date"){var C=P.getComponentMethod("calendars","handleDefaults");C(s,f,"calendar",x.calendar)}n(f,x.fullLayout),f.c2p=S.identity;var M=u("color",x.dfltColor),E=M===s.color?M:v.color,A=u("title.text");A&&(S.coerceFont(u,"title.font",v,{overrideDflt:{size:S.bigFont(v.size),color:E}}),u("title.offset")),u("tickangle");var h=u("autorange",!f.isValidRange(s.range));h&&u("rangemode"),u("range"),f.cleanRange(),u("fixedrange"),t(s,f,u,_),r(s,f,u,_,x),e(s,f,u,_,x),a(s,f,u,{data:x.data,dataAttr:y});var p=b("gridcolor",g(M,.3)),k=b("gridwidth"),w=b("griddash"),R=u("showgrid");R||(delete f.gridcolor,delete f.gridwidth,delete f.griddash);var O=b("startlinecolor",M),N=b("startlinewidth",k),V=u("startline",f.showgrid||!!O||!!N);V||(delete f.startlinecolor,delete f.startlinewidth);var H=b("endlinecolor",M),F=b("endlinewidth",k),U=u("endline",f.showgrid||!!H||!!F);return U||(delete f.endlinecolor,delete f.endlinewidth),R?(u("minorgridcount"),u("minorgridwidth",k),u("minorgriddash",w),u("minorgridcolor",g(p,.06)),f.minorgridcount||(delete f.minorgridwidth,delete f.minorgriddash,delete f.minorgridcolor)):(delete f.gridcolor,delete f.gridwidth,delete f.griddash),f.showticklabels==="none"&&(delete f.tickfont,delete f.tickangle,delete f.showexponent,delete f.exponentformat,delete f.minexponent,delete f.tickformat,delete f.showticksuffix,delete f.showtickprefix),f.showticksuffix||delete f.ticksuffix,f.showtickprefix||delete f.tickprefix,u("tickmode"),f};function i(s,f){if(s.type==="-"){var x=s._id,y=x.charAt(0),v=y+"calendar",T=s[v];s.type=o(f,T,{autotypenumbers:s.autotypenumbers})}}}),kq=Ft((Q,$)=>{var c=wq(),g=pu();$.exports=function(S,t,e,r,a){var n=r("a");n||(r("da"),r("a0"));var o=r("b");o||(r("db"),r("b0")),P(S,t,e,a)};function P(S,t,e,r){var a=["aaxis","baxis"];a.forEach(function(n){var o=n.charAt(0),i=S[n]||{},s=g.newContainer(t,n),f={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:o+"axis",letter:o,font:t.font,name:n,data:S[o],calendar:t.calendar,dfltColor:r,bgColor:e.paper_bgcolor,autotypenumbersDflt:e.autotypenumbers,fullLayout:e};c(i,s,f),s._categories=s._categories||[],!S[n]&&i.type!=="-"&&(S[n]={type:i.type})})}}),Tq=Ft((Q,$)=>{var c=bn(),g=bq(),P=kq(),S=_T(),t=bi();$.exports=function(e,r,a,n){function o(f,x){return c.coerce(e,r,S,f,x)}r._clipPathId="clip"+r.uid+"carpet";var i=o("color",t.defaultLine);if(c.coerceFont(o,"font",n.font),o("carpet"),P(e,r,n,o,i),!r.a||!r.b){r.visible=!1;return}r.a.length<3&&(r.aaxis.smoothing=0),r.b.length<3&&(r.baxis.smoothing=0);var s=g(e,r,o);s||(r.visible=!1),r._cheater&&o("cheaterslope"),o("zorder")}}),PE=Ft((Q,$)=>{var c=bn().isArrayOrTypedArray;$.exports=function(g,P,S){var t;for(c(g)?g.length>P.length&&(g=g.slice(0,P.length)):g=[],t=0;t{$.exports=function(c,g,P){if(c.length===0)return"";var S,t=[],e=P?3:1;for(S=0;S{$.exports=function(c,g,P,S,t,e){var r=t[0]*c.dpdx(g),a=t[1]*c.dpdy(P),n=1,o=1;if(e){var i=Math.sqrt(t[0]*t[0]+t[1]*t[1]),s=Math.sqrt(e[0]*e[0]+e[1]*e[1]),f=(t[0]*e[0]+t[1]*e[1])/i/s;o=Math.max(0,f)}var x=Math.atan2(a,r)*180/Math.PI;return x<-90?(x+=180,n=-n):x>90&&(x-=180,n=-n),{angle:x,flip:n,p:c.c2p(S,g,P),offsetMultplier:o}}}),Mq=Ft((Q,$)=>{var c=un(),g=js(),P=PE(),S=zE(),t=Aq(),e=tc(),r=bn(),a=r.strRotate,n=r.strTranslate,o=Af();$.exports=function(u,b,_,C){var M=u._context.staticPlot,E=b.xaxis,A=b.yaxis,h=u._fullLayout,p=h._clips;r.makeTraceGroups(C,_,"trace").each(function(k){var w=c.select(this),R=k[0],O=R.trace,N=O.aaxis,V=O.baxis,H=r.ensureSingle(w,"g","minorlayer"),F=r.ensureSingle(w,"g","majorlayer"),U=r.ensureSingle(w,"g","boundarylayer"),W=r.ensureSingle(w,"g","labellayer");w.style("opacity",O.opacity),s(E,A,F,N,"a",N._gridlines,!0),s(E,A,F,V,"b",V._gridlines,!0),s(E,A,H,N,"a",N._minorgridlines,!0),s(E,A,H,V,"b",V._minorgridlines,!0),s(E,A,U,N,"a-boundary",N._boundarylines,M),s(E,A,U,V,"b-boundary",V._boundarylines,M);var q=f(u,E,A,O,R,W,N._labels,"a-label"),X=f(u,E,A,O,R,W,V._labels,"b-label");x(u,W,O,R,E,A,q,X),i(O,R,p,E,A)})};function i(u,b,_,C,M){var E,A,h,p,k=_.select("#"+u._clipPathId);k.size()||(k=_.append("clipPath").classed("carpetclip",!0));var w=r.ensureSingle(k,"path","carpetboundary"),R=b.clipsegments,O=[];for(p=0;p0?"start":"end","data-notex":1}).call(g.font,R.font).text(R.text).call(e.convertToTspans,u),U=g.bBox(this);F.attr("transform",n(N.p[0],N.p[1])+a(N.angle)+n(R.axis.labelpadding*H,U.height*.3)),k=Math.max(k,U.width+R.axis.labelpadding)}),p.exit().remove(),w.maxExtent=k,w}function x(u,b,_,C,M,E,A,h){var p,k,w,R,O=r.aggNums(Math.min,null,_.a),N=r.aggNums(Math.max,null,_.a),V=r.aggNums(Math.min,null,_.b),H=r.aggNums(Math.max,null,_.b);p=.5*(O+N),k=V,w=_.ab2xy(p,k,!0),R=_.dxyda_rough(p,k),A.angle===void 0&&r.extendFlat(A,t(_,M,E,w,_.dxydb_rough(p,k))),T(u,b,_,C,w,R,_.aaxis,M,E,A,"a-title"),p=O,k=.5*(V+H),w=_.ab2xy(p,k,!0),R=_.dxydb_rough(p,k),h.angle===void 0&&r.extendFlat(h,t(_,M,E,w,_.dxyda_rough(p,k))),T(u,b,_,C,w,R,_.baxis,M,E,h,"b-title")}var y=o.LINE_SPACING,v=(1-o.MID_SHIFT)/y+1;function T(u,b,_,C,M,E,A,h,p,k,w){var R=[];A.title.text&&R.push(A.title.text);var O=b.selectAll("text."+w).data(R),N=k.maxExtent;O.enter().append("text").classed(w,!0),O.each(function(){var V=t(_,h,p,M,E);["start","both"].indexOf(A.showticklabels)===-1&&(N=0);var H=A.title.font.size;N+=H+A.title.offset;var F=k.angle+(k.flip<0?180:0),U=(F-V.angle+450)%360,W=U>90&&U<270,q=c.select(this);q.text(A.title.text).call(e.convertToTspans,u),W&&(N=(-e.lineCount(q)+v)*y*H-N),q.attr("transform",n(V.p[0],V.p[1])+a(V.angle)+n(0,N)).attr("text-anchor","middle").call(g.font,A.title.font)}),O.exit().remove()}}),Sq=Ft((Q,$)=>{var c=bn().isArrayOrTypedArray;$.exports=function(g,P,S){var t,e,r,a,n,o,i=[],s=c(g)?g.length:g,f=c(P)?P.length:P,x=c(g)?g:null,y=c(P)?P:null;x&&(r=(x.length-1)/(x[x.length-1]-x[0])/(s-1)),y&&(a=(y.length-1)/(y[y.length-1]-y[0])/(f-1));var v,T=1/0,u=-1/0;for(e=0;e{var c=bn().isArrayOrTypedArray;$.exports=function(P){return g(P,0)};function g(P,S){if(!c(P)||S>=10)return null;for(var t=1/0,e=-1/0,r=P.length,a=0;a{var c=Es(),g=Ta().extendFlat;$.exports=function(P,S,t){var e,r,a,n,o,i,s,f,x,y,v,T,u,b,_=P["_"+S],C=P[S+"axis"],M=C._gridlines=[],E=C._minorgridlines=[],A=C._boundarylines=[],h=P["_"+t],p=P[t+"axis"];C.tickmode==="array"&&(C.tickvals=_.slice());var k=P._xctrl,w=P._yctrl,R=k[0].length,O=k.length,N=P._a.length,V=P._b.length;c.prepTicks(C),C.tickmode==="array"&&delete C.tickvals;var H=C.smoothing?3:1;function F(W){var q,X,lt,yt,pt,st,tt,dt,rt,at,vt,it,Y=[],ft=[],ut={};if(S==="b")for(X=P.b2j(W),lt=Math.floor(Math.max(0,Math.min(V-2,X))),yt=X-lt,ut.length=V,ut.crossLength=N,ut.xy=function(wt){return P.evalxy([],wt,X)},ut.dxy=function(wt,zt){return P.dxydi([],wt,lt,zt,yt)},q=0;q0&&(rt=P.dxydi([],q-1,lt,0,yt),Y.push(pt[0]+rt[0]/3),ft.push(pt[1]+rt[1]/3),at=P.dxydi([],q-1,lt,1,yt),Y.push(dt[0]-at[0]/3),ft.push(dt[1]-at[1]/3)),Y.push(dt[0]),ft.push(dt[1]),pt=dt;else for(q=P.a2i(W),st=Math.floor(Math.max(0,Math.min(N-2,q))),tt=q-st,ut.length=N,ut.crossLength=V,ut.xy=function(wt){return P.evalxy([],q,wt)},ut.dxy=function(wt,zt){return P.dxydj([],st,wt,tt,zt)},X=0;X0&&(vt=P.dxydj([],st,X-1,tt,0),Y.push(pt[0]+vt[0]/3),ft.push(pt[1]+vt[1]/3),it=P.dxydj([],st,X-1,tt,1),Y.push(dt[0]-it[0]/3),ft.push(dt[1]-it[1]/3)),Y.push(dt[0]),ft.push(dt[1]),pt=dt;return ut.axisLetter=S,ut.axis=C,ut.crossAxis=p,ut.value=W,ut.constvar=t,ut.index=f,ut.x=Y,ut.y=ft,ut.smoothing=p.smoothing,ut}function U(W){var q,X,lt,yt,pt,st=[],tt=[],dt={};if(dt.length=_.length,dt.crossLength=h.length,S==="b")for(lt=Math.max(0,Math.min(V-2,W)),pt=Math.min(1,Math.max(0,W-lt)),dt.xy=function(rt){return P.evalxy([],rt,W)},dt.dxy=function(rt,at){return P.dxydi([],rt,lt,at,pt)},q=0;q_.length-1)&&M.push(g(U(r),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(f=i;f_.length-1)&&!(v<0||v>_.length-1))for(T=_[a],u=_[v],e=0;e_[_.length-1])&&E.push(g(F(y),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash})));C.startline&&A.push(g(U(0),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&A.push(g(U(_.length-1),{color:C.endlinecolor,width:C.endlinewidth}))}else{for(n=5e-15,o=[Math.floor((_[_.length-1]-C.tick0)/C.dtick*(1+n)),Math.ceil((_[0]-C.tick0)/C.dtick/(1+n))].sort(function(W,q){return W-q}),i=o[0],s=o[1],f=i;f<=s;f++)x=C.tick0+C.dtick*f,M.push(g(F(x),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(f=i-1;f_[_.length-1])&&E.push(g(F(y),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash}));C.startline&&A.push(g(F(_[0]),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&A.push(g(F(_[_.length-1]),{color:C.endlinecolor,width:C.endlinewidth}))}}}),Lq=Ft((Q,$)=>{var c=Es(),g=Ta().extendFlat;$.exports=function(P,S){var t,e,r,a,n,o=S._labels=[],i=S._gridlines;for(t=0;t{$.exports=function(c,g,P,S){var t,e,r,a=[],n=!!P.smoothing,o=!!S.smoothing,i=c[0].length-1,s=c.length-1;for(t=0,e=[],r=[];t<=i;t++)e[t]=c[0][t],r[t]=g[0][t];for(a.push({x:e,y:r,bicubic:n}),t=0,e=[],r=[];t<=s;t++)e[t]=c[t][i],r[t]=g[t][i];for(a.push({x:e,y:r,bicubic:o}),t=i,e=[],r=[];t>=0;t--)e[i-t]=c[s][t],r[i-t]=g[s][t];for(a.push({x:e,y:r,bicubic:n}),t=s,e=[],r=[];t>=0;t--)e[s-t]=c[t][0],r[s-t]=g[t][0];return a.push({x:e,y:r,bicubic:o}),a}}),zq=Ft((Q,$)=>{var c=bn();$.exports=function(g,P,S){var t,e,r,a=[],n=[],o=g[0].length,i=g.length;function s(X,lt){var yt=0,pt,st=0;return X>0&&(pt=g[lt][X-1])!==void 0&&(st++,yt+=pt),X0&&(pt=g[lt-1][X])!==void 0&&(st++,yt+=pt),lt0&&e0&&th);return c.log("Smoother converged to",p,"after",w,"iterations"),g}}),Iq=Ft((Q,$)=>{$.exports={RELATIVE_CULL_TOLERANCE:1e-6}}),Oq=Ft((Q,$)=>{var c=.5;$.exports=function(g,P,S,t){var e=g[0]-P[0],r=g[1]-P[1],a=S[0]-P[0],n=S[1]-P[1],o=Math.pow(e*e+r*r,c/2),i=Math.pow(a*a+n*n,c/2),s=(i*i*e-o*o*a)*t,f=(i*i*r-o*o*n)*t,x=i*(o+i)*3,y=o*(o+i)*3;return[[P[0]+(x&&s/x),P[1]+(x&&f/x)],[P[0]-(y&&s/y),P[1]-(y&&f/y)]]}}),Dq=Ft((Q,$)=>{var c=Oq(),g=bn().ensureArray;function P(S,t,e){var r=-.5*e[0]+1.5*t[0],a=-.5*e[1]+1.5*t[1];return[(2*r+S[0])/3,(2*a+S[1])/3]}$.exports=function(S,t,e,r,a,n){var o,i,s,f,x,y,v,T,u,b,_=e[0].length,C=e.length,M=a?3*_-2:_,E=n?3*C-2:C;for(S=g(S,E),t=g(t,E),s=0;s{$.exports=function(c,g,P,S,t){var e=g-2,r=P-2;return S&&t?function(a,n,o){a||(a=[]);var i,s,f,x,y,v,T=Math.max(0,Math.min(Math.floor(n),e)),u=Math.max(0,Math.min(Math.floor(o),r)),b=Math.max(0,Math.min(1,n-T)),_=Math.max(0,Math.min(1,o-u));T*=3,u*=3;var C=b*b,M=C*b,E=1-b,A=E*E,h=A*E,p=_*_,k=p*_,w=1-_,R=w*w,O=R*w;for(v=0;v{$.exports=function(c,g,P){return g&&P?function(S,t,e,r,a){S||(S=[]);var n,o,i,s,f,x;t*=3,e*=3;var y=r*r,v=1-r,T=v*v,u=v*r*2,b=-3*T,_=3*(T-u),C=3*(u-y),M=3*y,E=a*a,A=E*a,h=1-a,p=h*h,k=p*h;for(x=0;x{$.exports=function(c,g,P){return g&&P?function(S,t,e,r,a){S||(S=[]);var n,o,i,s,f,x;t*=3,e*=3;var y=r*r,v=y*r,T=1-r,u=T*T,b=u*T,_=a*a,C=1-a,M=C*C,E=C*a*2,A=-3*M,h=3*(M-E),p=3*(E-_),k=3*_;for(x=0;x{var c=Iq(),g=T_().findBin,P=Dq(),S=Fq(),t=Rq(),e=Bq();$.exports=function(r){var a=r._a,n=r._b,o=a.length,i=n.length,s=r.aaxis,f=r.baxis,x=a[0],y=a[o-1],v=n[0],T=n[i-1],u=a[a.length-1]-a[0],b=n[n.length-1]-n[0],_=u*c.RELATIVE_CULL_TOLERANCE,C=b*c.RELATIVE_CULL_TOLERANCE;x-=_,y+=_,v-=C,T+=C,r.isVisible=function(M,E){return M>x&&Mv&&Ey||ET},r.setScale=function(){var M=r._x,E=r._y,A=P(r._xctrl,r._yctrl,M,E,s.smoothing,f.smoothing);r._xctrl=A[0],r._yctrl=A[1],r.evalxy=S([r._xctrl,r._yctrl],o,i,s.smoothing,f.smoothing),r.dxydi=t([r._xctrl,r._yctrl],s.smoothing,f.smoothing),r.dxydj=e([r._xctrl,r._yctrl],s.smoothing,f.smoothing)},r.i2a=function(M){var E=Math.max(0,Math.floor(M[0]),o-2),A=M[0]-E;return(1-A)*a[E]+A*a[E+1]},r.j2b=function(M){var E=Math.max(0,Math.floor(M[1]),o-2),A=M[1]-E;return(1-A)*n[E]+A*n[E+1]},r.ij2ab=function(M){return[r.i2a(M[0]),r.j2b(M[1])]},r.a2i=function(M){var E=Math.max(0,Math.min(g(M,a),o-2)),A=a[E],h=a[E+1];return Math.max(0,Math.min(o-1,E+(M-A)/(h-A)))},r.b2j=function(M){var E=Math.max(0,Math.min(g(M,n),i-2)),A=n[E],h=n[E+1];return Math.max(0,Math.min(i-1,E+(M-A)/(h-A)))},r.ab2ij=function(M){return[r.a2i(M[0]),r.b2j(M[1])]},r.i2c=function(M,E){return r.evalxy([],M,E)},r.ab2xy=function(M,E,A){if(!A&&(Ma[o-1]|En[i-1]))return[!1,!1];var h=r.a2i(M),p=r.b2j(E),k=r.evalxy([],h,p);if(A){var w=0,R=0,O=[],N,V,H,F;Ma[o-1]?(N=o-2,V=1,w=(M-a[o-1])/(a[o-1]-a[o-2])):(N=Math.max(0,Math.min(o-2,Math.floor(h))),V=h-N),En[i-1]?(H=i-2,F=1,R=(E-n[i-1])/(n[i-1]-n[i-2])):(H=Math.max(0,Math.min(i-2,Math.floor(p))),F=p-H),w&&(r.dxydi(O,N,H,V,F),k[0]+=O[0]*w,k[1]+=O[1]*w),R&&(r.dxydj(O,N,H,V,F),k[0]+=O[0]*R,k[1]+=O[1]*R)}return k},r.c2p=function(M,E,A){return[E.c2p(M[0]),A.c2p(M[1])]},r.p2x=function(M,E,A){return[E.p2c(M[0]),A.p2c(M[1])]},r.dadi=function(M){var E=Math.max(0,Math.min(a.length-2,M));return a[E+1]-a[E]},r.dbdj=function(M){var E=Math.max(0,Math.min(n.length-2,M));return n[E+1]-n[E]},r.dxyda=function(M,E,A,h){var p=r.dxydi(null,M,E,A,h),k=r.dadi(M,A);return[p[0]/k,p[1]/k]},r.dxydb=function(M,E,A,h){var p=r.dxydj(null,M,E,A,h),k=r.dbdj(E,h);return[p[0]/k,p[1]/k]},r.dxyda_rough=function(M,E,A){var h=u*(A||.1),p=r.ab2xy(M+h,E,!0),k=r.ab2xy(M-h,E,!0);return[(p[0]-k[0])*.5/h,(p[1]-k[1])*.5/h]},r.dxydb_rough=function(M,E,A){var h=b*(A||.1),p=r.ab2xy(M,E+h,!0),k=r.ab2xy(M,E-h,!0);return[(p[0]-k[0])*.5/h,(p[1]-k[1])*.5/h]},r.dpdx=function(M){return M._m},r.dpdy=function(M){return M._m}}}),jq=Ft((Q,$)=>{var c=Es(),g=bn().isArray1D,P=Sq(),S=Eq(),t=Cq(),e=Lq(),r=Pq(),a=B6(),n=zq(),o=R6(),i=Nq();$.exports=function(s,f){var x=c.getFromId(s,f.xaxis),y=c.getFromId(s,f.yaxis),v=f.aaxis,T=f.baxis,u=f.x,b=f.y,_=[];u&&g(u)&&_.push("x"),b&&g(b)&&_.push("y"),_.length&&o(f,v,T,"a","b",_);var C=f._a=f._a||f.a,M=f._b=f._b||f.b;u=f._x||f.x,b=f._y||f.y;var E={};if(f._cheater){var A=v.cheatertype==="index"?C.length:C,h=T.cheatertype==="index"?M.length:M;u=P(A,h,f.cheaterslope)}f._x=u=a(u),f._y=b=a(b),n(u,C,M),n(b,C,M),i(f),f.setScale();var p=S(u),k=S(b),w=.5*(p[1]-p[0]),R=.5*(p[1]+p[0]),O=.5*(k[1]-k[0]),N=.5*(k[1]+k[0]),V=1.3;return p=[R-w*V,R+w*V],k=[N-O*V,N+O*V],f._extremes[x._id]=c.findExtremes(x,p,{padded:!0}),f._extremes[y._id]=c.findExtremes(y,k,{padded:!0}),t(f,"a","b"),t(f,"b","a"),e(f,v),e(f,T),E.clipsegments=r(f._xctrl,f._yctrl,v,T),E.x=u,E.y=b,E.a=C,E.b=M,[E]}}),Uq=Ft((Q,$)=>{$.exports={attributes:_T(),supplyDefaults:Tq(),plot:Mq(),calc:jq(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Mf(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}),Vq=Ft((Q,$)=>{$.exports=Uq()}),IE=Ft((Q,$)=>{var c=z0(),g=tf(),P=$o(),{hovertemplateAttrs:S,texttemplateAttrs:t,templatefallbackAttrs:e}=$u(),r=Tc(),a=Ta().extendFlat,n=g.marker,o=g.line,i=n.line;$.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:a({},g.mode,{dflt:"markers"}),text:a({},g.text,{}),texttemplate:t({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:e({editType:"plot"}),hovertext:a({},g.hovertext,{}),line:{color:o.color,width:o.width,dash:o.dash,backoff:o.backoff,shape:a({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:g.connectgaps,fill:a({},g.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:c(),marker:a({symbol:n.symbol,opacity:n.opacity,maxdisplayed:n.maxdisplayed,angle:n.angle,angleref:n.angleref,standoff:n.standoff,size:n.size,sizeref:n.sizeref,sizemin:n.sizemin,sizemode:n.sizemode,line:a({width:i.width,editType:"calc"},r("marker.line")),gradient:n.gradient,editType:"calc"},r("marker")),textfont:g.textfont,textposition:g.textposition,selected:g.selected,unselected:g.unselected,hoverinfo:a({},P.hoverinfo,{flags:["a","b","text","name"]}),hoveron:g.hoveron,hovertemplate:S(),hovertemplatefallback:e(),zorder:g.zorder}}),Hq=Ft((Q,$)=>{var c=bn(),g=vm(),P=Ac(),S=s0(),t=I0(),e=xv(),r=x0(),a=O0(),n=IE();$.exports=function(o,i,s,f){function x(C,M){return c.coerce(o,i,n,C,M)}x("carpet"),i.xaxis="x",i.yaxis="y";var y=x("a"),v=x("b"),T=Math.min(y.length,v.length);if(!T){i.visible=!1;return}i._length=T,x("text"),x("texttemplate"),x("texttemplatefallback"),x("hovertext");var u=T{$.exports=function(c,g){var P={},S=g._carpet,t=S.ab2ij([c.a,c.b]),e=Math.floor(t[0]),r=t[0]-e,a=Math.floor(t[1]),n=t[1]-a,o=S.evalxy([],e,a,r,n);return P.yLabel=o[1].toFixed(3),P}}),bT=Ft((Q,$)=>{$.exports=function(c,g){for(var P=c._fullData.length,S,t=0;t{var c=ra(),g=F0(),P=ct(),S=Bt(),t=me().calcMarkerSize,e=bT();$.exports=function(r,a){var n=a._carpetTrace=e(r,a);if(!(!n||!n.visible||n.visible==="legendonly")){var o;a.xaxis=n.xaxis,a.yaxis=n.yaxis;var i=a._length,s=new Array(i),f,x,y=!1;for(o=0;o{var c=Ya(),g=Es(),P=js();$.exports=function(S,t,e,r){var a,n,o,i=e[0][0].carpet,s=g.getFromId(S,i.xaxis||"x"),f=g.getFromId(S,i.yaxis||"y"),x={xaxis:s,yaxis:f,plot:t.plot};for(a=0;a{var c=Sd(),g=bn().fillText;$.exports=function(P,S,t,e){var r=c(P,S,t,e);if(!r||r[0].index===!1)return;var a=r[0];if(a.index===void 0){var n=1-a.y0/P.ya._length,o=P.xa._length,i=o*n/2,s=o-i;return a.x0=Math.max(Math.min(a.x0,s),i),a.x1=Math.max(Math.min(a.x1,s),i),r}var f=a.cd[a.index];a.a=f.a,a.b=f.b,a.xLabelVal=void 0,a.yLabelVal=void 0;var x=a.trace,y=x._carpet,v=x._module.formatLabels(f,x);a.yLabel=v.yLabel,delete a.text;var T=[];function u(C,M){var E;C.labelprefix&&C.labelprefix.length>0?E=C.labelprefix.replace(/ = $/,""):E=C._hovertitle,T.push(E+": "+M.toFixed(3)+C.labelsuffix)}if(!x.hovertemplate){var b=f.hi||x.hoverinfo,_=b.split("+");_.indexOf("all")!==-1&&(_=["a","b","text"]),_.indexOf("a")!==-1&&u(y.aaxis,f.a),_.indexOf("b")!==-1&&u(y.baxis,f.b),T.push("y: "+a.yLabel),_.indexOf("text")!==-1&&g(f,x,T),a.extraText=T.join("
")}return r}}),Gq=Ft((Q,$)=>{$.exports=function(c,g,P,S,t){var e=S[t];return c.a=e.a,c.b=e.b,c.y=e.y,c}}),Yq=Ft((Q,$)=>{$.exports={attributes:IE(),supplyDefaults:Hq(),colorbar:xo(),formatLabels:Wq(),calc:qq(),plot:Zq(),style:xl().style,styleOnSelect:xl().styleOnSelect,hoverPoints:$q(),selectPoints:Bf(),eventData:Gq(),moduleType:"trace",name:"scattercarpet",basePlotModule:Mf(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}),Kq=Ft((Q,$)=>{$.exports=Yq()}),OE=Ft((Q,$)=>{var c=X_(),g=Vw(),P=Tc(),S=Ta().extendFlat,t=g.contours;$.exports=S({carpet:{valType:"string",editType:"calc"},z:c.z,a:c.x,a0:c.x0,da:c.dx,b:c.y,b0:c.y0,db:c.dy,text:c.text,hovertext:c.hovertext,transpose:c.transpose,atype:c.xtype,btype:c.ytype,fillcolor:g.fillcolor,autocontour:g.autocontour,ncontours:g.ncontours,contours:{type:t.type,start:t.start,end:t.end,size:t.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:t.showlines,showlabels:t.showlabels,labelfont:t.labelfont,labelformat:t.labelformat,operation:t.operation,value:t.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:g.line.color,width:g.line.width,dash:g.line.dash,smoothing:g.line.smoothing,editType:"plot"},zorder:g.zorder},P("",{cLetter:"z",autoColorDflt:!1}))}),DE=Ft((Q,$)=>{var c=bn(),g=F6(),P=OE(),S=o7(),t=K6(),e=X6();$.exports=function(r,a,n,o){function i(y,v){return c.coerce(r,a,P,y,v)}function s(y){return c.coerce2(r,a,P,y)}if(i("carpet"),r.a&&r.b){var f=g(r,a,i,o,"a","b");if(!f){a.visible=!1;return}i("text");var x=i("contours.type")==="constraint";x?S(r,a,i,o,n,{hasHover:!1}):(t(r,a,i,s),e(r,a,i,o,{hasHover:!1}))}else a._defaultColor=n,a._length=null;i("zorder")}}),Xq=Ft((Q,$)=>{var c=Jd(),g=bn(),P=R6(),S=B6(),t=N6(),e=j6(),r=WM(),a=DE(),n=bT(),o=XM();$.exports=function(s,f){var x=f._carpetTrace=n(s,f);if(!(!x||!x.visible||x.visible==="legendonly")){if(!f.a||!f.b){var y=s.data[x.index],v=s.data[f.index];v.a||(v.a=y.a),v.b||(v.b=y.b),a(v,f,f._defaultColor,s._fullLayout)}var T=i(s,f);return o(f,f._z),T}};function i(s,f){var x=f._carpetTrace,y=x.aaxis,v=x.baxis,T,u,b,_,C,M,E;y._minDtick=0,v._minDtick=0,g.isArray1D(f.z)&&P(f,y,v,"a","b",["z"]),T=f._a=f._a||f.a,_=f._b=f._b||f.b,T=T?y.makeCalcdata(f,"_a"):[],_=_?v.makeCalcdata(f,"_b"):[],u=f.a0||0,b=f.da||1,C=f.b0||0,M=f.db||1,E=f._z=S(f._z||f.z,f.transpose),f._emptypoints=e(E),t(E,f._emptypoints);var A=g.maxRowLength(E),h=f.xtype==="scaled"?"":T,p=r(f,h,u,b,A,y),k=f.ytype==="scaled"?"":_,w=r(f,k,C,M,E.length,v),R={a:p,b:w,z:E};return f.contours.type==="levels"&&f.contours.coloring!=="none"&&c(s,f,{vals:E,containerStr:"",cLetter:"z"}),[R]}}),Jq=Ft((Q,$)=>{var c=bn().isArrayOrTypedArray;$.exports=function(g,P,S,t){var e,r,a,n,o,i,s,f,x,y,v,T,u,b=c(S)?"a":"b",_=b==="a"?g.aaxis:g.baxis,C=_.smoothing,M=b==="a"?g.a2i:g.b2j,E=b==="a"?S:t,A=b==="a"?t:S,h=b==="a"?P.a.length:P.b.length,p=b==="a"?P.b.length:P.a.length,k=Math.floor(b==="a"?g.b2j(A):g.a2i(A)),w=b==="a"?function(yt){return g.evalxy([],yt,k)}:function(yt){return g.evalxy([],k,yt)};C&&(a=Math.max(0,Math.min(p-2,k)),n=k-a,r=b==="a"?function(yt,pt){return g.dxydi([],yt,a,pt,n)}:function(yt,pt){return g.dxydj([],a,yt,n,pt)});var R=M(E[0]),O=M(E[1]),N=R0?Math.floor:Math.ceil,F=N>0?Math.ceil:Math.floor,U=N>0?Math.min:Math.max,W=N>0?Math.max:Math.min,q=H(R+V),X=F(O-V);s=w(R);var lt=[[s]];for(e=q;e*N{var c=un(),g=PE(),P=zE(),S=js(),t=bn(),e=QM(),r=t7(),a=J6(),n=Ww(),o=r7(),i=e7(),s=n7(),f=bT(),x=Jq();$.exports=function(A,h,p,k){var w=h.xaxis,R=h.yaxis;t.makeTraceGroups(k,p,"contour").each(function(O){var N=c.select(this),V=O[0],H=V.trace,F=H._carpetTrace=f(A,H),U=A.calcdata[F.index][0];if(!F.visible||F.visible==="legendonly")return;var W=V.a,q=V.b,X=H.contours,lt=i(X,h,V),yt=X.type==="constraint",pt=X._operation,st=yt?pt==="="?"lines":"fill":X.coloring;function tt(Pt){var Wt=F.ab2xy(Pt[0],Pt[1],!0);return[w.c2p(Wt[0]),R.c2p(Wt[1])]}var dt=[[W[0],q[q.length-1]],[W[W.length-1],q[q.length-1]],[W[W.length-1],q[0]],[W[0],q[0]]];e(lt);var rt=(W[W.length-1]-W[0])*1e-8,at=(q[q.length-1]-q[0])*1e-8;r(lt,rt,at);var vt=lt;X.type==="constraint"&&(vt=o(lt,pt)),y(lt,tt);var it,Y,ft,ut,wt=[];for(ut=U.clipsegments.length-1;ut>=0;ut--)it=U.clipsegments[ut],Y=g([],it.x,w.c2p),ft=g([],it.y,R.c2p),Y.reverse(),ft.reverse(),wt.push(P(Y,ft,it.bicubic));var zt="M"+wt.join("L")+"Z";C(N,U.clipsegments,w,R,yt,st),M(H,N,w,R,vt,dt,tt,F,U,st,zt),v(N,lt,A,V,X,h,F),S.setClipUrl(N,F._clipPathId,A)})};function y(A,h){var p,k,w,R,O,N,V,H,F;for(p=0;pyt&&(k.max=yt),k.len=k.max-k.min}function u(A,h,p){var k=A.getPointAtLength(h),w=A.getPointAtLength(p),R=w.x-k.x,O=w.y-k.y,N=Math.sqrt(R*R+O*O);return[R/N,O/N]}function b(A){var h=Math.sqrt(A[0]*A[0]+A[1]*A[1]);return[A[0]/h,A[1]/h]}function _(A,h){var p=Math.abs(A[0]*h[0]+A[1]*h[1]),k=Math.sqrt(1-p*p);return k/p}function C(A,h,p,k,w,R){var O,N,V,H,F=t.ensureSingle(A,"g","contourbg"),U=F.selectAll("path").data(R==="fill"&&!w?[0]:[]);U.enter().append("path"),U.exit().remove();var W=[];for(H=0;H=0&&(q=ft,lt=yt):Math.abs(W[1]-q[1])=0&&(q=ft,lt=yt):t.log("endpt to newendpt is not vert. or horz.",W,q,ft)}if(lt>=0)break;H+=it(W,q),W=q}if(lt===h.edgepaths.length){t.log("unclosed perimeter path");break}V=lt,U=F.indexOf(V)===-1,U&&(V=F[0],H+=it(W,q)+"Z",W=null)}for(V=0;V{$.exports={attributes:OE(),supplyDefaults:DE(),colorbar:tk(),calc:Xq(),plot:Qq(),style:Q6(),moduleType:"trace",name:"contourcarpet",basePlotModule:Mf(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}}),eZ=Ft((Q,$)=>{$.exports=tZ()}),wT=Ft((Q,$)=>{var c=bn().extendFlat,g=tf(),P=fh().axisHoverFormat,S=Td().dash,t=Ps(),e=J_(),r=e.INCREASING.COLOR,a=e.DECREASING.COLOR,n=g.line;function o(i){return{line:{color:c({},n.color,{dflt:i}),width:n.width,dash:S,editType:"style"},editType:"style"}}$.exports={xperiod:g.xperiod,xperiod0:g.xperiod0,xperiodalignment:g.xperiodalignment,xhoverformat:P("x"),yhoverformat:P("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:c({},n.width,{}),dash:c({},S,{}),editType:"style"},increasing:o(r),decreasing:o(a),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:c({},t.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:g.zorder}}),FE=Ft((Q,$)=>{var c=Xo(),g=bn();$.exports=function(P,S,t,e){var r=t("x"),a=t("open"),n=t("high"),o=t("low"),i=t("close");t("hoverlabel.split");var s=c.getComponentMethod("calendars","handleTraceDefaults");if(s(P,S,["x"],e),!!(a&&n&&o&&i)){var f=Math.min(a.length,n.length,o.length,i.length);return r&&(f=Math.min(f,g.minRowLength(r))),S._length=f,f}}}),rZ=Ft((Q,$)=>{var c=bn(),g=FE(),P=Fp(),S=wT();$.exports=function(e,r,a,n){function o(s,f){return c.coerce(e,r,S,s,f)}var i=g(e,r,o,n);if(!i){r.visible=!1;return}P(e,r,n,o,{x:!0}),o("xhoverformat"),o("yhoverformat"),o("line.width"),o("line.dash"),t(e,r,o,"increasing"),t(e,r,o,"decreasing"),o("text"),o("hovertext"),o("tickwidth"),n._requestRangeslider[r.xaxis]=!0,o("zorder")};function t(e,r,a,n){a(n+".line.color"),a(n+".line.width",r.line.width),a(n+".line.dash",r.line.dash)}}),RE=Ft((Q,$)=>{var c=bn(),g=c._,P=Es(),S=D0(),t=Da().BADNUM;function e(o,i){var s=P.getFromId(o,i.xaxis),f=P.getFromId(o,i.yaxis),x=n(o,s,i),y=i._minDiff;i._minDiff=null;var v=i._origX;i._origX=null;var T=i._xcalc;i._xcalc=null;var u=a(o,i,v,T,f,r);return i._extremes[s._id]=P.findExtremes(s,T,{vpad:y/2}),u.length?(c.extendFlat(u[0].t,{wHover:y/2,tickLen:x}),u):[{t:{empty:!0}}]}function r(o,i,s,f){return{o,h:i,l:s,c:f}}function a(o,i,s,f,x,y){for(var v=x.makeCalcdata(i,"open"),T=x.makeCalcdata(i,"high"),u=x.makeCalcdata(i,"low"),b=x.makeCalcdata(i,"close"),_=c.isArrayOrTypedArray(i.text),C=c.isArrayOrTypedArray(i.hovertext),M=!0,E=null,A=!!i.xperiodalignment,h=[],p=0;pE):M=N>w,E=N;var V=y(w,R,O,N);V.pos=k,V.yc=(w+N)/2,V.i=p,V.dir=M?"increasing":"decreasing",V.x=V.pos,V.y=[O,R],A&&(V.orig_p=s[p]),_&&(V.tx=i.text[p]),C&&(V.htx=i.hovertext[p]),h.push(V)}else h.push({pos:k,empty:!0})}return i._extremes[x._id]=P.findExtremes(x,c.concat(u,T),{padded:!0}),h.length&&(h[0].t={labels:{open:g(o,"open:")+" ",high:g(o,"high:")+" ",low:g(o,"low:")+" ",close:g(o,"close:")+" "}}),h}function n(o,i,s){var f=s._minDiff;if(!f){var x=o._fullData,y=[];f=1/0;var v;for(v=0;v{var c=un(),g=bn();$.exports=function(P,S,t,e){var r=S.yaxis,a=S.xaxis,n=!!a.rangebreaks;g.makeTraceGroups(e,t,"trace ohlc").each(function(o){var i=c.select(this),s=o[0],f=s.t,x=s.trace;if(x.visible!==!0||f.empty){i.remove();return}var y=f.tickLen,v=i.selectAll("path").data(g.identity);v.enter().append("path"),v.exit().remove(),v.attr("d",function(T){if(T.empty)return"M0,0Z";var u=a.c2p(T.pos-y,!0),b=a.c2p(T.pos+y,!0),_=n?(u+b)/2:a.c2p(T.pos,!0),C=r.c2p(T.o,!0),M=r.c2p(T.h,!0),E=r.c2p(T.l,!0),A=r.c2p(T.c,!0);return"M"+u+","+C+"H"+_+"M"+_+","+M+"V"+E+"M"+b+","+A+"H"+_})})}}),iZ=Ft((Q,$)=>{var c=un(),g=js(),P=li();$.exports=function(S,t,e){var r=e||c.select(S).selectAll("g.ohlclayer").selectAll("g.trace");r.style("opacity",function(a){return a[0].trace.opacity}),r.each(function(a){var n=a[0].trace;c.select(this).selectAll("path").each(function(o){if(!o.empty){var i=n[o.dir].line;c.select(this).style("fill","none").call(P.stroke,i.color).call(g.dashLine,i.dash,i.width).style("opacity",n.selectedpoints&&!o.selected?.3:1)}})})}}),BE=Ft((Q,$)=>{var c=Es(),g=bn(),P=Qh(),S=li(),t=bn().fillText,e=J_(),r={increasing:e.INCREASING.SYMBOL,decreasing:e.DECREASING.SYMBOL};function a(s,f,x,y){var v=s.cd,T=v[0].trace;return T.hoverlabel.split?o(s,f,x,y):i(s,f,x,y)}function n(s,f,x,y){var v=s.cd,T=s.xa,u=v[0].trace,b=v[0].t,_=u.type,C=_==="ohlc"?"l":"min",M=_==="ohlc"?"h":"max",E,A,h=b.bPos||0,p=function(X){return X.pos+h-f},k=b.bdPos||b.tickLen,w=b.wHover,R=Math.min(1,k/Math.abs(T.r2c(T.range[1])-T.r2c(T.range[0])));E=s.maxHoverDistance-R,A=s.maxSpikeDistance-R;function O(X){var lt=p(X);return P.inbox(lt-w,lt+w,E)}function N(X){var lt=X[C],yt=X[M];return lt===yt||P.inbox(lt-x,yt-x,E)}function V(X){return(O(X)+N(X))/2}var H=P.getDistanceFunction(y,O,N,V);if(P.getClosest(v,H,s),s.index===!1)return null;var F=v[s.index];if(F.empty)return null;var U=F.dir,W=u[U],q=W.line.color;return S.opacity(q)&&W.line.width?s.color=q:s.color=W.fillcolor,s.x0=T.c2p(F.pos+h-k,!0),s.x1=T.c2p(F.pos+h+k,!0),s.xLabelVal=F.orig_p!==void 0?F.orig_p:F.pos,s.spikeDistance=V(F)*A/E,s.xSpike=T.c2p(F.pos,!0),s}function o(s,f,x,y){var v=s.cd,T=s.ya,u=v[0].trace,b=v[0].t,_=[],C=n(s,f,x,y);if(!C)return[];var M=C.index,E=v[M],A=E.hi||u.hoverinfo,h=A.split("+"),p=A==="all",k=p||h.indexOf("y")!==-1;if(!k)return[];for(var w=["high","open","close","low"],R={},O=0;O"+b.labels[N]+c.hoverLabelText(T,V,u.yhoverformat)):(F=g.extendFlat({},C),F.y0=F.y1=H,F.yLabelVal=V,F.yLabel=b.labels[N]+c.hoverLabelText(T,V,u.yhoverformat),F.name="",_.push(F),R[V]=F)}return _}function i(s,f,x,y){var v=s.cd,T=s.ya,u=v[0].trace,b=v[0].t,_=n(s,f,x,y);if(!_)return[];var C=_.index,M=v[C],E=_.index=M.i,A=M.dir;function h(V){return b.labels[V]+c.hoverLabelText(T,u[V][E],u.yhoverformat)}var p=M.hi||u.hoverinfo,k=p.split("+"),w=p==="all",R=w||k.indexOf("y")!==-1,O=w||k.indexOf("text")!==-1,N=R?[h("open"),h("high"),h("low"),h("close")+" "+r[A]]:[];return O&&t(M,u,N),_.extraText=N.join("
"),_.y0=_.y1=T.c2p(M.yc,!0),[_]}$.exports={hoverPoints:a,hoverSplit:o,hoverOnPoints:i}}),NE=Ft((Q,$)=>{$.exports=function(c,g){var P=c.cd,S=c.xaxis,t=c.yaxis,e=[],r,a=P[0].t.bPos||0;if(g===!1)for(r=0;r{$.exports={moduleType:"trace",name:"ohlc",basePlotModule:Mf(),categories:["cartesian","svg","showLegend"],meta:{},attributes:wT(),supplyDefaults:rZ(),calc:RE().calc,plot:nZ(),style:iZ(),hoverPoints:BE().hoverPoints,selectPoints:NE()}}),oZ=Ft((Q,$)=>{$.exports=aZ()}),jE=Ft((Q,$)=>{var c=bn().extendFlat,g=fh().axisHoverFormat,P=wT(),S=Bw();function t(e){return{line:{color:c({},S.line.color,{dflt:e}),width:S.line.width,editType:"style"},fillcolor:S.fillcolor,editType:"style"}}$.exports={xperiod:P.xperiod,xperiod0:P.xperiod0,xperiodalignment:P.xperiodalignment,xhoverformat:g("x"),yhoverformat:g("y"),x:P.x,open:P.open,high:P.high,low:P.low,close:P.close,line:{width:c({},S.line.width,{}),editType:"style"},increasing:t(P.increasing.line.color.dflt),decreasing:t(P.decreasing.line.color.dflt),text:P.text,hovertext:P.hovertext,whiskerwidth:c({},S.whiskerwidth,{dflt:0}),hoverlabel:P.hoverlabel,zorder:S.zorder}}),sZ=Ft((Q,$)=>{var c=bn(),g=li(),P=FE(),S=Fp(),t=jE();$.exports=function(r,a,n,o){function i(f,x){return c.coerce(r,a,t,f,x)}var s=P(r,a,i,o);if(!s){a.visible=!1;return}S(r,a,o,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),e(r,a,i,"increasing"),e(r,a,i,"decreasing"),i("text"),i("hovertext"),i("whiskerwidth"),o._requestRangeslider[a.xaxis]=!0,i("zorder")};function e(r,a,n,o){var i=n(o+".line.color");n(o+".line.width",a.line.width),n(o+".fillcolor",g.addOpacity(i,.5))}}),lZ=Ft((Q,$)=>{var c=bn(),g=Es(),P=D0(),S=RE().calcCommon;$.exports=function(e,r){var a=e._fullLayout,n=g.getFromId(e,r.xaxis),o=g.getFromId(e,r.yaxis),i=n.makeCalcdata(r,"x"),s=P(r,n,"x",i).vals,f=S(e,r,i,s,o,t);return f.length?(c.extendFlat(f[0].t,{num:a._numBoxes,dPos:c.distinctVals(s).minDiff/2,posLetter:"x",valLetter:"y"}),a._numBoxes++,f):[{t:{empty:!0}}]};function t(e,r,a,n){return{min:a,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:r}}}),uZ=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"candlestick",basePlotModule:Mf(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:jE(),layoutAttributes:Nw(),supplyLayoutDefaults:z6().supplyLayoutDefaults,crossTraceCalc:I6().crossTraceCalc,supplyDefaults:sZ(),calc:lZ(),plot:O6().plot,layerName:"boxlayer",style:D6().style,hoverPoints:BE().hoverPoints,selectPoints:NE()}}),cZ=Ft((Q,$)=>{$.exports=uZ()}),UE=Ft((Q,$)=>{var c=bn(),g=i0(),P=c.deg2rad,S=c.rad2deg;$.exports=function(n,o,i){switch(g(n,i),n._id){case"x":case"radialaxis":t(n,o);break;case"angularaxis":a(n,o);break}};function t(n,o){var i=o._subplot;n.setGeometry=function(){var s=n._rl[0],f=n._rl[1],x=i.innerRadius,y=(i.radius-x)/(f-s),v=x/y,T=s>f?function(u){return u<=0}:function(u){return u>=0};n.c2g=function(u){var b=n.c2l(u)-s;return(T(b)?b:0)+v},n.g2c=function(u){return n.l2c(u+s-v)},n.g2p=function(u){return u*y},n.c2p=function(u){return n.g2p(n.c2g(u))}}}function e(n,o){return o==="degrees"?P(n):n}function r(n,o){return o==="degrees"?S(n):n}function a(n,o){var i=n.type;if(i==="linear"){var s=n.d2c,f=n.c2d;n.d2c=function(x,y){return e(s(x),y)},n.c2d=function(x,y){return f(r(x,y))}}n.makeCalcdata=function(x,y){var v=x[y],T=x._length,u,b,_=function(h){return n.d2c(h,x.thetaunit)};if(v)for(u=new Array(T),b=0;b{$.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}}),TT=Ft((Q,$)=>{var c=bn(),g=mm().tester,P=c.findIndexOfMin,S=c.isAngleInsideSector,t=c.angleDelta,e=c.angleDist;function r(b,_,C,M,E){if(!S(_,M))return!1;var A,h;C[0]0?h:1/0},M=P(_,C),E=c.mod(M+1,_.length);return[_[M],_[E]]}function y(b){return Math.abs(b)>1e-10?b:0}function v(b,_,C){_=_||0,C=C||0;for(var M=b.length,E=new Array(M),A=0;A{function c(r){return r<0?-1:r>0?1:0}function g(r){var a=r[0],n=r[1];if(!isFinite(a)||!isFinite(n))return[1,0];var o=(a+1)*(a+1)+n*n;return[(a*a+n*n-1)/o,2*n/o]}function P(r,a){var n=a[0],o=a[1];return[n*r.radius+r.cx,-o*r.radius+r.cy]}function S(r,a){return a*r.radius}function t(r,a,n,o){var i=P(r,g([n,a])),s=i[0],f=i[1],x=P(r,g([o,a])),y=x[0],v=x[1];if(a===0)return["M"+s+","+f,"L"+y+","+v].join(" ");var T=S(r,1/Math.abs(a));return["M"+s+","+f,"A"+T+","+T+" 0 0,"+(a<0?1:0)+" "+y+","+v].join(" ")}function e(r,a,n,o){var i=S(r,1/(a+1)),s=P(r,g([a,n])),f=s[0],x=s[1],y=P(r,g([a,o])),v=y[0],T=y[1];if(c(n)!==c(o)){var u=P(r,g([a,0])),b=u[0],_=u[1];return["M"+f+","+x,"A"+i+","+i+" 0 0,"+(0{var c=un(),g=fo(),P=Xo(),S=bn(),t=S.strRotate,e=S.strTranslate,r=li(),a=js(),n=Kc(),o=Es(),i=i0(),s=UE(),f=Y0().doAutoRange,x=S1(),y=up(),v=Qh(),T=lp(),u=vf().prepSelect,b=vf().selectOnClick,_=vf().clearOutline,C=P0(),M=mv(),E=y0().redrawReglTraces,A=Af().MID_SHIFT,h=kT(),p=TT(),k=VE(),w=k.smith,R=k.reactanceArc,O=k.resistanceArc,N=k.smithTransform,V=S._,H=S.mod,F=S.deg2rad,U=S.rad2deg;function W(st,tt,dt){this.isSmith=dt||!1,this.id=tt,this.gd=st,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var rt=st._fullLayout,at="clip"+rt._uid+tt;this.clipIds.forTraces=at+"-for-traces",this.clipPaths.forTraces=rt._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=rt["_"+(dt?"smith":"polar")+"layer"].append("g").attr("class",tt),this.getHole=function(vt){return this.isSmith?0:vt.hole},this.getSector=function(vt){return this.isSmith?[0,360]:vt.sector},this.getRadial=function(vt){return this.isSmith?vt.realaxis:vt.radialaxis},this.getAngular=function(vt){return this.isSmith?vt.imaginaryaxis:vt.angularaxis},dt||(this.radialTickLayout=null,this.angularTickLayout=null)}var q=W.prototype;$.exports=function(st,tt,dt){return new W(st,tt,dt)},q.plot=function(st,tt){for(var dt=this,rt=tt[dt.id],at=!1,vt=0;vtge?(he=ut,de=ut*ge,Lt=(wt-de)/at.h/2,se=[Y[0],Y[1]],Tt=[ft[0]+Lt,ft[1]-Lt]):(he=wt/ge,de=wt,Lt=(ut-he)/at.w/2,se=[Y[0]+Lt,Y[1]-Lt],Tt=[ft[0],ft[1]]),dt.xLength2=he,dt.yLength2=de,dt.xDomain2=se,dt.yDomain2=Tt;var Mt=dt.xOffset2=at.l+at.w*se[0],te=dt.yOffset2=at.t+at.h*(1-Tt[1]),ve=dt.radius=he/Wt,oe=dt.innerRadius=dt.getHole(tt)*ve,Te=dt.cx=Mt-ve*Pt[0],He=dt.cy=te+ve*Pt[3],Ge=dt.cxx=Te-Mt,cr=dt.cyy=He-te,ur=vt.side,jr;ur==="counterclockwise"?(jr=ur,ur="top"):ur==="clockwise"&&(jr=ur,ur="bottom"),dt.radialAxis=dt.mockAxis(st,tt,vt,{_id:"x",side:ur,_trueSide:jr,domain:[oe/at.w,ve/at.w]}),dt.angularAxis=dt.mockAxis(st,tt,it,{side:"right",domain:[0,Math.PI],autorange:!1}),dt.doAutoRange(st,tt),dt.updateAngularAxis(st,tt),dt.updateRadialAxis(st,tt),dt.updateRadialAxisTitle(st,tt),dt.xaxis=dt.mockCartesianAxis(st,tt,{_id:"x",domain:se}),dt.yaxis=dt.mockCartesianAxis(st,tt,{_id:"y",domain:Tt});var Hr=dt.pathSubplot();dt.clipPaths.forTraces.select("path").attr("d",Hr).attr("transform",e(Ge,cr)),rt.frontplot.attr("transform",e(Mt,te)).call(a.setClipUrl,dt._hasClipOnAxisFalse?null:dt.clipIds.forTraces,dt.gd),rt.bg.attr("d",Hr).attr("transform",e(Te,He)).call(r.fill,tt.bgcolor)},q.mockAxis=function(st,tt,dt,rt){var at=S.extendFlat({},dt,rt);return s(at,tt,st),at},q.mockCartesianAxis=function(st,tt,dt){var rt=this,at=rt.isSmith,vt=dt._id,it=S.extendFlat({type:"linear"},dt);i(it,st);var Y={x:[0,2],y:[1,3]};return it.setRange=function(){var ft=rt.sectorBBox,ut=Y[vt],wt=rt.radialAxis._rl,zt=(wt[1]-wt[0])/(1-rt.getHole(tt));it.range=[ft[ut[0]]*zt,ft[ut[1]]*zt]},it.isPtWithinRange=vt==="x"&&!at?function(ft){return rt.isPtInside(ft)}:function(){return!0},it.setRange(),it.setScale(),it},q.doAutoRange=function(st,tt){var dt=this,rt=dt.gd,at=dt.radialAxis,vt=dt.getRadial(tt);f(rt,at);var it=at.range;if(vt.range=it.slice(),vt._input.range=it.slice(),at._rl=[at.r2l(it[0],null,"gregorian"),at.r2l(it[1],null,"gregorian")],at.minallowed!==void 0){var Y=at.r2l(at.minallowed);at._rl[0]>at._rl[1]?at._rl[1]=Math.max(at._rl[1],Y):at._rl[0]=Math.max(at._rl[0],Y)}if(at.maxallowed!==void 0){var ft=at.r2l(at.maxallowed);at._rl[0]90&&wt<=270&&(zt.tickangle=180);var Ht=Wt?function(ve){var oe=N(dt,w([ve.x,0]));return e(oe[0]-Y,oe[1]-ft)}:function(ve){return e(zt.l2p(ve.x)+it,0)},Jt=Wt?function(ve){return O(dt,ve.x,-1/0,1/0)}:function(ve){return dt.pathArc(zt.r2p(ve.x)+it)},ge=X(ut);if(dt.radialTickLayout!==ge&&(at["radial-axis"].selectAll(".xtick").remove(),dt.radialTickLayout=ge),Pt){zt.setScale();var he=0,de=Wt?(zt.tickvals||[]).filter(function(ve){return ve>=0}).map(function(ve){return o.tickText(zt,ve,!0,!1)}):o.calcTicks(zt),se=Wt?de:o.clipEnds(zt,de),Tt=o.getTickSigns(zt)[2];Wt&&((zt.ticks==="top"&&zt.side==="bottom"||zt.ticks==="bottom"&&zt.side==="top")&&(Tt=-Tt),zt.ticks==="top"&&zt.side==="top"&&(he=-zt.ticklen),zt.ticks==="bottom"&&zt.side==="bottom"&&(he=zt.ticklen)),o.drawTicks(rt,zt,{vals:de,layer:at["radial-axis"],path:o.makeTickPath(zt,0,Tt),transFn:Ht,crisp:!1}),o.drawGrid(rt,zt,{vals:se,layer:at["radial-grid"],path:Jt,transFn:S.noop,crisp:!1}),o.drawLabels(rt,zt,{vals:de,layer:at["radial-axis"],transFn:Ht,labelFns:o.makeLabelFns(zt,he)})}var Lt=dt.radialAxisAngle=dt.vangles?U(yt(F(ut.angle),dt.vangles)):ut.angle,Mt=e(Y,ft),te=Mt+t(-Lt);pt(at["radial-axis"],Pt&&(ut.showticklabels||ut.ticks),{transform:te}),pt(at["radial-grid"],Pt&&ut.showgrid,{transform:Wt?"":Mt}),pt(at["radial-line"].select("line"),Pt&&ut.showline,{x1:Wt?-vt:it,y1:0,x2:vt,y2:0,transform:te}).attr("stroke-width",ut.linewidth).call(r.stroke,ut.linecolor)},q.updateRadialAxisTitle=function(st,tt,dt){if(!this.isSmith){var rt=this,at=rt.gd,vt=rt.radius,it=rt.cx,Y=rt.cy,ft=rt.getRadial(tt),ut=rt.id+"title",wt=0;if(ft.title){var zt=a.bBox(rt.layers["radial-axis"].node()).height,Pt=ft.title.font.size,Wt=ft.side;wt=Wt==="top"?Pt:Wt==="counterclockwise"?-(zt+Pt*.4):zt+Pt*.8}var Ht=dt!==void 0?dt:rt.radialAxisAngle,Jt=F(Ht),ge=Math.cos(Jt),he=Math.sin(Jt),de=it+vt/2*ge+wt*he,se=Y-vt/2*he+wt*ge;rt.layers["radial-axis-title"]=T.draw(at,ut,{propContainer:ft,propName:rt.id+".radialaxis.title.text",placeholder:V(at,"Click to enter radial axis title"),attributes:{x:de,y:se,"text-anchor":"middle"},transform:{rotate:-Ht}})}},q.updateAngularAxis=function(st,tt){var dt=this,rt=dt.gd,at=dt.layers,vt=dt.radius,it=dt.innerRadius,Y=dt.cx,ft=dt.cy,ut=dt.getAngular(tt),wt=dt.angularAxis,zt=dt.isSmith;zt||(dt.fillViewInitialKey("angularaxis.rotation",ut.rotation),wt.setGeometry(),wt.setScale());var Pt=zt?function(oe){var Te=N(dt,w([0,oe.x]));return Math.atan2(Te[0]-Y,Te[1]-ft)-Math.PI/2}:function(oe){return wt.t2g(oe.x)};wt.type==="linear"&&wt.thetaunit==="radians"&&(wt.tick0=U(wt.tick0),wt.dtick=U(wt.dtick));var Wt=function(oe){return e(Y+vt*Math.cos(oe),ft-vt*Math.sin(oe))},Ht=zt?function(oe){var Te=N(dt,w([0,oe.x]));return e(Te[0],Te[1])}:function(oe){return Wt(Pt(oe))},Jt=zt?function(oe){var Te=N(dt,w([0,oe.x])),He=Math.atan2(Te[0]-Y,Te[1]-ft)-Math.PI/2;return e(Te[0],Te[1])+t(-U(He))}:function(oe){var Te=Pt(oe);return Wt(Te)+t(-U(Te))},ge=zt?function(oe){return R(dt,oe.x,0,1/0)}:function(oe){var Te=Pt(oe),He=Math.cos(Te),Ge=Math.sin(Te);return"M"+[Y+it*He,ft-it*Ge]+"L"+[Y+vt*He,ft-vt*Ge]},he=o.makeLabelFns(wt,0),de=he.labelStandoff,se={};se.xFn=function(oe){var Te=Pt(oe);return Math.cos(Te)*de},se.yFn=function(oe){var Te=Pt(oe),He=Math.sin(Te)>0?.2:1;return-Math.sin(Te)*(de+oe.fontSize*He)+Math.abs(Math.cos(Te))*(oe.fontSize*A)},se.anchorFn=function(oe){var Te=Pt(oe),He=Math.cos(Te);return Math.abs(He)<.1?"middle":He>0?"start":"end"},se.heightFn=function(oe,Te,He){var Ge=Pt(oe);return-.5*(1+Math.sin(Ge))*He};var Tt=X(ut);dt.angularTickLayout!==Tt&&(at["angular-axis"].selectAll("."+wt._id+"tick").remove(),dt.angularTickLayout=Tt);var Lt=zt?[1/0].concat(wt.tickvals||[]).map(function(oe){return o.tickText(wt,oe,!0,!1)}):o.calcTicks(wt);zt&&(Lt[0].text="∞",Lt[0].fontSize*=1.75);var Mt;if(tt.gridshape==="linear"?(Mt=Lt.map(Pt),S.angleDelta(Mt[0],Mt[1])<0&&(Mt=Mt.slice().reverse())):Mt=null,dt.vangles=Mt,wt.type==="category"&&(Lt=Lt.filter(function(oe){return S.isAngleInsideSector(Pt(oe),dt.sectorInRad)})),wt.visible){var te=wt.ticks==="inside"?-1:1,ve=(wt.linewidth||1)/2;o.drawTicks(rt,wt,{vals:Lt,layer:at["angular-axis"],path:"M"+te*ve+",0h"+te*wt.ticklen,transFn:Jt,crisp:!1}),o.drawGrid(rt,wt,{vals:Lt,layer:at["angular-grid"],path:ge,transFn:S.noop,crisp:!1}),o.drawLabels(rt,wt,{vals:Lt,layer:at["angular-axis"],repositionOnUpdate:!0,transFn:Ht,labelFns:se})}pt(at["angular-line"].select("path"),ut.showline,{d:dt.pathSubplot(),transform:e(Y,ft)}).attr("stroke-width",ut.linewidth).call(r.stroke,ut.linecolor)},q.updateFx=function(st,tt){if(!this.gd._context.staticPlot){var dt=!this.isSmith;dt&&(this.updateAngularDrag(st),this.updateRadialDrag(st,tt,0),this.updateRadialDrag(st,tt,1)),this.updateHoverAndMainDrag(st)}},q.updateHoverAndMainDrag=function(st){var tt=this,dt=tt.isSmith,rt=tt.gd,at=tt.layers,vt=st._zoomlayer,it=h.MINZOOM,Y=h.OFFEDGE,ft=tt.radius,ut=tt.innerRadius,wt=tt.cx,zt=tt.cy,Pt=tt.cxx,Wt=tt.cyy,Ht=tt.sectorInRad,Jt=tt.vangles,ge=tt.radialAxis,he=p.clampTiny,de=p.findXYatLength,se=p.findEnclosingVertexAngles,Tt=h.cornerHalfWidth,Lt=h.cornerLen/2,Mt,te,ve=x.makeDragger(at,"path","maindrag",st.dragmode===!1?"none":"crosshair");c.select(ve).attr("d",tt.pathSubplot()).attr("transform",e(wt,zt)),ve.onmousemove=function(Tr){v.hover(rt,Tr,tt.id),rt._fullLayout._lasthover=ve,rt._fullLayout._hoversubplot=tt.id},ve.onmouseout=function(Tr){rt._dragging||y.unhover(rt,Tr)};var oe={element:ve,gd:rt,subplot:tt.id,plotinfo:{id:tt.id,xaxis:tt.xaxis,yaxis:tt.yaxis},xaxes:[tt.xaxis],yaxes:[tt.yaxis]},Te,He,Ge,cr,ur,jr,Hr,br,Kr;function rn(Tr,pr){return Math.sqrt(Tr*Tr+pr*pr)}function Ce(Tr,pr){return rn(Tr-Pt,pr-Wt)}function $t(Tr,pr){return Math.atan2(Wt-pr,Tr-Pt)}function ne(Tr,pr){return[Tr*Math.cos(pr),Tr*Math.sin(-pr)]}function Ct(Tr,pr){if(Tr===0)return tt.pathSector(2*Tt);var Jr=Lt/Tr,Vn=pr-Jr,Hn=pr+Jr,Kn=Math.max(0,Math.min(Tr,ft)),Ci=Kn-Tt,ii=Kn+Tt;return"M"+ne(Ci,Vn)+"A"+[Ci,Ci]+" 0,0,0 "+ne(Ci,Hn)+"L"+ne(ii,Hn)+"A"+[ii,ii]+" 0,0,1 "+ne(ii,Vn)+"Z"}function gt(Tr,pr,Jr){if(Tr===0)return tt.pathSector(2*Tt);var Vn=ne(Tr,pr),Hn=ne(Tr,Jr),Kn=he((Vn[0]+Hn[0])/2),Ci=he((Vn[1]+Hn[1])/2),ii,qn;if(Kn&&Ci){var oa=Ci/Kn,Hi=-1/oa,We=de(Tt,oa,Kn,Ci);ii=de(Lt,Hi,We[0][0],We[0][1]),qn=de(Lt,Hi,We[1][0],We[1][1])}else{var rr,fr;Ci?(rr=Lt,fr=Tt):(rr=Tt,fr=Lt),ii=[[Kn-rr,Ci-fr],[Kn+rr,Ci-fr]],qn=[[Kn-rr,Ci+fr],[Kn+rr,Ci+fr]]}return"M"+ii.join("L")+"L"+qn.reverse().join("L")+"Z"}function St(){Ge=null,cr=null,ur=tt.pathSubplot(),jr=!1;var Tr=rt._fullLayout[tt.id];Hr=g(Tr.bgcolor).getLuminance(),br=x.makeZoombox(vt,Hr,wt,zt,ur),br.attr("fill-rule","evenodd"),Kr=x.makeCorners(vt,wt,zt),_(rt)}function Nt(Tr,pr){return pr=Math.max(Math.min(pr,ft),ut),Trit?(Tr-1&&Tr===1&&b(pr,rt,[tt.xaxis],[tt.yaxis],tt.id,oe),Jr.indexOf("event")>-1&&v.click(rt,pr,tt.id)}oe.prepFn=function(Tr,pr,Jr){var Vn=rt._fullLayout.dragmode,Hn=ve.getBoundingClientRect();rt._fullLayout._calcInverseTransform(rt);var Kn=rt._fullLayout._invTransform;Mt=rt._fullLayout._invScaleX,te=rt._fullLayout._invScaleY;var Ci=S.apply3DTransform(Kn)(pr-Hn.left,Jr-Hn.top);if(Te=Ci[0],He=Ci[1],Jt){var ii=p.findPolygonOffset(ft,Ht[0],Ht[1],Jt);Te+=Pt+ii[0],He+=Wt+ii[1]}switch(Vn){case"zoom":oe.clickFn=Ar,dt||(Jt?oe.moveFn=Ue:oe.moveFn=le,oe.doneFn=qe,St());break;case"select":case"lasso":u(Tr,pr,Jr,oe,Vn);break}},y.init(oe)},q.updateRadialDrag=function(st,tt,dt){var rt=this,at=rt.gd,vt=rt.layers,it=rt.radius,Y=rt.innerRadius,ft=rt.cx,ut=rt.cy,wt=rt.radialAxis,zt=h.radialDragBoxSize,Pt=zt/2;if(!wt.visible)return;var Wt=F(rt.radialAxisAngle),Ht=wt._rl,Jt=Ht[0],ge=Ht[1],he=Ht[dt],de=.75*(Ht[1]-Ht[0])/(1-rt.getHole(tt))/it,se,Tt,Lt;dt?(se=ft+(it+Pt)*Math.cos(Wt),Tt=ut-(it+Pt)*Math.sin(Wt),Lt="radialdrag"):(se=ft+(Y-Pt)*Math.cos(Wt),Tt=ut-(Y-Pt)*Math.sin(Wt),Lt="radialdrag-inner");var Mt=x.makeRectDragger(vt,Lt,"crosshair",-Pt,-Pt,zt,zt),te={element:Mt,gd:at};st.dragmode===!1&&(te.dragmode=!1),pt(c.select(Mt),wt.visible&&Y0!=(dt?Te>Jt:Te=90||at>90&&vt>=450?Wt=1:Y<=0&&ut<=0?Wt=0:Wt=Math.max(Y,ut),at<=180&&vt>=180||at>180&&vt>=540?wt=-1:it>=0&&ft>=0?wt=0:wt=Math.min(it,ft),at<=270&&vt>=270||at>270&&vt>=630?zt=-1:Y>=0&&ut>=0?zt=0:zt=Math.min(Y,ut),vt>=360?Pt=1:it<=0&&ft<=0?Pt=0:Pt=Math.max(it,ft),[wt,zt,Pt,Wt]}function yt(st,tt){var dt=function(at){return S.angleDist(st,at)},rt=S.findIndexOfMin(tt,dt);return tt[rt]}function pt(st,tt,dt){return tt?(st.attr("display",null),st.attr(dt)):st&&st.attr("display","none"),st}}),WE=Ft((Q,$)=>{var c=bi(),g=Ad(),P=Nh().attributes,S=bn().extendFlat,t=Yc().overrideAll,e=t({color:g.color,showline:S({},g.showline,{dflt:!0}),linecolor:g.linecolor,linewidth:g.linewidth,showgrid:S({},g.showgrid,{dflt:!0}),gridcolor:g.gridcolor,gridwidth:g.gridwidth,griddash:g.griddash},"plot","from-root"),r=t({tickmode:g.minor.tickmode,nticks:g.nticks,tick0:g.tick0,dtick:g.dtick,tickvals:g.tickvals,ticktext:g.ticktext,ticks:g.ticks,ticklen:g.ticklen,tickwidth:g.tickwidth,tickcolor:g.tickcolor,ticklabelstep:g.ticklabelstep,showticklabels:g.showticklabels,labelalias:g.labelalias,minorloglabels:g.minorloglabels,showtickprefix:g.showtickprefix,tickprefix:g.tickprefix,showticksuffix:g.showticksuffix,ticksuffix:g.ticksuffix,showexponent:g.showexponent,exponentformat:g.exponentformat,minexponent:g.minexponent,separatethousands:g.separatethousands,tickfont:g.tickfont,tickangle:g.tickangle,tickformat:g.tickformat,tickformatstops:g.tickformatstops,layer:g.layer},"plot","from-root"),a={visible:S({},g.visible,{dflt:!0}),type:S({},g.type,{values:["-","linear","log","date","category"]}),autotypenumbers:g.autotypenumbers,autorangeoptions:{minallowed:g.autorangeoptions.minallowed,maxallowed:g.autorangeoptions.maxallowed,clipmin:g.autorangeoptions.clipmin,clipmax:g.autorangeoptions.clipmax,include:g.autorangeoptions.include,editType:"plot"},autorange:S({},g.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:S({},g.minallowed,{editType:"plot"}),maxallowed:S({},g.maxallowed,{editType:"plot"}),range:S({},g.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:g.categoryorder,categoryarray:g.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:g.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:S({},g.title.text,{editType:"plot",dflt:""}),font:S({},g.title.font,{editType:"plot"}),editType:"plot"},hoverformat:g.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};S(a,e,r);var n={visible:S({},g.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:g.autotypenumbers,categoryorder:g.categoryorder,categoryarray:g.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:g.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};S(n,e,r),$.exports={domain:P({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:c.background},radialaxis:a,angularaxis:n,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}),hZ=Ft((Q,$)=>{var c=bn(),g=li(),P=pu(),S=P1(),t=ud().getSubplotData,e=mg(),r=gg(),a=n0(),n=dm(),o=jm(),i=Yy(),s=gw(),f=dv(),x=WE(),y=UE(),v=kT(),T=v.axisNames;function u(_,C,M,E){var A=M("bgcolor");E.bgColor=g.combine(A,E.paper_bgcolor);var h=M("sector");M("hole");var p=t(E.fullData,v.name,E.id),k=E.layoutOut,w;function R(zt,Pt){return M(w+"."+zt,Pt)}for(var O=0;O{var c=ud().getSubplotCalcData,g=bn().counterRegex,P=HE(),S=kT(),t=S.attr,e=S.name,r=g(e),a={};a[t]={valType:"subplotid",dflt:e,editType:"calc"};function n(i){for(var s=i._fullLayout,f=i.calcdata,x=s._subplots[e],y=0;y{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=Ta().extendFlat,t=z0(),e=tf(),r=$o(),a=e.line;$.exports={mode:e.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:e.text,texttemplate:g({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:P({editType:"plot"}),hovertext:e.hovertext,line:{color:a.color,width:a.width,dash:a.dash,backoff:a.backoff,shape:S({},a.shape,{values:["linear","spline"]}),smoothing:a.smoothing,editType:"calc"},connectgaps:e.connectgaps,marker:e.marker,cliponaxis:S({},e.cliponaxis,{dflt:!1}),textposition:e.textposition,textfont:e.textfont,fill:S({},e.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:t(),hoverinfo:S({},r.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:e.hoveron,hovertemplate:c(),hovertemplatefallback:P(),selected:e.selected,unselected:e.unselected}}),MT=Ft((Q,$)=>{var c=bn(),g=Ac(),P=s0(),S=I0(),t=xv(),e=x0(),r=O0(),a=vm().PTS_LINESONLY,n=E3();function o(s,f,x,y){function v(b,_){return c.coerce(s,f,n,b,_)}var T=i(s,f,y,v);if(!T){f.visible=!1;return}v("thetaunit"),v("mode",T{var c=bn(),g=Es();$.exports=function(P,S,t){var e={},r=t[S.subplot]._subplot,a,n;r?(a=r.radialAxis,n=r.angularAxis):(r=t[S.subplot],a=r.radialaxis,n=r.angularaxis);var o=a.c2l(P.r);e.rLabel=g.tickText(a,o,!0).text;var i=n.thetaunit==="degrees"?c.rad2deg(P.theta):P.theta;return e.thetaLabel=g.tickText(n,i,!0).text,e}}),fZ=Ft((Q,$)=>{var c=ra(),g=Da().BADNUM,P=Es(),S=F0(),t=ct(),e=Bt(),r=me().calcMarkerSize;$.exports=function(a,n){for(var o=a._fullLayout,i=n.subplot,s=o[i].radialaxis,f=o[i].angularaxis,x=s.makeCalcdata(n,"r"),y=f.makeCalcdata(n,"theta"),v=n._length,T=new Array(v),u=0;u{var c=Ya(),g=Da().BADNUM;$.exports=function(P,S,t){for(var e=S.layers.frontplot.select("g.scatterlayer"),r=S.xaxis,a=S.yaxis,n={xaxis:r,yaxis:a,plot:S.framework,layerClipId:S._hasClipOnAxisFalse?S.clipIds.forTraces:null},o=S.radialAxis,i=S.angularAxis,s=0;s{var c=Sd();function g(S,t,e,r){var a=c(S,t,e,r);if(!(!a||a[0].index===!1)){var n=a[0];if(n.index===void 0)return a;var o=S.subplot,i=n.cd[n.index],s=n.trace;if(o.isPtInside(i))return n.xLabelVal=void 0,n.yLabelVal=void 0,P(i,s,o,n),n.hovertemplate=s.hovertemplate,a}}function P(S,t,e,r){var a=e.radialAxis,n=e.angularAxis;a._hovertitle="r",n._hovertitle="θ";var o={};o[t.subplot]={_subplot:e};var i=t._module.formatLabels(S,t,o);r.rLabel=i.rLabel,r.thetaLabel=i.thetaLabel;var s=S.hi||t.hoverinfo,f=[];function x(v,T){f.push(v._hovertitle+": "+T)}if(!t.hovertemplate){var y=s.split("+");y.indexOf("all")!==-1&&(y=["r","theta","text"]),y.indexOf("r")!==-1&&x(a,r.rLabel),y.indexOf("theta")!==-1&&x(n,r.thetaLabel),y.indexOf("text")!==-1&&r.text&&(f.push(r.text),delete r.text),r.extraText=f.join("
")}}$.exports={hoverPoints:g,makeHoverPointText:P}}),pZ=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:AT(),categories:["polar","symbols","showLegend","scatter-like"],attributes:E3(),supplyDefaults:MT().supplyDefaults,colorbar:xo(),formatLabels:ST(),calc:fZ(),plot:dZ(),style:xl().style,styleOnSelect:xl().styleOnSelect,hoverPoints:ET().hoverPoints,selectPoints:Bf(),meta:{}}}),mZ=Ft((Q,$)=>{$.exports=pZ()}),qE=Ft((Q,$)=>{var c=E3(),{cliponaxis:g,hoveron:P}=c,S=Wr(c,["cliponaxis","hoveron"]),{connectgaps:t,line:{color:e,dash:r,width:a},fill:n,fillcolor:o,marker:i,textfont:s,textposition:f}=x3();$.exports=zr(Fr({},S),{connectgaps:t,fill:n,fillcolor:o,line:{color:e,dash:r,editType:"calc",width:a},marker:i,textfont:s,textposition:f})}),gZ=Ft((Q,$)=>{var c=bn(),g=Ac(),P=MT().handleRThetaDefaults,S=s0(),t=I0(),e=x0(),r=O0(),a=vm().PTS_LINESONLY,n=qE();$.exports=function(o,i,s,f){function x(v,T){return c.coerce(o,i,n,v,T)}var y=P(o,i,f,x);if(!y){i.visible=!1;return}x("thetaunit"),x("mode",y{var c=ST();$.exports=function(g,P,S){var t=g.i;return"r"in g||(g.r=P._r[t]),"theta"in g||(g.theta=P._theta[t]),c(g,P,S)}}),yZ=Ft((Q,$)=>{var c=F0(),g=me().calcMarkerSize,P=gx(),S=Es(),t=H1().TOO_MANY_POINTS;$.exports=function(e,r){var a=e._fullLayout,n=r.subplot,o=a[n].radialaxis,i=a[n].angularaxis,s=r._r=o.makeCalcdata(r,"r"),f=r._theta=i.makeCalcdata(r,"theta"),x=r._length,y={};x{var c=rT(),g=ET().makeHoverPointText;function P(S,t,e,r){var a=S.cd,n=a[0].t,o=n.r,i=n.theta,s=c.hoverPoints(S,t,e,r);if(!(!s||s[0].index===!1)){var f=s[0];if(f.index===void 0)return s;var x=S.subplot,y=f.cd[f.index],v=f.trace;if(y.r=o[f.index],y.theta=i[f.index],!!x.isPtInside(y))return f.xLabelVal=void 0,f.yLabelVal=void 0,g(y,v,x,f),s}}$.exports={hoverPoints:P}}),_Z=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:AT(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:qE(),supplyDefaults:gZ(),colorbar:xo(),formatLabels:vZ(),calc:yZ(),hoverPoints:xZ().hoverPoints,selectPoints:MS(),meta:{}}}),bZ=Ft((Q,$)=>{var c=iT(),g=ra(),P=KS(),S=TS(),t=gx(),e=bn(),r=H1().TOO_MANY_POINTS,a={};$.exports=function(n,o,i){if(i.length){var s=o.radialAxis,f=o.angularAxis,x=S(n,o);return i.forEach(function(y){if(!(!y||!y[0]||!y[0].trace)){var v=y[0],T=v.trace,u=v.t,b=T._length,_=u.r,C=u.theta,M=u.opts,E,A=_.slice(),h=C.slice();for(E=0;E<_.length;E++)o.isPtInside({r:_[E],theta:C[E]})||(A[E]=NaN,h[E]=NaN);var p=new Array(b*2),k=Array(b),w=Array(b);for(E=0;E=r&&(M.marker.cluster=u.tree),M.marker&&(M.markerSel.positions=M.markerUnsel.positions=M.marker.positions=p),M.line&&p.length>1&&e.extendFlat(M.line,t.linePositions(n,T,p)),M.text&&(e.extendFlat(M.text,{positions:p},t.textPosition(n,T,M.text,M.marker)),e.extendFlat(M.textSel,{positions:p},t.textPosition(n,T,M.text,M.markerSel)),e.extendFlat(M.textUnsel,{positions:p},t.textPosition(n,T,M.text,M.markerUnsel))),M.fill&&!x.fill2d&&(x.fill2d=!0),M.marker&&!x.scatter2d&&(x.scatter2d=!0),M.line&&!x.line2d&&(x.line2d=!0),M.text&&!x.glText&&(x.glText=!0),x.lineOptions.push(M.line),x.fillOptions.push(M.fill),x.markerOptions.push(M.marker),x.markerSelectedOptions.push(M.markerSel),x.markerUnselectedOptions.push(M.markerUnsel),x.textOptions.push(M.text),x.textSelectedOptions.push(M.textSel),x.textUnselectedOptions.push(M.textUnsel),x.selectBatch.push([]),x.unselectBatch.push([]),u.x=k,u.y=w,u.rawx=k,u.rawy=w,u.r=_,u.theta=C,u.positions=p,u._scene=x,u.index=x.count,x.count++}}),P(n,o,i)}},$.exports.reglPrecompiled=a}),wZ=Ft((Q,$)=>{var c=_Z();c.plot=bZ(),$.exports=c}),kZ=Ft((Q,$)=>{$.exports=wZ()}),ZE=Ft((Q,$)=>{var{hovertemplateAttrs:c,templatefallbackAttrs:g}=$u(),P=Ta().extendFlat,S=E3(),t=Sg();$.exports={r:S.r,theta:S.theta,r0:S.r0,dr:S.dr,theta0:S.theta0,dtheta:S.dtheta,thetaunit:S.thetaunit,base:P({},t.base,{}),offset:P({},t.offset,{}),width:P({},t.width,{}),text:P({},t.text,{}),hovertext:P({},t.hovertext,{}),marker:e(),hoverinfo:S.hoverinfo,hovertemplate:c(),hovertemplatefallback:g(),selected:t.selected,unselected:t.unselected};function e(){var r=P({},t.marker);return delete r.cornerradius,r}}),$E=Ft((Q,$)=>{$.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}),TZ=Ft((Q,$)=>{var c=bn(),g=MT().handleRThetaDefaults,P=L6(),S=ZE();$.exports=function(t,e,r,a){function n(i,s){return c.coerce(t,e,S,i,s)}var o=g(t,e,a,n);if(!o){e.visible=!1;return}n("thetaunit"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),P(t,e,n,r,a),c.coerceSelectionMarkerOpacity(e,n)}}),AZ=Ft((Q,$)=>{var c=bn(),g=$E();$.exports=function(P,S,t){var e={},r;function a(i,s){return c.coerce(P[r]||{},S[r],g,i,s)}for(var n=0;n{var c=Hd().hasColorscale,g=Jd(),P=bn().isArrayOrTypedArray,S=Rw(),t=Pr().setGroupPositions,e=Bt(),r=Xo().traceIs,a=bn().extendFlat;function n(i,s){for(var f=i._fullLayout,x=s.subplot,y=f[x].radialaxis,v=f[x].angularaxis,T=y.makeCalcdata(s,"r"),u=v.makeCalcdata(s,"theta"),b=s._length,_=new Array(b),C=T,M=u,E=0;E{var c=un(),g=ra(),P=bn(),S=js(),t=TT();$.exports=function(r,a,n){var o=r._context.staticPlot,i=a.xaxis,s=a.yaxis,f=a.radialAxis,x=a.angularAxis,y=e(a),v=a.layers.frontplot.select("g.barlayer");P.makeTraceGroups(v,n,"trace bars").each(function(){var T=c.select(this),u=P.ensureSingle(T,"g","points"),b=u.selectAll("g.point").data(P.identity);b.enter().append("g").style("vector-effect",o?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),b.exit().remove(),b.each(function(_){var C=c.select(this),M=_.rp0=f.c2p(_.s0),E=_.rp1=f.c2p(_.s1),A=_.thetag0=x.c2g(_.p0),h=_.thetag1=x.c2g(_.p1),p;if(!g(M)||!g(E)||!g(A)||!g(h)||M===E||A===h)p="M0,0Z";else{var k=f.c2g(_.s1),w=(A+h)/2;_.ct=[i.c2p(k*Math.cos(w)),s.c2p(k*Math.sin(w))],p=y(M,E,A,h)}P.ensureSingle(C,"path").attr("d",p)}),S.setClipUrl(T,a._hasClipOnAxisFalse?a.clipIds.forTraces:null,r)})};function e(r){var a=r.cxx,n=r.cyy;return r.vangles?function(o,i,s,f){var x,y;P.angleDelta(s,f)>0?(x=s,y=f):(x=f,y=s);var v=t.findEnclosingVertexAngles(x,r.vangles)[0],T=t.findEnclosingVertexAngles(y,r.vangles)[1],u=[v,(x+y)/2,T];return t.pathPolygonAnnulus(o,i,x,y,u,a,n)}:function(o,i,s,f){return P.pathAnnulus(o,i,s,f,a,n)}}}),SZ=Ft((Q,$)=>{var c=Qh(),g=bn(),P=Y_().getTraceColor,S=g.fillText,t=ET().makeHoverPointText,e=TT().isPtInsidePolygon;$.exports=function(r,a,n){var o=r.cd,i=o[0].trace,s=r.subplot,f=s.radialAxis,x=s.angularAxis,y=s.vangles,v=y?e:g.isPtInsideSector,T=r.maxHoverDistance,u=x._period||2*Math.PI,b=Math.abs(f.g2p(Math.sqrt(a*a+n*n))),_=Math.atan2(n,a);f.range[0]>f.range[1]&&(_+=Math.PI);var C=function(h){return v(b,_,[h.rp0,h.rp1],[h.thetag0,h.thetag1],y)?T+Math.min(1,Math.abs(h.thetag1-h.thetag0)/u)-1+(h.rp1-b)/(h.rp1-h.rp0)-1:1/0};if(c.getClosest(o,C,r),r.index!==!1){var M=r.index,E=o[M];r.x0=r.x1=E.ct[0],r.y0=r.y1=E.ct[1];var A=g.extendFlat({},E,{r:E.s,theta:E.p});return S(E,i,r),t(A,i,s,r),r.hovertemplate=i.hovertemplate,r.color=P(i,E),r.xLabelVal=r.yLabelVal=void 0,E.s<0&&(r.idealAlign="left"),[r]}}}),EZ=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"barpolar",basePlotModule:AT(),categories:["polar","bar","showLegend"],attributes:ZE(),layoutAttributes:$E(),supplyDefaults:TZ(),supplyLayoutDefaults:AZ(),calc:GE().calc,crossTraceCalc:GE().crossTraceCalc,plot:MZ(),colorbar:xo(),formatLabels:ST(),style:xm().style,styleOnSelect:xm().styleOnSelect,hoverPoints:SZ(),selectPoints:K_(),meta:{}}}),CZ=Ft((Q,$)=>{$.exports=EZ()}),YE=Ft((Q,$)=>{$.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}),KE=Ft((Q,$)=>{var c=bi(),g=Ad(),P=Nh().attributes,S=bn().extendFlat,t=Yc().overrideAll,e=t({color:g.color,showline:S({},g.showline,{dflt:!0}),linecolor:g.linecolor,linewidth:g.linewidth,showgrid:S({},g.showgrid,{dflt:!0}),gridcolor:g.gridcolor,gridwidth:g.gridwidth,griddash:g.griddash},"plot","from-root"),r=t({ticklen:g.ticklen,tickwidth:S({},g.tickwidth,{dflt:2}),tickcolor:g.tickcolor,showticklabels:g.showticklabels,labelalias:g.labelalias,showtickprefix:g.showtickprefix,tickprefix:g.tickprefix,showticksuffix:g.showticksuffix,ticksuffix:g.ticksuffix,tickfont:g.tickfont,tickformat:g.tickformat,hoverformat:g.hoverformat,layer:g.layer},"plot","from-root"),a=S({visible:S({},g.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:S({},g.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},e,r),n=S({visible:S({},g.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:g.ticks,editType:"calc"},e,r);$.exports={domain:P({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:c.background},realaxis:a,imaginaryaxis:n,editType:"calc"}}),LZ=Ft((Q,$)=>{var c=bn(),g=li(),P=pu(),S=P1(),t=ud().getSubplotData,e=dm(),r=n0(),a=Yy(),n=i0(),o=KE(),i=YE(),s=i.axisNames,f=y(function(v){return c.isTypedArray(v)&&(v=Array.from(v)),v.slice().reverse().map(function(T){return-T}).concat([0]).concat(v)},String);function x(v,T,u,b){var _=u("bgcolor");b.bgColor=g.combine(_,b.paper_bgcolor);var C=t(b.fullData,i.name,b.id),M=b.layoutOut,E;function A(q,X){return u(E+"."+q,X)}for(var h=0;h{var c=ud().getSubplotCalcData,g=bn().counterRegex,P=HE(),S=YE(),t=S.attr,e=S.name,r=g(e),a={};a[t]={valType:"subplotid",dflt:e,editType:"calc"};function n(i){for(var s=i._fullLayout,f=i.calcdata,x=s._subplots[e],y=0;y{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=Ta().extendFlat,t=z0(),e=tf(),r=$o(),a=e.line;$.exports={mode:e.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:e.text,texttemplate:g({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:P({editType:"plot"}),hovertext:e.hovertext,line:{color:a.color,width:a.width,dash:a.dash,backoff:a.backoff,shape:S({},a.shape,{values:["linear","spline"]}),smoothing:a.smoothing,editType:"calc"},connectgaps:e.connectgaps,marker:e.marker,cliponaxis:S({},e.cliponaxis,{dflt:!1}),textposition:e.textposition,textfont:e.textfont,fill:S({},e.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:t(),hoverinfo:S({},r.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:e.hoveron,hovertemplate:c(),hovertemplatefallback:P(),selected:e.selected,unselected:e.unselected}}),zZ=Ft((Q,$)=>{var c=bn(),g=Ac(),P=s0(),S=I0(),t=xv(),e=x0(),r=O0(),a=vm().PTS_LINESONLY,n=XE();$.exports=function(i,s,f,x){function y(u,b){return c.coerce(i,s,n,u,b)}var v=o(i,s,x,y);if(!v){s.visible=!1;return}y("mode",v{var c=Es();$.exports=function(g,P,S){var t={},e=S[P.subplot]._subplot;return t.realLabel=c.tickText(e.radialAxis,g.real,!0).text,t.imagLabel=c.tickText(e.angularAxis,g.imag,!0).text,t}}),OZ=Ft((Q,$)=>{var c=ra(),g=Da().BADNUM,P=F0(),S=ct(),t=Bt(),e=me().calcMarkerSize;$.exports=function(r,a){for(var n=r._fullLayout,o=a.subplot,i=n[o].realaxis,s=n[o].imaginaryaxis,f=i.makeCalcdata(a,"real"),x=s.makeCalcdata(a,"imag"),y=a._length,v=new Array(y),T=0;T{var c=Ya(),g=Da().BADNUM,P=VE(),S=P.smith;$.exports=function(t,e,r){for(var a=e.layers.frontplot.select("g.scatterlayer"),n=e.xaxis,o=e.yaxis,i={xaxis:n,yaxis:o,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},s=0;s{var c=Sd();function g(S,t,e,r){var a=c(S,t,e,r);if(!(!a||a[0].index===!1)){var n=a[0];if(n.index===void 0)return a;var o=S.subplot,i=n.cd[n.index],s=n.trace;if(o.isPtInside(i))return n.xLabelVal=void 0,n.yLabelVal=void 0,P(i,s,o,n),n.hovertemplate=s.hovertemplate,a}}function P(S,t,e,r){var a=e.radialAxis,n=e.angularAxis;a._hovertitle="real",n._hovertitle="imag";var o={};o[t.subplot]={_subplot:e};var i=t._module.formatLabels(S,t,o);r.realLabel=i.realLabel,r.imagLabel=i.imagLabel;var s=S.hi||t.hoverinfo,f=[];function x(v,T){f.push(v._hovertitle+": "+T)}if(!t.hovertemplate){var y=s.split("+");y.indexOf("all")!==-1&&(y=["real","imag","text"]),y.indexOf("real")!==-1&&x(a,r.realLabel),y.indexOf("imag")!==-1&&x(n,r.imagLabel),y.indexOf("text")!==-1&&r.text&&(f.push(r.text),delete r.text),r.extraText=f.join("
")}}$.exports={hoverPoints:g,makeHoverPointText:P}}),RZ=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"scattersmith",basePlotModule:PZ(),categories:["smith","symbols","showLegend","scatter-like"],attributes:XE(),supplyDefaults:zZ(),colorbar:xo(),formatLabels:IZ(),calc:OZ(),plot:DZ(),style:xl().style,styleOnSelect:xl().styleOnSelect,hoverPoints:FZ().hoverPoints,selectPoints:Bf(),meta:{}}}),BZ=Ft((Q,$)=>{$.exports=RZ()}),Bp=Ft((Q,$)=>{var c=Ed();function g(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}c(g.prototype,{instance:function(a,n){a=(a||"gregorian").toLowerCase(),n=n||"";var o=this._localCals[a+"-"+n];if(!o&&this.calendars[a]&&(o=new this.calendars[a](n),this._localCals[a+"-"+n]=o),!o)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,a);return o},newDate:function(a,n,o,i,s){return i=(a!=null&&a.year?a.calendar():typeof i=="string"?this.instance(i,s):i)||this.instance(),i.newDate(a,n,o)},substituteDigits:function(a){return function(n){return(n+"").replace(/[0-9]/g,function(o){return a[o]})}},substituteChineseDigits:function(a,n){return function(o){for(var i="",s=0;o>0;){var f=o%10;i=(f===0?"":a[f]+n[s])+i,s++,o=Math.floor(o/10)}return i.indexOf(a[1]+n[1])===0&&(i=i.substr(1)),i||a[0]}}});function P(a,n,o,i){if(this._calendar=a,this._year=n,this._month=o,this._day=i,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function S(a,n){return a=""+a,"000000".substring(0,n-a.length)+a}c(P.prototype,{newDate:function(a,n,o){return this._calendar.newDate(a??this,n,o)},year:function(a){return arguments.length===0?this._year:this.set(a,"y")},month:function(a){return arguments.length===0?this._month:this.set(a,"m")},day:function(a){return arguments.length===0?this._day:this.set(a,"d")},date:function(a,n,o){if(!this._calendar.isValid(a,n,o))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=a,this._month=n,this._day=o,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(a,n){return this._calendar.add(this,a,n)},set:function(a,n){return this._calendar.set(this,a,n)},compareTo:function(a){if(this._calendar.name!==a._calendar.name)throw(r.local.differentCalendars||r.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,a._calendar.local.name);var n=this._year!==a._year?this._year-a._year:this._month!==a._month?this.monthOfYear()-a.monthOfYear():this._day-a._day;return n===0?0:n<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(a){return this._calendar.fromJD(a)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(a){return this._calendar.fromJSDate(a)},toString:function(){return(this.year()<0?"-":"")+S(Math.abs(this.year()),4)+"-"+S(this.month(),2)+"-"+S(this.day(),2)}});function t(){this.shortYearCutoff="+10"}c(t.prototype,{_validateLevel:0,newDate:function(a,n,o){return a==null?this.today():(a.year&&(this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate),o=a.day(),n=a.month(),a=a.year()),new P(this,a,n,o))},today:function(){return this.fromJSDate(new Date)},epoch:function(a){var n=this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return n.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(a){var n=this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return(n.year()<0?"-":"")+S(Math.abs(n.year()),4)},monthsInYear:function(a){return this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),12},monthOfYear:function(a,n){var o=this._validate(a,n,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth);return(o.month()+this.monthsInYear(o)-this.firstMonth)%this.monthsInYear(o)+this.minMonth},fromMonthOfYear:function(a,n){var o=(n+this.firstMonth-2*this.minMonth)%this.monthsInYear(a)+this.minMonth;return this._validate(a,o,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth),o},daysInYear:function(a){var n=this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return this.leapYear(n)?366:365},dayOfYear:function(a,n,o){var i=this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(a,n,o){var i=this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(a,n,o){return this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate),{}},add:function(a,n,o){return this._validate(a,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate),this._correctAdd(a,this._add(a,n,o),n,o)},_add:function(a,n,o){if(this._validateLevel++,o==="d"||o==="w"){var i=a.toJD()+n*(o==="w"?this.daysInWeek():1),s=a.calendar().fromJD(i);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var f=a.year()+(o==="y"?n:0),x=a.monthOfYear()+(o==="m"?n:0),s=a.day(),y=function(u){for(;xb-1+u.minMonth;)f++,x-=b,b=u.monthsInYear(f)};o==="y"?(a.month()!==this.fromMonthOfYear(f,x)&&(x=this.newDate(f,a.month(),this.minDay).monthOfYear()),x=Math.min(x,this.monthsInYear(f)),s=Math.min(s,this.daysInMonth(f,this.fromMonthOfYear(f,x)))):o==="m"&&(y(this),s=Math.min(s,this.daysInMonth(f,this.fromMonthOfYear(f,x))));var v=[f,this.fromMonthOfYear(f,x),s];return this._validateLevel--,v}catch(T){throw this._validateLevel--,T}},_correctAdd:function(a,n,o,i){if(!this.hasYearZero&&(i==="y"||i==="m")&&(n[0]===0||a.year()>0!=n[0]>0)){var s={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[i],f=o<0?-1:1;n=this._add(a,o*s[0]+f*s[1],s[2])}return a.date(n[0],n[1],n[2])},set:function(a,n,o){this._validate(a,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate);var i=o==="y"?n:a.year(),s=o==="m"?n:a.month(),f=o==="d"?n:a.day();return(o==="y"||o==="m")&&(f=Math.min(f,this.daysInMonth(i,s))),a.date(i,s,f)},isValid:function(a,n,o){this._validateLevel++;var i=this.hasYearZero||a!==0;if(i){var s=this.newDate(a,n,this.minDay);i=n>=this.minMonth&&n-this.minMonth=this.minDay&&o-this.minDay13.5?13:1),T=s-(v>2.5?4716:4715);return T<=0&&T--,this.newDate(T,v,y)},toJSDate:function(a,n,o){var i=this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate),s=new Date(i.year(),i.month()-1,i.day());return s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0),s.setHours(s.getHours()>12?s.getHours()+2:0),s},fromJSDate:function(a){return this.newDate(a.getFullYear(),a.getMonth()+1,a.getDate())}});var r=$.exports=new g;r.cdate=P,r.baseCalendar=t,r.calendars.gregorian=e}),NZ=Ft(()=>{var Q=Ed(),$=Bp();Q($.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),$.local=$.regionalOptions[""],Q($.cdate.prototype,{formatDate:function(c,g){return typeof c!="string"&&(g=c,c=""),this._calendar.formatDate(c||"",this,g)}}),Q($.baseCalendar.prototype,{UNIX_EPOCH:$.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:$.instance().jdEpoch,TICKS_PER_DAY:1440*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(c,g,P){if(typeof c!="string"&&(P=g,g=c,c=""),!g)return"";if(g.calendar()!==this)throw $.local.invalidFormat||$.regionalOptions[""].invalidFormat;c=c||this.local.dateFormat,P=P||{};for(var S=P.dayNamesShort||this.local.dayNamesShort,t=P.dayNames||this.local.dayNames,e=P.monthNumbers||this.local.monthNumbers,r=P.monthNamesShort||this.local.monthNamesShort,a=P.monthNames||this.local.monthNames,n=P.calculateWeek||this.local.calculateWeek,o=function(C,M){for(var E=1;_+E1},i=function(C,M,E,A){var h=""+M;if(o(C,A))for(;h.length1},b=function(R,O){var N=u(R,O),V=[2,3,N?4:2,N?4:2,10,11,20]["oyYJ@!".indexOf(R)+1],H=new RegExp("^-?\\d{1,"+V+"}"),F=g.substring(h).match(H);if(!F)throw($.local.missingNumberAt||$.regionalOptions[""].missingNumberAt).replace(/\{0\}/,h);return h+=F[0].length,parseInt(F[0],10)},_=this,C=function(){if(typeof a=="function"){u("m");var R=a.call(_,g.substring(h));return h+=R.length,R}return b("m")},M=function(R,O,N,V){for(var H=u(R,V)?N:O,F=0;F-1){f=1,x=y;for(var w=this.daysInMonth(s,f);x>w;w=this.daysInMonth(s,f))f++,x-=w}return i>-1?this.fromJD(i):this.newDate(s,f,x)},determineDate:function(c,g,P,S,t){P&&typeof P!="object"&&(t=S,S=P,P=null),typeof S!="string"&&(t=S,S="");var e=this,r=function(a){try{return e.parseDate(S,a,t)}catch{}a=a.toLowerCase();for(var n=(a.match(/^c/)&&P?P.newDate():null)||e.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,i=o.exec(a);i;)n.add(parseInt(i[1],10),i[2]||"d"),i=o.exec(a);return n};return g=g?g.newDate():null,c=c==null?g:typeof c=="string"?r(c):typeof c=="number"?isNaN(c)||c===1/0||c===-1/0?g:e.today().add(c,"d"):e.newDate(c),c}})}),jZ=Ft(()=>{var Q=Bp(),$=Ed(),c=Q.instance();function g(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}g.prototype=new Q.baseCalendar,$(g.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(i,s){if(typeof i=="string"){var f=i.match(S);return f?f[0]:""}var x=this._validateYear(i),y=i.month(),v=""+this.toChineseMonth(x,y);return s&&v.length<2&&(v="0"+v),this.isIntercalaryMonth(x,y)&&(v+="i"),v},monthNames:function(i){if(typeof i=="string"){var s=i.match(t);return s?s[0]:""}var f=this._validateYear(i),x=i.month(),y=this.toChineseMonth(f,x),v=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][y-1];return this.isIntercalaryMonth(f,x)&&(v="闰"+v),v},monthNamesShort:function(i){if(typeof i=="string"){var s=i.match(e);return s?s[0]:""}var f=this._validateYear(i),x=i.month(),y=this.toChineseMonth(f,x),v=["一","二","三","四","五","六","七","八","九","十","十一","十二"][y-1];return this.isIntercalaryMonth(f,x)&&(v="闰"+v),v},parseMonth:function(i,s){i=this._validateYear(i);var f=parseInt(s),x;if(isNaN(f))s[0]==="闰"&&(x=!0,s=s.substring(1)),s[s.length-1]==="月"&&(s=s.substring(0,s.length-1)),f=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(s);else{var y=s[s.length-1];x=y==="i"||y==="I"}var v=this.toMonthIndex(i,f,x);return v},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(i,s){if(i.year&&(i=i.year()),typeof i!="number"||i<1888||i>2111)throw s.replace(/\{0\}/,this.local.name);return i},toMonthIndex:function(i,s,f){var x=this.intercalaryMonth(i),y=f&&s!==x;if(y||s<1||s>12)throw Q.local.invalidMonth.replace(/\{0\}/,this.local.name);var v;return x?!f&&s<=x?v=s-1:v=s:v=s-1,v},toChineseMonth:function(i,s){i.year&&(i=i.year(),s=i.month());var f=this.intercalaryMonth(i),x=f?12:11;if(s<0||s>x)throw Q.local.invalidMonth.replace(/\{0\}/,this.local.name);var y;return f?s>13;return f},isIntercalaryMonth:function(i,s){i.year&&(i=i.year(),s=i.month());var f=this.intercalaryMonth(i);return!!f&&f===s},leapYear:function(i){return this.intercalaryMonth(i)!==0},weekOfYear:function(i,s,f){var x=this._validateYear(i,Q.local.invalidyear),y=a[x-a[0]],v=y>>9&4095,T=y>>5&15,u=y&31,b;b=c.newDate(v,T,u),b.add(4-(b.dayOfWeek()||7),"d");var _=this.toJD(i,s,f)-b.toJD();return 1+Math.floor(_/7)},monthsInYear:function(i){return this.leapYear(i)?13:12},daysInMonth:function(i,s){i.year&&(s=i.month(),i=i.year()),i=this._validateYear(i);var f=r[i-r[0]],x=f>>13,y=x?12:11;if(s>y)throw Q.local.invalidMonth.replace(/\{0\}/,this.local.name);var v=f&1<<12-s?30:29;return v},weekDay:function(i,s,f){return(this.dayOfWeek(i,s,f)||7)<6},toJD:function(i,s,f){var x=this._validate(i,v,f,Q.local.invalidDate);i=this._validateYear(x.year()),s=x.month(),f=x.day();var y=this.isIntercalaryMonth(i,s),v=this.toChineseMonth(i,s),T=o(i,v,f,y);return c.toJD(T.year,T.month,T.day)},fromJD:function(i){var s=c.fromJD(i),f=n(s.year(),s.month(),s.day()),x=this.toMonthIndex(f.year,f.month,f.isIntercalary);return this.newDate(f.year,x,f.day)},fromString:function(i){var s=i.match(P),f=this._validateYear(+s[1]),x=+s[2],y=!!s[3],v=this.toMonthIndex(f,x,y),T=+s[4];return this.newDate(f,v,T)},add:function(i,s,f){var x=i.year(),y=i.month(),v=this.isIntercalaryMonth(x,y),T=this.toChineseMonth(x,y),u=Object.getPrototypeOf(g.prototype).add.call(this,i,s,f);if(f==="y"){var b=u.year(),_=u.month(),C=this.isIntercalaryMonth(b,T),M=v&&C?this.toMonthIndex(b,T,!0):this.toMonthIndex(b,T,!1);M!==_&&u.month(M)}return u}});var P=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,S=/^\d?\d[iI]?/m,t=/^闰?十?[一二三四五六七八九]?月/m,e=/^闰?十?[一二三四五六七八九]?/m;Q.calendars.chinese=g;var r=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],a=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function n(i,s,f,x){var y,v;if(typeof i=="object")y=i,v=s||{};else{var T=typeof i=="number"&&i>=1888&&i<=2111;if(!T)throw new Error("Solar year outside range 1888-2111");var u=typeof s=="number"&&s>=1&&s<=12;if(!u)throw new Error("Solar month outside range 1 - 12");var b=typeof f=="number"&&f>=1&&f<=31;if(!b)throw new Error("Solar day outside range 1 - 31");y={year:i,month:s,day:f},v={}}var _=a[y.year-a[0]],C=y.year<<9|y.month<<5|y.day;v.year=C>=_?y.year:y.year-1,_=a[v.year-a[0]];var M=_>>9&4095,E=_>>5&15,A=_&31,h,p=new Date(M,E-1,A),k=new Date(y.year,y.month-1,y.day);h=Math.round((k-p)/(24*3600*1e3));var w=r[v.year-r[0]],R;for(R=0;R<13;R++){var O=w&1<<12-R?30:29;if(h>13;return!N||R=1888&&i<=2111;if(!u)throw new Error("Lunar year outside range 1888-2111");var b=typeof s=="number"&&s>=1&&s<=12;if(!b)throw new Error("Lunar month outside range 1 - 12");var _=typeof f=="number"&&f>=1&&f<=30;if(!_)throw new Error("Lunar day outside range 1 - 30");var C;typeof x=="object"?(C=!1,v=x):(C=!!x,v={}),T={year:i,month:s,day:f,isIntercalary:C}}var M;M=T.day-1;var E=r[T.year-r[0]],A=E>>13,h;A&&(T.month>A||T.isIntercalary)?h=T.month:h=T.month-1;for(var p=0;p>9&4095,O=w>>5&15,N=w&31,V=new Date(R,O-1,N+M);return v.year=V.getFullYear(),v.month=1+V.getMonth(),v.day=V.getDate(),v}}),UZ=Ft(()=>{var Q=Bp(),$=Ed();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(S){var P=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),S=P.year()+(P.year()<0?1:0);return S%4===3||S%4===-1},monthsInYear:function(g){return this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear||Q.regionalOptions[""].invalidYear),13},weekOfYear:function(g,P,S){var t=this.newDate(g,P,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(g,P){var S=this._validate(g,P,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===13&&this.leapYear(S.year())?1:0)},weekDay:function(g,P,S){return(this.dayOfWeek(g,P,S)||7)<6},toJD:function(g,P,S){var t=this._validate(g,P,S,Q.local.invalidDate);return g=t.year(),g<0&&g++,t.day()+(t.month()-1)*30+(g-1)*365+Math.floor(g/4)+this.jdEpoch-1},fromJD:function(g){var P=Math.floor(g)+.5-this.jdEpoch,S=Math.floor((P-Math.floor((P+366)/1461))/365)+1;S<=0&&S--,P=Math.floor(g)+.5-this.newDate(S,1,1).toJD();var t=Math.floor(P/30)+1,e=P-(t-1)*30+1;return this.newDate(S,t,e)}}),Q.calendars.coptic=c}),VZ=Ft(()=>{var Q=Bp(),$=Ed();function c(P){this.local=this.regionalOptions[P||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(P){return this._validate(P,this.minMonth,this.minDay,Q.local.invalidYear),!1},monthsInYear:function(P){return this._validate(P,this.minMonth,this.minDay,Q.local.invalidYear),13},daysInYear:function(P){return this._validate(P,this.minMonth,this.minDay,Q.local.invalidYear),400},weekOfYear:function(P,S,t){var e=this.newDate(P,S,t);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/8)+1},daysInMonth:function(P,S){var t=this._validate(P,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(P,S,t){var e=this._validate(P,S,t,Q.local.invalidDate);return(e.day()+1)%8},weekDay:function(P,S,t){var e=this.dayOfWeek(P,S,t);return e>=2&&e<=6},extraInfo:function(P,S,t){var e=this._validate(P,S,t,Q.local.invalidDate);return{century:g[Math.floor((e.year()-1)/100)+1]||""}},toJD:function(P,S,t){var e=this._validate(P,S,t,Q.local.invalidDate);return P=e.year()+(e.year()<0?1:0),S=e.month(),t=e.day(),t+(S>1?16:0)+(S>2?(S-2)*32:0)+(P-1)*400+this.jdEpoch-1},fromJD:function(P){P=Math.floor(P+.5)-Math.floor(this.jdEpoch)-1;var S=Math.floor(P/400)+1;P-=(S-1)*400,P+=P>15?16:0;var t=Math.floor(P/32)+1,e=P-(t-1)*32+1;return this.newDate(S<=0?S-1:S,t,e)}});var g={20:"Fruitbat",21:"Anchovy"};Q.calendars.discworld=c}),HZ=Ft(()=>{var Q=Bp(),$=Ed();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(S){var P=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),S=P.year()+(P.year()<0?1:0);return S%4===3||S%4===-1},monthsInYear:function(g){return this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear||Q.regionalOptions[""].invalidYear),13},weekOfYear:function(g,P,S){var t=this.newDate(g,P,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(g,P){var S=this._validate(g,P,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===13&&this.leapYear(S.year())?1:0)},weekDay:function(g,P,S){return(this.dayOfWeek(g,P,S)||7)<6},toJD:function(g,P,S){var t=this._validate(g,P,S,Q.local.invalidDate);return g=t.year(),g<0&&g++,t.day()+(t.month()-1)*30+(g-1)*365+Math.floor(g/4)+this.jdEpoch-1},fromJD:function(g){var P=Math.floor(g)+.5-this.jdEpoch,S=Math.floor((P-Math.floor((P+366)/1461))/365)+1;S<=0&&S--,P=Math.floor(g)+.5-this.newDate(S,1,1).toJD();var t=Math.floor(P/30)+1,e=P-(t-1)*30+1;return this.newDate(S,t,e)}}),Q.calendars.ethiopian=c}),WZ=Ft(()=>{var Q=Bp(),$=Ed();function c(P){this.local=this.regionalOptions[P||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(P){var S=this._validate(P,this.minMonth,this.minDay,Q.local.invalidYear);return this._leapYear(S.year())},_leapYear:function(P){return P=P<0?P+1:P,g(P*7+1,19)<7},monthsInYear:function(P){return this._validate(P,this.minMonth,this.minDay,Q.local.invalidYear),this._leapYear(P.year?P.year():P)?13:12},weekOfYear:function(P,S,t){var e=this.newDate(P,S,t);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(P){var S=this._validate(P,this.minMonth,this.minDay,Q.local.invalidYear);return P=S.year(),this.toJD(P===-1?1:P+1,7,1)-this.toJD(P,7,1)},daysInMonth:function(P,S){return P.year&&(S=P.month(),P=P.year()),this._validate(P,S,this.minDay,Q.local.invalidMonth),S===12&&this.leapYear(P)||S===8&&g(this.daysInYear(P),10)===5?30:S===9&&g(this.daysInYear(P),10)===3?29:this.daysPerMonth[S-1]},weekDay:function(P,S,t){return this.dayOfWeek(P,S,t)!==6},extraInfo:function(P,S,t){var e=this._validate(P,S,t,Q.local.invalidDate);return{yearType:(this.leapYear(e)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(e)%10-3]}},toJD:function(P,S,t){var e=this._validate(P,S,t,Q.local.invalidDate);P=e.year(),S=e.month(),t=e.day();var r=P<=0?P+1:P,a=this.jdEpoch+this._delay1(r)+this._delay2(r)+t+1;if(S<7){for(var n=7;n<=this.monthsInYear(P);n++)a+=this.daysInMonth(P,n);for(var n=1;n=this.toJD(S===-1?1:S+1,7,1);)S++;for(var t=Pthis.toJD(S,t,this.daysInMonth(S,t));)t++;var e=P-this.toJD(S,t,1)+1;return this.newDate(S,t,e)}});function g(P,S){return P-S*Math.floor(P/S)}Q.calendars.hebrew=c}),qZ=Ft(()=>{var Q=Bp(),$=Ed();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(g){var P=this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear);return(P.year()*11+14)%30<11},weekOfYear:function(g,P,S){var t=this.newDate(g,P,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(g){return this.leapYear(g)?355:354},daysInMonth:function(g,P){var S=this._validate(g,P,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===12&&this.leapYear(S.year())?1:0)},weekDay:function(g,P,S){return this.dayOfWeek(g,P,S)!==5},toJD:function(g,P,S){var t=this._validate(g,P,S,Q.local.invalidDate);return g=t.year(),P=t.month(),S=t.day(),g=g<=0?g+1:g,S+Math.ceil(29.5*(P-1))+(g-1)*354+Math.floor((3+11*g)/30)+this.jdEpoch-1},fromJD:function(g){g=Math.floor(g)+.5;var P=Math.floor((30*(g-this.jdEpoch)+10646)/10631);P=P<=0?P-1:P;var S=Math.min(12,Math.ceil((g-29-this.toJD(P,1,1))/29.5)+1),t=g-this.toJD(P,S,1)+1;return this.newDate(P,S,t)}}),Q.calendars.islamic=c}),ZZ=Ft(()=>{var Q=Bp(),$=Ed();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(S){var P=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),S=P.year()<0?P.year()+1:P.year();return S%4===0},weekOfYear:function(g,P,S){var t=this.newDate(g,P,S);return t.add(4-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(g,P){var S=this._validate(g,P,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===2&&this.leapYear(S.year())?1:0)},weekDay:function(g,P,S){return(this.dayOfWeek(g,P,S)||7)<6},toJD:function(g,P,S){var t=this._validate(g,P,S,Q.local.invalidDate);return g=t.year(),P=t.month(),S=t.day(),g<0&&g++,P<=2&&(g--,P+=12),Math.floor(365.25*(g+4716))+Math.floor(30.6001*(P+1))+S-1524.5},fromJD:function(g){var P=Math.floor(g+.5),S=P+1524,t=Math.floor((S-122.1)/365.25),e=Math.floor(365.25*t),r=Math.floor((S-e)/30.6001),a=r-Math.floor(r<14?1:13),n=t-Math.floor(a>2?4716:4715),o=S-e-Math.floor(30.6001*r);return n<=0&&n--,this.newDate(n,a,o)}}),Q.calendars.julian=c}),$Z=Ft(()=>{var Q=Bp(),$=Ed();function c(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(S){return this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),!1},formatYear:function(S){var t=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear);S=t.year();var e=Math.floor(S/400);S=S%400,S+=S<0?400:0;var r=Math.floor(S/20);return e+"."+r+"."+S%20},forYear:function(S){if(S=S.split("."),S.length<3)throw"Invalid Mayan year";for(var t=0,e=0;e19||e>0&&r<0)throw"Invalid Mayan year";t=t*20+r}return t},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),18},weekOfYear:function(S,t,e){return this._validate(S,t,e,Q.local.invalidDate),0},daysInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),360},daysInMonth:function(S,t){return this._validate(S,t,this.minDay,Q.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(S,t,e){var r=this._validate(S,t,e,Q.local.invalidDate);return r.day()},weekDay:function(S,t,e){return this._validate(S,t,e,Q.local.invalidDate),!0},extraInfo:function(S,t,e){var r=this._validate(S,t,e,Q.local.invalidDate),a=r.toJD(),n=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[n[0]-1],haabMonth:n[0],haabDay:n[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(S){S-=this.jdEpoch;var t=g(S+8+340,365);return[Math.floor(t/20)+1,g(t,20)]},_toTzolkin:function(S){return S-=this.jdEpoch,[P(S+20,20),P(S+4,13)]},toJD:function(S,t,e){var r=this._validate(S,t,e,Q.local.invalidDate);return r.day()+r.month()*20+r.year()*360+this.jdEpoch},fromJD:function(S){S=Math.floor(S)+.5-this.jdEpoch;var t=Math.floor(S/360);S=S%360,S+=S<0?360:0;var e=Math.floor(S/20),r=S%20;return this.newDate(t,e,r)}});function g(S,t){return S-t*Math.floor(S/t)}function P(S,t){return g(S-1,t)+1}Q.calendars.mayan=c}),GZ=Ft(()=>{var Q=Bp(),$=Ed();function c(P){this.local=this.regionalOptions[P||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar;var g=Q.instance("gregorian");$(c.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(P){var S=this._validate(P,this.minMonth,this.minDay,Q.local.invalidYear||Q.regionalOptions[""].invalidYear);return g.leapYear(S.year()+(S.year()<1?1:0)+1469)},weekOfYear:function(P,S,t){var e=this.newDate(P,S,t);return e.add(1-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(P,S){var t=this._validate(P,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(P,S,t){return(this.dayOfWeek(P,S,t)||7)<6},toJD:function(r,S,t){var e=this._validate(r,S,t,Q.local.invalidMonth),r=e.year();r<0&&r++;for(var a=e.day(),n=1;n=this.toJD(S+1,1,1);)S++;for(var t=P-Math.floor(this.toJD(S,1,1)+.5)+1,e=1;t>this.daysInMonth(S,e);)t-=this.daysInMonth(S,e),e++;return this.newDate(S,e,t)}}),Q.calendars.nanakshahi=c}),YZ=Ft(()=>{var Q=Bp(),$=Ed();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(g){return this.daysInYear(g)!==this.daysPerYear},weekOfYear:function(g,P,S){var t=this.newDate(g,P,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(g){var P=this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear);if(g=P.year(),typeof this.NEPALI_CALENDAR_DATA[g]>"u")return this.daysPerYear;for(var S=0,t=this.minMonth;t<=12;t++)S+=this.NEPALI_CALENDAR_DATA[g][t];return S},daysInMonth:function(g,P){return g.year&&(P=g.month(),g=g.year()),this._validate(g,P,this.minDay,Q.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[g]>"u"?this.daysPerMonth[P-1]:this.NEPALI_CALENDAR_DATA[g][P]},weekDay:function(g,P,S){return this.dayOfWeek(g,P,S)!==6},toJD:function(g,P,S){var t=this._validate(g,P,S,Q.local.invalidDate);g=t.year(),P=t.month(),S=t.day();var e=Q.instance(),r=0,a=P,n=g;this._createMissingCalendarData(g);var o=g-(a>9||a===9&&S>=this.NEPALI_CALENDAR_DATA[n][0]?56:57);for(P!==9&&(r=S,a--);a!==9;)a<=0&&(a=12,n--),r+=this.NEPALI_CALENDAR_DATA[n][a],a--;return P===9?(r+=S-this.NEPALI_CALENDAR_DATA[n][0],r<0&&(r+=e.daysInYear(o))):r+=this.NEPALI_CALENDAR_DATA[n][9]-this.NEPALI_CALENDAR_DATA[n][0],e.newDate(o,1,1).add(r,"d").toJD()},fromJD:function(g){var P=Q.instance(),S=P.fromJD(g),t=S.year(),e=S.dayOfYear(),r=t+56;this._createMissingCalendarData(r);for(var a=9,n=this.NEPALI_CALENDAR_DATA[r][0],o=this.NEPALI_CALENDAR_DATA[r][a]-n+1;e>o;)a++,a>12&&(a=1,r++),o+=this.NEPALI_CALENDAR_DATA[r][a];var i=this.NEPALI_CALENDAR_DATA[r][a]-(o-e);return this.newDate(r,a,i)},_createMissingCalendarData:function(g){var P=this.daysPerMonth.slice(0);P.unshift(17);for(var S=g-1;S"u"&&(this.NEPALI_CALENDAR_DATA[S]=P)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),Q.calendars.nepali=c}),KZ=Ft(()=>{var Q=Bp(),$=Ed();function c(P){this.local=this.regionalOptions[P||""]||this.regionalOptions[""]}function g(P){var S=P-475;P<0&&S++;var t=.242197,e=t*S,r=t*(S+1),a=e-Math.floor(e),n=r-Math.floor(r);return a>n}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chahārshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(P){var S=this._validate(P,this.minMonth,this.minDay,Q.local.invalidYear);return g(S.year())},weekOfYear:function(P,S,t){var e=this.newDate(P,S,t);return e.add(-((e.dayOfWeek()+1)%7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(P,S){var t=this._validate(P,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(P,S,t){return this.dayOfWeek(P,S,t)!==5},toJD:function(P,S,t){var e=this._validate(P,S,t,Q.local.invalidDate);P=e.year(),S=e.month(),t=e.day();var r=0;if(P>0)for(var a=1;a0?P-1:P)*365+r+this.jdEpoch-1},fromJD:function(P){P=Math.floor(P)+.5;var S=475+(P-this.toJD(475,1,1))/365.242197,t=Math.floor(S);t<=0&&t--,P>this.toJD(t,12,g(t)?30:29)&&(t++,t===0&&t++);var e=P-this.toJD(t,1,1)+1,r=e<=186?Math.ceil(e/31):Math.ceil((e-6)/30),a=P-this.toJD(t,r,1)+1;return this.newDate(t,r,a)}}),Q.calendars.persian=c,Q.calendars.jalali=c}),XZ=Ft(()=>{var Q=Bp(),$=Ed(),c=Q.instance();function g(P){this.local=this.regionalOptions[P||""]||this.regionalOptions[""]}g.prototype=new Q.baseCalendar,$(g.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(t){var S=this._validate(t,this.minMonth,this.minDay,Q.local.invalidYear),t=this._t2gYear(S.year());return c.leapYear(t)},weekOfYear:function(r,S,t){var e=this._validate(r,this.minMonth,this.minDay,Q.local.invalidYear),r=this._t2gYear(e.year());return c.weekOfYear(r,e.month(),e.day())},daysInMonth:function(P,S){var t=this._validate(P,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(P,S,t){return(this.dayOfWeek(P,S,t)||7)<6},toJD:function(r,S,t){var e=this._validate(r,S,t,Q.local.invalidDate),r=this._t2gYear(e.year());return c.toJD(r,e.month(),e.day())},fromJD:function(P){var S=c.fromJD(P),t=this._g2tYear(S.year());return this.newDate(t,S.month(),S.day())},_t2gYear:function(P){return P+this.yearsOffset+(P>=-this.yearsOffset&&P<=-1?1:0)},_g2tYear:function(P){return P-this.yearsOffset-(P>=1&&P<=this.yearsOffset?1:0)}}),Q.calendars.taiwan=g}),JZ=Ft(()=>{var Q=Bp(),$=Ed(),c=Q.instance();function g(P){this.local=this.regionalOptions[P||""]||this.regionalOptions[""]}g.prototype=new Q.baseCalendar,$(g.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var S=this._validate(t,this.minMonth,this.minDay,Q.local.invalidYear),t=this._t2gYear(S.year());return c.leapYear(t)},weekOfYear:function(r,S,t){var e=this._validate(r,this.minMonth,this.minDay,Q.local.invalidYear),r=this._t2gYear(e.year());return c.weekOfYear(r,e.month(),e.day())},daysInMonth:function(P,S){var t=this._validate(P,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(P,S,t){return(this.dayOfWeek(P,S,t)||7)<6},toJD:function(r,S,t){var e=this._validate(r,S,t,Q.local.invalidDate),r=this._t2gYear(e.year());return c.toJD(r,e.month(),e.day())},fromJD:function(P){var S=c.fromJD(P),t=this._g2tYear(S.year());return this.newDate(t,S.month(),S.day())},_t2gYear:function(P){return P-this.yearsOffset-(P>=1&&P<=this.yearsOffset?1:0)},_g2tYear:function(P){return P+this.yearsOffset+(P>=-this.yearsOffset&&P<=-1?1:0)}}),Q.calendars.thai=g}),QZ=Ft(()=>{var Q=Bp(),$=Ed();function c(P){this.local=this.regionalOptions[P||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(P){var S=this._validate(P,this.minMonth,this.minDay,Q.local.invalidYear);return this.daysInYear(S.year())===355},weekOfYear:function(P,S,t){var e=this.newDate(P,S,t);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(P){for(var S=0,t=1;t<=12;t++)S+=this.daysInMonth(P,t);return S},daysInMonth:function(P,S){for(var t=this._validate(P,S,this.minDay,Q.local.invalidMonth),e=t.toJD()-24e5+.5,r=0,a=0;ae)return g[r]-g[r-1];r++}return 30},weekDay:function(P,S,t){return this.dayOfWeek(P,S,t)!==5},toJD:function(P,S,t){var e=this._validate(P,S,t,Q.local.invalidDate),r=12*(e.year()-1)+e.month()-15292,a=e.day()+g[r-1]-1;return a+24e5-.5},fromJD:function(P){for(var S=P-24e5+.5,t=0,e=0;eS);e++)t++;var r=t+15292,a=Math.floor((r-1)/12),n=a+1,o=r-12*a,i=S-g[t-1]+1;return this.newDate(n,o,i)},isValid:function(P,S,t){var e=Q.baseCalendar.prototype.isValid.apply(this,arguments);return e&&(P=P.year!=null?P.year:P,e=P>=1276&&P<=1500),e},_validate:function(P,S,t,e){var r=Q.baseCalendar.prototype._validate.apply(this,arguments);if(r.year<1276||r.year>1500)throw e.replace(/\{0\}/,this.local.name);return r}}),Q.calendars.ummalqura=c;var g=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]}),t$=Ft((Q,$)=>{$.exports=Bp(),NZ(),jZ(),UZ(),VZ(),HZ(),WZ(),qZ(),ZZ(),$Z(),GZ(),YZ(),KZ(),XZ(),JZ(),QZ()}),e$=Ft((Q,$)=>{var c=t$(),g=bn(),P=Da(),S=P.EPOCHJD,t=P.ONEDAY,e={valType:"enumerated",values:g.sortObjectKeys(c.calendars),editType:"calc",dflt:"gregorian"},r=function(E,A,h,p){var k={};return k[h]=e,g.coerce(E,A,k,h,p)},a=function(E,A,h,p){for(var k=0;k{$.exports=e$()}),n$=Ft((Q,$)=>{var c=OF();c.register([BF(),UF(),qF(),KF(),tR(),iR(),sR(),yR(),SR(),BR(),GR(),pN(),_N(),oj(),mj(),kj(),Lj(),$j(),Xj(),Qj(),nU(),lU(),dU(),vU(),zU(),DU(),yH(),IH(),ZH(),JH(),lW(),fW(),_W(),IW(),RW(),qW(),oq(),fq(),xq(),Vq(),Kq(),eZ(),oZ(),cZ(),mZ(),kZ(),CZ(),BZ(),r$()]),$.exports=c});return n$()})();/*! + * pad-left + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT license. + *//*! + * repeat-string + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + *//*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *//*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + *//*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + *//*! Bundled license information: + +native-promise-only/lib/npo.src.js: + (*! Native Promise Only + v0.8.1 (c) Kyle Simpson + MIT License: http://getify.mit-license.org + *) + +polybooljs/index.js: + (* + * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc + * @license MIT + * @preserve Project Home: https://github.com/voidqk/polybooljs + *) + +ieee754/index.js: + (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *) + +buffer/index.js: + (*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + *) + +safe-buffer/index.js: + (*! safe-buffer. MIT License. Feross Aboukhadijeh *) + +assert/build/internal/util/comparisons.js: + (*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + *) + +object-assign/index.js: + (* + object-assign + (c) Sindre Sorhus + @license MIT + *) + +maplibre-gl/dist/maplibre-gl.js: + (** + * MapLibre GL JS + * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt + *) +*/return window.Plotly=z,z})}(J5)),J5.exports}var Odt=Idt();const l1=LO(Odt),Ddt={class:"p-6 space-y-6"},Fdt={class:"flex justify-between items-center"},Rdt={class:"flex items-center gap-3"},Bdt=["value"],Ndt={class:"grid grid-cols-1 sm:grid-cols-2 gap-4"},jdt={class:"glass-card rounded-[15px] p-6"},Udt={class:"mb-6"},Vdt={class:"relative h-48 bg-white/5 rounded-lg p-4"},Hdt={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/5 backdrop-blur-sm z-20"},Wdt={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/5 z-20"},qdt={class:"mb-6"},Zdt={class:"relative h-48 bg-white/5 rounded-lg p-4"},$dt={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/5 backdrop-blur-sm z-20"},Gdt={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/5 z-20"},Ydt={class:"glass-card rounded-[15px] p-6"},Kdt={class:"grid grid-cols-1 lg:grid-cols-3 gap-6"},Xdt={class:"lg:col-span-2"},Jdt={class:"relative h-64 bg-white/5 rounded-lg p-4"},Qdt={class:"flex flex-col items-center justify-center"},tpt={class:"relative w-48 h-48"},ept={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/5 backdrop-blur-sm rounded-full z-20"},rpt={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/5 rounded-full z-20"},npt={key:0,class:"glass-card rounded-[15px] p-8 text-center"},ipt={key:1,class:"glass-card rounded-[15px] p-8 text-center"},apt={class:"text-white/60 text-sm"},opt=Th({name:"StatisticsView",__name:"Statistics",setup(d){d2.register(Uct,Wct,Yut,Z4,Tlt,blt,klt,Cct,Rct,Sct,Nut,ect,bct,kA);const l=rw(),z=lo(null),j=lo(!1),J=lo(24),mt=[{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"}],kt=lo(null),Dt=lo(null),Gt=lo([]),re=lo(null),pe=lo([]),Ne=lo(!0),or=lo(null),_r=lo({packetRate:!0,packetType:!0,noiseFloor:!1,routePie:!0}),Fr=lo(!1),zr=lo(!1),Wr=lo(!1),An=lo(null),Ft=lo(null),kn=lo(null),ei=lo(null),jn=lo(null),ai=lo(null),Qi=lo(null),Gi=Yo(()=>{const qo=l.packetStats;return qo?{totalRx:qo.total_packets||0,totalTx:qo.transmitted_packets||0}:{totalRx:0,totalTx:0}}),un=Yo(()=>{let qo=[],fo=[];if(kt.value?.series){const Ta=kt.value.series.find(go=>go.type==="rx_count"),Ea=kt.value.series.find(go=>go.type==="tx_count");Ta?.data&&(qo=Ta.data.map(([,go])=>go)),Ea?.data&&(fo=Ea.data.map(([,go])=>go))}return{totalPackets:qo,transmittedPackets:fo,droppedPackets:[]}}),ia=async()=>{try{Ne.value=!0,or.value=null,await Promise.all([l.fetchPacketStats({hours:J.value}),l.fetchSystemStats()]),Ne.value=!1,fa()}catch(qo){or.value=qo instanceof Error?qo.message:"Failed to fetch data",Ne.value=!1}},fa=async()=>{_r.value={packetRate:!0,packetType:!0,noiseFloor:!1,routePie:!0};const qo=[Li(),yi(),ra(),Da()];try{await Promise.allSettled(qo),await Z0(),!ei.value||!jn.value?setTimeout(()=>{Va()},100):Va()}catch(fo){console.error("Error loading chart data:",fo)}},Li=async()=>{_r.value.packetRate=!0;try{const qo=await Xh.get("/metrics_graph_data",{hours:J.value,resolution:"average",metrics:"rx_count,tx_count"});qo?.success&&(kt.value=qo.data)}catch{kt.value=null}},yi=async()=>{_r.value.packetType=!0;try{const qo=await Xh.get("/packet_type_graph_data",{hours:J.value,resolution:"average",types:"all"});if(qo?.success&&qo.data){const fo=qo.data;Gt.value=fo.series||[]}}catch{Gt.value=[]}},ra=async()=>{_r.value.routePie=!0;try{const qo=await Xh.get("/route_stats",{hours:J.value});qo?.success&&qo.data&&(re.value=qo.data)}catch{re.value=null}},Da=async()=>{try{const qo=await Xh.get("/noise_floor_history",{hours:J.value});if(qo.success&&qo.data){const Ta=qo.data.history||[];Array.isArray(Ta)&&Ta.length>0&&(Dt.value={chart_data:Ta.map(Ea=>({timestamp:Ea.timestamp||Date.now()/1e3,noise_floor_dbm:Ea.noise_floor_dbm||Ea.noise_floor||-120}))},Ei())}}catch{Dt.value={chart_data:[]}}},Ni=()=>{ss(),Fr.value=!1,zr.value=!1,Wr.value=!1,ia()},Ei=()=>{if(pe.value=[],Dt.value?.chart_data&&Dt.value.chart_data.length>0){const qo=Dt.value.chart_data,fo=Math.max(1,Math.floor(qo.length/100));pe.value=qo.filter((Ta,Ea)=>Ea%fo===0).map(Ta=>({timestamp:Ta.timestamp*1e3,snr:null,rssi:null,noiseFloor:Ta.noise_floor_dbm}))}},Va=()=>{if(!j.value){j.value=!0;try{mo(),ko(),pl(),fu(),setTimeout(()=>{_r.value.packetRate&&An.value&&(_r.value.packetRate=!1),_r.value.packetType&&Ft.value&&(_r.value.packetType=!1),_r.value.routePie&&Qi.value&&(_r.value.routePie=!1),_r.value.routePie&&Qi.value&&(_r.value.routePie=!1),setTimeout(()=>{const qo=ju(An.value),fo=ju(Ft.value),Ta=ju(kn.value);qo&&qo.update("none"),fo&&fo.update("none"),Ta&&Ta.update("none")},50)},100)}catch(qo){console.error("Error creating/updating charts:",qo),ss()}finally{j.value=!1}}},ss=()=>{try{An.value&&(An.value.destroy(),An.value=null),Ft.value&&(Ft.value.destroy(),Ft.value=null),kn.value&&(kn.value.destroy(),kn.value=null),Qi.value&&l1.purge(Qi.value)}catch(qo){console.error("Error destroying charts:",qo)}},mo=()=>{if(!ei.value){_r.value.packetRate=!1;return}const qo=ei.value.getContext("2d");if(!qo){_r.value.packetRate=!1;return}let fo=[],Ta=[];if(kt.value?.series){const Ea=kt.value.series.find(Ao=>Ao.type==="rx_count"),go=kt.value.series.find(Ao=>Ao.type==="tx_count");Ea?.data&&(fo=Ea.data.map(([Ao,Ps])=>{let $o=Ao;return Ao>1e15?$o=Ao/1e3:Ao>1e12?$o=Ao:Ao>1e9?$o=Ao*1e3:$o=Date.now(),{x:$o,y:Ps}})),go?.data&&(Ta=go.data.map(([Ao,Ps])=>{let $o=Ao;return Ao>1e15?$o=Ao/1e3:Ao>1e12?$o=Ao:Ao>1e9?$o=Ao*1e3:$o=Date.now(),{x:$o,y:Ps}}))}if(fo.length===0&&Ta.length===0){Fr.value=!0,_r.value.packetRate=!1;return}Fr.value=!1,An.value&&(An.value.destroy(),An.value=null);try{const Ea=JSON.parse(JSON.stringify(fo)),go=JSON.parse(JSON.stringify(Ta)),Ao=new d2(qo,{type:"line",data:{datasets:[{label:"RX/hr",data:Ea,borderColor:"#C084FC",backgroundColor:"rgba(192, 132, 252, 0.1)",borderWidth:2,fill:!0,tension:.4},{label:"TX/hr",data:go,borderColor:"#F59E0B",backgroundColor:"rgba(245, 158, 11, 0.1)",borderWidth:2,fill:!0,tension:.4}]},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:0},plugins:{legend:{display:!1},title:{display:!1}},scales:{x:{type:"time",time:{unit:"hour",displayFormats:{hour:"HH:mm"}},grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)",maxTicksLimit:8}},y:{beginAtZero:!1,grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)",callback:function(Ps){return typeof Ps=="number"?Ps.toFixed(3):Ps},stepSize:.002},min:0,max:.012}}}});An.value=ju(Ao),_r.value.packetRate=!1,setTimeout(()=>{_r.value.packetRate&&(_r.value.packetRate=!1)},50)}catch(Ea){console.error("Error creating packet rate chart:",Ea),Fr.value=!0,_r.value.packetRate=!1}},ko=()=>{if(!jn.value){_r.value.packetType=!1;return}const qo=jn.value.getContext("2d");if(!qo){_r.value.packetType=!1;return}const fo=[],Ta=[],Ea=["#60A5FA","#34D399","#FBBF24","#A78BFA","#F87171","#06B6D4","#84CC16","#F472B6","#10B981"];if(Gt.value.length>0)Gt.value.forEach(go=>{const Ao=go.data?go.data.reduce((Ps,$o)=>Ps+$o[1],0):0;Ao>0&&(fo.push(go.name.replace(/\([^)]*\)/g,"").trim()),Ta.push(Ao))});else{zr.value=!0,_r.value.packetType=!1;return}zr.value=!1,Ft.value&&(Ft.value.destroy(),Ft.value=null);try{const go=JSON.parse(JSON.stringify(fo)),Ao=JSON.parse(JSON.stringify(Ta)),Ps=new d2(qo,{type:"bar",data:{labels:go,datasets:[{data:Ao,backgroundColor:Ea.slice(0,Ao.length),borderRadius:8,borderSkipped:!1}]},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:0},plugins:{legend:{display:!1}},scales:{x:{grid:{display:!1},ticks:{color:"rgba(255, 255, 255, 0.7)",font:{size:10}}},y:{beginAtZero:!0,grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)"}}}}});Ft.value=ju(Ps),_r.value.packetType=!1,setTimeout(()=>{_r.value.packetType&&(_r.value.packetType=!1)},50)}catch(go){console.error("Error creating packet type chart:",go),zr.value=!0,_r.value.packetType=!1}},pl=()=>{if(!ai.value)return;const qo=ai.value.getContext("2d");if(!qo)return;const fo=pe.value.map(go=>({x:go.timestamp,y:go.noiseFloor})).filter(go=>go.y!==null&&go.y!==void 0);if(kn.value)try{const go=ju(kn.value),Ao=JSON.parse(JSON.stringify(fo));go.data.datasets[0]&&(go.data.datasets[0].data=Ao),go.update("active");return}catch{kn.value.destroy(),kn.value=null}const Ta=JSON.parse(JSON.stringify(fo)),Ea=new d2(qo,{type:"line",data:{datasets:[{label:"Noise Floor (dBm)",data:Ta,borderColor:"#F59E0B",backgroundColor:"rgba(245, 158, 11, 0.1)",borderWidth:2,tension:.3,pointRadius:0,pointHoverRadius:3,fill:!1}]},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:0},interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!0,position:"top",labels:{color:"rgba(255, 255, 255, 0.8)",usePointStyle:!0,padding:20}}},scales:{x:{type:"time",time:{unit:"hour",displayFormats:{hour:"HH:mm"}},grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)",maxTicksLimit:8}},y:{type:"linear",display:!0,title:{display:!0,text:"Noise Floor (dBm)",color:"rgba(255, 255, 255, 0.8)"},grid:{color:"rgba(245, 158, 11, 0.2)"},ticks:{color:"#F59E0B",stepSize:.5,callback:function(go){return typeof go=="number"?go.toFixed(1):go}},min:-117,max:-113}}}});kn.value=ju(Ea)},fu=()=>{if(!Qi.value){_r.value.routePie=!1;return}if(!re.value||!re.value.route_totals){Wr.value=!0,_r.value.routePie=!1;return}Wr.value=!1;const qo=re.value.route_totals,fo=Object.keys(qo),Ta=Object.values(qo),Ea=["#3B82F6","#F87171","#10B981","#F59E0B","#A78BFA"];try{const go=JSON.parse(JSON.stringify(fo)),Ao=JSON.parse(JSON.stringify(Ta)),Ps=[{type:"pie",labels:go,values:Ao,marker:{colors:Ea.slice(0,Ao.length)},hovertemplate:"%{label}
Count: %{value}
Percentage: %{percent}",textinfo:"label+percent",textposition:"auto",pull:.1,hole:.3}],$o={title:{text:"",font:{color:"rgba(255, 255, 255, 0.8)"}},paper_bgcolor:"rgba(0,0,0,0)",plot_bgcolor:"rgba(0,0,0,0)",font:{color:"rgba(255, 255, 255, 0.8)",size:11},margin:{t:20,b:20,l:20,r:20},showlegend:!0,legend:{orientation:"h",x:0,y:-.2,font:{color:"rgba(255, 255, 255, 0.8)",size:10}}},gi={responsive:!0,displayModeBar:!1,staticPlot:!1};l1.newPlot(Qi.value,Ps,$o,gi),_r.value.routePie=!1,setTimeout(()=>{_r.value.routePie&&(_r.value.routePie=!1)},50)}catch(go){console.error("Error creating 3D route pie chart:",go),Wr.value=!0,_r.value.routePie=!1}};return t0(async()=>{await Z0(),ia(),z.value=window.setInterval(ia,3e4),window.addEventListener("resize",()=>{setTimeout(()=>{ju(An.value)?.resize(),ju(Ft.value)?.resize(),ju(kn.value)?.resize(),Qi.value&&l1.Plots&&l1.Plots.resize(Qi.value)},100)})}),dg(()=>{z.value&&clearInterval(z.value),An.value?.destroy(),Ft.value?.destroy(),kn.value?.destroy(),Qi.value&&l1.purge(Qi.value),window.removeEventListener("resize",()=>{})}),(qo,fo)=>(zi(),Vi("div",Ddt,[Re("div",Fdt,[fo[2]||(fo[2]=Re("h2",{class:"text-2xl font-bold text-white"},"Statistics",-1)),Re("div",Rdt,[fo[1]||(fo[1]=Re("label",{class:"text-white/70 text-sm"},"Time Range:",-1)),$p(Re("select",{"onUpdate:modelValue":fo[0]||(fo[0]=Ta=>J.value=Ta),onChange:Ni,class:"bg-white/10 border border-white/20 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-accent-purple/50 transition-colors"},[(zi(),Vi(Ou,null,sf(mt,Ta=>Re("option",{key:Ta.value,value:Ta.value,class:"bg-gray-800 text-white"},aa(Ta.label),9,Bdt)),64))],544),[[iA,J.value]])])]),Re("div",Ndt,[gu(r_,{title:"Total RX",value:Gi.value.totalRx,color:"#AAE8E8",data:un.value.totalPackets},null,8,["value","data"]),gu(r_,{title:"Total TX",value:Gi.value.totalTx,color:"#FFC246",data:un.value.transmittedPackets},null,8,["value","data"])]),Re("div",jdt,[fo[9]||(fo[9]=Re("h3",{class:"text-white text-xl font-semibold mb-4"},"Performance Metrics",-1)),Re("div",Udt,[fo[5]||(fo[5]=Ff('

Packet Rate (RX/TX PER HOUR)

RX/hr
TX/hr
',2)),Re("div",Vdt,[Re("canvas",{ref_key:"packetRateCanvasRef",ref:ei,class:"w-full h-full relative z-10"},null,512),_r.value.packetRate?(zi(),Vi("div",Hdt,fo[3]||(fo[3]=[Re("div",{class:"text-center"},[Re("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-purple-400 rounded-full mx-auto mb-2"}),Re("div",{class:"text-white/50 text-xs"},"Loading packet rate data...")],-1)]))):bs("",!0),Fr.value&&!_r.value.packetRate?(zi(),Vi("div",Wdt,fo[4]||(fo[4]=[Re("div",{class:"text-center"},[Re("div",{class:"text-red-400 text-sm mb-1"},"No Data Available"),Re("div",{class:"text-white/50 text-xs"},"Packet rate data not found")],-1)]))):bs("",!0)])]),Re("div",qdt,[fo[8]||(fo[8]=Re("p",{class:"text-white/70 text-sm uppercase tracking-wide mb-2"},"Packet Type Distribution",-1)),Re("div",Zdt,[Re("canvas",{ref_key:"packetTypeCanvasRef",ref:jn,class:"w-full h-full relative z-10"},null,512),_r.value.packetType?(zi(),Vi("div",$dt,fo[6]||(fo[6]=[Re("div",{class:"text-center"},[Re("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-blue-400 rounded-full mx-auto mb-2"}),Re("div",{class:"text-white/50 text-xs"},"Loading packet type data...")],-1)]))):bs("",!0),zr.value&&!_r.value.packetType?(zi(),Vi("div",Gdt,fo[7]||(fo[7]=[Re("div",{class:"text-center"},[Re("div",{class:"text-red-400 text-sm mb-1"},"No Data Available"),Re("div",{class:"text-white/50 text-xs"},"Packet type data not found")],-1)]))):bs("",!0)])])]),Re("div",Ydt,[fo[13]||(fo[13]=Re("h3",{class:"text-white text-xl font-semibold mb-4"},"Noise Floor Over Time",-1)),Re("div",Kdt,[Re("div",Xdt,[Re("div",Jdt,[Re("canvas",{ref_key:"signalMetricsCanvasRef",ref:ai,class:"w-full h-full"},null,512)])]),Re("div",Qdt,[fo[12]||(fo[12]=Re("p",{class:"text-white/70 text-sm uppercase tracking-wide mb-2"},"Route Distribution",-1)),Re("div",tpt,[Re("div",{ref_key:"signalPie3DRef",ref:Qi,class:"w-full h-full relative z-10"},null,512),_r.value.routePie?(zi(),Vi("div",ept,fo[10]||(fo[10]=[Re("div",{class:"text-center"},[Re("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-green-400 rounded-full mx-auto mb-2"}),Re("div",{class:"text-white/50 text-xs"},"Loading route data...")],-1)]))):bs("",!0),Wr.value&&!_r.value.routePie?(zi(),Vi("div",rpt,fo[11]||(fo[11]=[Re("div",{class:"text-center"},[Re("div",{class:"text-red-400 text-sm mb-1"},"No Data Available"),Re("div",{class:"text-white/50 text-xs"},"Route statistics not found")],-1)]))):bs("",!0)])])])]),Ne.value?(zi(),Vi("div",npt,fo[14]||(fo[14]=[Re("div",{class:"text-white/70 mb-2"},"Loading statistics...",-1),Re("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-white/70 rounded-full mx-auto"},null,-1)]))):bs("",!0),or.value?(zi(),Vi("div",ipt,[fo[15]||(fo[15]=Re("div",{class:"text-red-400 mb-2"},"Failed to load statistics",-1)),Re("p",apt,aa(or.value),1),Re("button",{onClick:ia,class:"mt-4 px-4 py-2 bg-accent-purple/20 hover:bg-accent-purple/30 text-white rounded-lg border border-accent-purple/50 transition-colors"}," Retry ")])):bs("",!0)]))}}),spt=ld(opt,[["__scopeId","data-v-9766a4d1"]]),lpt={class:"space-y-4"},upt={class:"bg-white/5 rounded-lg p-4 space-y-3"},cpt={class:"flex justify-between items-center py-2 border-b border-white/10"},hpt={class:"text-white font-mono"},fpt={class:"flex justify-between items-center py-2 border-b border-white/10"},dpt={class:"text-white font-mono"},ppt={class:"flex justify-between items-center py-2 border-b border-white/10"},mpt={class:"text-white font-mono"},gpt={class:"flex justify-between items-center py-2 border-b border-white/10"},vpt={class:"text-white font-mono"},ypt={class:"flex justify-between items-center py-2 border-b border-white/10"},xpt={class:"text-white font-mono"},_pt={class:"flex justify-between items-center py-2"},bpt={class:"text-white font-mono"},wpt=Th({__name:"RadioSettings",setup(d){const l=sv(),z=Yo(()=>l.stats?.config?.radio||{}),j=Yo(()=>{const re=z.value.frequency;return re?(re/1e6).toFixed(3)+" MHz":"Not set"}),J=Yo(()=>{const re=z.value.bandwidth;return re?(re/1e3).toFixed(1)+" kHz":"Not set"}),mt=Yo(()=>{const re=z.value.tx_power;return re!==void 0?re+" dBm":"Not set"}),kt=Yo(()=>{const re=z.value.coding_rate;return re?"4/"+re:"Not set"}),Dt=Yo(()=>{const re=z.value.preamble_length;return re?re+" symbols":"Not set"}),Gt=Yo(()=>z.value.spreading_factor??"Not set");return(re,pe)=>(zi(),Vi("div",lpt,[Re("div",upt,[Re("div",cpt,[pe[0]||(pe[0]=Re("span",{class:"text-white/70 text-sm"},"Frequency",-1)),Re("span",hpt,aa(j.value),1)]),Re("div",fpt,[pe[1]||(pe[1]=Re("span",{class:"text-white/70 text-sm"},"Spreading Factor",-1)),Re("span",dpt,aa(Gt.value),1)]),Re("div",ppt,[pe[2]||(pe[2]=Re("span",{class:"text-white/70 text-sm"},"Bandwidth",-1)),Re("span",mpt,aa(J.value),1)]),Re("div",gpt,[pe[3]||(pe[3]=Re("span",{class:"text-white/70 text-sm"},"TX Power",-1)),Re("span",vpt,aa(mt.value),1)]),Re("div",ypt,[pe[4]||(pe[4]=Re("span",{class:"text-white/70 text-sm"},"Coding Rate",-1)),Re("span",xpt,aa(kt.value),1)]),Re("div",_pt,[pe[5]||(pe[5]=Re("span",{class:"text-white/70 text-sm"},"Preamble Length",-1)),Re("span",bpt,aa(Dt.value),1)])])]))}}),kpt={class:"space-y-4"},Tpt={class:"bg-white/5 rounded-lg p-4 space-y-3"},Apt={class:"flex justify-between items-center py-2 border-b border-white/10"},Mpt={class:"text-white font-mono"},Spt={class:"flex justify-between items-center py-2 border-b border-white/10"},Ept={class:"text-white font-mono text-xs"},Cpt={class:"flex justify-between items-start py-2 border-b border-white/10"},Lpt={class:"text-white font-mono text-xs text-right break-all max-w-xs"},Ppt={class:"flex justify-between items-center py-2 border-b border-white/10"},zpt={class:"text-white font-mono"},Ipt={class:"flex justify-between items-center py-2 border-b border-white/10"},Opt={class:"text-white font-mono"},Dpt={class:"flex justify-between items-center py-2 border-b border-white/10"},Fpt={class:"text-white font-mono"},Rpt={class:"flex justify-between items-start py-2"},Bpt={class:"text-white font-mono ml-4"},Npt=Th({__name:"RepeaterSettings",setup(d){const l=sv(),z=Yo(()=>l.stats?.config||{}),j=Yo(()=>z.value.repeater||{}),J=Yo(()=>l.stats),mt=Yo(()=>z.value.node_name||"Not set"),kt=Yo(()=>J.value?.local_hash||"Not available"),Dt=Yo(()=>{const or=J.value?.public_key;return!or||or==="Not set"?"Not set":or}),Gt=Yo(()=>{const or=j.value.latitude;return or&&or!==0?or.toFixed(6):"Not set"}),re=Yo(()=>{const or=j.value.longitude;return or&&or!==0?or.toFixed(6):"Not set"}),pe=Yo(()=>{const or=j.value.mode;return or?or.charAt(0).toUpperCase()+or.slice(1):"Not set"}),Ne=Yo(()=>{const or=j.value.send_advert_interval_hours;return or===void 0?"Not set":or===0?"Disabled":or+" hour"+(or!==1?"s":"")});return(or,_r)=>(zi(),Vi("div",kpt,[Re("div",Tpt,[Re("div",Apt,[_r[0]||(_r[0]=Re("span",{class:"text-white/70 text-sm"},"Node Name",-1)),Re("span",Mpt,aa(mt.value),1)]),Re("div",Spt,[_r[1]||(_r[1]=Re("span",{class:"text-white/70 text-sm"},"Local Hash",-1)),Re("span",Ept,aa(kt.value),1)]),Re("div",Cpt,[_r[2]||(_r[2]=Re("span",{class:"text-white/70 text-sm"},"Public Key",-1)),Re("span",Lpt,aa(Dt.value),1)]),Re("div",Ppt,[_r[3]||(_r[3]=Re("span",{class:"text-white/70 text-sm"},"Latitude",-1)),Re("span",zpt,aa(Gt.value),1)]),Re("div",Ipt,[_r[4]||(_r[4]=Re("span",{class:"text-white/70 text-sm"},"Longitude",-1)),Re("span",Opt,aa(re.value),1)]),Re("div",Dpt,[_r[5]||(_r[5]=Re("span",{class:"text-white/70 text-sm"},"Mode",-1)),Re("span",Fpt,aa(pe.value),1)]),Re("div",Rpt,[_r[6]||(_r[6]=Re("div",{class:"flex flex-col"},[Re("span",{class:"text-white/70 text-sm"},"Periodic Advertisement Interval"),Re("span",{class:"text-white/50 text-xs mt-1"},"How often the repeater sends an advertisement packet (0 = disabled)")],-1)),Re("span",Bpt,aa(Ne.value),1)])])]))}}),jpt={class:"space-y-4"},Upt={class:"bg-white/5 rounded-lg p-4 space-y-3"},Vpt={class:"flex justify-between items-center py-2 border-b border-white/10"},Hpt={class:"text-white font-mono"},Wpt={class:"flex justify-between items-center py-2"},qpt={class:"text-white font-mono"},Zpt=Th({__name:"DutyCycle",setup(d){const l=sv(),z=Yo(()=>l.stats?.config?.duty_cycle||{}),j=Yo(()=>{const mt=z.value.max_airtime_percent;return typeof mt=="number"?mt.toFixed(1)+"%":mt&&typeof mt=="object"&&"parsedValue"in mt?(mt.parsedValue||0).toFixed(1)+"%":"Not set"}),J=Yo(()=>z.value.enforcement_enabled?"Enabled":"Disabled");return(mt,kt)=>(zi(),Vi("div",jpt,[Re("div",Upt,[Re("div",Vpt,[kt[0]||(kt[0]=Re("span",{class:"text-white/70 text-sm"},"Max Airtime %",-1)),Re("span",Hpt,aa(j.value),1)]),Re("div",Wpt,[kt[1]||(kt[1]=Re("span",{class:"text-white/70 text-sm"},"Enforcement",-1)),Re("span",qpt,aa(J.value),1)])])]))}}),$pt={class:"space-y-4"},Gpt={class:"bg-white/5 rounded-lg p-4 space-y-3"},Ypt={class:"flex justify-between items-start py-2 border-b border-white/10"},Kpt={class:"text-white font-mono ml-4"},Xpt={class:"flex justify-between items-start py-2"},Jpt={class:"text-white font-mono ml-4"},Qpt=Th({__name:"TransmissionDelays",setup(d){const l=sv(),z=Yo(()=>l.stats?.config?.delays||{}),j=Yo(()=>{const mt=z.value.tx_delay_factor;if(mt&&typeof mt=="object"&&mt!==null&&"parsedValue"in mt){const kt=mt.parsedValue;if(typeof kt=="number")return kt.toFixed(2)+"x"}return"Not set"}),J=Yo(()=>{const mt=z.value.direct_tx_delay_factor;return typeof mt=="number"?mt.toFixed(2)+"s":"Not set"});return(mt,kt)=>(zi(),Vi("div",$pt,[Re("div",Gpt,[Re("div",Ypt,[kt[0]||(kt[0]=Re("div",{class:"flex flex-col"},[Re("span",{class:"text-white/70 text-sm"},"Flood TX Delay Factor"),Re("span",{class:"text-white/50 text-xs mt-1"},"Multiplier for flood packet transmission delays (collision avoidance)")],-1)),Re("span",Kpt,aa(j.value),1)]),Re("div",Xpt,[kt[1]||(kt[1]=Re("div",{class:"flex flex-col"},[Re("span",{class:"text-white/70 text-sm"},"Direct TX Delay Factor"),Re("span",{class:"text-white/50 text-xs mt-1"},"Base delay for direct-routed packet transmission (seconds)")],-1)),Re("span",Jpt,aa(J.value),1)])])]))}}),WD=GA("treeState",()=>{const d=ky(new Set),l=ky({value:null}),z=Dt=>{d.add(Dt)},j=Dt=>{d.delete(Dt)};return{expandedNodes:d,selectedNodeId:l,addExpandedNode:z,removeExpandedNode:j,isNodeExpanded:Dt=>d.has(Dt),setSelectedNode:Dt=>{l.value=Dt},toggleExpanded:Dt=>{d.has(Dt)?j(Dt):z(Dt)}}}),t0t={class:"select-none"},e0t={class:"flex-shrink-0"},r0t={key:0,class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},n0t={key:1,class:"w-4 h-4 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},i0t={key:0,class:"flex items-center gap-1 ml-2"},a0t={class:"relative group"},o0t=["title"],s0t={key:0,class:"text-xs font-mono text-white/50 bg-white/5 px-1.5 py-0.5 rounded border border-white/10"},l0t={class:"flex justify-between items-start mb-4"},u0t={class:"bg-black/20 border border-white/10 rounded-md p-4 mb-4"},c0t={class:"text-sm font-mono text-white/80 break-all leading-relaxed"},h0t={class:"flex items-center gap-2 ml-auto"},f0t={key:0,class:"flex items-center gap-1"},d0t=["title"],p0t={key:1,class:"flex items-center gap-1"},m0t={key:2,class:"px-2 py-1 bg-white/10 text-white/60 text-xs rounded-full ml-1"},g0t={key:0,class:"space-y-1"},v0t=Th({__name:"TreeNode",props:{node:{},selectedNodeId:{},level:{},disabled:{type:Boolean}},emits:["select"],setup(d,{emit:l}){const z=d,j=l,J=WD(),mt=lo(!1),kt=Yo({get:()=>J.isNodeExpanded(z.node.id),set:zr=>{zr?J.addExpandedNode(z.node.id):J.removeExpandedNode(z.node.id)}}),Dt=Yo(()=>z.node.children.length>0);function Gt(zr){if(!zr)return"Never";const An=new Date().getTime()-zr.getTime(),Ft=Math.floor(An/(1e3*60)),kn=Math.floor(An/(1e3*60*60)),ei=Math.floor(An/(1e3*60*60*24)),jn=Math.floor(ei/365);return Ft<60?`${Ft}m ago`:kn<24?`${kn}h ago`:ei<365?`${ei}d ago`:`${jn}y ago`}function re(zr){return zr?zr.length<=16?zr:`${zr.slice(0,8)}...${zr.slice(-8)}`:"No key"}function pe(){if(Dt.value){const zr=!kt.value;kt.value=zr}}function Ne(){j("select",z.node.id)}function or(zr){j("select",zr)}function _r(zr){zr.stopPropagation(),mt.value=!mt.value}function Fr(zr){zr.stopPropagation(),z.node.transport_key&&window.navigator?.clipboard&&window.navigator.clipboard.writeText(z.node.transport_key)}return(zr,Wr)=>{const An=UA("TreeNode",!0);return zi(),Vi("div",t0t,[Re("div",{class:Xs(["flex items-center gap-2 py-2 px-3 rounded-lg cursor-pointer transition-all duration-200",z.disabled?"opacity-50 cursor-not-allowed":"hover:bg-white/5",zr.selectedNodeId===zr.node.id&&!z.disabled?"bg-primary/20 text-primary":"text-white/80 hover:text-white",`ml-${zr.level*4}`]),onClick:Wr[3]||(Wr[3]=Ft=>!z.disabled&&Ne())},[Re("div",{class:"flex-shrink-0 w-4 h-4 flex items-center justify-center",onClick:hg(pe,["stop"])},[Dt.value?(zi(),Vi("svg",{key:0,class:Xs(["w-3 h-3 transition-transform duration-200",kt.value?"rotate-90":"rotate-0"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Wr[4]||(Wr[4]=[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)]),2)):bs("",!0)]),Re("div",e0t,[z.node.name.startsWith("#")?(zi(),Vi("svg",r0t,Wr[5]||(Wr[5]=[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(zi(),Vi("svg",n0t,Wr[6]||(Wr[6]=[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},null,-1)])))]),Re("span",{class:Xs(["font-mono text-sm transition-colors duration-200",zr.selectedNodeId===zr.node.id?"text-primary font-medium":""])},aa(zr.node.name),3),zr.node.transport_key?(zi(),Vi("div",i0t,[Re("div",a0t,[Re("button",{onClick:_r,class:"p-1 rounded hover:bg-white/10 transition-colors",title:mt.value?"Hide full key":"Show full key"},Wr[7]||(Wr[7]=[Re("svg",{class:"w-3 h-3 text-white/60 hover:text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})],-1)]),8,o0t),mt.value?bs("",!0):(zi(),Vi("span",s0t,aa(re(zr.node.transport_key)),1)),mt.value?(zi(),Vi("div",{key:1,class:"fixed inset-0 z-[9998] flex items-center justify-center bg-black/70 backdrop-blur-md",onClick:Wr[2]||(Wr[2]=Ft=>mt.value=!1)},[Re("div",{class:"bg-black/20 border border-white/20 rounded-lg shadow-lg p-6 max-w-2xl w-full mx-4",onClick:Wr[1]||(Wr[1]=hg(()=>{},["stop"]))},[Re("div",l0t,[Wr[9]||(Wr[9]=Re("h3",{class:"text-lg font-semibold text-white"},"Transport Key",-1)),Re("button",{onClick:Wr[0]||(Wr[0]=Ft=>mt.value=!1),class:"text-white/60 hover:text-white transition-colors"},Wr[8]||(Wr[8]=[Re("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Re("div",u0t,[Re("div",c0t,aa(zr.node.transport_key),1)]),Re("div",{class:"flex justify-end"},[Re("button",{onClick:Fr,class:"px-4 py-2 bg-accent-green/20 hover:bg-accent-green/30 border border-accent-green/50 text-accent-green rounded-lg transition-colors flex items-center gap-2",title:"Copy to clipboard"},Wr[10]||(Wr[10]=[Re("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1),nc(" Copy Key ",-1)]))])])])):bs("",!0)])])):bs("",!0),Re("div",h0t,[zr.node.last_used?(zi(),Vi("div",f0t,[Wr[11]||(Wr[11]=Re("svg",{class:"w-3 h-3 text-white/40",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),Re("span",{class:"text-xs text-white/50",title:zr.node.last_used.toLocaleString()},aa(Gt(zr.node.last_used)),9,d0t)])):(zi(),Vi("div",p0t,Wr[12]||(Wr[12]=[Re("svg",{class:"w-3 h-3 text-white/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),Re("span",{class:"text-xs text-white/30 italic"},"Never",-1)]))),Re("span",{class:Xs(["px-2 py-0.5 text-xs font-medium rounded-md transition-colors",zr.node.floodPolicy==="allow"?"bg-accent-green/10 text-accent-green/90 border border-accent-green/20":"bg-accent-red/10 text-accent-red/90 border border-accent-red/20"])},aa(zr.node.floodPolicy==="allow"?"FLOOD ALLOW":"FLOOD DENY"),3),Dt.value?(zi(),Vi("span",m0t,aa(zr.node.children.length),1)):bs("",!0)])],2),gu(LI,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 max-h-0 overflow-hidden","enter-to-class":"opacity-100 max-h-screen overflow-visible","leave-active-class":"transition-all duration-300 ease-in","leave-from-class":"opacity-100 max-h-screen overflow-visible","leave-to-class":"opacity-0 max-h-0 overflow-hidden"},{default:Y2(()=>[kt.value&&zr.node.children.length>0?(zi(),Vi("div",g0t,[(zi(!0),Vi(Ou,null,sf(zr.node.children,Ft=>(zi(),hm(An,{key:Ft.id,node:Ft,"selected-node-id":zr.selectedNodeId,level:zr.level+1,disabled:z.disabled,onSelect:or},null,8,["node","selected-node-id","level","disabled"]))),128))])):bs("",!0)]),_:1})])}}}),y0t=ld(v0t,[["__scopeId","data-v-4afde13e"]]),x0t={class:"flex items-center justify-between mb-6"},_0t={class:"text-white/60 text-sm mt-1"},b0t={key:0},w0t={class:"text-primary font-mono"},k0t={key:1},T0t={for:"keyName",class:"block text-sm font-medium text-white mb-2"},A0t={class:"flex items-center gap-2"},M0t={key:0,class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},S0t={key:1,class:"w-4 h-4 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},E0t={class:"bg-white/5 border border-white/10 rounded-lg p-4"},C0t={class:"flex items-center gap-3 mb-2"},L0t={class:"flex items-center gap-2"},P0t={key:0,class:"w-5 h-5 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},z0t={key:1,class:"w-5 h-5 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},I0t={class:"text-white/70 text-sm"},O0t={class:"grid grid-cols-2 gap-3"},D0t={class:"relative cursor-pointer group"},F0t={class:"relative cursor-pointer group"},R0t={class:"flex gap-3 pt-4"},B0t=["disabled"],N0t=Th({__name:"AddKeyModal",props:{show:{type:Boolean},selectedNodeName:{},selectedNodeId:{}},emits:["close","add"],setup(d,{emit:l}){const z=d,j=l,J=lo(""),mt=lo(""),kt=lo("allow"),Dt=Yo(()=>J.value.startsWith("#")),Gt=Yo(()=>({type:Dt.value?"Region":"Private Key",description:Dt.value?"Regional organizational key":"Individual assigned key"}));um(Dt,_r=>{_r?mt.value="This will create a new region for organizing keys":mt.value="This will create a new private key entry"},{immediate:!0});const re=Yo(()=>J.value.trim().length>0),pe=()=>{re.value&&(j("add",{name:J.value.trim(),floodPolicy:kt.value,parentId:z.selectedNodeId}),J.value="",mt.value="",kt.value="allow")},Ne=()=>{J.value="",mt.value="",kt.value="allow",j("close")},or=_r=>{_r.target===_r.currentTarget&&Ne()};return(_r,Fr)=>_r.show?(zi(),Vi("div",{key:0,onClick:or,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"}},[Re("div",{class:"glass-card rounded-[20px] p-6 w-full max-w-md border border-white/10",onClick:Fr[3]||(Fr[3]=hg(()=>{},["stop"]))},[Re("div",x0t,[Re("div",null,[Fr[5]||(Fr[5]=Re("h3",{class:"text-xl font-semibold text-white"},"Add New Entry",-1)),Re("p",_0t,[z.selectedNodeName?(zi(),Vi("span",b0t,[Fr[4]||(Fr[4]=nc(" Add to: ",-1)),Re("span",w0t,aa(z.selectedNodeName),1)])):(zi(),Vi("span",k0t," Add to root level (#uk) "))])]),Re("button",{onClick:Ne,class:"text-white/60 hover:text-white transition-colors"},Fr[6]||(Fr[6]=[Re("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Re("form",{onSubmit:hg(pe,["prevent"]),class:"space-y-4"},[Re("div",null,[Re("label",T0t,[Re("div",A0t,[Dt.value?(zi(),Vi("svg",M0t,Fr[7]||(Fr[7]=[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(zi(),Vi("svg",S0t,Fr[8]||(Fr[8]=[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},null,-1)]))),Fr[9]||(Fr[9]=nc(" Region/Key Name ",-1))])]),$p(Re("input",{id:"keyName","onUpdate:modelValue":Fr[0]||(Fr[0]=zr=>J.value=zr),type:"text",placeholder:"Enter name (prefix with # for regions)",class:"w-full px-4 py-3 bg-white/5 border border-white/20 rounded-lg text-white placeholder-white/50 focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 transition-colors",autocomplete:"off"},null,512),[[$A,J.value]])]),Re("div",E0t,[Re("div",C0t,[Re("div",L0t,[Dt.value?(zi(),Vi("svg",P0t,Fr[10]||(Fr[10]=[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(zi(),Vi("svg",z0t,Fr[11]||(Fr[11]=[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1221 9z"},null,-1)]))),Re("span",{class:Xs([Dt.value?"text-secondary":"text-accent-green","font-medium"])},aa(Gt.value.type),3)]),Re("div",{class:Xs(["flex-1 h-px",Dt.value?"bg-secondary/20":"bg-accent-green/20"])},null,2)]),Re("p",I0t,aa(Gt.value.description),1)]),Re("div",null,[Fr[14]||(Fr[14]=Re("label",{class:"block text-sm font-medium text-white mb-3"},[Re("div",{class:"flex items-center gap-2"},[Re("svg",{class:"w-4 h-4 text-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})]),nc(" Flood Policy ")])],-1)),Re("div",O0t,[Re("label",D0t,[$p(Re("input",{type:"radio","onUpdate:modelValue":Fr[1]||(Fr[1]=zr=>kt.value=zr),value:"allow",class:"sr-only"},null,512),[[F2,kt.value]]),Fr[12]||(Fr[12]=Ff('
Allow

Permit flooding

',1))]),Re("label",F0t,[$p(Re("input",{type:"radio","onUpdate:modelValue":Fr[2]||(Fr[2]=zr=>kt.value=zr),value:"deny",class:"sr-only"},null,512),[[F2,kt.value]]),Fr[13]||(Fr[13]=Ff('
Deny

Block flooding

',1))])])]),Re("div",R0t,[Re("button",{type:"button",onClick:Ne,class:"flex-1 px-4 py-3 bg-white/5 hover:bg-white/10 border border-white/20 text-white rounded-lg transition-colors"}," Cancel "),Re("button",{type:"submit",disabled:!re.value,class:Xs(["flex-1 px-4 py-3 rounded-lg transition-colors font-medium",re.value?"bg-accent-green/20 hover:bg-accent-green/30 border border-accent-green/50 text-accent-green":"bg-white/5 border border-white/20 text-white/40 cursor-not-allowed"])}," Add "+aa(Gt.value.type),11,B0t)])],32)])])):bs("",!0)}}),j0t={class:"flex bg-black items-center justify-between mb-6"},U0t={class:"text-white/60 text-sm mt-1"},V0t={class:"text-primary font-mono"},H0t={for:"keyName",class:"block text-sm font-medium text-white mb-2"},W0t={class:"flex items-center gap-2"},q0t={key:0,class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Z0t={key:1,class:"w-4 h-4 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},$0t={class:"bg-white/5 border border-white/10 rounded-lg p-4"},G0t={class:"flex items-center gap-3 mb-2"},Y0t={class:"flex items-center gap-2"},K0t={key:0,class:"w-5 h-5 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},X0t={key:1,class:"w-5 h-5 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},J0t={class:"text-white/70 text-sm"},Q0t={key:0,class:"space-y-4"},tmt={key:0,class:"bg-white/5 border border-white/10 rounded-lg p-4"},emt={class:"bg-black/20 border border-white/10 rounded-md p-3"},rmt={class:"text-xs font-mono text-white/80 break-all"},nmt={key:1,class:"bg-white/5 border border-white/10 rounded-lg p-4"},imt={class:"flex items-center justify-between"},amt={class:"text-sm text-white/70"},omt={class:"text-xs text-white/50"},smt={class:"grid grid-cols-2 gap-3"},lmt={class:"relative cursor-pointer group"},umt={class:"relative cursor-pointer group"},cmt={class:"flex gap-3 pt-4"},hmt=["disabled"],fmt=Th({__name:"EditKeyModal",props:{show:{type:Boolean},node:{}},emits:["close","save","request-delete"],setup(d,{emit:l}){const z=d,j=l,J=lo(""),mt=lo("allow"),kt=Yo(()=>J.value.startsWith("#")),Dt=Yo(()=>({type:kt.value?"Region":"Private Key",description:kt.value?"Regional organizational key":"Individual assigned key"}));um(()=>z.node,zr=>{zr?(J.value=zr.name,mt.value=zr.floodPolicy):(J.value="",mt.value="allow")},{immediate:!0});const Gt=Yo(()=>J.value.trim().length>0&&z.node),re=zr=>{const An=new Date().getTime()-zr.getTime(),Ft=Math.floor(An/(1e3*60)),kn=Math.floor(An/(1e3*60*60)),ei=Math.floor(An/(1e3*60*60*24)),jn=Math.floor(ei/365);return Ft<60?`${Ft}m ago`:kn<24?`${kn}h ago`:ei<365?`${ei}d ago`:`${jn}y ago`},pe=zr=>{window.navigator?.clipboard&&window.navigator.clipboard.writeText(zr)},Ne=()=>{!Gt.value||!z.node||(j("save",{id:z.node.id,name:J.value.trim(),floodPolicy:mt.value}),_r())},or=()=>{z.node&&(j("request-delete",z.node),_r())},_r=()=>{j("close")},Fr=zr=>{zr.target===zr.currentTarget&&_r()};return(zr,Wr)=>zr.show?(zi(),Vi("div",{key:0,onClick:Fr,class:"fixed inset-0 bg-black/50 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"}},[Re("div",{class:"glass-card rounded-[20px] p-6 w-full max-w-md border border-white/10",onClick:Wr[4]||(Wr[4]=hg(()=>{},["stop"]))},[Re("div",j0t,[Re("div",null,[Wr[6]||(Wr[6]=Re("h3",{class:"text-xl font-semibold text-white"},"Edit Entry",-1)),Re("p",U0t,[Wr[5]||(Wr[5]=nc(" Modify ",-1)),Re("span",V0t,aa(zr.node?.name),1)])]),Re("button",{onClick:_r,class:"text-white/60 hover:text-white transition-colors"},Wr[7]||(Wr[7]=[Re("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Re("form",{onSubmit:hg(Ne,["prevent"]),class:"space-y-4"},[Re("div",null,[Re("label",H0t,[Re("div",W0t,[kt.value?(zi(),Vi("svg",q0t,Wr[8]||(Wr[8]=[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(zi(),Vi("svg",Z0t,Wr[9]||(Wr[9]=[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1721 9z"},null,-1)]))),Wr[10]||(Wr[10]=nc(" Region/Key Name ",-1))])]),$p(Re("input",{id:"keyName","onUpdate:modelValue":Wr[0]||(Wr[0]=An=>J.value=An),type:"text",placeholder:"Enter name (prefix with # for regions)",class:"w-full px-4 py-3 bg-white/5 border border-white/20 rounded-lg text-white placeholder-white/50 focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 transition-colors",autocomplete:"off"},null,512),[[$A,J.value]])]),Re("div",$0t,[Re("div",G0t,[Re("div",Y0t,[kt.value?(zi(),Vi("svg",K0t,Wr[11]||(Wr[11]=[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(zi(),Vi("svg",X0t,Wr[12]||(Wr[12]=[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1721 9z"},null,-1)]))),Re("span",{class:Xs([kt.value?"text-secondary":"text-accent-green","font-medium"])},aa(Dt.value.type),3)]),Re("div",{class:Xs(["flex-1 h-px",kt.value?"bg-secondary/20":"bg-accent-green/20"])},null,2)]),Re("p",J0t,aa(Dt.value.description),1)]),zr.node?(zi(),Vi("div",Q0t,[zr.node.transport_key?(zi(),Vi("div",tmt,[Wr[14]||(Wr[14]=Ff('
Transport Key
',1)),Re("div",emt,[Re("div",rmt,aa(zr.node.transport_key),1),Re("button",{onClick:Wr[1]||(Wr[1]=An=>pe(zr.node.transport_key||"")),class:"mt-2 text-xs text-accent-green hover:text-accent-green/80 flex items-center gap-1",title:"Copy to clipboard"},Wr[13]||(Wr[13]=[Re("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1),nc(" Copy Key ",-1)]))])])):bs("",!0),zr.node.last_used?(zi(),Vi("div",nmt,[Wr[15]||(Wr[15]=Re("div",{class:"flex items-center gap-2 mb-3"},[Re("svg",{class:"w-4 h-4 text-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})]),Re("span",{class:"text-sm font-medium text-white"},"Last Used")],-1)),Re("div",imt,[Re("div",amt,aa(zr.node.last_used.toLocaleDateString())+" at "+aa(zr.node.last_used.toLocaleTimeString()),1),Re("div",omt,aa(re(zr.node.last_used)),1)])])):bs("",!0)])):bs("",!0),Re("div",null,[Wr[18]||(Wr[18]=Re("label",{class:"block text-sm font-medium text-white mb-3"},[Re("div",{class:"flex items-center gap-2"},[Re("svg",{class:"w-4 h-4 text-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})]),nc(" Flood Policy ")])],-1)),Re("div",smt,[Re("label",lmt,[$p(Re("input",{type:"radio","onUpdate:modelValue":Wr[2]||(Wr[2]=An=>mt.value=An),value:"allow",class:"sr-only"},null,512),[[F2,mt.value]]),Wr[16]||(Wr[16]=Ff('
Allow

Permit flooding

',1))]),Re("label",umt,[$p(Re("input",{type:"radio","onUpdate:modelValue":Wr[3]||(Wr[3]=An=>mt.value=An),value:"deny",class:"sr-only"},null,512),[[F2,mt.value]]),Wr[17]||(Wr[17]=Ff('
Deny

Block flooding

',1))])])]),Re("div",cmt,[Re("button",{type:"button",onClick:or,class:"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"}," Delete "),Re("button",{type:"button",onClick:_r,class:"flex-1 px-4 py-3 bg-white/5 hover:bg-white/10 border border-white/20 text-white rounded-lg transition-colors"}," Cancel "),Re("button",{type:"submit",disabled:!Gt.value,class:Xs(["flex-1 px-4 py-3 rounded-lg transition-colors font-medium",Gt.value?"bg-accent-green/20 hover:bg-accent-green/30 border border-accent-green/50 text-accent-green":"bg-white/5 border border-white/20 text-white/40 cursor-not-allowed"])}," Save Changes ",10,hmt)])],32)])])):bs("",!0)}}),dmt={class:"flex items-center gap-3 mb-6"},pmt={class:"text-white/60 text-sm mt-1"},mmt={class:"text-accent-red font-mono"},gmt={key:0,class:"bg-accent-red/10 border border-accent-red/30 rounded-lg p-4 mb-6"},vmt={class:"flex items-start gap-3"},ymt={class:"flex-1"},xmt={class:"text-accent-red font-medium text-sm mb-2"},_mt={class:"space-y-1 max-h-32 overflow-y-auto"},bmt={key:0,class:"w-3 h-3 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},wmt={key:1,class:"w-3 h-3 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},kmt={class:"font-mono"},Tmt={key:0,class:"text-white/60 text-xs"},Amt={key:1,class:"mb-6"},Mmt={class:"mb-3"},Smt={class:"relative"},Emt={class:"space-y-2 max-h-40 overflow-y-auto border border-white/20 rounded-lg p-3 bg-white/5"},Cmt={key:0,class:"text-center py-4 text-white/60 text-sm"},Lmt={class:"relative"},Pmt=["value"],zmt={class:"flex items-center gap-2 flex-1"},Imt={class:"text-white font-mono text-sm"},Omt={key:0,class:"ml-auto px-2 py-0.5 bg-white/10 text-white/60 text-xs rounded-full"},Dmt={class:"flex gap-3"},Fmt=Th({__name:"DeleteConfirmModal",props:{show:{type:Boolean},node:{},allNodes:{}},emits:["close","delete-all","move-children"],setup(d,{emit:l}){const z=d,j=l,J=lo(null),mt=lo(""),kt=Fr=>{const zr=[],Wr=An=>{for(const Ft of An.children)zr.push(Ft),Wr(Ft)};return Wr(Fr),zr},Dt=Yo(()=>z.node?kt(z.node):[]),Gt=Yo(()=>{if(!z.node)return[];const Fr=new Set([z.node.id,...Dt.value.map(Wr=>Wr.id)]),zr=Wr=>{const An=[];for(const Ft of Wr)Ft.name.startsWith("#")&&!Fr.has(Ft.id)&&An.push(Ft),Ft.children.length>0&&An.push(...zr(Ft.children));return An};return zr(z.allNodes)}),re=Yo(()=>{if(!mt.value.trim())return Gt.value;const Fr=mt.value.toLowerCase();return Gt.value.filter(zr=>zr.name.toLowerCase().includes(Fr))}),pe=()=>{z.node&&(j("delete-all",z.node.id),or())},Ne=()=>{!z.node||!J.value||(j("move-children",{nodeId:z.node.id,targetParentId:J.value}),or())},or=()=>{J.value=null,mt.value="",j("close")},_r=Fr=>{Fr.target===Fr.currentTarget&&or()};return(Fr,zr)=>Fr.show&&Fr.node?(zi(),Vi("div",{key:0,onClick:_r,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"}},[Re("div",{class:"glass-card rounded-[20px] p-6 w-full max-w-lg border border-white/10",onClick:zr[2]||(zr[2]=hg(()=>{},["stop"]))},[Re("div",dmt,[zr[6]||(zr[6]=Re("svg",{class:"w-6 h-6 text-accent-red",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("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)),Re("div",null,[zr[4]||(zr[4]=Re("h3",{class:"text-xl font-semibold text-white"},"Confirm Deletion",-1)),Re("p",pmt,[zr[3]||(zr[3]=nc(" Deleting ",-1)),Re("span",mmt,aa(Fr.node?.name),1)])]),Re("button",{onClick:or,class:"ml-auto text-white/60 hover:text-white transition-colors"},zr[5]||(zr[5]=[Re("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Dt.value.length>0?(zi(),Vi("div",gmt,[Re("div",vmt,[zr[9]||(zr[9]=Re("svg",{class:"w-5 h-5 text-accent-red flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("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"})],-1)),Re("div",ymt,[Re("h4",xmt," This will affect "+aa(Dt.value.length)+" child "+aa(Dt.value.length===1?"entry":"entries")+": ",1),Re("div",_mt,[(zi(!0),Vi(Ou,null,sf(Dt.value.slice(0,10),Wr=>(zi(),Vi("div",{key:Wr.id,class:"flex items-center gap-2 text-xs text-white/80"},[Wr.name.startsWith("#")?(zi(),Vi("svg",bmt,zr[7]||(zr[7]=[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(zi(),Vi("svg",wmt,zr[8]||(zr[8]=[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1721 9z"},null,-1)]))),Re("span",kmt,aa(Wr.name),1),Re("span",{class:Xs(["px-1 py-0.5 text-xs rounded",Wr.floodPolicy==="allow"?"bg-accent-green/20 text-accent-green":"bg-accent-red/20 text-accent-red"])},aa(Wr.floodPolicy),3)]))),128)),Dt.value.length>10?(zi(),Vi("div",Tmt," ...and "+aa(Dt.value.length-10)+" more ",1)):bs("",!0)])])])])):bs("",!0),Dt.value.length>0&&Gt.value.length>0?(zi(),Vi("div",Amt,[zr[13]||(zr[13]=Re("h4",{class:"text-white font-medium text-sm mb-3"},"Move children to another region:",-1)),Re("div",Mmt,[Re("div",Smt,[zr[10]||(zr[10]=Re("svg",{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-white/40",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),$p(Re("input",{"onUpdate:modelValue":zr[0]||(zr[0]=Wr=>mt.value=Wr),type:"text",placeholder:"Search regions...",class:"w-full pl-9 pr-4 py-2 bg-white/5 border border-white/20 rounded-lg text-white placeholder-white/50 focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 transition-colors text-sm"},null,512),[[$A,mt.value]])])]),Re("div",Emt,[re.value.length===0?(zi(),Vi("div",Cmt,aa(mt.value?"No regions match your search":"No available regions"),1)):bs("",!0),(zi(!0),Vi(Ou,null,sf(re.value,Wr=>(zi(),Vi("label",{key:Wr.id,class:"flex items-center gap-3 p-2 rounded cursor-pointer hover:bg-white/10 transition-colors group"},[Re("div",Lmt,[$p(Re("input",{type:"radio",value:Wr.id,"onUpdate:modelValue":zr[1]||(zr[1]=An=>J.value=An),class:"sr-only peer"},null,8,Pmt),[[F2,J.value]]),zr[11]||(zr[11]=Re("div",{class:"w-4 h-4 border-2 border-white/30 rounded-full group-hover:border-white/50 peer-checked:border-primary peer-checked:bg-primary/20 transition-all"},[Re("div",{class:"w-2 h-2 rounded-full bg-primary scale-0 peer-checked:scale-100 transition-transform absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"})],-1))]),Re("div",zmt,[zr[12]||(zr[12]=Re("svg",{class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})],-1)),Re("span",Imt,aa(Wr.name),1),Wr.children.length>0?(zi(),Vi("span",Omt,aa(Wr.children.length),1)):bs("",!0)])]))),128))])])):bs("",!0),Re("div",Dmt,[Re("button",{onClick:or,class:"flex-1 px-4 py-3 bg-white/5 hover:bg-white/10 border border-white/20 text-white rounded-lg transition-colors"}," Cancel "),Dt.value.length>0&&J.value?(zi(),Vi("button",{key:0,onClick:Ne,class:"flex-1 px-4 py-3 bg-primary/20 hover:bg-primary/30 border border-primary/50 text-primary rounded-lg transition-colors"}," Move & Delete ")):bs("",!0),Re("button",{onClick:pe,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"},aa(Dt.value.length>0?"Delete All":"Delete"),1)])])])):bs("",!0)}}),Rmt={class:"space-y-6"},Bmt={class:"flex justify-between items-start"},Nmt={class:"flex gap-2"},jmt=["disabled"],Umt=["disabled"],Vmt=["disabled"],Hmt={class:"glass-card rounded-[15px] p-4 border border-white/10 bg-white/5"},Wmt={class:"flex items-center justify-between"},qmt={class:"flex items-center gap-3"},Zmt={class:"flex bg-white/5 rounded-lg border border-white/20 p-1"},$mt={class:"glass-card rounded-[15px] p-6 border border-white/10"},Gmt={key:0,class:"flex items-center justify-center py-8"},Ymt={key:1,class:"text-center py-8"},Kmt={class:"text-white/70 text-sm"},Xmt={key:2,class:"text-center py-8"},Jmt={key:3,class:"space-y-2"},Qmt=Th({name:"TransportKeys",__name:"TransportKeys",setup(d){const l=WD(),z=lo(!1),j=lo(!1),J=lo(!1),mt=lo(null),kt=lo(null),Dt=lo("deny"),Gt=lo([]),re=lo(!1),pe=lo(null),Ne=Li=>{const yi=new Map,ra=[];return Li.forEach(Da=>{const Ni={id:Da.id,name:Da.name,floodPolicy:Da.flood_policy,transport_key:Da.transport_key,last_used:Da.last_used?new Date(Da.last_used*1e3):void 0,parent_id:Da.parent_id,children:[]};yi.set(Da.id,Ni)}),yi.forEach(Da=>{Da.parent_id&&yi.has(Da.parent_id)?yi.get(Da.parent_id).children.push(Da):ra.push(Da)}),ra},or=async()=>{try{re.value=!0,pe.value=null;const Li=await Xh.getTransportKeys();Li.success&&Li.data?Gt.value=Ne(Li.data):pe.value=Li.error||"Failed to load transport keys"}catch(Li){pe.value=Li instanceof Error?Li.message:"Unknown error occurred",console.error("Error loading transport keys:",Li)}finally{re.value=!1}};t0(()=>{or()});function _r(Li,yi){for(const ra of Li){if(ra.id===yi)return ra;if(ra.children){const Da=_r(ra.children,yi);if(Da)return Da}}return null}function Fr(){const Li=l.selectedNodeId.value;return Li?_r(Gt.value,Li)?.name:void 0}function zr(Li){Dt.value==="deny"&&l.setSelectedNode(Li)}function Wr(){Dt.value==="deny"&&(z.value=!0)}function An(){if(Dt.value==="deny"&&l.selectedNodeId.value){const Li=_r(Gt.value,l.selectedNodeId.value);Li&&(kt.value=Li,J.value=!0)}}function Ft(){if(Dt.value==="deny"&&l.selectedNodeId.value){const Li=_r(Gt.value,l.selectedNodeId.value);Li&&(mt.value=Li,j.value=!0)}}const kn=async Li=>{try{const yi=await Xh.createTransportKey(Li.name,Li.floodPolicy,void 0,Li.parentId,void 0);yi.success?await or():(console.error("❌ Failed to add transport key:",yi.error),pe.value=yi.error||"Failed to add transport key")}catch(yi){console.error("❌ Error adding transport key:",yi),pe.value=yi instanceof Error?yi.message:"Unknown error occurred"}finally{z.value=!1}};function ei(){z.value=!1}async function jn(Li){try{const yi=Li==="allow",ra=await Xh.updateGlobalFloodPolicy(yi);ra.success?Dt.value=Li:(console.error("❌ Failed to update global flood policy:",ra.error),pe.value=ra.error||"Failed to update global flood policy")}catch(yi){console.error("❌ Error updating global flood policy:",yi),pe.value=yi instanceof Error?yi.message:"Failed to update global flood policy"}}function ai(){j.value=!1,mt.value=null}async function Qi(Li){try{const yi=await Xh.updateTransportKey(Li.id,Li.name,Li.floodPolicy);yi.success?await or():(console.error("❌ Failed to update transport key:",yi.error),pe.value=yi.error||"Failed to update transport key")}catch(yi){console.error("❌ Error updating transport key:",yi),pe.value=yi instanceof Error?yi.message:"Unknown error occurred"}finally{ai()}}function Gi(Li){j.value=!1,mt.value=null,kt.value=Li,J.value=!0}function un(){J.value=!1,kt.value=null}async function ia(Li){try{const yi=await Xh.deleteTransportKey(Li);yi.success?(await or(),l.setSelectedNode(null)):(console.error("❌ Failed to delete transport key:",yi.error),pe.value=yi.error||"Failed to delete transport key")}catch(yi){console.error("❌ Error deleting transport key:",yi),pe.value=yi instanceof Error?yi.message:"Unknown error occurred"}finally{un()}}async function fa(Li){try{const yi=await Xh.deleteTransportKey(Li.nodeId);yi.success?(await or(),l.setSelectedNode(null)):(console.error("❌ Failed to delete transport key:",yi.error),pe.value=yi.error||"Failed to delete transport key")}catch(yi){console.error("❌ Error deleting transport key:",yi),pe.value=yi instanceof Error?yi.message:"Unknown error occurred"}finally{un()}}return(Li,yi)=>(zi(),Vi("div",Rmt,[Re("div",Bmt,[yi[3]||(yi[3]=Re("div",null,[Re("h3",{class:"text-lg font-semibold text-white mb-2"},"Regions/Keys"),Re("p",{class:"text-white/70 text-sm"},"Manage regional key hierarchy")],-1)),Re("div",Nmt,[Re("button",{onClick:Wr,disabled:Dt.value==="allow",class:Xs(["flex items-center gap-2 px-3 py-2 rounded-lg border transition-colors text-sm",Dt.value==="allow"?"bg-white/5 text-white/40 border-white/20 cursor-not-allowed":"bg-accent-green/10 hover:bg-accent-green/20 text-accent-green border-accent-green/30"])},yi[2]||(yi[2]=[Re("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),nc(" Add ",-1)]),10,jmt),Re("button",{onClick:Ft,disabled:!Ju(l).selectedNodeId.value||Dt.value==="allow",class:Xs(["px-4 py-2 rounded-lg border transition-colors",!Ju(l).selectedNodeId.value||Dt.value==="allow"?"bg-white/10 text-white/40 border-white/20 cursor-not-allowed":"bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border-accent-green/50"])}," Edit ",10,Umt),Re("button",{onClick:An,disabled:!Ju(l).selectedNodeId.value||Dt.value==="allow",class:Xs(["px-4 py-2 rounded-lg border transition-colors",!Ju(l).selectedNodeId.value||Dt.value==="allow"?"bg-white/10 text-white/40 border-white/20 cursor-not-allowed":"bg-accent-red/20 hover:bg-accent-red/30 text-accent-red border-accent-red/50"])}," Delete ",10,Vmt)])]),Re("div",Hmt,[Re("div",Wmt,[yi[4]||(yi[4]=Re("div",null,[Re("h4",{class:"text-sm font-medium text-white mb-1"},"Global Flood Policy (*)"),Re("p",{class:"text-white/60 text-xs"},"Master control for repeater flooding")],-1)),Re("div",qmt,[Re("div",Zmt,[Re("button",{onClick:yi[0]||(yi[0]=ra=>jn("deny")),class:Xs(["px-3 py-1 text-xs font-medium rounded transition-colors",Dt.value==="deny"?"bg-accent-red/20 text-accent-red border border-accent-red/50":"text-white/60 hover:text-white/80"])}," DENY ",2),Re("button",{onClick:yi[1]||(yi[1]=ra=>jn("allow")),class:Xs(["px-3 py-1 text-xs font-medium rounded transition-colors",Dt.value==="allow"?"bg-accent-green/20 text-accent-green border border-accent-green/50":"text-white/60 hover:text-white/80"])}," ALLOW ",2)])])])]),Re("div",$mt,[re.value?(zi(),Vi("div",Gmt,yi[5]||(yi[5]=[Re("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-accent-green"},null,-1),Re("span",{class:"ml-2 text-white/70"},"Loading transport keys...",-1)]))):pe.value?(zi(),Vi("div",Ymt,[yi[6]||(yi[6]=Re("div",{class:"text-accent-red mb-2"},"⚠️ Error loading transport keys",-1)),Re("div",Kmt,aa(pe.value),1),Re("button",{onClick:or,class:"mt-4 px-4 py-2 bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border border-accent-green/50 rounded-lg transition-colors"}," Retry ")])):Gt.value.length===0?(zi(),Vi("div",Xmt,yi[7]||(yi[7]=[Re("div",{class:"text-white/50 mb-2"},"📝 No transport keys found",-1),Re("div",{class:"text-white/30 text-sm"},"Add your first transport key to get started",-1)]))):(zi(),Vi("div",Jmt,[(zi(!0),Vi(Ou,null,sf(Gt.value,ra=>(zi(),hm(y0t,{key:ra.id,node:ra,"selected-node-id":Ju(l).selectedNodeId.value,level:0,disabled:Dt.value==="allow",onSelect:zr},null,8,["node","selected-node-id","disabled"]))),128))]))]),gu(N0t,{show:z.value,"selected-node-name":Fr(),"selected-node-id":Ju(l).selectedNodeId.value||void 0,onClose:ei,onAdd:kn},null,8,["show","selected-node-name","selected-node-id"]),gu(fmt,{show:j.value,node:mt.value,onClose:ai,onSave:Qi,onRequestDelete:Gi},null,8,["show","node"]),gu(Fmt,{show:J.value,node:kt.value,"all-nodes":Gt.value,onClose:un,onDeleteAll:ia,onMoveChildren:fa},null,8,["show","node","all-nodes"])]))}}),tgt={class:"p-6 space-y-6"},egt={class:"glass-card rounded-[15px] z-10 p-4 border border-primary/30 bg-primary/10"},rgt={class:"text-primary"},ngt={class:"mt-2 text-primary/80"},igt={class:"glass-card rounded-[15px] p-6"},agt={class:"flex flex-wrap border-b border-white/10 mb-6"},ogt=["onClick"],sgt={class:"flex items-center gap-2"},lgt={key:0,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},ugt={key:1,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},cgt={key:2,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},hgt={key:3,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},fgt={key:4,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},dgt={class:"min-h-[400px]"},pgt={key:0,class:"flex items-center justify-center py-12"},mgt={key:1,class:"flex items-center justify-center py-12"},ggt={class:"text-center"},vgt={class:"text-white/60 text-sm mb-4"},ygt={key:2},xgt=Th({name:"ConfigurationView",__name:"Configuration",setup(d){const l=sv(),z=lo("radio"),j=lo(!1),J=[{id:"radio",label:"Radio Settings",icon:"radio"},{id:"repeater",label:"Repeater Settings",icon:"repeater"},{id:"duty",label:"Duty Cycle",icon:"duty"},{id:"delays",label:"TX Delays",icon:"delays"},{id:"transport",label:"Regions/Keys",icon:"keys"}];t0(async()=>{try{await l.fetchStats(),j.value=!0}catch(kt){console.error("Failed to load configuration data:",kt),j.value=!0}});function mt(kt){z.value=kt}return(kt,Dt)=>{const Gt=UA("router-link");return zi(),Vi("div",tgt,[Dt[11]||(Dt[11]=Re("div",null,[Re("h1",{class:"text-2xl font-bold text-white"},"Configuration"),Re("p",{class:"text-white/70 mt-2"},"System configuration and settings")],-1)),Dt[12]||(Dt[12]=Re("div",{class:"glass-card rounded-[15px] p-4 border border-blue-500/30 bg-blue-500/10"},[Re("div",{class:"text-blue-200"},[Re("strong",null,"Configuration is read-only."),nc(" To modify settings, edit the config file and restart the daemon. ")])],-1)),Re("div",egt,[Re("div",rgt,[Dt[3]||(Dt[3]=Re("strong",null,"CAD Calibration Tool Available",-1)),Re("p",ngt,[Dt[2]||(Dt[2]=nc(" Optimize your Channel Activity Detection settings. ",-1)),gu(Gt,{to:"/cad-calibration",class:"underline hover:text-primary transition-colors"},{default:Y2(()=>Dt[1]||(Dt[1]=[nc(" Launch CAD Calibration Tool → ",-1)])),_:1,__:[1]})])])]),Re("div",igt,[Re("div",agt,[(zi(),Vi(Ou,null,sf(J,re=>Re("button",{key:re.id,onClick:pe=>mt(re.id),class:Xs(["px-4 py-2 text-sm font-medium transition-colors duration-200 border-b-2 mr-6 mb-2",z.value===re.id?"text-primary border-primary":"text-white/70 border-transparent hover:text-white hover:border-white/30"])},[Re("div",sgt,[re.icon==="radio"?(zi(),Vi("svg",lgt,Dt[4]||(Dt[4]=[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.141 0M1.394 9.822c5.716-5.716 14.976-5.716 20.692 0"},null,-1)]))):re.icon==="repeater"?(zi(),Vi("svg",ugt,Dt[5]||(Dt[5]=[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14M5 12l4-4m-4 4l4 4"},null,-1)]))):re.icon==="duty"?(zi(),Vi("svg",cgt,Dt[6]||(Dt[6]=[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)]))):re.icon==="delays"?(zi(),Vi("svg",hgt,Dt[7]||(Dt[7]=[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"},null,-1)]))):re.icon==="keys"?(zi(),Vi("svg",fgt,Dt[8]||(Dt[8]=[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},null,-1)]))):bs("",!0),nc(" "+aa(re.label),1)])],10,ogt)),64))]),Re("div",dgt,[!j.value&&Ju(l).isLoading?(zi(),Vi("div",pgt,Dt[9]||(Dt[9]=[Re("div",{class:"text-center"},[Re("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-primary rounded-full mx-auto mb-4"}),Re("div",{class:"text-white/70"},"Loading configuration...")],-1)]))):Ju(l).error&&!j.value?(zi(),Vi("div",mgt,[Re("div",ggt,[Dt[10]||(Dt[10]=Re("div",{class:"text-red-400 mb-2"},"Failed to load configuration",-1)),Re("div",vgt,aa(Ju(l).error),1),Re("button",{onClick:Dt[0]||(Dt[0]=re=>Ju(l).fetchStats()),class:"px-4 py-2 bg-primary/20 hover:bg-primary/30 text-white rounded-lg border border-primary/50 transition-colors"}," Retry ")])])):(zi(),Vi("div",ygt,[$p(Re("div",null,[gu(wpt,{key:"radio-settings"})],512),[[Kb,z.value==="radio"]]),$p(Re("div",null,[gu(Npt,{key:"repeater-settings"})],512),[[Kb,z.value==="repeater"]]),$p(Re("div",null,[gu(Zpt,{key:"duty-cycle"})],512),[[Kb,z.value==="duty"]]),$p(Re("div",null,[gu(Qpt,{key:"transmission-delays"})],512),[[Kb,z.value==="delays"]]),$p(Re("div",null,[gu(Qmt,{key:"transport-keys"})],512),[[Kb,z.value==="transport"]])]))])])])}}}),_gt={class:"p-6 space-y-6"},bgt={class:"glass-card rounded-[15px] p-6"},wgt={class:"flex justify-center"},kgt={class:"flex gap-4"},Tgt=["disabled"],Agt=["disabled"],Mgt={class:"glass-card rounded-[15px] p-6 space-y-4"},Sgt={class:"text-white"},Egt={key:0,class:"p-4 bg-primary/10 border border-primary/30 rounded-lg"},Cgt={class:"text-primary/90"},Lgt={class:"space-y-2"},Pgt={class:"w-full bg-white/10 rounded-full h-2"},zgt={class:"text-white/70 text-sm"},Igt={class:"grid grid-cols-2 md:grid-cols-4 gap-4"},Ogt={class:"glass-card rounded-[15px] p-4 text-center"},Dgt={class:"text-2xl font-bold text-primary"},Fgt={class:"glass-card rounded-[15px] p-4 text-center"},Rgt={class:"text-2xl font-bold text-primary"},Bgt={class:"glass-card rounded-[15px] p-4 text-center"},Ngt={class:"text-2xl font-bold text-primary"},jgt={class:"glass-card rounded-[15px] p-4 text-center"},Ugt={class:"text-2xl font-bold text-primary"},Vgt={key:0,class:"glass-card rounded-[15px] p-6 space-y-4"},Hgt={key:0,class:"p-4 bg-accent-green/10 border border-accent-green/30 rounded-lg"},Wgt={class:"text-white/80 mb-4"},qgt={key:1,class:"p-4 bg-secondary/20 border border-secondary/40 rounded-lg"},Zgt=Th({name:"CADCalibrationView",__name:"CADCalibration",setup(d){const l=sv(),z=lo(!1),j=lo(null),J=lo(null),mt=lo({}),kt=lo(null),Dt=lo([]),Gt=lo({}),re=lo("Ready to start calibration"),pe=lo(0),Ne=lo(0),or=lo(0),_r=lo(0),Fr=lo(0),zr=lo(0),Wr=lo(null),An=lo(!1),Ft=lo(!1),kn=lo(!1),ei=lo(!1);let jn=null;const ai={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 Qi(){const Ni=[{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:"#ffffff",size:14}},tickfont:{color:"#ffffff"},bgcolor:"rgba(0,0,0,0)",bordercolor:"rgba(255,255,255,0.2)",borderwidth:1,thickness:15},line:{color:"rgba(255,255,255,0.2)",width:1}},hovertemplate:"Peak: %{x}
Min: %{y}
Detection Rate: %{marker.color:.1f}%
",name:"Test Results"}],Ei={title:{text:'CAD Detection Rate
Channel Activity Detection Calibration',font:{color:"#ffffff",size:18},x:.5},xaxis:{title:{text:"CAD Peak Threshold",font:{color:"#cbd5e1",size:14}},tickfont:{color:"#cbd5e1"},gridcolor:"rgba(148, 163, 184, 0.1)",zerolinecolor:"rgba(148, 163, 184, 0.2)",linecolor:"rgba(148, 163, 184, 0.3)"},yaxis:{title:{text:"CAD Min Threshold",font:{color:"#cbd5e1",size:14}},tickfont:{color:"#cbd5e1"},gridcolor:"rgba(148, 163, 184, 0.1)",zerolinecolor:"rgba(148, 163, 184, 0.2)",linecolor:"rgba(148, 163, 184, 0.3)"},plot_bgcolor:"rgba(0, 0, 0, 0)",paper_bgcolor:"rgba(0, 0, 0, 0)",font:{color:"#ffffff",family:"Inter, system-ui, sans-serif"},margin:{l:80,r:80,t:100,b:80},showlegend:!1};l1.newPlot("plotly-chart",Ni,Ei,ai)}function Gi(){if(Object.keys(mt.value).length===0)return;const Ni=Object.values(mt.value),Ei=[],Va=[],ss=[];for(const ko of Ni)Ei.push(ko.det_peak),Va.push(ko.det_min),ss.push(ko.detection_rate);const mo={x:[Ei],y:[Va],"marker.color":[ss],hovertemplate:"Peak: %{x}
Min: %{y}
Detection Rate: %{marker.color:.1f}%
Status: Tested
"};l1.restyle("plotly-chart",mo,[0])}async function un(){try{const Va=await Xh.post("/cad-calibration-start",{samples:10,delay_ms:50});if(Va.success)z.value=!0,j.value=Date.now(),l.setCadCalibrationRunning(!0),mt.value={},Dt.value=[],Gt.value={},kt.value=null,An.value=!1,Ft.value=!1,kn.value=!1,ei.value=!1,or.value=0,_r.value=0,Fr.value=0,zr.value=0,pe.value=0,Ne.value=0,jn=setInterval(()=>{j.value&&(zr.value=Math.floor((Date.now()-j.value)/1e3))},1e3),fa();else throw new Error(Va.error||"Failed to start calibration")}catch(Va){re.value=`Error: ${Va instanceof Error?Va.message:"Unknown error"}`}}async function ia(){try{(await Xh.post("/cad-calibration-stop")).success&&(z.value=!1,l.setCadCalibrationRunning(!1),J.value&&(J.value.close(),J.value=null),jn&&(clearInterval(jn),jn=null))}catch(Ni){console.error("Failed to stop calibration:",Ni)}}function fa(){J.value&&J.value.close(),J.value=new EventSource(`${iQ}/api/cad-calibration-stream`),J.value.onmessage=function(Ni){try{const Ei=JSON.parse(Ni.data);Li(Ei)}catch(Ei){console.error("Failed to parse SSE data:",Ei)}},J.value.onerror=function(Ni){console.error("SSE connection error:",Ni),z.value||J.value&&(J.value.close(),J.value=null)}}function Li(Ni){switch(Ni.type){case"status":re.value=Ni.message||"Status update",Ni.test_ranges&&(Wr.value=Ni.test_ranges,An.value=!0);break;case"progress":pe.value=Ni.current||0,Ne.value=Ni.total||0,or.value=Ni.current||0;break;case"result":if(Ni.det_peak!==void 0&&Ni.det_min!==void 0&&Ni.detection_rate!==void 0&&Ni.detections!==void 0&&Ni.samples!==void 0){const Ei=`${Ni.det_peak}_${Ni.det_min}`;mt.value[Ei]={det_peak:Ni.det_peak,det_min:Ni.det_min,detection_rate:Ni.detection_rate,detections:Ni.detections,samples:Ni.samples},Gi(),yi()}break;case"complete":case"completed":z.value=!1,re.value=Ni.message||"Calibration completed",l.setCadCalibrationRunning(!1),ra(),J.value&&(J.value.close(),J.value=null),jn&&(clearInterval(jn),jn=null);break;case"error":re.value=`Error: ${Ni.message}`,l.setCadCalibrationRunning(!1),ia();break}}function yi(){const Ni=Object.values(mt.value).map(Ei=>Ei.detection_rate);Ni.length!==0&&(_r.value=Math.max(...Ni),Fr.value=Ni.reduce((Ei,Va)=>Ei+Va,0)/Ni.length)}function ra(){Ft.value=!0;let Ni=null,Ei=0;for(const Va of Object.values(mt.value))Va.detection_rate>Ei&&(Ei=Va.detection_rate,Ni=Va);kt.value=Ni,Ni&&Ei>0?(kn.value=!0,ei.value=!1):(kn.value=!1,ei.value=!0)}async function Da(){if(!kt.value){re.value="Error: No calibration results to save";return}try{const Ni=await Xh.post("/save_cad_settings",{peak:kt.value.det_peak,min_val:kt.value.det_min,detection_rate:kt.value.detection_rate});if(Ni.success)re.value=`Settings saved! Peak=${kt.value.det_peak}, Min=${kt.value.det_min} applied to configuration.`;else throw new Error(Ni.error||"Failed to save settings")}catch(Ni){re.value=`Error: Failed to save settings: ${Ni instanceof Error?Ni.message:"Unknown error"}`}}return t0(()=>{Qi()}),K2(()=>{J.value&&J.value.close(),jn&&clearInterval(jn),l.setCadCalibrationRunning(!1),document.getElementById("plotly-chart")&&l1.purge("plotly-chart")}),(Ni,Ei)=>(zi(),Vi("div",_gt,[Ei[14]||(Ei[14]=Re("div",null,[Re("h1",{class:"text-2xl font-bold text-white"},"CAD Calibration Tool"),Re("p",{class:"text-white/70 mt-2"},"Channel Activity Detection calibration")],-1)),Re("div",bgt,[Re("div",wgt,[Re("div",kgt,[Re("button",{onClick:un,disabled:z.value,class:"flex items-center gap-3 px-6 py-3 bg-accent-green/10 hover:bg-accent-green/20 disabled:bg-gray-500/10 text-accent-green disabled:text-gray-400 rounded-lg border border-accent-green/30 disabled:border-gray-500/20 transition-colors disabled:cursor-not-allowed"},Ei[0]||(Ei[0]=[Ff('
Start Calibration
Begin testing
',2)]),8,Tgt),Re("button",{onClick:ia,disabled:!z.value,class:"flex items-center gap-3 px-6 py-3 bg-accent-red/10 hover:bg-accent-red/20 disabled:bg-gray-500/10 text-accent-red disabled:text-gray-400 rounded-lg border border-accent-red/30 disabled:border-gray-500/20 transition-colors disabled:cursor-not-allowed"},Ei[1]||(Ei[1]=[Ff('
Stop
Halt calibration
',2)]),8,Agt)])])]),Re("div",Mgt,[Re("div",Sgt,aa(re.value),1),An.value&&Wr.value?(zi(),Vi("div",Egt,[Re("div",Cgt,[Ei[2]||(Ei[2]=Re("strong",null,"Configuration:",-1)),nc(" SF"+aa(Wr.value.spreading_factor)+" | Peak: "+aa(Wr.value.peak_min)+" - "+aa(Wr.value.peak_max)+" | Min: "+aa(Wr.value.min_min)+" - "+aa(Wr.value.min_max)+" | "+aa((Wr.value.peak_max-Wr.value.peak_min+1)*(Wr.value.min_max-Wr.value.min_min+1))+" tests ",1)])])):bs("",!0),Re("div",Lgt,[Re("div",Pgt,[Re("div",{class:"bg-gradient-to-r from-primary to-accent-green h-2 rounded-full transition-all duration-300",style:av({width:Ne.value>0?`${pe.value/Ne.value*100}%`:"0%"})},null,4)]),Re("div",zgt,aa(pe.value)+" / "+aa(Ne.value)+" tests completed",1)])]),Re("div",Igt,[Re("div",Ogt,[Re("div",Dgt,aa(or.value),1),Ei[3]||(Ei[3]=Re("div",{class:"text-white/70 text-sm"},"Tests Completed",-1))]),Re("div",Fgt,[Re("div",Rgt,aa(_r.value.toFixed(1))+"%",1),Ei[4]||(Ei[4]=Re("div",{class:"text-white/70 text-sm"},"Best Detection Rate",-1))]),Re("div",Bgt,[Re("div",Ngt,aa(Fr.value.toFixed(1))+"%",1),Ei[5]||(Ei[5]=Re("div",{class:"text-white/70 text-sm"},"Average Rate",-1))]),Re("div",jgt,[Re("div",Ugt,aa(zr.value)+"s",1),Ei[6]||(Ei[6]=Re("div",{class:"text-white/70 text-sm"},"Elapsed Time",-1))])]),Ei[15]||(Ei[15]=Re("div",{class:"glass-card rounded-[15px] p-6"},[Re("div",{id:"plotly-chart",class:"w-full h-96"})],-1)),Ft.value?(zi(),Vi("div",Vgt,[Ei[13]||(Ei[13]=Re("h3",{class:"text-xl font-bold text-white"},"Calibration Results",-1)),kn.value&&kt.value?(zi(),Vi("div",Hgt,[Ei[11]||(Ei[11]=Re("h4",{class:"font-medium text-accent-green mb-2"},"Optimal Settings Found:",-1)),Re("p",Wgt,[Ei[7]||(Ei[7]=nc(" Peak: ",-1)),Re("strong",null,aa(kt.value.det_peak),1),Ei[8]||(Ei[8]=nc(", Min: ",-1)),Re("strong",null,aa(kt.value.det_min),1),Ei[9]||(Ei[9]=nc(", Rate: ",-1)),Re("strong",null,aa(kt.value.detection_rate.toFixed(1))+"%",1)]),Re("div",{class:"flex justify-center"},[Re("button",{onClick:Da,class:"flex items-center gap-3 px-6 py-3 bg-primary/20 hover:bg-primary/30 text-primary rounded-lg border border-primary/50 transition-colors"},Ei[10]||(Ei[10]=[Ff('
Save Settings
Apply to configuration
',2)]))])])):bs("",!0),ei.value?(zi(),Vi("div",qgt,Ei[12]||(Ei[12]=[Re("h4",{class:"font-medium text-secondary mb-2"},"No Optimal Settings Found",-1),Re("p",{class:"text-white/70"},"All tested combinations showed low detection rates. Consider running calibration again or adjusting test parameters.",-1)]))):bs("",!0)])):bs("",!0)]))}}),$gt=ld(Zgt,[["__scopeId","data-v-854f5f55"]]),Ggt={class:"space-y-6"},Ygt={class:"bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] p-6"},Kgt={class:"flex items-center justify-between mb-4"},Xgt=["disabled"],Jgt={class:"bg-white/5 border border-white/10 rounded-lg p-4"},Qgt={class:"flex flex-wrap gap-2"},tvt=["onClick"],evt={key:0,class:"w-px h-6 bg-white/20 mx-2 self-center"},rvt=["onClick"],nvt={class:"bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] overflow-hidden"},ivt={key:0,class:"p-8 text-center"},avt={key:1,class:"p-8 text-center"},ovt={class:"text-dark-text mb-4"},svt={key:2,class:"max-h-[600px] overflow-y-auto"},lvt={key:0,class:"p-8 text-center"},uvt={key:1,class:"divide-y divide-white/5"},cvt={class:"flex-shrink-0 text-dark-text"},hvt={class:"flex-shrink-0 px-2 py-1 text-xs font-medium rounded bg-blue-500/20 text-blue-400"},fvt={class:"text-white flex-1 break-all"},dvt=Th({name:"LogsView",__name:"Logs",setup(d){const l=lo([]),z=lo(new Set),j=lo(new Set(["DEBUG","INFO","WARNING","ERROR"])),J=lo(new Set),mt=lo(new Set),kt=lo(!0),Dt=lo(null);let Gt=null;const re=fa=>{const Li=fa.match(/- ([^-]+) - (?:DEBUG|INFO|WARNING|ERROR) -/);return Li?Li[1].trim():"Unknown"},pe=fa=>{const Li=fa.match(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3} - [^-]+ - (?:DEBUG|INFO|WARNING|ERROR) - (.+)$/);return Li?Li[1]:fa},Ne=(fa,Li)=>{if(fa.size!==Li.size)return!1;for(const yi of fa)if(!Li.has(yi))return!1;return!0},or=async()=>{try{const fa=await Xh.getLogs();if(fa.logs&&fa.logs.length>0){l.value=fa.logs;const Li=new Set;l.value.forEach(Ni=>{const Ei=re(Ni.message);Li.add(Ei)});const yi=new Set;l.value.forEach(Ni=>{yi.add(Ni.level)}),z.value.size===0&&(z.value=new Set(Li));const ra=!Ne(J.value,Li),Da=!Ne(mt.value,yi);ra&&(J.value=Li),Da&&(mt.value=yi),Dt.value=null}}catch(fa){console.error("Error loading logs:",fa),Dt.value=fa instanceof Error?fa.message:"Failed to load logs"}finally{kt.value=!1}},_r=Yo(()=>l.value.filter(Li=>{const yi=re(Li.message),ra=z.value.has(yi),Da=j.value.has(Li.level);return ra&&Da})),Fr=Yo(()=>Array.from(J.value).sort()),zr=Yo(()=>{const fa=["ERROR","WARNING","WARN","INFO","DEBUG"];return Array.from(mt.value).sort((yi,ra)=>{const Da=fa.indexOf(yi),Ni=fa.indexOf(ra);return Da!==-1&&Ni!==-1?Da-Ni:yi.localeCompare(ra)})}),Wr=fa=>{j.value.has(fa)?j.value.delete(fa):j.value.add(fa),j.value=new Set(j.value)},An=fa=>new Date(fa).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),Ft=fa=>({ERROR:"text-red-400 bg-red-900/20",WARNING:"text-yellow-400 bg-yellow-900/20",WARN:"text-yellow-400 bg-yellow-900/20",INFO:"text-blue-400 bg-blue-900/20",DEBUG:"text-gray-400 bg-gray-900/20"})[fa]||"text-gray-400 bg-gray-900/20",kn=(fa,Li)=>Li?{ERROR:"bg-red-500/20 text-red-400 border-red-500/50",WARNING:"bg-yellow-500/20 text-yellow-400 border-yellow-500/50",WARN:"bg-yellow-500/20 text-yellow-400 border-yellow-500/50",INFO:"bg-blue-500/20 text-blue-400 border-blue-500/50",DEBUG:"bg-gray-500/20 text-gray-400 border-gray-500/50"}[fa]||"bg-primary/20 text-primary border-primary/50":"bg-white/5 text-white/60 border-white/20 hover:bg-white/10",ei=fa=>{z.value.has(fa)?z.value.delete(fa):z.value.add(fa),z.value=new Set(z.value)},jn=()=>{z.value=new Set(J.value)},ai=()=>{z.value=new Set},Qi=()=>{j.value=new Set(mt.value)},Gi=()=>{j.value=new Set},un=()=>{Gt&&clearInterval(Gt),Gt=setInterval(or,5e3)},ia=()=>{Gt&&(clearInterval(Gt),Gt=null)};return t0(()=>{or(),un()}),dg(()=>{ia()}),(fa,Li)=>(zi(),Vi("div",Ggt,[Re("div",Ygt,[Re("div",Kgt,[Li[1]||(Li[1]=Re("div",null,[Re("h1",{class:"text-white text-2xl font-semibold mb-2"},"System Logs"),Re("p",{class:"text-dark-text"},"Real-time system events and diagnostics")],-1)),Re("button",{onClick:or,disabled:kt.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"},[(zi(),Vi("svg",{class:Xs(["w-4 h-4",{"animate-spin":kt.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Li[0]||(Li[0]=[Re("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)),nc(" "+aa(kt.value?"Loading...":"Refresh"),1)],8,Xgt)]),Re("div",Jgt,[Re("div",{class:"flex flex-wrap items-center gap-3 mb-4"},[Li[2]||(Li[2]=Re("span",{class:"text-white font-medium"},"Filters:",-1)),Re("button",{onClick:jn,class:"px-3 py-1 text-xs bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border border-accent-green/50 rounded transition-colors"}," All Loggers "),Re("button",{onClick:ai,class:"px-3 py-1 text-xs bg-accent-red/20 hover:bg-accent-red/30 text-accent-red border border-accent-red/50 rounded transition-colors"}," Clear Loggers "),Li[3]||(Li[3]=Re("div",{class:"w-px h-4 bg-white/20 mx-1"},null,-1)),Re("button",{onClick:Qi,class:"px-3 py-1 text-xs bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border border-accent-green/50 rounded transition-colors"}," All Levels "),Re("button",{onClick:Gi,class:"px-3 py-1 text-xs bg-accent-red/20 hover:bg-accent-red/30 text-accent-red border border-accent-red/50 rounded transition-colors"}," Clear Levels ")]),Re("div",Qgt,[(zi(!0),Vi(Ou,null,sf(Fr.value,yi=>(zi(),Vi("button",{key:"logger-"+yi,onClick:ra=>ei(yi),class:Xs(["px-3 py-1 text-xs border rounded-full transition-colors",z.value.has(yi)?"bg-primary/20 text-primary border-primary/50":"bg-white/5 text-white/60 border-white/20 hover:bg-white/10"])},aa(yi),11,tvt))),128)),Fr.value.length>0&&zr.value.length>0?(zi(),Vi("div",evt)):bs("",!0),(zi(!0),Vi(Ou,null,sf(zr.value,yi=>(zi(),Vi("button",{key:"level-"+yi,onClick:ra=>Wr(yi),class:Xs(["px-3 py-1 text-xs border rounded-full transition-colors font-medium",j.value.has(yi)?kn(yi,!0):kn(yi,!1)])},aa(yi),11,rvt))),128))])])]),Re("div",nvt,[kt.value&&l.value.length===0?(zi(),Vi("div",ivt,Li[4]||(Li[4]=[Re("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto mb-4"},null,-1),Re("p",{class:"text-dark-text"},"Loading system logs...",-1)]))):Dt.value?(zi(),Vi("div",avt,[Li[5]||(Li[5]=Re("div",{class:"text-red-400 mb-4"},[Re("svg",{class:"w-12 h-12 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Re("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])],-1)),Li[6]||(Li[6]=Re("h3",{class:"text-white text-lg font-medium mb-2"},"Error Loading Logs",-1)),Re("p",ovt,aa(Dt.value),1),Re("button",{onClick:or,class:"px-4 py-2 bg-red-500/20 hover:bg-red-500/30 text-red-400 border border-red-500/50 rounded-lg transition-colors"}," Try Again ")])):(zi(),Vi("div",svt,[_r.value.length===0?(zi(),Vi("div",lvt,Li[7]||(Li[7]=[Ff('

No Logs to Display

No logs match the current filter criteria.

',3)]))):(zi(),Vi("div",uvt,[(zi(!0),Vi(Ou,null,sf(_r.value,(yi,ra)=>(zi(),Vi("div",{key:ra,class:"flex items-start gap-4 p-4 hover:bg-white/5 transition-colors font-mono text-sm"},[Re("span",cvt," ["+aa(An(yi.timestamp))+"] ",1),Re("span",hvt,aa(re(yi.message)),1),Re("span",{class:Xs(["flex-shrink-0 px-2 py-1 text-xs font-medium rounded",Ft(yi.level)])},aa(yi.level),3),Re("span",fvt,aa(pe(yi.message)),1)]))),128))]))]))])]))}}),pvt=Th({name:"HelpView",__name:"Help",setup(d){return(l,z)=>(zi(),Vi("div",null,z[0]||(z[0]=[Ff('

Help

Help & Documentation

Find answers to common questions and access user guides.

',1)])))}}),mvt=SX({history:aX("/"),routes:[{path:"/",name:"dashboard",component:Eat},{path:"/neighbors",name:"neighbors",component:aot},{path:"/statistics",name:"statistics",component:spt},{path:"/configuration",name:"configuration",component:xgt},{path:"/cad-calibration",name:"cad-calibration",component:$gt},{path:"/logs",name:"logs",component:dvt},{path:"/help",name:"help",component:pvt}]}),wM=dK(ert);wM.use(gK());wM.use(mvt);wM.mount("#app"); diff --git a/repeater/web/html/assets/index-wgCsqUA2.css b/repeater/web/html/assets/index-wgCsqUA2.css new file mode 100644 index 0000000..956a494 --- /dev/null +++ b/repeater/web/html/assets/index-wgCsqUA2.css @@ -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-background: var(--vt-c-white);--color-background-soft: var(--vt-c-white-soft);--color-background-mute: var(--vt-c-white-mute);--color-border: var(--vt-c-divider-light-2);--color-border-hover: var(--vt-c-divider-light-1);--color-heading: var(--vt-c-text-light-1);--color-text: var(--vt-c-text-light-1);--section-gap: 160px}@media (prefers-color-scheme: dark){:root{--color-background: var(--vt-c-black);--color-background-soft: var(--vt-c-black-soft);--color-background-mute: var(--vt-c-black-mute);--color-border: var(--vt-c-divider-dark-2);--color-border-hover: var(--vt-c-divider-dark-1);--color-heading: var(--vt-c-text-dark-1);--color-text: var(--vt-c-text-dark-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-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--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-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Noto Sans,-apple-system,Roboto,Helvetica,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-left-\[92px\]{left:-92px}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.-top-\[79px\]{top:-79px}.-top-\[94px\]{top:-94px}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.left-3{left:.75rem}.left-5{left:1.25rem}.left-\[246px\]{left:246px}.left-\[575px\]{left:575px}.right-1{right:.25rem}.right-2{right:.5rem}.right-4{right:1rem}.right-6{right:1.5rem}.top-0{top:0}.top-1\/2{top:50%}.top-14{top:3.5rem}.top-2{top:.5rem}.top-3{top:.75rem}.top-4{top:1rem}.top-\[373px\]{top:373px}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[9998\]{z-index:9998}.z-\[99999\]{z-index:99999}.col-span-1{grid-column:span 1 / span 1}.col-span-2{grid-column:span 2 / span 2}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-12{margin-left:3rem}.ml-16{margin-left:4rem}.ml-2{margin-left:.5rem}.ml-20{margin-left:5rem}.ml-24{margin-left:6rem}.ml-28{margin-left:7rem}.ml-32{margin-left:8rem}.ml-4{margin-left:1rem}.ml-8{margin-left:2rem}.ml-auto{margin-left:auto}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-6{margin-right:1.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-80{height:20rem}.h-96{height:24rem}.h-\[30px\]{height:30px}.h-\[35px\]{height:35px}.h-\[512px\]{height:512px}.h-full{height:100%}.h-px{height:1px}.max-h-0{max-height:0px}.max-h-32{max-height:8rem}.max-h-40{max-height:10rem}.max-h-\[600px\]{max-height:600px}.max-h-\[70vh\]{max-height:70vh}.max-h-\[90vh\]{max-height:90vh}.max-h-screen{max-height:100vh}.min-h-\[400px\]{min-height:400px}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[196px\]{width:196px}.w-\[285px\]{width:285px}.w-\[35px\]{width:35px}.w-\[705px\]{width:705px}.w-full{width:100%}.w-px{width:1px}.min-w-\[120px\]{min-width:120px}.min-w-full{min-width:100%}.max-w-20{max-width:5rem}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-\[24\.22deg\]{--tw-rotate: -24.22deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-0{--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-white\/5>:not([hidden])~:not([hidden]){border-color:#ffffff0d}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[10px\]{border-radius:10px}.rounded-\[15px\]{border-radius:15px}.rounded-\[20px\]{border-radius:20px}.rounded-\[8px\]{border-radius:8px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-t{border-top-width:1px}.border-accent-green{--tw-border-opacity: 1;border-color:rgb(165 229 182 / var(--tw-border-opacity, 1))}.border-accent-green\/20{border-color:#a5e5b633}.border-accent-green\/30{border-color:#a5e5b64d}.border-accent-green\/40{border-color:#a5e5b666}.border-accent-green\/50{border-color:#a5e5b680}.border-accent-green\/60{border-color:#a5e5b699}.border-accent-purple\/50{border-color:#eba0fc80}.border-accent-red\/20{border-color:#fb787b33}.border-accent-red\/30{border-color:#fb787b4d}.border-accent-red\/50{border-color:#fb787b80}.border-blue-500\/30{border-color:#3b82f64d}.border-blue-500\/50{border-color:#3b82f680}.border-cyan-400\/30{border-color:#22d3ee4d}.border-cyan-400\/40{border-color:#22d3ee66}.border-dark-border{--tw-border-opacity: 1;border-color:rgb(75 75 75 / var(--tw-border-opacity, 1))}.border-dark-border\/50{border-color:#4b4b4b80}.border-gray-500\/50{border-color:#6b728080}.border-gray-700\/50{border-color:#37415180}.border-orange-400\/40{border-color:#fb923c66}.border-primary{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.border-primary\/20{border-color:#aae8e833}.border-primary\/30{border-color:#aae8e84d}.border-primary\/40{border-color:#aae8e866}.border-primary\/50{border-color:#aae8e880}.border-primary\/60{border-color:#aae8e899}.border-red-500\/50{border-color:#ef444480}.border-secondary{--tw-border-opacity: 1;border-color:rgb(255 194 70 / var(--tw-border-opacity, 1))}.border-secondary\/30{border-color:#ffc2464d}.border-secondary\/40{border-color:#ffc24666}.border-secondary\/50{border-color:#ffc24680}.border-secondary\/70{border-color:#ffc246b3}.border-transparent{border-color:transparent}.border-white\/10{border-color:#ffffff1a}.border-white\/20{border-color:#fff3}.border-white\/30{border-color:#ffffff4d}.border-white\/5{border-color:#ffffff0d}.border-yellow-300{--tw-border-opacity: 1;border-color:rgb(253 224 71 / var(--tw-border-opacity, 1))}.border-yellow-500\/50{border-color:#eab30880}.border-l-accent-cyan{--tw-border-opacity: 1;border-left-color:rgb(209 230 228 / var(--tw-border-opacity, 1))}.border-l-accent-green{--tw-border-opacity: 1;border-left-color:rgb(165 229 182 / var(--tw-border-opacity, 1))}.border-l-accent-purple{--tw-border-opacity: 1;border-left-color:rgb(235 160 252 / var(--tw-border-opacity, 1))}.border-l-accent-red{--tw-border-opacity: 1;border-left-color:rgb(251 120 123 / var(--tw-border-opacity, 1))}.border-l-gray-500{--tw-border-opacity: 1;border-left-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.border-l-primary{--tw-border-opacity: 1;border-left-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.border-l-secondary{--tw-border-opacity: 1;border-left-color:rgb(255 194 70 / var(--tw-border-opacity, 1))}.border-t-blue-400{--tw-border-opacity: 1;border-top-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.border-t-green-400{--tw-border-opacity: 1;border-top-color:rgb(74 222 128 / var(--tw-border-opacity, 1))}.border-t-primary{--tw-border-opacity: 1;border-top-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.border-t-purple-400{--tw-border-opacity: 1;border-top-color:rgb(192 132 252 / var(--tw-border-opacity, 1))}.border-t-transparent{border-top-color:transparent}.border-t-white\/70{border-top-color:#ffffffb3}.bg-\[\#0B1014\]{--tw-bg-opacity: 1;background-color:rgb(11 16 20 / var(--tw-bg-opacity, 1))}.bg-\[\#1A1E1F\]{--tw-bg-opacity: 1;background-color:rgb(26 30 31 / var(--tw-bg-opacity, 1))}.bg-\[\#212122\]{--tw-bg-opacity: 1;background-color:rgb(33 33 34 / var(--tw-bg-opacity, 1))}.bg-\[\#223231\]{--tw-bg-opacity: 1;background-color:rgb(34 50 49 / var(--tw-bg-opacity, 1))}.bg-\[\#588187\]{--tw-bg-opacity: 1;background-color:rgb(88 129 135 / var(--tw-bg-opacity, 1))}.bg-\[\#95F3AE\]{--tw-bg-opacity: 1;background-color:rgb(149 243 174 / var(--tw-bg-opacity, 1))}.bg-accent-cyan{--tw-bg-opacity: 1;background-color:rgb(209 230 228 / var(--tw-bg-opacity, 1))}.bg-accent-green{--tw-bg-opacity: 1;background-color:rgb(165 229 182 / var(--tw-bg-opacity, 1))}.bg-accent-green\/10{background-color:#a5e5b61a}.bg-accent-green\/20{background-color:#a5e5b633}.bg-accent-purple{--tw-bg-opacity: 1;background-color:rgb(235 160 252 / var(--tw-bg-opacity, 1))}.bg-accent-purple\/20{background-color:#eba0fc33}.bg-accent-red{--tw-bg-opacity: 1;background-color:rgb(251 120 123 / var(--tw-bg-opacity, 1))}.bg-accent-red\/10{background-color:#fb787b1a}.bg-accent-red\/20{background-color:#fb787b33}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/20{background-color:#0003}.bg-black\/30{background-color:#0000004d}.bg-black\/40{background-color:#0006}.bg-black\/50{background-color:#00000080}.bg-black\/60{background-color:#0009}.bg-black\/70{background-color:#000000b3}.bg-black\/80{background-color:#000c}.bg-black\/90{background-color:#000000e6}.bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity, 1))}.bg-blue-500\/10{background-color:#3b82f61a}.bg-blue-500\/20{background-color:#3b82f633}.bg-blue-900\/20{background-color:#1e3a8a33}.bg-cyan-400{--tw-bg-opacity: 1;background-color:rgb(34 211 238 / var(--tw-bg-opacity, 1))}.bg-cyan-400\/20{background-color:#22d3ee33}.bg-dark-bg{--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity, 1))}.bg-dark-bg\/30{background-color:#09090b4d}.bg-dark-bg\/50{background-color:#09090b80}.bg-dark-card\/30{background-color:#0000004d}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity, 1))}.bg-gray-500\/20{background-color:#6b728033}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-gray-900\/20{background-color:#11182733}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity, 1))}.bg-orange-400{--tw-bg-opacity: 1;background-color:rgb(251 146 60 / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(170 232 232 / var(--tw-bg-opacity, 1))}.bg-primary\/10{background-color:#aae8e81a}.bg-primary\/20{background-color:#aae8e833}.bg-primary\/5{background-color:#aae8e80d}.bg-primary\/70{background-color:#aae8e8b3}.bg-purple-400{--tw-bg-opacity: 1;background-color:rgb(192 132 252 / var(--tw-bg-opacity, 1))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1))}.bg-red-500\/20{background-color:#ef444433}.bg-red-900\/20{background-color:#7f1d1d33}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(255 194 70 / var(--tw-bg-opacity, 1))}.bg-secondary\/20{background-color:#ffc24633}.bg-secondary\/30{background-color:#ffc2464d}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/10{background-color:#ffffff1a}.bg-white\/20{background-color:#fff3}.bg-white\/5{background-color:#ffffff0d}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/20{background-color:#eab30833}.bg-yellow-900\/20{background-color:#713f1233}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-blue-500\/20{--tw-gradient-from: rgb(59 130 246 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-400\/25{--tw-gradient-from: rgb(34 211 238 / .25) var(--tw-gradient-from-position);--tw-gradient-to: rgb(34 211 238 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500\/20{--tw-gradient-from: rgb(6 182 212 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-orange-500\/20{--tw-gradient-from: rgb(249 115 22 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 115 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-primary{--tw-gradient-from: #AAE8E8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(170 232 232 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-yellow-400\/30{--tw-gradient-from: rgb(250 204 21 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(250 204 21 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-accent-green{--tw-gradient-to: #A5E5B6 var(--tw-gradient-to-position)}.to-cyan-200\/10{--tw-gradient-to: rgb(165 243 252 / .1) var(--tw-gradient-to-position)}.to-cyan-400\/20{--tw-gradient-to: rgb(34 211 238 / .2) var(--tw-gradient-to-position)}.to-cyan-500\/20{--tw-gradient-to: rgb(6 182 212 / .2) var(--tw-gradient-to-position)}.to-orange-400\/30{--tw-gradient-to: rgb(251 146 60 / .3) var(--tw-gradient-to-position)}.to-yellow-500\/20{--tw-gradient-to: rgb(234 179 8 / .2) var(--tw-gradient-to-position)}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[15px\]{padding:15px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-9{padding-left:2.25rem}.pr-4{padding-right:1rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:Noto Sans,-apple-system,Roboto,Helvetica,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[20px\]{font-size:20px}.text-\[22px\]{font-size:22px}.text-\[30px\]{font-size:30px}.text-\[35px\]{font-size:35px}.text-\[8px\]{font-size:8px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:.025em}.text-\[\#212122\]{--tw-text-opacity: 1;color:rgb(33 33 34 / var(--tw-text-opacity, 1))}.text-\[\#C3C3C3\]{--tw-text-opacity: 1;color:rgb(195 195 195 / var(--tw-text-opacity, 1))}.text-\[\#D9D9D9\]{--tw-text-opacity: 1;color:rgb(217 217 217 / var(--tw-text-opacity, 1))}.text-accent-cyan{--tw-text-opacity: 1;color:rgb(209 230 228 / var(--tw-text-opacity, 1))}.text-accent-green{--tw-text-opacity: 1;color:rgb(165 229 182 / var(--tw-text-opacity, 1))}.text-accent-green\/90{color:#a5e5b6e6}.text-accent-purple{--tw-text-opacity: 1;color:rgb(235 160 252 / var(--tw-text-opacity, 1))}.text-accent-red{--tw-text-opacity: 1;color:rgb(251 120 123 / var(--tw-text-opacity, 1))}.text-accent-red\/80{color:#fb787bcc}.text-accent-red\/90{color:#fb787be6}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-blue-200{--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-cyan-300{--tw-text-opacity: 1;color:rgb(103 232 249 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-cyan-400\/60{color:#22d3ee99}.text-dark-bg{--tw-text-opacity: 1;color:rgb(9 9 11 / var(--tw-text-opacity, 1))}.text-dark-text{--tw-text-opacity: 1;color:rgb(173 173 173 / var(--tw-text-opacity, 1))}.text-dark-text\/60{color:#adadad99}.text-dark-text\/80{color:#adadadcc}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-400\/60{color:#fb923c99}.text-primary{--tw-text-opacity: 1;color:rgb(170 232 232 / var(--tw-text-opacity, 1))}.text-primary\/80{color:#aae8e8cc}.text-primary\/90{color:#aae8e8e6}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-secondary{--tw-text-opacity: 1;color:rgb(255 194 70 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\/30{color:#ffffff4d}.text-white\/40{color:#fff6}.text-white\/50{color:#ffffff80}.text-white\/60{color:#fff9}.text-white\/70{color:#ffffffb3}.text-white\/80{color:#fffc}.text-white\/90{color:#ffffffe6}.text-yellow-200{--tw-text-opacity: 1;color:rgb(254 240 138 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.placeholder-white\/50::-moz-placeholder{color:#ffffff80}.placeholder-white\/50::placeholder{color:#ffffff80}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.mix-blend-screen{mix-blend-mode:screen}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_6px_0_rgba\(170\,232\,232\,0\.20\)\]{--tw-shadow: 0 0 6px 0 rgba(170,232,232,.2);--tw-shadow-colored: 0 0 6px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-accent-green\/50{--tw-shadow-color: rgb(165 229 182 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-primary\/30{--tw-shadow-color: rgb(170 232 232 / .3);--tw-shadow: var(--tw-shadow-colored)}.shadow-yellow-400\/20{--tw-shadow-color: rgb(250 204 21 / .2);--tw-shadow: var(--tw-shadow-colored)}.outline{outline-style:solid}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[120px\]{--tw-blur: blur(120px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-\[50px\]{--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-lg{--tw-backdrop-blur: blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.glass-card{border-radius:10px;--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);background:#0006}.glass-card-green{border-radius:10px;--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);background:linear-gradient(91deg,#2222226e 1.17%,#8787881a 99.82%)}.glass-card-orange{border-radius:10px;--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);background:linear-gradient(91deg,#fb787b33 1.17%,#fb787b1a 99.82%)}.last\:border-b-0:last-child{border-bottom-width:0px}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-dark-border:hover{--tw-border-opacity: 1;border-color:rgb(75 75 75 / var(--tw-border-opacity, 1))}.hover\:border-orange-400\/60:hover{border-color:#fb923c99}.hover\:border-primary:hover{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.hover\:border-primary\/50:hover{border-color:#aae8e880}.hover\:border-white\/30:hover{border-color:#ffffff4d}.hover\:bg-\[\#2A2E2F\]:hover{--tw-bg-opacity: 1;background-color:rgb(42 46 47 / var(--tw-bg-opacity, 1))}.hover\:bg-accent-green\/10:hover{background-color:#a5e5b61a}.hover\:bg-accent-green\/20:hover{background-color:#a5e5b633}.hover\:bg-accent-green\/30:hover{background-color:#a5e5b64d}.hover\:bg-accent-purple\/30:hover{background-color:#eba0fc4d}.hover\:bg-accent-red\/10:hover{background-color:#fb787b1a}.hover\:bg-accent-red\/20:hover{background-color:#fb787b33}.hover\:bg-accent-red\/30:hover{background-color:#fb787b4d}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-primary\/10:hover{background-color:#aae8e81a}.hover\:bg-primary\/30:hover{background-color:#aae8e84d}.hover\:bg-primary\/5:hover{background-color:#aae8e80d}.hover\:bg-primary\/90:hover{background-color:#aae8e8e6}.hover\:bg-red-500\/30:hover{background-color:#ef44444d}.hover\:bg-secondary\/90:hover{background-color:#ffc246e6}.hover\:bg-white\/10:hover{background-color:#ffffff1a}.hover\:bg-white\/20:hover{background-color:#fff3}.hover\:bg-white\/5:hover{background-color:#ffffff0d}.hover\:from-cyan-500\/30:hover{--tw-gradient-from: rgb(6 182 212 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-cyan-400\/30:hover{--tw-gradient-to: rgb(34 211 238 / .3) var(--tw-gradient-to-position)}.hover\:text-accent-green\/80:hover{color:#a5e5b6cc}.hover\:text-accent-red\/80:hover{color:#fb787bcc}.hover\:text-dark-text:hover{--tw-text-opacity: 1;color:rgb(173 173 173 / var(--tw-text-opacity, 1))}.hover\:text-primary:hover{--tw-text-opacity: 1;color:rgb(170 232 232 / var(--tw-text-opacity, 1))}.hover\:text-primary\/80:hover{color:#aae8e8cc}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:text-white\/80:hover{color:#fffc}.hover\:shadow-primary\/20:hover{--tw-shadow-color: rgb(170 232 232 / .2);--tw-shadow: var(--tw-shadow-colored)}.hover\:shadow-secondary\/20:hover{--tw-shadow-color: rgb(255 194 70 / .2);--tw-shadow: var(--tw-shadow-colored)}.focus\:border-accent-purple\/50:focus{border-color:#eba0fc80}.focus\:border-primary:focus{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-primary\/20:focus{--tw-ring-color: rgb(170 232 232 / .2)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:border-gray-500\/20:disabled{border-color:#6b728033}.disabled\:bg-gray-500\/10:disabled{background-color:#6b72801a}.disabled\:text-gray-400:disabled{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:border-white\/50{border-color:#ffffff80}.group:hover .group-hover\:text-primary{--tw-text-opacity: 1;color:rgb(170 232 232 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:opacity-100{opacity:1}.peer:checked~.peer-checked\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:checked~.peer-checked\:border-primary{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.peer:checked~.peer-checked\:bg-primary\/20{background-color:#aae8e833}.group:has(:checked) .group-has-\[\:checked\]\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-green{--tw-border-opacity: 1;border-color:rgb(165 229 182 / var(--tw-border-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-green\/50{border-color:#a5e5b680}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-red{--tw-border-opacity: 1;border-color:rgb(251 120 123 / var(--tw-border-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-red\/50{border-color:#fb787b80}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-green{--tw-bg-opacity: 1;background-color:rgb(165 229 182 / var(--tw-bg-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-green\/10{background-color:#a5e5b61a}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-red{--tw-bg-opacity: 1;background-color:rgb(251 120 123 / var(--tw-bg-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-red\/10{background-color:#fb787b1a}@media (min-width: 640px){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width: 768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:block{display:block}.lg\:hidden{display:none}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:items-center{align-items:center}.lg\:justify-between{justify-content:space-between}.lg\:p-\[15px\]{padding:15px}}@keyframes sparkline-draw-ad12b3cb{0%{stroke-dasharray:1000;stroke-dashoffset:1000}to{stroke-dasharray:1000;stroke-dashoffset:0}}.sparkline-animate[data-v-ad12b3cb]{animation:sparkline-draw-ad12b3cb 1s ease-out}.glass-card[data-v-a5eb8c7f]{background:#000000b3;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);border:1px solid rgba(255,255,255,.1)}@keyframes ping-a5eb8c7f{75%,to{transform:scale(2);opacity:0}}@keyframes ping-fast-a5eb8c7f{0%{transform:scale(1);opacity:1}75%,to{transform:scale(4);opacity:0}}.animate-ping[data-v-a5eb8c7f]{animation:ping-a5eb8c7f cubic-bezier(0,0,.2,1) infinite}.animate-ping-fast[data-v-a5eb8c7f]{animation:ping-fast-a5eb8c7f .8s cubic-bezier(0,0,.2,1) 3}body{background-color:#09090b!important;color:#fff!important;margin:0;padding:0}html{scrollbar-width:thin;scrollbar-color:#374151 #1f2937}html::-webkit-scrollbar{width:8px}html::-webkit-scrollbar-track{background:#1f2937}html::-webkit-scrollbar-thumb{background-color:#374151;border-radius:4px}html::-webkit-scrollbar-thumb:hover{background-color:#4b5563}.sparkline-container[data-v-574bf55e]{background:#0006;border-radius:10px;padding:24px;-webkit-backdrop-filter:blur(50px);backdrop-filter:blur(50px)}.sparkline-svg[data-v-574bf55e]{transition:all .2s ease-out}.sparkline-path[data-v-574bf55e]{transition:stroke-width .2s ease-out}.sparkline-path.animate-draw[data-v-574bf55e]{stroke-dasharray:1000;stroke-dashoffset:1000;animation:drawPath-574bf55e 1s ease-out forwards}.sparkline-fill[data-v-574bf55e]{transition:opacity .3s ease-out}.sparkline-dot[data-v-574bf55e]{transition:all .2s ease-out}@keyframes drawPath-574bf55e{to{stroke-dashoffset:0}}@keyframes fadeInFill-574bf55e{to{opacity:1}}@keyframes fadeInDot-574bf55e{to{opacity:1}}.sparkline-container:hover .sparkline-path[data-v-574bf55e]{stroke-width:2.5}.sparkline-container:hover .sparkline-dot[data-v-574bf55e]{r:3;animation:pulse-574bf55e 2s infinite}@keyframes pulse-574bf55e{0%,to{opacity:1}50%{opacity:.7}}canvas[data-v-2ece57e8]{width:100%;height:100%}.modal-enter-active[data-v-3b73bfd6]{transition:all .3s cubic-bezier(.4,0,.2,1)}.modal-leave-active[data-v-3b73bfd6]{transition:all .2s ease-in}.modal-enter-from[data-v-3b73bfd6]{opacity:0;transform:scale(.95) translateY(-10px)}.modal-leave-to[data-v-3b73bfd6]{opacity:0;transform:scale(1.05)}.custom-scrollbar[data-v-3b73bfd6]{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.3) transparent}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar{width:6px}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar-track{background:#ffffff1a;border-radius:3px}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar-thumb{background:#ffffff4d;border-radius:3px}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar-thumb:hover{background:#fff6}.glass-card[data-v-3b73bfd6]{-webkit-backdrop-filter:blur(50px);backdrop-filter:blur(50px)}.packet-list-enter-active[data-v-d363f6a5],.packet-list-leave-active[data-v-d363f6a5],.packet-list-move[data-v-d363f6a5]{transition:all .4s ease-out}.packet-list-enter-from[data-v-d363f6a5]{opacity:0;transform:translateY(-30px) scale(.98)}.packet-list-enter-to[data-v-d363f6a5],.packet-list-leave-from[data-v-d363f6a5]{opacity:1;transform:translateY(0) scale(1)}.packet-list-leave-to[data-v-d363f6a5]{opacity:0;transform:translateY(-20px) scale(.95)}.packet-row[data-v-d363f6a5]{position:relative;transition:all .3s ease}.packet-list-enter-active .packet-row[data-v-d363f6a5]{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-d363f6a5]:hover{background:#ffffff05;border-radius:8px;transition:background .2s ease}@media (max-width: 1023px){.grid-cols-12[data-v-d363f6a5]{grid-template-columns:repeat(6,minmax(0,1fr))}.grid-cols-12>div[data-v-d363f6a5]:nth-child(n+7){display:none}.flex.justify-between[data-v-d363f6a5]{flex-direction:column;gap:1rem;align-items:stretch}.flex.items-center.gap-3[data-v-d363f6a5]:last-child{flex-direction:column;gap:1rem}.flex.flex-col[data-v-d363f6a5]{flex-direction:row;align-items:center;gap:.75rem}.flex.flex-col label[data-v-d363f6a5]{margin-bottom:0;min-width:60px}}@media (max-width: 640px){.grid-cols-12[data-v-d363f6a5]{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-12>div[data-v-d363f6a5]:nth-child(n+4){display:none}.flex.items-center.gap-3[data-v-d363f6a5]:last-child{flex-direction:column;gap:.75rem}.flex.flex-col[data-v-d363f6a5]{flex-direction:column;align-items:stretch}.flex.flex-col label[data-v-d363f6a5]{margin-bottom:.25rem;min-width:auto}}.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-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.leaflet-container[data-v-eb494437]{background:#0f1419!important;border-radius:8px}[data-v-eb494437] .leaflet-control-container{font-family:inherit}[data-v-eb494437] .leaflet-control-zoom{background:#2a2a2ae6!important;border:1px solid rgba(255,255,255,.1)!important;border-radius:6px!important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}[data-v-eb494437] .leaflet-control-zoom a{background:transparent!important;color:#fff!important;border:none!important;transition:all .3s ease}[data-v-eb494437] .leaflet-control-zoom a:hover{background:#a5e8b633!important;color:#a5e5b6!important}[data-v-eb494437] .leaflet-control-attribution{background:#0f1419cc!important;color:#9ca3af!important;border-radius:6px 0 0!important;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}[data-v-eb494437] .leaflet-control-attribution a{color:#a5e5b6!important}[data-v-eb494437] .leaflet-popup-content-wrapper{background:linear-gradient(135deg,#1f2937,#111827)!important;color:#fff;border-radius:12px!important;border:1px solid rgba(165,232,182,.2)!important;box-shadow:0 10px 25px #00000080!important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}[data-v-eb494437] .leaflet-popup-tip{background:#1f2937!important;border:1px solid rgba(165,232,182,.2)!important}[data-v-eb494437] .leaflet-container *,[data-v-eb494437] .leaflet-container{box-sizing:content-box}[data-v-eb494437] .connection-line{transition:all .3s ease}[data-v-eb494437] .animated-line{pointer-events:none}[data-v-eb494437] .leaflet-overlay-pane svg{shape-rendering:geometricPrecision}@keyframes pulse-direct-eb494437{0%,to{opacity:.9;filter:drop-shadow(0 0 3px #A5E5B6)}50%{opacity:1;filter:drop-shadow(0 0 8px #A5E5B6)}}@keyframes marker-glow-eb494437{0%,to{filter:brightness(1) drop-shadow(0 0 8px #A5E5B6) drop-shadow(0 0 8px #A5E5B6)}50%{filter:brightness(2.5) drop-shadow(0 0 25px #A5E5B6) drop-shadow(0 0 25px #A5E5B6) drop-shadow(0 0 35px #A5E5B6)}}@keyframes marker-pulse-eb494437{0%,to{box-shadow:0 0 #a5e8b6cc}50%{box-shadow:0 0 0 20px #a5e8b600}}[data-v-eb494437] .leaflet-marker-icon{transition:all .3s ease}[data-v-eb494437] .marker-highlight{z-index:1000!important;animation:marker-glow-eb494437 1s ease-in-out infinite,marker-pulse-eb494437 1s ease-in-out infinite;border-radius:50%!important;outline:3px solid #A5E5B6!important;outline-offset:2px!important}.plotly-chart[data-v-9766a4d1]{background:transparent!important}.ml-0[data-v-4afde13e]{margin-left:0rem}.ml-4[data-v-4afde13e]{margin-left:1rem}.ml-8[data-v-4afde13e]{margin-left:2rem}.ml-12[data-v-4afde13e]{margin-left:3rem}.ml-16[data-v-4afde13e]{margin-left:4rem}.ml-20[data-v-4afde13e]{margin-left:5rem}.ml-24[data-v-4afde13e]{margin-left:6rem}.ml-28[data-v-4afde13e]{margin-left:7rem}.ml-32[data-v-4afde13e]{margin-left:8rem}.glass-card[data-v-854f5f55]{background:#ffffff0d;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.1)} diff --git a/repeater/web/html/favicon.ico b/repeater/web/html/favicon.ico new file mode 100644 index 0000000..df36fcf Binary files /dev/null and b/repeater/web/html/favicon.ico differ diff --git a/repeater/web/html/index.html b/repeater/web/html/index.html new file mode 100644 index 0000000..3a4c491 --- /dev/null +++ b/repeater/web/html/index.html @@ -0,0 +1,17 @@ + + + + + + + pyMC Repeater Dashboard + + + + + + + +
+ +